Halcon shape_trans

Halcon shape_trans_第1张图片

 read_image (Image, 'C:/Users/Administrator/Desktop/凸性.png')
rgb1_to_gray (Image, GrayImage)
binary_threshold (GrayImage, Region, 'max_separability', 'dark', UsedThreshold)#背景只有黑白的快速二值化代码

shape_trans (Region, RegionTrans, 'convex')

Halcon shape_trans_第2张图片

shape_trans (Region, RegionTrans, 'rectangle1')#平行于坐标轴的最小外接矩形

Halcon shape_trans_第3张图片

shape_trans (Region, RegionTrans, 'rectangle2')#有角度的最小外接矩形

Halcon shape_trans_第4张图片

你可能感兴趣的:(CV,计算机视觉,c语言,人工智能)