Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
26 views

Chapter 06-Colour Image Processing

The document provides an overview of color image processing, covering color fundamentals, color models, and color operations like smoothing, sharpening, and edge detection. It discusses how color is perceived by the human visual system through red, green, and blue cones in the eyes. Color is characterized by hue, saturation, and brightness. The CIE chromaticity diagram is introduced as a way to systematically specify colors based on their red, green, and blue proportions.

Uploaded by

boddumeghana2220
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views

Chapter 06-Colour Image Processing

The document provides an overview of color image processing, covering color fundamentals, color models, and color operations like smoothing, sharpening, and edge detection. It discusses how color is perceived by the human visual system through red, green, and blue cones in the eyes. Color is characterized by hue, saturation, and brightness. The CIE chromaticity diagram is introduced as a way to systematically specify colors based on their red, green, and blue proportions.

Uploaded by

boddumeghana2220
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 84

Digital Image Processing

Color Image Processing

Christophoros Nikou
cnikou@cs.uoi.gr

University of Ioannina - Department of Computer Science


2 Color Image Processing

“It is only after years of preparation that the young


artist should touch color – not color used
descriptively, that is, but as a means of personal
expression”.
Henri Matisse

“For a long time I limited myself to one color – as a


form of discipline”.
Pablo Picasso

C. Nikou – Digital Image Processing (E12)


3 Introduction
Today we’ll look at color image processing,
covering:
– Color fundamentals
– Color models
– Pseudocolor image processing
– Color image smoothing and sharpening
– Color edge detection
– Noise in color images
– Color perception models

C. Nikou – Digital Image Processing (E12)


4 Color Fundamentals
In 1666 Sir Isaac Newton discovered that
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

when a beam of sunlight passes through a


glass prism, the emerging beam is split into a
spectrum of colors

C. Nikou – Digital Image Processing (E12)


5 Color Fundamentals (cont…)
The colors that humans and most animals
perceive in an object are determined by the
nature of the light reflected from the object
For example, green
objects reflect light
with wave lengths
primarily in the range Colors
of 500 – 570 nm while Absorbed

absorbing most of the


energy at other
wavelengths.
C. Nikou – Digital Image Processing (E12)
6 Color Fundamentals (cont…)
3 basic quantities are used to describe the
quality of a chromatic light source:
– Radiance: the total amount of energy that flows
from the light source (measured in watts)
– Luminance: the amount of energy an observer
perceives from the light source (measured in
lumens)
• Note we can have high radiance, but low luminance
– Brightness: a subjective (practically
unmeasurable) notion that embodies the
achromatic notion of intensity of light

C. Nikou – Digital Image Processing (E12)


7 Color Fundamentals (cont…)
Chromatic light spans the electromagnetic
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

spectrum from approximately 400 to 700 nm.


As we mentioned before human color vision is
achieved through 6 to 7 million cones in each
eye.

C. Nikou – Digital Image Processing (E12)


8 Color Fundamentals (cont…)
Three principal sensing groups:
–66% of these cones are sensitive to red light
–33% to green light
–2% to blue light.
Absorption curves for the different cones have been
determined experimentally.
Strangely these do not match the CIE standards for
red (700nm), green (546.1nm) and blue (435.8nm)
light as the standards were developed before the
experiments!

C. Nikou – Digital Image Processing (E12)


9 Color Fundamentals (cont…)
Notice that the curves centered
at G and R are very close
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

C. Nikou – Digital Image Processing (E12)


10 Color Fundamentals (cont…)
Wrong : The linear combination of the three
primaries (R, G, B) may produce all of the
visible colors.

This is true only if the centers of the three


curves are shifted, that is only if the
wavelengths change but then we have no
longer the same primaries!

The three curves are not a basis.


C. Nikou – Digital Image Processing (E12)
11 Color Fundamentals (cont…)
The primary colors can be
added to produce the
secondary colors.

Mixing the three primaries


produces white.

Mixing the a secondary


with its opposite primary
produces white (e.g.
red+cyan).
C. Nikou – Digital Image Processing (E12)
12 Color Fundamentals (cont…)
Important difference:
• Primary colors of light (red, green, blue)
• Primary colors of pigments (colorants)
– A color that subtracts or absorbs a primary color of
light and reflects the other two.
– These are cyan, magenta and yellow (CMY).
– A proper combination of pigment primaries
produces black.

C. Nikou – Digital Image Processing (E12)


13 Color Fundamentals (cont…)
Distinguishing one color from another:
• Brightness
– The achromatic notion of intensity.
• Hue
– The dominant wavelength in a mixture of light
waves (the dominant color perceived by an observer,
e.g. when we call an object red or orange we refer to
its hue).
• Saturation
– The amount of white light mixed with a hue. Pure
colors are fully saturated. Pink (red+white) is less
saturated. C. Nikou – Digital Image Processing (E12)
14 Color Fundamentals (cont…)
Hue and saturation are called chromaticity.

Therefore, any color is characterized by its


brightness and chromaticity.

The amounts of red, green and blue needed to


form a particular color are called tristimulus
values and are denoted by X, Y, Z.

C. Nikou – Digital Image Processing (E12)


15 Color Fundamentals (cont…)
A color is then specified by its trichromatic
coefficients:
X Y Z
x= , y= , z=
X +Y + Z X +Y + Z X +Y + Z

x + y + z =1
For any visible wavelength the tristimulus values
needed to produce that wavelength are obtained
by curves compiled by extensive experimentation.
We will return to that point at the last part of the
lecture.
C. Nikou – Digital Image Processing (E12)
16 CIE Chromaticity Diagram
Specifying colors systematically can be
achieved using the CIE chromacity diagram.
On this diagram the x-axis represents the
proportion of red and the y-axis represents the
proportion of green used to produce a specific
color .
The proportion of blue used in a color is
calculated as:
z = 1 – (x + y)
C. Nikou – Digital Image Processing (E12)
17 CIE Chromacity Diagram (cont…)
Point marked “Green”:
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

62% green, 25% red


and 13% blue.

Point marked “Red”:


32% green, 67% red
and 1% blue.

The diagram is usefull


for color mixing.

C. Nikou – Digital Image Processing (E12)


18 CIE Chromacity Diagram (cont…)
Any color located on
the boundary of the
chromaticity chart is
fully saturated
(“Pure” colors).

C. Nikou – Digital Image Processing (E12)


19 CIE Chromacity Diagram (cont…)
The point of equal
energy (PEE) has
equal amounts of
Red, Green and
Blue and is the CIE
standard for pure
white.

C. Nikou – Digital Image Processing (E12)


20 CIE Chromacity Diagram (cont…)
Any straight line
joining two points in
the diagram defines
all the different
colors that can be
obtained by
combining these
two colors
additively.

C. Nikou – Digital Image Processing (E12)


21 CIE Chromacity Diagram (cont…)
A line drawn from
the PEE to any
point on the
boundary defines all
the shades of that
particular color.

C. Nikou – Digital Image Processing (E12)


22 CIE Chromacity Diagram (cont…)
Combining any
three given colors
we may obtain the
colors enclosed in
the triangle defined
by the three initial
colors.

C. Nikou – Digital Image Processing (E12)


23 CIE Chromacity Diagram (cont…)
A triangle with vertices
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

at any three fixed pure


colors cannot enclose
the entire color region.

C. Nikou – Digital Image Processing (E12)


24 CIE Chromacity Diagram (cont…)
The triangle shows the
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

typical color gamut


produced by RGB
monitors.
This means the entire
color range cannot be
displayed based on
any three colors.
The irregular shape is
the gamut achieved by
high quality color
printers. C. Nikou – Digital Image Processing (E12)
25 CIE Chromacity Diagram (cont…)
The boundary of the
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

printing gamut is
irregular because
printing is a
combination of additive
and subtractive color
mixing.
This is a more difficult
process to control than
that of displaying
colors.
C. Nikou – Digital Image Processing (E12)
26 Color Models
From the previous discussion it should be
obvious that there are different ways to model
color.
We will consider two very popular models
used in color image processing:
– RGB (Red Green Blue)
– HSI (Hue Saturation Intensity)

C. Nikou – Digital Image Processing (E12)


27 RGB
In the RGB model each color appears in its
primary spectral components of red, green and
blue.
The model is based on a Cartesian coordinate
system.

C. Nikou – Digital Image Processing (E12)


28 RGB
– RGB values are at 3
corners.
– Cyan magenta and
yellow are at three other
corners.
– Black is at the origin.
– White is the corner
furthest from the origin.
– Different colors are
points on or inside the
cube represented by
RGB vectors.

C. Nikou – Digital Image Processing (E12)


29 RGB (cont…)
Images represented in the RGB color model
consist of three component images – one for
each primary color.
When fed into a monitor these images are
combined to create a composite color image.
The number of bits used to represent each
pixel is referred to as the color depth.
A 24-bit image is often referred to as a full-
color image as it allows (28) = 16,777,216
3

colors.
C. Nikou – Digital Image Processing (E12)
30
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
RGB (cont…)

These are scalar valued pixels

C. Nikou – Digital Image Processing (E12)


31 The HSI Color Model
RGB is useful for hardware implementations
and is serendipitously related to the way in
which the human visual system works.
However, RGB is not a particularly intuitive
way in which to describe colors.
Rather when people describe colors they tend
to use hue, saturation and brightness.
RGB is great for color generation, but HSI is
great for color description.
C. Nikou – Digital Image Processing (E12)
32 The HSI Color Model (cont…)
Reminder:
– Hue: A color attribute that describes a pure color
(pure yellow, orange or red).
– Saturation: Gives a measure of how much a
pure color is diluted with white light.
– Intensity: Brightness is nearly impossible to
measure because it is so subjective. Instead we
use intensity. Intensity is the same achromatic
notion that we have seen in grey level images.

C. Nikou – Digital Image Processing (E12)


33 HSI, Intensity & RGB
Intensity can be extracted from RGB images.
However, human perception of color does not
refer to percentages of RGB.
Remember the diagonal on the RGB color
cube that we saw previously ran from black to
white.
Now consider if we stand this cube on the
black vertex and position the white vertex
directly above it.
C. Nikou – Digital Image Processing (E12)
34 HSI, Intensity & RGB (cont…)
The intensity component
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

of any color can be


determined by passing a
plane perpendicular to
the intenisty axis and
containing the color
point.
The intersection of the plane
with the intensity axis gives us the intensity
component of the color.
C. Nikou – Digital Image Processing (E12)
35 HSI, Intensity & RGB (cont…)

The saturation of a color


Images taken from Gonzalez & Woods, Digital Image Processing (2002)

(percentage of white
missing from the color)
increases as a function of
distance from the
intensity axis.

C. Nikou – Digital Image Processing (E12)


36 HSI, Hue & RGB
In a similar way we can extract the hue from
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

the RGB color cube.


Consider a plane defined by
the three points cyan, black
and white.
All points contained in
this plane must have the
same hue (cyan) as black
and white cannot contribute
hue information to a color.
C. Nikou – Digital Image Processing (E12)
37 HSI, Hue & RGB
By rotating the shaded
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

plane around the


intensity axis we obtain
different hues.

Conclusion:
The HIS values can be
obtained from the RGB
values. We have to work
the gometric formulas.
C. Nikou – Digital Image Processing (E12)
38 The HSI Color Model
If we look straight down at the RGB cube as it was
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

arranged previously
we would see a hexagonal
shape with each primary
color separated by 120°
and secondary colors
at 60°from the primaries.
The HSI model is
composed of a vertical
intensity axis and the locus of color points that lie on
planes perpendicular to that axis.
C. Nikou – Digital Image Processing (E12)
39 The HSI Color Model (cont…)
To the right we see a hexagonal
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

shape and an arbitrary color


point
– The hue is determined by an
angle from a reference point,
usually red.
– The saturation is the distance from the origin to the
point.
– The intensity is determined by how far up the
vertical intenisty axis this hexagonal plane sits (not
apparent from this diagram
C. Nikou – Digital Image Processing (E12)
40 The HSI Color Model (cont…)
Because the only important things are the angle
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

and the length of the saturation vector this


plane is also often represented as a circle or a
triangle

C. Nikou – Digital Image Processing (E12)


Images taken from Gonzalez & Woods, Digital Image Processing (2002)
41

C. Nikou – Digital Image Processing (E12)


HSI Model Examples
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
42

C. Nikou – Digital Image Processing (E12)


HSI Model Examples
43 Converting From RGB To HSI
Given a color as R, G, and B its H, S, and I
values are calculated as follows:
⎧ ⎫
2 [(
⎧θ if B ≤ G ⎪ 1
R − G) + (R − B)] ⎪
H =⎨ θ = cos ⎨
−1
1 ⎬
⎩ 360 − θ if B > G
⎩ [
⎪ (R − G)2 + (R − B)(G − B) ]2

3
S = 1− [min(R,G,B)] I= 1
(R + G + B)
(R + G + B) 3

C. Nikou – Digital Image Processing (E12)


44 Converting From HSI To RGB
Given a color as H, S, and I it’s R, G, and B
values are calculated as follows:
– RG sector (0 <= H < 120°)
⎡ S cos H ⎤
R = I ⎢1 + ⎥ , G = 3I − ( R + B ) , B = I (1− S )
⎣ cos ( 60 − H ) ⎦

– GB sector (120° <= H < 240°)


⎡ S cos ( H − 120 ) ⎤
R = I (1 − S ) , G = I ⎢1 + ⎥ , B = 3I − (R + G)
⎣ cos ( H − 60 ) ⎦

C. Nikou – Digital Image Processing (E12)


45 Converting From HSI To RGB (cont…)
– BR sector (240° <= H <= 360°)

⎡ S cos ( H − 240 ) ⎤
R = 3I − ( G + B ) , G = I (1 − S ) , B = I ⎢1 + ⎥
⎣ cos ( H − 180 ) ⎦

C. Nikou – Digital Image Processing (E12)


46
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
HSI & RGB

RGB Color Cube

H, S, and I Components of RGB Color Cube

C. Nikou – Digital Image Processing (E12)


47 Manipulating Images In The HSI Model

In order to manipulate an image under the HSI


model we:
– First convert it from RGB to HSI
– Perform our manipulations under HSI
– Finally convert the image back from HSI to RGB

RGB HSI RGB


Image Image Image

Manipulations

C. Nikou – Digital Image Processing (E12)


48
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
RGB -> HSI -> RGB

RGB
Hue
Image

Saturation Intensity

C. Nikou – Digital Image Processing (E12)


49
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
RGB -> HSI -> RGB (cont…)

Hue
Saturation

Intensity RGB
Image

C. Nikou – Digital Image Processing (E12)


50 Pseudocolor Image Processing
Pseudocolor (also called false color)
image processing consists of assigning
colors to grey values based on a specific
criterion.

The principle use of pseudocolor image


processing is for human visualisation
– Humans can discern between thousands
of color shades and intensities, compared
to only about two dozen or so shades of
grey.

C. Nikou – Digital Image Processing (E12)


51
Pseudo Color Image Processing –
Intensity Slicing
Intensity slicing and color coding is one of the
simplest kinds of pseudocolor image processing.
First we consider an image as a 3D function
mapping spatial coordinates to intensities (that we
can consider heights).
Now consider placing planes at certain levels parallel
to the coordinate plane.
If a value is one side of such a plane it is rendered in
one color, and a different color if on the other side.

C. Nikou – Digital Image Processing (E12)


52
Pseudocolor Image Processing –
Intensity Slicing (cont…)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

C. Nikou – Digital Image Processing (E12)


53
Pseudocolor Image Processing –
Intensity Slicing (cont…)
In general intensity slicing can be summarised
as:
– Let [0, L-1] represent the grey scale
– Let l0 represent black [f(x, y) = 0] and let lL-1
represent white [f(x, y) = L-1]
– Suppose P planes perpendicular to the intensity
axis are defined at levels l1, l2, …, lp
– Assuming that 0 < P < L-1 then the P planes
partition the grey scale into P + 1 intervals V1,
V2,…,VP+1

C. Nikou – Digital Image Processing (E12)


54
Pseudocolor Image Processing –
Intensity Slicing (cont…)
– Grey level color assignments can then be made
according to the relation:
f (x, y) = c k if f (x, y) ∈ Vk
– where ck is the color associated with the kth
intensity level Vk defined by the partitioning
planes at l = k – 1 and l = k

C. Nikou – Digital Image Processing (E12)


55
Pseudocolor Image Processing –
Intensity Slicing (cont…)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

C. Nikou – Digital Image Processing (E12)


56
Pseudocolor Image Processing –
Intensity Slicing (cont…)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

C. Nikou – Digital Image Processing (E12)


57
Pseudocolor Image Processing –
Intensity Slicing (cont…)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

Assining the yellow color to intensity 255 and the blue color to the
rest of the intensities may help a human inspector to rapidly evaluate
a crack in an image of a weld.

C. Nikou – Digital Image Processing (E12)


58
Pseudocolor Image Processing –
Intensity Slicing (cont…)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

C. Nikou – Digital Image Processing (E12)


Images taken from Gonzalez & Woods, Digital Image Processing (2002)
59

C. Nikou – Digital Image Processing (E12)


Color Transformations
60
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Color Transformations (cont…)

C. Nikou – Digital Image Processing (E12)


Images taken from Gonzalez & Woods, Digital Image Processing (2002)
61

C. Nikou – Digital Image Processing (E12)


Color Image Smoothing
62
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Color Image Smoothing (cont…)

C. Nikou – Digital Image Processing (E12)


63 Color Image Smoothing (cont…)
HSI decouples intensity from color. Suitable for
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

processing only the intensity component of an


image.

C. Nikou – Digital Image Processing (E12)


64 Color Image Sharpening
The difference becomes more pronounced by
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

increasing the filter size.

C. Nikou – Digital Image Processing (E12)


65 Color Image Gradient
The standard approach of taking the partial
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

derivatives with respect to each color and


adding them to form the corresponding
gradient image fails.

The gradient, as we have studied it, refers to


a scalar valued 2D function.

In color images we have a vector valued 2D


function.
C. Nikou – Digital Image Processing (E12)
66 Color Image Gradient (cont…)
In both cases (a) and (b), the standard approach
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

would give the same gradient magnitude at the


center of the image. However, in (b) we would
expect a lower magnitude as only two edges are in
the same direction.

(a)

(b)

R G B Color image

C. Nikou – Digital Image Processing (E12)


67 Color Image Gradient (cont…)
The goal is to find a vector pointing in the
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

direction of maximum rate of change of


c(x,y)=[R(x,y) G(x,y),B(x,y)]T
(this is the definition of the gradient).

Let r, g and b be unit vectors along the R, G


and B axes and define:
∂R ∂G ∂B ∂R ∂G ∂B
u= r+ g+ b v= r+ g+ b
∂x ∂x ∂x ∂y ∂y ∂y
C. Nikou – Digital Image Processing (E12)
68 Color Image Gradient (cont…)
Let also:
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

∂R ∂G ∂B
2 2 2

g xx = uiu = u iu =
T
+ +
∂x ∂x ∂x
2 2 2
∂R ∂G ∂B
g yy = v i v = v i v =
T
+ +
∂y ∂y ∂y

∂R ∂R ∂G ∂G ∂B ∂B
g xy = ui v = u i v =
T
+ +
∂x ∂y ∂x ∂y ∂x ∂y
C. Nikou – Digital Image Processing (E12)
69 Color Image Gradient (cont…)
The direction of maximum rate of change of
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

c(x,y)=[R(x,y) G(x,y),B(x,y)]T is [Di Zenzo 86]:

1 ⎛ 2 g xy ⎞
θ ( x, y ) = tan ⎜
−1
⎟⎟
2 ⎜g −g
⎝ xx yy ⎠
and the value of that rate of change is:
1
⎧1 ⎫
Fθ ( x, y ) = ⎨ ⎡⎣( g xx + g yy ) + ( g xx − g yy ) cos ( 2θ ( x, y ) ) + 2 g xy sin ( 2θ ( x, y ) ) ⎤⎦ ⎬
2

⎩2 ⎭

C. Nikou – Digital Image Processing (E12)


70
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Color Image Gradient (cont…)

C. Nikou – Digital Image Processing (E12)


71 Noise in Color Images
The noise models discussed for grayscale
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

images are also applicable to color images.


However, in many applications, a color channel
may be more or less affected than the other
channels.
For instance, using a red color filter in a CCD
camera may affect the red component of the
image (CCD sensors are noisier at low levels of
illumination).
We will take a brief look of how noise carries over
when converting from one color model to
another.
C. Nikou – Digital Image Processing (E12)
72
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Noise in Color Images (cont…)

Noise is less noticeable than it is in a grayscale image.


C. Nikou – Digital Image Processing (E12)
73
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Noise in Color Images (cont…)

• The hue and saturation components are significantly degraded.


This is due to the nonlinearity of the cos and min operation used
in the transformation.

• The intensity component is smoother due to averaging of the


three noisy RGB components.

C. Nikou – Digital Image Processing (E12)


74 Noise in Color Images (cont…)
When only one channel is
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

affected by noise, conversion to


HSI spreads the noise to all HSI
components images.

This is due to the transformation


that makes use of all RGB
components to compute each
HSI component.

C. Nikou – Digital Image Processing (E12)


75 Color Perception Model
We have seen at the beginning of the lecture that
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

the human visual system has three primary


sensing groups for the cones Si(λ), i=1,2,3.

C. Nikou – Digital Image Processing (E12)


76 Color Perception Model (cont…)
The perception of a color with spectral energy
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

distribution C(λ) is described by the responses of


the three primaries to that color:
λmax
ai (C ) = ∫λ Si (λ )C (λ )d λ , i = 1, 2,3
min

Two colors C1(λ) and C2(λ) are perceived to be


identical (they look the same) if:

ai (C1 ) = ai (C2 ), i = 1, 2,3


C. Nikou – Digital Image Processing (E12)
77 Color Perception Model (cont…)
This means that colors with different spectral
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

distributions, that is
C1(λ) ≠ C2(λ),

may look the same because


α1(C1) = α2(C2).

This happens because the human responses to


color, Si(λ), i=1,2,3, are not a basis (they are not
orthogonal), and consequently they do not span
the space of colors C(λ).
C. Nikou – Digital Image Processing (E12)
78 Color Reproduction
One of the basic problems in the study of color is
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

the reproduction of a color from a set of light


sources (primaries).
Generally, due to the human reception model we
consider three primaries.

Let the three primaries have spectral densities


Pk(λ), k=1,2,3, with
λmax ( k )

λ
∫ Pk (λ )d λ = 1, k = 1, 2,3
min ( k )

C. Nikou – Digital Image Processing (E12)


79 Color Reproduction (cont…)
Let also the primaries be linearly independent (no
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

linear combination of any two primaries produces


the third primary).

We mix the primaries Pk(λ), k=1,2,3, with


proportions βk , k=1,2,3 to reproduce a color with
spectrum C(λ). This means that C(λ) must appear
the same to the observer as the linear
combination of the primaries:
⎛ 3 ⎞
ai ( C ) = ai ⎜ ∑ β k Pk (λ ) ⎟
⎝ k =1 ⎠
C. Nikou – Digital Image Processing (E12)
80 Color Reproduction (cont…)
The problem consists in estimating the mixing
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

proportions βk , k=1,2,3:
⎛ 3

ai ( C ) = ai ⎜ ∑ β k Pk (λ ) ⎟ ⇔
⎝ k =1 ⎠
λmax ( i ) λmax ( i ) 3

∫ Si (λ )C (λ )d λ = ∫ Si (λ )∑ βκ Pk (λ ) d λ , ⇔
λmin ( i ) λmin ( i )
k =1

λmax ( i ) 3 λmax ( i )

∫ Si (λ )C (λ )d λ = ∑ βκ ∫ Si (λ ) Pk (λ )d λ , ⇔
λmin ( i )
k =1 λmin ( i )

C. Nikou – Digital Image Processing (E12)


81 Color Reproduction (cont…)
Leading to a linear system of 3 equations with βk ,
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

k=1,2,3 as unknowns:

λmax ( i ) 3 λmax ( i )

∫ Si (λ )C (λ )d λ = ∑ βκ ∫ Si (λ ) Pk (λ )d λ , ⇔
λmin ( i )
k =1 λ min ( i )

3
ai ( C ) = ∑ β k ⎡⎣ ai ( Pk (λ ) ) ⎤⎦ , i = 1, 2,3.
k =1

C. Nikou – Digital Image Processing (E12)


82 Color Reproduction (cont…)
In practice, the primary sources are calibrated
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

against a reference white light source with known


energy distribution.
Let wk denote the amount of the k-th primary
required to match the reference white. Then, the
quantities
βk
Tk (C ) = , k = 1, 2,3,
wk
are called tristimulus values of the color C.
The tristimulus values for the reference white are
unity.
C. Nikou – Digital Image Processing (E12)
83 Color Reproduction (cont…)
The tristimulus values of a color give the amount
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

of primaries needed to match that color.

Using the color reproduction equations, we can


compute the tristimulus values for each discrete
wavelength λ0 , that is, C(λ)=δ(λ-λ0).

Therefore, we can draw the curves for the


tristimulus values Tk(λ) for all λ.

C. Nikou – Digital Image Processing (E12)


84
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Color Reproduction (cont…)

The negative values for a part of the red curve clearly show
that we cannot reproduce every color with the RGB primaries
(as we have also explained by the chromaticity diagram).

C. Nikou – Digital Image Processing (E12)

You might also like