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


Groups > sci.image.processing > #4036

Re: forward/reverse chromaticity calculation mis-match

From Dale <dale@dalekelly.org>
Newsgroups sci.engr.color, sci.image.processing, comp.soft-sys.octave, comp.graphics.apps.gnuplot, rec.photo.digital, comp.graphics.apps.gimp
Subject Re: forward/reverse chromaticity calculation mis-match
Date 2015-09-29 21:27 -0400
Message-ID <8qc3bk.d9u.17.1@news.alt.net> (permalink)
References <8pmh4k.u3a.19.1@news.alt.net>

Cross-posted to 6 groups.

Show all headers | View raw


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

Back to sci.image.processing | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

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

csiph-web