获取Image图像中Region区域的特征参数

area_center_gray ( Regions, Image : : : Area, Row, Column )

   计算Image图像中Region区域的面积Area和重心(Row,Column)。


cooc_feature_image ( Regions, Image : : LdGray, Direction : Energy,Correlation, Homogeneity, Contrast )

 计算共生矩阵和推导出灰度特征值

   Direction:灰度共生矩阵计算的方向

   Energy:灰度值能量

   Correlation:灰度值的相互关系

    Homogeneity:灰度值的均匀性

    Contrast:灰度值的对比度


cooc_feature_matrix ( CoocMatrix : : : Energy, Correlation,Homogeneity, Contrast )

根据共生矩阵计算灰度特征值


elliptic_axis_gray ( Regions, Image : : : Ra, Rb, Phi )

计算Image图像的Region区域的Ra,Rb和Phi。


entropy_gray ( Regions, Image : : : Entropy, Anisotropy )

Image图像中Region区域的计算熵Entropy和各向异性Anisotropy。


estimate_noise ( Image : : Method, Percent : Sigma )

从单一图像 Image中估计图像的噪声。

Sigma:加性噪声的标准偏差

Method :估计噪声的方法

Method∈{foerstner、immerkaer、least_squares、mean}、


fit_surface_first_order ( Regions, Image : : Algorithm, Iterations,ClippingFactor : Alpha, Beta, Gamma )

计算一阶灰度平面的灰度矩阵和灰度值的逼近参数。

Algorithm:采用的算法

Algorithm:迭代次数

ClippingFactor:消除临界值的削波系数


fit_surface_second_order ( Regions, Image : : Algorithm, Iterations,ClippingFactor : Alpha, Beta, Gamma, Delta, Epsilon, Zeta )

计算二阶灰度平面的灰度矩阵和灰度值的逼近参数。


fuzzy_entropy ( Regions, Image : : Apar, Cpar : Entropy )

确定区域Regions的模糊熵 将图像视为模糊集合

Apar为模糊区域的起始点

Cpar为模糊区域的结束点

Entropy为Regions的模糊熵


fuzzy_perimeter ( Regions, Image : : Apar, Cpar : Perimeter )

计算Region区域的模糊周长


gen_cooc_matrix ( Regions, Image : Matrix : LdGray, Direction : )

生成Image图像Region区域的共生矩阵


gray_histo ( Regions, Image : : : AbsoluteHisto, RelativeHisto )

获取Image图像Region区域的灰度相对直方图RelativeHisto和绝对直方图AbsoluteHisto。

注意:Region区域必须先计算过它的直方图。


gray_histo_abs ( Regions, Image : : Quantization : AbsoluteHisto )

获取Image图像Region区域的灰度绝对直方图AbsoluteHisto。

Quantization:灰度值的量化、


gray_projections ( Region, Image : : Mode : HorProjection,VertProjection )

计算Region区域在水平方向和垂直方向的灰度值投影。


histo_2dim ( Regions, ImageCol, ImageRow : Histo2Dim : : )

计算二通道灰度图像的直方图


intensity ( Regions, Image : : : Mean, Deviation )

计算region区域的灰度平均值和偏差


min_max_gray ( Regions, Image : : Percent : Min, Max, Range )

计算Region区域的最大最小灰度值。

Range:最大灰度值和最小灰度值之间的差距


moments_gray_plane ( Regions, Image : : : MRow, MCol, Alpha, Beta,Mean )

计算平面的灰度矩阵和灰度值的逼近参数。


plane_deviation ( Regions, Image : : : Deviation )

逼近的图象平面计算灰度值偏差


select_gray ( Regions, Image : SelectedRegions : Features, Operation,Min, Max : )

根据灰度值选择区域

Features∈{area、row、column、ra、rb、phi、min、max、mean、deviation、plane_deviation、anisotropy、entropy、fuzzy_entropy、fuzzy_perimeter、moments_row、moments_column、alpha、beta}

Operation∈{and、or}


shape_histo_all ( Region, Image : : Feature : AbsoluteHisto,RelativeHisto )



shape_histo_point ( Region, Image : : Feature, Row,Column : AbsoluteHisto, RelativeHisto )

获取阈值特征直方图

Feature∈{connected_components、convexity、compactness、anisometry、holes}


read_image (Image, 'G:/Halcon/机器视觉/images/bin_switch/bin_switch_3.png')  
regiongrowing (Image, Regions, 3, 3, 1, 500)  
area_center_gray (Regions, Image, Area, Row, Column)  
cooc_feature_image (Regions, Image, 6, 0, Energy, Correlation, Homogeneity, Contrast)  
elliptic_axis_gray (Regions, Image, Ra, Rb, Phi)  
entropy_gray (Regions, Image, Entropy, Anisotropy)  
estimate_noise (Image, 'mean', 20, Sigma)  
fit_surface_first_order (Regions, Image, 'regression', 5, 2, Alpha, Beta, Gamma)  
fit_surface_second_order (Regions, Image, 'regression', 5, 2, Alpha1, Beta1, Gamma1, Delta, Epsilon, Zeta)  
fuzzy_entropy (Regions, Image, 0, 255, Entropy1)  
fuzzy_perimeter (Regions, Image, 0, 255, Perimeter)  
gen_cooc_matrix (Regions, Image, Matrix, 6, 0)  
dev_set_paint ('histogram')  
gray_projections (Regions, Image, 'simple', HorProjection, VertProjection)  
histo_2dim (Regions, Image, Image, Histo2Dim)

运行结果:

image.png


由于特征参数是分类器的训练特征要用到的,所以非常重要。

勇哥把常见的总结一下如下表:


1、area_center_gray ( Regions, Image : : : Area, Row, Column )  
计算Image图像中Region区域的面积Area和重心(Row,Column)。

2、 cooc_feature_image ( Regions, Image : : LdGray, Direction : \
Energy, Correlation, Homogeneity, Contrast )
计算共生矩阵和推导出灰度特征值 Direction:灰度共生矩阵计算的方向 Energy:灰度值能量  
Correlation:灰度值的相互关系  Homogeneity:灰度值的均匀性 Contrast:灰度值的对比度 

3、 cooc_feature_matrix ( CoocMatrix : : : Energy, Correlation, Homogeneity, Contrast )  
根据共生矩阵计算灰度特征值  

4、elliptic_axis_gray ( Regions, Image : : : Ra, Rb, Phi )  
计算Image图像的Region区域的Ra,Rb和Phi。

5、 entropy_gray ( Regions, Image : : : Entropy, Anisotropy )  
Image图像中Region区域的计算熵Entropy和各向异性Anisotropy。

6、 estimate_noise ( Image : : Method, Percent : Sigma )  
从单一图像 Image中估计图像的噪声。 Sigma:加性噪声的标准偏差 Method :估计噪声的方法 
Method∈{foerstner、immerkaer、least_squares、mean}、

7、fit_surface_first_order ( Regions, Image : : Algorithm, Iterations, ClippingFactor : \
Alpha, Beta, Gamma )
计算一阶灰度平面的灰度矩阵和灰度值的逼近参数。 
Algorithm:采用的算法 Algorithm:迭代次数  ClippingFactor:消除临界值的削波系数  

8、fit_surface_second_order ( Regions, Image : : Algorithm, Iterations, ClippingFactor : \
Alpha, Beta, Gamma, Delta, Epsilon, Zeta )  
计算二阶灰度平面的灰度矩阵和灰度值的逼近参数。 

9、fuzzy_entropy ( Regions, Image : : Apar, Cpar : Entropy )  
确定区域Regions的模糊熵 将图像视为模糊集合 Apar为模糊区域的起始点 Cpar为模糊区域的结束点 Entropy为Regions的模糊熵  

10、fuzzy_perimeter ( Regions, Image : : Apar, Cpar : Perimeter )  
计算Region区域的模糊周长  

11、gen_cooc_matrix ( Regions, Image : Matrix : LdGray, Direction : )  
生成Image图像Region区域的共生矩阵  

12、gray_histo ( Regions, Image : : : AbsoluteHisto, RelativeHisto )  
获取Image图像Region区域的灰度相对直方图RelativeHisto和绝对直方图AbsoluteHisto。 
注意:Region区域必须先计算过它的直方图。 

13、gray_histo_abs ( Regions, Image : : Quantization : AbsoluteHisto )  
获取Image图像Region区域的灰度绝对直方图AbsoluteHisto。 Quantization:灰度值的量化、  

14、gray_projections ( Region, Image : : Mode : HorProjection, VertProjection )  
计算Region区域在水平方向和垂直方向的灰度值投影。 

15、histo_2dim ( Regions, ImageCol, ImageRow : Histo2Dim : : )  
计算二通道灰度图像的直方图  

16、intensity ( Regions, Image : : : Mean, Deviation )  
计算region区域的灰度平均值和偏差  

17、min_max_gray ( Regions, Image : : Percent : Min, Max, Range )  
计算Region区域的最大最小灰度值。 Range:最大灰度值和最小灰度值之间的差距  

18、moments_gray_plane ( Regions, Image : : : MRow, MCol, Alpha, Beta, Mean )  
计算平面的灰度矩阵和灰度值的逼近参数。 

19、plane_deviation ( Regions, Image : : : Deviation )  
逼近的图象平面计算灰度值偏差  

20、select_gray ( Regions, Image : SelectedRegions : Features, Operation, Min, Max : )  
根据灰度值选择区域 
Features∈{area、row、column、ra、rb、phi、min、max、mean、deviation、plane_deviation、\
anisotropy、entropy、fuzzy_entropy、fuzzy_perimeter、moments_row、moments_column、alpha、
beta}  Operation∈{and、or}  

21、shape_histo_all ( Region, Image : : Feature : AbsoluteHisto, RelativeHisto )  

22、shape_histo_point ( Region, Image : : Feature, Row, Column : AbsoluteHisto, RelativeHisto )  
获取阈值特征直方图  Feature∈{connected_components、convexity、compactness、anisometry、holes}


关于Region相关操作请参考下面贴子:

Region相关算子总结 http://www.skcircle.com/?id=1138



--------------------- 

作者:xinrui_hhuc 

来源:CSDN 

原文:https://blog.csdn.net/xinrui_hhuc/article/details/6131394 

版权声明:本文为博主原创文章,转载请附上博文链接!


本文出自勇哥的网站《少有人走的路》wwww.skcircle.com,转载请注明出处!讨论可扫码加群:

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

会员中心
搜索
«    2024年4月    »
1234567
891011121314
15161718192021
22232425262728
2930
网站分类
标签列表
最新留言
    热门文章 | 热评文章 | 随机文章
文章归档
友情链接
  • 订阅本站的 RSS 2.0 新闻聚合
  • 扫描加本站机器视觉QQ群,验证答案为:halcon勇哥的机器视觉
  • 点击查阅微信群二维码
  • 扫描加勇哥的非标自动化群,验证答案:C#/C++/VB勇哥的非标自动化群
  • 扫描加站长微信:站长微信:abc496103864
  • 扫描加站长QQ:
  • 扫描赞赏本站:
  • 留言板:

Powered By Z-BlogPHP 1.7.2

Copyright Your skcircle.com Rights Reserved.

鄂ICP备18008319号


站长QQ:496103864 微信:abc496103864