Color Image Processing
Color Image Processing
Video Processing
Module 4
Color Image processing
Syllabus
Color fundamentals, color models, pseudo
color image processing, basics of fullcolor
image processing, color transforms,
smoothing and sharpening, color
segmentation
Module 5 Image Compression
Image compression fundamentals coding
Redundancy, spatial and temporal redundancy
Compression models : Lossy and Lossless,
Huffmann coding, Arithmetic coding, LZW
coding, run length coding, Bit Plane coding,
transform coding, predictive coding , wavelet
coding, JPEG standards
Module 6 Video Processing & 2-D Motion
Estimation
Analog video, Digital Video, Time varying Image Formation
models : 3D motion models, Geometric Image formation ,
Photometric Image formation, sampling of video signals,
filtering operations.
Optical flow, general methodologies, pixel based motion
estimation, Block matching algorithm, Mesh based motion
Estimation, global Motion Estimation, Region based
motion estimation, multi resolution motion estimation.
Waveform based coding, Block based transform coding,
predictive coding, Application of motion estimation in
video coding
Physical Background
Visible light: a narrow band of
electromagnetic radiation
380nm (blue) - 780nm (red)
Wavelength: Each physically
distinct colour corresponds to at
least one wavelength in this band.
Pure Colours: Pure or
monochromatic colours do not
exist in nature.
Spectrum: Intensity as
a function of wavelength.
From http://fuse.pha.jhu.edu/~wpb/spectroscopy/basics.html
RGB
(0,0,0)
RGB
In the RGB model each colour appears in its primary
spectral components of red, green and blue
The model is based on a Cartesian coordinate system
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 colours are points on or inside the cube
represented by RGB vectors
RGB
Images represented in the RGB colour model
consist of three component images one for each
primary colour
When fed into a monitor these images are
combined to create a composite colour image
The number of bits used to represent each pixel is
referred to as the colour depth
A 24-bit image is often referred to as a full-colour
image as it allows = 16,777,216 colours
Dealing with Lighting Changes
Knowing just the RGB values is not enough to
know everything about the image.
The R, G and B primaries used by different devices are
usually different.
For scientific work, the camera and lighting
should be calibrated.
For multimedia applications, this is more difficult
to organise:
Algorithms exist for estimating the illumination colour.
Processing Vectorial Images
A vectorial image has a vector at each pixel. For colour
images, these vectors each have 3 components.
Vectorial images with larger numbers of components
also exist, e.g. in satellite imagery.
There are two ways one can process vectorial images:
Marginal processing.
Vectorial processing.
Greyscale
Colour
Red Red
Scalar process.
Green Green
Scalar process.
Blue Blue
Scalar process.
Vectorial Processing
The colour triplets are processed as single units:
Red Red
Vectorial
Median
Alternative Colour Spaces
Various other colour representations can be
calculated from the RGB representation.
This can be done for:
Decorrelating the colour channels:
principal components.
Bringing colour information to the fore:
Hue, saturation and brightness.
Perceptual uniformity:
CIELuv, CIELab,
Processing Strategy
Red Red
Processing
Green Green
T T-1
Blue Blue
Colour spaces
RGB (CIE), RnGnBn (TV - National Television Standard Comittee)
XYZ (CIE)
UVW (UCS de la CIE), U*V*W* (UCS modified by the CIE)
YUV, YIQ, YCbCr
YDbDr
DSH, HSV, HLS, IHS
Munsel colour space (cylindrical representation)
CIELuv
CIELab
SMPTE-C RGB
YES (Xerox)
Kodak Photo CD, YCC, YPbPr, ...
Color Fundamentals
Tristimulus
Red, green, and blue are denoted X, Y, and Z, respectively. A
color is defined by its trichromatic coefficients, defined as
X
x=
X +Y + Z
Y
y=
X +Y + Z
Z
z=
X +Y + Z
CIE Chromaticity Diagram
It shows color
composition as
a function of x
(red) and y
(green)
RGB Color Model
RGB Color Model
Pixel depth
C 1 R
M =
1-
G
Y
1
B
Equal amounts of the pigment primaries, cyan, magenta, and yellow
should produce black. In practice, combining these colors for
printing produces a muddy-looking black.
http://en.wikipedia.org/wiki/CMYK
HIS Color Model
q
if B G
H =
360 - q if B>G
1
-1
[ ( R - G ) + ( R - B ) ]
q = cos 2
1/ 2
(R - G ) + ( R - B)(G - B)
2
Converting Colors from RGB to HSI
3
S = 1- [ min( R, G, B)]
( R + G + B)
Converting Colors from RGB to HSI
1
I = ( R + G + B)
3
Converting Colors from HSI to RGB
B = I (1 - S )
S cos H
R=I 1+
cos(60 - H )
o
and
G = 3I - ( R + B )
Converting Colors from HSI to RGB
H = H - 120o
R = I (1 - S )
S cos H
G=I1+
cos(60 - H )
o
and
B = 3I - ( R + G )
Converting Colors from HSI to RGB
H = H - 240o
G = I (1 - S )
S cos H
B=I1+
cos(60 - H )
o
and
R = 3I - (G + B )
Pseudocolor Image Processing
Intensity Slicing
f ( x, y ) = ck if f ( x, y ) Vk
Pseudocolor Image Processing
g ( x, y ) = T [ f ( x, y ) ]
ri otherwise
Color slicing
( j j ) 0
2
0.5 if r - a > R 2
si = j =1
ri otherwise
Color slicing
Tone and
Color
Corrections
Color Image Smoothing
R ( x, y )
2
2
[ c ( x, y ) ] =
2
G ( x, y )
2
B ( x , y )
Image
Segmentation
Based on Color:
Segmentation in
HIS Color Space
Segmentation in RGB Vector Space