Analysis and Comparison of Texture Features For Content Based Image Retrieval
Analysis and Comparison of Texture Features For Content Based Image Retrieval
+
|
|
.
|
\
|
+ = jWx
y x
y x g
y x y x
t
o o o to
2
2
1
exp
2
1
) , (
2
2
2
2
(1)
where W is called the modulation frequency.
Frequency response of Gabor function (x, y), i.e., its 2-D
Fourier transform is given by:
(2)
where
1
) 2 (
=
x u
to o and
1
) 2 (
=
y v
to o
International Journal of Latest Trends in Computing (E-ISSN: 2045-5364) 109
Volume 2, Issue 1, March 2011
After applying Gabor transformation on the image with
different orientation at different scale, the following array of
magnitudes can be obtained:
=
x y
) , ( n) E(m, y x G
mn
(3)
where m = 0, 1, , M-1; n = 0, 1, , N-1
These magnitudes represent the energy content at different
scale and orientation of the image.
In order to identify the homogenous texture, the following
mean and standard deviation of the magnitude of the
transformed coefficients are used to represent the
homogenous texture feature of the region:
Q P
n) E(m,
mn
= (4)
Q P
) y) (x, G (
2
mn
x y
mn
mn
=
o (5)
where P and Q are the image sizes.
A feature vector f (texture representation) is created using
mn
and
mn
o as the feature components [12]. Five scales
and six orientations are used in common implementation and
the feature vector is given by:
) , ,......., , , , ( f
45 45 01 01 00 00
= . (6)
(b) 2-D wavelet transforms
Region-based image retrieval was proposed to extend
content-based image retrieval so that it can cope with the
cases in which users want to retrieve images based on
information about their regions. The region-based systems
which use wavelet transform are classified into three
categories: a hierarchical block, a moving window and a
pixel. Since these methods are subject to some limitations,
several improvements have been proposed. The method
proposed in [11] segments an image into some regions by
clustering pixels. Then the texture features are calculated
from wavelet coefficients of all regions (subbands). The
segmented regions are indexed by the averaged features in
the regions.
After decomposing the image into non-overlapping sub
subbands as shown in Figure 1, the mean and standard
deviation of the decomposed image portions are calculated.
These mean and standard deviation are treated as the texture
features for image comparison.
Figure 1: Wavelet decomposition of an image.
2.1.2 Statistical Methods
Among the statistical features the following first-order
statistics and second-order statistics are used as texture
features in representing images.
(a) First-order statistics
First-order texture measures are calculated from the original
image values. They do not consider the relationships with
neighborhood pixel. Histogram-based approach to texture
analysis is based on the intensity value concentrations on all
or part of an image represented as a histogram. Features
derived from this approach include moments such as mean,
standard deviation, average energy, entropy, skewness and
kurtosis [10]. The histogram of intensity levels is a simple
summary of the statistical information of the image and
individual pixels are used to calculate the gray-level
histogram. Therefore, the histogram contains the first-order
statistical information about the image (or sub image). These
statistics are defined by the following equations.
N M
y x I
mean
M
x
N
y
i
i
=
= = 1 1
) , (
) ( (7)
N M
y x I
viation Sandard De
M
x
N
y
i
i
=
= =
2
1 1
) ) , ( (
) (
o
(8)
MN
e Energy
i
1
) ( =
= =
M
x
N
y
i
y x I
1 1
2
) , (
(9)
MN
Entropy
i
1
=
)) , ( ln ( ) , (
1 1
y x I y x I
i
M
x
N
y
i
= =
(10)
2
3
1 1
) ) , ( (
o
=
= =
N M
y x I
Skewness
M
x
N
y
i
(11)
3
) ) , ( (
) (
4
4
1 1
=
= =
o
N M
y x I
k Kurtosis
M
x
N
y
i
(12)
(b) Autocorrelation function
An autocorrelation function measures the linear spatial
relationships between spatial sizes of texture primitives.
Autocorrelation-based approach to texture analysis is based
on the intensity value concentrations on all or part of an
image represented as a feature vector. Calculation of the
autocorrelation matrix involves individual pixels.
The set of autocorrelation coefficients are defined by the
following function.
(13)
j) (i, f q) - N ( p) - (M
q) j p, j)f(i f(i, MN
q) (p, C
M
1 i
N
1 j
2
p - M
1 i
q - N
1 j
ff
= =
= =
+ +
=
where p and q are the positional difference in the i
th
j
th
direction, and M and N are image dimensions.
International Journal of Latest Trends in Computing (E-ISSN: 2045-5364) 110
Volume 2, Issue 1, March 2011
(c) Run length matrices
Another method characterizes texture images based on run-
lengths of image gray levels. Galloway [13], Chu et. al. [14]
and Dasarathy and Holder [15] introduced different run-
length matrices as feature representatives. For a given image,
a run-length matrix
j) i, ( p
is defined as the number of runs
with pixels of gray level i and run-length j. Let M be the
number of gray levels and N be the maximum run length.
Then following three matrices define the traditional run-
length features.
1) Gray Level Run-Length Pixel Number Matrix:
j . j) p(i, j) (i, P
p
=
Each element of the matrix represents the number of pixels of
run-length j and gray level i.
2) Gray-Level Run-Number Vector:
=
=
N
1 j
g
j) p(i, (i) P
This vector represents the sum distribution of the number of
runs with gray level i.
3) Run-Length Run-Number Vector:
=
=
M
1 i
r
j) p(i, (j) P
This vector represents the sum distribution of the number of
runs with run length j.
Galloway [13] introduced five original features of run-length
statistics as defined as follows.
(14)
j
(j) p
n
1
j
j) p(i,
n
1
2
r
N
1 j r
M
1 i
2
N
1 j r
=
= =
=
= SRE) Emphasis ( Short Run
(15) .j (j) p
n
1
j . j) p(i,
n
1
N
1 j
2
r
r
M
1 i
N
1 j
2
r
=
= =
=
= RE) mphasis (L Long Run E
=
= =
=
=
M
1 i
2
g
r
M
1 i
N
1 j
2
r
(i) p
n
1
) j) p(i, (
n
1
mity( GLN) Nonunifor Gray-Level
(16)
p
r
n
n
= tage (RP) Run Percen
(17)
where
r
n
is the total number of runs and
p
n
is the number
of pixels in the image.
Chu et al [14] proposed the following two features.
2
g
M
1 i
r
M
1 i
2
N
1 j
r
i
(i) p
n
1
i
j) p(i,
n
1
=
= =
=
= GRE) mphasis( L evel Run E Low Gray-L
(18)
(19) .i (j) p
n
1
i . j) p(i,
n
1
M
1 i
2
r
r
M
1 i
N
1 j
2
r
=
= =
=
=
HGRE) Emphasis ( Level Run High Gray-
Dasarathy and Holder [15] introduced the following features
using the joint statistical measure of gray level and run-
length.
(20)
j . i
j) p(i,
n
1
M
1 i
2 2
N
1 j r
= =
=
) sis (SRLGE evel Empha Low Gray-L Short Run
= =
=
M
1 i
2
2
N
1 j
r j
.i j) p(i,
n
1
E) asis ( SRHG Level Emph High Gray- Short Run
(21)
(22)
.j j) p(i,
n
1
M
1 i
2
2 N
1 j r
= =
=
i
is (LRLGE) vel Emphas ow Gray-Le Long Run L
= =
=
M
1 i
N
1 j
2 2
r
.j .i j) p(i,
n
1
) sis ( LRHGE evel Empha igh Gray-L Long Run H
(23)
(d) Second-order statistics
The gray-level co-occurrence matrix (GLCM) or gray-level
spatial dependence matrix based calculations fall under the
category of second-order statistics. Haralick et. al. [16]
suggested a set of 14 textual features which can be extracted
from the co-occurrence matrix, and which contain
information about image textural characteristics such as
homogeneity, contrast and entropy.
A gray level co-occurrence matrix (GLCM) contains
information about the positions of pixels having similar gray
level values. It is a two-dimensional array, P, in which both
the rows and the columns represent a set of possible image
values. A GLCM Pd [i, j] is defined by first specifying a
displacement vector d = (dx, dy) and counting all pairs of
pixels separated by d having gray levels i and j.
ij d
n j] i, [ P =
, where
ij
n
is the number of occurrences of the
pixel values (i, j) lying at distance d in the image.
The co-occurrence matrix
d
P
has dimension n x n, where n is
the number of gray levels in the image. From this co-
occurrence matrix
d
P
we can derive the following statistics
as texture features.
International Journal of Latest Trends in Computing (E-ISSN: 2045-5364) 111
Volume 2, Issue 1, March 2011
=
=
n
1 j i
2
d
j) - i ( P Contrast
(24)
Contrast returns a measure of the intensity contrast between a
pixel and its neighbor over the whole image.
=
=
n
1 j i
d
j - i P ity Dissimilar
(25)
=
+
=
n
1 j i
d
j - i 1
P
y Homogeneit
(26)
Homogeneity returns a value that measures the closeness of
the distribution of elements in the GLCM to the GLCM
diagonal.
=
=
n
1 j i
2
d
P (Energy) ASM
(27)
ASM returns the sum of squared elements in the GLCM.
) P -ln ( P Entropy
d
n
1 j i
d
=
=
(28)
Entropy is a measure of information content. It measures the
randomness of intensity distribution.
=
=
=
=
=
) P ( j
) P ( i
mean
d
n
1 j i
j
d
n
1 j i
i
GLCM
(29)
=
=
=
=
=
1/2 2
j d
n
1 j i
j
1/2 2
i d
n
1 j i
) ) (j P (
) ) (i P (
i
=
(31)
GLCM correlation returns a measure of how correlated a
pixel is to its neighbor over the whole image. Correlation is 1
or -1 for a perfectly positively or negatively correlated image.
2.2.3 Similarity measurements
Eight similarity measurements have been proposed [9]. In
this work, we use fixed threshold, Sum-of-Squared-
Differences (SSD) and sum-of-Absolute Differences (SAD)
methods.
( ) | | | | ( )
2
1
,
=
=
n
o i
t q t q
i f i f f f SSD
(32)
( ) | | | | ( )
=
=
1
1 ,
n
o i
t q t q
i f i f f f SAD
(33)
Where
t q
f f
represent query feature vector, and database
feature vectors and n is the number of features in each vector.
2.2 Methodology
Since the spatial distribution of gray values defines the
qualities of texture, we use the gray-scale model for our
experiments. In order to evaluate the efficiency of the texture
features, we use 29 features defined in the previous section.
Fixed threshold, sum-of-squared-difference (SSD) and sum-
of-absolute-difference (SAD) are used to measure the
similarity between query image and the database images. The
Brodatz image database that contains 800 purely periodic and
homogeneous images is used for the retrieval.
The images are stored in GIF format and for each image
texture features have been computed and stored in a
database. The database images are subjected to histogram
equalization to prevent bias towards images processing
similar grey levels. The histogram based features such as
mean, standard deviation, energy etc are computed for
images in the database and the computed values are stored in
a database. The absolute difference of the feature vector
values of the query image and database images are also
calculated. After that, in order to identify the relevant images,
fixed threshold, SAD and SSD are used. In case of fixed
threshold, the threshold values are computed for different
query images and from the observation of the relevant
retrieved images. The best threshold value is chosen as the
threshold of that particular texture feature.
The same procedure that is used for first-order statistics is
used for autocorrelation based approach as well as the run-
length matrix approach. In the autocorrelation based
approach, 100 features are undertaken for analysis. Total of
eleven features are used for run-length matrix approach.
In calculating the GLCM, we defined an array of offsets that
specify four directions (horizontal, vertical, and two
diagonals) and one distance. In this case, the input image is
represented by four GLCMs. First the statistics from these
four GLCMs are calculated and then the average of those
four GLCMs is taken. The features such as contrast,
homogeneity, correlation etc are computed for database
images and the computed values are stored in a database. The
SAD and SSD methods are used to measure the similarity.
After retrieving images based on individual texture features,
combinations of such features are also considered. In
comparing the combination of image features, sum-of-
Absolute Differences (SAD) similarity measurement is used.
The procedure used for statistical feature extraction was
applied for structural feature extraction as well. After
retrieving images based on individual texture features,
combinations of such features are also considered. In
comparing the combination of image features, sum-of-
Absolute Differences (SAD) similarity measurement is used.
International Journal of Latest Trends in Computing (E-ISSN: 2045-5364) 112
Volume 2, Issue 1, March 2011
3. Results and Discussion
The texture features mentioned earlier were used to retrieve
image and to compare the performance of individual and
combined texture features. In this experiment, the top 50
images were chosen as the retrieval results. Some of the test
results for individual texture features mentioned under
statistical features are shown in Figures 1, 2 and 3. Test
results for Wavelet and Gabor transformations are shown in
Figures 4 and 5 respectively. The first image of these
resultant images is the query images. The results for
combinations of features are given in Table 1.
Combined Feature
Average
Precision
First Order Statistics(FS) 0.3400
Autocorrelation (AC) 0.4200
Gray Level Run Length
Matrices(GLRLM)
0.4000
Gray Level Co occurrence
Matrix(GLCM)
0.4400
FS+AC 0.5200
FS+AC+GLRLM 0.6000
FS+AC+GLCM 0.7500
FS+GLRLM 0.5200
FS+GLRLM+GLCM 0.6500
FS+GLCM 0.6600
AC+GLRLM 0.5600
AC+GLCM 0.6800
AC+GLRLM+GLCM 0.8000
GLRLM+GLCM 0.7400
FS+AC+GLCM+GLRLM 0.8100
Gabor Transform 0.7600
2 D wavelet Transform 0.7400
Combination of all features 0.7800
Figure 1: First 50 retrieved images for the feature
mean.
Figure 2: First 50 retrieved images for the feature
Energy.
Figure 5: First 50 images retrieved for the feature 2-DWT.
Figure 3: First 50 retrieved images for the
feature GLCM.
Figure 4: First 50 retrieved images for the feature Gabor
Features.
Table 1: An average retrieval accuracy of
combined texture features
International Journal of Latest Trends in Computing (E-ISSN: 2045-5364) 113
Volume 2, Issue 1, March 2011
4. Conclusions
An experimental comparison of a number of different texture
features for content-based image retrieval was carried out.
The First-order statistics, second-order statistics, Gabor
transform and 2D Wavelet transforms were considered for
retrieval. The retrieval efficiency of the texture features was
investigated by means of relevance. According to the results
obtained it is difficult to claim that any individual feature is
superior to others. The performance depends on the spatial
distribution of images. The test results indicated that Gray
Level Co occurrence Matrix performs well compared to other
features when images are homogeneous. In most of the image
categories, Autocorrelation feature also shows similar
performance. It is also noted that the structural texture
features are more effective than the statistical texture
features. In case of combination features, combinations
recorded better retrieval rate compared to the performances
of those individual texture features.
5. Reference
[1]. Chang S.K., and Hsu A. (1992), Image information
systems: where do we go from here? IEEE Trans.
On Knowledge and Data Engineering, Vol. 5, No. 5,
pp. 431-442.
[2]. Tamura, H. and Yokoya N. (1984), Image database
systems: A survey, Pattern Recognition, Vol. 17,
No. 1, pp. 29-43.
[3]. Zachary J. M., Jr. and Sitharama S. I. Content Based
Image Retrieval Systems, Journal of the American
Society for Information Science and Technology,
2001.
[4]. Goodrum A. A. (2000), Image Information
Retrieval: An overview of Current Research.
[5]. Smulders A.M.W., Worring M., Santini, A. S.,
Gupta, and R. Jain (2000), Content-based image
retrieval at the end of the early years, IEEE
Transaction on Pattern Analysis and Machine
Intelligence, Vol.22, No. 12, pp. 1349-1380.
[6]. Faloutsos C., Barber R., Flickner M., Hafner J.,
Niblack W., Petkovic D.and Equitz W. (1994),
Efficient and effective querying by image content,
Journal of intelligent information systems, Vol.3,
pp.231-262.
[7]. Fuhui L., Hongjiang Z. and David D. F. (2003),
Multimedia Information retrieval and Management.
[8]. Rui Y. and Huang T. S (1997), Image retrieval:
Past, Present, and Future, Journal of Visual
Communication and Image Representation.
[9]. Huang J., Kumar S. R., Mitra M., Wei-Jing Z., and
Zabih R. (1997), Image indexing using color
correlograms. In IEEE Conference on Computer
Vision and Pattern Recognition, pages 762--768.
[10]. Brenard J., (2005), Digital Image Processing,
Springer-Verlag Berlin, germany. Nobuo Suematsu,
Yoshihiro Ishida, Akira Hayashi and Toshihiko
Kanbara, Region-Based Image Retrieval using
Wavelet Transform.
[12]. Dengsheng Zhang, Aylwin Wong, Maria Indrawan,
Guojun Lu, Content-based Image Retrieval Using
Gabor Texture Features.
[13]. Galloway M. M. (1975), Texture analysis using gray
level run lengths, Computer Graphics and Image
Processing, Volume 4(2), Pages 172-179
[14]. Chu A., Sehgal C.M.A. and Greenleaf J.F., (1990),
Use of gray value distribution of run lengths for
texture analysis, Pattern Recognition Letters,
Volume 11(6), Pages 415-419
[15]. Belur V. Dasarathy and Edwin B. Holder, Image
characterizations based on joint gray levelrun
length distributions. (1981), Pattern Recognition
Letters, Volume 12 (, Issue 8, August 1991, Pages
497-502
[16]. Haralick R. M., Shanmugum K. and Dinstein I.
(1973), Texture features for image classicification,
IEEE Transactions on System, Man and.
Cybernetics, SMC-3(6), Brodatz Textures: A
photographic Album for Artists & Designers, New
York: Dover, 1966.
Author Biographies
Saluka Ranasinghe Kodituwakku is an associate professor
at the Statistics and Computer Science Department,
University of Peradeniya, Sri Lanka. His research interests
are database systems, distributed computing and software
engineering.
S. Selvarajah is a lecturer at the Department of Physical
Science, Vavuniya Campus of the University of Jaffna,
Vavuniya, Sri Lanka and a Mphil student at the Postgraduate
Instituteof Science, university of Peradeniya, Sri Lanka.