You are here: Start » Filter Reference » Computer Vision » Image Segmentation » SegmentImage_Gray_Linear
Module: | FoundationPro |
---|
Segments an image into blobs examining differences between pixels values.
Applications
Name | Type | Range | Description | |
---|---|---|---|---|
![]() |
inImage | Image | Input image | |
![]() |
inRoi | Region* | Range of pixels to be processed | |
![]() |
inMergingMethod | BlobMergingMethod | Defines a criterion by which two pixels can be merged into one blob | |
![]() |
inConnectivity | RegionConnectivity | Defines if pixels can be merged only horizontally and vertically, or also diagonally | |
![]() |
inMaxDifference | Integer | 0 - ![]() |
Maximal tonal difference that allows two pixels to be merged into one blob |
![]() |
inHysteresis | Integer | Total change of MaxDifference during all image passes | |
![]() |
inPassCount | Integer | 1 - 5 | Number of iterations in which the entire image is scanned for pixels that can be merged |
![]() |
inDirectional | Bool | When 'True' the filter can segment results of GradientDirAndPresenceImage | |
![]() |
inMinArea | Integer | 0 - ![]() |
Minimal area of a blob that may be accepted |
![]() |
inMaxArea | Integer* | Minimal area of a blob that may be accepted | |
![]() |
outBlobs | RegionArray |
Requirements
For input inImage only pixel formats are supported: 1⨯uint8, 1⨯int8, 1⨯uint16, 1⨯int16, 1⨯int32, 1⨯real, 3⨯uint8, 3⨯int8, 3⨯uint16, 3⨯int16, 3⨯int32, 3⨯real.
Read more about pixel formats in Image documentation.
Description
The filter segments the inImage image into blobs of pixels which gray values do not differ too much. The classification is different depending on the inMergingMethod input:
- Neighbor – two adjacent pixels are considered to belong to the same blob when their values differ by at most inMaxDifference
- NeighborVerified – as above, but an additional verification is performed to avoid undersegmentation
- Mean – pixel is considered to belong to an adjacent blob when its value differs by at most inMaxDifference from the mean value of this blob's pixels
- MeanSorted – not implemented in this filter
Examples
![]() |
![]() |
SegmentImage_Gray_Linear performed on the sample image with inMaxDifference = 55, inMergingMethod = MeanLinear and inMinArea = 50.
Errors
This filter can throw an exception to report error. Read how to deal with errors in Error Handling.
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Directional method only supports single-channel images. |
DomainError | Directional method only supports UInt8 images. |
DomainError | Two- and four-channel images are not supported in SegmentImage_Gray. |
DomainError | Not supported inImage pixel format in SegmentImage_Gray_Linear. |
Complexity Level
This filter is available on Advanced Complexity Level.
Filter Group
This filter is member of SegmentImage filter group.
See Also
- SegmentImage_Gray_Tiled – Segments an image into blobs examining differences between pixels values, first pass is tiled.
- SegmentImage_Edges – Segments an image into blobs using image edges as their borders.
- SegmentImage_Watersheds – Computes dark or bright watershed basins of an image.