Name
fuzzy_measure_posT_fuzzy_measure_posFuzzyMeasurePosfuzzy_measure_posFuzzyMeasurePosFuzzyMeasurePos — Extract straight edges perpendicular to a rectangle or an annular arc.
Herror T_fuzzy_measure_pos(const Hobject Image, const Htuple MeasureHandle, const Htuple Sigma, const Htuple AmpThresh, const Htuple FuzzyThresh, const Htuple Transition, Htuple* RowEdge, Htuple* ColumnEdge, Htuple* Amplitude, Htuple* FuzzyScore, Htuple* Distance)
Herror fuzzy_measure_pos(Hobject Image, const HTuple& MeasureHandle, const HTuple& Sigma, const HTuple& AmpThresh, const HTuple& FuzzyThresh, const HTuple& Transition, HTuple* RowEdge, HTuple* ColumnEdge, HTuple* Amplitude, HTuple* FuzzyScore, HTuple* Distance)
HTuple HImage::FuzzyMeasurePos(const HMeasure& MeasureHandle, const HTuple& Sigma, const HTuple& AmpThresh, const HTuple& FuzzyThresh, const HTuple& Transition, HTuple* ColumnEdge, HTuple* Amplitude, HTuple* FuzzyScore, HTuple* Distance) const
HTuple HMeasure::FuzzyMeasurePos(const HImage& Image, const HTuple& Sigma, const HTuple& AmpThresh, const HTuple& FuzzyThresh, const HTuple& Transition, HTuple* ColumnEdge, HTuple* Amplitude, HTuple* FuzzyScore, HTuple* Distance) const
void FuzzyMeasurePos(const HObject& Image, const HTuple& MeasureHandle, const HTuple& Sigma, const HTuple& AmpThresh, const HTuple& FuzzyThresh, const HTuple& Transition, HTuple* RowEdge, HTuple* ColumnEdge, HTuple* Amplitude, HTuple* FuzzyScore, HTuple* Distance)
void HMeasure::FuzzyMeasurePos(const HImage& Image, double Sigma, double AmpThresh, double FuzzyThresh, const HString& Transition, HTuple* RowEdge, HTuple* ColumnEdge, HTuple* Amplitude, HTuple* FuzzyScore, HTuple* Distance) const
void HMeasure::FuzzyMeasurePos(const HImage& Image, double Sigma, double AmpThresh, double FuzzyThresh, const char* Transition, HTuple* RowEdge, HTuple* ColumnEdge, HTuple* Amplitude, HTuple* FuzzyScore, HTuple* Distance) const
void HImage::FuzzyMeasurePos(const HMeasure& MeasureHandle, double Sigma, double AmpThresh, double FuzzyThresh, const HString& Transition, HTuple* RowEdge, HTuple* ColumnEdge, HTuple* Amplitude, HTuple* FuzzyScore, HTuple* Distance) const
void HImage::FuzzyMeasurePos(const HMeasure& MeasureHandle, double Sigma, double AmpThresh, double FuzzyThresh, const char* Transition, HTuple* RowEdge, HTuple* ColumnEdge, HTuple* Amplitude, HTuple* FuzzyScore, HTuple* Distance) const
void HOperatorSetX.FuzzyMeasurePos(
[in] IHUntypedObjectX* Image, [in] VARIANT MeasureHandle, [in] VARIANT Sigma, [in] VARIANT AmpThresh, [in] VARIANT FuzzyThresh, [in] VARIANT Transition, [out] VARIANT* RowEdge, [out] VARIANT* ColumnEdge, [out] VARIANT* Amplitude, [out] VARIANT* FuzzyScore, [out] VARIANT* Distance)
VARIANT HMeasureX.FuzzyMeasurePos(
[in] IHImageX* Image, [in] double Sigma, [in] double AmpThresh, [in] double FuzzyThresh, [in] BSTR Transition, [out] VARIANT* ColumnEdge, [out] VARIANT* Amplitude, [out] VARIANT* FuzzyScore, [out] VARIANT* Distance)
VARIANT HImageX.FuzzyMeasurePos(
[in] IHMeasureX* MeasureHandle, [in] double Sigma, [in] double AmpThresh, [in] double FuzzyThresh, [in] BSTR Transition, [out] VARIANT* ColumnEdge, [out] VARIANT* Amplitude, [out] VARIANT* FuzzyScore, [out] VARIANT* Distance)
static void HOperatorSet.FuzzyMeasurePos(HObject image, HTuple measureHandle, HTuple sigma, HTuple ampThresh, HTuple fuzzyThresh, HTuple transition, out HTuple rowEdge, out HTuple columnEdge, out HTuple amplitude, out HTuple fuzzyScore, out HTuple distance)
void HMeasure.FuzzyMeasurePos(HImage image, double sigma, double ampThresh, double fuzzyThresh, string transition, out HTuple rowEdge, out HTuple columnEdge, out HTuple amplitude, out HTuple fuzzyScore, out HTuple distance)
void HImage.FuzzyMeasurePos(HMeasure measureHandle, double sigma, double ampThresh, double fuzzyThresh, string transition, out HTuple rowEdge, out HTuple columnEdge, out HTuple amplitude, out HTuple fuzzyScore, out HTuple distance)
fuzzy_measure_posfuzzy_measure_posFuzzyMeasurePosfuzzy_measure_posFuzzyMeasurePosFuzzyMeasurePos extracts straight edges which lie
perpendicular to the major axis of a rectangle or an annular arc.
In addition to measure_posmeasure_posMeasurePosmeasure_posMeasurePosMeasurePos it uses fuzzy functions to
evaluate and select the edges.
The algorithm works by averaging the gray values in “slices”
perpendicular to the major axis of the rectangle or annular arc
in order to obtain
a one-dimensional edge profile. The sampling is done at subpixel
positions in the image ImageImageImageImageImageimage at integer row and column
distances (in the coordinate frame of the rectangle) from the center
of the rectangle. Since this involves some calculations which can
be used repeatedly in several measurements, the operator
gen_measure_rectangle2gen_measure_rectangle2GenMeasureRectangle2gen_measure_rectangle2GenMeasureRectangle2GenMeasureRectangle2 is used to perform these
calculations only once, thus increasing the speed of
fuzzy_measure_posfuzzy_measure_posFuzzyMeasurePosfuzzy_measure_posFuzzyMeasurePosFuzzyMeasurePos significantly. Since there is a trade-off
between accuracy and speed in the subpixel calculations of the gray
values, and thus in the accuracy of the extracted edge positions,
different interpolation schemes can be selected in
gen_measure_rectangle2gen_measure_rectangle2GenMeasureRectangle2gen_measure_rectangle2GenMeasureRectangle2GenMeasureRectangle2. (The interpolation only
influences rectangles not aligned with the image axes and annular arcs.)
The measure
object generated with gen_measure_rectangle2gen_measure_rectangle2GenMeasureRectangle2gen_measure_rectangle2GenMeasureRectangle2GenMeasureRectangle2 is passed
in MeasureHandleMeasureHandleMeasureHandleMeasureHandleMeasureHandlemeasureHandle.
After the one-dimensional edge profile has been calculated, subpixel
edge locations are computed by convolving the profile with the
derivatives of a Gaussian smoothing kernel of standard deviation
SigmaSigmaSigmaSigmaSigmasigma. Salient edges can be selected with the parameter
AmpThreshAmpThreshAmpThreshAmpThreshAmpThreshampThresh, which constitutes a threshold on the amplitude,
i.e., the absolute value of the first derivative of the edge.
Additionally, it is possible to select only positive edges, i.e.,
edges which constitute a dark-to-light transition in the direction
of the major axis of the rectangle (TransitionTransitionTransitionTransitionTransitiontransition =
'positive'"positive""positive""positive""positive""positive"), only negative edges, i.e., light-to-dark
transitions (TransitionTransitionTransitionTransitionTransitiontransition = 'negative'"negative""negative""negative""negative""negative"), or both
types of edges (TransitionTransitionTransitionTransitionTransitiontransition = 'all'"all""all""all""all""all"). Finally, it
is possible to select which edge points are returned.
Having extracted subpixel edge locations,
features of these edges are evaluated by a corresponding fuzzy
function, which can be set by set_fuzzy_measureset_fuzzy_measureSetFuzzyMeasureset_fuzzy_measureSetFuzzyMeasureSetFuzzyMeasure. Which edges
are selected can be determined with the parameter FuzzyThreshFuzzyThreshFuzzyThreshFuzzyThreshFuzzyThreshfuzzyThresh,
which constitutes a threshold on the weight over all fuzzy sets, i.e., the
geometric mean of the weights of the defined sets.
The selected edges are returned as single points, which lie on the
major axis of the rectangle or annular arc, in
(RowEdgeRowEdgeRowEdgeRowEdgeRowEdgerowEdge,ColumnEdgeColumnEdgeColumnEdgeColumnEdgeColumnEdgecolumnEdge). The corresponding edge
amplitudes are returned in AmplitudeAmplitudeAmplitudeAmplitudeAmplitudeamplitude, the fuzzy scores in
FuzzyScoreFuzzyScoreFuzzyScoreFuzzyScoreFuzzyScorefuzzyScore. In addition, the
distance between consecutive edge points is returned in
DistanceDistanceDistanceDistanceDistancedistance. Here, Distance[i] corresponds to the distance
between Edge[i] and Edge[i+1], i.e., the tuple DistanceDistanceDistanceDistanceDistancedistance
contains one element less than the tuples RowEdgeRowEdgeRowEdgeRowEdgeRowEdgerowEdge and
ColumnEdgeColumnEdgeColumnEdgeColumnEdgeColumnEdgecolumnEdge.
fuzzy_measure_posfuzzy_measure_posFuzzyMeasurePosfuzzy_measure_posFuzzyMeasurePosFuzzyMeasurePos only returns meaningful results if the
assumptions that the edges are straight and perpendicular to the
major axis of the rectangle are fulfilled. Thus, it should not be
used to extract edges from curved objects, for example.
Furthermore, the user should ensure that the rectangle is as close
to perpendicular as possible to the edges in the image. Additionally,
SigmaSigmaSigmaSigmaSigmasigma must not become larger than approx. 0.5 * Length1
(for Length1 see gen_measure_rectangle2gen_measure_rectangle2GenMeasureRectangle2gen_measure_rectangle2GenMeasureRectangle2GenMeasureRectangle2).
It should be kept in mind that fuzzy_measure_posfuzzy_measure_posFuzzyMeasurePosfuzzy_measure_posFuzzyMeasurePosFuzzyMeasurePos ignores the
domain of ImageImageImageImageImageimage for efficiency reasons. If certain regions
in the image should be excluded from the measurement a new measure
object with appropriately modified parameters should be generated.
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Sigma of Gaussian smoothing.
Default value: 1.0
Suggested values: 0.4, 0.6, 0.8, 1.0, 1.5, 2.0, 3.0, 4.0, 5.0, 7.0, 10.0
Typical range of values: 0.4
≤
Sigma
Sigma
Sigma
Sigma
Sigma
sigma
≤
100 (lin)
Minimum increment: 0.01
Recommended increment: 0.1
Restriction: Sigma >= 0.4
Minimum edge amplitude.
Default value: 30.0
Suggested values: 5.0, 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 90.0, 110.0
Typical range of values: 1
≤
AmpThresh
AmpThresh
AmpThresh
AmpThresh
AmpThresh
ampThresh
≤
255 (lin)
Minimum increment: 0.5
Recommended increment: 2
Minimum fuzzy value.
Default value: 0.5
Suggested values: 0.1, 0.3, 0.5, 0.6, 0.7, 0.9
Typical range of values: 0.0
≤
FuzzyThresh
FuzzyThresh
FuzzyThresh
FuzzyThresh
FuzzyThresh
fuzzyThresh
≤
1.0 (lin)
Recommended increment: 0.1
Select light/dark or dark/light edges.
Default value:
'all'
"all"
"all"
"all"
"all"
"all"
List of values: 'all'"all""all""all""all""all", 'negative'"negative""negative""negative""negative""negative", 'positive'"positive""positive""positive""positive""positive"
Row coordinate of the edge point.
Column coordinate of the edge point.
Edge amplitude of the edge (with sign).
Fuzzy evaluation of the edges.
Distance between consecutive edges.
If the parameter values are correct the operator
fuzzy_measure_posfuzzy_measure_posFuzzyMeasurePosfuzzy_measure_posFuzzyMeasurePosFuzzyMeasurePos returns the value 2 (H_MSG_TRUE). Otherwise an
exception is raised.
gen_measure_rectangle2gen_measure_rectangle2GenMeasureRectangle2gen_measure_rectangle2GenMeasureRectangle2GenMeasureRectangle2,
gen_measure_arcgen_measure_arcGenMeasureArcgen_measure_arcGenMeasureArcGenMeasureArc,
set_fuzzy_measureset_fuzzy_measureSetFuzzyMeasureset_fuzzy_measureSetFuzzyMeasureSetFuzzyMeasure
close_measureclose_measureCloseMeasureclose_measureCloseMeasureCloseMeasure
edges_sub_pixedges_sub_pixEdgesSubPixedges_sub_pixEdgesSubPixEdgesSubPix,
measure_posmeasure_posMeasurePosmeasure_posMeasurePosMeasurePos
fuzzy_measure_pairingfuzzy_measure_pairingFuzzyMeasurePairingfuzzy_measure_pairingFuzzyMeasurePairingFuzzyMeasurePairing,
fuzzy_measure_pairsfuzzy_measure_pairsFuzzyMeasurePairsfuzzy_measure_pairsFuzzyMeasurePairsFuzzyMeasurePairs,
measure_pairsmeasure_pairsMeasurePairsmeasure_pairsMeasurePairsMeasurePairs
1D Metrology