本帖最后由 工lindy 于 2021-11-26 13:42 编辑
拟合圆的案例里包含填充和拟合的算子:
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)
复制代码
链接:https://pan.baidu.com/s/1N1lXBz4WhXM-pLf0FtHBVw
提取码:d169
|