IMcProfileEdgesEdgeFindingMethod Property
|
|
Determines the algorithm that FindEdges uses for weighting profiles.
Namespace:
MediaCy.IQL.Features
Assembly:
MediaCy.IQL.Features (in MediaCy.IQL.Features.dll) Version: 10.0.6912.0
Syntax
RemarksIn its weighting phase, FindEdges uses one of two general methods for
analyzing a profile to generate a weighted profile (see FindEdges for an
overview discussion). The two methods are a weighted average method and a
correlation method. The four flavors of the weighted average approach will find
luminance peaks, valleys, rising edges or falling edges (the corresponding
EdgeFindingMethod values are mcpefmPeaks, mcpefmValleys, mcpefmRisingEdges and
mcpefmFallingEdges). The other method, specified by the mcpefmMatchPattern
EdgeFindingMethod, will detect good matches between the luminance profile and a
supplied luminance pattern.
The weighted average methods are simpler and generally work well for profiles
with sharp luminance transitions (for mcpefmRisingEdges or mcpefmFallingEdges)
or with narrow luminance peaks or valleys (for mcpefmPeaks or mcpefmValleys).
Two properties affect these weighted average methods: Weights and MatchLength.
The defaults for these usually work adequately: the MatchLength is 5 pixels
while the Weights are 0.6, 0.8, 1.0, 0.8, 0.6 (that is, the center point gets
full weight and the profile samples on either side are given slightly less
weight). The Weight property array is automatically mapped onto the
MatchLength, so MatchLength could be changed to 7 for example without needing to
change the Weights property (this would favor more gradual transitions).
The mcpefmMatchPattern EdgeFindingMethod, performs a correlation between the
luminance profile and a supplied luminance pattern to come up with the weighted
profile. The Pattern property specifies the shape of the luminance pattern
being sought, while the MatchLength property specifies its length (the Pattern
property array is stretched or shrunk as necessary to map onto the MatchLength).
The SizeWeighting property is a value between 0 and 100 that controls the degree
to which profile amplitude changes are considered in the weighting (0 is a pure
correlation, profil amplitude does not matter, only profile shape; 100 is a pure
convolution, larger profile amplitude yields larger weighted result).
SizeWeighting is 50 by default. In addition, two of the WeightingFlags can be
turned on to force an even closer match to the supplied Pattern:
mcpewfPointsForSameSize will cause profile patterns that are the same amplitude
as the Pattern property to be favored over either smaller or larger amplitudes,
and mcpewfPointsForSameOffset will cause profile patterns that are the same mean
luminanance as the Pattern property's mean luminance to be favored over either
dimmer or brighter sections of the pattern. Both flags are off by default; you
may set one or both of them.
When EdgeFindingMethod is assigned mcpefmMatchPattern, then the MatchLength
property is forced to be at least 2 (MatchLength is allowed to be 1 for the
weighted averaging methods, but it must be 2 or more for the mcpefmMatchPattern
method).
When EdgeFindingMethod is assigned either mcpefmPeaks or mcpefmValleys, then
the OptionFlags mcpeofAbsoluteThresholding bit is cleared. This is done because
thresholding against the AbsoluteMaxWeightValue is rarely appropriate for
these weighted averaging methods.
See Also