Digital Image Processing
Prepared by
K.Indragandhi,AP(Sr.Gr.)/ECE
Module- VI
IMAGE RESTORATION
2
• As in enhancement, goal of restoration tech., is to improve an
image in some predefined manner
• Enhancement – subjective process
• Restoration – Objective process
• It is a tech., to reconstruct or recover an image that has been
degraded by using a priori knowledge of the degradation
phenomenon
• Modeling the degradation and applying the inverse process in
order to recover the original image
3
The Degradation Function
Degradation occurs in the form of blurring due the signal
fluctuating during the measured time interval, imperfect
lenses, motion of the object or imaging device, and
spatial quantization
The degradation is either spatially-invariant or spatially-
variant
4
Spatially-invariant degradation affects all pixels in the
image the same
Examples of spatially-invariant degradation includes poor
lens focus and camera motion
Spatially-variant degradations are dependent on spatial
location and are more difficult to model
5
Examples of spatially-variant degradations include
imperfections in a lens or object motion
Spatially-variant degradations can often be modeled as
being spatially-invariant over small regions
Image degradation functions can be considered to be
linear or nonlinear, here assume linearity
6
7
Frequency Domain Filters
Frequency domain filtering operates by using the Fourier
transform representation of images
This representation consists of information about the
spatial frequency content of the image, also referred to
as the spectrum of the image
8
9
The Fourier transform is performed on
three spatial domain functions:
1. The degraded image, d(r,c)
2. The degradation function, h(r,c)
3. The noise model, n(r,c)
The frequency domain filter is applied to
the Fourier transform outputs, N(u,v),
D(u,v), and H(u,v)
10
The output of the filter operation
undergoes an inverse Fourier transform to
give the restored image
The frequency domain filters incorporate
information regarding the noise and the
PSF into their model, and are based on
the mathematical model given as
11
In order to obtain the restored image, the
general form is as follows:
Many of the filters to be discussed ahead
assume that the image and noise
functions are stationary, which means
spatial frequency content is fairly constant
across the entire image
12
Observation of noise images shows they
may be stationary – subimages tend to be
self-similar
Most real images are not stationary –
some areas may be primarily low
frequency, and others may have more
high frequency energy
Advanced adaptive filtering methods
(discussed later) can help manage this
problem
13
Inverse Filter
14
15
16
• inverse filtration gives poor results in pixels
suffering from noise since the noise is not
taken into account
17
WIENER FILTERING
MINIMUM MEAN SQUARE ERROR
FILTERING
18
19
20
21
Geometric Transformations
22
Geometric Transforms
Geometric transforms are by their very
nature spatially-variant
Used to modify the location of pixel values
within an image, typically to correct
images that have been spatially warped
23
These methods are often referred to as
rubber-sheet transforms, because the
image is modeled as a sheet of rubber and
stretched and shrunk, as required to
correct for any spatial distortion
This type of distortion can be caused by
defective optics in an image acquisition
system, distortion in image display
devices, or 2-D imaging of 3-D surfaces
24
The methods are used in map making,
image registration, image morphing, and
other applications requiring spatial
modification
Geometric transforms can also be used in
image warping where the goal is to take a
"good" image and distort it spatially
The simplest geometric transforms are
translate, rotate, zoom and shrink
25
The more sophisticated geometric
transforms, require two steps:
1. Spatial transform
2. Gray level interpolation
The model used for the geometric
transforms is:
26
Spatial Transforms
• Spatial transforms are used to map the
input image location to a location in the
output image
• It defines how the pixel values in the
output image are to be arranged
27
• Spatial transforms can be modeled as:
• Actual image f(x,y)
• Geometric distorted image g(x’,y’)
• r(x,y), s(x,y) spatial transformations produced by g(x’,y’)
• If r=x/2 & s= y/2 then the distortion is simply shrinking
28
• To find these equations requires identifying a set of
points in the original image that match points in the
distorted image, called tiepoints
• The form of these equations is typically bilinear, although
higher-order polynomials can be used
29
• A geometrically distorted image can be
restored in the following way
1. Define quadrilaterals with known or best guessed
tiepoints for the entire image
2. Find the equations for each set of tiepoints
3. Remap all the pixels within each quadrilateral
subimage using the equations corresponding to those
tiepoints
30
31
32
• In step 2, using a bilinear model for the mapping
equations, the four corner points are used to generate
the equations:
• r(x,y) = c1x+ c2y + c3xy + c4
• s(x,y) = c5x+ c6y + c7xy + c8
• x’ = c1x+ c2y + c3xy + c4
• y’ = c5x+ c6y + c7xy + c8
• The ci values are constants to be determined by solving
the eight simultaneous equations
33
• Step 3 involves application of the mapping
equations to all the (r,c) pairs in the
corresponding quadrilateral in I(r,c)
34
35
• The difficulty in the above example arises when we try to
determine the value of d(41.4,20.6)
• Since the digital images are defined only at the integer
values for (r,c), gray interpolation must be performed
• In this case, we define I^ (r,c) as an estimate to the
original image I(r,c) to represent the restored image
36
Gray Level Interpolation
• Gray Level Interpolation can be
performed in three ways:
1. Nearest neighbor method
2. Neighborhood average method
3. Bilinear interpolation method
37
38
1. Nearest neighbor method
• Each pixel is assigned the value of the closest pixel in the distorted
image
• It is similar to the zero-order hold
• It does not necessarily provide optimal results, but has the
advantage of being easy to implement and computationally fast
• Object edges tend to appear jagged or blocky
39
2. Neighborhood average method
• Surrounding pixel values in the distorted image are used to estimate
the desired value, and this estimated value is used in the restored
image
• It can be performed in 1-D or 2-D
• It is of medium complexity, reasonably fast, and provides smooth
but blurred edges
40
3. Bilinear interpolation method
• Bilinear interpolation is accomplished by the following equation:
• Bilinear interpolation is the most complex, slowest, but has the best
results
41
• The constants, ki , are different than the
constants used in the spatial mapping
equations
• The four unknown constants are found by
using the four surrounding points shown in
Figure 9.6-4
• The values for row and column, and the
gray level values at each point are used
42
43
44
45
46
• For applications requiring even higher
quality results, such as medical imaging or
computer-aided design (CAD) graphics,
more mathematically complex methods
can be used
• For example, cubic convolution
interpolation will fit a smooth surface over
a larger group of pixels to provide a
reasonably optimal gray level value at any
point on the surface
47
The Geometric Restoration Procedure
• The complete procedure for restoring an
image that has undergone geometric
distortion is as follows:
48
• Many variations of this method are
possible
49