MATLAB Answers

how to enhance a color image ?

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


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().


on 22 Aug 2012


take a look at 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

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..

Join the 15-year community celebration.

Play games and win prizes!

Learn more
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

MATLAB Academy

New to MATLAB?

Learn MATLAB today!