octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #45456] hsv2rgb is very strict about its input


From: Avinoam Kalma
Subject: [Octave-bug-tracker] [bug #45456] hsv2rgb is very strict about its input values
Date: Sun, 05 Jul 2015 18:16:40 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.130 Safari/537.36

Follow-up Comment #6, bug #45456 (project octave):

Regrading Comment#5:

I think it's a very good suggestion: values in the range [1,1+tol] or [-tol,0]
are probably due to roundoff errors.

Values outside this range, and outside [0:1] should not
be clipped. See for example:


I1 = imread ('peppers.bmp');
% famous peppers image (3 bands image)
I2 = double (I1);
I3 = rgb2hsv (I2);
I4 = hsv2rgb (I3);
imshow (uint8 (i4));


In Matlab, the last command shows an image which is the same as the original
image. If we truncate I2 in rgb2hsv, we will stop
being compatible, and I3 V channel will have only 0 and 1 values. 
Octave should issue a warning, but without truncating all floating point
inputs to the range [0,1].  


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?45456>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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