Region特征类算子
region_features(Regions : : Features : Value)
* 计算区域的形状特征
* 输入参数:
* Regions ————待检测区域
* Features ————要检测的特征(默认值:'area',可选值见Region特征图所示)
* 输出参数:
* Value ————计算的特征
* Features可以输入单个或者多个特征,例如['area','anisometry']
select_shape(Regions : SelectedRegions : Features, Operation, Min, Max : )
* 借助形状特征选择相应区域
* 输入参数:
* Regions ————待检测区域(数组)
* Features ————要检测的特征(默认值:'area',可选值见Region特征图所示)
* Operation ————特征的方式(默认: and , 'and’全部特征 ,'or’特征之一)
* Min ————输入该特征的最小值,范围:0.0 ≤ Min ≤ 99999.0
* Max ————输入该特征的最大值,范围:0.0 ≤ Max ≤ 99999 0, Max>= Min
* 输出参数:
* SelectedRegions————输出符合的区域(数组),不符合的区域不会出现在该数组内
area_center(Regions : : : Area, Row, Column)
* 计算相应区域的面积,中心坐标
* 输入参数:
* Regions ————计算区域(可以是合并也可以是打散的)
* 输出参数:
* Area ————面积
* Row ————中心点横坐标
* Column ————中心点列坐标
shape_trans(Region : RegionTrans : Type : )
* 变换区域的形状
* 输入参数:
* Regions ————被变换区域
* Type ————变换类型(默认值:'convex' 凸包性)
* 输出参数:
* RegionTrans ————变换后的区域
参数Type的可选项解释如下:
* convex ————凸包性
* ellipse ————与输入区域有相同的矩和区域的椭圆
* outer_circle ————最小外接圆
* inner_circle ————最大内接圆
* rectangle1 ————平行于坐标轴的最小外接矩形
* rectangle2 ————最小外接矩形
* inner_rectangle1 ————平行于坐标轴的最大内接矩形
* inner_rectangle2 ————输入区域的骨架点拥有同输入区域的重心点最小的距离
Region特征一览:
特征 | 英 | 译 | 备注 |
area | Area of the object | 对象的面积 | |
row | Row index of the center | 中心点的行坐标 | |
column | Column index of the center | 中心点的列坐标 | |
width | Width of the region | 区域的宽度 | |
height | Height of the region | 区域的高度 | |
row1 | Row index of upper left corner | 左上角行坐标 | |
column1 | Column index of upper left corner | 左上角列坐标 | |
row2 | Row index of lower right corner | 右下角行坐标 | |
column2 | Column index of lower right corner | 右下角列坐标 | |
circularity | Circularity | 园度 | 0~1 越接近1越圆 |
compactness | Compactness | 紧密度 | 0~1 越接近1越紧密 |
contlength | Total length of contour | 轮廓线总长 | |
convexity | Convexity | 凸性 | |
rectangularity | Rectangularity | 矩形度 | 0~1 |
ra | Main radius of the equivalent ellipse | 等效椭圆长轴半径长度 | |
rb | Secondary radius of the equivalent ellipse | 等效椭圆短轴半径长度 | |
anisometry | Anisometry | 椭园参数,Ra/Rb长轴与短轴的比值 | |
bulkiness | Bulkiness | 椭圆参数,蓬松度n*Ra*Rb/A | |
outer_radius | Radius of smallest surrounding circle | 最小外接园半径 | |
inner_radius | Radius of largest inner circle | 最大内接画半径 | |
inner_width | Width of the largest axis-parallel rectangle that fitsinto the region | 最大内接矩形宽度 | |
inner_height | Height of the largest axis-parallel rectangle that fitsinto the region | 最大内接矩形高度 | |
dist_mean | Mean distance from the region border to the center | 区域边界到中心的平均距离 | |
dist_deviation | Deviation of the distance from the region borderfrom the center | 区域边界到中心距离的偏差 | |
roundness | Roundness | 圆度,与circularity计算方法不司 | |
num_sides | Number of polygon sides | 多边形边数 | |
connect_num | Number of connection components | 连通数 | |
holes_num | Number of holes | 区域内洞数 | |
max diameter | Maximum diameter of the region | 最大直径 | |
orientation | Orientation of the region | 区域方向 | |
euler_number | Euler number | 欧拉数,即连通数和洞数的差 | |
rect2_phi | Orientation of the smallest surrounding rectangle | 最小外接矩形的方向 | |
rect2_len1 | Orientation of the smallest surrounding rectangle | 最小外接矩形的方向 | |
rect2_len1 | Half the length of the smallest surrounding rectangle | 最小外接矩形长度的一半? ? | smallest rectangle2 |
rect2_len2 | Half the width of the smallest surrounding rectangle | 最小外接矩形宽度的一半 |