Image Restoration

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 18

Image Restoration

Unit II
Image Restoration
• Restoration attempts to reconstruct an image that has been degraded by using a
priori knowledge of the degradation phenomenon.
• 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.
• All natural images when displayed have gone through some sort of degradation:
• During display mode
• Acquisition mode
• Processing mode
• Sensor noise
• Blur due to camera mis focus
• Relative object-camera motion
• Random atmospheric turbulence

• Enhancement, on the other hand is based on human subjective preferences


regarding what constitutes a “good” enhancement result.
Image Enhancement Vs 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).
• 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).
• If it is a linear position invariant process, then degraded image is given in the spatial domain by
g(x,y)=f(x,y)*h(x,y)+η(x,y)
• h(x,y) is spatial representation of degradation function and symbol * represents convolution.
• In frequency domain we may write this equation as G(u,v)=F(u,v)H(u,v)+N(u,v)
Degradation Model
Noise Types
1.Gaussian Noise:
• Gaussian noise is widely used due to its mathematical simplicity. It arises from factors like electronic circuit noise and sensor
noise (e.g., poor illumination or high temperature),
• Due to mathematical simplicity, the Gaussian noise model is often used in practice and even in situations where they are
marginally applicable at best. Here, m is the mean and σ2 is the variance.
• The probability density function of Gaussian Noise is as

2.Rayleigh Noise:
• Rayleigh noise characterizes noise phenomena in range imaging.
• The PDF of Rayleigh Noise
Noise Types
3. Erlang (Gamma) Noise:
Erlang noise density finds application in laser imaging.
4. Exponential Noise:
Exponential noise is also common in laser imaging.
5. Uniform Noise:
Although not practically present, uniform noise is used in numerical simulations.
6. Impulse (Salt-and-Pepper) Noise:
1. Impulse noise resembles salt-and-pepper granules in an image.
2. It appears as white and black dots due to quick transients (e.g., faulty
switching in cameras).
Effect of noise on image and histogram
Effect of Noise on Images
Effect of Noise on Images
Matlab code to add noise on image
clear; % For adding various kind of noise
I = rgb2gray(imread("flowers.jpg"));
subplot(2, 2, 1),
imshow(I);
title("Original image");
% adding salt and pepper noise
s = imnoise(I, "salt & pepper", 0.20);
subplot(2, 2, 2),
imshow(s);
title("Salt and Pepper noise");
% adding Gaussian noise
g = imnoise(I, "gaussian", 0.20);
subplot(2, 2, 3),
imshow(g);
title("Gaussian noise");
% adding Speckle noise
sp = imnoise(I, "speckle", 0.20);
subplot(2, 2, 4),
imshow(sp);
title("Speckle noise");
Why Noise
• Testing the robustness and performance of an algorithm in the
presence of known amounts of noise.
Restoration Filters
Restoration Filters are the type of filters that are used for operation of
noisy image and estimating the clean and original image.
• It may consists of processes that are used for blurring or the reverse
processes that are used for inverse of blur.
• Filter used in restoration is different from the filter used in enhancement
process.
• Types of Restoration Filters: There are three types of Restoration Filters:
• Inverse Filter
• Pseudo Inverse Filter
• Wiener Filter.
Inverse Filter
Inverse Filtering is the process of receiving the input of a system from its output.
It is the simplest approach to restore the original image once the degradation function is known. It can be define
as:
H'(u, v) = 1 / H(u, v)

Let,
F'(u, v) -> Fourier transform of the restored image
G(u, v) -> Fourier transform of the degraded image
H(u, v) -> Estimated or derived or known degradation function
then F'(u, v) = G(u, v)/H(u, v)
where, G(u, v) = F(u, v).H(u, v) + N(u, v)
and F'(u, v) = f(u, v) - N(u, v)/H(u, v)
Pseduo Inverse Filter
• Pseudo inverse filter is the modified version of the inverse filter and
stabilized inverse filter.
• Pseudo inverse filtering gives more better result than inverse filtering
but both inverse and pseudo inverse are sensitive to noise.
• Pseudo inverse filtering is defined as:
H'(u, v) = 1/H(u, v), H(u, v)!=0
H'(u, v) = 0, otherwise
Wiener Filter (Minimum Mean Square Error
Filter)
• Wiener filter executes and optimal trade off between filtering and noise smoothing.
• It removes the addition noise and inputs in the blurring simultaneously.
• Weiner filter is real and even. It minimizes the overall mean square error by:
e^2 = F{(f-f')^2}
where, f -> original image
f' -> restored image
E{.} -> mean value of arguments

H(u, v) = H'(u, v)/(|H(u, v)|^2 + (Sn(u, v)/Sf(u, v))


where H(u, v) -> Transform of degradation function
Sn(u, v) -> Power spectrum of the noise
Sf(u, v) -> Power spectrum of the undergraded original image
Median Filter

You might also like