Digital Image Processing
IMAGE ENHANCEMENT
(HISTOGRAM PROCESSING)
Contents
Over the next few lectures we will look at image
enhancement techniques working in the spatial
domain:
What is image enhancement?
Different kinds of image enhancement
Histogram processing
Point processing
Neighbourhood operations
A Note About Grey Levels
So far when we have spoken about image grey level
values we have said they are in the range [0, 255]
Where 0 is black and 255 is white
There is no reason why we have to use this range
The range [0,255] stems from display technologes
For many of the image processing operations in this
lecture grey levels are assumed to be given in the
range [0.0, 1.0]
What Is Image Enhancement?
Image enhancement is the process of making images
more useful
The reasons for doing this include:
Highlighting interesting detail in images
Removing noise from images
Making images more visually appealing
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Image Enhancement Examples
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Image Enhancement Examples (cont…)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Image Enhancement Examples (cont…)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Image Enhancement Examples (cont…)
Spatial & Frequency Domains
There are two broad categories of image enhancement
techniques
Spatial domain techniques
Direct manipulation of image pixels
Frequency domain techniques
Manipulation of Fourier transform or wavelet transform of an
image
For the moment we will concentrate on techniques
that operate in the spatial domain
Image Histograms
The histogram of an image shows us the distribution of
grey levels in the image
Massively useful in image processing, especially in
segmentation
Frequencies
Grey Levels
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Histogram Examples
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Histogram Examples (cont…)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Histogram Examples (cont…)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Histogram Examples (cont…)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Histogram Examples (cont…)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Histogram Examples (cont…)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Histogram Examples (cont…)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Histogram Examples (cont…)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Histogram Examples (cont…)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Histogram Examples (cont…)
Histogram Examples (cont…)
A selection of images and
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
their histograms
Notice the relationships
between the images and
their histograms
Note that the high contrast
image has the most
evenly spaced histogram
Contrast Stretching
We can fix images that have poor contrast by applying
a pretty simple contrast specification
The interesting part is how do we decide on this
transformation function?
Histogram Equalisation
Spreading out the frequencies in an image (or
equalising the image) is a simple way to improve
dark or washed out images
The formula for histogram
equalisation is given where
rk: input intensity
sk T (rk )
k
pr ( r j )
sk: processed intensity
k: the intensity range
(e.g 0.0 – 1.0) j 1
nj: the frequency of intensity j
k nj
n: the sum of all frequencies
j 1 n
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Equalisation Transformation Function
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Equalisation Examples
1
Equalisation Transformation Functions
The functions used to equalise the images in the
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
previous example
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Equalisation Examples
2
Equalisation Transformation Functions
The functions used to equalise the images in the
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
previous example
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Equalisation Examples (cont…)
4
3
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Equalisation Examples (cont…)
4
3
Equalisation Transformation Functions
The functions used to equalise the images in the
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
previous examples
Summary
We have looked at:
Different kinds of image enhancement
Histograms
Histogram equalisation
Next time we will start to look at point processing and
some neighbourhood operations