Вы находитесь на странице: 1из 8

Dr.Azmi T.

Al-Rawi
University of Anbar\ College Of Computer Science& I.T
Graduate studying (Master)
Lec.6

Texture Features for Digital Images


The texture presents internal data value of images; texture feature is like
surface pattern of the image. This describes properties of all the surfaces
that has been used to represent all the visual patterns and each of them
having the same similarity.
The texture gives us information on the structural arrangement of surface
and object on the image. Texture characterized by the basic primitives
whose spatial distribution creates some visual pattern defined in term of
granularity, directionality and repetitiveness.
Texture method: Statistical approach
First order: texture measures are statistics calculated from the original
image values, like variance, and do not consider pixel neighbor
relationships.
Second order: texture measures consider the relationship between groups
of two pixels in the original images.
Third and higher order: texture measures consider the relationship
among three or more of the original images.
The Gray Level Co-occurrence Matrix (GLCM):
GLCM method is a way of extracting second order statistical texture
features.
Gray Level Co-Occurrence Matrix (GLCM) has proved to be a popular
statistical method of extracting textural feature from images.
The co-occurrence matrix is defined as frequency matrix of pair of pixels
of certain intensity levels with respect to one another, based on the

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.

1350(-d,-d) 900(-d,0) 450(-d, d)

00(0, d)

Figure 1: Four different directions with displacement 3 between two


pixels
Given an. Image I, of size N×N, the co-occurrence, matrix P can be
defined as:
𝟏 𝒊𝒇 𝑰(𝒙, 𝒚) = 𝒊, 𝒂𝒏𝒅 (𝒙 + 𝒅𝒙, 𝒚 + 𝒅𝒚) = 𝒋
Pij=∑𝑵𝒓−𝟏 𝑵𝒓−𝟏
𝒙=𝟎 ∑𝒚=𝟎 { }…..(1)
𝟎 𝒐𝒕𝒉𝒆𝒓 𝒘𝒊𝒔𝒆

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)
𝝈𝒊𝝈𝒋

Energy: It measures the uniformity of an image, In other words The


energy is used for measuring the sum of all squared elements in GLCM.
Energy=∑𝒊 ∑𝒋 𝑷𝒊𝒋^𝟐 …………………………(4)
Homogeneity: Measures the local homogeneity of an image.
𝑷𝒊𝒋
Homogeneity=∑𝒊 ∑𝒋 …………………(5)
𝟏+|𝒊−𝒋|

Entropy: measures the randomness of intensity distribution, low values


for smooth images than for a coarse image.
Entropy=-∑𝒊 ∑𝒋 𝑷𝒊𝒋 𝒍𝒐𝒈𝑷𝒊𝒋 ...………………(6)
the 𝑝ij is the normalized co-occurrence matrix and 𝜇i quantity is an average
that is calculated along rows of matrixes 𝐺 and 𝜇j is the average that is
calculated along the columns. Similarly, 𝜎𝑖and 𝜎𝑗 are standard deviations
which are calculated along rows and columns.
3
Dr.Azmi T.Al-Rawi
University of Anbar\ College Of Computer Science& I.T
Graduate studying (Master)
Lec.6
Steps of Application: As shown in figure 2

Color Image

Convert to Gray scale

Gray Scale
Image
Resize to (NxN)
Resize image to
(256 or 128 or
64)

Gray Level
GLCM
Co-occurrence Matrix
Matrix
(8x8)

Texture Features statistics

Contrast, correlation, Energy,


Entropy, etc...

Figure 2: Extraction of image features.

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

1- At θ = 0 the movement are


( A) Transport A(AT)
2 2 1 0 2 0 0 0
0 2 1 0 2 2 0 2
0 0 0 2 1 1 0 0
0 2 0 0 0 0 2 0

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= A+AT Normalization


2 1 1 0 .105 .053 .053 0
1 0 2 3 .053 0 .105 .158
1 2 0 1 .053 .105 0 .053
1 3 1 0 .053 .158 .053 0

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 )

Figure 4: Features Co-occurrences Matrix.

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.

Вам также может понравиться