这随便设置下参数都是可以分割的啊,怎么会没法分割呢?
- read_image (Image, 'C:/Users/Admin/Desktop/1.png')
- rgb1_to_gray (Image, GrayImage)
- binary_threshold (GrayImage, Region, 'max_separability', 'light', UsedThreshold)
- dilation_circle (Region, RegionDilation, 5.5)
- connection (RegionDilation, ConnectedRegions)
- select_shape (ConnectedRegions, SelectedRegions, ['width','height'], 'and', [40,40], [60,60])
- intersection (SelectedRegions, Region, RegionIntersection)
- opening_circle (RegionIntersection, RegionOpening, 1.5)
复制代码
|