函数原型:shape_trans(Region : RegionTrans : Type : )

 

*shape_trans*仍然是区域,smallest_rectangle1可以获得四个角的坐标

 

 

函数作用:变换区域的形状

 

参数列表:

Region(in):被变换的区域

RegionTrans(out):变换后的区域

Type(in):变换类型

 

参数Type的可选项解释如下:

convex:凸包性

ellipse:与输入区域有相同的矩和区域的椭圆

outer_circle:最小外接圆

inner_circle:最大内接圆

rectangle1:平行于坐标轴的最小外接矩形

rectangle2:最小外接矩形

inner_rectangle1:平行于坐标轴的最大内接矩形

inner_rectangle2:输入区域的骨架点拥有同输入区域的重心点最小的距离

 

注意:如果Type是outer_circle,最终的圆形区域不是完全覆盖输入区域,因为内部算法原理是由算子smallest_circle和gen_circle完成的。由smallest_circle计算的半径能够小到1/sqrt(2)-0.5个像素。同时,由gen_circle生成的圆在双方向上由0.5个像素转换。因此,当加入双方的影响,原因区域可能要超出返回圆形区域至多1个像素

 

 

 

 

可能前置项:

connection, regiongrowing

 

可能后置项:

disp_region, regiongrowing_mean, area_center

 

可替代项:

convexity, elliptic_axis, area_center, smallest_rectangle1, smallest_rectangle2, inner_rectangle1, set_shape, select_shape, inner_circle

posted on 2017-07-29 11:39  qqhfeng16  阅读(3660)  评论(0编辑  收藏  举报