Color Measurement and Reproduction Eric Dubois

Download Report

Transcript Color Measurement and Reproduction Eric Dubois

Color Measurement and
Reproduction
Eric Dubois
How Can We Specify a Color
Numerically?
What measurements do we need to
take of a colored light to uniquely
specify it?
How can we reproduce the same color
on a display?

on a printer?
Color Vector Space
The appearance of a colored light is
determined by its power spectral density C ( )
A color is a set of all Ci ( ) that appear
identical to a human viewer, denoted [C ] or
[C ( )]
The set of colors can be embedded in a 3dimensional vector space. A basis for the
vector space is the set of primaries [ P1 ] , [ P2 ],[ P3 ]
Any color can be expressed
[C ]  C1[ P1 ]  C2 [ P2 ]  C3[ P3 ]
Tristimulus values
Determination of tristimulus
values
[ (   )]  p1 (  )[ P1 ]  p2 (  )[ P2 ]  p3 (  )[ P3 ]
Color matching functions
The color matching functions are determined by
subjective experiment ONCE for one set of
primaries [P1], [P2], [P3].
For any color
Ci 
max
 C ( ) p ( )d 
i
min
CIE 1931 Red, Green and Blue
primaries
B()=(-435.8)
G()=(-546.1)
R()=(-700.0)
Transformation of primaries
Obtaining the tristimulus values with respect to a new
set of primaries is a change of basis operation.
~ ~ ~
[ P1 ], [ P2 ], [ P3 ] is a given set of primaries and [ P1 ], [ P2 ], [ P3 ]
is a different set.
We can express the primaries [ P1 ], [ P2 ], [ P3 ] in terms of
~ ~ ~
[ P1 ], [ P2 ], [ P3 ]
3
~
[ Pj ]   akj [ Pk ],
k 1
j  1,2,3
Transformation of primaries (2)
For an arbitrary color:
3
[C ]   C j [ Pj ]
j 1
3
3
j 1
k 1
~
  C j  akj [ Pk ]
 3
 ~
    C j akj [ Pk ]
k 1  j 1

3
~
From which we can identify Ck   C j akj , k  1,2,3
j 1
~
 C1   a11 a12 a13   C1 
~  
~
 C 
C

a
a
a
In matrix form:  2   21 22
or C  AC
23   2 
C~3  a31 a32 a33  C3 
1 ~
CA C
 
  
A
3
Transformation of primaries (3)
The relationship between the sets of primaries
can also be expressed in matrix form:
~

[ P1 ]   a11 a21 a31  [ P1 ] 
 ~ 
[ P ]  a

 2   12 a22 a32  [ P~2 ]
[ P3 ] a13 a23 a33  [ P3 ]
AT
Note that this is a symbolic equation involving
elements of the color vector space C
Transformation of primaries (4)
Recognizing that color matching functions
specify tristimulus values for each :
~
p1 ( ) 
 p1 ( ) 
~

 p ( ) 
p
(

)

A
 2 
 2 
~

 p3 ( ) 
p
(

)
3


Each new color matching function can be viewed as
a linear combination of the three old color matching
functions.
The CIE XYZ primaries
In 1931, the CIE defined the XYZ primaries so that all
the color matching functions are positive, and the Y
component gives information about the brightness
(luminance, to be discussed).
These new primaries are not physical primaries.
[ X ]  0.4184  0.0912 0.0009  [ R31 ]
 [Y ]    0.1587 0.2524  0.0026 [G ]
  
  31 
[ Z ]    0.0828 0.0157
0.1786  [ B31 ]
The CIE XYZ primaries (2)
If [C] is an arbitrary color that can be expressed:
[C ]  CR [ R31 ]  CG [G31 ]  CB [ B31 ]
 C X [ X ]  CY [Y ]  CZ [ Z ]
CR   0.4184  0.1587  0.0828 C X 
C    0.0912 0.2524
C 
0
.
0157
 G 
 Y 
CB   0.0009  0.0026 0.1786   CZ 
C X  2.769 1.752 1.130  CR 
 C   1.000 4.591 0.060 C 
 Y 
 G 
 CZ  0.000 0.057 5.593 CB 
The CIE XYZ primaries (3)
Applying this to each , we get the XYZ color matching
functions
The CIE XYZ primaries (4)
The set of physical colors in XYZ space
XYZ frequency sweep
X
Y
Z
Specification of a set of primaries
1. Each new primary is expressed in terms of existing
primaries, usually XYZ, i.e. [X], [Y], [Z] take the
~
role of the [ Pi ] The matrix AT is specified.
For example, the 1976 CIE Uniform Chromaticity
Scale (UCS) primaries are given by
[U ' ]  2.25[ X ]  2.25[ Z ]
[V ' ]  [Y ]  2[ Z ]
[W ' ]  3[ Z ]
It follows that
0.0
0.0 
2.25
A   0.0
1.0
0.0 
2.25  2.00 3.00
Specification of a set of primaries (2)
2. The matrix equation to calculate the tristimulus
values of an arbitrary color with respect to the new
primaries as a function of the tristimulus values for
the XYZ primaries is given, i.e. the matrix A-1 is
specified. For the same example as 1.
CU '   94 0 0 C X 
 C    0 1 0  C 
 Y 
 V'  
CW '   13 23 13   CZ 
A-1
Specification of a set of primaries (3)
3. The spectral density of one member of the
equivalence class [Pi] is provided for each i. For
example, this could be the spectral density of the
light emitted by each type of phosphor in a CRT
display. The XYZ tristimulus values of each primary
can be calculated using the XYZ color matching
functions.
[ RC ]  0.4641 0.2597 0.0357 [ X ]
[G ]  0.3055 0.6592 0.1421  [Y ] 
 C  
 
[ BC ] 0.1808 0.0811 0.9109 [ Z ] 
Specification of a set of primaries (4)
4. The set of three color-matching functions pi ( )
are provided. However, to be valid color-matching
functions, each one must be a linear combination of
x ( ), y ( ), z ( )
Color matching functions of the LMS cone primary system
An example is the
spectral sensitivities of
the L, M and S cones of
the human retina.
2
1.8
1.6
s
1.4
1.2
m
1
 l ( )   0.4002 0.7076  0.0808  x ( ) 

 


m
(

)

   0.2263 1.1653 0.0457   y ( )
 s ( )   0.0
0.0
0.9182   z ( ) 


0.8
l
0.6
0.4
0.2
0
400
450
500
550
600
Wavelength (nm)
650
700
It follows that
 CL   0.4002 0.7076  0.0808 C X 
C    0.2263 1.1653 0.0457   C 
 M 
 Y 
 CS   0.0
0.0
0.9182   CZ 
A
0.0  [ X ]
 [ L]   1.8601 0.3612
[ M ]   1.1295 0.6388
  [Y ] 
0
.
0

 
 
 [ S ]   0.2199
0.0
1.0891 [ Z ] 
A-T
Luminance and chromaticity
Luminance is a measure of relative brightness. If two
lights have equal luminance, they appear to be
equally bright to a viewer, independently of their
chromatic attributes.
different
luminance
Chromaticity is a measure of the chromatic (hue and
saturation) attribute of a color, independently of its
brightness.
different
chromaticity
Luminance
It may be difficult to judge if two very different
colors, say, a red light and a green light, have equal
brightness when viewing them side by side.
This judgement is easier if they are viewed in
alternation one after the other.
Luminance
It may be difficult to judge if two very different
colors, say, a red light and a green light, have equal
brightness when viewing them side by side.
This judgement is easier if they are viewed in
alternation one after the other.
Luminance
It may be difficult to judge if two very different
colors, say, a red light and a green light, have equal
brightness when viewing them side by side.
This judgement is easier if they are viewed in
alternation one after the other at a high enough
frequency.
Luminance
As the switching frequency increases and passes a
certain limit, the two colors merge into one, which
flickers if they have different brightness.
The intensity of one of the lights can be adjusted
until the flickering disappears. At this point, the two
lights have equal perceptual brightness.
This brightness depends on the power density
spectrum of the light.
A light with a spectrum concentrated near 550 nm
appears brighter than a light of equal total power
with a spectrum concentrated near 700 nm.
Luminance
This property is captured by the relative luminous
efficiency curve V().
The curve tells us that a
monochromatic light at
wavelength 0 with power
density spectrum (-0)
appears equally bright as a
monochromatic light with
power density spectrum
V(0) (-max), where max
is about 555 nm.
V(0)
max 0
Luminance
Note that V() is the same (up to a scale factor) as
y ( )
Consider an arbitrary light with power spectral
density C(). Because of linearity of brightness
matching, [C()] is a brightness match to
( V ( )C ( )d )[ (  
max
)]
The quantity C L  K m  V ( )C ( )d where Km is a
constant is referred to as the luminance of [C].
Note that if [C1]=a[C] then C1L=aCL, and if
[C]=[C1]+[C2], then CL=C1L+C2L.
Luminance
If [C]=C1[P1]+C2[P2]+C3[P3] then it follows that
CL=C1P1L+C2P2L+C3P3L
The luminances of the primaries, CiL are called
luminosity coefficients
Note that if [W]= [P1]+[P2]+[P3] , then
WL=P1L+P2L+P3L
Typically, everything is normalized such that WL=1
Luminance scaling
[C ]  CR [ R]  CG [G]  CB [ B]
a[C]
Chromatic attribute
does not change
along the line –
only the brightness
Chromaticity
The chromatic attribute of the color is specified by
identifying the line through the origin passing
through the color. This can be done by locating the
intersection of the line with the plane
C1  C2  C3  1
If [C]=C1[P1]+C2[P2]+C3[P3] , we want to choose g
such that g[C] lies on this plane. In other words,
we want gC1+gC2+gC3=1 and thus
g
1
C1  C2  C3
Chromaticity
The tristimulus values of the resulting g[C] lying on
the given plane are
Ci
ci 
C1  C2  C3
i  1,2,3
The ci are called chromaticity coefficients
Only two of them need to be specified, usually c1 and
c2
A set of colors plotted in the c1c2 plane is called a
chromaticity diagram
CIE 1931 RGB chromaticity diagram
510
spectrum locus
560
reference white
490
610
800
470
360
CIE 1931 XYZ chromaticity diagram
Spectrum locus
line of purples
CIE 1931 XYZ chromaticity diagram
The CIE XYZ primaries
Determination of tristimulus values from
luminance and chromaticities
Given: primaries [P1], [P2], [P3] and their luminosity
coefficients P1L, P2L, P3L;
the luminance CL and the chromaticities c1 and c2 of a
color [C].
Find the tristimulus values.
Solution
CL ci
Ci 
, i  1,2,3
c1P1L  c2 P2 L  c3 P3L
Conversion between tristimulus values
and luminance/chromaticity for XYZ space
The luminosity coefficients are
XL=0, YL=1, ZL=0
This leads to
CL c X
CL cZ
CX 
, CY  CL , CZ 
cY
cY
Additive reproduction of colors
Let [P1], [P2], [P3] be a set of three primaries.
Let [A], [B], [C] be three physical colors.
Let [Q]=a1[A] + a2[B] +a3[C] be an additive mixture
of [A], [B] and [C] with non-negative coefficients
ai ≥ 0
Then
The chromaticities q1,q2 lie within a triangle in the
chromaticity diagram whose vertices are the
chromaticities of [A], [B] and [C]
Additive reproduction of colors
ITU-R Rec. 709 Primaries
Representative of phosphors of typical modern RGB
CRT displays
The reference white is D65, a CIE standard white
meant to be representative of daylight
Good model for accurate reproduction of color on
CRTs – we use here it illustrate standard
computations with color.
The primaries are specified by their XYZ chromaticity
coordinates, along with [R]+[G]+[B] = [D65]
ITU-R Rec. 709 Primaries
Red
Green
Blue
White
D65
x
0.640
0.300
0.150 0.3127
y
0.330
0.600
0.060 0.3290
z
0.030
0.100
0.790 0.3582
ITU-R Rec. 709 Primaries
Calculations for reference white
DL  1.0
dX
DX 
 0.9505
dY
DY  1.0
dZ
DZ 
 1.0888
dY
ITU-R Rec. 709 Primaries
Luminosity coefficients of primaries
 RX  G X   BX   DX 
 R   G    B    D 
 Y  Y  Y  Y
 RZ   GZ   BZ   DZ 
rX
Using RX  RL
rY
etc.
2.5   RL  0.9505
1.93 0.5
 1.0 1.0
 G    1.0 
1
.
0

 L  

0.09 0.16 13.16   BL  1.0888 
 RL  0.2127 
G   0.7152
 L 

 BL  0.0722
ITU-R Rec. 709 Primaries
Tristimulus values of [R] [G] [B] in XYZ space
We now know the chromaticities and luminance of
the RGB primaries, so we can compute the
tristimulus values using RX  RL rX etc
rY
[ R] 0.4125 0.2127 0.0193 [ X ]
[G]  0.3576 0.7152 0.1192  [Y ] 
  
 
[ B] 0.1804 0.0722 0.9502 [ Z ] 
AT
ITU-R Rec. 709 Primaries
Conversion of tristimulus values
[C ]  CR [ R]  CG [G ]  CB [ B]
 C X [ X ]  CY [Y ]  CZ [ Z ]
C X  0.4125 0.3576 0.1804 CR 
 C   0.2127 0.7152 0.0722 C 
 Y 
 G 
 CZ  0.0193 0.1192 0.9502 CB 
A
CR   3.2405  1.5372  0.4985 C X 
C    0.9693 1.8760
C 
0
.
0416
 G 
 Y 
CB   0.0556  0.2040 1.0573   CZ 
A-1
ITU-R Rec. 709 Primaries: color matching
functions
Perceptual non-uniformity of color space
Macadam’s
ellipses
Uniform Chromaticity Scale (UCS) 1976
[U ' ]  2.25[ X ]  2.25[ Z ]
[V ' ]  [Y ]  2[ Z ]
[W ' ]  3[ Z ]
CU '   94 0 0 C X 
 C    0 1 0  C 
 Y 
 V'  
CW '   13 23 13   CZ 
4Q X
qU ' 
Q X  15QY  3QZ
9QY
qV ' 
Q X  15QY  3QZ
Macadam’s Ellipses in 1960 UCS
Nonlinear spaces CIELUV and CIELAB
These are non-linear spaces, but still described by
three coordinates. However these coordinates do not
sum when we add two colors.
CIELAB is the most widely used one in color FAX and
color profiles so I only present that one.
CIELUV is often called L*u*v*
CIELAB is often called L*a*b*
They both use the same L*.
These spaces require choice of a reference white.
CIELAB L* component
[Q]  QX [ X ]  QY [Y ]  QZ [ Z ]
[W ]  WX [ X ]  WY [Y ]  WZ [ Z ]
QY

QY  0.008856QW
903.3 W

Y
QL*  
1/ 3
116 QY   16 Q  0.008856Q
Y
W
  WY 
0  QL*  100
CIELAB – a* and b* components
If
QX QY QZ
,
,
 0.008856 then
WX WY WZ
  Q 1/ 3  Q 1/ 3 
Qa*  500  X    Y  
  WX 
WY  



  Q 1/ 3  Q 1/ 3 
Qb*  200  Y    Z  
  WY 
WZ  



Otherwise the corresponding cube root is replaced
by a linear segment as for L*, although such small
values are not normally encountered.
CIELAB color difference
An approximately uniform measure of difference
in CIELAB space between [C1] (C1L*,C1a*,C1b*) and
[C2] (C2L*,C2a*,C2b*) is given as follows
*
Eab

(C1L*  C2 L* )2  (C1a*  C2a* )2  (C1b*  C2b* )2
Device Space (CRT display)
The light output of a CRT display is related to the
voltage applied approximately by a power law
intensity = voltageg
A better model is
intensity = (voltage + e )2.5
To compensate, RGB values are gamma corrected
before appliying them to the display device
Device space – gamma correction
•The new space R’G’B’ is more perceptually uniform
than RGB.
•R’G’B’ values are not tristimulus values
Device space – gamma correction
ITU-R Rec. 709 gamma correction
QR  0.018
4.5QR
Q' R  
0.45
1
.
099
Q
 0.099 0.018  QR  1.0
R

with similar expressions for Q’G and Q’B.
The inverse law is
Q' R  0.081
0.2222Q' R

2.2222
QR   Q' R 0.099 
0.081  Q' R  1.0
 1.099 

Device space – ITU-R gamma
Illustration of display gamma (1)
0.5
0.5  0.5 cos(2 (ux  vy))
0.5
Illustration of display gamma (2)
(0.5).5
(0.5  0.5 cos(2 (ux  vy) )).5
(0.5).5
LUMA-Color Difference Space
This is a device dependent non-linear space that
starts from gamma-corrected R’G’B’.
This type of space used in TV, JPEG, MPEG, etc.
ITU-R Rec. 601:
Q'Y  0.299Q'R 0.5876Q'G 0.114Q'B
QPB  0.564(Q'B Q'Y )
QPR  0.713(Q'R Q'Y )
0  Q'Y  1
 0.5  QPB , QPR  0.5
LUMA- color difference space
In matrix form:
Q 'Y   0.299
0.587
0.114  Q ' R 
  
 Q' 
Q


0
.
169
0
.
331
0
.
5
 PB  
 G 
QP   0.5
 0.419  0.081 Q ' B 
 R
For 8-bit integer values between 0 and 255, we have
Q'Y219  16  219Q'Y
QCB  128  224QPB
QCR  128  224QPR
Step pattern with equal luminance steps
Step pattern with equal luma steps
Relevant Properties of Human Vision
In an imaging system, we want to deliver the highest image
“quality” in the most economical fashion
What information is important to the visual system, and what is
not important?
How do we measure image quality?
Can we predict the visibility of impairments in an image --- like
noise, blurring, artifacts, etc.
Ideally, we would like a numerical measure of image quality or
image distortion that could be used in the optimization of an
imaging system
In the absence of any pattern, image color is specified by three
tristimulus values, or three values in a perceptually uniform
space like CIELUV or CIELAB.
What happens in the presence of spatial and spatiotemporal
patterns?