[mmCthin] [Up] [mmSkiz] Thinning And Thickening

mmCwatershed
Detection of watershed from markers.

Synopsis

Image mmCwatershed ( const Image& f , const Image& g , const Strel& Bc = NullStrel, const String& LINEREG = "LINES" );

Input

f Image [ Gray-scale (uint8 or uint16) image ]

g Image [ Gray-scale (uint8 or uint16) or binary image ]

marker image: binary or labeled.

Bc Structuring Element

(watershed connectivity)

Default: NullStrel (3x3 elementary cross)

LINEREG String

Output image: 'LINES' or 'REGIONS'.

Default: "LINES"

Output

Y Image [ Gray-scale (uint8 or uint16) or binary image ]

Description

mmCwatershed creates the image y by detecting the domain of the catchment basins of f indicated by the marker image g, according to the connectivity defined by Bc. According to the flag LINEREG y will be a labeled image of the catchment basins domain or just a binary image that presents the watershed lines. To know more about watershed and watershed from markers, see [BM93]. The implementation of this function is based on [LF00].

WARNING: There is a common mistake related to the marker image g. If this image contains only zeros and ones, but it is not a binary image, the result will be an image with all ones. If the marker image is binary, you have to set this explicitly using the logical function.

Equation

Equation (watershed regions):
Minimum length of a point to a set:
Length of a point to a set:
Where:
is the path between the point x and subset X under connectivity Bc

See also

mmWatershed Watershed detection.
mmSebox Create a box structuring element.
mmSecross Diamond structuring element and elementary 3x3 cross.
mmSwatershed Detection of similarity-based watershed from markers.
mmdCalc Extract the keys of a calculator.
[mmCthin] [Up] [mmSkiz]