BinaryWatershed Class |
Namespace: Accord.Imaging.Filters
The BinaryWatershed type exposes the following members.
Name | Description | |
---|---|---|
BinaryWatershed |
Initializes a new instance of the BinaryWatershed class.
| |
BinaryWatershed(Single) |
Initializes a new instance of the BinaryWatershed class.
| |
BinaryWatershed(DistanceTransformMethod) |
Initializes a new instance of the BinaryWatershed class.
| |
BinaryWatershed(Single, DistanceTransformMethod) |
Initializes a new instance of the BinaryWatershed class.
|
Name | Description | |
---|---|---|
Distance |
Gets or sets the distance method to be used in the
underlying DistanceTransform.
| |
FormatTranslations |
Format translations dictionary.
(Overrides BaseInPlaceFilterFormatTranslations.) | |
MaxPoints |
Gets the list of maximum points found in the image.
| |
Tolerance |
Gets or sets the tolerance. Default is 0.5f.
|
Name | Description | |
---|---|---|
Apply(Bitmap) |
Apply filter to an image.
(Inherited from BaseInPlaceFilter.) | |
Apply(BitmapData) |
Apply filter to an image.
(Inherited from BaseInPlaceFilter.) | |
Apply(UnmanagedImage) |
Apply filter to an image in unmanaged memory.
(Inherited from BaseInPlaceFilter.) | |
Apply(UnmanagedImage, UnmanagedImage) |
Apply filter to an image in unmanaged memory.
(Inherited from BaseInPlaceFilter.) | |
ApplyInPlace(Bitmap) |
Apply filter to an image.
(Inherited from BaseInPlaceFilter.) | |
ApplyInPlace(BitmapData) |
Apply filter to an image.
(Inherited from BaseInPlaceFilter.) | |
ApplyInPlace(UnmanagedImage) |
Apply filter to an unmanaged image.
(Inherited from BaseInPlaceFilter.) | |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ProcessFilter |
Processes the filter.
(Overrides BaseInPlaceFilterProcessFilter(UnmanagedImage).) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
HasMethod |
Checks whether an object implements a method with the given name.
(Defined by ExtensionMethods.) | |
IsEqual |
Compares two objects for equality, performing an elementwise
comparison if the elements are vectors or matrices.
(Defined by Matrix.) | |
To(Type) | Overloaded.
Converts an object into another type, irrespective of whether
the conversion can be done at compile time or not. This can be
used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.) | |
ToT | Overloaded.
Converts an object into another type, irrespective of whether
the conversion can be done at compile time or not. This can be
used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.) |
In the study of image processing, a watershed is a transformation defined on a grayscale image. The name refers metaphorically to a geological watershed, or drainage divide, which separates adjacent drainage basins. The watershed transformation treats the image it operates upon like a topographic map, with the brightness of each point representing its height, and finds the lines that run along the tops of ridges.
There are different technical definitions of a watershed. In graphs, watershed lines may be defined on the nodes, on the edges, or hybrid lines on both nodes and edges. Watersheds may also be defined in the continuous domain.[1] There are also many different algorithms to compute watersheds. Watershed algorithm is used in image processing primarily for segmentation purposes.
References:
Bitmap input = ... // Apply the transform var dt = new BinaryWatershed(); Bitmap output = dt.Apply(input); // Show results on screen ImageBox.Show("input", input); ImageBox.Show("output", output); // Mark points using PointsMarker var marker = new PointsMarker(Color.Red, 5) { Points = bw.MaxPoints }; Bitmap marked = marker.Apply(result); ImageBox.Show("markers", marked);