problem in glcm graycomatrix code???
    4 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
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
0 comentarios
Respuestas (1)
  Image Analyst
      
      
 el 22 de Sept. de 2017
        
      Editada: Image Analyst
      
      
 el 22 de Sept. de 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
>>
0 comentarios
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

