EasyImage::HistogramThreshold

Determines an appropriate threshold level based on the histogram contents, using an automatic threshold mode.

Namespace: Euresys::Open_eVision

[C++]

void HistogramThreshold(
   EBWHistogramVector* histogram,
   OEV_UINT32& threshold,
   float& averageOfPixelsBelowThreshold,
   float& averageOfPixelsAboveThreshold,
   float relativeThreshold,
   OEV_UINT32 from,
   OEV_UINT32 to
)

Parameters

histogram

Pointer to a vector conaining an image histogram.

threshold

reference to the threshold value. Before calling the function, must be set to the appropriate thresholding mode, as defined by EThresholdMode.

averageOfPixelsBelowThreshold

Average gray level of the dark pixels (below threshold).

averageOfPixelsAboveThreshold

Average gray level of the light pixels (above threshold).

relativeThreshold

Relative threshold value, relevant only in the EThresholdMode_Relative mode.

from

Lower bound of the analyzed gray-level range.

to

Upper bound of the analyzed gray-level range.

Remarks

Additionally, returns the average gray levels in the regions below and above the threshold. The threshold level can be computed by analyzing a range of gray levels in the histogram.

EasyImage.HistogramThreshold

Determines an appropriate threshold level based on the histogram contents, using an automatic threshold mode.

Namespace: Euresys.Open_eVision

[C#]

void HistogramThreshold(
   Euresys.Open_eVision.EBWHistogramVector histogram,
   ref uint threshold,
   out float averageOfPixelsBelowThreshold,
   out float averageOfPixelsAboveThreshold,
   float relativeThreshold,
   uint from,
   uint to
)

Parameters

histogram

Pointer to a vector conaining an image histogram.

threshold

reference to the threshold value. Before calling the function, must be set to the appropriate thresholding mode, as defined by EThresholdMode.

averageOfPixelsBelowThreshold

Average gray level of the dark pixels (below threshold).

averageOfPixelsAboveThreshold

Average gray level of the light pixels (above threshold).

relativeThreshold

Relative threshold value, relevant only in the Relative mode.

from

Lower bound of the analyzed gray-level range.

to

Upper bound of the analyzed gray-level range.

Remarks

Additionally, returns the average gray levels in the regions below and above the threshold. The threshold level can be computed by analyzing a range of gray levels in the histogram.