Problem in GCLM Matrix

3 Ansichten (letzte 30 Tage)
Jawad
Jawad am 2 Okt. 2014
Beantwortet: Jeremy Kemmerer am 2 Okt. 2014
A matrix 'C' having 256 X 256 elements. Values in this matrix are between 0 and 255. What will be the exact MATLAB command for Gray Level Co-matrix (GLCM) so that output matrix is also 256 X 256. I tried but the output of GLCM is 8 X 8 Which is different from the actual GLCM.

Antworten (1)

Jeremy Kemmerer
Jeremy Kemmerer am 2 Okt. 2014
The size of the GCLM matrix (output from the “ graycomatrix ” function) depends on the number of grayscale levels of the image, and not on the size of the image itself. The ‘ numlevels ’ parameter can be modified to adjust the number of grayscale levels used by “graycomatrix” and hence change the size of the output.
In your case, you could try:
>> glcm = graycomatrix(I,'numlevels',256);
Please refer to the following documentation for more information about the “integral2” function: http://www.mathworks.com/help/images/ref/graycomatrix.html

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by