1D测量gen_measure_rectangle2
(1)gen_rectangle2:绘制矩形ROI
(2)gen_measure_rectangle2:创建边缘测量工具
(3)measure_pairs;measure_pos : 启动测量
* Pin Measurement: Example for the application of the HALCON Measure Tool
* (in this program: pure processing code without visualization)
*
read_image (Image, 'ic_pin')
get_image_size (Image, Width, Height)
Row := 47
Column := 485
Phi := 0
Length1 := 420
Length2 := 10
gen_rectangle2 (Rectangle, Row, Column, Phi, Length1, Length2)
* Width, Height 是图像image的
gen_measure_rectangle2 (Row, Column, Phi, Length1, Length2, Width, Height, 'nearest_neighbor', MeasureHandle)
* Extract straight edge pairs perpendicular to a rectangle
measure_pairs (Image, MeasureHandle, 1.5, 30, 'negative', 'all', RowEdgeFirst, ColumnEdgeFirst, AmplitudeFirst, RowEdgeSecond, ColumnEdgeSecond, AmplitudeSecond, PinWidth, PinDistance)
avgPinWid