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

SegmentImage_Gray_Tiled
Header: | FIL.h |
---|---|
Namespace: | fil |
Module: | FoundationPro |
Segments an image into blobs examining differences between pixels values, first pass is tiled.
Applications: Detection of objects of undefined shape, but characterized by uniform brightness and good contrast to the background.
Syntax
C++
C#
void fil::SegmentImage_Gray_Tiled ( const fil::Image& inImage, ftl::Optional<const fil::Region&> inRoi, fil::BlobMergingMethod::Type inMergingMethod, fil::RegionConnectivity::Type inConnectivity, 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 | |
![]() |
inConnectivity | RegionConnectivity::Type | |||
![]() |
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. Supported formats: 1xUInt8, 3xUInt8. |
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.
- SegmentImage_Watersheds – Computes dark or bright watershed basins of an image.