Description

Gets the current thresholding parameters

Return Type

None  

Syntax

object.GetThresholdParameters Method, NumberOfPhases, TrimLeftPercent, TrimRightPercent, MethodDependent

The GetThresholdParameters Method syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type McHistogram.
MethodRequired. A mcHistThresholdsMethod enumeration, as described in settings.

The Method and flags is placed in this variable.

NumberOfPhasesRequired. A Long value.

The NumberOfPhases is placed in this variable.

TrimLeftPercentRequired. A Double value.

The TrimLeftPercent is placed in this variable.

TrimRightPercentRequired. A Double value.

The TrimRightPercent is placed in this variable.

MethodDependentRequired. A Double value.

Any Method dependent parameter is placed in this variable.

Settings

The settings for Method are:

ConstantValueDescription
 mchmCurrentMethod0

Whatever method was already set.

 mchmMinimumVarianceMethod1

The ratio of between-phase to total variance is minimized (method of Otsu). Works with either two or three phases. This is the default method if SetThresholdParameters has not been called.

 mchmLegacyIPP4Method2

A version of MinimumVariant with a bias towards low values. works with two phases only.

 mchmTrimmedHistogramMethod3

Three phases are computed, based on the TrimLeftPercent and TrimRightPercent arguments to SetThresholdParameters. Phase 0 is the leftmost, trimmed section of the histogram, Phase 1 is the middle section between the trimmed portions, and Phase 2 is the rightmost, trimmed section of the histogram. If only two phases are set as the NumberOfPhases, then only the left two are available.

 mchmMaskMethods255

mask for the mchtmXxxxMethod values

 mchmIgnoreBlack4096

Pixels in the leftmost bin are not included in the threshold computations, allowing you to ignore under illuminanted regions.

 mchmIgnoreWhite8192

Pixels in the rightmost bin are not included in the threshold computations, allowing you to ignore oversaturated regions.

Remarks

Thresholding parameters may be set by a call to the SetThresholdParameters method.