You are here: Start » FIL.NET » Function Reference » Computer Vision » Image Segmentation » FIL.SegmentImage_Watersheds
Computes dark or bright watershed basins of an image.
Namespace: | FilNet |
---|---|
Assembly: | FIL.NET.dll |
Syntax
public static void SegmentImage_Watersheds ( FilNet.Image inImage, NullableRef<FilNet.Region> inRoi, IList<FilNet.Region> inMarkers, FilNet.Polarity inBasinsPolarity, IList<FilNet.Region> outBasins )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() | inImage | FilNet.Image | Input image. | ||
![]() | inRoi | FilNet.NullableRef<FilNet.Region> | Range of pixels to be processed. Default value: ftl::NIL. | ||
![]() | inMarkers | System.Collections.Generic.IList<FilNet.Region> | Local minima markers. | ||
![]() | inBasinsPolarity | FilNet.Polarity | Whether to look for bright or dark basins. | ||
![]() | outBasins | System.Collections.Generic.IList<FilNet.Region> |
Description
This filter segments the image into basins based on a set of markers (inMarkers) and a flooding watersheds implementation for grayscale images.
By default a darker pixel is considered lower but that can be changes using the inBasinsPolarity parameter.
Markers have to be computed beforehand. One way to do that is to detect the ridges of the image and threshold it into a single region, Pass the resulting region into the DistanceTransform filter. Then threshold the distance image and split it into blobs.
Examples
![]() Example image |
![]() Computed markers |
![]() Basins computed with watersheds |
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | No markers present in SegmentImage_Watersheds. |
DomainError | Not supported inImage pixel format in SegmentImage_Watersheds. Supported formats: UInt8. |