Documente Academic
Documente Profesional
Documente Cultură
ORIGINAL ARTICLE
KEYWORDS Abstract The effective content-based image retrieval (CBIR) needs efficient extraction of low level
Content-based image retrie- features like color, texture and shapes for indexing and fast query image matching with indexed
val (CBIR); images for the retrieval of similar images. Features are extracted from images in pixel and com-
Statistical texture features; pressed domains. However, now most of the existing images are in compressed formats like JPEG
Distance metrics; using DCT (discrete cosine transformation). In this paper we study the issues of efficient extraction
Quantized histogram; of features and the effective matching of images in the compressed domain. In our method the
DCT quantized histogram statistical texture features are extracted from the DCT blocks of the image
using the significant energy of the DC and the first three AC coefficients of the blocks. For the effec-
tive matching of the image with images, various distance metrics are used to measure similarities
using texture features. The analysis of the effective CBIR is performed on the basis of various dis-
tance metrics in different number of quantization bins. The proposed method is tested by using
Corel image database and the experimental results show that our method has robust image retrieval
for various distance metrics with different histogram quantization in a compressed domain.
ª 2013 Production and hosting by Elsevier B.V. on behalf of King Saud University.
space and manipulation time, at present almost all images are gle Distance (VCAD) are used and the performance of the
represented in compressed formats like JPEG and MPEG (Liu Manhattan distance is high in terms of precision (Hafner
et al., 2007; Nezamabadi-pour and Saryazdi, 2005). The fea- et al., 1995).
tures of image can be extracted directly from the compressed The features of the image are represented in the feature vec-
domain. To extract the low level features from the compressed tor form which represents the object. For similarity measure-
images, first the images are decoded from the compressed do- ment various methods are used to compare the two feature
main to the pixel domain. After that, image processing and vectors. The comparison methods are classified in two types: dis-
analysis methods are applied to images in the pixel domain. tance metric and similarity measure metric. The distance metric
This process is inefficient because it involves more computa- measures the difference between the two vectors of images and a
tions and increases the processing time (Mandal et al., 1999). small difference means, the two images are mostly similar. The
Therefore features can be extracted from images in the com- similarity measure metric measures the similarity between the
pressed format by using DCT (discrete cosine transformation) two vectors of images and a large similarity means the two
which is a part of the compression process. In compression, images are closely related (Szabolcs, 2008).
DCT transformation removes some information from images In this paper, our main contribution is to show the perfor-
and important information is left behind which can play an mance of the image retrieval by extracting quantized histo-
important role in image retrieval. To get the effective retrieval gram statistical texture features efficiently and matching the
of images using this information, histograms of quantized query image with database images effectively using various
DCT blocks are optimized by selecting a proper quantization distance metrics of the DCT domain. To the best of our
factor and a number of DCT blocks (Zhong and Defee, 2005). knowledge, such a retrieval of images based on the compari-
The low level texture features are extracted from 8 · 8 DCT son of distance metrics using statistical texture features of
transformed blocks using DC and AC coefficients in nine dif- grayscale image quantizing into different number of bins,
ferent directions which represent nine feature vectors and gray- have not been reported in the literature of the DCT domain.
scale level distribution in the image (Bae, 1997). The texture The proposed method is started with the non-overlapping
features in different directions are extracted using YUV color 8 · 8 DCT block transformation of a grayscale image. The
space such that the image is divided into four blocks and only histograms of the DC and the first three AC coefficients
the Y component in each block is transformed in DCT coeffi- are constructed. The statistical texture features like mean,
cients to get vertical, horizontal and diagonal texture features standard deviation, skewness, kurtosis, energy, entropy and
in all blocks for retrieval (Tsai, 2006). smoothness are calculated by using the probability distribu-
The DC and some AC coefficients are used directionally to tion of intensity levels in different quantization bins of histo-
get energy histograms which are represented as feature vectors grams of all the blocks. The computed features are used to
to retrieve similar images. On testing with a medium size data- measure the similarity between the query image and database
base, these features give a high level of performance in terms of images by using various distance metrics. The performance is
retrieval (Jose and Guan, 1999). DC vector is combined with analyzed on the basis of results of various distance metrics in
nine AC coefficients distribution vectors to get the feature vec- different quantization bins in the DCT domain.
tor of the texture features of JPEG format images. AC coeffi- The rest of the paper is organized such that Section 2 presents
cients describe the texture information (Shan and Liu, 2009). the DCT block transformation. Section 3 describes the con-
The statistical texture features are extracted from images in struction and quantization of histograms in the DCT blocks.
compressed domain by computing mean and standard devia- The proposed features and their extractions are elaborated in
tion moments using DCT coefficients. This method has robust- Section 4. Section 5 describes the similarity measurement of var-
ness to translation and rotation (Feng and Jiang, 2003). In the ious distance metrics. Section 6 evaluates and analyzes the per-
JPEG compressed format, the texture features are extracted by formance of distance metrics. Finally, Section 7 concludes this
computing the central moments of the second and third order paper.
using DCT coefficients. These features are used to form a fea-
ture vector to retrieve similar images (Vailaya, 1998). The 2. DCT block transformation
quantized histograms are extracted from DCT coefficients in
Mohamed et al., (2009) such that DC and first three AC coef- In our proposed method, first the input RGB color image is con-
ficients are selected in a zigzag order from transformed 8 · 8 verted into grayscale image as shown in Fig. 1, to reduce the
DCT blocks of JPEG format images and then the histograms computations because it consists of only a single plane while
of these coefficients are constructed with 32 bin quantizations. the RGB image consists of three planes: red, green and blue
These histograms are used as feature vectors for retrieval. This (Schulz, 2007) and each component is a two dimensional matrix
method is tested by using the animal dataset of Corel database. of pixel values from 0 to 256. The extraction of features in these
The histogram statistical Texture-Pattern is constructed three components will be time consuming, for example to extract
using AC coefficients of each DCT block of image and used 32 features in all three components the total features will be
for image retrieval by measuring similarity using v2 distance 32 · 3 = 96 instead of 32 features. Due to this issue the RGB
metric (BAI et al., 2012). The histogram texture features are color image is converted into grayscale which is a single compo-
extracted directly from the DCT coefficients using the vector nent of 0 to 256 pixel values to reduce the computation cost. The
quantization technique (Yun and Runsheng, 2002). grayscale image is divided into simple non-overlapping 8 · 8
To retrieve similar images for the query image from the blocks. Then all these blocks are transformed into DCT blocks
database, the distance metric is used for matching. To measure in the frequency domain. Each block is in a 2-dimensional ma-
the distance for similarity between query and database images trix. The 2-dimensional DCT of a block of the size N · N for
the distance metrics like the Manhattan Distance (L1 metric), i,j = 1,2,. . .. . .. . .. . .,N, can be calculated as:
the Euclidean Distance (L2 metric) and the Vector Cosine An-
Analysis of distance metrics in content-based image retrieval using statistical quantized histogram 209
Input query RGB color image Input RGB color image from the image
collection
3. Histogram quantization
5.2. Sum of squared absolute Difference(SSAD) The value of this method is arranged in ascending order such
that the top most shows high similarity. It has similarity with
city block distance metric. It has good effect on the data which
In this metric the sum of the squared differences of absolute are spread about the origin (Schulz, 2007).
values of the two feature vectors are calculated. This distance
metric can be calculated (Selvarajah and Kodiyuwakku, 2011) 5.6. Maximum value distance
as:
X
n
This distance metric is also called Chebyshev distance. This
Dd ¼ ðjQi j jDi jÞ2 ð17Þ
i¼1
metric is used to get the largest value of the absolute differ-
ences of paired features of feature vectors and can be calcu-
It has some computational complexity due to square of differ- lated (Szabolcs, 2008) as:
ences as compared to SAD. However squaring always gives a
positive value but it highlights a big difference. The distance Dd ¼ maxfjQ1 D1 j; jQ2 D2 j; . . . ; jQn Dn jg ð21Þ
metric SSAD can be used in both pixels and transformed do- The distance value is the maximum of the difference of the fea-
mains but in the transformed domain the calculated value de- tures of the pair of images, which shows the maximum dissim-
pends upon the quality of compression5. ilarity of the two images.
This distance metric is most commonly used for similarity The generalized form of the distance can be defined as:
measurement in image retrieval because of its efficiency and " #1=p
effectiveness. It measures the distance between two vectors of X
n
p
images by calculating the square root of the sum of the squared Dd ¼ ðjQi Di jÞ ð22Þ
i¼1
absolute differences and it can be calculated (Szabolcs, 2008)
as: where p is a positive integer.
This generalized form gives other distance metrics for posi-
tive values of p, for example p = 1 gives the city block and
p = 2 gives the Euclidean distance. In this work on compari-
3
http://en.wikipedia.org/wiki/Sum_of_absolute_differences, last son of distance metrics, we also take p = 3 as the Minkowski
visit on September 18, 2012. distance.
4
http://en.wikipedia.org/wiki/Sum_of_absolute_differences, last
visit on September 18, 2012.
5 6
http://siddhantahuja.wordpress.com/tag/sum-of-squared-differ- http://people.revoledu.com/kardi/tutorial/Similarity/Quantitative-
ences/, last visit on September 18, 2012. Variables.html, last visit on September 18, 2012.
212 F. Malik, B. Baharudin
Figure 5 Average F-Score of the proposed distance metrics using different histogram bins.
Table 7 Average computation time (minutes) of proposed distance metrics for matching of query image with database images.
Distance Metrics 4 Bins 8 Bins 16 Bins 32 Bins Average
Euclidean distance 0.0183 0.0185 0.0186 0.0188 0.0186
City block distance 0.0187 0.0188 0.0190 0.0190 0.0189
Sum of absolute difference (SAD) 0.0187 0.0188 0.0190 0.0193 0.0190
Maximum value distance 0.0187 0.0188 0.0195 0.0192 0.0191
Sum of squared of absolute differences (SSAD) 0.0189 0.0189 0.0192 0.0194 0.0191
Minkowski distance (with p = 3) 0.0190 0.0192 0.0192 0.0193 0.0192
Canberra distance 0.0192 0.0193 0.0194 0.0193 0.0193
Average 0.0188 0.0189 0.0191 0.0192 0.0190
Analysis of distance metrics in content-based image retrieval using statistical quantized histogram 215
Figure 7 Average computation time (minutes) of proposed distance metrics for matching of the query image with database images.
Figure 8 Average computation time (minutes) of the proposed distance metrics for matching of the query image with database images in
different quantization bins.
Table 8 Comparison of proposed method with other methods based on precision, category wise.
Categories Alnihoud Mohamed Murala S. et al. P.B. Thawari et al. P.S. Hiremath, et al. Proposed
J. Liu et A. et al. Mohamed and Thawari and Hiremath and Pujari (2007) method
blank;al., (2007) Vailaya (1998) Khellif (2009) Janwe (2011)
Dinosaurs 100 99 100 90 95 100
Roses 97 N/A 80 N/A 61 96
Horses 85 40 91 N/A 74 93
People 87 N/A 76 50 48 88
Buses 84 N/A 52 50 61 86
Beaches 68 N/A 50 40 34 82
Elephants 50 70 62 N/A 48 79
Buildings 70 N/A 47 35 36 77
Mountains 32 N/A 28 N/A 42 62
Foods 63 N/A 63 N/A 50 60
Average 74 70 65 53 55 82
sum of absolute difference (SAD) are taking less computa- 6.3. Performance analysis of the proposed method
tional cost for similarity measurement of the query image with
database images. The results show that the Euclidean distance The proposed method is compared with the methods of Liu
is not only effective in retrieval but also efficient in computa- et al. (2007), Vailaya (1998), Mohamed and Khellfi. (2009),
tions. Fig. 8 shows that the computation using 32 bins Thawari and Janwe (2011), Hiremath and Pujari (2007) based
quantization takes slightly more time as compared to other on precision as shown in Table 7. In the method of Liu et al.
quantizations but for retrieval performance is better than other (2007) color and shape features are extracted based on SOM
bins.
216 F. Malik, B. Baharudin
Figure 9 Comparison of the proposed method with other methods based on precision, category wise.
Figure 10 Query results of (a) dinosaurs (b) roses (c) people and (d) horses, using histograms of 32 bins and the Euclidean distance for
similarity measurement.
(self-organizing map). Fuzzy Color Histogram (FCH) and blocks are transformed into the DCT domain. The DC and
subtractive fuzzy clustering algorithms are used to get color the first three AC coefficients of each block are picked up in
features and the object model algorithm is used to get an edge zigzag order. These coefficients are used to construct quantized
of objects and then shape features like area, centroid, major histograms of 32 bins. These histograms are used to construct
axis length, minor axis length, eccentricity and orientation a feature vector for retrieval. They have tested their method
which are computed to get performance in terms of average with animal dataset only and get average precision of 70%.
precision of 74%. In method of Vailaya (1998), an image is In method of Mohamed and Khellfi. (2009), color and texture
divided into non-overlapping 8 · 8 blocks and then these features are combined to retrieve similar images. For color,
Analysis of distance metrics in content-based image retrieval using statistical quantized histogram 217
mean and standard deviation are computed in histograms of of seven distance metrics separately using different quantized
32 bins in each channel of the RGB color image, to get totally histogram bins such that the Euclidean distance has better effi-
192 features. For texture features, mean and standard devia- ciency in computation and effective retrieval in 32 bins quan-
tion are computed in sub bands of Gabor Wavelet Transform tization. We conclude that the, Euclidean distance, city block
image with three scales and four orientations to get a feature distance, and sum of absolute difference (SAD) metrics give
vector of 48 features. The performance of this method is mea- good performance in terms of precision using quantized histo-
sured in terms of average precision of 65%. In (Thawari and gram texture features in the DCT domain for compressed
Janwe, 2011) HSV color space is used with three color chan- images. Our method is compared with other methods and
nels H, S and V. Histogram of each channel is quantized into our method has good performance in terms of precision and
96 blocks and each block has a dimension of 32 · 32 pixels. F-Score.
The statistical texture moments like mean standard deviation,
skewness, kurtosis, energy; entropy and smoothness are calcu-
lated in each bin of the histogram. Totally 96 · 7 · 3 = 2016 References
features are computed. Thus this process of feature extraction
Hee-Jung Bae, Sung-Hwan Jung, 1997. Image retrieval using texture
involves a large number of computations which increase com-
based on dct. international conference on information, communi-
putation cost. The method has used 500 images of the Corel
cations and signal processing ICICS 97, Singapore, 9–12.
database for testing. The average precision of the method in BAI, C., et al., 2012. Color Textured Image Retrieval By Combining
Thawari and Janwe (2011) is 53%. In the method of Hire- Texture And Color Features,’’ European Signal Processing Con-
math and Pujari (2007), color, texture and shape features are ference (EUSIPCO-2012), Bucharest: Romania.
fused together and are extracted in a non-overlapping por- Feng, Guocan, Jiang, Jianmin., 2003. JPEG compressed image
tioned image. Texture features are extracted by using Gabor retrieval via statistical features. Pattern Recognit. 36 (4), 977–985.
filter, statistical color moments are used to calculate color fea- Hafner, J., Sawhney, H., Equitz, W., Flickner, M., Niblack, W., 1995.
tures. The shape of objects is extracted by using gradient vec- Efficient color histogram indexing for quadratic form distance
tor flow fields and the shape features are depicted by using functions. IEEE Trans. Pattern Anal. Mach. Int. 17 (7), 729–736.
Hiremath, P.S., Pujari, J., Content 2007. Based Image Retrieval Using
invariant moments. The method is tested by using Corel image
Color, Texture and Shape Features, presented at the Proceedings of
database and overall average precision is 55%.
the 15th International Conference on Advanced Computing and,
In our proposed method we start with the conversion of Communications.
RGB color images into grayscale images to reduce the compu- Kekre, H., Sonawan, K., 2012. Statistical parameters based feature
tational cost. This grayscale image is transformed into non- extraction using bins with polynomial transform of histogram. Int.
overlapping 8 · 8 DCT blocks. The DC and first three AC J. Adv. Eng. Technol. 4 (1), 510–524.
coefficients with significant energy, of each block are picked Jose, A., Lay, Ling Guan, 1999. Image retrieval based on energy
up in zigzag order to construct the histograms. The histograms histograms of the low frequency DCT coefficients. IEEE Interna-
are quantized into different number of bins to calculate statis- tional Conference on Acoustics, Speech, and Signal Processing.
tical texture features of histogram bins. For similarity Proceedings. ICASSP99 (Cat. No.99CH36258) vol. 6 3009–3012.
Liu, Y., Zhang, D., Lu, G., Ma, W., 2007. A survey of content-based
measurement various distances metrics are used. The perfor-
image retrieval with high level semantics. Pattern Recognit. 40 (1),
mance is analyzed on the basis of distance metrics using differ-
262–282.
ent quantized histogram bins. Our proposed method is tested Mandal, M.K., Idris, F., Panchanathan, S., 1999. A critical evaluation
by using the same Corel image database as used by other meth- of image and video indexing techniques in the compressed domain.
ods. The results of our method are effective not only in retrie- Image Vision Comput. 17 (7), 513–529.
val but also in efficiency. The overall average precision of our Aamer Mohamed, F., Khellfi, Ying Weng, Jianmin Jiang, Stan Ipson.
method is 82% which is higher than other methods using 32 2009.An efficient image retrieval through DCT histogram quanti-
bins histograms. Our proposed method has good performance zation. International Conference on CyberWorlds 237–240.
in terms of precision using quantized texture features and the Nezamabadi-pour, Hossein, Saryazdi, Saeid, 2005. Object-based image
Euclidean distance for similarity measurement in the DCT do- indexing and retrieval in DCT domain using clustering techniques.
World Acad. Sci. Eng. Technol., 3–6.
main for compressed images as shown in Table 8 and Fig. 9.
Remco, C., Veltkamp, Mirela Tanase, 2002. content-based image
Fig. 10(a–d) shows the results of user queries. Each figure
retrieval systems: a survey.
consists of a query image and the similar retrieved images from Jan Schulz, Algorithms – Similarity, September 2007,. http://www.co-
the database. The top single image is the query image and be- de10.info/index.php?option=com_content&view=arti-
low nine are the relevant images. The results show that pro- cle&id=49:article_canberra-distance&catid=38:cat_coding_algo-
posed method has good retrieval accuracy. rithms_data-similarity&Itemid=57.
Selvarajah, S., Kodituwakku. S.R., 2011. Analysis and Comparison of
Texture Features for Content Based Image Retrieval. International
7. Conclusion Journal of Latest Trends in Computing (E-ISSN: 2045–5364), vol.
2 (1), 108–113.
In this paper a CBIR method is proposed which is based on Shan, Zhao, Liu, Yan-Xia, 2009. Research on JPEG Image Retrieval.
the performance analysis of various distance metrics using 5th International Conference on Wireless Communications, Net-
working and Mobile. Computing 16 (1), 1–4.
the quantized histogram statistical texture features in the
Suresh, P., Sundaram, R.M.D., Arumugam, A., 2008. Feature
DCT domain. Only the DC and the first three AC coefficients Extraction in Compressed Domain for Content Based Image
having more significant energy are selected in each DCT block Retrieval. IEEE International Conference on Advanced Computer
to get the quantized histogram statistical texture features. The Theory and Engineering (ICACTE), pp. 190–194..
similarity measurement is performed by using seven distance Sergyan Szabolcs, 2008. Color histogram features based image
metrics. The experimental results are analyzed on the basis classification in content-based image retrieval systems. 6th
218 F. Malik, B. Baharudin
International Symposium on Applied Machine Intelligence and Wang, J.Z., Li, J., Wiederhold, G., 2000. SIMPLIcity: Semantics-
Informatics 221–224. Sensitive Integrated Matching Libraries’’. Advances in Visual for
Thawari, P.B., Janwe, N.J., 2011. Cbir based on color and texture. Int. Picture Information Systems: 4th International Conference,
J. Inf. Technol. Knowl. Manage. 4 (1), 129–132. VISUAL 2000, Lyon, France, November 2-4, 2000: Proceedings,
Tienwei Tsai, Yo-Ping Huang, Te-Wei Chiang, 2006. Dominant http://wang.ist.psu.edu/docs/related/.
feature extraction in block-DCT domain. IEEE International Yun, F., Runsheng, W., 2002. An Image retrieval method using DCT
Conference on Systems, Man and Cybernetics 3623–3628. features. J. Comput. Sci. Technol. 17 (6).
Aditya Vailaya, Anil Jain, Hong Jiang Zhang, 1998. On image Zhong, Daidi., Defee, I., 2005. DCT histogram optimization for image
classification: city images vs. Landscapes, In: Pattern Recognition database retrieval. Pattern Recognit. Lett. 26 (14), 2272–2281.
31(12)1921–1935.