Content-Based Image Retrieval Using Gabor Texture Features: Dengsheng Zhang, Aylwin Wong, Maria Indrawan, Guojun Lu
Content-Based Image Retrieval Using Gabor Texture Features: Dengsheng Zhang, Aylwin Wong, Maria Indrawan, Guojun Lu
Dengsheng Zhang, Aylwin Wong, Maria Indrawan, Guojun Lu Gippsland School of Computing and Information Technology Monash University Churchill, Victoria, 3842, Australia Email: {dengsheng.zhang, aylwin.wong, maria.indrawan, guojun.lu}@infotech.monash.edu.au
We demonstrate our retrieval results both for texture images and for natural images. The rest of the paper is organized as follows. Section 2 describes fundamentals of 2-D Gabor filters (wavelets). Section 3 discusses texture representation and retrieval based on the output of Gabor filters. In Section 4, we present experimental results of image retrieval based on Gabor texture features. Section 5 concludes the paper with a discussion.
I ( x s, y t )
s t
* mn
( s, t )
*
where, s and t are the filter mask size variables, and mn is the complex conjugate of mn which is a class of self-similar functions generated from dilation and rotation of the following mother wavelet: (x, y) =
mn(x, y) =
a m ( ~, ~ ) x y
where m and n specify the scale and orientation of the wavelet respectively, with m = 0, 1, M-1, n = 0, 1, , N-1, and
y ,m ,n =
2 tan(
2N
2 Uh 1 ( )2 2 ln 2 2 x ,m ,n
In our implementation, we used the following constants as commonly used in the literature: Ul= 0.05, Uh=0.4, s and t range form 0 to 60, i.e, filter mask size is 60x60.
The texture similarity measurement of a query image Q and a target image T in the database is defined by: D(Q, T) = where
Q T Q T d mn = ( mn mn ) 2 + ( mn mn ) 2
d
m n
mn
(Q, T )
| G
x y
mn
( x, y ) | ,
m = 0, 1, , M-1; n = 0, 1, , N-1 These magnitudes represent the energy content at different scale and orientation of the image. The main purpose of texture-based retrieval is to find images or regions with similar texture. It is assumed that we are interested in images or regions that have homogenous texture, therefore the following mean mn and standard deviation mn of the magnitude of the transformed coefficients are used to represent the homogenous texture feature of the region:
mn =
E (m, n) PQ
mn =
(| G
x y
mn
( x, y ) | mn ) 2
PQ
A feature vector f (texture representation) is created using mn and mn as the feature components [5, 10]. Five scales and 6 orientations are used in common implementation and the feature vector is given by: f = (00 , 00 , 01 , 01 , , 45, 45). Figure 3.1 shows the energy map of the mean feature elements mn for a straw texture image.
Since this similarity measurement is not rotation invariant, similar texture images with different direction may be missed out from the retrieval or get a low rank. For example, images in Fig.1(a) and Fig.1(c) are the same image with different orientation but will have very big distance if the above measurement is applied directly. In [5], rotation invariance was not considered. In [10], feature elements are shifted in all the directions to find the best match between query image and target images. It needs expensive calculation. In this paper we proposed a simple circular shift on the feature map to solve the rotation variant problem associate with Gabor texture features. Specifically, we calculate total energy for each orientation. The orientation with the highest total energy is called the dominant orientation/direction. We then move the feature elements in the dominant direction to be the first elements in f. The other elements are circularly shifted accordingly. For example, if the original feature vector is "abcdef" and "c" is at the dominant direction, then the normalized feature vector will be "cdefab". This normalization method is based on the assumption that to compare similarity between two images/textures they should be rotated so that their dominant directions are the same. We now need to prove that image rotation in spatial domain is equivalent to circular shift of feature vector elements. Assume the original image is I(x, y) with dominant orientation at i/N. I'(x, y) is the rotate version of I(x, y) so that its dominant orientation is at 0. If at a particular scale m, the energy distribution of I(x, y) is (E m,0, E m,1, E m,i, E m,N-1) then the energy distribution of I'(x, y) is (E' m,-i, E' m,1-i, E' m,0, E' m,N-1-i). where E m,0= E' m,-i, E m,1= E' m, 1-i, and so forth. Because E' m,n = E' m,n+N (an image has the same energy distribution after rotating 180o.), we have E' m,-i+N =E' m,-i, E' m,1-i+N = E'm, 1-i, etc. (Negative orientations are added by N). We then have the following energy distribution of I'(x, y): (E'm,-i+N, E'm,1-i+N, E'm,0, E'm,N-1-i).
(a)
(b)
(c)
(d)
Figure 1. (a) a straw image, (b) energy map of (a), (c) rotated image of (a), (d) energy map of (c)
Reorder the above distribution according to orientation values, we have (E' m,0, E' m,1, E' m, N-1-i, E' m, N-i, E' m, N-i+1 E' m,N-1) which is the circular rotation of the original feature vector. This proves that rotation in the spatial domain is equivalent to circular shift of Gabor feature elements. Figure 1 shows two texture images and their feature maps, the second image is a rotation of 90 of the first image. It is shown in the feature maps that image (a) has a dominant direction feature in orientation 2 (60), while in image (b), this dominant direction feature has moved to orientation 5 (150) and features in other directions are circularly shifted accordingly. Compared with rotation invariant methods in [10, 11], our algorithm is simple and intuitive.
4. Experiment results
We have conducted retrieval tests both on texture images and natural images. Figure 2 shows our preliminary results on image retrieval using Gabor texture features. In all the four retrieval results shown, the top left image is the query image and the other images are retrieved images from the image database. The first 25 retrieved images are shown for illustration. The retrieved
images are ranked in decreasing order based on the similarity of their Gabor texture features to those of the query image. Figure 2(a) shows a retrieval result from texture image database which composed of 1,000 different kind of texture images collected from [13]. All the 15 similar textures in the database are retrieved in the first 18 images and there is only one irrelevant image in the first 25 retrieved images. In (b) all the 18 similar textures in the database are retrieved in the first 18 images and the remaining are also relevant. Same textures with different orientations have been ranked most highly, it demonstrates our retrieval algorithm is rotation invariant. Figures 2(c) (d) are conducted on color image database which is composed of 360 different kind of images of flower, landscape, computer generated animation images etc. Figure 2(c) shows the retrieval result for a query using a flower image. The 5 images with same flowers in the database are all retrieved out in the first 24 ranked images. Images with similar flower pattern are also found in the upper rank. The fifth flower image with similar flower pattern to the query image is ranked very low because its background texture is very different from that of the query image. Figure 2(d) is a query using a landscape image. As can be seen, most of the first 25 retrieved images are images with similar landscape to that in the query image. It shows that the proposed method works well for retrieval of images with overall homogeneous texture.
(a)
(b)
(c)
(d)
Reference:
[1] John P. Eakins and Margaret E. Graham. Content-based Image Retrieval: A Report to the JISC Technology Applications Program. http://www.unn.ac.uk/iidr/research/cbir/report.html. [2] H. Tamura, S. Mori, T. Yamawaki. Texture features corresponding to visual perception. IEEE Trans. on Systems, Man and Cybernetics. 6(4):460-473, 1976. [3] W. Niblack et. al. The QBIC Project: Querying Images by Content Using Color, Texture and Shape. Proc. of the Conference Storage and Retrieval for Image and Video Databases, SPIE vol.1908, pp.173-187, 1993 [4] Liu, F and Picard, R W. Periodicity, directionality and randomness: Wold features for image modelling and retrieval IEEE Transactions on Pattern Analysis and Machine Intelligence 18(7):722-733, 1996
[5] B. S. Manjunath and W. Y. Ma. Texture features for browsing and retrieval of large image data IEEE Transactions on Pattern Analysis and Machine Intelligence, (Special Issue on Digital Libraries), Vol. 18 (8), August 1996, pp. 837-842. [6] Kaplan, L M et al. Fast texture database retrieval using extended fractal features in Storage and Retrieval for Image and Video Databases VI (Sethi, I K and Jain, R C, eds), Proc SPIE 3312, 162-173, 1998. [7] John R. Smith. Integrated Spatial and Feature Image System: Retrieval, Analysis and Compression. Ph.D thesis, Columbia University, 1997. [8] Yining Deng. A Region Representation for Image and Video Retrieval. Ph.D thesis, University of California, Santa Barbara, 1999. [9] Wei-Ying Ma. Netra: A Toolbox for Navigating Large Image Databases. Ph.D thesis, University of California, Santa Barbara, 1997. [10] Sylvie Jeannin (ed.), ISO/IEC JTC1/SC29/WG11/N3321: MPEG-7 Visual Part of eXperimentation Model Version 5.0. Nordwijkerhout, March 2000. [11] Alexander Dimai. Rotation Invariant Texture Description using General Moment Invariants and Gabor Filters. In Proc. Of the 11th Scandinavian Conf. on Image Analysis. Vol I. June, 1999, pp.391-398. [12] J. G. Daugman. Uncertainty relation for resolution in space, spatial frequency, and orientation optimized by twodimensional visual cortical filters. Journal of The Optical Society of America:2(7):1160-1169, 1985. [13] http://markov.eee.ntu.edu.sg:8000/~szli