I have the following code:

` [r c]=find(I==1); smallGrayImage=grayImage([r c]); smallGLCM=graycomatrix(smallGrayImage); stats = graycoprops(smallGLCM, 'Energy'); statsEnergy(i,2) = stats.Energy; stats = graycoprops(smallGLCM, 'Homogeneity'); statsHomogeneity(i,2) = stats.Homogeneity;`

where [r c] contains a small region of an image, I need to Homogeneity of that region. but I am confused whether my code is right wrong. can anybody help to do that? thanks.

## Best Answer