Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

IMAGE RESTORATION

Syllabus
 Image Restoration
 degradation model, Properties
 Noise models
 Mean Filters – Order Statistics
 Adaptive filters – Band reject Filters – Band pass Filters – Notch Filters – Optimum
Notch Filtering – Inverse Filtering – Wiener filtering

Introduction:
No image is perfect. Any image may contain different types of degradations, and can be
degraded by noise, blurring, distortions, artefacts etc. Image degradation can take place in all
the stages of image processing such as image acquisition, image processing, storage or
transmission etc.

1. Image Restoration:
Image restoration is the process of retrieving an original image from a degraded image. This
involves the process of removing or minimizing degradation and obtain an image as close as
original image.
Inverse Problem: In some cases, such as excess of noise or blurring, it is difficult to restore the
image, called as inverse problem.
Restoration improves image in some predefined sense. It is an objective process.
Restoration attempts to reconstruct an image that has been degraded by using a priori
knowledge of the degradation phenomenon. These techniques are oriented toward modeling
the degradation and then applying the inverse process in order to recover the original image.
Restoration techniques are based on mathematical or probabilistic models of image
processing. Enhancement, on the other hand is based on human subjective preferences
regarding what constitutes a “good” enhancement result. Image Restoration refers to a class of
methods that aim to remove or reduce the degradations that have occurred while the digital
image was being obtained.

2. Types of Image Degradations


 Noise: Noise is a disturbance that causes fluctuations in pixel values.
Hence, pixel values show random variations and cannot be avoided.

 Blur: Blur is a degradation that makes an image less clear. Some of the
common blurs are Gaussian Blur and Motion Blur (due to movement of
object or camera).

 Artefacts: Distortions or Artefacts are extreme intensity or color


fluctuations. It involves geometrical transformations such as translation,
rotation, or change in scale. It is mostly found in medical imaging, such as
mishandling of X-ray films (scratches), movement of patients during the
scanning or dust in imaging system etc.

3. Point Spread Function (PSF)

PSF is an important factor in image restoration process. Let a point (x,y) of an


image is reproduced, not as a single point but as a blurred version of it. This can
be represented as:
Ioutput(x,y)= Ioriginal(x,y)* դ(x,y)
Where σ(x,y) is the PSF and symbol * represents the convolution operation.

Convolution is the superimposition of one signal over another, and involves shift
and add operations. Means when a point is imagined, it is not captured as a point
and thus the resulting image is blurred.
If the PSF is known the original image can be restored using the
deconvolution process.

4. Image Degradation Model

Image Restoration/ Degradation Model


Degradation process operates on a degradation function that operates on an input
image with an additive noise term. Input image is represented by using the
notation f(x,y), noise term can be represented as η(x,y).These two terms when
combined gives the result as g(x,y).
g(x,y)=f(x,y)*h(x,y)+η(x,y)

Here, input image f(x,y) is degraded by a degradation function H(x,y). Now


during channel transmission noise դ(x,y) is introduced.

If we are given g(x,y), some knowledge about the degradation function H or


J and some knowledge about the additive noise teem η(x,y), the objective of
restoration is to obtain an estimate f'(x,y) of the original image. We want the
estimate to be as close as possible to the original image. The more we know about
h and η , the closer f(x,y) will be to f'(x,y).

In frequency domain we may write equation 1 as


G(u,v)=F(u,v)H(u,v)+N(u,v)

The terms in the capital letters are the Fourier Transform of the
corresponding terms in the spatial domain.

The original image can be retrieved by rearranging this equation as

𝐺(𝑢, 𝑣) 𝑁(𝑢, 𝑣)
F(u, v) = −
𝐻(𝑢. 𝑣) 𝐻(𝑢, 𝑣)

The original image f(x,) can be obtained by taking the inverse Fourier
transformation of F(u,v)

5. Noise Models
Noise is a disturbance that causes fluctuations in pixel values. Hence, pixel values
show random variations and cannot be avoided.
The principal source of noise in digital images arises during image
acquisition and /or transmission. The performance of imaging sensors is affected
by a variety of factors, such as environmental conditions during image acquisition
and by the quality of the sensing elements themselves. Images are corrupted
during transmission principally due to interference in the channels used for
transmission.
Some of the frequent noises that are encountered in image processing are
categorized as below.

5.1 Salt and Pepper Noise or Impulse Noise: Also known as Impulsive Noise,
Shot Noise or Binary Noise. This can be caused due to sudden disturbances in the
image signal. It can be visualized as randomly scattered white or black (or both)
pixels over the image.
𝑃𝐴 𝑓𝑜𝑟 𝑧 = 𝑎
PDF (Probability Density Function) of impulse noise is = 𝑃(𝑧) = {𝑃𝑏 𝑓𝑜𝑟 𝑧 = 𝑎
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒

Where z is pixel value. A and b are gray levels. If b>a, then a will appear as a
light spot and vice a versa.

5.2 Gaussian Noise:


It is an idealized form of white noise, which is caused by random fluctuations in
the signal.
A random noise that enters a system can be modelled as a Gaussian or Normal
Distribution. Gaussian noise can be represented as:
F= f(x,y) ± 𝑁𝑎
Where 𝑁𝑎 is Gaussian PDF and f(x,y) is noiseless image.

The Gaussian PDF is


1 (𝑧−𝑚)2

𝑃(𝑧) = 𝑒 2𝜎2
𝜎√2𝜋
z- gray level, m and 𝜎 are mean and standard deviation of image respectively.
5.3 Rayleigh Noise
Usually present in range images such as remote sensing images, where the pixel
value indicates the distance between the object and the camera system.

(𝑧−𝑎)2
2 −
PDF of Rayleigh noise is 𝑃(𝑧) = {𝑏 (𝑧 − 𝑎)𝑒 𝑓𝑜𝑟 𝑧 ≥ 𝑎
𝑏

0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒

𝜋𝑏 𝑏(4−𝜋)
Mean and Variance of the density are 𝑎 + √ and respectively
4 4

5.4 Gamma Noise


This noise occurs due to illumination problems.
𝑎𝑏 𝑋 𝑧 𝑏−1 2
PDF of Gamma noise is 𝑃(𝑧) = { (𝑏−1)!
𝑒 −𝑎 𝑓𝑜𝑟 𝑧 ≥ 0
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒

Mean and Variance of the density are b/a and b/a2 Respectively.

5.5 Exponential Noise


This type of noise occurs due to illumination problems.
𝑎 𝑋 𝑒 −𝑎𝑧 𝑓𝑜𝑟 𝑧 ≥ 0
PDF of Exponential noise is 𝑃(𝑧) = {
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒

Mean and variance will be 1/a and 1/a2

5.6 Uniform Noise

This type of noise is encountered if different values of the noise are equally
probable. It occurs due to quantization process.
1
𝑓𝑜𝑟 𝑎 ≤ 𝑓(𝑥, 𝑦) ≤ 𝑏
PDF of Uniform noise is 𝑃(𝑧) = {(𝑏−𝑎)
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒

Mean is (a+b)/2 and variance is (b-a)2 / 12.


6. Noise Removal
6.1 Mean Filters:
A) Arithmetic Mean Filters: To remove local variations in the image. It is
similar to low pass filter. It removes Gaussian Noise and Uniform Noise.
It is the simplest mean filter. Let Sxy represents the set of coordinates in the sub
image of size m*n centered at point (x,y). The arithmetic mean filter computes
the average value of the corrupted image g(x,y) in the area defined by Sxy. The
value of the restored image f at any point (x,y) is the arithmetic mean computed
using the pixels in the region defined by Sxy.

B) Geometric Mean Filters: It removes Gaussian Noise, but can not remove
pepper type noise.

Here, each restored pixel is given by the product of the pixel in the sub image
window, raised to the power 1/mn. A geometric mean filters but it to loose image
details in the process.
B) Harmonic Mean Filters: It can remove salt and pepper and Gaussain Noise.

6.2 Order Statistics Filters: (Also known as Order, or Rank Filters)


Instead of doing convolution, this filter order the pixels that comes under the
mask.
Median Filter: It can remove salt and pepper noise

Minimum Filter: It can remove pepper type noise

Maximum Filter: It can remove salt type noise


Midpoint filter
The midpoint filter simply computes the midpoint between the maximum and
minimum values in the area encompassed by
7. Periodic Noise, Band Pass Filtering and Band Reject Filtering
Periodic Noise is sinusoidal at multiple times of a specific frequency and is
periodic in nature.

Band Pass Filters: Band Pass Filters allow frequencies within a particular
range to pass through and attenuate all other frequencies. Means, band pass
filters allow frequency components if they fall in the range of D e - Dh . This
range is called band.
Transfer function of 1D band pass filter is given as:
1 𝑓𝑜𝑟 𝐷𝑒 ≤ 𝐷 ≤ 𝐷ℎ
𝐻(𝐷) = {
0 𝑓𝑜𝑟 𝐷 > 𝐷0

Where 𝐷0 𝑖𝑠 𝑡ℎ𝑒 𝑐𝑢𝑡 𝑜𝑓𝑓 𝑓𝑟𝑒𝑞𝑢𝑒𝑛𝑐𝑦.

Transfer function of 2D band pass filter is given as:


𝑊 𝑊
𝐻(𝑢, 𝑣) = {1 𝑖𝑓 𝐷0 − ≤ 𝐷(𝑢, 𝑣) ≤ 𝐷0+
2 2
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒

D(u,v) is the distance of the point (u,v) from the centre and w is the width of
the band.
Butterworth filter formulation of Band pass filter is
Gaussian filter formulation of Band pass filter is

Band Reject Filters: These are complement of band pass filters. Its purpose
is to attenuate frequencies of a limited range, while leaving the other
frequencies unchanged. They are very effective in removing periodic noise.
This filter rejects the frequencies if they fall in the range of De - Dh
Transfer function of 1D band reject filter is given as:
0 𝑓𝑜𝑟 𝐷𝑒 ≤ 𝐷 ≤ 𝐷ℎ
𝐻(𝐷) = {
1 𝑓𝑜𝑟 𝐷 > 𝐷0

Where 𝐷0 𝑖𝑠 𝑡ℎ𝑒 𝑐𝑢𝑡 𝑜𝑓𝑓 𝑓𝑟𝑒𝑞𝑢𝑒𝑛𝑐𝑦.

Transfer function of 2D band reject filter is given as:


𝑊 𝑊
𝐻(𝑢, 𝑣) = { 0 𝑖𝑓 𝐷0 − ≤ 𝐷(𝑢, 𝑣) ≤ 𝐷0+
2 2
1 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒

Butterworth filter formulation of Band reject filter is

Gaussian filter formulation of Band reject filter is

The transfer function of a band pass filter can be obtained from a


corresponding band reject filter with transfer function Hbr(u,v) by using the
equation
Hbp(u,v)= 1- Hbr(u,v)
Notch Filters
Notch filter is a special form of band reject filters, that instead of removing
entire range of frequencies, it removes only selective frequency components.
Means it selectively attenuates or allows frequencies with in a specific range
around the central frequency.
Assuming an ideal filter of radius D0 with center (u0, v0), the filter that
rejects the frequencies is given as:
0 𝑖𝑓 𝐷1 (𝑢, 𝑣) < 𝐷0 𝑜𝑟 𝐷2 (𝑢, 𝑣) > 𝐷0
𝐻𝑖𝑑𝑒𝑎𝑙 (𝑢, 𝑣) = {
1 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
Here,

Butterworth Notch Filter of order n is given as:


1
𝐻𝑏𝑢𝑡𝑡𝑒𝑟𝑤𝑜𝑟𝑡ℎ (𝑢, 𝑣) = 𝑛
𝐷02
1+[ ]
𝐷1 (𝑢, 𝑣)𝐷2 (𝑢, 𝑣)

Gaussian Notch Filter is given as:


1 𝐷 (𝑢,𝑣)𝐷2 (𝑢,𝑣)
− ( 1 )
𝐻 𝐺𝑎𝑢𝑠𝑠𝑖𝑎𝑛 (𝑢,
𝑣) = 1 − 𝑒 2 𝐷02

Notch Pass Filters are complement to Notch Reject Filters. Thus, Notch pass
filters can be obtained as
𝐻𝑛𝑜𝑡𝑐ℎ 𝑝𝑎𝑠𝑠 (u,v)= 1- 𝐻𝑛𝑜𝑡𝑐ℎ 𝑟𝑒𝑗𝑒𝑐𝑡 (u,v)
8. Image Restoration Methods
Based on the knowledge available for the blurring function, Image restoration
approaches can be categorized as mentioned in below figure.

Inverse Filtering
The simplest approach to restoration is direct inverse filtering where we
complete an estimate of the transform 𝐹̂ (𝑢, 𝑣) of the original image simply
by dividing the transform of the degraded image G(u,v) by degradation
function H(u,v)
𝐺(𝑢, 𝑣)
𝐹̂ (𝑢, 𝑣) =
𝐻(𝑢, 𝑣)
We know that 𝐺(𝑢, 𝑣) = 𝐻(𝑢, 𝑣)𝐹(𝑢, 𝑣) + 𝑁 (𝑢, 𝑣)
So,
𝑁(𝑢, 𝑣)
𝐹̂ (𝑢, 𝑣) = 𝐹(𝑢, 𝑣) +
𝐻(𝑢, 𝑣)
From the above equation we observe that we cannot recover the un-degraded
image exactly because N(u,v) is a random function whose Fourier transform
is not known.
One approach to get around the zero or small-value problem is to limit the
filter frequencies to values near the origin.
We know that H(0,0) is equal to the average values of h(x,y).
By Limiting the analysis to frequencies near the origin we reduce the
probability of encountering zero values
Wiener Filtering
When a partial knowledge of degradation function is available, Weiner
filters can be used.
The wiener filtering approach uses the degradation function and statistical
characteristics of noise into the restoration process.
The objective is to find an estimate 𝑓̂ of the uncorrupted image f such that
the mean square error between them is minimized. The error measure is
given by
𝑒 2 = 𝐸{𝑓(𝑥, 𝑦) − 𝑓̂ (𝑥, 𝑦)2 }
Where E{.} is the expected value of the argument
We assume that the noise and the image are uncorrelated one or the other has
zero mean. The gray levels in the estimate are a linear function of the levels
in the degraded image.
The filter in frequency domain corresponds to

1 |𝐻(𝑢, 𝑣)|2
𝐹(𝑢, 𝑣) = [ . ] . 𝐺(𝑢, 𝑣)
𝐻(𝑢, 𝑣) |𝐻(𝑢, 2 𝑆𝑛 (𝑢, 𝑣)
𝑣)| + Ƴ | |
𝑆𝑓 (𝑢, 𝑣)
Where 𝑆𝑛 (𝑢, 𝑣)𝑎𝑛𝑑 𝑆𝑓 (𝑢, 𝑣) are the spectral power densities of the noise
and image respectively.
𝑆𝑛 (𝑢,𝑣)
Ratio of |
𝑆𝑓 (𝑢,𝑣)
| 𝑖𝑠 𝑎𝑠𝑠𝑢𝑚𝑒𝑑 𝑡𝑜 𝑏𝑒 𝑎 𝑐𝑜𝑛𝑠𝑡𝑎𝑛𝑡 𝐾

1 |𝐻(𝑢, 𝑣)|2
𝐹(𝑢, 𝑣) = [ . ] . 𝐺(𝑢, 𝑣)
𝐻(𝑢, 𝑣) |𝐻(𝑢, 𝑣)|2 + Ƴ 𝐾
In the absence of any knowledge of noise, K can be assumed to be the
inverse of the SNR of the image, which is averaged over all frequencies.
If K=0, then filter becomes an inverse filter.

Constrained Least Square Filter


The wiener filter has a disadvantage that we need to know the power spectra
of the un-degraded image and noise. The constrained least square filtering
requires only the knowledge of only the mean and variance of the noise. These
parameters usually can be calculated from a given degraded image this is the
advantage with this method. This method produces an optimal result. This
method requires the optimal criteria which is important we express the

The optimality criteria for restoration is based on a measure of smoothness,


such as the second derivative of an image (Laplacian). The minimum of a
criterion function C defined as

Subject to the constraint

The frequency domain solution to this optimization problem is given by


𝐻∗ (𝑢, 𝑣)
𝐹̂ (𝑢, 𝑣) = [ ] . 𝐺(𝑢, 𝑣)
|𝐻(𝑢, 𝑣)|2 + Ƴ|𝑃(𝑢, 𝑣)|2
Where γ is a parameter that must be adjusted so that the constraint is satisfied.
P(u,v) is the Fourier transform of the laplacian operator

𝑃(𝑥, 𝑦) = 0 -1 0
-1 4 -1
0 -1 0

You might also like