IMcThresholdFindIntensityRange Method
|
|
Sets the IntensityRange property for a specified phase.
Namespace:
MediaCy.IQL.Features
Assembly:
MediaCy.IQL.Features (in MediaCy.IQL.Features.dll) Version: 10.0.6912.0
SyntaxSub FindIntensityRange (
Optional PhaseToFind As mcFindPhase = mcFindPhase.mcfpCurrent,
<OptionalAttribute> SourceImage As Object
)
Parameters
- PhaseToFind (Optional)
- Type: MediaCy.IQL.FeaturesmcFindPhase
mcFindPhase : Specifies the intensity range "phase" you are
interested in finding to set the IntensityRange property. If this is
mcfpCurrent, then the AutoFindPhase property is used. If the value is
mcfpManual, then no change at all is made to the IntensityRange property
values; i.e., the operation does nothing. Otherwise this can be either
mcfpDarkest for darkest phase (this is always phase 0) or mcfpBrightest for
the brightest phase (this is always
McThreshold.Histogram.MaxThresholdPhases-1). Or it can be a numeric phase
number starting at zero (lowest luminance phase) up through
McThreshold.Histogram.MaxThresholdPhases-1 (highest luminance phase). Phase
numbers greater than McThreshold.Histogram.MaxThresholdPhases-1 are silently
set to be mcfpBrightest. See the McHistogram.SetThresholdParameters for how
to set the number of phases available for any method. By default there are
only two. - SourceImage (Optional)
- Type: SystemObject
VARIANT : Source McImage for the computation for global
instances of McThreshold (ones with no ancestor McImage). This argument is
required for global instances of McThreshold, and it must be missing
for McThreshold instances with an image ancestor.
RemarksIf the Interpretation property is assigned mctiAnyInterp, then
the native image type's number of channels is used to determine how many
DOUBLERANGE start,end values need to be computed to fill the IntensityRange
property.
If the Interpretation property is the default mctiMonochrome, then an intensity
thresholding is done by casting each pixel to a single intensity channel. In
this case, the IntensityRange property is assigned only one DOUBLERANGE value,
based on a cast to monochrome intensity values.
The other allowed Interpretation values are mctiRGB, mctiHSL and mctiHSI
corresponding to the three color channels Red-Green-Blue,
Hue-Saturation-Lumiance and Hue-Saturation-Intensity, respectively. In these
cases, the IntensityRange property is an array of 3 DOUBLERANGE values, and
the automatic IntensityRange detection is based on the image cast to the
specified interpetation, while preserving the pixel bit-depth.
The automatic IntensityRange setting calls upon the services of a
McThreshold.Histogram object and gets its intensity range results from the
Thresholds property. You can set some properties of this McHistogram object to
control how the Thresholds are computed (see example):
McThreshold.Histogram.Mode property: you can clear the mchmProcessActiveFrameOnly
to have the histogram honor the source McImage.ActiveFrameRange property
(as enabled by the McImage.UseActiveFrameRange property). By default, the
McThreshold.Histogram.Mode mchmProcessActiveFrameOnly flag is set, so that
the IntensityRange is based on the histogram from the source McImage.ActiveFrame.
This is the default, because the McThreshold.Execute operation itself always
works on only the ActiveFrame.
McThreshold.Histogram.BinCount property: This will determine the resolution of
the thresholds detected by histogram-based thresholding methods. The default is
256, so even for high-bit depth integer or floating point image types, the
IntensityRange values will be set to within one part in 256 of the source
McImage.RangeMin/Max luminance range. For better resolution on high bit depth
or floating point images, this value may be increased, at a cost of some increased
processing time and memory usage, up to McThreshold.Histogram.MaxBinCount.
McThreshold.Histogram.SetThresholdParameters method: You may call this method to
set auto-thresholding method and its parameters. By default, the Method is
mchmMinimumVarianceMethod (also known as the method of Otsu) looking for two
intensity phases (ranges), with no trimming or saturation rejection at either
end of the histogram.
All other McThreshold.Histogram properties are handled by this method, so they
should be left alone.
See Also