You are here : matlabImage Processinggraycomatrix

graycomatrix() - Image Processing

glcms = graycomatrix(I) creates
a gray-level co-occurrence matrix (GLCM) from image I.
Another name for a gray-level co-occurrence matrix is a gray-level
spatial dependence matrix. Also, the word co-occurrence
is frequently used in the literature without a hyphen, cooccurrence. graycomatrix creates the GLCM by calculating
how often a pixel with gray-level (grayscale intensity) value i occurs
horizontally adjacent to a pixel with the value j.
(You can specify other pixel spatial relationships using the 'Offsets' parameter.)
Each element (i,j) in glcm specifies
the number of times that the pixel with value i occurred
horizontally adjacent to a pixel with value j.exampleglcms = graycomatrix(I,Name,Value,...) returns
one or more gray-level co-occurrence matrices, depending on the values
of the optional name/value pairs. Parameter names can be abbreviated,
and case does not matter. example[glcms,SI]
= graycomatrix(___) returns the scaled image, SI,
used to calculate the gray-level co-occurrence matrix. The values
in SI are between 1 and NumLevels.


Syntax

glcms = graycomatrix(I)glcms = graycomatrix(I,Name,Value,...) example[glcms,SI]
= graycomatrix(___) example


Example

graycomatrix(I, 'offset', [0 1], 'Symmetric', true)


Output / Return Value


Limitations


Alternatives / See Also


Reference