Discussion:
forward/reverse chromaticity calculation mis-match
(too old to reply)
Dale
2015-09-21 21:08:01 UTC
Permalink
I am using octave and gnuplot to do chromaticity diagrams

both my sRGB. xy and uv, have mis-matches between the forward and
reverse methods from wikipedia, the reverse method seems "right", the
forward method does not reach full on sRGB at primary corners and
neutral axes

I'll use xy for instance
https://en.wikipedia.org/wiki/CIE_1931_color_space
https://en.wikipedia.org/wiki/SRGB

the plots of interest are the last two on this link
http://www.dalekelly.org/octave_gnuplot_xy.html

I used Y=1 on both forward/reverse methods

the forward method I used a range of 0:1 xy and found the xy points in
the sRGB polynomial, converted to xyY, converted to XYZ, converted to
linear_sRGB, converted to gamma_RGB, converted to 0:255 RGB. converted
to sRGBhex

the reverse method I started with 0:255 RGB, converted to RGBhex and
gammaRGB, converted to linearRGB, converted to XYZ, converted to xyY

I remember reading on http://www.brucelindbloom.com/ that
"If the input XYZ color is not relative to the same reference white as
the RGB system, you must first apply a chromatic adaptation transform to
the XYZ color to convert it from its own reference white to the
reference white of the RGB system."

I'll hack at the reference white, my first guess is the forward method
needs it, any assistance appreciated
--
Dale
http://www.dalekelly.org
Dale
2015-09-30 01:27:45 UTC
Permalink
Post by Dale
I am using octave and gnuplot to do chromaticity diagrams
both my sRGB. xy and uv, have mis-matches between the forward and
reverse methods from wikipedia, the reverse method seems "right", the
forward method does not reach full on sRGB at primary corners and
neutral axes
I'll use xy for instance
https://en.wikipedia.org/wiki/CIE_1931_color_space
https://en.wikipedia.org/wiki/SRGB
the plots of interest are the last two on this link
http://www.dalekelly.org/octave_gnuplot_xy.html
I used Y=1 on both forward/reverse methods
the forward method I used a range of 0:1 xy and found the xy points in
the sRGB polynomial, converted to xyY, converted to XYZ, converted to
linear_sRGB, converted to gamma_RGB, converted to 0:255 RGB. converted
to sRGBhex
the reverse method I started with 0:255 RGB, converted to RGBhex and
gammaRGB, converted to linearRGB, converted to XYZ, converted to xyY
I remember reading on http://www.brucelindbloom.com/ that
"If the input XYZ color is not relative to the same reference white as
the RGB system, you must first apply a chromatic adaptation transform to
the XYZ color to convert it from its own reference white to the
reference white of the RGB system."
I'll hack at the reference white, my first guess is the forward method
needs it, any assistance appreciated
I tried a reference white adaption from d50 to d65 since what I
understand is that sRGB is encoded as d50 but specified as d65

the image is
Loading Image...

looks a little bit better, strange yellow near the green primary, maybe
I got this backward or something, I'll hack away


include the following octave script after xy to XYZ calculation and
before the XYZ to RGB calculations in previous forward calculation
http://www.dalekelly.org/octave_gnuplot_xy.html
http://www.dalekelly.org/octave_gnuplot_xy/Bradford_XYZd50_to_XYZd65.m

adaption matrix is from
http://www.brucelindbloom.com/index.html?Eqn_ChromAdapt.html
--
Dale
http://www.dalekelly.org
Dale
2015-10-02 18:01:19 UTC
Permalink
Post by Dale
white adaption from d50 to d65
Bradford ...
--
Dale
http://www.dalekelly.org
Loading...