openexr-devel
[Top][All Lists]
Advanced

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

Re: [Openexr-devel] color space conversion


From: Kai-Uwe Behrmann
Subject: Re: [Openexr-devel] color space conversion
Date: Sun, 25 Dec 2005 09:50:30 +0100 (CET)

One option would be using lcms. The CMM has a small utility to do the 
calculations in 16bit integer precission. <http://www.littlecms.com>
It should build pretty well.

A small example:
sirius:~/& icctrans -w -o '*Lab'
little cms ColorSpace conversion calculator - v2.0


Enter values, 'q' to quit
R (0..255)? 50
G (0..255)? 50
B (0..255)? 50

L*=20.7858 a*=-0.0312 b*=0.0000 

Enter values, 'q' to quit
R (0..255)? 
...

Of course feeding in a CGATS is more convenient.


regards
Kai-Uwe Behrmann
                                + development for color management 
                                + imaging / panoramas
                                + email: address@hidden
                                + http://www.behrmann.name


Am 23.12.05, 17:42 -0800 schrieb Florian Kainz:

> I need help verifying the correctness of a few color
> space conversion functions...
> 
> For the Color Transformation Language interpreter, I have
> implemented a set of functions that convert between RGB,
> CIE 1931 XYZ, CIE 1976 L*u*v* and CIE 1976 L*a*b*, but
> I don't have a test data set that would allow me to check
> if my conversions are correct.  Does anyone have such a
> data set that they would be willing to share?
> 
> Alternatively, if anyone has a program that does color space
> conversions, I would really appreciate help verifying that
> the table below is correct:
> 
> R     G     B      X       Y       Z       L*         u*        v*     a*
> b*
> 1.0   0.0   0.0   41.239  21.264   1.933  53.237   175.010    37.765  80.090
> 67.203
> 0.0   1.0   0.0   35.758  71.518  11.920  87.736   -83.067   107.418 -86.182
> 83.187
> 0.0   0.0   1.0   18.048   7.219  95.053  32.301    -9.402  -130.351  79.195
> -107.855
> 1.0   1.0   1.0   95.046 100.000 108.906 100.000     0.000     0.000   0.000
> 0.000
> 0.005 0.005 0.005  0.475   0.500   0.545   4.516     0.000     0.000   0.000
> 0.000
> 0.0   0.0   0.0    0.000   0.000   0.000   0.000 undefined undefined   0.000 
> 0.000
> 
> The table was constructed assuming that the CIE xy coordinates
> for the red, green and blue primaries and the white point are
> as specified in Recommendation ITU-R BT.709-3:
> 
>      x      y
> red   0.6400 0.3300
> green 0.3000 0.6000
> blue  0.1500 0.0600
> white 0.3127 0.3290
> 
> I assumed that the RGB triple (1, 1, 1) has a luminance of
> 100 candelas per square meter.
> 
> The values of Xn, Yn, and Zn used in calculating L*u*v* and
> L*a*b* are 95.0456, 100.000 and 108.906 respectively.
> 
> Florian
> 
> 




reply via email to

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