Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

how to enhance a color image ?

Asked by Sivakumaran Chandrasekaran on 22 Aug 2012

For gray image, we use the commands like adapthisteq, imadjust... How to increase the intensity for the color image.

0 Comments

Sivakumaran Chandrasekaran

1 Answer

Answer by Image Analyst on 22 Aug 2012

Convert to hsv color space with rgb2hsv(). Then do those same things on the v channel, then transform back to rgb color space with hsv2rgb().

5 Comments

Jürgen on 22 Aug 2012

Siva,

take a look at http://en.wikipedia.org/wiki/HSL_and_HSV HSV is a colorspace like rgb , you have three channel , insted of R, G and B, you have H, S and V, a possibility is also to transform to gray scale regardsJ

Image Analyst on 22 Aug 2012

Your v is the full 3D image with all the h, s, and v channels. Do this:

hsvImage = rgb2hsv(rgbImage);
% Extract individual color channels.
hChannel = hsvImage(:, :, 1);
sChannel = hsvImage(:, :, 2);
vChannel = hsvImage(:, :, 3);
% Do stuff to the v channel.
% Then, after that recombine the new v channel
% with the old, original h and s channels.
hsvImage2 = cat(3, hChannel, sChannel, vChannel);
% Convert back to rgb.
rgbImage2 = hsv2rgb(hsvImage2);

Thanks Image Analyst.. Now, I got your point..

Image Analyst

Contact us