When i and j are equal, the cell is on the diagonal and
(ij)=0. These values represent pixels entirely similar to their neighbour, so
they are given a weight of 0.
If i and j differ by 1, there is a small contrast, and the
weight is 1.
If i and j differ by 2, contrast is increasing and the
weight is 4.
The weights continue to increase exponentially as (ij)
increases.
Calculation example: for the horizontal GLCM,
Contrast equals
Contrast weights: X
horizontal GLCM
= multiplication result
0 
1 
4 
9 

0.166 
0.083 
0.042 
0 

0 
0.083 
.168 
0 
1 
0 
1 
4 

0.083 
0.166 
0 
0 

0.083 
0 
0 
0 
4 
1 
0 
1 

0.042 
0 
.249 
0.042 

.168 
0 
0 
.042 
9 
4 
1 
0 

0 
0 
0.042 
0.083 

0 
0 
.042 
0 
Sum of all elements in the multiplication result table =
0.586
In detail:
.166*(00)^{2} + .083*(01)^{2} +
.042*(02)^{2} + 0*(03)^{2} +
Important practical matter: Since Contrast can
evidently be <1, it must be recorded in an image channel equipped to handle
real numbers. If put into an 8bit or 16 bit integer channel, the value
would become 0.
Self test: a. What is the
degree of this measure? b. What does a Contrast of 0 mean?