fuzzy_measure_pairingT_fuzzy_measure_pairingFuzzyMeasurePairingFuzzyMeasurePairingfuzzy_measure_pairing (算子)
名称
fuzzy_measure_pairingT_fuzzy_measure_pairingFuzzyMeasurePairingFuzzyMeasurePairingfuzzy_measure_pairing — 提取垂直于矩形或环形弧的直边对。
签名
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)
void FuzzyMeasurePairing(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)
void HMeasure::FuzzyMeasurePairing(const HImage& Image, double Sigma, double AmpThresh, double FuzzyThresh, const HString& Transition, const HString& Pairing, Hlong NumPairs, HTuple* RowEdgeFirst, HTuple* ColumnEdgeFirst, HTuple* AmplitudeFirst, HTuple* RowEdgeSecond, HTuple* ColumnEdgeSecond, HTuple* AmplitudeSecond, HTuple* RowPairCenter, HTuple* ColumnPairCenter, HTuple* FuzzyScore, HTuple* IntraDistance) const
void HMeasure::FuzzyMeasurePairing(const HImage& Image, double Sigma, double AmpThresh, double FuzzyThresh, const char* Transition, const char* Pairing, Hlong NumPairs, HTuple* RowEdgeFirst, HTuple* ColumnEdgeFirst, HTuple* AmplitudeFirst, HTuple* RowEdgeSecond, HTuple* ColumnEdgeSecond, HTuple* AmplitudeSecond, HTuple* RowPairCenter, HTuple* ColumnPairCenter, HTuple* FuzzyScore, HTuple* IntraDistance) const
void HMeasure::FuzzyMeasurePairing(const HImage& Image, double Sigma, double AmpThresh, double FuzzyThresh, const wchar_t* Transition, const wchar_t* Pairing, Hlong NumPairs, HTuple* RowEdgeFirst, HTuple* ColumnEdgeFirst, HTuple* AmplitudeFirst, HTuple* RowEdgeSecond, HTuple* ColumnEdgeSecond, HTuple* AmplitudeSecond, HTuple* RowPairCenter, HTuple* ColumnPairCenter, HTuple* FuzzyScore, HTuple* IntraDistance) const
(
Windows only)
void HImage::FuzzyMeasurePairing(const HMeasure& MeasureHandle, double Sigma, double AmpThresh, double FuzzyThresh, const HString& Transition, const HString& Pairing, Hlong NumPairs, HTuple* RowEdgeFirst, HTuple* ColumnEdgeFirst, HTuple* AmplitudeFirst, HTuple* RowEdgeSecond, HTuple* ColumnEdgeSecond, HTuple* AmplitudeSecond, HTuple* RowPairCenter, HTuple* ColumnPairCenter, HTuple* FuzzyScore, HTuple* IntraDistance) const
void HImage::FuzzyMeasurePairing(const HMeasure& MeasureHandle, double Sigma, double AmpThresh, double FuzzyThresh, const char* Transition, const char* Pairing, Hlong NumPairs, HTuple* RowEdgeFirst, HTuple* ColumnEdgeFirst, HTuple* AmplitudeFirst, HTuple* RowEdgeSecond, HTuple* ColumnEdgeSecond, HTuple* AmplitudeSecond, HTuple* RowPairCenter, HTuple* ColumnPairCenter, HTuple* FuzzyScore, HTuple* IntraDistance) const
void HImage::FuzzyMeasurePairing(const HMeasure& MeasureHandle, double Sigma, double AmpThresh, double FuzzyThresh, const wchar_t* Transition, const wchar_t* Pairing, Hlong NumPairs, HTuple* RowEdgeFirst, HTuple* ColumnEdgeFirst, HTuple* AmplitudeFirst, HTuple* RowEdgeSecond, HTuple* ColumnEdgeSecond, HTuple* AmplitudeSecond, HTuple* RowPairCenter, HTuple* ColumnPairCenter, HTuple* FuzzyScore, HTuple* IntraDistance) const
(
Windows only)
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)
def fuzzy_measure_pairing(image: HObject, measure_handle: HHandle, sigma: float, amp_thresh: float, fuzzy_thresh: float, transition: str, pairing: str, num_pairs: int) -> Tuple[Sequence[float], Sequence[float], Sequence[float], Sequence[float], Sequence[float], Sequence[float], Sequence[float], Sequence[float], Sequence[float], Sequence[float]]
描述
fuzzy_measure_pairingfuzzy_measure_pairingFuzzyMeasurePairingFuzzyMeasurePairingFuzzyMeasurePairingfuzzy_measure_pairing serves to extract straight edge
pairs that lie perpendicular to the major axis of a
rectangle or an annular arc.
For an explanation of the concept of 1D measuring see the introduction of
chapter 一维测量。
The extraction algorithm of fuzzy_measure_pairingfuzzy_measure_pairingFuzzyMeasurePairingFuzzyMeasurePairingFuzzyMeasurePairingfuzzy_measure_pairing
is identical to fuzzy_measure_pairsfuzzy_measure_pairsFuzzyMeasurePairsFuzzyMeasurePairsFuzzyMeasurePairsfuzzy_measure_pairs
(see there for details) with the exception, that it is also possible to
extract interleaving and included pairs using the parameter PairingPairingPairingPairingpairingpairing.
Currently only 'no_restriction'"no_restriction""no_restriction""no_restriction""no_restriction""no_restriction" is available, which returns
all possible edge pairs, allowing interleaving and inclusion of pairs.
Only the best scored NumPairsNumPairsNumPairsNumPairsnumPairsnum_pairs 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 AmplitudeFirstAmplitudeFirstAmplitudeFirstAmplitudeFirstamplitudeFirstamplitude_first and
AmplitudeSecondAmplitudeSecondAmplitudeSecondAmplitudeSecondamplitudeSecondamplitude_second, the fuzzy scores in FuzzyScoreFuzzyScoreFuzzyScoreFuzzyScorefuzzyScorefuzzy_score.
In addition, the distance between each edge pair is returned in
IntraDistanceIntraDistanceIntraDistanceIntraDistanceintraDistanceintra_distance, corresponding to the distance
between EdgeFirst[i] and EdgeSecond[i].
注意
fuzzy_measure_pairingfuzzy_measure_pairingFuzzyMeasurePairingFuzzyMeasurePairingFuzzyMeasurePairingfuzzy_measure_pairing 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, SigmaSigmaSigmaSigmasigmasigma must not become larger than
approx. 0.5 * Length1 (for Length1 see
gen_measure_rectangle2gen_measure_rectangle2GenMeasureRectangle2GenMeasureRectangle2GenMeasureRectangle2gen_measure_rectangle2).
It should be kept in mind that fuzzy_measure_pairingfuzzy_measure_pairingFuzzyMeasurePairingFuzzyMeasurePairingFuzzyMeasurePairingfuzzy_measure_pairing 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.
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 未采用并行化处理。
参数
ImageImageImageImageimageimage (输入对象) singlechannelimage → objectHImageHObjectHImageHobject (byte / uint2 / real)
输入图像。
MeasureHandleMeasureHandleMeasureHandleMeasureHandlemeasureHandlemeasure_handle (输入控制) measure → HMeasure, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Measure object handle.
SigmaSigmaSigmaSigmasigmasigma (输入控制) number → HTuplefloatHTupleHtuple (real) (double) (double) (double)
Sigma of Gaussian smoothing.
默认值:
1.0
建议值:
0.4, 0.6, 0.8, 1.0, 1.5, 2.0, 3.0, 4.0, 5.0, 7.0, 10.0
值范围:
0.4
≤
Sigma
Sigma
Sigma
Sigma
sigma
sigma
≤
100 (lin)
最小增量:
0.01
建议增量:
0.1
AmpThreshAmpThreshAmpThreshAmpThreshampThreshamp_thresh (输入控制) number → HTuplefloatHTupleHtuple (real) (double) (double) (double)
最小边缘振幅。
默认值:
30.0
建议值:
5.0, 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 90.0, 110.0
值范围:
1
≤
AmpThresh
AmpThresh
AmpThresh
AmpThresh
ampThresh
amp_thresh
≤
255 (lin)
最小增量:
0.5
建议增量:
2
FuzzyThreshFuzzyThreshFuzzyThreshFuzzyThreshfuzzyThreshfuzzy_thresh (输入控制) number → HTuplefloatHTupleHtuple (real) (double) (double) (double)
Minimum fuzzy value.
默认值:
0.5
建议值:
0.1, 0.3, 0.5, 0.7, 0.9
值范围:
0.0
≤
FuzzyThresh
FuzzyThresh
FuzzyThresh
FuzzyThresh
fuzzyThresh
fuzzy_thresh
≤
1.0 (lin)
建议增量:
0.1
TransitionTransitionTransitionTransitiontransitiontransition (输入控制) string → HTuplestrHTupleHtuple (string) (string) (HString) (char*)
Select the first gray value transition of the edge pairs.
默认值:
'all'
"all"
"all"
"all"
"all"
"all"
值列表:
'all'"all""all""all""all""all", 'negative'"negative""negative""negative""negative""negative", 'positive'"positive""positive""positive""positive""positive"
PairingPairingPairingPairingpairingpairing (输入控制) string → HTuplestrHTupleHtuple (string) (string) (HString) (char*)
Constraint of pairing.
默认值:
'no_restriction'
"no_restriction"
"no_restriction"
"no_restriction"
"no_restriction"
"no_restriction"
值列表:
'no_restriction'"no_restriction""no_restriction""no_restriction""no_restriction""no_restriction"
NumPairsNumPairsNumPairsNumPairsnumPairsnum_pairs (输入控制) number → HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Number of edge pairs.
默认值:
10
建议值:
0, 1, 10, 20, 50
值范围:
0
≤
NumPairs
NumPairs
NumPairs
NumPairs
numPairs
num_pairs
建议增量:
1
RowEdgeFirstRowEdgeFirstRowEdgeFirstRowEdgeFirstrowEdgeFirstrow_edge_first (输出控制) point.y-array → HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
Row coordinate of the first edge.
ColumnEdgeFirstColumnEdgeFirstColumnEdgeFirstColumnEdgeFirstcolumnEdgeFirstcolumn_edge_first (输出控制) point.x-array → HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
Column coordinate of the first edge.
AmplitudeFirstAmplitudeFirstAmplitudeFirstAmplitudeFirstamplitudeFirstamplitude_first (输出控制) real-array → HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
Edge amplitude of the first edge (with sign).
RowEdgeSecondRowEdgeSecondRowEdgeSecondRowEdgeSecondrowEdgeSecondrow_edge_second (输出控制) point.y-array → HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
Row coordinate of the second edge.
ColumnEdgeSecondColumnEdgeSecondColumnEdgeSecondColumnEdgeSecondcolumnEdgeSecondcolumn_edge_second (输出控制) point.x-array → HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
Column coordinate of the second edge.
AmplitudeSecondAmplitudeSecondAmplitudeSecondAmplitudeSecondamplitudeSecondamplitude_second (输出控制) real-array → HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
Edge amplitude of the second edge (with sign).
RowPairCenterRowPairCenterRowPairCenterRowPairCenterrowPairCenterrow_pair_center (输出控制) point.y-array → HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
Row coordinate of the center of the edge pair.
ColumnPairCenterColumnPairCenterColumnPairCenterColumnPairCentercolumnPairCentercolumn_pair_center (输出控制) point.x-array → HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
Column coordinate of the center of the edge pair.
FuzzyScoreFuzzyScoreFuzzyScoreFuzzyScorefuzzyScorefuzzy_score (输出控制) real-array → HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
Fuzzy evaluation of the edge pair.
IntraDistanceIntraDistanceIntraDistanceIntraDistanceintraDistanceintra_distance (输出控制) real-array → HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
Distance between the edges of the edge pair.
结果
如果参数值正确,算子 fuzzy_measure_pairingfuzzy_measure_pairingFuzzyMeasurePairingFuzzyMeasurePairingFuzzyMeasurePairingfuzzy_measure_pairing 返回值 2 ( H_MSG_TRUE )。否则将抛出异常。
可能的前趋
gen_measure_rectangle2gen_measure_rectangle2GenMeasureRectangle2GenMeasureRectangle2GenMeasureRectangle2gen_measure_rectangle2,
gen_measure_arcgen_measure_arcGenMeasureArcGenMeasureArcGenMeasureArcgen_measure_arc,
set_fuzzy_measureset_fuzzy_measureSetFuzzyMeasureSetFuzzyMeasureSetFuzzyMeasureset_fuzzy_measure
可能的后继
close_measureclose_measureCloseMeasureCloseMeasureCloseMeasureclose_measure
替代
edges_sub_pixedges_sub_pixEdgesSubPixEdgesSubPixEdgesSubPixedges_sub_pix,
fuzzy_measure_pairsfuzzy_measure_pairsFuzzyMeasurePairsFuzzyMeasurePairsFuzzyMeasurePairsfuzzy_measure_pairs,
measure_pairsmeasure_pairsMeasurePairsMeasurePairsMeasurePairsmeasure_pairs
另见
fuzzy_measure_posfuzzy_measure_posFuzzyMeasurePosFuzzyMeasurePosFuzzyMeasurePosfuzzy_measure_pos,
measure_posmeasure_posMeasurePosMeasurePosMeasurePosmeasure_pos
模块
一维计量