【Halcon机器视觉】9.2 基于灰度值的特征

本文介绍了Halcon中基于灰度值的图像特征,包括区域的灰度特征值(如最大值、最小值、平均值、偏差)、灰度的平均值和偏差计算、区域的最大最小灰度值、灰度区域的面积和中心,以及如何根据灰度特征值选择区域。通过使用如gray_features、intensity和min_max_gray等算子,可以对图像进行深入的灰度特征分析。
摘要由CSDN通过智能技术生成

9.2 基于灰度值的特征

基于灰度值的特征,即利用灰度信息表示区域或者图像的特征,如计算图像的灰度的最大值、最小值、偏差、均值等,还可以算出灰灰度区域的面积和中心,相关算子有gray_features算子、min_max_gray算子、intensity算子、area_ceter_gray算子、select_gray算子等,下面将对其一一介绍。

9.2.1 区域的灰度特征值

gray_features算子的原型如下:

gray_features(Regions, Image : : Features : Value)

gray_features算子,用于计算输入的region区域的灰度特征值,存储在Value中,可能灰度特征值有,即Features 选项有:

  1. ‘area’:Gray value volume of region (see area_center_gray)
    灰度区域面积
  2. ‘row’:Row index of the center of gravity (see area_center_gray)
    灰度中心的行坐标
  3. ‘column’:Column index of the center of gravity (see area_center_gray)
    灰度中心的列坐标
  4. ‘ra’:Major axis of equivallent ellipse (see elliptic_axis_gray)
    等效椭圆的长轴
  5. ‘rb’:Minor axis of equivallent ellipse (see elliptic_axis_gray)
    等效椭圆的短轴
  6. ‘phi’:Orientation of equivallent ellipse (see elliptic_axis_gray)
    等效椭圆的方向
  7. ’min’:Minimum gray value (see min_max_gray)
    灰度的最小值
  8. ’max’:Maximum gray value (see min_max_gray)
    灰度的最大值
  9. ’mean’:Mean gray value (see intensity)
    灰度的平均值
  10. ’deviation’:Deviation of gray values (see intensity)
    灰度的偏差
  11. ‘plane_deviation’:Deviation from the approximating plane (see plane_deviation)
    “平面偏差”:与近似平面的偏差(见平面偏差)
  12. ‘anisotropy’:Anisotropy (see entropy_gray)
    “各向异性”:各向异性(参见熵灰)
  13. ‘entropy’:Entropy (see entropy_gray)
  14. ‘fuzzy_entropy’:Fuzzy entropie of region (see fuzzy_entropy, with a fuzzy function from Apar=0 to Cpar=255)
    区域的模糊熵(参见模糊熵,模糊函数从Apar=0到Cpar=255)
  15. ‘fuzzy_perimeter’: Fuzzy perimeter of region (see fuzzy_perimeter, with a fuzzy function from Apar=0 to Cpar=255)
    区域的模糊周长(参见Fuzzy_period,模糊函数从Apar=0到Cpar=255)
  16. ‘moments_row’: Mixed moments along a row (see moments_gray_plane)
    沿一排的混合力矩(见力矩图灰色平面)
  17. ‘moments_column’:Mixed moments along a column (see moments_gray_plane)
  18. ‘alpha’:Approximating plane, parameter Alpha (see moments_gray_plane)
    近似平面,参数alpha(见力矩_gray_平面)
  19. ‘beta’: Approximating plane, parameter Beta (see moments_gray_plane)
    近似平面,参数Beta(见力矩_gray_平面)

输入图像:
在这里插入图片描述
处理例程:

read_image(Image,'1')
*将图像转化为区域
threshold(Image, Region, 0, 255)
*提取区域中的最大灰度值
gray_features(Region, I
  • 2
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值