功能:
使用形状特征选择等值线或多边形。
签名:
- select_shape_xld(XLD : SelectedXLD : Features, Operation, Min, Max : )
复制代码
说明:根据contours轮廓或polygons多边形的形状特征选择对应图形输出到SelectedXLD;
Features属性特征可以有多组,通过Operation自由组合,and表示同时满足,or表示其中一组满足即可。
参数min和max可设置为“Min”或“Max ”,表示对下限或者上限作开区域(无需手动输入最小值或者最大值,如99999999这样的)。
公式:
可用特征值:
- 'area': 轮廓的面积 (参考 area_center_xld)
- 'area_points': 轮廓点的面积 (参考 area_center_points_xld)
- 'row': 重心的行索引值 (参考 area_center_xld)
- 'column': 重心的列索引值 (参考 area_center_xld)
- 'row_points': 轮廓点重心的行索引值 (参考 area_center_points_xld)
- 'column_points':轮廓点重心的列索引值 (参考 area_center_points_xld)
- 'width': 轮廓的宽度 (参考 height_width_ratio_xld)
- 'height': 轮廓的高度 (参考 height_width_ratio_xld)
- 'ratio': 轮廓的高度和宽度之比 (参考 height_width_ratio_xld)
- 'row1': 左上角的行坐标 (参考 smallest_rectangle1_xld)
- 'column1': 左上角的列坐标 (参考 smallest_rectangle1_xld)
- 'row2': 右下角的行坐标(参考 smallest_rectangle1_xld)
- 'column2': 右下角的列坐标 (参考 smallest_rectangle1_xld)
- 'circularity': 接近圆形的程度 (参考 circularity_xld)
- 'compactness': 密度 (参考 compactness_xld)
- 'rectangularity': 接近矩形的程度(参考 rectangularity_xld)
- 'contlength': 轮廓总长度 (参考 length_xld)
- 'convexity': 轮廓的凸性 (参考 convexity_xld)
- 'ra': 等效椭圆的长半径 (参考 elliptic_axis_xld)
- 'rb': 等效椭圆的小半径 (参考 elliptic_axis_xld)
- 'phi': 等效椭圆的方向/角度 (参考 elliptic_axis_xld)
- 'ra_points': 轮廓点的等效椭圆的长半径 (参考 elliptic_axis_points_xld)
- 'rb_points': 轮廓点的等效椭圆的小半径 (参考 elliptic_axis_points_xld)
- 'phi_points': 轮廓点的等效椭圆的方向/角度 (参考 elliptic_axis_points_xld)
- 'anisometry:' 非对称(参考 eccentricity_xld)
- 'anisometry_points:' 轮廓点的非对称 (参考 eccentricity_points_xld)
- 'bulkiness:' 庞大(参考 eccentricity_xld)
- 'struct_factor:' 结构因子 (参考 eccentricity_xld)
- 'outer_radius': 最小封闭圆的半径 (参考 smallest_circle_xld)
- 'max_diameter': 轮廓的最大直径 (参考 diameter_xld)
- 'orientation': 轮廓的方向/角度 (参考 orientation_xld)
- 'orientation_points': 轮廓点的方向/角度 (参考 orientation_points_xld)
- 'rect2_phi': 最小近似矩形的方向 (参考 smallest_rectangle2_xld)
- 'rect2_len1':
- 最小近似矩形的1/2长度 (参考 smallest_rectangle2_xld)
- 'rect2_len2':
- 最小近似矩形的1/2宽度 (参考 smallest_rectangle2_xld)
- 'moments_m11', 'moments_m20', 'moments_m02': 轮廓的几何矩 (参考 moments_region_2nd)
- 'moments_m11_points', 'moments_m20_points', 'moments_m02_points': 轮廓点的几何矩 (参考 moments_points_xld)
复制代码 |