fill_up_shape算子
* Fill up holes in regions having given shape features * read_image (Caltab, 'caltab') threshold (Caltab, Region, 120, 255) *有条件的fill_up,这里是根据椭圆参数在1-1.6之间进行填充 *因此那些接近圆的孔都会进行填充 fill_up_shape (Region, RegionFillUp, 'anisometry', 1, 1.6) *填充后的区域-原区域 = 那些填充的孔 difference (RegionFillUp, Region, Holes) *把填充后的区域连接成区域数组 connection (RegionFillUp, ConnectedRegions) * Select particular regions *根据面积和区域的凸性进行搜索,得到标定板的区域 select_shape (ConnectedRegions, SelectedRegions1, 'area', 'and', 10000, 1000000) select_shape (SelectedRegions1, SelectedRegions2, 'convexity', 'and', 0.9, 1)
=======================================================
fill_up_shape(Region : RegionFillUp : Feature, Min, Max : )
填充输入区域中具有给定形状特征的孔。
参数特征决定了要使用的形状特征,
而Min和Max确定了为了填补这个洞的形状特征的范围。
Feature参数特征
'anisometry', 等效椭圆参数
'area', 面积
'compactness', 紧密度
'convexity', 凸性
'inner_circle',最大内接圆
'outer_circle',最小外切圆
'phi', 方向
'ra',等效椭圆长轴Ra
'rb',等效椭圆短轴Rb
上善若水,水善利万物而不争,处众人之所恶,故几于道。
浙公网安备 33010602011771号