Matt Le Fleur
Matt Le Fleur

Reputation: 2856

Increase image saturation

How would I go about increasing the saturation of an RGB image in MATLAB? Would I have to convert the RGB array to an HSV array first?

Upvotes: 4

Views: 6992

Answers (1)

gnovice
gnovice

Reputation: 125854

I think the easiest way would certainly be to convert to HSV color space, increase the saturation value as you like, then convert it back to an RGB image:

hsvImage = rgb2hsv(rgbImage);  %# Convert the image to HSV space
hsvImage(:,:,2) = 1;           %# Maximize the saturation
rgbImage = hsv2rgb(hsvImage);  %# Convert the image back to RGB space

Upvotes: 5

Related Questions