工控编程吧
标题:
halcon gen_region_line函数介绍
[打印本页]
作者:
qq263946146
时间:
2019-5-12 00:31
标题:
halcon gen_region_line函数介绍
gen_region_line( : RegionLines : BeginRow, BeginCol, EndRow, EndCol : )
gen_region_line将给定的直线
(起始点[BeginRow,BeginCol]和结束点[EndRow, EndCol])存储为区域。
例程:
read_image (Image, 'mreut')
dev_close_window ()
get_image_size (Image, Width, Height)
dev_open_window (0, 0, Width, Height, 'black', WindowID)
dev_display (Image)
Row := 320
Col := 270
dev_update_off ()
for phi := 0 to 359 by 1
* Create lines as regions
gen_region_line (Line, Row, Col, Row + 100 * sin(rad(phi)), Col + 100 * cos(rad(phi)))
intensity (Line, Image, Mean, Deviation)
set_gray (WindowID, round(255 - Mean))
* Display created regions
dev_display (Line)
endfor
[halcon]1[/halcon]
欢迎光临 工控编程吧 (https://www.gkbc8.com/)
Powered by Discuz! X3.4