I am using graycomatrix to generate glcm on a gray image I. The array is of type double. max(max(I)) = 255 and min(min(I)) = 0
if I do histogram on the image with 8 bins h = h.histogram(I, 8) h.Values = 900094 59443 20835 8553 3528 1667 1140 932 these shows that pixel values are not just 0 and 255 rather there are enough pixels that have values between 0 and 255
yet the glcm = graycomatrix(I) produces this glcm =
684391 0 0 0 0 0 0 12927 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13342 0 0 0 0 0 0 284668
Why all entries in glcm except the corner 4 are 0s? I expect many entries in the glcm to be non zero.
Best Answer