拟合圆的案例里包含填充和拟合的算子,
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)

声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!