Академический Документы
Профессиональный Документы
Культура Документы
Al-Rawi
University of Anbar\ College Of Computer Science& I.T
Graduate studying (Master)
Lec.6
1
Dr.Azmi T.Al-Rawi
University of Anbar\ College Of Computer Science& I.T
Graduate studying (Master)
Lec.6
correlations between image pixels. For a k-bit image with 𝐿 = 2𝑘
brightness levels, an 𝐿 × 𝐿 matrix is created whose elements are the
number of occurrences of a pair of pixels with brightness of a.b separated
by d pixels in a certain direction.
A GLCM is a matrix where the number of rows and columns is equal to
the number of gray levels, G, in the image.
The matrix element P (i, j | d, ө) contains the second order statistical
probability values for changes between gray levels ‘i’ and ‘j’ at a
particular displacement distance d (∆x, ∆y) and at a particular angle θ.
Depending on various values of d and θ (such as 0°, 45°, 90° and 135)
degrees as shown in figure 1.
00(0, d)
2
Dr.Azmi T.Al-Rawi
University of Anbar\ College Of Computer Science& I.T
Graduate studying (Master)
Lec.6
The matrix P (i, j) is normalized by dividing each element in the matrix
by the total number of pixel pairs. Using this co-occurrence matrix, the
texture features metrics are computed.
There are several textural features measured from the probability matrix
to extract the characteristics of texture statistics as a Contrast,
correlation, energy (Angular Second Moment), homogeneity, Entropy,
maximum probability, Inverse Difference Moment, and etc.
Contrast: is a measure of intensity or gray-level variations between the
multiple pixel and its neighboring:
Contrast=∑𝒊 ∑𝒋(𝒊 − 𝒋)𝟐 𝑷𝒊𝒋 …………………….(2)
Correlation: The correlation is measurement of the multiple correlated
variable pixels with their neighboring in the matrix.
∑𝒊 ∑𝒋(𝒊−𝝁𝒊)(𝒋−𝝁𝒋)𝑷𝒊𝒋
Correlation= …………………(3)
𝝈𝒊𝝈𝒋
Color Image
Gray Scale
Image
Resize to (NxN)
Resize image to
(256 or 128 or
64)
Gray Level
GLCM
Co-occurrence Matrix
Matrix
(8x8)
4
Dr.Azmi T.Al-Rawi
University of Anbar\ College Of Computer Science& I.T
Graduate studying (Master)
Lec.6
Example:
The number of gray levels is often reduced. GLCM matrix formulation
can be explained with the example illustrated in figure 3 for four different
gray levels.
Neighbor pixel value 0 1 2 3
Ref. pixel value:
0 0,0 0,1 0,2 0,3
1 1,0 1,1 1,2 1,3
2 2.0 2,1 2,2 2,3
3 3,0 3,1 3,2 3,3
Figure 3: GLCM calculation
0 1 2 3
16 55 66 89 0 0 0 1 1
54 128 225 86 1 0 2 3 1
200 99 166 201 2 3 1 2 3
0 6 77 119 3 0 0 1 1
Original image (Gray level)
Gray level Intervals :0-63=0, 64-127=1, 128-191=2, 192-255=3
5
Dr.Azmi T.Al-Rawi
University of Anbar\ College Of Computer Science& I.T
Graduate studying (Master)
Lec.6
Sum=A+AT
4 2 1 0
2 4 1 2
1 1 0 2
0 2 2 0
Sum=4+2+1+0+2+4+1+2+1+1+0+2+0+2+2+0=24
Normalization
.167 .083 .042 0
.083 .167 .042 .083
.042 .042 0 .083
0 .083 .083 0
N=.167+.083+.042+0+.083+.167+.042+.083+.042+.042+0+.083+0+
.083+.083+0=1
2- At θ = 45 the movement are
0 0 1 1
0 2 3 1
3 1 2 3
0 0 1 1
A (AT)
1 1 1 0 1 0 0 0
0 0 0 2 1 0 2 1
0 2 0 0 1 0 0 1
0 1 1 0 0 2 0 0
6
Dr.Azmi T.Al-Rawi
University of Anbar\ College Of Computer Science& I.T
Graduate studying (Master)
Lec.6
Sum=19 N=1
Similarity calculation for θ=900, and θ=1350 and compute the features as
shown figure 4.
(d,θ)=(1,00)
Contrast
Input Image
(d,θ)=(1,450) Correlation
Energy Feature
(d,θ)=(1,900) Vector
Entropy
Homogeneity
0
(d,θ)=(1,135 )
7
Dr.Azmi T.Al-Rawi
University of Anbar\ College Of Computer Science& I.T
Graduate studying (Master)
Lec.6
References:
1- Kumar Sahoo, Asit Kumar Subudhi, Using Color and Texture Feature
Extraction Technique to Retrieve Image Santanu, International Journal of
Innovative Technology and Exploring Engineering (IJITEE) ISSN: 2278-3075,
Volume-8, Issue-11S, September 2019.
2-P. Mohanaiah, P. Sathyanarayana, L. GuruKumar, Image Texture Feature
Extraction Using GLCM Approach, International Journal of Scientific and Research
Publications, Volume 3, Issue 5, May 2013 1 ISSN 2250-3153.
3-Laleh Armi1 , Shervan Fekri-Ershad, TEXTURE IMAGE ANALYSIS AND TEXTURE
CLASSIFICATION METHODS - A REVIEW, International Online Journal of Image
Processing and Pattern Recognition Vol. 2, No.1, pp. 1-29, 2019.