GLCM considers the relation between two pixels at a time, called the reference and the neighbour pixel. Based on the selection of the neighbour pixel generally 4 different Gray Level Co-occurrence Matrices (GLCM) can be calculated for an image.
Selection of the neighbour pixel is as follows.
reference pixel | neighbour pixel
(x,y) (x+1, y) the pixel to its right
(x,y) (x+1, y+1) the pixel to its right and above
(x,y) (x, y+1) the pixel above
(x,y) (x-1, y+1) the pixel to its left and above
A good, in-detail explanation about GLCM is available here (Original link).
My question is, is it required to consider all 3 intensity values of an image pixel when calculating Gray Level Co-occurrence Matrices (GLCM) of a "gray scale image"?
As an example consider an image with 2 pixels
------------------------------------------------------------------------------------
| [pixel1] | [pixel2] |
| / | \ | / | \ |
| [intensity1] [intensity2] [intensity3] | [intensity4] [intensity5] [intensity6] |
------------------------------------------------------------------------------------
When calculating the GLCM of a gray scale image is it required to take into account all 3 intensity values of a pixel?
E.g- When the reference pixel is (x,y) and its neighbour pixel is (x+1, y) the pixel to its right
Is it required to take into account the occurrences of intensity levels individually as follows?
[intensity1] & [intensity2]
[intensity2] & [intensity3]
[intensity3] & [intensity4]
[intensity4] & [intensity5]
[intensity5] & [intensity6]
Or can I just take into account one intensity value from each pixel, assuming all 3 intensity values of a pixel is same as follows?
[intensity1] & [intensity4]
Which is the correct method? Is it applicable for all 4 neighbours?