Monday, March 28, 2011

Image Retrieval Using Histogram Intersection of Detected Edges from Color Images


Data

The image database used in this activity was the initial compilation of images provided by the students taking CMSC 265 (2nd sem 2010-2011) which has 3563 images. The images used for searching came from the database and from a small collection of environment sceneries that I compiled myself consisting of 26 images which were not part of the image database.

Sample Images


Image from the Database




Additional Images

 
 



Feature Used
  • Edges using Sobel Operator
           Edges can have varied semantic meaning in an image. For this activity, edges where detected from the image to be used as basis for "important pixels" that can represent the objects in the image. This is used in the hope to minimize the possible pixels to process. The Sobel operators where used in edge detection.
         Since image resulting from edge detection lost their color information and cannot be further used for color analysis procedures, thus edge detection were not actually used on the original image, but to three single-channel images from the original image - Red channel-only image, Green channel-only image, and Blue channel-only image. The three resulting images were used as basis for identifying important pixels from the images.
       
  • Color
          Image color is primarily the main feature used in searching. Colors were not extracted from the original image but from the three single-channel images  - Red, Green, Blue. Not all pixels in the image where used as samples but only those pixels identified as edges.
         The three values from the three channels where combined as a single value. This would yield 224 possible color values = 28 (for Red values) *   28 (for Green values) *  28 (for Blue values). To minimized this only the most significant bit were set for each channel value, thus resulting only to 83  = 512 possible color values.

Matching Function

    Color Histogram Intersection

      To match a given image from the images from the database, color histogram intersection where used. Images from the database where first transformed to a color histogram with 512 bins using the color and edge feature presented above. This procedure is done off-line. During the image search the image to be searched is then converted to a histogram using the similar procedure used to each image in the database.
      After converting the input image to a histogram, histogram matching is done to all the images in the database. The rank for each image is based from the intersection - the greater the intersection, the higher the rank. 

Results






Generalization
      Color histogram is a very compact way of storing color image information and with the help of edge detection the number of pixels considered was lessen by considering only important pixels and further  compact the required color information. color histogram intersection, being one of the fundamental color image comparison tool is effective in relating color details between images.
      Although  color histogram,edge detection, and color histogram image intersection can sometime produce good results it does not come for free and not completely robust in all possible case. Using color information will not  produce correct result every time because there can be images with object having similar color information but are in any sense unrelated. The full meaning of an object is not captured completely by color alone, Spatial, shape, and texture information are also important which are either ignored or removed by just using color and color histogram. Another drawback with the above mention is slow preprocessing speed since it can run quite slow for images with many possible edges.