EasyImage::ThreeLevelsMinResidueThreshold

Computes the two threshold values used to separate the pixels of an image in three classes.

Namespace: Euresys::Open_eVision

[C++]

float ThreeLevelsMinResidueThreshold(
   EBWHistogramVector* histogram,
   EBW8& firstGrayPixelValue,
   EBW8& firstWhitePixelValue,
   float& averageBlack,
   float& averageGray,
   float& averageWhite
)

Parameters

histogram

Histogram of the image.

firstGrayPixelValue

Low threshold.

firstWhitePixelValue

High threshold.

averageBlack

Average value of the black pixels (pixels under the low threshold).

averageGray

Average value of the gray pixels (pixels between the low threshold and the high threshold).

averageWhite

Average value of the white pixels (pixels over the high threshold).

Remarks

These values are computed using the minimum residue criterion from the histogram of the image. The function returns the minimum residue as per the method. The residue is the Euclidian distance between the source image and the thresholded image.

EasyImage.ThreeLevelsMinResidueThreshold

Computes the two threshold values used to separate the pixels of an image in three classes.

Namespace: Euresys.Open_eVision

[C#]

float ThreeLevelsMinResidueThreshold(
   Euresys.Open_eVision.EBWHistogramVector histogram,
   out Euresys.Open_eVision.EBW8 firstGrayPixelValue,
   out Euresys.Open_eVision.EBW8 firstWhitePixelValue,
   out float averageBlack,
   out float averageGray,
   out float averageWhite
)

Parameters

histogram

Histogram of the image.

firstGrayPixelValue

Low threshold.

firstWhitePixelValue

High threshold.

averageBlack

Average value of the black pixels (pixels under the low threshold).

averageGray

Average value of the gray pixels (pixels between the low threshold and the high threshold).

averageWhite

Average value of the white pixels (pixels over the high threshold).

Remarks

These values are computed using the minimum residue criterion from the histogram of the image. The function returns the minimum residue as per the method. The residue is the Euclidian distance between the source image and the thresholded image.