When i and j are equal, the cell is on the diagonal and
(i-j)=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 (i-j)
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*(0-0)2 + .083*(0-1)2 +
.042*(0-2)2 + 0*(0-3)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 8-bit 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?