I\'m trying to convert a color image from rgb to hsv (make changes) then back to rgb. As a test I made this code just to test how to go from rgb to hsv back to rgb but when I v
double images have values in range [0,1] (float), uint8 images in range [0,2^8-1] (only integers). Using uint8 you simply convert your values between 0 and 1 to 0 and 1 which is black or nearly black.
Use im2uint8 or im2double to convert images, these functions automatically rescale your values to the appropriate range.