[Back to the Index]

RGB-Histogram Matching Module

[Module Features] [Module Properties] [Technical Description] [Example Results]

Module Features

The module allows retrieval of similar images based on the general colour distribution of the image.

The module is good for retrieval of images based on a known query image, if the retrieved images are required to have a similar mix of colours. It is not suitable for retrieval of images based on a query image which is only part of a complete image.

Module Properties

Module Speed Fast
Module Accuracy Low

Technical Description

This histogram matching algorithm simply uses the frequency of occurance of each colour of the histogram within the image. The more of a particular colour an image contains the higher its frequency will be within the histogram.

The histogram is made with 64 bins, a comprimise between speed (it takes longer to match more bins), and accuracy (the less bins the less discriminating the results would be - i.e. images which are less similar would have lower distances).

Before matching histogram are normalised so that the area underneath the histogram is unity (normalised by the number of pixels in the image). This means that the size of the image will not affect the match (other than any expected aliasing).

Here are some examples:

Note in the second example, how the background is dominant in the image. Because the colours of the pots are spread fairly evenly over the bins, and the background is pre-dominantly one colour, and therefore one bin of the histogram, once the histogram is normalised the background dominates the vector. This is the main drawback of histogram matching: the background information is all included within the feature and it cannot be ignored. In the first example, the background is more evenly distributed over bins (due to the shading) and the object groups into a few bins (due to its flat colour distribution). Therefore the background does not dominate the histogram so much.

Example Results

The following is an example query giving what would be considered good results.

Note: The matching is based only upon the general colour of the images.

Query123
456

Because the histogram is such a basic algorithm, there are no cases where it should give unexpected results. However, notice that the background (which is effectively "noise" in this context) affects the match, so that the results all contain large amounts of white, and some green and browns.

Used on its own you should definitely not expect the RGB-Histogram algorithm to be able to find specific instances of objects (e.g. chairs, pots, etc). However, when used with a metadata search to locate similar types of object, this algorithm could locate those of a similar colour.

[Back to the Index]