Professional Documents
Culture Documents
of
39
15
RGB (cont…)
16
of
39
RGB (cont…)
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 28 = 16,777,216
3
colours
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
of
39
17
RGB (cont…)
18
of
39
The HSI Colour 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 colours
Rather when people describe colours they
tend to use hue, saturation and brightness
RGB is great for colour generation, but HSI is
great for colour description
19
of
39
The HSI Colour Model (cont…)
The HSI model uses three measures to
describe colours:
– Hue: A colour attribute that describes a pure
colour (pure yellow, orange or red)
– Saturation: Gives a measure of how much a
pure colour 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
20
of
39
HSI, Intensity & RGB
Intensity can be extracted from RGB images –
which is not surprising if we stop to think about
it
Remember the diagonal on the RGB colour
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
21
of
39
HSI, Intensity & RGB (cont…)
Now the intensity component
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
of
39
26
HSI Model Examples
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
of
39
27
HSI Model Examples
28
of
39
Converting From RGB To HSI
Given a colour as R, G, and B its H, S, and I
values are calculated as follows:
2 R G R B
if B G 1
H cos
1
1
360 if B G
R G2 R BG B 2
min R,G,B
3
S 1 I 1
R G B
R G B
3
29
of
39
Converting From HSI To RGB
Given a colour as H, S, and I it’s R, G, and B
values are calculated as follows:
– RG sector (0 <= H < 120°)
S cosH
R I1 G 3I R B B I 1 S
cos60 H
31
of
39
HSI & RGB
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
RGB RGB
HSI Image
Image Image
Manipulations
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
of
39
33
Saturation
Image
RGB
Hue
Intensity
RGB -> HSI -> RGB
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
of
39
34
Intensity
Hue
RGB
Image
Saturation
RGB -> HSI -> RGB (cont…)
35
of
39
Pseudocolour Image Processing
Pseudocolour (also called false
colour) image processing consists
of assigning colours to grey values
based on a specific criterion
The principle use of pseudocolour
image processing is for human
visualisation
– Humans can discern between
thousands of colour shades and
intensities, compared to only about
two dozen or so shades of grey
36
of
Pseudo Colour Image Processing –
39 Intensity Slicing
Intensity slicing and colour coding is one of the
simplest kinds of pseudocolour 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 colour, and a different colour if
on the other side
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
of
39
37
of
39
40
RGB -> HSI -> RGB (cont…)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
of
39
41
RGB -> HSI -> RGB (cont…)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
of
39
42
RGB -> HSI -> RGB (cont…)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
of
39
43
RGB -> HSI -> RGB (cont…)
44
of Chapter 6
39 Color Image Processing
45
of Chapter 6
39 Color Image Processing
46
of Chapter 6
39 Color Image Processing
47
of Chapter 6
39 Color Image Processing
48
of Chapter 6
39 Color Image Processing
49
of Chapter 6
39 Color Image Processing
50
of Chapter 6
39 Color Image Processing
51
of Chapter 6
39 Color Image Processing
52
of Chapter 6
39 Color Image Processing
53
of Chapter 6
39 Color Image Processing
54
of Chapter 6
39 Color Image Processing
55
of Chapter 6
39 Color Image Processing
56
of Chapter 6
39 Color Image Processing
57
of Chapter 6
39 Color Image Processing
58
of Chapter 6
39 Color Image Processing
59
of Chapter 6
39 Color Image Processing
60
of Chapter 6
39 Color Image Processing
61
of Chapter 6
39 Color Image Processing
62
of Chapter 6
39 Color Image Processing
63
of Chapter 6
39 Color Image Processing
64
of Chapter 6
39 Color Image Processing
65
of Chapter 6
39 Color Image Processing
66
of Chapter 6
39 Color Image Processing
67
of Chapter 6
39 Color Image Processing
68
of Chapter 6
39 Color Image Processing
69
of Chapter 6
39 Color Image Processing
70
of Chapter 6
39 Color Image Processing
71
of Chapter 6
39 Color Image Processing
72
of Chapter 6
39 Color Image Processing
73
of Chapter 6
39 Color Image Processing
74
of Chapter 6
39 Color Image Processing
75
of Chapter 6
39 Color Image Processing
76
of Chapter 6
39 Color Image Processing