Halcon学习之一维测量(2)

在Halcon学习之一维测量(1)文章中,我们介绍了直线测量中的基于边缘对的,还有一种是不基于边缘对的,而是基于边缘的。

接下来讲解就以,Halcon自带的例子,芯片pin引脚测量为例子,主要测量引脚的数量,引脚的平均宽度,还有引脚之间的距离:

 Halcon学习之一维测量(2)_第1张图片

源码:

* Pin Measurement: Example for the application of the measure package
* including a lot of visualization operators
* 
dev_close_window ()
read_image (Image, 'ic_pin')
get_image_size (Image, Width, Height)
dev_open_window (0, 0, Width / 2, Height / 2, 'black', WindowHandle)
set_display_font (WindowHandle, 14, 'mono', 'true', 'false')
dev_display (Image)
disp_continue_message (WindowHandle, 'black', 'true')
stop ()
* draw_rectangle2 (WindowHandle, Row, Column, Phi, Length1, Length2)
Row := 47
Column := 485
Phi := 0
Lengt

你可能感兴趣的:(Halcon,Halcon)