http://blog.youkuaiyun.com/xinrui_ hhuc/article/details/6120785
1、add_channels ( Regions,
將Image圖像的灰度值賦給區域Regions,得到Gray
2、change_domain ( Image,
改變Image圖像的定義域
3、full_domain ( Image :
擴張Image圖像的定義域到最大。
4、get_domain ( Image : Domain
得到Image圖像的定義域
5、rectangle1_domain ( Image :
Column2 : )
根據矩形坐標(Row1, Column1)、(Row2,
6、reduce_domain ( Image,
得到圖像Image相對於Region區域的圖像
例程:
- read_image (Image, 'G:/Halcon/
機器視覺/images/brycecanyon1.png') - * 打開一個新的窗體
- dev_open_window (0, 0, -1, -1,
'black', WindowHandle) - * 顯示圖像
- dev_display (Image)
- * 選出兩個新的Region
- draw_region (region1,
WindowHandle) - draw_region (region2,
WindowHandle) - add_channels (region1, Image,
image_region1) - change_domain (Image, region2,
ImageNew) - full_domain (image_region1,
ImageFull) - rectangle1_domain (ImageFull,
ImageReduced, 100, 100, 300, 500) - get_domain (image_region1,
Domain) - reduce_domain (Image, region2,
ReducedImage)
處理效果如下圖所示: