HALCON Reference Manual 10.0.2
Name
fuzzy_measure_pairingT_fuzzy_measure_pairingfuzzy_measure_pairingFuzzyMeasurePairingFuzzyMeasurePairing — Extract straight edge pairs perpendicular to a rectangle or an
annular arc.
fuzzy_measure_pairing(Image : : MeasureHandle, Sigma, AmpThresh, FuzzyThresh, Transition, Pairing, NumPairs : RowEdgeFirst, ColumnEdgeFirst, AmplitudeFirst, RowEdgeSecond, ColumnEdgeSecond, AmplitudeSecond, RowPairCenter, ColumnPairCenter, FuzzyScore, IntraDistance)
Herror T_fuzzy_measure_pairing(const Hobject Image, const Htuple MeasureHandle, const Htuple Sigma, const Htuple AmpThresh, const Htuple FuzzyThresh, const Htuple Transition, const Htuple Pairing, const Htuple NumPairs, Htuple* RowEdgeFirst, Htuple* ColumnEdgeFirst, Htuple* AmplitudeFirst, Htuple* RowEdgeSecond, Htuple* ColumnEdgeSecond, Htuple* AmplitudeSecond, Htuple* RowPairCenter, Htuple* ColumnPairCenter, Htuple* FuzzyScore, Htuple* IntraDistance)
Herror fuzzy_measure_pairing(Hobject Image, const HTuple& MeasureHandle, const HTuple& Sigma, const HTuple& AmpThresh, const HTuple& FuzzyThresh, const HTuple& Transition, const HTuple& Pairing, const HTuple& NumPairs, HTuple* RowEdgeFirst, HTuple* ColumnEdgeFirst, HTuple* AmplitudeFirst, HTuple* RowEdgeSecond, HTuple* ColumnEdgeSecond, HTuple* AmplitudeSecond, HTuple* RowPairCenter, HTuple* ColumnPairCenter, HTuple* FuzzyScore, HTuple* IntraDistance)
HTuple HImage::FuzzyMeasurePairing(const HMeasure& MeasureHandle, const HTuple& Sigma, const HTuple& AmpThresh, const HTuple& FuzzyThresh, const HTuple& Transition, const HTuple& Pairing, const HTuple& NumPairs, HTuple* ColumnEdgeFirst, HTuple* AmplitudeFirst, HTuple* RowEdgeSecond, HTuple* ColumnEdgeSecond, HTuple* AmplitudeSecond, HTuple* RowPairCenter, HTuple* ColumnPairCenter, HTuple* FuzzyScore, HTuple* IntraDistance) const
HTuple HMeasure::FuzzyMeasurePairing(const HImage& Image, const HTuple& Sigma, const HTuple& AmpThresh, const HTuple& FuzzyThresh, const HTuple& Transition, const HTuple& Pairing, const HTuple& NumPairs, HTuple* ColumnEdgeFirst, HTuple* AmplitudeFirst, HTuple* RowEdgeSecond, HTuple* ColumnEdgeSecond, HTuple* AmplitudeSecond, HTuple* RowPairCenter, HTuple* ColumnPairCenter, HTuple* FuzzyScore, HTuple* IntraDistance) const
void HOperatorSetX.FuzzyMeasurePairing(
[in] IHUntypedObjectX* Image, [in] VARIANT MeasureHandle, [in] VARIANT Sigma, [in] VARIANT AmpThresh, [in] VARIANT FuzzyThresh, [in] VARIANT Transition, [in] VARIANT Pairing, [in] VARIANT NumPairs, [out] VARIANT* RowEdgeFirst, [out] VARIANT* ColumnEdgeFirst, [out] VARIANT* AmplitudeFirst, [out] VARIANT* RowEdgeSecond, [out] VARIANT* ColumnEdgeSecond, [out] VARIANT* AmplitudeSecond, [out] VARIANT* RowPairCenter, [out] VARIANT* ColumnPairCenter, [out] VARIANT* FuzzyScore, [out] VARIANT* IntraDistance)
VARIANT HMeasureX.FuzzyMeasurePairing(
[in] IHImageX* Image, [in] double Sigma, [in] double AmpThresh, [in] double FuzzyThresh, [in] BSTR Transition, [in] BSTR Pairing, [in] Hlong NumPairs, [out] VARIANT* ColumnEdgeFirst, [out] VARIANT* AmplitudeFirst, [out] VARIANT* RowEdgeSecond, [out] VARIANT* ColumnEdgeSecond, [out] VARIANT* AmplitudeSecond, [out] VARIANT* RowPairCenter, [out] VARIANT* ColumnPairCenter, [out] VARIANT* FuzzyScore, [out] VARIANT* IntraDistance)
VARIANT HImageX.FuzzyMeasurePairing(
[in] IHMeasureX* MeasureHandle, [in] double Sigma, [in] double AmpThresh, [in] double FuzzyThresh, [in] BSTR Transition, [in] BSTR Pairing, [in] Hlong NumPairs, [out] VARIANT* ColumnEdgeFirst, [out] VARIANT* AmplitudeFirst, [out] VARIANT* RowEdgeSecond, [out] VARIANT* ColumnEdgeSecond, [out] VARIANT* AmplitudeSecond, [out] VARIANT* RowPairCenter, [out] VARIANT* ColumnPairCenter, [out] VARIANT* FuzzyScore, [out] VARIANT* IntraDistance)
static void HOperatorSet.FuzzyMeasurePairing(HObject image, HTuple measureHandle, HTuple sigma, HTuple ampThresh, HTuple fuzzyThresh, HTuple transition, HTuple pairing, HTuple numPairs, out HTuple rowEdgeFirst, out HTuple columnEdgeFirst, out HTuple amplitudeFirst, out HTuple rowEdgeSecond, out HTuple columnEdgeSecond, out HTuple amplitudeSecond, out HTuple rowPairCenter, out HTuple columnPairCenter, out HTuple fuzzyScore, out HTuple intraDistance)
void HMeasure.FuzzyMeasurePairing(HImage image, double sigma, double ampThresh, double fuzzyThresh, string transition, string pairing, int numPairs, out HTuple rowEdgeFirst, out HTuple columnEdgeFirst, out HTuple amplitudeFirst, out HTuple rowEdgeSecond, out HTuple columnEdgeSecond, out HTuple amplitudeSecond, out HTuple rowPairCenter, out HTuple columnPairCenter, out HTuple fuzzyScore, out HTuple intraDistance)
void HImage.FuzzyMeasurePairing(HMeasure measureHandle, double sigma, double ampThresh, double fuzzyThresh, string transition, string pairing, int numPairs, out HTuple rowEdgeFirst, out HTuple columnEdgeFirst, out HTuple amplitudeFirst, out HTuple rowEdgeSecond, out HTuple columnEdgeSecond, out HTuple amplitudeSecond, out HTuple rowPairCenter, out HTuple columnPairCenter, out HTuple fuzzyScore, out HTuple intraDistance)
fuzzy_measure_pairingfuzzy_measure_pairingfuzzy_measure_pairingFuzzyMeasurePairingFuzzyMeasurePairing serves to extract straight edge
pairs that lie perpendicular to the major axis of a
rectangle or an annular arc. In addition to measure_posmeasure_posmeasure_posMeasurePosMeasurePos it uses
fuzzy member functions to evaluate and select the edge pairs.
The extraction algorithm is identical to fuzzy_measure_posfuzzy_measure_posfuzzy_measure_posFuzzyMeasurePosFuzzyMeasurePos.
In addition, the edges are grouped to pairs: If TransitionTransitionTransitionTransitiontransition =
'positive'"positive""positive""positive""positive", the edge points with a dark-to-light transition
in the direction of the major axis of the rectangle or the annular arc
are returned in
RowEdgeFirstRowEdgeFirstRowEdgeFirstRowEdgeFirstrowEdgeFirst and ColumnEdgeFirstColumnEdgeFirstColumnEdgeFirstColumnEdgeFirstcolumnEdgeFirst. In this case,
the corresponding edges with a light-to-dark transition are returned
in RowEdgeSecondRowEdgeSecondRowEdgeSecondRowEdgeSecondrowEdgeSecond and ColumnEdgeSecondColumnEdgeSecondColumnEdgeSecondColumnEdgeSecondcolumnEdgeSecond. If
TransitionTransitionTransitionTransitiontransition = 'negative'"negative""negative""negative""negative", the behavior is exactly
opposite. If TransitionTransitionTransitionTransitiontransition = 'all'"all""all""all""all", the first
detected edge defines the transition for RowEdgeFirstRowEdgeFirstRowEdgeFirstRowEdgeFirstrowEdgeFirst and
ColumnEdgeFirstColumnEdgeFirstColumnEdgeFirstColumnEdgeFirstcolumnEdgeFirst.
Having extracted subpixel edge locations, the edges are paired. The
features of a possible edge pair are evaluated by a fuzzy function,
set by set_fuzzy_measureset_fuzzy_measureset_fuzzy_measureSetFuzzyMeasureSetFuzzyMeasure. Which edge pairs are selected can be
determined with the parameter FuzzyThreshFuzzyThreshFuzzyThreshFuzzyThreshfuzzyThresh,
which constitutes a threshold on the weight over all fuzzy sets,
i.e., the geometric mean of the weights of the defined fuzzy membership
functions. As an extension to fuzzy_measure_pairsfuzzy_measure_pairsfuzzy_measure_pairsFuzzyMeasurePairsFuzzyMeasurePairs, the pairing
algorithm can be restricted by PairingPairingPairingPairingpairing. Currently only
'no_restriction'"no_restriction""no_restriction""no_restriction""no_restriction" is available, which returns all possible
edge pairs, allowing interleaving and inclusion of pairs. Finally,
the best scored NumPairsNumPairsNumPairsNumPairsnumPairs edge pairs are returned, whereas 0
indicates to return all possible found edge combinations.
The selected edges are returned as single points, which lie on the
major axis of the rectangle or annular arc. The corresponding edge
amplitudes are returned in AmplitudeFirstAmplitudeFirstAmplitudeFirstAmplitudeFirstamplitudeFirst and
AmplitudeSecondAmplitudeSecondAmplitudeSecondAmplitudeSecondamplitudeSecond, the fuzzy scores in FuzzyScoreFuzzyScoreFuzzyScoreFuzzyScorefuzzyScore.
In addition, the distance between each edge pair is returned in
IntraDistanceIntraDistanceIntraDistanceIntraDistanceintraDistance, corresponding to the distance
between EdgeFirst[i] and EdgeSecond[i].
fuzzy_measure_pairingfuzzy_measure_pairingfuzzy_measure_pairingFuzzyMeasurePairingFuzzyMeasurePairing only returns meaningful results if the
assumptions that the edges are straight and perpendicular to the
major axis of the rectangle or annular arc are fulfilled. Thus, it
should not be used to extract edges from curved objects, for
example. Furthermore, the user should ensure that the rectangle or
annular arc is as close to perpendicular as possible to the edges in
the image. Additionally, SigmaSigmaSigmaSigmasigma must not become larger than
approx. 0.5 * Length1 (for Length1 see
gen_measure_rectangle2gen_measure_rectangle2gen_measure_rectangle2GenMeasureRectangle2GenMeasureRectangle2).
It should be kept in mind that fuzzy_measure_pairingfuzzy_measure_pairingfuzzy_measure_pairingFuzzyMeasurePairingFuzzyMeasurePairing ignores
the domain of ImageImageImageImageimage 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
≤
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
≤
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.7, 0.9
Typical range of values: 0.0
≤
FuzzyThresh
FuzzyThresh
FuzzyThresh
FuzzyThresh
fuzzyThresh
≤
1.0 (lin)
Recommended increment: 0.1
Select the first gray value transition of the edge pairs.
Default value:
'all'
"all"
"all"
"all"
"all"
List of values: 'all'"all""all""all""all", 'positive'"positive""positive""positive""positive", 'negative'"negative""negative""negative""negative"
Constraint of pairing.
Default value:
'no_restriction'
"no_restriction"
"no_restriction"
"no_restriction"
"no_restriction"
List of values: 'no_restriction'"no_restriction""no_restriction""no_restriction""no_restriction"
Number of edge pairs.
Default value: 10
Suggested values: 0, 1, 10, 20, 50
Typical range of values: 0
≤
NumPairs
NumPairs
NumPairs
NumPairs
numPairs
Recommended increment: 1
Row coordinate of the first edge.
Column coordinate of the first edge.
Edge amplitude of the first edge (with sign).
Row coordinate of the second edge.
Column coordinate of the second edge.
Edge amplitude of the second edge (with sign).
Row coordinate of the center of the edge pair.
Column coordinate of the center of the edge pair.
Fuzzy evaluation of the edge pair.
Distance between the edges of the edge pair.
If the parameter values are correct the operator
fuzzy_measure_pairingfuzzy_measure_pairingfuzzy_measure_pairingFuzzyMeasurePairingFuzzyMeasurePairing returns the value 2 (H_MSG_TRUE). Otherwise an
exception is raised.
gen_measure_rectangle2gen_measure_rectangle2gen_measure_rectangle2GenMeasureRectangle2GenMeasureRectangle2,
gen_measure_arcgen_measure_arcgen_measure_arcGenMeasureArcGenMeasureArc,
set_fuzzy_measureset_fuzzy_measureset_fuzzy_measureSetFuzzyMeasureSetFuzzyMeasure
close_measureclose_measureclose_measureCloseMeasureCloseMeasure
edges_sub_pixedges_sub_pixedges_sub_pixEdgesSubPixEdgesSubPix,
fuzzy_measure_pairsfuzzy_measure_pairsfuzzy_measure_pairsFuzzyMeasurePairsFuzzyMeasurePairs,
measure_pairsmeasure_pairsmeasure_pairsMeasurePairsMeasurePairs
fuzzy_measure_posfuzzy_measure_posfuzzy_measure_posFuzzyMeasurePosFuzzyMeasurePos,
measure_posmeasure_posmeasure_posMeasurePosMeasurePos
1D Metrology
| HALCON Reference Manual 10.0.2 |
Copyright © 1996-2011 MVTec Software GmbH |