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
默認值:'all'
值列表:'all','positive','negative','all_strongest','positive_strongest','negative_strongest'
默認值:'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、返回所有的邊緣對