MATLAB: Calculation of GLCM Mean

glcm meantexture

i,ve gone through the tutorial
http://www.fp.ucalgary.ca/mhallbey/glcm_mean.htm
i've divided the image into discrete blocks.i want to calculate the GLCM Mean of every block… can u tell me by writing code of glcm Mean…
glcm=graycomatrix(input_image);
this i know…
what i dont know is the GLCM Mean.. can anybody tell me the synrtax for it?

Best Answer

hi Jassy ,
there is an answer ( to check ...) in previous question, i repost it here anyway for further discussion/correction with other Contributers :
I=imread('liftingbody.png');
G=graycomatrix(I);
[m n]=size(G);
GLCMl=0 % left hand side mean
GLCMr=0; % right hand side mean
for x=1:m
for y=1:n
GLCMl=GLCMl+x*G(x,y);
GLCMr=GLCMr+y*G(x,y);
end
end
The difference between the two is 111.