图像中污渍的边缘处理
By
admin
at 2018-03-22 • 0人收藏 • 1471人看过
read_image (Image101107918ca1dda0699400, 'C:/Users/RD-W/Desktop/10_11079_18ca1dda0699400.bmp') mean_image (Image101107918ca1dda0699400, ImageMean, 12, 12) auto_threshold (ImageMean, Regions, 2) select_shape (Regions, SelectedRegions, 'area', 'and', 39082.6, 49724.8) connection (SelectedRegions, ConnectedRegions) select_shape (ConnectedRegions, SelectedRegions1, 'area', 'and', 7451.43, 7519.6) boundary (SelectedRegions1, RegionBorder, 'inner_filled') dilation_circle (RegionBorder, RegionDilation, 3.5) boundary (RegionDilation, RegionBorder1, 'inner_filled')
思路:
获取到轮廓之后,膨胀轮廓线,然后取出轮廓线的外边缘
登录后方可回帖