http://blog.youkuaiyun.com/xinrui_ hhuc/article/details/6120736
1、copy_image ( Image :
復制image圖像
2、region_to_bin ( Region :
將區域Region轉換為一幅二進制圖像BinImage。
ForegroundGray, BackgroundGray
Width, Height為Region的寬度和高度。
3、region_to_label ( Region :
將區域Region轉換為一幅Lable圖像ImageLabe
Type為imagelabel的類型。
Width, Height為Region的寬度和高度。
4、region_to_mean ( Regions,
繪制ImageMean圖像,將其灰度值設置為Regions和
相關例子:
- * 讀取圖像
- read_image (Image, 'G:/Halcon/
機器視覺/images/bin_switch/bin_ switch_2.png') - * 復制圖像
- copy_image (Image, DupImage)
- * 區域生長算法
- regiongrowing (Image, Regions,
3, 3, 1, 100) - * 生成ImageMean
- region_to_mean (Regions,
Image, ImageMean) - * 將Region轉換為二進制圖像
- region_to_bin (Regions,
BinImage, 255, 0, 512, 512) - * 將Region轉換為Label圖像
- region_to_label (Regions,
ImageLabel, 'int4', 512, 512)
實驗結果: