gray-level co-occurrence matrix (GLCM) [message #71148] |
Tue, 01 June 2010 06:33  |
j.coenia@gmail.com
Messages: 36 Registered: December 2008
|
Member |
|
|
Is there an efficient and versatile gray-level co-occurence matrix
(GLCM) routine in IDL, or in someone's library? Found routines called
"graycomatrix" and "graycoprops" for MATLAB. Anything like that for
IDL?
|
|
|
|
Re: gray-level co-occurrence matrix (GLCM) [message #89733 is a reply to message #71148] |
Sun, 23 November 2014 10:53  |
lecacheux.alain
Messages: 325 Registered: January 2008
|
Senior Member |
|
|
Le mardi 1 juin 2010 15:33:50 UTC+2, j.co...@gmail.com a écrit :
> Is there an efficient and versatile gray-level co-occurence matrix
> (GLCM) routine in IDL, or in someone's library? Found routines called
> "graycomatrix" and "graycoprops" for MATLAB. Anything like that for
> IDL?
For computing GLCM of an image IMG (2D-array of bytes), I would simply do:
n = N_elements(img)
;left shift the image array
img_shifted = shift(img,1,0)
;vectorize both arrays
img = reform(img,n)
img_shifted = reform(img_shifted,n)
;compute GLCM
glcm = hist_2D(img,img_shifted,MIN1=0,MIN2=0)
alx.
|
|
|