您的位置:首页 > 其它

使用灰度共生矩阵获取纹理(GLCM)

2013-01-10 15:11 387 查看
图像的纹理是图像的特征,很多初学者不太了解纹理的概念。其实纹理有广义和狭义之说,先说狭义的。狭义的纹理指的是图像的条纹,比如说墙面的图片,有很多有规律的砖块组成。这些有规律的砖块的排列就是纹理。广义的纹理范围比较大,图像的一切特征都可以称之为纹理,比如说平均灰度,方差等等。我们通常就提取我们所感兴趣的纹理特征进行使用。以下是一个很不错的tutorial,讲的不错!http://www.fp.ucalgary.ca/mhallbey/tutorial.htm,这是我摘录的一部分内容,也许有用

The GLCM approximates the joint probability distribution of two pixels. Having many zeros in cells makes this a very bad approximation.

In practice, some statistics calculated from the GLCM don't help classification very much when a large number
of grey levels are used. Other statistics don't degrade as much. 

Clausi (2002) worked on classification using texture of SAR
sea ice imagery. He analyzed correlation among textures to determine the best subset of texture measures. He found that Contrast, Correlation and Entropy used together outperformed any one of them alone, and also outperformed using these and a number of others
all together. If only one can be used, he recommends choosing among Contrast, Dissimilarity, Inverse Difference Moment Normalized (what we have called Homogeneity) or Inverse Difference normalized (what we have called Similarity).
Clausi also summarized the texture measures found to be useful
in a number of SAR sea-ice studies. He found Entropy always used, and Contrast and Correlation a close second (Clausi 2002 Table 2, p. 47).

These conclusions are interesting, but cannot be assumed to apply to images that are not of sea ice.

以下是经常使用的一些特征:

                                          




但是对于上面的tutorial有一点还是没有搞懂,就是里面用到了window,我在其他的文献中看到纹理的计算过程中并没有使用window。opencv最新的库把GLCM的功能集成进去了,使用最新版本的opencv的库爽了。下面的参考文献中有opencv相关的GLCM的官方代码链接。

下面是我从网上搜的有的兄弟实现的,没有用到window,我不知道对否,但是个人觉得还是很可靠的。

参考文献:

http://www.fp.ucalgary.ca/mhallbey/tutorial.htm

http://fossies.org/dox/OpenCV-2.4.3/texture_8cpp_source.html

http://blog.csdn.net/cxf7394373/article/details/6988229
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: