measure_pairs(Image : : MeasureHandle,Sigma,Threshold,Transition,Select :RowEdgeFirst,ColumnEdgeFirst,AmplitudeFirst,RowEdgeSecond,ColumnEdgeSecond,AmplitudeSecond,IntraDistance,InterDistance)
1、measure_pairs用于提取垂直于測量矩形或環形弧的長軸的直邊對。
2、邊緣分組成對:如果Transition =“positive”,則傳回的點(RowEdgeFirst,ColumnEdgeFirst)為矩形長軸方向上由黑到亮的邊緣點,點(RowEdgeSecond,ColumnEdgeSecond)為由亮至暗的邊緣點。如果Transition =“negative”,則相反。
3、如果Transition ='all',則第一個檢測到的邊緣定義RowEdgeFirst和ColumnEdgeFirst的轉換。這适合于測量具有相對于背景的不同亮度的物體。
4、如果找到具有相同轉換的多于一個的連續邊緣,則将第一個邊緣用作對元素。這種行為可能會導緻在門檻值不能被選擇得足夠高以抑制相同轉換的連續邊緣的應用中出現問題。對于這些應用,存在第二種配對模式,即僅選擇一個具有連續上升沿和下降沿的序列上的相應最強邊緣。通過将“_strongest”附加到任何以上轉換模式,例如“negative_strongest”可以選擇此模式。
5、可以選擇哪些邊對被傳回。如果選擇設定為“All”,則傳回所有邊對。如果設定為“first”,則隻有第一個提取的邊對被傳回,如果設定為“last”,隻傳回最後一個。
6、提取的邊緣作為位于矩形長軸上的單個點傳回。相應的邊沿幅度的值為AmplitudeFirst和AmplitudeSecond。此外,每個邊對之間的距離以IntraDanceance傳回,并且InterDistance之間傳回連續邊源對之間的距離。這裡,IntraDistance [i]對應于EdgeFirst [i]和EdgeSecond [i]之間的距離,而InterDistance [i]對應于EdgeSecond [i]和EdgeFirst [i + 1]之間的距離。
7、隻有邊緣是直線并且邊緣垂直于長軸的假設被滿足了,measure_pairs傳回的結果才有意義。此外,Sigma不能大于約 0.5*Length1。
參數:
1、Image (input_object) singlechannelimage → object (byte / uint2 / real)
輸入圖像
2、MeasureHandle (input_control) measure_id → (integer)
測量對象句柄
3、Sigma (input_control) number → (real)
高斯平滑的Sigma。
預設值: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≤100(lin)
最小增量:0.01
推薦增量:0.1
限制:Sigma> = 0.4
4、Threshold (input_control) number → (real)
翻譯 最小邊緣幅度。
預設值:30.0
建議值:5.0,10.0,20.0,30.0,40.0,50.0,60.0,70.0,90.0,110.0
典型值範圍:1≤門檻值≤255(lin)
最小增量:0.5
推薦增量:2 5、Transition (input_control) string → (string) 确定邊緣如何分組到邊緣對的灰階值轉換類型。
預設值:'all'
值清單:'all','positive','negative','all_strongest','positive_strongest','negative_strongest' 6、Select (input_control) string → (string) 選擇邊緣對。
預設值:'all'
值清單:'all','first','last'
7、RowEdgeFirst (output_control) point.y-array → (real)
第一個邊緣中心的行坐标。
8、ColumnEdgeFirst (output_control) point.x-array → (real)
第一個邊緣中心的列坐标。
9、AmplitudeFirst (output_control) real-array → (real)
第一邊緣的邊緣幅度(帶符号)。
10、RowEdgeSecond (output_control) point.y-array → (real)
第二邊緣中心的行坐标。
11、ColumnEdgeSecond (output_control) point.x-array → (real)
第二邊緣中心的列坐标。
12、AmplitudeSecond (output_control) real-array → (real)
第二邊緣的邊緣幅度(帶符号)。
13、IntraDistance (output_control) real-array → (real)
邊緣對内邊緣之間的距離。
14、InterDistance (output_control) real-array → (real) 連續邊緣對之間的距離。
例子(HDevelop):
measure_pairs (SearchImage, MeasureHandle1, 2, 25, 'negative', 'all', RowEdge11, ColEdge11, Amp11, RowEdge21, ColEdge21, Amp21, Width1, Distance1)
1、輸入圖像:SearchImage
2、測量對象句柄MeasureHandel。
3、高斯平滑Sigma:2
4、最小邊緣幅度為25
5、先傳回由亮到黑,再傳回由黑到亮
6、傳回所有的邊緣對