工控编程吧
标题:
halcon get_contour_xld函数介绍
[打印本页]
作者:
qq263946146
时间:
2019-5-17 18:27
标题:
halcon get_contour_xld函数介绍
get_contour_xld(Contour : : : Row, Col)
函数获取XLD轮廓Contour的坐标点Row, Col。
例程
read_image (Image, 'printer_chip/printer_chip_01')
threshold (Image, Region, 140, 255)
connection (Region, ConnectedRegions)
select_shape_std (ConnectedRegions, SelectedRegions, 'max_area', 70)
gen_contour_region_xld (SelectedRegions, Contours, 'border')
get_contour_xld (Contours, Row, Col)
*
dev_set_color ('red')
dev_close_window ()
get_image_size (Image, Width, Height)
dev_open_window (0, 0, Width, Height, 'black', WindowHandle)
num:=|Row|
for i:=0 to num-1 by 1
disp_cross (WindowHandle, Row
, Col
, 2, 0)
wait_seconds (0.01)
endfor
执行例程,可以在图形窗口看到区域绘制效果。
[halcon]1[/halcon]
欢迎光临 工控编程吧 (https://www.gkbc8.com/)
Powered by Discuz! X3.4