基本思路:
- sobel取前景(边缘)
- 阈值分割边缘
- 去背景连通区域
- 填孔
* Determine the connected components of the background of given regions
*
read_image (Image, 'fabrik')
* Detect edges
sobel_amp (Image, EdgeAmplitude, 'thin_sum_abs', 3)
threshold (EdgeAmplitude, Edges, 5, 255)
background_seg (Edges, BackgroundRegions)
* Fill up holes in regions based on shape feature 'area'
fill_up_shape (BackgroundRegions, RegionFillUp, 'area', 1, 40)
dev_clear_window ()
dev_set_colored (6)
dev_display (RegionFillUp)