Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #3089 > unrolled thread

forward/reverse chromaticity calculation mis-match

Started byDale <dale@dalekelly.org>
First post2015-09-21 17:08 -0400
Last post2015-10-02 14:01 -0400
Articles 3 — 1 participant

Back to article view | Back to comp.graphics.apps.gnuplot


Contents

  forward/reverse chromaticity calculation mis-match Dale <dale@dalekelly.org> - 2015-09-21 17:08 -0400
    Re: forward/reverse chromaticity calculation mis-match Dale <dale@dalekelly.org> - 2015-09-29 21:27 -0400
      Re: forward/reverse chromaticity calculation mis-match Dale <dale@dalekelly.org> - 2015-10-02 14:01 -0400

#3089 — forward/reverse chromaticity calculation mis-match

FromDale <dale@dalekelly.org>
Date2015-09-21 17:08 -0400
Subjectforward/reverse chromaticity calculation mis-match
Message-ID<8pmh4k.u3a.19.1@news.alt.net>
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

[toc] | [next] | [standalone]


#3100

FromDale <dale@dalekelly.org>
Date2015-09-29 21:27 -0400
Message-ID<8qc3bk.d9u.17.1@news.alt.net>
In reply to#3089
On 09/21/2015 05:08 PM, Dale wrote:
> 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
http://www.dalekelly.org/octave_gnuplot_xy/test_white.png

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

[toc] | [prev] | [next] | [standalone]


#3101

FromDale <dale@dalekelly.org>
Date2015-10-02 14:01 -0400
Message-ID<8qj6ah.ak6.19.1@news.alt.net>
In reply to#3100
On 09/29/2015 09:27 PM, Dale wrote:
> white adaption from d50 to d65

Bradford ...

-- 
Dale
http://www.dalekelly.org

[toc] | [prev] | [standalone]


Back to top | Article view | comp.graphics.apps.gnuplot


csiph-web