help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Converting image using octave from rgb to hsv back to rgb


From: RT
Subject: Converting image using octave from rgb to hsv back to rgb
Date: Tue, 21 Jul 2015 13:35:57 -0400


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 but I won't have access to the image toolbox / image package.

test code below:

f=imread('/tmp/bump.jpg'); %color image location

%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); 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]