Chapter 3.2 - Image Enhancement Histogram
Chapter 3.2 - Image Enhancement Histogram
of
32
Image Enhancement
(Histogram Processing)
2
of
32
Contents
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
3
of
32
4 Poor image enhance image
of
32
5 Poor image enhance image
of
32
6
of Enhancement
32 techniques
Spatial
domain Enhance
Poor image image E(r , c)
I(r , c)
Frequency
domain
applications
Gray levels
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
12 Number of pixels
32
of
13
of
32
14
of
32
15
of
32
16
of
32
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
technologies
• For many of the image processing
operations in this lecture grey levels are
assumed to be given in the range [0.0, 1.0]
17
of
32
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)
of
32
18
Image Enhancement Examples
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
of
32
19
(cont…)
Image Enhancement Examples
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
of
32
20
(cont…)
Image Enhancement Examples
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
of
32
21
(cont…)
Image Enhancement Examples
22
of
32
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
23
of
32
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)
of
32
24
Histogram Examples
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
of
32
25
Histogram Examples (cont…)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
of
32
26
Histogram Examples (cont…)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
of
32
27
Histogram Examples (cont…)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
of
32
28
Histogram Examples (cont…)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
of
32
29
Histogram Examples (cont…)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
of
32
30
Histogram Examples (cont…)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
of
32
31
Histogram Examples (cont…)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
of
32
32
Histogram Examples (cont…)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
of
32
33
Histogram Examples (cont…)
34
of
32
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
35
of
32
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?
36
of
32
Histogram Equalization
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
equalization is given where sk T (rk )
k
– rk: input intensity
– sk: processed intensity
pr ( r j )
j 1
– k: the intensity range
k n
(e.g 0.0 – 1.0)
– nj : the frequency of intensity j
j 1 n
j
of
32
37
Function
Equalization Transformation
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
of
32
38
Equalization Examples
1
39
of
Equalization Transformation
32 Functions
The functions used to equalise the images in
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
of
32
40
Equalization Examples
2
41
of
Equalization Transformation
32 Functions
The functions used to equalise the images in
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
of
32
42
4
3
Equalization Examples (cont…)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
of
32
43
4
3
Equalization Examples (cont…)
44
of
Equalization Transformation
32 Functions
The functions used to equalise the images in
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
No