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

SegmentImage_Gray_Tiled
Header: | FIL.h |
---|---|
Namespace: | fil |
Segments an image into blobs examining differences between pixels values, first pass is tiled.
Syntax
C++
C#
void fil::SegmentImage_Gray_Tiled ( const fil::Image& inImage, ftl::Optional<const fil::Region&> inRoi, fil::BlobMergingMethod::Type inMergingMethod, int inMaxDifference, int inHysteresis, bool inTonalDrift, bool inDirectional, int inMinArea, ftl::Optional<int> inMaxArea, ftl::Array<fil::Region>& outBlobs )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() |
inImage | const Image& | Input image | ||
![]() |
inRoi | Optional<const Region&> | NIL | Range of pixels to be processed | |
![]() |
inMergingMethod | BlobMergingMethod::Type | Neighbor | Defines a criterion by which two pixels can be merged into one blob | |
![]() |
inMaxDifference | int | 0 - ![]() |
5 | Maximal tonal difference that allows two pixels to be merged into one blob |
![]() |
inHysteresis | int | Change of MaxDifference between first and second iteration | ||
![]() |
inTonalDrift | bool | True | When 'True' blobs can be merged even if the illumination is not even | |
![]() |
inDirectional | bool | When 'True' the filter can segment results of GradientDirAndPresenceImage | ||
![]() |
inMinArea | int | 0 - ![]() |
20 | Minimal area of a blob that may be accepted |
![]() |
inMaxArea | Optional<int> | NIL | Minimal area of a blob that may be accepted | |
![]() |
outBlobs | Array<Region>& |
Requirements
For input inImage only pixel formats are supported: 1⨯uint8, 3⨯uint8.
Read more about pixel formats in Image documentation.
Description
The filter segments the inImage image in two phases. In the first step segmentation is done within tiles, while in the second step blobs are merged between consecutive tiles.
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Directional method only supports single-channel images. |
DomainError | Not supported inImage pixel format in SegmentImage_Gray_Tiled. |
See Also
- SegmentImage_Gray_Linear – Segments an image into blobs examining differences between pixels values.
- SegmentImage_Edges – Segments an image into blobs using image edges as their borders.
- ImageWatersheds – Computes dark basins which are separated by at least inThreshold height watershed.