29.12.2012 Views

Gernot Hoffmann CIE Color Space

Gernot Hoffmann CIE Color Space

Gernot Hoffmann CIE Color Space

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

11.2 <strong>Color</strong> <strong>Space</strong> Calculations / General<br />

For the white point correction, the basis vectors R,G,B are scaled by u,v,w. This does not<br />

change their coordinates in xyY .The mapping from XYZ to xyY is a central planar projection.<br />

T<br />

( 12) X = L( x, y, z) = ruR+ gvG+ bwB<br />

For the white point we have r = g = b = 1.<br />

( 13) W = Lx ( , y , z ) = Lux ( , y, z) + Lvx ( , y, z) + Lwx ( , y, z<br />

( 14)<br />

⎡x<br />

⎢y<br />

⎣<br />

⎢z<br />

w<br />

w<br />

w<br />

⎤<br />

⎥<br />

⎦<br />

⎥ =<br />

( 15) w = 1−u−v<br />

w w w T<br />

⎡x<br />

x x<br />

⎢y<br />

y y<br />

⎢<br />

⎣z<br />

z z<br />

r g b<br />

r g b<br />

r g b<br />

⎤ ⎡ u ⎤<br />

⎥ ⎢ v ⎥<br />

⎥<br />

w<br />

⎦ ⎣<br />

⎢<br />

⎦<br />

⎥<br />

r r r T<br />

This can be re-arranged, L cancels on both sides.:<br />

⎡ u ⎤<br />

= P ⎢ v ⎥<br />

⎣<br />

⎢w⎦<br />

⎥<br />

⎡x<br />

w ⎤<br />

( 16)<br />

⎢y<br />

w ⎥<br />

⎣<br />

⎢<br />

⎦<br />

⎥<br />

xr yr xg yg xb<br />

u<br />

yb<br />

v<br />

1 u v<br />

=<br />

⎡<br />

⎢<br />

⎢<br />

⎣<br />

⎤ ⎡ ⎤<br />

⎥ ⎢ ⎥<br />

⎥<br />

⎦ ⎣<br />

⎢ − − ⎦<br />

⎥<br />

( 17) x = ( x − x ) u + ( x − x ) v + x<br />

w r b g b b<br />

y = ( y − y ) u+ ( y − y ) v+ y<br />

w r b g b b<br />

These linear equations are solved by Cramer’s rule.<br />

( 18) D = ( xr −xb) ( yg −yb) −( yr −yb) ( xg −xb)<br />

U = ( x −x )( y −y ) −( y − y )( x − x )<br />

w b g b w b<br />

g b<br />

V = ( xr −xb) ( yw −yb) −( yr −yb) ( xw −xb)<br />

( 19)<br />

u = U/ D<br />

v = V/ D<br />

w = 1−u−v 13<br />

g g g T<br />

b b b) T<br />

It is not necessary to invert the whole matrix numerically. We can simplify the calculation by<br />

adding the first two rows to the third row and find so immediately Eq.(15), which is anyway<br />

clear:<br />

In the next step we assume that u,v,w are already calculated and we use the general color<br />

transformation Eq.(12) and furtheron Eq.(8). We get the matrices C xr and C rx .<br />

⎡X⎤<br />

( 20)<br />

⎢Y⎥<br />

⎣<br />

⎢Z⎦<br />

⎥<br />

ux / y<br />

V uy / y<br />

uzr / y<br />

vx<br />

vy<br />

/ y<br />

/ y<br />

wx<br />

wy<br />

/ y<br />

/ y<br />

=<br />

⎡<br />

⎢<br />

⎢<br />

⎣ vz / y wz / y<br />

( 21 X = VC<br />

r<br />

xr<br />

−<br />

xr<br />

r w g w b w<br />

r w g w b w<br />

w g w b w<br />

( 22) r = ( 1/<br />

V)<br />

C 1<br />

X = (/ 1 ) C X<br />

V rx<br />

⎤ ⎡r<br />

⎤<br />

⎥ ⎢g⎥<br />

⎥<br />

b<br />

⎦ ⎣<br />

⎢<br />

⎦<br />

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!