You are here: Start » FIL.NET » FIL.SegmentImage_Gray
Segments an image into blobs examining differences between neighbouring pixels values.
Namespace: | FilNet |
---|---|
Assembly: | FIL.NET.dll |
Syntax
C++
C#
public static void SegmentImage_Gray ( FilNet.Image inImage, NullableRef<FilNet.Region> inRoi, float inMaxDifference, FilNet.BlobsDifferenceMeasure inDifferenceMeasure, int inMinArea, int? inMaxArea, IList<FilNet.Region> outBlobs )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() | inImage | FilNet.Image | Image from which blobs are extracted. | ||
![]() | inRoi | FilNet.NullableRef<FilNet.Region> | Range of pixels to be processed. Default value: ftl::NIL. | ||
![]() | inMaxDifference | float | <0.0f, INF> | 5.0f | Maximal difference between two neighbouring blobs to be merged. Default value: 5.0f. |
![]() | inDifferenceMeasure | FilNet.BlobsDifferenceMeasure | Neighbour | Measure of blobs difference. Default value: Neighbour. | |
![]() | inMinArea | int | <0, INF> | 50 | Minimal area of a blob. Default value: 50. |
![]() | inMaxArea | int? | <0, INF> | Maximal area of a blob. Default value: ftl::NIL. | |
![]() | outBlobs | System.Collections.Generic.IList<FilNet.Region> | Blobs extracted from the input image. |
Description
The filter segments the inImage image into blobs of adjacent pixels which gray values do not differ too much. The classification is different depending on the inDifferenceMeasure method:
- if Mean is selected, 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
- if Neighbour is selected, two adjacent pixels are considered to belong to the same blob when their values differ by at most inMaxDifference
Examples
![]() |
![]() |
SegmentImage_Gray performed on the sample image with inMaxDifference = 55, inDifferenceMeasure = Mean and inMinArea = 50.
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Not supported difference measure in SegmentImage_Gray. |