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: Mon, 20 Jul 2015 21:15:10 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:39.0) Gecko/20100101 Firefox/39.0

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

While double checking my new tests for those functions, I've found some more
glitches in those color conversion functions:
* rgb2ntsc always returns double values in Matlab (see Matlab documentation)
* ntsc2rgb only accepts double values in Matlab (see Matlab documentation)
* ntsc2rgb returns rgb values strictly between 0 and 1 in Matlab (see Matlab
documentation)
* the new private function colorspace_conversion_input_check.m had a fatal
typo in it.

I attach a PATCH that does the following:
* output data of rgb2ntsc is converted (once again) to class double. (This
means converting back and forth, i.e. not run time optimal, but nicer
code...)
* ntsc2rgb still accepts all input classes, and conserves them in the output
values (i.e. additional functionality compared to Matlab).
* ntsc2rgb clips values <0 and scales values >1 for inputs of type double (for
Matlab compatibility).
* fix the new private function colorspace_conversion_input_check.m , i.e. use
intmax instead of intmin.

(We should have left our fingers away from those ..ntsc functions...)

(file #34471)
    _______________________________________________________

Additional Item Attachment:

File name: clip_ntsc2rgb.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]