Image processing GLCM gray level cooccurance matrix

조회 수: 9 (최근 30일)
NA
NA 2013년 3월 5일
댓글: aliah aljohani 2017년 9월 22일
In function graycomatrix,the output is always 8x8 matrix,i am not getting why its 8x8 ,can anybody help me out
  댓글 수: 1
aliah aljohani
aliah aljohani 2017년 9월 22일
hi when i use this code I = imread('circuit.tif'); glcm = graycomatrix(I,'Offset',[2 0])
i get this error Error in graycomatrix (line 167) [I, Offset, NL, GL, makeSymmetric] = ParseInputs(varargin{:});
Error in Untitled56 (line 2) GLCM = graycomatrix(I,'Offset',[2 0;0 2]); can help me and thank you

댓글을 달려면 로그인하십시오.

답변 (2개)

Youssef  Khmou
Youssef Khmou 2013년 3월 5일
hi,
We already discussed that topic , so as to avoid redundancy take a quick look at this topic you will find the answer : http://www.mathworks.com/matlabcentral/answers/64179-what-is-meant-by-glcm-mean-average

Teja Muppirala
Teja Muppirala 2013년 3월 6일
It's just the default setting. You can change the size by using the 'NumLevels' parameter.
For example,
I = imread('pout.tif');
G = graycomatrix(I,'NumLevels', 64);
imagesc(G)
See the help:
>> help graycomatrix
...
...
...
'NumLevels' An integer specifying the number of gray levels to use
when scaling the grayscale values in I. For example,
if 'NumLevels' is 8, graycomatrix scales the values in
I so they are integers between 1 and 8. The number of
gray levels determines the size of the gray-level
co-occurrence matrix (GLCM).
'NumLevels' must be an integer. 'NumLevels' must be 2
if I is logical.
Default: 8 for numeric
2 for logical
...
...
...

Community Treasure Hunt

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

Start Hunting!

Translated by