DIP ColourImageProcessing
DIP ColourImageProcessing
Processing
Colour Image Processing
Introduction
Today we’ll look at colour image processing,
covering:
◦ Colour fundamentals
◦ Colour models
Colour Fundamentals
In 1666 Sir Isaac Newton discovered that
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
RGB (cont…)
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 = 16,777,216
colours
2
3
8
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
RGB (cont…)
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
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
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
HSI, Intensity & RGB
(cont…)
Now the intensity component
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
3
S 1 min R,G,B I 13 R G B
R G B
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 cos H
R I
1 G 3I R B B I 1 S
cos60 H
◦ GB sector (120° <= H < 240°)
S cosH 120
R I 1 S G I
1 B 3I R G
cosH 60
Converting From HSI To RGB
(cont…)
◦ BR sector (240° <= H <= 360°)
S cosH 240
R 3I G B G I 1 S B I
1
cosH 180
Manipulating Images In The
HSI Model
In order to manipulate an image under the HIS
model we:
◦ First convert it from RGB to HIS
◦ Perform our manipulations under HSI
◦ Finally convert the image back from HSI to RGB
RGB
RGB RGB
RGB
HSI
HSI Image
Image
Image
Image Image
Image
Manipulations
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