Converting image using matlab / octave from rgb to hsv back to rgb

后端 未结 1 570
野性不改
野性不改 2021-01-28 16:27

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

相关标签:
1条回答
  • 2021-01-28 16:50

    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.

    0 讨论(0)
提交回复
热议问题