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: H. G.
Subject: [Octave-bug-tracker] [bug #45456] hsv2rgb is very strict about its input values
Date: Wed, 15 Jul 2015 20:58:04 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:39.0) Gecko/20100101 Firefox/39.0

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

Here is an even easier (and more Matlab compatible) suggestion:
* Use tol=2e-10 as discussed earlier.
* For input values in the interval [-tol, 1+tol] : just do the calculation
anyways. No error, no warning, no data clipping. --> This will for all
reasonable image data just take care of rounding errors.
* For input values outside of [-tol, 1+tol] : issue a warning and do the
calculation anyways. --> This will produce "nonsense in, nonsense out", but
since Matlab does it, we can do it as well. But I'd like to issue a warning
here.

A small PATCH that does the above changes to hsv2rgb.m, rgb2hsv.m and
rgb2ntsc.m is attached.

(file #34450)
    _______________________________________________________

Additional Item Attachment:

File name: tolerant_rgb2hsv.diff          Size:2 KB


    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Nachricht gesendet von/durch Savannah
  http://savannah.gnu.org/




reply via email to

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