第一次接触halcon,想使用halcon检测CNC工件的角度
如下图所示的工件
这是我在halcon软件中直接运行时得到的摄像头反馈的视频图像
这是我使用的代码
* Image Acquisition 01: Code generated by Image Acquisition 01
dev_update_window ('off')
dev_close_window()
open_framegrabber ('Video4Linux2', 640, 480, 0, 0, 0, 0, 'progressive', 8, 'gray', -1, 'false', 'auto', 'default', 0, -1, AcqHandle)
dev_open_window_fit_size (0, 0, 640, 480, 'black', WindowHandle)
grab_image_start (AcqHandle, -1)
while (true)
grab_image_async (Image, AcqHandle, -1)
dev_display (Image)
* Image Acquisition 01: Do something
endwhile
close_framegrabber (AcqHandle)