Back to FabImage Library website
You are here: Start » Function Reference » Image Segmentation » ImageWatersheds

ImageWatersheds
Header: | FIL.h |
---|---|
Namespace: | fil |
Computes dark basins which are separated by at least inThreshold height watershed.
Syntax
C++
C#
void fil::ImageWatersheds ( const fil::Image& inImage, const int inThreshold, ftl::Array<fil::Region>& outBasins )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() |
inImage | const Image& | Input image | ||
![]() |
inThreshold | const int | 0 - +![]() |
10 | Input minimum separating watershed height |
![]() |
outBasins | Array<Region>& | Output dark basins found |
Description
Image is interpreted as a topographic map, where dark pixels represents valleys. Each step of iteration increase level of water in valleys, until basins are adjacent. Each basin is represented by another region in a result array.
Examples

ImageWatersheds performed on the sample image.
See Also
- SegmentImage_Gray – Segments an image into blobs examining differences between neighbouring pixels values.
- SegmentImage_Edges – Segments an image into blobs using image edges as their borders.