MATLAB: How to get the hue/saturation of a grayscale image

grayscale imagehsvhueImage Processing Toolboxsaturation

Will I still able to get the hue/saturation of an image if the picture is already a grayscale? Can I use the HSV for getting the hue?

Best Answer

Here is how to get the hue and saturation image for a grayscale image:
hueImage = zeros(size(grayscaleImage));
saturationImage = zeros(size(grayscaleImage));
Of course, they are both all zero for a monochrome, grayscale image. Why would they not be? Were you expecting something different?
Related Question