SegmentImage_Gray_Linear


Segments an image into blobs examining differences between 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_Linear(
	inImage: Image,
	inConnectivity: RegionConnectivity,
	inHysteresis: int,
	/,
	*,
	inRoi: Region | None = None,
	inMergingMethod: BlobMergingMethod = BlobMergingMethod.Neighbor,
	inMaxDifference: int = 5,
	inPassCount: int = 1,
	inDirectional: bool = False,
	inMinArea: int = 20,
	inMaxArea: int | None = None
)
-> outBlobs: list[Region]

Parameters

Name Type Range Default Description
Input value inImage Image Input image
Input value inRoi Region | None None Range of pixels to be processed
Input value inMergingMethod BlobMergingMethod BlobMergingMethod.Neighbor Defines a criterion by which two pixels can be merged into one blob
Input value inConnectivity RegionConnectivity Defines if pixels can be merged only horizontally and vertically, or also diagonally
Input value inMaxDifference int 0 - 5 Maximal tonal difference that allows two pixels to be merged into one blob
Input value inHysteresis int Total change of MaxDifference during all image passes
Input value inPassCount int 1 - 5 1 Number of iterations in which the entire image is scanned for pixels that can be merged
Input value inDirectional bool False When 'True' the filter can segment results of GradientDirAndPresenceImage
Input value inMinArea int 0 - 20 Minimal area of a blob that may be accepted
Input value inMaxArea int | None None Minimal area of a blob that may be accepted
Output value outBlobs list[Region]