Back to Adaptive Vision Library website

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

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.

Syntax

C++
C#
 
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
)

Parameters

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

Requirements

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

Read more about pixel formats in Image documentation.

Description

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.

Errors

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.

See Also