Texture descriptors for gray-scale symbiosis matrices

Source: Internet
Author: User

Texture descriptors (Texture features): maximum probability, correlation, contrast, energy, homogeneity, entropy

I=imread (' C:\Users\Jv\Desktop\ texture 3.jpg '); Gray=rgb2gray (I); Gs=graycomatrix (Gray, ' numlevels ', 256);% horizontal position operator calculates symbiosis Matrix Gsn=gs/sum (GS (:));% normalized matrix stats=graycoprops (GS, ' all ');% The descriptor of the Symbiosis Matrix Maxprobability=max (GSn (:));% maximum probability corr=stats. correlation;% related contrast=stats. contrast;% contrast Ratio energy=stats. energy;% Energy Hom=stats. homogeneity;% Homogeneous for j=1:size (gsn,1)    sumcols (J) =sum (-GSN (j,1:end). *LOG2 (GSn (j,1:end) +eps)); Endentropy=sum ( Sumcols);% entropy y=[maxprobability,corr,contrast,energy,hom,entropy];

(1) Maximum probability: the probability of the maximum pixel pair.

(2) Related: It measures the similarity of the elements in the line or column direction of the spatial gray-scale symbiotic matrix element, therefore, the correlation value size reflects the local gray-level correlation in the image. When the values of the matrix elements are equal, the correlation values are large; Conversely, if the matrix cell values differ greatly, the correlation values are small. If there is a horizontal orientation texture in the image, the cor of the horizontal direction matrix is greater than the COR value of the remaining matrices.

(3) Contrast: reflects the sharpness of the image and the degree of texture groove depth. The deeper the texture groove, the greater the contrast, the clearer the visual effect is, whereas the contrast is small, the groove is shallow and the effect is blurred. The higher the gray-scale difference, the greater the contrast, the greater the number of pixels. The larger the value of the elements away from the diagonal in the gray-scale Commons matrix, the greater the con.

(4) Energy: is the square sum of the values of gray-scale co-occurrence matrix elements, so also called energy, reflecting the image gray distribution uniformity and texture thickness degree. If all the values of the Symbiosis matrix are equal, the ASM value is small; Conversely, if some of the values are large and the other values are small, the ASM value is large. When the elements in the Symbiosis matrix are centrally distributed, the ASM values are large at this time. The ASM value indicates a more homogeneous and regular variation of the texture pattern.

(5) homogeneity (inverse gap): reflects the homogeneity of the image texture, measuring how much local changes in the texture of the image. The large value indicates that there is a lack of change between the different regions of the image texture, and the local is very homogeneous.

(6) Entropy: is the amount of information that the image has, the texture information is also a measure of the randomness, when all the elements in the Symbiosis matrix have the greatest randomness and all the values in the space Symbiosis matrix are almost equal, the entropy is larger when the elements in the Symbiosis matrix are distributed. It represents the degree of heterogeneity or complexity of textures in an image.

"Function Explanation"

Gs=graycomatrix (Gray, ' numlevels ', ' n ', ' Offset ', offsets);

' Numlevels ' An integer that represents the grayscale in the image to a range. For example, if Numlevels is 8, it means that the grayscale of image I is mapped to between 1 and 8, and it also determines the size of the gray-scale symbiosis matrix.
' Offset ' is a p*2 integer matrix, and D represents the distance between the current pixel and the neighbor, and the angle can be set by setting the D value. default [0,1] level

Angle Offset

0 [0 D]

[d]

[-D 0]

135 [-d-d]


"Introduction to Gray-scale symbiosis Matrix"

The symbiosis matrix is defined by the joint probability density of two pixels, which not only reflects the distribution characteristic of luminance, but also reflects the position distribution characteristic between pixels with same luminance or near luminance, and is the second-order statistic characteristic about the luminance change of images. It is the basis for defining a set of texture features.
The gray-scale symbiosis matrix of image is a matrix function of pixel distance and angle, and it can reflect the comprehensive information of the image in direction, interval, amplitude and speed by calculating the correlation between the two-point gray scale of certain distance and certain direction in the image.

Texture descriptors for gray-scale symbiosis matrices

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.