You are here: Start » FIL.NET » FIL.SegmentImage_Gray_Linear
Segments an image into blobs examining differences between pixels values.
Namespace: | FilNet |
---|---|
Assembly: | FIL.NET.dll |
Syntax
C++
C#
public static void SegmentImage_Gray_Linear ( FilNet.Image inImage, FilNet.BlobMergingMethod inMergingMethod, FilNet.RegionConnectivity inConnectivity, int inMaxDifference, int inHysteresis, int inPassCount, bool inDirectional, int inMinArea, IList<FilNet.Region> outBlobs )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() | inImage | FilNet.Image | Input image. | ||
![]() | inMergingMethod | FilNet.BlobMergingMethod | Neighbor | Defines a criterion by which two pixels can be merged into one blob. Default value: Neighbor. | |
![]() | inConnectivity | FilNet.RegionConnectivity | Defines if pixels can be merged only horizontally and vertically, or also diagonally. | ||
![]() | inMaxDifference | int | <0, INF> | 5 | Maximal tonal difference that allows two pixels to be merged into one blob. Default value: 5. |
![]() | inHysteresis | int | Change of MaxDifference after each pass. | ||
![]() | inPassCount | int | <1, 3> | 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 | int | <0, INF> | 20 | Minimal area of a blob that may be accepted. Default value: 20. |
![]() | outBlobs | System.Collections.Generic.IList<FilNet.Region> |
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
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. |