**
halcon例程_方法_边缘定位
例子:rim.hdev
* Inspection of rim & tire
* The circular holes are extracted as well as the region containing
* the imprinted characters.
*
* Set the display parameters and read the image
dev_update_off ()
dev_close_window ()
dev_open_window (0, 0, 768, 576, 'black', WindowID)
*设置显示字体,字号16,字体mono,加粗,不倾斜
set_display_font (WindowID, 16, 'mono', 'true', 'false')
read_image (Rim, 'rim')
dev_display (Rim)
*显示继续消息,等待用户按F5继续执行
disp_continue_message (WindowID, 'black', 'true')
stop ()
* To find the holes, we first segment the dark regions
*在找洞之前我们先切割出黑色区域
*二值化
threshold (Rim, Dark, 0, 128)
dev_display (Rim)
*黑色区域用绿色填充
dev_set_color ('green')
dev_set_draw ('fill')
dev_display (Dark)
*显示继续消息,等待用户按F5继续执行
disp_continue_message (WindowID, 'black', 'true')
stop ()
* Determine all conn