Dip 12 34
Dip 12 34
colour system
1
Colour Models
It is a specification of a coordinate
system & a subspace within that
system where each colour is
represented by a single point
2
3
The RGB Colour Model
4
Different colours in the model are
points on or inside the cube
RGB
Monitor
Composite colour
image
Three images
combine on
phosphor screen
5
E ac
h RG
is a B im
t age
Pixel Depth valu ri p
es (R let of
, G,
B)
6
24-bit RGB image = 16,777,216 colours
Many systems today limited to 256 colours
7
256
es e Remaining 216
f t h s ntly de facto standard for safe
o u r
40 colo iffere colours, especially in Internet
d
d nt O S
s e Applications
o ces ffere
Pr y di
b
Black 000000
White FFFFFF
9
The CMY & CMYK Ki
sf
bla or
cK
Colour Models
Devices that deposit coloured pigments on paper
(e.g. coloured printers, copiers etc)
require CMY data input
RGB to CMY conversion is done internally using the
following operation
But …
RGB, CMY & other similar models not well suited for
describing colours in terms that are practical for human
interpretation.
We do not think of colour
images as being composed of 3
primary images combined to
form that single image!!
12
The HSI Colour Model
The HSI Colour Model was designed
having in mind the way graphic
designers and artists think of colours.
13
HSV Color Space
more intuitive
color space Saturation
for people Value
H = Hue
S = Saturation
V = Value
or brightness B Hue
or intensity I
or lightness L
14
Like in
other
colour
spaces, a
colour is a
vector.
16
Converting Colours from
RGB to HSI
Given an image in RGB format, the H, S & I components for HSI model
can be obtained as follows.
Assumption:
cos
1
( R G ) ( R B ) / 2
( R G ) ( R B )(G B )
2
•RGB values in
the range [0, 1]
BG
•θ is measured
H
360 B G
wrt the red axis
of the HSI space
3 min( R, G, B)
•H can be
S 1
normalized by
dividing by 3600
RG B
I R G B / 3
17
Converting Colours from Given values of
HSI in the interval
HSI to RGB [0, 1], it is required
to find the RGB
RG Sector values in the same
00 ≤ H < 1200 range.
B = I (1 – S)
G = 1 – (R + B)
18
GB Sector
1200 ≤ H < 2400
The given value of H is in this sector – first subtract 1200 from it
H = H - 1200
R = I (1 – S)
B = 1 – (R + G)
19
BR Sector
2400 ≤ H ≤ 3600
The given value of H is in this sector – first subtract 2400 from it
H = H - 2400
G = I (1 – S)
R = 1 – (G + B)
20
Pseudo coloring
Eye can distinguish between ~30 different grey-levels
... and 350,000 different colors
22
Intensity Slicing
(A Technique for Pseudo colouring)
For 3-D images, use a plane at f(x,y)=li to slice the
image function into two levels
27
ri color component of f(x,y) si color components of g(x,y)
29
Let c be an arbitrary vector in RGB colour space, whose
components represent the RGB components of a colour
image.
31
32
Laplacian
ecap
R It is a function (image) f(x, y) of
two variables, defined as
2 f
f ( x 1, y ) f ( x 1, y ) 2 f ( x, y )
x 2
f f 2 2
f 2 2
2
x y
2 f
f ( x, y 1) f ( x, y 1) 2 f ( x33, y )
y 2
Note:
The Laplacian of a vector is defined as a vector whose
components are equal to the Laplacian of the individual
scalar components of the i/p vector.
34