0% found this document useful (0 votes)
13 views15 pages

module 3

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views15 pages

module 3

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Module 3

Image Restoration and Reconstruction


A Model of the image Degradation/ Restoration Process

The degradation process is model ed as a degradation function that, together within a additive noise term
,operates on an input image f(x,y) to produce a degraded image g(x,y),some knowledge about the
degradation function H,and some knowledge about the additive noise term ɳ(x,y), the objective of
restoration is to obtain an estimate (x,y)of the original image.We want the estimate to be as close as
possible to the original input image and, in general, the more we know about H and ɳ,the closer (x,y) will be
to f(x,y).

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, the symbol “ * “ indicates
convolution. We know from the discussion that convolution in the spatial domain is analogous to
multiplication in the frequency domain, so we may write the model in an equivalent frequency domain
representation:

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

Where terms in capital letters are the Fourier transforms of the corresponding terms.

Noise Models
The principal sources of noise in digital images arise 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. For instance, in acquiring images
with a CCD camera, light levels and sensor temperature are major factors affecting the amount of noise in
the resulting image. Images are corrupted during transmission due to interference in the channel used for
transmission.

Department of ISE, NCET. 1


Spatial and Frequency properties of Noise

Frequency properties refer to the frequency content of noise in the fourier sense .for ex. When the fourier
spectrum of noise is constant the noise usually is called White noise.

Some important noise probability density function

● Gaussian Noise

Because of its mathematical tractability in both the spatial and frequency domains , guassian noise models
are used frequently in practice. In fact this tractability is so convenient that it often results in gussaian models
being used in situations in which they are marginally applicable at best.

where z represents intensity, is the mean (average) value of z , and σ is its standard deviation σ2 is variance
of z.

● Rayleigh noise

The probability density function of Rayleigh noise is given by

Department of ISE, NCET. 2


The plot of Rayleigh noise

Is given

● Erlang (gamma) noise

The probability density function of Erlang noise is given by

where a > 0 and b is a positive integer ! indicates the factorial. The mean and variance of this density are
given by

Department of ISE, NCET. 3


The plot is aften reffered to as gamma
density . it is correct only when the
denominator is gamma function Г(b). when
the denominator is as shown then the
density is Erlang density.

● Exponential noise

The PDF of exponential noise is given by

where a > 0 . The mean and variance of this density are given by

Department of ISE, NCET. 4


● Uniform noise

The PDF of uniform noise is given by

The mean and variance of this density function are given by

● Impulse (salt-and-pepper) noise

The PDF of impulse noise is given by

If b >a , intensity b appears as a light dot in the image. Conversely, intensity a will appear like a
dark dot.

Department of ISE, NCET. 5


If either Pa or Pb is zero , the impulse noise is called unipolar. If neither probability is zero and
especially if they are approximately equal, the impulse noise values will resemble salt and pepper
granules randomly distributed over the image.

Example 5.1: Noisy images and their histograms Figure 5.3 shows a test pattern.

Department of ISE, NCET. 6


Department of ISE, NCET. 7
● Periodic Noise

Periodic noise in an image arises typically from electrical or electromechanical interference during
image acquisition. The periodic noise can be reduced significantly via frequency domain filtering,

Estimation of Noise Parameters


The parameters of periodic noise can be estimated by inspection of the Fourier spectrum of the
image. Periodic noise tends to produce frequency spikes, which are detectable even by visual
analysis. In simplistic cases, it is also possible to infer the periodicity of noise components directly
from the image. Automated analysis is possible if the noise spikes are either exceptionally
pronounced, or when knowledge is available about the general location of the frequency
components of the interference.

It is often necessary to estimate the noise probability density functions for a particular imaging
arrangement. When images already generated by a sensor are available, it may be possible to
estimate the parameters of the probability density functions from small patches of reasonably
constant background intensity.

Department of ISE, NCET. 8


The histograms shown in Figure 5.6 were calculated using image data from these small stripes. We
can see that the shapes of these histograms correspond closely to the shapes shown in (d), (e), and
(k) of Figure 5.4.

The simplest use of the data from the image strips is for calculating the mean and variance of
intensity levels. Let S denote a stripe and PS (Zi), i = 0,1,2,...,L- 1, denote the probability estimates
of the intensities of the pixels in S , then the mean and variance of the pixels in S are

The shape of the histogram identifies the closest probability density function match. The Gaussian
probability density function is completely specified by these two parameters. For the other shapes
discussed previously, we can use the mean and variance to solve the parameters a and b.
Impulse noise is handled differently because the estimate needed is of the actual probability of
occurrence of the white and black pixels.

Restoration in the Presence of Noise Only – Spatial Filtering


When the only degradation present in an image is noise,
and

Become

Department of ISE, NCET. 9


and

Since the noise terms are unknown, subtracting them from g(x ,y ) or G(u,v) is not a realistic option.
In the case of periodic noise, it usually is possible to estimate N(u,v) from the spectrum of
G(u ,v).

Mean Filters
● Arithmetic mean filter

Let Sxy represent the set of coordinates in a subimage window of size m x n, centered at (x ,y ). The
arithmetic mean filter computes the average value of the corrupted image g(x ,y ) in Sxy . The value
of the restored image at point (x ,y ) is the arithmetic mean computed in the region Sxy :

This operation can be implemented using a spatial filter of size m x n in which the coefficients have
value . A mean filter smooths local variation in an image, and noise is reduced as a result of
blurring.

● Geometric mean filter


Using a geometric mean filter, an image is restored by

Here, each restored pixel is given by the product of the pixels in the subimage window, raised to the
power.

● Harmonic mean filter


The harmonic mean filter is given by the expression

which works well for some types of noise like Gaussian noise and salt noise, but fails for pepper
noise.

● Contraharmonic mean filter


The contraharmonic mean filter yields a restored image based on the expression

Department of ISE, NCET. 10


Where Q is called the order of the filter. The contraharmonic mean filter is well suited for reducing
or eliminating the effects of salt-and-pepper noise.
For positive values of Q, it eliminates pepper noise. For negative values of Q , it eliminates salt
noise. When Q = 0, the contraharmonic mean filter reduces to the arithmetic mean filter.
When Q = −1, the contraharmonic mean filter becomes the harmonic mean filter.

Order-statistic filters
Response based on ordering or ranking the pixel contained in the image area encompassed by the
filter.

● Median filter
Replace the value of the pixel by the median of the intensity levels in the neighborhood of the pixel

▪ Median filters are quite popular because for certain types of random noise, they Provide noise
reduction with considerably less blurring
▪ Effective in the presence of bipolar and unipolar impulse noise.

● Max and min filters

▪ Max filter finds the brightest points in the image; reduces pepper noise
▪ Min filter finds the darkest points in the image; reduces salt noise.

● Midpoint filter
Computes the midpoint between the maximum and minimum values in the area encompassed by the filter.

Department of ISE, NCET. 11


▪ Combines order statistics and averaging
▪ Good for randomly distributed noise, like Gaussian noise and uniform noise.

● Alpha-trimmed mean filter


▪ Delete d/2 lowest and d/2 highest values in the neighborhood
▪ Average the remaining mn − d pixels, denoted by gr(s, t)
▪ Given by

d can range from 0 to mn − 1 , When d = 0, the filter is arithmetic mean filter , When d = mn − 1,
the filter is the median filter.

Adaptive filters
Adaptive filters Change behavior based on statistical characteristics of image inside the filter
Better performance but increase in filters complexity
Adaptive, local noise reduction filters
▪ Mean gives a measure of average intensity in the region while variance quantifies contrast
▪ Response of filter on local region Sxy based on four quantities
g(x, y) – value of noisy image at (x, y)
ση2 – variance of corrupting noise
mL – local mean of pixels in Sxy
σL2 – local variance in the neighborhood
▪ Behavior of the filter should be
1. No noise case: If σ2η is zero, return the value of g(x, y)
2. Edges:If local variance is high relative to σ2η , return a value close to g(x, y)
3. If two variances are equal : if σ 2 L ≈ σ 2 η , reduce local noise by averaging
4. An adaptive expression capturing the above is:

▪ Need to know the variance of overall noise σ2η


▪ The ratio is set to 1 if the condition σ2η > σ2L, this makes this filter nonlinear.

Adaptive median filter

Department of ISE, NCET. 12


▪ Performs well if the spatial density impulse noiseis not larger spatial density than very little (Pa,
Pb > 0.2)
▪ Preserves detail while smoothing nonimpulse noise; median filter unable to achieve that
▪ Works with an adaptive neighborhood, by changing the size of Sxy
Notation zmin Minimum intensity value in Sxy
zmax Maximum intensity value in Sxy
zmed Median of intensity values in Sxy
zxy Intensity value at coordinates (x, y)
Smax Maximum allowed size of Sxy
Works in two stages:
Stage A A1 = z med – z min
A2 = z med – z max
If A1 > 0 && A2 < 0 go to Stage B
Else increase the window size
If window size ≤ S max repeat stage A else output z med
Stage B B1 = z xy – z min
B2 = z xy – z max
If B1 > 0 && B2 < 0 output z xy
Else output z med
Three goals of algorithm
1. Remove salt-and-pepper (impulse) noise
2. Provide smoothing of non-impulsive noise
3. Reduce distortion, such as excessive thickening or thinning of object boundaries
● Z min and Z max are considered to be impulse-like components
● Stage A checks whether the median filter output zmed is an impulse
● If Z min < Z med < Z max, Z med cannot be an impulse
● Stage B checks if the point at the center of window Z x y itself is an impulse
● Adaptive median filter does not necessarily replace each point by the median, preserving detail
in the process
● Effect of small value of Pa and Pb · As density of impulses increases, we need a larger window
to clean up the noise spikes

Inverse Filtering
The simplest approach to obtain the restoration of images is direct inverse filtering, where we compute
an estimate (u, v), of the transform of the original image simply by dividing the transform of the
degraded image, G (u, v), by the degradation function.
(u, v)= -- eq1

Department of ISE, NCET. 13


Substituting the RHS by

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

Then eq1 becomes

(u, v)= F(u,v)+ eq2


This equation tells that even if we know the degradation function , we cannot recover the
undegraded image exactly because N(u,v) is not known.

If the degradation function has zero or small values , ythen the ration N(u,v)/H(u,v) could easily
dominate the estimate (u, v).

Minimum Mean square Error (Wiener)Filtering

This approach incorporates both the Degradation function and statistical characteristics of noise into
the restoration process. The main obi=jective is to find an estimate of the uncorrupted image f such
that the mean square error between them is minimized. This error measure is given by

e2 = E {(f- )2} eq 3

where E{.}is the expected value of the argument.itv is assumed that the noise and image are
uncorrelated: that one or the other has zero mean and the intensity levels in the estimate are a linear
function of the levels in the degraded image.

Based on these conditions the minimum of the error function in the eq3 is given in
the frequency domain by the expression

(u, v) = G(u,v)

= G(u,v)

G(u,v)

Where H(u,v) = degradation function

= Complex conjugate of H(u,v)

= H(u,v)

=|N(u,v)|2 = power spectrum of the noise

= |F(u,v)|2 = power spectrum of the undegraded image


Department of ISE, NCET. 14
Department of ISE, NCET. 15

You might also like