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: Rik
Subject: [Octave-bug-tracker] [bug #45456] hsv2rgb is very strict about its input values
Date: Sat, 04 Jul 2015 12:47:50 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0

Update of bug #45456 (project octave):

              Item Group:        Incorrect Result => Matlab Compatibility   
                  Status:                    None => Confirmed              
                 Summary: hsv2rgb is too strict about its input values =>
hsv2rgb is very strict about its input values

    _______________________________________________________

Follow-up Comment #4:

Seems I was right that Matlab just doesn't bother to do input validation of
any kind.  I don't think that is the right way to go.  In the first example it
leads to RGB  components well in excess (not just a few eps) of 1.

Do we want to relax the standard?  If so, how close to 1 should it be not to
generate an error?  1eps?

The code could also be changed from issuing an error, to issuing a warning,
and truncating all floating point inputs to the range [0,1].

Whatever gets done, should be done uniformly for these three scripts


hsv2rgb.m:51:  elseif (isfloat (hsv_map) && (any (hsv_map(:) < 0) || any
(hsv_map(:) > 1)))
rgb2hsv.m:46:  elseif (isfloat (rgb) && (any (rgb(:) < 0) || any (rgb(:) >
1)))
rgb2ntsc.m:57:  elseif (isfloat (rgb) && (any (rgb(:) < 0) || any (rgb(:) >
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]