Colour Transformations
Colour Transformations
P Kadebu
Light energy of different wavelengths and
frequency
Light energy is made up of photons
Prism – Light energy gets refracted and changes
speed to produce 7 colors.
Light energy varies directly with frequency. The
higher the frequency, the higher is going to be the
energy.
Different wavelength, different frequency gives
rise to different colors.
Visible light has wavelength of 10-6
Eyes are made of cones.
Cones are trichromatic.
We detect only 3 colors that is Red, Green and
Blue.
Rods are sensitive to low light.
Cones are sensitive to high light
Objects are made up of different atoms. They
can:
absorb light
Scatter light
Refract light
Reflect light
Do nothing
RGB
CYM
CYMK
HSL
YIQ
Describes properties and behaviour of a color
in a particular context
6~7M Cones are the sensors in the eye
3 principal sensing categories in eyes
Red light 65%, green light 33%, and blue light 2%
In 1931, CIE(International Commission on
Illumination) defines specific wavelength values to
the primary colors
B = 435.8 nm, G = 546.1 nm, R = 700 nm
However, we know that no single color may be called
red, green, or blue
Secondary colors: G+B=Cyan, R+G=Yellow,
R+B=Magenta
Primary color of pigments
Color that subtracts or absorbs a primary
color of light and reflects or transmits the
other two
By additivity of colors:
Any color inside the
triangle can be produced
by combinations of the
three initial colors
RGB gamut of
monitors
Color gamut of
printers
Color model, color space, color system
Specify colors in a standard way
A coordinate system that each color is
represented by a single point
RGB model
Suitable for hardware or
CYM model applications
CYMK model
HSI model - match the human description
Pixel depth: the number of bits used to
represent each pixel in RGB space
Full-color image: 24-bit RGB color image
(R, G, B) = (8 bits, 8 bits, 8 bits)
C, M and Y are supposed to be missing to
become black
However it does not become black but brown
The amount of black can be found and
removed
CMY: secondary colors of light, or
primary colors of pigments
Used to generate hardcopy output
Transformation matrix of conversion from
CMY to RGB
C 1 R
M 1 G
Y 1 B
Will you describe a color using its R, G, B
components?
Humans describe a color by its hue, saturation,
and brightness
Hue : color attribute
Saturation: purity of color (white->0, primary color-
>1)
Brightness: achromatic notion of intensity
RGB -> HSI model Colors on this triangle
Have the same hue
Intensity
line
saturation
HSI model
R,G,B Hue
intensity
saturation
Interface for selecting colors often use a color model
based on intuitive concepts rather than a set of primary
colors
The HSV parameters
Color parameters are hue (H), saturation (S) and value
(V)
Derived by relating the HSV parameters to the
direction in the RGB cube
Obtain a color hexagon by viewing the RGB cube along
the diagonal from the white vertex to the origin
The HSV hexcone
Hue is represented as an angle about the vertical axis
ranging from 0 degree at red to 360 degree
Saturation parameter is used to designate the purity of
a color
Value is measured along a vertical axis through center
of hexcone
Color components:
Hue (H) ∈ [0°, 360°]
Saturation (S) ∈ [0, 1]
Value (V) ∈ [0, 1]
A pixel at (x,y) is a vector in the color space
RGB color space
R( x, y)
c( x, y) G( x, y)
B( x, y)
c.f. gray-scale image
f(x,y) = I(x,y)
Per-color-component processing
Process each color component
Vector-based processing
Process the color vector of each pixel
When can the above methods be equivalent?
Process can be applied to both scalars and vectors
Operation on each component of a vector must be
independent of the other component
Similar to gray scale processing studied before,
we have to major categories
Pixel-wise processing
Neighborhood processing
Similar to gray scale transformation
g(x,y)=T[f(x,y)]
Color transformation
si = k ri +(1-k)
Recall the pseudo-color intensity slicing
1-D intensity
How to take a region of colors of interest?
prototype color
prototype color
Neighborhood
Centered at (x,y)
1
R ( x, y )
K ( x , y )S xy
1
c( x, y ) G ( x, y ) per-component processing
K ( x , y )S xy
1
K B ( x, y )
( x , y )S xy
original R
G G
H S I
Smooth I
RGB model in HSI model difference