Problem in GCLM Matrix
조회 수: 4 (최근 30일)
이전 댓글 표시
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.
댓글 수: 0
답변 (1개)
Jeremy Kemmerer
2014년 10월 2일
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
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!