0% found this document useful (0 votes)
24 views40 pages

ImageProcessing3 ImageEnhancement (HistogramProcessing)

This document discusses image enhancement techniques in digital image processing. It will cover histogram processing and spatial domain techniques like point processing and neighborhood operations. Image enhancement aims to make images more useful by highlighting details, removing noise, and improving visual appeal. Key techniques mentioned include gamma correction, log and power-law transformations, and contrast stretching through histogram processing. Histogram examples from various images show the relationship between pixel intensity distributions and image content.

Uploaded by

Mudathir Ayomide
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views40 pages

ImageProcessing3 ImageEnhancement (HistogramProcessing)

This document discusses image enhancement techniques in digital image processing. It will cover histogram processing and spatial domain techniques like point processing and neighborhood operations. Image enhancement aims to make images more useful by highlighting details, removing noise, and improving visual appeal. Key techniques mentioned include gamma correction, log and power-law transformations, and contrast stretching through histogram processing. Histogram examples from various images show the relationship between pixel intensity distributions and image content.

Uploaded by

Mudathir Ayomide
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 40

Digital Image Processing

Image Enhancement
(Histogram Processing)

Course Website: http://www.comp.dit.ie/bmacnamee


2
of
32
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
3
of
32
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]
4
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)
5
of
32
Image Enhancement Examples
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
6
of
32
Image Enhancement Examples (cont…)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
7
of
32
Image Enhancement Examples (cont…)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
8
of
32
Image Enhancement Examples (cont…)
9
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
10
of
Some Basic Intensity Transformation
32
Functions
Image Negatives s = T(r) T is a transformation that
maps pixel value r into pixel value s.
The negative of an image with intensity levels in the range
[0, L-1] is obtained as
s = L-1-r

This type of processing is particularly suited for enhancing white or gray


details embedded in dark regions of an image.
11
of
Some Basic Intensity Transformation
32
Functions
Log Transformations The general form of the log
transformation is s  c log(1  r ), where c is a constant.
This transformation maps a narrow range of low intensity values
in the input into a wider range of output levels. The opposite is
true of higher values of input levels.
Power-Law (Gamma) Transformations Power-
law transformations have the basic form
s  cr 
where c and ɣ are positive constants. Similar to log
transformation, this transformation also maps a narrow range of
low intensity values into a wider range of output values. But we
can get many transformations by just changing ɣ.
12
of
32
Gamma Transformation

s  cr 
13
of
32
Gamma Correction Examples
14
of
Histogram Processing - Image
32
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
15
Histogram Examples
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

of
32
16
Histogram Examples (cont…)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

of
32
17
Histogram Examples (cont…)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

of
32
18
Histogram Examples (cont…)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

of
32
19
Histogram Examples (cont…)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

of
32
20
Histogram Examples (cont…)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

of
32
21
Histogram Examples (cont…)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

of
32
22
Histogram Examples (cont…)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

of
32
23
Histogram Examples (cont…)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

of
32
24
Histogram Examples (cont…)
25
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
26
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?
27
of
32
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 s  T ( r )
equalisation is given where k k
k

– rk: input intensity  ( L  1)  pr ( rj )


– sk: processed intensity j 0

– k: the intensity range


k
nj
(0,1,2,..., L-1)  ( L  1) j 0 n
– nj : the frequency of intensity j
– n: the sum of all frequencies
28
of
32
Histogram Equalization
In histogram equalization we search for a transformation T(r)
such that
(a)T(r) is a monotonically increasing function in the interval 0<=
r <= L-1; and
(b)0<= T(r) <=L-1 for 0<= r <= L-1.
The intensity levelsin an image can be seen as random
variables in the interval [0,L-1]. Let pr (r ) and ps (s) denote the
PDFs of r and s. If pr (r ) and T (r ) are known, then
r
dr s  T ( r )  ( L  1)  pr ( w)dw
p s ( s )  pr ( r ) 0
ds
ds dT ( r ) 1
  ( L  1) pr ( r ) ps ( s )  0  s  L 1
dr dr L 1
29
of
32
Histogram Equalization
For discrete values, we deal with probabilities (histogram
values) and summations instead of probability density
functions and integrals.
Suppose that a 3-bit image (L=8) of size 64x64 pixels
n=4096. Thus [0,L-1]=[0,7]
0
s  T ( r )  7 p ( r )  1.33,
0 0 r j
j 0
1
s1  T ( r1 )  7 pr ( rj )  3.08,
j 0

.
.
.
7
s7  T ( r7 )  7 pr ( rj )  7.00
j 0
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

of
32
30
Equalisation Transformation Function
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

of
32
31

1
Equalisation Examples
32
of
32
Equalisation Transformation Functions

The functions used to equalise the images in


Images taken from Gonzalez & Woods, Digital Image Processing (2002)

the previous example


Images taken from Gonzalez & Woods, Digital Image Processing (2002)

of
32
33

2
Equalisation Examples
34
of
32
Equalisation Transformation Functions

The functions used to equalise the images in


Images taken from Gonzalez & Woods, Digital Image Processing (2002)

the previous example


Images taken from Gonzalez & Woods, Digital Image Processing (2002)

of
32
35

4
3
Equalisation Examples (cont…)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

of
32
36

4
3
Equalisation Examples (cont…)
37
of
32
Equalisation Transformation Functions

The functions used to equalise the images in


Images taken from Gonzalez & Woods, Digital Image Processing (2002)

the previous examples


38
of
32
Histogram Matching (Specification)

We are given an image


and a specified
histogram. Our goal is
to transform the image
pixel values so that the
histogram of the new
image will look like the
specified histogram.
39
of
32
Histogram Matching
40
of
32
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

You might also like