MATLAB: How to measure RGB saturation

MATLABrgb saturation

I need to obtain the values of red, green and blue channel saturation separatly. I don't need the measurment for a specific area of the image but for the complete image. I really need some help. Thank you!

Best Answer

Please Check this.
if true
I=uint8(rgb_img);
hsv_img=rgb2hsv(I);
hue=hsv_img(:,:,1);
saturation=hsv_img(:,:,2);
value=hsv_img(:,:,3);
end