You are here: Start » AVL.NET » Function Reference » Computer Vision » Image Segmentation » AVL.SegmentImage_Gray

AVL.SegmentImage_Gray

Segments an image into blobs examining differences between neighbouring pixels values.

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax

C++
C#
 
public static void SegmentImage_Gray
(
	AvlNet.Image inImage,
	NullableRef<AvlNet.Region> inRoi,
	float inMaxDifference,
	AvlNet.BlobsDifferenceMeasure inDifferenceMeasure,
	int inMinArea,
	int? inMaxArea,
	IList<AvlNet.Region> outBlobs
)

Parameters

Name Type Range Default Description
inImageAvlNet.ImageImage from which blobs are extracted.
inRoiAvlNet.NullableRef<AvlNet.Region>Range of pixels to be processed. Default value: atl::NIL.
inMaxDifferencefloat<0.0f, INF>5.0fMaximal difference between two neighbouring blobs to be merged. Default value: 5.0f.
inDifferenceMeasureAvlNet.BlobsDifferenceMeasureNeighbourMeasure of blobs difference. Default value: Neighbour.
inMinAreaint<0, INF>50Minimal area of a blob. Default value: 50.
inMaxAreaint?<0, INF>Maximal area of a blob. Default value: atl::NIL.
outBlobsSystem.Collections.Generic.IList<AvlNet.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.

Function Overrides

See also