You are here: Start » AVL.NET » Function Reference » Computer Vision » Image Segmentation » AVL.SegmentImage_Watersheds

AVL.SegmentImage_Watersheds

Computes dark or bright watershed basins of an image.

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax

C++
C#
 
public static void SegmentImage_Watersheds
(
	AvlNet.Image inImage,
	NullableRef<AvlNet.Region> inRoi,
	IList<AvlNet.Region> inMarkers,
	AvlNet.Polarity inBasinsPolarity,
	IList<AvlNet.Region> outBasins
)

Parameters

Name Type Range Default Description
inImageAvlNet.ImageInput image.
inRoiAvlNet.NullableRef<AvlNet.Region>Range of pixels to be processed. Default value: atl::NIL.
inMarkersSystem.Collections.Generic.IList<AvlNet.Region>Local minima markers.
inBasinsPolarityAvlNet.PolarityWhether to look for bright or dark basins.
outBasinsSystem.Collections.Generic.IList<AvlNet.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.

Function Overrides

See also