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 view the image it just shows up as black. What am I missing?
*PS I'm using octave 3.8.1 which works like matlab
Here are the octave 3.8.1 packages I have loaded:
>>> pkg list
Package Name | Version | Installation directory
--------------+---------+-----------------------
control *| 2.6.2 | /usr/share/octave/packages/control-2.6.2
general *| 1.3.4 | /usr/share/octave/packages/general-1.3.4
geometry *| 1.7.0 | /usr/share/octave/packages/geometry-1.7.0
parallel *| 2.2.0 | /usr/share/octave/packages/parallel-2.2.0
signal *| 1.2.2 | /usr/share/octave/packages/signal-1.2.2
specfun *| 1.1.0 | /usr/share/octave/packages/specfun-1.1.0
test code below:
f=imread('/tmp/bump.jpg'); %color image
%Hue - Saturation - Value
f_rgb2hsv=rgb2hsv(f); %convert image to HSV double
f_hsv2rgb=hsv2rgb(f_rgb2hsv);%convert to RGB double
f_to_image=uint8(f_hsv2rgb); %convert to uint8 to see image
imshow(f_to_image);