Back to Aurora Vision Library website

You are here: Start » Function Reference » Computer Vision » Image Segmentation » SegmentImage_Gray_Tiled


Header: AVL.h
Namespace: avl
Module: FoundationPro

Segments an image into blobs examining differences between pixels values, first pass is tiled.

Applications: Detection of objects of undefined shape, but characterized by uniform brightness and good contrast to the background.


void avl::SegmentImage_Gray_Tiled
	const avl::Image& inImage,
	atl::Optional<const avl::Region&> inRoi,
	avl::BlobMergingMethod::Type inMergingMethod,
	avl::RegionConnectivity::Type inConnectivity,
	int inMaxDifference,
	int inHysteresis,
	bool inTonalDrift,
	bool inDirectional,
	int inMinArea,
	atl::Optional<int> inMaxArea,
	atl::Array<avl::Region>& outBlobs


Name Type Range Default Description
Input value
inImage const Image& Input image
Input value
inRoi Optional<const Region&> NIL Range of pixels to be processed
Input value
inMergingMethod BlobMergingMethod::Type Neighbor Defines a criterion by which two pixels can be merged into one blob
Input value
inConnectivity RegionConnectivity::Type
Input value
inMaxDifference int 0 - 5 Maximal tonal difference that allows two pixels to be merged into one blob
Input value
inHysteresis int Change of MaxDifference between first and second iteration
Input value
inTonalDrift bool True When 'True' blobs can be merged even if the illumination is not even
Input value
inDirectional bool 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 Optional<int> NIL Minimal area of a blob that may be accepted
Output value
outBlobs Array<Region>&


For input inImage only pixel formats are supported: 1⨯uint8, 3⨯uint8.

Read more about pixel formats in Image documentation.


The filter segments the inImage image in two phases. In the first step segmentation is done within tiles, while in the second step blobs are merged between consecutive tiles.


List of possible exceptions:

Error type Description
DomainError Directional method only supports single-channel images.
DomainError Not supported inImage pixel format in SegmentImage_Gray_Tiled. Supported formats: 1xUInt8, 3xUInt8.

See Also