Computer Vision Mod-3
Computer Vision Mod-3
MODULE-3
IMAGE RESTORATION AND RECONSTRUCTION
Introduction
The principle goal of restoration techniques is to improve an image in some predefined sense.
Restoration is an objective process and it attempts to recover an image that has been degraded
by using a prior knowledge of the degradation phenomenon. Thus, restoration techniques are
oriented toward the modeling the degradation and applying the inverse process in order to
recover the original image.
Image restoration vs. image enhancement:
• Enhancement:
• Largely a subjective process.
• Prior knowledge about the degradation is not a must (sometimes no degradation is
involved).
• Procedures are heuristic and take advantage of the psychophysical aspects of human
visual system.
• Restoration:
• More an objective process.
• Images are degraded.
• Tries to recover the images by using the knowledge about the degradation.
• Image restoration: recover an image that has been degraded by using a prior knowledge
of the degradation phenomenon.
• Model the degradation and applying the inverse process in order to recover the original
image.
• Image enhancement: “improve” an image subjectively.
• Image restoration: remove distortion from image, to go back to the “original”--objective
process.
Why Image Restoration?
Image restoration is to recover the original image by removing noise and blur from image.
Image blur is difficult to avoid in many situations like photography, to remove motion blur
caused by camera shake, radar imaging to remove the effect of image system response, etc.
Image noise is unwanted signal which comes in image from sensor such as thermal or electrical
signal and Environmental condition such as rain, snow etc.
If H is a linear, position- invariant process, then the degraded image is given in the spatial
domain by
g(x, y) = h(x, y)*f(x, y) + η(x, y)
Where h(x, y) is the spatial representation of the degradation function and symbol * indicates
convolution. Convolution in the spatial domain is analogous to multiplication in the frequency
domain.
The model of the degraded image is given in the frequency domain by
G(u, v) = H(u,v)F(u, v) + N(u, v)
Where the terms in capital letters are the Fourier transforms of the Corresponding terms of
previous spatial domain expression.
NOISE MODELS
Noise Sources:
The principle sources of noise in digital images arise during image acquisition and/or
transmission.
Image acquisition:
e.g., light levels, sensor temperature, etc.
Sensor performance is affected by environmental conditions during image acquisition, and by
the quality of sensing elements.
Transmission:
Interference in the channel used for transmission.
where z represents intensity, z is the mean (average) value of z, and σ is its standard deviation. The
standard deviation squared, σ2, is called the variance of z.
70% of its values will be in the range [(z - σ), (z + σ)], and about 95% will be in the range [(z
- 2σ), (z + 2σ)].
Rayleigh noise:
The PDF of Rayleigh noise is given by
And
The Rayleigh density can be quite useful for approximating skewed histograms.
where the parameters are such that a>0, b is a positive integer, and “!” indicates factorial. The
mean and variance of this density are given by
and
Exponential noise:
where a > 0. The mean and variance of this density function are
and
Uniform noise:
The PDF of uniform noise is given by
if b > a, gray-level b will appear as a light dot, while level a will appear like a dark dot. If
either Pa unipolar or Pb is zero, the impulse noise is called unipolar.
Above PDFs provide useful tools for modeling a broad range of noise corruption situations
given below.
Gaussian noise arises in an image due to factors such as Electronic circuit noise, sensor
noise due to poor illumination and/or high temperature
The Rayleigh density is helpful in characterizing noise phenomenon in Range imaging.
The exponential and gamma densities find application in laser imaging.
Impulse noise is found in situations where quick transients, such as faulty switching
take place during imaging.
Uniform density is useful as the basis for numerous random number generators that are
used in simulations.
Periodic noise:
and
The shape of the histogram identifies the closest PDF match. If the shape is approximately
Gaussian, then the mean and variance are all we need because the Gaussian PDF is completely
specified by these two parameters.
This operation can be implemented using a spatial filter of size m×n in which all coefficients
have value 1/mn. A mean filter smooths local variations in an image, and noise is reduced as a
result of blurring.
Generally, a geometric mean filter achieves smoothing comparable to the arithmetic mean
filter, but it tends to lose less image detail in the process.
Harmonic mean filter:
The Harmonic mean filter operation is given by the expression
The harmonic mean filter works well for salt noise, but fails for pepper noise. It does well also
with other types of noise like Gaussian noise.
where Q is called the order of the filter. This filter is well suited for reducing or virtually
eliminating the effects of salt-and-pepper noise. For positive values of Q, the filter eliminates
pepper noise. For negative values of Q it eliminates salt noise. It cannot do both simultaneously.
Note that the contraharmonic filter reduces to the arithmetic mean filter if Q = 0, and to the
harmonic mean filter if Q = -1.
In this method value of a pixel is replaced by the median of the intensity levels in the
neighborhood of that pixel.
Median represents the 50th percentile of a ranked set of numbers
It has excellent noise reduction capabilities for certain types of random noise.
Less blurring than linear smoothing filters of similar size
It is effective in the presence of both bipolar and unipolar noise.
Max and min filter:
Max filter uses the 100th percentile of a ranked set of numbers
This filter is useful for finding the brightest points in an image. Also, because pepper noise has
very low values, it is reduced by this filter as a result of the max selection process in the
subimage area Sxy.
This filter is useful for finding the darkest points in an image. Also, it reduces salt noise as a
result of the min operation.
Midpoint filter:
The midpoint filter computes between the maximum and minimum values in the area
encompassed by the filter
This filter combines order statistics and averaging. It works best for randomly distributed noise,
like Gaussian or uniform noise.
Alpha-Trimmed Mean Filter:
Suppose that we delete the d/2 lowest and the d/2 highest intensity values of g(s,t) in the
neighborhood Sxy. Let gr(s,t) represent the remaining mn-d pixels. A filter formed by averaging
these remaining pixels is called an alpha trimmed mean filter:
Where the value of d can range from 0 to mn-1. When d=0, the alpha trimmed filter reduces
to the arithmetic mean filter. If we choose d = mn-1, the filter becomes a median filter. For
other values of d, the alpha-trimmed filter is useful in situations involving multiple types of
noise, such as a combination of salt-and-pepper and Gaussian noise.
Adaptive filters
The behavior of adaptive filter changes based on statistical characteristics of the image
inside the filter region defined by the mхn rectangular window.
The performance is superior to that of the mean filters or order statistics filter.
Filter complexity is increased when the filter is designed for improved filtering power.
Adaptive, Local Noise Reduction Filters:
The simplest statistical measures of random are its mean and variance.
The mean gives a measure of average intensity in the region over which the mean is
computed.
The variance gives a measure of contrast in that region.
Filter is to operate on local region Sxy
The response of the filter at any point (x, y) on which the region is centered is to be based on
four quantities:
(a) g(x, y), the value of the noisy image at (x, y);
(b) σ2ղ, the variance of the noise corrupting f(x, y) to form g(x, y);
(c) mL, the local mean of the pixels in Sxy and
(d) σ2L, the local variance of the pixels in Sxy
The behavior of the filter:
(a) if σ2ղ is zero, the filter should return simply the value of g ( x, y).
(b) if the local variance is high relative to σ2ղ, the filter should return a value close to g(x,y);
(c) if the two variances are equal, the filter returns the arithmetic mean value of the pixels in
Sxy .
An adaptive expression for obtaining f̂(x, y) based on these assumptions may be written as
If the condition B1 > 0 AND B2 < 0 is false, then either Zxy = Zmin or Zxy = Zmax. In either case
the value of the pixel is an extreme value and the algorithm outputs the median value Zmed
which is not a noise impulse.
Periodic Noise Reduction by Frequency Domain Filtering
The basic idea
Periodic noise can be analyzed and filtered effectively using frequency domain techniques. The
basic idea is that the Periodic noise appears as concentrated bursts of energy in the Fourier
transform, at locations corresponding to the frequencies of the periodic interference.
Approach
A selective filter is used to isolate the noise.
Band reject, band pass, and notch filters are used as tools for periodic noise reduction.
Band reject filters remove or attenuate a band of frequencies about the origin of the
Fourier transform.
Band reject filtering is for noise removal in applications where the general locations of
noise components in frequency domain is approximately known.
Example is an image corrupted by additive periodic noise that can be approximated as 2 D
sinusoidal functions. Fourier transform of sine consists of two impulses that are mirror images
of each other about the origin of the transform.
The sinusoidal noise components appear as symmetric pairs of bright dots can be observed in
its Fourier Transform.
Band reject Filters
The transfer functions of ideal, butter-worth and Gaussian filters are as shown below. Its
perspective plots are shown in Figure 3.3
Figure 3.3: From left to right, perspective plots of ideal, Butterworth (of order 1), and Gaussian
band reject filters
Figure 3.4: Perspective plots of (a) ideal, (b) Butterworth (of order 2), and (c) Gaussian
notch (reject) filters.
In this section, we try to improve the restored image by introducing a modulation function.
---------------- (1)
----------------- (2)
……………………….. (3)
Points on or near the edge of the image can be treated by considering partial neighborhoods or
by padding the border with 0s.
Substituting Eq. (1) into Eq. (2) yields
……………………. (4)
Assuming that w(x, y) remains essentially constant over the neighborhood gives the
approximation