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

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

[Octave-patch-tracker] [patch #8709] fixes to color conversion functions


From: Hartmut
Subject: [Octave-patch-tracker] [patch #8709] fixes to color conversion functions (mainly rgb2ntsc and ntsc2rgb)
Date: Fri, 30 Oct 2015 20:14:51 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:41.0) Gecko/20100101 Firefox/41.0

Follow-up Comment #9, patch #8709 (project octave):

Regarding the behavior of ntsc2rgb with integer inputs I see two
possibilities:

* ntsc2rgb could ONLY accept floating point inputs (I would suggest single and
double). This would still be fully Matlab compatible, since Matlab only claims
to accept doubles. This would only result in Octave being a SMALLER superset
of Matlab as currently.

* We could stick to the current input behavior in integers, i.e. transform the
values 0...intmax to 0...1. This would make it impossible to display certain
colors as integer values in ntsc images.

I would opt for the first solution (=do not accept ntsc integer images).
Reasons: 

* I have no idea of a good definition how to interpret integer ntsc values
better than the above crude simplification. (If someone else has a good
definition at hand, I would then suggest do gladly use it and describe it in
the help text.)

* The user can NOT create integer valued ntsc images with Octave anyways. The
inverse function rgb2ntsc.m now only outputs floating point values.

* If you take the (new, patiently waiting in patch #8713) additional color
conversion functions of the image package into account, then it is nothing
extraordinary that in some colorspaces integer values can not (or only hardly)
be used. For example does the function xyz2rgb.m currently only accept
floating point inputs (The function lab2rgb currently only accepts floting
point inputs as well, but this one could be reasonable generalized to also
accept integers in the future. Its Matlab version does not accept integers
though.)

Note: In patch #8713 I introduced an additional switch "only_floats" in
colorspace_conversion_input_check.m for this very same purpose. I don't know
how useful it would be to keep those two versions (Octave core version and
image package version) of colorspace_conversion_input_check.m the identical.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/patch/?8709>

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




reply via email to

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