开启左侧

新人求教这个粘连部分如何去除

[复制链接]
BadSmile 发表于 2021-4-20 16:18:19 | 显示全部楼层 |阅读模式
求教这个粘连的部分怎么去除?

1.jpg
20.png
gai123 发表于 2021-5-28 08:21:17 | 显示全部楼层
开运算?
可汗 发表于 2021-6-1 14:46:16 | 显示全部楼层
开运算去毛刺
dev_close_window ()
dev_open_window (0, 0, 512, 512, 'black', WindowHandle)
read_image (Image161804kknxyq7pb04kbp06, 'C:/Users/LC/Desktop/161804kknxyq7pb04kbp06.jpg')
rgb1_to_gray (Image161804kknxyq7pb04kbp06, GrayImage)
mean_image (GrayImage, ImageMean, 11, 11)
dyn_threshold (GrayImage, ImageMean, RegionDynThresh, 5, 'dark')
connection (RegionDynThresh, ConnectedRegions)
fill_up_shape (ConnectedRegions, RegionFillUp, 'area', 80, 400)
dilation_circle (RegionFillUp, RegionDilation, 1.5)
select_shape (RegionDilation, SelectedRegions, 'circularity', 'and', 0.8, 1)
select_shape (SelectedRegions, SelectedRegions1, 'area', 'and', 150, 600)

difference (ConnectedRegions, SelectedRegions1, RegionDifference)

opening_circle (RegionDifference, RegionOpening, 1.5)
connection (RegionOpening, ConnectedRegions1)

select_shape (ConnectedRegions1, SelectedRegions2, 'area', 'and', 90, 120)
concat_obj (SelectedRegions1, SelectedRegions2, ObjectsConcat)
dev_display (GrayImage)[img]
dev_display (ObjectsConcat)
1.bmp
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表