IMAGE RETRIEVAL USING MODIFIED BLOCK TRUNCATION CODING FEATURE

: With the advent of digital camera, improvement in the digital storage media and rapid development in internet provide a huge collection of images. Fast and accurate image retrieval from this huge collection of image database is a challenging task. This is possible only by combining the image retrieval mechanism along with image compression technique. Content Based Image Retrieval (CBIR) uses the visual information in the images to retrieve the similar images. In this paper, image feature descriptor from the compressed stream of image data is extracted where the images are compressed using a variant of Block Truncation Coding (BTC) named Dot Diffused Block Truncation Coding (DDBTC). Here the Colour Histogram Feature (CHF) and the Bit Pattern Features (BPF) are extracted and used to represent the image and similarity computation.


I. INTRODUCTION
Content Based Image Retrieval (CBIR) has achieved much attention in the last two decades due to its application in the various fields like medical, education, remote sense images, entertainment and social media. The CBIR utilize the visual contents like colour, texture and shape of the image to search and retrieve images rather than keywords, tags and descriptions associated with the image. The effectiveness of the CBIR depends on feature extraction which is a prominent step in the CBIR [1]. A visual content descriptor can be global or local. A Global descriptor uses the visual feature in the entire image where as the local descriptor uses the visual features of regions or objects to represent the image.
Block Truncation Coding (BTC) was initially used in Content Based Image Retrieval by Guoping Qiu [2]. From the BTC compressed stream of data image content descriptor features are extracted and used to compute similarity measures of images for content based image retrieval. The advantage of this method is that it achieves coding and retrieval simultaneously. The CBIR system which extracts an image feature descriptor from the compressed domain has become an important issue. Since all the images are recorded in the storage device in compressed format for reducing the storage space requirement. Here, the feature extractor simply generates an image feature for the CBIR from the compressed data stream without the decoding process [3].
In1979, Delp and Mitchell introduced the Block Truncation Coding (BTC), which is a technique for image compression [4]. BTC is a simple, fast and lossy moment preserving quantization method for compressing digital gray level images. Using BTC algorithm original image is divided into multiple non-overlapped image blocks, and each block is represented by two distinct extreme quantizers, high and low mean values and the bit map image. After dividing the image into nonoverlapped blocks, the blocks are coded individually. The levels of each block are chosen such that the first two sample moments are preserved. To improve the quality of reconstructed image and to achieve better compression ratio a number of studies have been conducted on BTC based algorithms during the last many years. In this paper an improved block truncation coding called Dot Diffused BTC (DDBTC) proposed by Guo and Liu is used to avoid the blocking effect and at the same to time to achieve better processing efficiency by utilizing the innate parallelism advantage of dot diffusion [5].

II. RELATED WORK
Content Based Image Retrieval (CBIR) provides an easy way for user to search a digital image from a huge database. In CBIR system an image is given as the query and a set of similar images to the query are returned to meet the user preference in terms of image content, colour, texture similarity and edge pattern. Numerous researchers have made an attempt to solve automatic image retrieval and improve the accuracy of the CBIR system. Researchers developed methods for dealing with feature descriptor extracted from the original image [6,7,8,9,10], wavelet transformed domain [11,12,13,14,15,16]or compressed data stream [2,17,18,19,20,21].
The CBIR system which extracts the image features descriptor from the compressed stream of data has become an important issue. Since most of the images are recorded in the storage device in compressed format for reducing the storage space requirement. BTC compression mechanisms are used in wide range of application where efficient compression and fast transmission is needed. The high processing speed of BTC mechanism is used in compression of satellite images. Several variants of BTC algorithms have been implemented because of its ease of implementation and minimum use of working storage space [22] [23]. All these variants of BTC show improved results in the compression efficiency as well as in the visual quality of the reconstructed image.
Earlier methods which combine image compression in image retrieval extract features from a BTC encoded image in RGB colour space [2] [17]. Image retrieval based on BTC and Vector Quantization (VQ) further improved the retrieval performance by extracting the image feature in YCbCr colour space [18]. BTC compression techniques provides an effective and improved way to retrieve similar set of images for CBIR applications along with image compression capability.
Performance and efficiency of a CBIR system can be improved by combining the image compression techniques in image retrieval. Many works have been reported utilizing the BTC compression in CBIR. Features are extracted from images that are compressed using variants of traditional BTC. Such methods provide superior results in the case of average precision as well as recall rate compared to the existing retrieval system. Experimental results show the significant improvement in the retrieval performance of the systems utilizing the low computational complexity of BTC compared to the other retrieval systems.
CBIR system proposed in [24] makes use of multi factors correlation; three different feature descriptors such as SEC (structure element correlation), GVC (gradient value correlation) and GDC (gradient direction correlation) to describe the image. Utilizing Block truncation coding, colour image is converted into a bitmap image and mean colour component image. Image features are extracted using the three correlations proposed. Structure of the bitmap and the correlation of blocks are described by the structure element correlation (SEC). The other correlations, gradient value correlation (GVC) and gradient direction correlation (GDC) operates with the mean colour component image to extract the gradient relation. It has been experimentally shown that image feature vectors formed by these correlation features can effectively represent an image and provides better performance in image retrieval.
CBIR using Error diffusion BTC proposed in [25] make use of features that are extracted from two colour quantizers and a bitmap image constructed using EDBTC. Error diffusion strategy diffuses the error in the current pixels to nearby pixels with the help of a kernel, and thus, it removes the false contour problem and blocking effect in the traditional BTC mechanism. LBG-VQ vector quantization mechanism is used to generate the code book for two features, CHF (colour histogram feature) and BHF (bit pattern histogram feature). The distance between query image and the target database images are calculated using CHF and BHF values, and is used for similarity assessment.
Guo and Prasetyo [3] used a variant of BTC, namely ODBTC in the image retrieval system. This method exploits the advantage of low complexity ordered-dither BTC for extracting image content descriptor. Here the processing time is reduced by taking minimum and maximum values in each block, instead of calculating the low and high mean value. Images features such as CCF(Colour Co-occurrence Feature) and BPF(Bit Pattern Feature) are extracted from the quantizer image and bitmap image formed using ODBTC compression, respectively. Image features are indexed and histogram features are extracted with the help of codebook generated using LBG vector quantization technique. Later, the similarity measure between query image and target image is calculated, which is the distance between CCF and BPF features.
In this work, a variant of BTC, namely Dot-Diffused Block Truncation Coding (DDBTC) [26] is used for image retrieval. Two quantizer images are extracted from the original image corresponding to the minimum and maximum colour information. DDBTC coding on a given image produces a bitmap image which provides edge details in an image. CHF and BPF features are extracted out of these two quantizer images and bitmap image respectively. Image reconstructed using DDBTC is more acceptable for human vision compared to the traditional BTC result. Thus, extracting the image feature from DDBTC compressed data stream offer a better performance compared to the classical BTC stream in the image retrieval application. Experimental results show that the CBIR using DDBTC is superior compared to the former existing schemes. Thus, it proves that the CHF and BPF can be a powerful tool for performing image retrieval.

III. DDBTC FOR COLOUR IMAGE
This section describes a CBIR system that uses a variant of BTC namely Dot-Diffused Block Truncation Coding or DDBTC. Dot-diffusion based block truncation coding was proposed by Guo and Liu [27] in 2010 to reduce the drawbacks of traditional BTC. This work uses DDBTC to generate the bitmap images to extract the edge information. In this work, CBIR system is divided into three modules namely DDBTC encoding module, feature extraction module, similarity assessment and image retrieval module.
Here retrieval of images is done in two stages. In the offline stage, images in the database are encoded using DDBTC and bitmap images are created. Bit Pattern Features (BPF) are extracted from these bitmap images which denotes the edge information of an image. A minimum and maximum quantizer images are constructed from the original image, and Colour Histogram Feature (CHF) is extracted out of these quantizer images which depicts the colour information contents of an image. In the on-line phase, CHF and BPF features are extracted from the query image entered by the user, in a way similar to the extraction of features from the target image. These query features are compared against the image features stored in the database using various similarity assessment metrics. Most relevant images are given as output to the user after ranking the images based on matching score.
In this work, DDBTC method is used in image retrieval system in order to extract feature descriptor that discriminate images. The DDBTC divides a given image into multiple nonoverlapped image blocks, and each block is processed independently. As opposed to most of the variants of the Block Truncation Coding schemes, the DDBTC is a powerful replacement for the typical BTC, since the image quality is considerably improved along with a similar processing efficiency.

A. DDBTC Encoding
DDBTC is a variant of traditional BTC and was proposed to overcome the major limitations of BTC. A bitmap is generated using DDBTC method which gives the edge information in that image. The DDBTC method diffuses the quantization error calculated for the currently processed pixel into its neighbouring pixels, to generate the bitmap by using diffused matrix and class matrix. The minimum and the maximum values in an image block is considered as the two representative quantization levels for DDBTC. Experimental results exhibit improved image quality for the reconstructed image using DDBTC compared to the reconstructed image using traditional BTC [5].
In the DDBTC encoding process, a colour image of size M × N is divided into several non-overlapping image blocks of size m × n in each of the Red, Green and Blue (RGB) plane. Each image block can be processed independently. Figure 1 shows the schematic diagram of the DDBTC encoding scheme for the colour image. For each image block, the DDBTC encoder generates two extreme quantizers with minimum and maximum values in each block. These minimum and maximum quantizers have the RGB colour information for each image block.
DDBTC or dot-diffused BTC was implemented by co-operating the dot diffusion mechanism [28] in traditional BTC. DDBTC schemes use a class matrix to determine the pixel processing order. The concept of the class matrix for ordering the pixel processing was proposed by Knuth [29]. Later in 2000, Mese and Vaidyanathan [28] proposed optimized class matrix. The class matrix used in this work was proposed by Guo and Liu [5] in 2014. The class matrix indices represent the processing order in which the smaller value of class matrix indicates a higher processing priority. For example, if a class matrix of size 4 x 4 is adopted, the original image is required to be divided into multiple non-overlapped blocks of size 4 x 4 as identical to the size of class matrix. Each divided image block is processed using the identical class matrix, in which all pixels associated with the index 0 in the class matrix are firstly processed.

B. Feature Extraction
The feature extraction strategy for the DDBTC compressed data stream is presented in this section. Firstly, an image is encoded using DDBTC to obtain the two representative quantizers and its corresponding bitmap image. An image feature descriptor depicting the image content is then constructed from these two DDBTC quantizers and its bitmap image. Two features are employed in this method to characterize the image content, namely Colour Histogram Feature (CHF) and Bit Pattern Feature (BPF). The CHF is obtained from the two colour quantizers (maximum and minimum quantizers), and the BPF is created from the DDBTC bitmap image.

Colour Histogram Feature
The colour distribution of DDBTC colour quantizers can efficiently describe the image content and its corresponding contrast. The Colour Histogram Feature (CHF) depicts the brightness and contrast of a colour image. The minimum and maximum colour quantizers are indexed using a specific trained colour codebook. The CHF is created from these two indexed colour quantizers. Two trained colour codebooks are used to index the DDBTC colour quantizers. Cmin and Cmax colour codebooks are generated through the Vector Quantization (VQ) on the minimum and maximum quantizer images obtained for a set of training images. This work utilizes the LBG-VQ method [30] for codebook generation.

Bit Pattern Feature
The Bit Pattern Feature (BPF) defines the edge and visual texture pattern of an image. Several DDBTC bitmap images are randomly picked and turned into training data. The LBGVQ computes the appropriate codebook from these training data by considering the binary value of the bitmap image as real numbers. During the bit pattern codebook generation, all codevector elements may have values in the range zero and one at each training process. The codevectors are consequently updated and calculated. At the end of the training, the hard thresholding is performed for all codevectors to obtain the final result. This process adjusts the value greater than the threshold 0.5 into 1 and others into 0. The bitmap image generated from the DDBTC encoding is indexed using the bit pattern codebook, which gives the best match between the bitmap image and the trained bit pattern codeword. The histogram of the associated indexed bitmap image is the BPF image descriptor of that image.

C. Similarity Assessment
The principal step of the image retrieval task is in the distance measure estimation, in which the similarity between two images is calculated. The distance measure computation performs an important role in the image retrieval system. The image retrieval performance is very sensitive to the particular distance metric preferred by a user. The image matching between the query image and target image in the database can be performed by measuring the similarity between their features, i.e. CHF and BPF. After the distance measure computation, the system finally returns a set of retrieved images arranged in ascending manner based on their distance score. A lower score on distance measure symbolizes more degree of similarity between two images, and vice versa. The distance score between the two images (query and target image) can be formally defined by various distance metrics. Here Modified Canberra distance is used as the distance metric which is defined as follows: where ∝ 1 , ∝ 2, and ∝ 3 indicate the similarity weighting constant representing the percentage contribution of the CHF and BPF employed in the retrieval process. When a constant is set as 1, it indicates that the corresponding feature is used in the computation where as the value 0 means the feature is disabled.

IV. RESULTS AND SYSTEM EVALUATION
This section summarises the effectiveness of the DDBTC encoding as well as CHF and BPF feature descriptor for the image retrieval. DDBTC is a variant of the traditional BTC which was proposed to resolve the blocking effects and false contour problem occurred in the reconstructed image using BTC [26]. The image retrieval systems extract the image feature descriptor for all the target images in Database. An image is decomposed using the DDBTC encoding to obtain the Colour Histogram Feature (CHF) and Bit Pattern Feature (BPF) using specific colour and bit pattern codebook, respectively. A similar approach using identical colour and bit pattern codebook is also applied for query image given by the user. The similarity measure between the query image and target images is computed based on their CHF and BPF. Finally, the performance of the retrieval system is analyzed based on Average Precision Rate (APR) and Average Recall Rate (ARR) for image retrieval system.
The effectiveness and usability of the CHF and BPF image feature descriptor are studied under Corel image database [31]. This image database is in the RGB colour space and consists of 1000 natural images grouped into 10 classes with each class having 100 images. All images are of size 384×256 clustered into several semantic categories like African people and village, beach, building, buses, dinosaurs, elephants, flowers, horses, mountains, and foods. A sample of the database is shown in Figure 2. Each class contains various types of images having many kinds of variations such as illumination variations, pose variations, varying number of significant objects, the presence of different background, etc. The image retrieval performance is examined in terms of Average Precision Rate (APR) and Average Recall Rate (ARR). The APR and ARR examine how many relevant images were returned by the image retrieval system under a fixed number of retrieved images. Target images or the images in the database are arranged in ascending order based on the distance score calculated. The APR and ARR are defined as Where L, and indicate the number of retrieved images, the total number of images in the database and the number of relevant images in each class respectively. The symbol q and ( ) denote the query image and the number of correctly retrieved images among L retrieved images. ( ) denote the number of relevant images against a query image q. A higher value of APR and ARR indicate the better image retrieval performance.

A. Examle of Image Retrieval
For extracting the feature descriptor the DDBTC block size is set as 4 × 4. The size of the colour and bit pattern codebook are kept as Nmin =Nmax = 64 and Nb = 256. The similarity weighting are set as ∝ 1 =∝ 2 = ∝ 3 = 1 indicating that all features are used in the distance calculations.
During the simulation part of the experiment, a query image is randomly selected from the image database. Subsequently, a set of retrieved images are obtained and arranged in ascending order based on the modified Canberra distance score between the query and target image feature. Figure 3 presents the image retrieval result based on CHF and BPF feature on Corel 1000 image database. The image on the top left corner is the query image. The rest of the image are a set of retrieved images represented from left to right and from top to bottom based on the similarity score. The correctness of the CHF and BPF feature descriptor can be visually assessed by examining the similarity between the query and the set of retrieved images based on their content appearance. The figure clearly shows that the CHF and BPF features can retrieve a set of images from the database with similar appearances and contents.
In this experiment, five images from each class of the Corel 1000 image database is taken as the query images for the evaluation of the system. The CHF and BF are extracted from the images in the RGB colour space and the block size of DDBTC is taken as 4×4. This method shows that CHF and BPF along with modified Canberra distance outperform some of the existing methods. Table I shows the comparison of the method present in this paper and the former methods in terms of the average precision rate.

V. CONCLUSION
In this paper a method for performing image retrieval in the compressed domain has been presented by exploiting the DDBTC encoding method. An image feature descriptor is created from the DDBTC encoded data stream i.e. two extreme quantifier (maximum and minimum values) and the corresponding bit map image, without performing the decoding process. Indexed quantizer images and the bitmap images are generated with the help of LBG vector quantization algorithm prior to feature descriptor generation. The Colour Histogram Feature(CHF) derived from the indexed DDBTC quantizer images, describe the image brightness and colour distribution, while the Bit Pattern Feature (BPF) constructed from the indexed bitmap DDBTC images, portrays the edge and texture information details. CHF and BPF corresponding to the query image are calculated and compared against the CHF and BPF of database images using different distance measures. From the experimental analysis, it has been shown that this method with Modified Canberra distance is superior to the other competing schemes in the image retrieval. CBIR using the DDBTC offers an average precision rate of 78.6% and an average recall rate of 85.4% which is highly satisfactory compared to the existing CBIR schemes.