You are here: Start » AVL.NET » 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, float inMaxDifference, AvlNet.BlobsDifferenceMeasure inDifferenceMeasure, int inMinArea, IList<AvlNet.Region> outBlobs )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
inImage | AvlNet.Image | Image from which blobs are extracted. | |||
inMaxDifference | float | <0.0f, INF> | 5.0f | Maximal difference between two neighbouring blobs to be merged. Default value: 5.0f. | |
inDifferenceMeasure | AvlNet.BlobsDifferenceMeasure | Neighbour | Measure of blobs difference. Default value: Neighbour. | ||
inMinArea | int | <0, INF> | 50 | Minimal area of a blob. Default value: 50. | |
outBlobs | System.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
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Not supported difference measure in SegmentImage_Gray. |