MPEG-7 Colour: Dominant Colour Descriptor

This post deals with another prominent image / video descriptor – Colour. The Dominant Colour Descriptor of the MPEG-7 is quite a useful tool for “query by example” applications. As the name indicates, the most dominant colour in the image is presented. The colour is tuned to be as close as possible to the original.

The main use can be for image retrieval. This colour and maybe amount could be used as a “feature” of the image, and then compared with the rest of the images to check for similarity. Also there are other descriptors like the colour structure descriptor, colour layout descriptor, and the basic histograms. Combined with these, an effective feature can be formed and used for the required application.

Firstly, the standard uses the CIE L*a*b colour space. This is because the Euclidean distances are more perceptual in this domain rather than the conventional RGB. (i.e. some distance X in RGB may not change the colour equally in all directions). The MPEG-7 standard suggests the so-called top-down technique. In this strategy, we first obtain one dominant colour, as the centroid of all pixels in the image.

The algorithm then follows by splitting this cluster. The cluster with the highest distortion is divided into two clusters by adding a small perturbation vector. However, note that this vector is not just any random vector. It is computed (using eigen values and vectors of the covariance matrix) in the direction of maximum variance. Thus we obtain two new centroid locations. These are further updated by the generalized Lloyd algorithm, i.e. assign each point to cluster of closer proximity, and then re-compute the centroid for the given set of points.

Since, we pick and split the centroids with max distortion, it is possible to get any number of dominant colours for the image. Below are example images of the original image, and 3 (left top), 4 (right top), 5, 6, 7 (left bottom) and 8 (right bottom) dominant colour images (click for larger view).

Original Image

Original Image

3 to 8 Dominant Colour Image

3 to 8 Dominant Colour Image

Advertisements

14 thoughts on “MPEG-7 Colour: Dominant Colour Descriptor

  1. Makarand Tapaswi Post author

    While working on segmentation of video sequences, I found an interesting use for the above descriptor. The MSE (error) between the original image, and the dominant colour image, can be used as a feature.

    In case of images with gradients, the descriptor suffers, and produces band-like structures. This causes the MSE to go very high! This helps in differentiating between “artificial” gradient images and frames, and other natural scenes / shots.

    Reply
  2. jenifer

    sir pls send me a program for the mpeg7 dominant colour descriptor clusters colours in an image with a generalised lloyd algorithm….

    Reply
    1. Makarand Tapaswi Post author

      Typically you want to use the “error” between the original and dominant colour image to see how the image is represented. You can still plot histograms of the individual layers (R, G, B) separately by running imhist(reconstructed_im(:, :, 1)) (replace 1, 2, 3)

      Reply
    1. Makarand Tapaswi Post author

      I don’t get what you are trying to do here. The error I meant earlier was just the sum of squared differences between the dominant colour image and the original. To compare them you just look at the values! The higher the error, worse is the representation.

      Reply
    1. Makarand Tapaswi Post author

      What are you trying to do? Why did you want to use the dominant color descriptor in the first place?

      Reply
  3. jenifer

    sir i m using dominant colour descriptor for the extraction of colour feature..By using this feature vectors i have to classify my images into normal and abnormal…in my paper they use 24 dimension colour by using DCD…. but i m not clear about that 24 dimension…

    Reply
    1. Makarand Tapaswi Post author

      It just represents the number of colors you want to convert your image to. For example, in the context of image compression it can be seen as a trade off between quality (better with higher number of colors) and compression factor (better with lower number of colors).

      Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s