You are on page 1of 34

Lecture 02

om
.c
Image Enhancement

ng
co
Point Processing

an
th
o ng
du
u
cu

CuuDuongThanCong.com https://fb.com/tailieudientucntt
Contents

In this lecture we will look at image enhancement point

om
processing techniques:

.c
 What is point processing?

ng
 Negative images

co
 Thresholding

an
 Logarithmic transformation
 Power law transforms th
o ng
 Grey level slicing
du

 Bit plane slicing


u
cu

Image Enhancement-Point Processing 2


CuuDuongThanCong.com https://fb.com/tailieudientucntt
Basic Spatial Domain Image Enhancement

Most spatial domain enhancement operations can be

om
reduced to the form
Origin y

.c
g (x, y) = T[ f (x, y)]

ng
where f (x, y) is the

co
input image, g (x, y) is

an
the processed image

th
and T is some ng (x, y)
operator defined over
o
du

some neighbourhood
u

of (x, y)
cu

x Image f (x, y)

Image Enhancement-Point Processing 3


CuuDuongThanCong.com https://fb.com/tailieudientucntt
Point Processing

 The simplest spatial domain operations occur when the

om
neighbourhood is simply the pixel itself

.c
 In this case T is referred to as a grey level

ng
transformation function or a point processing

co
operation.

an
 Point processing operations take the form
s=T(r) th
o ng
where s refers to the processed image pixel value and r
du

refers to the original image pixel value.


u
cu

Image Enhancement-Point Processing 4


CuuDuongThanCong.com https://fb.com/tailieudientucntt
Point Processing: Negative Images

 Negative images are useful for enhancing white or

om
grey detail embedded in dark regions of an image

.c
 Note how much clearer the tissue is in the negative

ng
image of the mammogram below

co
an
th
o ng
Original Negative
s = intensitymax- r
du

Image Image
u
cu

Image Enhancement-Point Processing 5


CuuDuongThanCong.com https://fb.com/tailieudientucntt
Point Processing: Negative Images (cont….)

om
Original Image Enhanced Image y
y

.c
ng
co
an
th
ng
x Image f (x, y) x Image f (x, y)
o
du
u
cu

s = intensitymax - r

Image Enhancement-Point Processing 6


CuuDuongThanCong.com https://fb.com/tailieudientucntt
Point Processing : Thresholding

 Thresholding transformations are particularly useful for

om
segmentation in which we want to isolate an object of

.c
interest from a background.

ng
co
an
th
1.0 r > threshold
ng
s=
o
0.0 r <= threshold
du
u
cu

Image Enhancement-Point Processing 7


CuuDuongThanCong.com https://fb.com/tailieudientucntt
Point Processing : Thresholding (cont…)

Original Image Enhanced Image y


y

om
.c
ng
co
an
th
ng x
x Image f (x, y) Image f (x, y)
o
du

1.0 r > threshold


u
cu

s=
0.0 r <= threshold

Image Enhancement-Point Processing 8


CuuDuongThanCong.com https://fb.com/tailieudientucntt
Intensity Transformations

om
.c
ng
co
an
th
o ng
du
u
cu

Image Enhancement-Point Processing 9


CuuDuongThanCong.com https://fb.com/tailieudientucntt
Basic Grey Level Transformations

 There are many different kinds of grey level

om
transformations

.c
 Three of the most

ng
common are shown

co
here

an
• Linear

th
- Negative/Identity ng
• Logarithmic
o
du

- Log/Inverse log
• Power law
u
cu

- nth power/nth root

Image Enhancement-Point Processing 10


CuuDuongThanCong.com https://fb.com/tailieudientucntt
Logarithmic Transformations

 The general form of the log transformation is

om
s = c * log(1 + r)

.c
 The log transformation maps a narrow range of low grey

ng
level values in the input image into a wider range of output

co
values. The opposite is true of higher values of the input

an
levels.

th
 We use the log transform to expand the values of the dark
ng
pixels in an image while compressing the higher level
o
values.
du

 It compress the dynamic range of the images with the large


u
cu

variations in pixel values.


 The inverse log transformation performs the opposite
transformation
Image Enhancement-Point Processing 11
CuuDuongThanCong.com https://fb.com/tailieudientucntt
Logarithmic Transformations (cont…)

 Log functions are particularly useful when the input

om
grey level values may have an extremely large range

.c
of values.
 In the following example the Fourier transform of an

ng
co
image is put through a log transform to reveal more

an
detail

th
o ng
du

s = log(1 + r)
u
cu

Image Enhancement-Point Processing 12


CuuDuongThanCong.com https://fb.com/tailieudientucntt
Logarithmic Transformations

Original Image Enhanced Image y


y

om
.c
ng
co
an
th
ng
x Image f (x, y) x Image f (x, y)
o
du

s = log(1 + r)
u

 We usually set c to 1
cu

Image Enhancement-Point Processing 13


CuuDuongThanCong.com https://fb.com/tailieudientucntt
Power Law Transformations

 Power law transformations have the following form

om
s=c*rγ

.c
 Map a narrow range

ng
of dark input values

co
into a wider range of

an
output values, with

th
the opposite being true ng
for the higher values
o
du
u

 Varying γ gives a whole


cu

family of curves

Image Enhancement-Point Processing 14


CuuDuongThanCong.com https://fb.com/tailieudientucntt
Power Law Transformations (cont…)

Original Image Enhanced Image x


x

om
.c
ng
co
an
th
ng
y Image f (x, y) y Image f (x, y)
o
du

s=rγ
u

 We usually set c to 1
cu

 Grey levels must be in the range [0.0, 1.0]

Image Enhancement-Point Processing 15


CuuDuongThanCong.com https://fb.com/tailieudientucntt
Power Law Examples

om
.c
ng
co
an
th
o ng
du
u
cu

Image Enhancement-Point Processing 16


CuuDuongThanCong.com https://fb.com/tailieudientucntt
Power Law Examples

γ = 0.6

om
1

.c
Transformed Intensities

0.9
0.8

ng
0.7

co
0.6
0.5

an
0.4

th
0.3 ng
0.2
0.1
o
0
du

0 0.2 0.4 0.6 0.8 1


u

Old Intensities
cu

Image Enhancement-Point Processing 17


CuuDuongThanCong.com https://fb.com/tailieudientucntt
Power Law Examples

γ = 0.4

om
1

.c
0.9
Transformed Intensities

0.8

ng
0.7

co
0.6
0.5

an
0.4
0.3

th
0.2 ng
0.1
0
o
du

0 0.2 0.4 0.6 0.8 1


Original Intensities
u
cu

Image Enhancement-Point Processing 18


CuuDuongThanCong.com https://fb.com/tailieudientucntt
Power Law Examples

γ = 0.3

om
1

.c
0.9
Transformed Intensities

0.8

ng
0.7

co
0.6
0.5

an
0.4
0.3

th
0.2 ng
0.1
0
o
du

0 0.2 0.4 0.6 0.8 1


Original Intensities
u
cu

Image Enhancement-Point Processing 19


CuuDuongThanCong.com https://fb.com/tailieudientucntt
Power Law Examples

 The images to the

om
right show a s = r 0.6

.c
magnetic resonance
(MR) image of a

ng
co
fractured human

s = r 0.4
spine

an
th
 Different curves ng
highlight different
o

detail
du
u
cu

Image Enhancement-Point Processing 20


CuuDuongThanCong.com https://fb.com/tailieudientucntt
Power Law Examples

γ = 5.0

om
.c
1
0.9
Transformed Intensities

ng
0.8
0.7

co
0.6
0.5

an
0.4
0.3

th
0.2 ng
0.1
0
o
0 0.2 0.4 0.6 0.8 1
du

Original Intensities
u
cu

Image Enhancement-Point Processing 21


CuuDuongThanCong.com https://fb.com/tailieudientucntt
Power Law Examples

 An aerial photo
of a runway is

om
shown s = r 3.0

.c
 This time

ng
power law

co
transforms are

s = r 4.0
an
used to darken
th
the image ng
 Different curves
o
du

highlight
different detail
u
cu

Image Enhancement-Point Processing 22


CuuDuongThanCong.com https://fb.com/tailieudientucntt
Gamma Correction

 Many of you might be familiar with gamma correction

om
of computer monitors.

.c
 Problem is that

ng
display devices do

co
not respond linearly

an
to different

th
intensities ng
 Can be corrected
o
du

using a log
u

transform
cu

Image Enhancement-Point Processing 23


CuuDuongThanCong.com https://fb.com/tailieudientucntt
More Contrast Issues

om
.c
ng
co
an
th
o ng
du
u
cu

Image Enhancement-Point Processing 24


CuuDuongThanCong.com https://fb.com/tailieudientucntt
Piecewise Linear Transformation Functions

 Rather than using a well defined mathematical function


we can use arbitrary user-defined transforms

om
 The images below show a contrast stretching linear

.c
transform to add contrast to a poor quality image

ng
co
an
th
o ng
du
u
cu

Image Enhancement-Point Processing 25


CuuDuongThanCong.com https://fb.com/tailieudientucntt
Piecewise Linear-Example

om
.c
ng
co
an
th
o ng
du
u
cu

Image Enhancement-Point Processing 26


CuuDuongThanCong.com https://fb.com/tailieudientucntt
Piecewise Linear-Example

om
.c
ng
co
an
th
o ng
du
u
cu

Image Enhancement-Point Processing 27


CuuDuongThanCong.com https://fb.com/tailieudientucntt
Piecewise Linear-Example

om
.c
ng
co
an
th
o ng
du
u
cu

Image Enhancement-Point Processing 28


CuuDuongThanCong.com https://fb.com/tailieudientucntt
Gray Level Slicing

 Highlights a specific range of grey levels

om
• Similar to thresholding

.c
• Other levels can be

ng
suppressed or maintained

co
• Useful for highlighting features

an
in an image

th
o ng
du
u
cu

Image Enhancement-Point Processing 29


CuuDuongThanCong.com https://fb.com/tailieudientucntt
Bit Plane Slicing

 Often by isolating particular bits of the pixel values in

om
an image we can highlight interesting aspects of that

.c
image
• Higher-order bits usually contain most of the significant

ng
co
visual information
• Lower-order bits contain

an
th
subtle details ng
o
du
u
cu

Image Enhancement-Point Processing 30


CuuDuongThanCong.com https://fb.com/tailieudientucntt
Bit Plane Slicing (cont…)

om
[10000000] [01000000]

.c
ng
co
an
[00100000] [00001000]

th
o ng
du
u
cu

[00000100] [00000001]

Image Enhancement-Point Processing 31


CuuDuongThanCong.com https://fb.com/tailieudientucntt
Bit Plane Slicing (cont…)

om
.c
ng
co
an
th
o ng
du
u
cu

Image Enhancement-Point Processing 32


CuuDuongThanCong.com https://fb.com/tailieudientucntt
Bit Plane Slicing (cont…)

Reconstructed image

om
using only bit planes 8

.c
and 7

ng
co
Reconstructed image

an
using only bit planes 8, 7
th and 6
o ng
du

Reconstructed image
u
cu

using only bit planes 7, 6


and 5

Image Enhancement-Point Processing 33


CuuDuongThanCong.com https://fb.com/tailieudientucntt
Summary

 We have looked at different kinds of point processing

om
image enhancement

.c
 Next time we will start to look at image enhancement-

ng
histogram equalization

co
an
th
o ng
du
u
cu

Image Enhancement-Point Processing 34


CuuDuongThanCong.com https://fb.com/tailieudientucntt

You might also like