拟合圆 填充 Halcon同类软件 Malcon 机器视觉软件 FillUp FitCircleContourXld
拟合圆的案例里包含填充和拟合的算子,
1、读取图片ReadImage
2、彩色转灰度Rgb1ToGray
3、阈值分割Threshold
4、连通区域Connection
5、挑选区域:以面积SelectShape
6、填充FillUp
7、生成区域的边缘信息GenContourRegionXld
8、拟合圆FitCircleContourXld
ReadImage(srcImage,'circle.bmp')
Rgb1ToGray(srcImage,newImage)
Threshold(newImage,hoRegion,150,255)
Connection(hoRegion,hoNewRegion)
SelectShape(hoNewRegion,hoSelect,'area','and',56000,999999)
FillUp(hoSelect,FillUpRegion)
GenContourRegionXld(FillUpRegion,Contours,'')
FitCircleContourXld(Contours,'','','','','','',Row,Column,Radius,SP,SE,PO)