Color Image
Processing
Presented by
Anil Kumar H A
[13MVD1002]
1
Color Image Processing
Color
simplifies object extraction and
identification
human vision : thousands of colors vs
max-24 gray levels
Color Spectrum
white light with a prism (1966, Newton)
2
Color Image Processing
RGB : Color Monitor, Color Camera, Color
Scanner
CMY : Color Printer, Color Copier
YIQ : Color TV ,Y(luminance), I(Inphase),
Q(quadrature)
HSI, HSV
Color Image Processing
RGB Model
Color Image Processing
CMY Model
Color Printer, Color Copier
RGB data CMY
C 1 R
M 1 G
Y 1 B
Color Image Processing
Y 0.299 0.587 0.114
I 0.596 0.275 0.321
Q 0.212 0.523 0.311
R
G
B
R
G
1 0.956 0.620
1 0.272 0.647
B 1 1.108 1.705
Y
I
Q
Color Image Processing
Color Image Processing
RGB to HSI Conversion
1
I ( R G B),
3
where 0 I , R, G, B 1
1
[( R G ) ( R B)]
H cos 1{ 2
},
2
( R G ) ( R B)(G B )
H 360 H ,
if g 0 b0
if g 0 b0
where g 0 G / I , b0 B / I
3
S 1
(min{R, G, B})
RG B
8
Color Image Processing
HSI to RGB Conversion
1
B (1 S )
3
assume 0 H 120
1
S cos H
R [1
]
3
cos(60 H )
G 1 R B
Image Retrieval Application
Content-Based Image Retrieval
System
f e a tu re
e x tra c tio n
In d e x
f e a tu r e in f o r m a tio n
in d e x
q u e ry
Q u e ry
r e s u lt
Im a g e d a ta b a s e
R e t r ie v a l
d e c o m p r e s s io n
c o m p r e s s io n im a g e
10
Image Retrieval Application
Color Features for Image Indexing
Color Histogram
an estimate of the probability of occurrence
of color intensities
simple and geometric invariance(translation,
rotation, and scaling)
lack of spatial information of objects
Dominant Colors
11
Image Retrieval Application
Example of Color Histogram in HSI
Model
- Hue : range [0, 360]
- Saturation : range[0, 1]
- Intensity : range[0, 1]
- Total 36 bin quantization
Hue : 6bin
Saturation : 2bin
Intensity: 3bin
12
Introduction to Digital
Image(color) Processing
Human vision - perceive and understand world
Computer vision, Image Understanding /
Interpretation, Image processing.
3D world -> sensors (TV cameras) -> 2D images
Dimension reduction -> loss of information
low level image processing
transform of one image to another
high level image understanding
knowledge based - imitate human cognition
make decisions according to information in image
13
Introduction to Digital Image
Processing
Classification / decision
Algorithm
Complexity
Increases
HIGH
MEDIUM
LOW
Acquisition,
Amount of preprocessing
Data
Decreases
Raw data
no
intelligence
Extraction,
edge joining
Recognition,
interpretation
intelligent
14
Low level digital image
processing
Low level computer vision ~ digital image processing
Image Acquisition
image captured by a sensor (TV camera) and digitized
Preprocessing
suppresses noise (image pre-processing)
enhances some object features - relevant to understanding the
image
edge extraction, smoothing, thresholding etc.
Image segmentation
separate objects from the image background
colour segmentation, region growing, edge linking etc
Object description and classification
after segmentation
15
Signals and Functions
What is an image
Signal = function (variable with physical
meaning)
one-dimensional (e.g. dependent on time)
two-dimensional (e.g. images dependent on two coordinates in a plane)
three-dimensional (e.g. describing an object in space)
higher-dimensional
Scalar functions
sufficient to describe a monochromatic image intensity images
Vector functions
represent color images - three component colors
16
Image Functions
Image - continuous function of a number of variables
Co-ordinates x, y in a spatial plane
for image sequences - variable (time) t
Image function value = brightness at image points
other physical quantities
temperature, pressure distribution, distance from the
observer
Image on the human eye retina / TV camera sensor intrinsically 2D
2D image using brightness points = intensity image
Mapping 3D real world -> 2D image
2D intensity image = perspective projection of the 3D scene
information lost - transformation is not one-to-one
geometric problem - information recovery
understanding brightness info
17
Image Acquisition &
Manipulation
Analogue camera
frame grabber
video capture card
Digital camera / video recorder
Capture rate 30 frames / second
HVS persistence of vision
Computer, digitised image, software (usually c)
f(x,y) #define M 128
#define N 128
unsigned char f[N][M]
2D array of size N*M
Each element contains an intensity value
Image definition
Image definition:
B
1
6
8
A 2D function obtained by sensing a scene
f(o,o)
F(x,y),
F(x
,x
),
F(x)
1
2
F - intensity, grey level
x,y - spatial co-ordinates
f(N-1,M-1)
No. of grey levels,
L = 2B
B = no. of bits
L
2
54
256
Description
Binary Image (black and white)
64 levels, limit of human visual system
Typical grey level resolution
Brightness and 2D images
Brightness dependent several factors
object surface reflectance properties
surface material, microstructure and marking
illumination properties
object surface orientation with respect to a viewer
and light source
Some Scientific / technical disciplines work
with 2D images directly
image of flat specimen viewed by a microscope
with transparent illumination
character drawn on a sheet of paper
image of a fingerprint
20
Monochromatic images
Image processing - static images - time t is constant
Monochromatic static image - continuous image function f(x,y)
arguments - two co-ordinates (x,y)
Digital image functions - represented by matrices
co-ordinates = integer numbers
Cartesian (horizontal x axis, vertical y axis)
OR (row, column) matrices
Monochromatic image function range
lowest value - black
highest value - white
Limited brightness values = gray levels
21
Chromatic images
Colour
Represented by vector not scalar
Red, Green, Blue (RGB)
Hue, Saturation, Value (HSV)
luminance, chrominance (Yuv , Luv)
S=0
Green
Hue degrees:
Red, 0 deg
Green 120 deg
Blue 240 deg
Red
Green
V=0
22
Use of colour space
23
Image quality
Quality of digital image proportional to:
spatial resolution
proximity of image samples in image plane
spectral resolution
bandwidth of light frequencies captured by sensor
radiometric resolution
number of distinguishable gray levels
time resolution
interval between time samples at which images
captured
24
Image summary
N
F(xi,yj)
i
= 0 --> N-1
j
= 0 --> M-1
N*M = spatial resolution, size of
image
L
= intensity levels, grey levels
= no. of bits
f(o,o)
M
f(N-1,M-1)
Digital Image Storage
Stored in two parts
header
width, height cookie.
Cookie is an indicator of what type of image file
data
uncompressed, compressed, ascii, binary.
File types
JPEG, BMP, PPM.
26
PPM, Portable Pixel Map
Cookie
Px
Where x is:
1 - (ascii) binary image (black & white, 0 &
1)
2 - (ascii) grey-scale image (monochromic)
3 - (ascii) colour (RGB)
4 - (binary) binary image
5 - (binary) grey-scale image
(monochromatic)
6 - (binary) colour (RGB)
27
PPM example
PPM colour file RGB
P3
# feep.ppm
44
15
0 0 0
0 0
0 0 0
0 15
0 0 0
0 0
15 0 15
0 0
0
7
0
0
0 0
0 0
0 15
0 0
0 15 0 15
0
0 0 0
7 0 0 0
0
0 0 0
28
Image
presentation (1)
1.1 Image
capture,
representation
, and storage:
digital image,
DPI, pixel...
Example:
Various
quantizing
level: (a) 6
bits; (b) 4 bits;
Image presentation
(2)
1.2 Color representation:
Color systems: RGB, CMY/CMYK, HSI,
YCbCr
Summary
We know following terms:
digital image (pixel, gray level)
colormap
digitization
continuous-tone image
sampling
quantization
dynamic range
spatial resolution
pixelation
brightness resolution
posterization & brightness contouring
digital image processing
digital image analysis
31