Retrieval of Images Using Dct and Dct Wavelet over Image Blocks

— This paper introduces a new CBIR system based on two different approaches in order to achieve the retrieval efficiency and accuracy. Color and texture information is extracted and used in this work to form the feature vector. To do the texture feature extraction this system uses DCT and DCT Wavelet transform to generate the feature vectors of the query and database images. Color information extraction process includes separation of image into R, G and B planes. Further each plane is divided into 4 blocks and for each block row mean vectors are calculated. DCT and DCT wavelet is applied over row mean vector of each block separately and 4 sets of DCT and DCT wavelet coefficients are obtained respectively. Out of these few coefficients are selected from each block and arranged in consecutive order to form the feature vector of the image. Variable size feature vectors are formed by changing the no of coefficients selected from each row vector. Total 18 different sets are obtained by changing the no of coefficients selected from each block. These two different feature databases obtained using DCT and DCT wavelet are then tested using 100 query images from 10 different categories. Euclidean distance is used as similarity measure to compare the image features. Euclidean distance calculated is sorted into ascending order and cluster of first 100 images is selected to count the images which are relevant to the query image. Results are further refined using second level thresholding which uses three criteria which can be applied to first level results. Results obtained are showing the better performance by DCT wavelet as compare to DCT transform. I. INTRODUCTION Large amount of images are being generated, stored and used daily in various real life applications through various fields like engineering, medical sciences, biometrics, architectural designs and drawings and many other areas. Although various techniques are being designed and used to store the images efficiently, still it demands to search new effective and accurate techniques to retrieve these images easily from large volume of databases. Text based image retrieval techniques have tried in this direction which has got many constraints and drawbacks associated with it which is continuously encouraging the researchers to come up with the new techniques to retrieve the images based on contents instead of text annotations. Image contents are broadly classified into global and local contents. Local contents define the local attributes of …


INTRODUCTION
Large amount of images are being generated, stored and used daily in various real life applications through various fields like engineering, medical sciences, biometrics, architectural designs and drawings and many other areas.Although various techniques are being designed and used to store the images efficiently, still it demands to search new effective and accurate techniques to retrieve these images easily from large volume of databases.Text based image retrieval techniques have tried in this direction which has got many constraints and drawbacks associated with it which is continuously encouraging the researchers to come up with the new techniques to retrieve the images based on contents instead of text annotations.Image contents are broadly classified into global and local contents.Local contents define the local attributes of the image like color, shape and texture information.These attributes can be used and processed to represent the image feature to make them comparable for similarity.Many techniques are being developed in this field to retrieve the images from large volume of database more precisely [1], [2], [3], [11], [12], [13] [32] [33].This paper contributes in same direction by introducing the novel techniques which are giving favorable performance which is analyzed through different aspects of the behavior of the proposed CBIR system.
In this work many variations are introduced which are not used in the previous work in the same direction.We are focusing on color and texture information of image.First we are separating the image into R, G, B planes and then decomposing the image plane into 4 blocks and applying DCT transform over row mean vectors of each block of it to obtain the texture information of the image.The logic behind that DCT is a good approximation of principal component extraction, which helps to process and highlight the signal frequency features [21], [24], [26], [27], [29], [31].Same process is repeated with DCT wavelet transform over row mean vectors of each block of each plane.As Wavelets can be combined, using a "shift, multiply and sum" technique called convolution, with portions of an unknown signal to extract information from the unknown signal.They have advantages over traditional fourier methods in analyzing physical situations where the signal contains discontinuities and sharp spikes [10], [22], [23], [28].This paper is organized as follows.Section II will introduce transforms applied to form the feature vectors.Section III gives the algorithmic flow of the system that explains how to extract the image contents and formation of the feature vector databases [4], [5], [6], [16].Section IV explains the experimental results with performance analysis of the system and Section V delineate the conclusion of the work done.

II. DISCRETE COSINE TRANSFORM -AND DCT WAVELET
Discrete cosine transform is made up of cosine functions taken over half the interval and dividing this interval into N equal parts and sampling each function at the center of these parts [8], the DCT matrix is formed by arranging these sequences row wise.This paper uses DCT transform to generate the feature vectors which is explained in section III.www.ijacsa.thesai.orgWavelets are mathematical functions that cut up the data or signal into different frequency components by providing a way to do a time frequency analysis.Analysis of the signals containing the discontinuities and sharp spikes is possible with help of wavelet transforms [7], [10], [17].Kekre's generalized algorithm which generates the wavelet from any orthogonal transform is used to generate DCT wavelet as DCT is an orthogonal transform [10], [15].To take advantage of this property of wavelet, this paper has proposed a new algorithm to represent the feature vectors in the form of discrete cosine wavelet transform coefficients for the CBIR.
The DCT definition of 2D sequence of Length N is given in equation (1) using which the DCT matrix is generated [15] [24].The generalized algorithm which can generate wavelet transform of size N 2 xN 2 from any orthogonal transform of size NxN is applied to DCT matrix and DCT Wavelet is developed which satisfies the condition of orthogonal transforms given in equation (2).Once the Discrete Cosine Transform Wavelet is generated following steps are followed to form the feature vectors of the images.
Where ( ) Orthogonal: DCT Wavelet transform is said to be orthogonal if the following condition is satisfied.Step2.Divide each plane of image into four blocks B1, B2, B3 and B4 of all equal sizes.[35] Step3.For each block calculate the row mean vectors.Step4.In First approach we Apply Discrete Cosine Transform over all row mean vectors of each block of each plane of the all the database images and DCT feature database is prepared [35].
Similarly, for second approach we applied DCT wavelet over all row mean vectors of all four blocks of each plane of all database images and new DCT Wavelet feature database is prepared for the second approach.
Step5.Representation of feature vectors for both the approaches is explained as follows: Select few DCT and DCT wavelet coefficients from each row vector of all four blocks of each plane and arrange them in single vector in consecutive order.It gives the feature vector of that particular plane.Similar procedure is followed to get the feature vector for all three planes R, G, B. This feature vector consist of four components for each plane for example red plane these components are named as RB1, RB2, RB3 and RB4 where suppose each component has 64 coefficients.Arrangement of these four components in single row vector gives the final feature vector for red plane of size 64 x 4= 256 coefficients.This CBIR system is experimented with various different size feature vectors for both the approaches.Details of how the coefficients are selected are given in following manner.Block 1,2,4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64 Total coefficients in the Final Feature Vector in Feature Database DCT and DCT wavelet 4,8,16,32,48,64,80,96,112,128,144,160,176,192,208,224,240,256 Feature vectors for red, green and blue plane are obtained using above procedure and two feature vector databases are created for all the database images using DCT and DCT wavelet.

No .of Coefficients Selected From Each
Step6.Once the feature databases are prepared system is tested with query image.Feature extraction of query image will be done in same manner as it does for the database images.
Step7.Retrieval results are based on the criterion of sorting the Euclidean distances in ascending order and selecting first 100 images with respect to first 100 minimum distances from 1000 distances sorted in ascending order for all database images.

III. EXPERIMENTAL RESULTS AND DISCUSSIONS
A. Database and Query Image Algorithms discussed above in section III is experimented with database of 1000 images which includes 100 images from each of the following categories; that are Flower, Sunset, Mountain, Building, Bus, Dinosaur, Elephant, Barbie, Mickey and Horse images.Feature vectors for all these 1000 images are extracted using above procedure based on DCT and DCT wavelet transforms.This CBIR system is tested with query by example image.Whenever system receives the query image it extracts the feature vector for it in the same way as it extracts for database images.By means of similarity measure Euclidean distance, it will compare the query with database images for the exact match.Ten queries from each of the 10 classes are given as query to the proposed algorithms and Euclidean distance is calculated for all of them.Sample Images from all classes are shown in Figure .1

B. Retrieval of Similar Images from Database of 1000 Images
Once the Query is entered it is processed as explained above to extract its contents to form the feature vector.As given in step 1 in section III that each image is separated into R, G, and B planes, we are having 3 sets of feature databases for each approach that is features for R plane, G plane and Blue Plane.Query image along with this 3 features R, G and B plane features will be compared with R, G and B plane features of all database images respectively.This gives us the 3 sets of retrieval results with respect to each plane [9], [14], [15], [20].During the experiments of this system some variation are made in the selection of coefficients to form the feature vector.When we work in transform domain to utilize and analyze the energy compaction property of them we have selected the starting few coefficients which are carrying most of the information of the image to represent the feature vector.
Here we have tried different size feature vectors by changing the no of coefficients [36].First we took all coefficients and then we went on reducing their count to reduce the size of the feature vector.Total 18 different sets we tried with the range of feature vector size from 256 to 4 coefficients for each plane and each approach.
One more variation we made in the coefficients is while selecting the first coefficient we have scaled down it to the range of its succeeding coefficients in that list.Because the first coefficient is high energy coefficient as compare to all successive coefficients.Two different scale down factors 10 and 5 are selected to just scale down the first coefficient of each sequence.Based on these two factors, two sets of feature databases are obtained per plane.Total 3x2x18 feature vectors are obtained, 3 planes 2 Scale down Factors and 18 different sizes.In turn 108 x 2 executions are made for both the approaches for 1 query image and 216 results obtained for that query.Like this 100 queries are tried for both the approaches based on DCT and DCT wavelet.Table I shows the average values of 100 query images from 10 different classes.Each value in table is representing the average out of 10,000.
. Criterion 3: Image will be retrieved into final retrieval if it is being retrieved in at least one of the three planes R, G and B.
All Criteria are repeated with 2 factors (10 and 5) for 100 query images.And total 3x2x100 results are obtained for each of the two approaches based on DCT and DCT wavelet.Each value in Table II is representing the average number of similar images retrieved out of 10,000.Observation: Scale down factor 5 gives far better performance as compare to factor 10 and DCWT results are better than DCT.

C. Results and analysis of CBIR using DCT and DCT wavelet.
Proposed algorithm is experimented with 100 queries, 10 images from each category and results are obtained by applying the similarity measure Euclidean distance.Retrieval results of all 18 sets of feature vector of different sizes are obtained for each plane separately along with two scale down factors 10 and 5. Table I is showing the average values for execution of 100 queries for each feature vector set from 18 variations.When we observed these results obtained using the scale down factor 5 are giving best performance in all the sets and for all the planes R, G, and B. It can also be noticed in the chart 1and 2 that performance of factor 5 is having good accuracy as compare to factor 10.
When we observed the these results obtained for each one 18 sets of different size feature vectors for all 3 planes it has been noticed that for first few coefficients sets selection system is performing well.It has been observed that when feature vector size was 16 coefficients for factor 5 and 4 coefficients for factor 10, system has given its best performance as shown in Chart 1 and 2. One more observation made that red plane is proving its best in terms of the average values of retrieval set.To refine the results obtained for 3 planes we have applied the above mentioned 3 criteria and the results obtained are shown in Table II for the both the approaches with reference to both factors 5 and 10.In these results we can notice that criterion 3 is giving best performance among all three sets of results where the image similar to query will be retrieved in final set if it is being retrieved in at least one of three planes.Chart 3, 4, and Chart 5, 6 are displaying the results for all criteria for DCT and DCWT for factor 10 and 5 respectively, where we can notice the behavioral difference of the system for these 3 criteria as mentioned above.

D. Performsance Evaluation of CBIR using DCT and DCT wavelet.
Results obtained in this work using DCT and DCT Wavelet, is indirectly compared with the traditional parameters Precision and Recall.Here when system generates the retrieval result in terms of 1000 Euclidean distances between the given query image and 1000 database images which are sorted in ascending order; out of which first 100 images are selected as retrieval set of similar images which carries images belong to same category of query and even other category images as well [18].When we talk in terms of precision, it is in the range of 30% to 70% for most of the query images.At the same time very good results are obtained for most of the query images for both the approaches in terms of recall parameter which is in the range of 40% to 90 % for many query images.
We compare these results with the other work done using DCT or other wavelets [15], [29], [30], [35].It can be observed and noticed that the database we are using includes images from different classes and each class has got 100 images of its own category which has got images with different background also which has impact on the feature extraction and even on the retrieval process.It still performs better in terms of precision and recall.We have tried 100 query images and the cumulative result which is average of 100 queries is summarized in the above tables.If we consider the result of each query separately in most of the queries can say for 50 % of the queries we have got very good values for precision which is around 0.7 to 0 .8. and at same time for the same query are getting good results in terms of recall which is around 0.6 to 0.7 which can be considered as best results for CBIR system.But at the same time if we have to consider the overall performance of these approaches they should perform well or in same manner for all 100 or more queries which again triggering us to make future improvements.This is explained in brief in the last section after conclusion.www.ijacsa.thesai.orgObservation: DCWT with scale down factor 5 gives better performance under all three criteria.No of images retrieved increases from criterion 1 to criterion 3 www.ijacsa.thesai.orgCBIR system based on DCT and DCWT has been studied through many different aspects of its behavior in this paper.It mainly focuses on application of two transforms DCT and DCWT, their performance analysis and comparative study.This includes many things within it.In both the algorithms each image is divided into 3 planes that mean color information is handled separately to form the feature vectors.As each plane is divided into 4 blocks and transforms are applied to row mean vectors of each block which tells that the texture of the image is taken into consideration while forming the feature vectors.
By changing the size of the feature vectors using 18 different sets computational time complexity is analyzed and it can be defined that computational time can be saved with smaller size feature vectors which are performing better as compared to the larger ones.Along with the different size of feature vectors System's performance is also checked using the scale down factors 10 and 5 which actually stabilizes the high energy of first DCT or DCWT coefficient, brings it into the same range of remaining low energy coefficients.This gives the strong improvement in the retrieval results as shown in chart 1 and 2.
As three planes are handled separately each time 3 results sets are obtained which are further combined using three criteria to prove the best out of it where we can notice that criteria 3 is giving best performance among all 3.
Finally when we compare DCT and DCWT it can be noticed that DCWT is performing better.The best performance is given by DCWT with factor 5 at 16 coefficients as shown in figure 2. If properties of wavelet taken into consideration we can say that all small details of the image can be extracted to form the feature vectors and also maximum computational time can be saved as compare to normal DCT transform.Required multiplications using DCT for N x N blocks are N 2 where DCWT requires only N (2N-1) multiplications which saves considerable computational time of the system and gives better performance as well.
On the basis of comparison of this work with existing systems many places we found our results are better in terms of similarity retrieval and also in terms of computational time required.But as there is scope for further improvement so that these approaches can be used for variable image sizes and along with color and texture shape feature can also be considered for the comparisons and also the overall average precision and recall can further be improved for all 100 or more queries towards the ideal value.

[
DCTW][DCTW] T = [D] (3) III.ALGORITHMIC VIEW OF CBIR USING DCT AND DCT WAVELET In following algorithm step1 to step3 is same for both the approaches of CBIR Step1.Separate the image into R, G and B planes.

Figure 1 .Criterion 1 :Criterion 2 :
Figure 1.Sample Images from 10 different classes Further, to reduce these results obtained in Table-I we have combined the results obtained separately for each plane using following criteria.Criterion 1: Image will take into final retrieval only if it is being reprieved in result set of all 3 planes R, G and B. Criterion 2: Image will be retrieved into final retrieval only if it is being retrieved in at least any 2 of the three planes R, G and B.

Figure 2 .Figure 3 .
Figure 2. Plot for DCT and DCWT Using Scale Down Factor 10 for

Figure 4 .
Figure 4. Plot for All 3 Criteria Using Scale Down Factor 10 for DCWT

TABLE I .
AVERAGE VALUES OF 100 QUERIRES FOR EACH OF THE 18SETS OF VARIABLE COEFFICIENTS.

TABLE II .
AVERAGE VALUES OF 100 QUERIRES FOR EACH OF THE 18SETS OF VARIABLE COEFFICIENTS FOR ALL 3 CRITERIA FOR FACTOR 10

TABLE III .
AVERAGE VALUES OF 100 QUERIRES FOR EACH OF THE 18SETS OF VARIABLE COEFFICIENTS FOR ALL 3 CRITERIA FOR FACTOR 5