Reputation: 2856
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
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