You are here: Start » AVL.NET » Function Reference » Image » Image Thresholding » AVL.SelectThresholdValue

AVL.SelectThresholdValue

Selects best threshold value using the image histogram.

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax

C++
C#
 
public static void SelectThresholdValue
(
	AvlNet.Image inImage,
	AvlNet.ThresholdSelectionMethod inMethod,
	out float outThresholdValue
)

Parameters

Name Type Range Default Description
inImageAvlNet.ImageInput image.
inMethodAvlNet.ThresholdSelectionMethodMethod used to select the best threshold.
outThresholdValuefloatBest threshold separating background pixels from foreground pixels.

Description

The operation estimates an intensity threshold value that discriminates foreground pixels from background pixels in inImage.

Note that to provide meaningful results it is required that the image in fact consists of foreground and background components that strongly differ in brightness.

Examples

SelectThresholdValue performed on the sample image (on the left) with inMethod = ClusteringKittler yields outThresholdValue = 189.5. Pixels of the input image brighter than 189.5 are presented on the right.

Errors

List of possible exceptions:

Error type Description
DomainError Region exceeds an input image in SelectThresholdValue.
DomainError Not supported inImage pixel format in SelectThresholdValue.

Function Overrides

See also