SegmentImage_Gray
Segments an image into blobs examining differences between neighbouring pixels values.
Applications:Detection of objects of undefined shape, but characterized by uniform brightness and good contrast to the background.
Syntax
C++
C#
Python
def SegmentImage_Gray( inImage: Image, /, *, inRoi: Region | None = None, inMaxDifference: float = 5.0, inDifferenceMeasure: BlobsDifferenceMeasure = BlobsDifferenceMeasure.Neighbour, inMinArea: int = 50, inMaxArea: int | None = None ) -> outBlobs: list[Region]
Parameters
| Name | Type | Range | Default | Description | |
|---|---|---|---|---|---|
![]() |
inImage | Image | Image from which blobs are extracted | ||
![]() |
inRoi | Region | None | None | Range of pixels to be processed | |
![]() |
inMaxDifference | float | 0.0 - ![]() |
5.0 | Maximal difference between two neighbouring blobs to be merged |
![]() |
inDifferenceMeasure | BlobsDifferenceMeasure | BlobsDifferenceMeasure.Neighbour | Measure of blobs difference | |
![]() |
inMinArea | int | 0 - ![]() |
50 | Minimal area of a blob |
![]() |
inMaxArea | int | None | 0 - ![]() |
None | Maximal area of a blob |
![]() |
outBlobs | list[Region] | Blobs extracted from the input image |



