Halcon学习笔记——Region特征类算子(1)

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特征一览:

特征备注
areaArea of the object对象的面积
rowRow index of the center中心点的行坐标
columnColumn index of the center中心点的列坐标
widthWidth of the region区域的宽度
heightHeight of the region区域的高度
row1Row index of upper left corner左上角行坐标
column1Column index of upper left corner左上角列坐标
row2Row index of lower right corner右下角行坐标
column2Column index of lower right corner右下角列坐标
circularityCircularity园度0~1 越接近1越圆
compactnessCompactness紧密度0~1 越接近1越紧密
contlengthTotal length of contour轮廓线总长
convexityConvexity凸性
rectangularityRectangularity矩形度0~1
raMain radius of the equivalent ellipse等效椭圆长轴半径长度
rbSecondary radius of the equivalent ellipse等效椭圆短轴半径长度
anisometryAnisometry椭园参数,Ra/Rb长轴与短轴的比值
bulkinessBulkiness椭圆参数,蓬松度n*Ra*Rb/A
outer_radiusRadius of smallest surrounding circle最小外接园半径
inner_radiusRadius of largest inner circle最大内接画半径
inner_widthWidth of the largest axis-parallel rectangle that fitsinto the region最大内接矩形宽度
inner_heightHeight of the largest axis-parallel rectangle that fitsinto the region最大内接矩形高度
dist_meanMean distance from the region border to the center区域边界到中心的平均距离
dist_deviationDeviation of the distance from the region borderfrom the center区域边界到中心距离的偏差
roundnessRoundness圆度,与circularity计算方法不司
num_sidesNumber of polygon sides多边形边数
connect_numNumber of connection components连通数
holes_numNumber of holes区域内洞数
max diameterMaximum diameter of the region最大直径
orientationOrientation of the region区域方向
euler_numberEuler number欧拉数,即连通数和洞数的差
rect2_phiOrientation of the smallest surrounding rectangle最小外接矩形的方向
rect2_len1Orientation of the smallest surrounding rectangle最小外接矩形的方向
rect2_len1Half the length of the smallest surrounding rectangle最小外接矩形长度的一半? ?smallest rectangle2
rect2_len2Half the width of the smallest surrounding rectangle最小外接矩形宽度的一半

  • 10
    点赞
  • 19
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值