problem in glcm graycomatrix code???
Afficher commentaires plus anciens
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 you help me?
Thank you
Réponses (1)
Image Analyst
le 22 Sep 2017
Modifié(e) : Image Analyst
le 22 Sep 2017
Works fine for me:
>> glcm = graycomatrix(I,'Offset',[2 0])
glcm =
14205 2107 126 0 0 0 0 0
2242 14052 3555 400 0 0 0 0
191 3579 7341 1505 37 0 0 0
0 683 1446 7184 1368 0 0 0
0 7 116 1502 10256 1124 0 0
0 0 0 2 1153 1435 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
This also works:
>> GLCM = graycomatrix(I,'Offset',[2 0;0 2])
GLCM(:,:,1) =
14205 2107 126 0 0 0 0 0
2242 14052 3555 400 0 0 0 0
191 3579 7341 1505 37 0 0 0
0 683 1446 7184 1368 0 0 0
0 7 116 1502 10256 1124 0 0
0 0 0 2 1153 1435 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
GLCM(:,:,2) =
13938 2615 204 4 0 0 0 0
2406 14062 3311 630 23 0 0 0
145 3184 7371 1650 133 0 0 0
2 371 1621 6905 1706 0 0 0
0 0 116 1477 9974 1173 0 0
0 0 0 1 1161 1417 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
>>
Catégories
En savoir plus sur Texture Analysis dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!