## 2 Color Analysis  
In past work, we have developed a color-based retrieval system based on a form of differential compression where similarity is measured by employing vector quantization (VQ) to compress one image in terms of a codebook based on a second image; that is, similar images tend to compress well with respect to the other as compared to less similar ones ([PERSON] and [PERSON] [1]). This kind of approach has been successful in the past for testing similarity of text (e.g., [PERSON] and [PERSON] [2,3]), although it is a much different problem for imagery. We have implemented and experimented with a system that can be described at a high level as follows:  
Preprocess the database by sub-sampling each image in the database to create a thumbnail, and by constructing a small VQ codebook for feature vectors derived from each thumbnail. Given a query image, compress it with each codebook in the database and rank the images of the database in order of the achieved distortion (using mean squared error). Preprocessing can be thought of as a tagging of images as they are added to the database. In fact, instead of the original images, the database may include only the codebook we construct and a link to the original image. For the query step, we have used _forward_ compression, where database codebooks are used to compress the query image (rather than _backward_ compression, where each image in the database is compressed with the codebook of the query image). We have chosen forward compression due both to its better performance and its extensive use in the previous work to which we have compared ours (e.g., [PERSON] and [PERSON] [4]). In addition, as we address later in this paper, our specific design of forward compression can be implemented to run fast. To test our method, we have used as our database a subset of the COREL collection consisting of 1500 JPEG images, 100 in each of 15 classes (buses, horses, mountain scenes, _etc._), an example of which is shown in Figure 1. The images in this database are already relatively small, but are still larger than is needed for a thumbnail. To create the database thumbnails, the system retains the central region (256 by 256 for these images) and scales it to 128 by 128 for each image (although it is possible to use smaller thumbnails, this size allows us to make direct comparisons with previous work). With our current system, the thumbnails are first transformed from the RGB color space to the perceptually uniform _CIE LUV_ color space where the Euclidean distance between colors closely approximates their perceptual distance ([PERSON] and [PERSON] [5]). Feature vectors of 6 components each are then formed from the mean and variance of each color channel for each 2 \(\times\) 2 block of a thumbnail. Once the feature vectors have been extracted, the VQ codebook for a thumbnail is constructed using a standard splitting algorithm ([PERSON] and [PERSON] [6]) with MSE as the distance function. Retrieval effectiveness of a query is evaluated using standard _precision vs. recall_ plots, where:  
\[ \begin{array}{rl}a=&\text{Number of relevant images (same class as the query) retrieved.}\\ b=&\text{The number of irrelevant items that are retrieved}\\ \text{c}=&\text{The number of relevant items that were not retrieved.}\\ \text{precision}=&\text{fraction of the images retrieved that are relevant =}&a/(a+b)\\ \text{recall}=&\text{fraction of the relevant images that are retrieved =}&a/(a+c)\end{array} \]  
Precision and recall are shown on a single graph so that one may perceive the change in precision as the recall increases. Since the precision typically drops as the recall increases, a retrieval system is more effective when it has higher precision at the same recall level. Figure 2 compares our work with the GMVQ based system of [PERSON] and [PERSON] [4]. In this work, the authors use image features that are in the HSV color space, which are obtained by a 4:1:1 sampling of the 2 \(\times\) 2 HSV blocks (4 hue components together with one saturation and one value component).