Hello Logout


Colour Image Histogram Equalization

You are not Member of this Project.
Project Owner : priyanka Devadoss
Created Date : Fri, 06/05/2011 - 12:26
Project Description :


               This project describes about "Histogram equalization of a colour image". Here i am using HSV(Hue,Saturation,Value) colour model for getting a clear histogram images.The HSV colour space is widely used to generate high quality computer graphics. It gives the colour according to human perception. This imaging technique is useful in Bio-medical applications since the output of this process is used to detect the original colour of an image with different intensity levels.


       The use of colour in image processing is motivated by two principle factors:

              *   First, Colour is a powerful descriptor that often simplifies object identification and extraction frim a scene.

              *  Second, Humans can discern thousands of colour shades and intensities, compared to about only two dozen shades of gray.This second factor is particularly  important in manual(i.e., when performed by humans) image analysis.

      Histograms are simple to calculate in software and also lend themselves to economic hardware implementations,thus making them a popular tool for a real-time image processing.Histogram equalization shows a graphical display along with the tabular frequencies, that looks like adjacent rectangles.

     Thje height of each rectangle can be equalent to the number of pixels. The total area of the histogram is the same in the direction of on number of data. This is known as histogram equalization.

Problem Statement:

         Generally,gray scale histograms are obtained in image processing techniques.But, for real-time processing and image enhancement , there is a great need of colour histograms for applications like computer vision,optical sorting, remote sensing, medical image processing, morphological image processing,etc..


           In this project, i use HSV colour model to obtain the histogram equalization of an image.

                    HSV(Hue,Saturation,Value)-Defines a type of colour space, It is similar to the modern RGB and CMYK models. The HSV Colour space has three components: Hue, Saturation and Value. 'Value' is sometimes substituted with 'brightness'and then it is known as HSB.



close all;
clear all
I = imread('C:\Program Files\MATLAB\R2007b\toolbox\images\imdemos\gantrycrane.png');
title('colour image');
I = im2double(I);
[index,map] = rgb2ind(I);
pixels = prod(size(index));
hsv = rgb2hsv(map);
h = hsv(:,1);
s = hsv(:,2);
v = hsv(:,3);
%Finds location of black and white pixels
darks = find(v < .2)';
lights = find(s < .05 & v > .85)';
h([darks lights]) = -1;
%Gets the number of all pixels for each color bin
black = length(darks)/pixels;
white = length(lights)/pixels;
red = length(find((h > .9167 | h <= .083) & h ~= -1))/pixels;
yellow = length(find(h > .083 & h <= .25))/pixels;
green = length(find(h > .25 & h <= .4167))/pixels;
cyan = length(find(h > .4167 & h <= .5833))/pixels;
blue = length(find(h > .5833 & h <= .75))/pixels;
magenta = length(find(h > .75 & h <= .9167))/pixels;
%Plots histogram
hold on
fill([0 0 1 1],[0 red red 0],'r')
fill([1 1 2 2],[0 yellow yellow 0],'y')
fill([2 2 3 3],[0 green green 0],'g')
fill([3 3 4 4],[0 cyan cyan 0],'c')
fill([4 4 5 5],[0 blue blue 0],'b')
fill([5 5 6 6],[0 magenta magenta 0],'m')
fill([6 6 7 7],[0 white white 0],'w')
fill([7 7 8 8],[0 black black 0],'k')
axis([0 8 0 1])
Sample Input and Output as attach to file.
                      As colour is an important tool for image enhancement , I am  moving to implement the colour image hiatogram equalization to bridge the small gap between colour image processing and biomedical field.
   This method useful to,
             -differentiate tumour cells from the normal healthy cells by varing the colour of them.
             -detect even the minute bone fractures easily.
             -detect the blood clots in heart,brain. and identify the kidney stones.
You are not authorized to access this content.
You are not authorized to access this content.
You are not authorized to access this content.
You are not authorized to access this content.
You are not authorized to access this content.