Image Restoration
Unit IV
                                       Part III
Definition of Image restoration
    Image restoration is task of recovering or reconstructing an image from its
     degraded version assuming some prior knowledge of the degradation
     phenomenon.
    The restoration technique models the degradation process and applies the
     inverse process to obtain the original from the degraded (observed) image.
    It differs from image enhancement–which does not fully account for the nature
     of the degradation.
    Image enhancement is largely a subjective process while image restoration is an
     objective process.
Example of Image restoration
Image enhancement vs Image Restoration
SL    Image enhancement                     Image Restoration
NO
1     In Image Enhancement, the             The aim of image restoration is to bring
      original image is processed so that   the image towards what it would have
      the resultant image is more           been if it had been recorded without
      suitable than the original for        degradation.
      specific applications.
2     Image enhancement makes a             Image restoration tries to fix the image
      picture look better, without regard   to get back to the real, true image.
      to how it really truly should look.
3     Image      enhancement        means   Image restoration means improving
      improving the image to show           the image to match the original image.
      some hidden details
4     Image enhancement is a purely         Image restoration is an objective
      subjective processing technique.      process.
5     Image enhancement is a cosmetic       Restoration tries to reconstruct by
      procedure i.e. it does not add any    using a priori knowledge of the
      extra information to the original     degradation phenomena. Restoration
      image. It merely improves the         hence deals with getting an optimal
      subjective quality of the images      estimate of the desired result
      by work in with the existing data.
Purpose
     "compensate for" or "undo" defects which degrade an image.
Degrade Causes
(1) atmospheric turbulence
(2) sampling, quantization
(3) motion blur
(4) camera misfocus
(5) noise
Degradation Process
Given g(x,y), some knowledge about the degradation function H, and some
information about the additive noise.
The objective of the restoration is to obtain an estimate of the original image.
f(x,y) – image before degradation, ‘true image’
g(x,y) – image after degradation, ‘observed image’
h(x,y) – degradation filter which apply in degradation function
f(x,y) – estimate of f(x,y) computed from g(x,y)
n(x,y) – additive noise
In spatial domain,
As restoration filter R(u,v) is the reverse degradation function H(u,v) and neglecting
the noise term. Here, H(u,v) is the linear and position invariant
Noise
    Noise tells unwanted information in digital images.
    Noise produces undesirable effects such as artifacts, unrealistic edges, unseen
     lines, corners, blurred objects and disturbs background scenes.
    To reduce these undesirable effects, prior learning of noise models is essential
     for further processing.
Noise Source
    Image acquisition:
      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.
    Image transmission:
     Images are corrupted during transmission principally due to interference in the
channels used for transmission.
      Main sources of noise presented in digital images are resulted from atmospheric
disturbance and image sensor circuitry.
Noise models
    Noise models are
             Spatially independent noise models
                   – Gaussian noise
                   – Rayleigh noise
                   – Gamma noise
                   – Exponential noise
                   – Impulse (salt-and-pepper) noise
             Spatially dependent noise model
                   – Periodic noise
Gaussian Noise Model
    Gaussian Noise is a statistical noise having a probability density function equal
     to normal distribution, also known as Gaussian Distribution.
    Random Gaussian function is added to Image function to generate this noise.
    It is also called as electronic noise because it arises in amplifiers or detectors.
    Source: thermal vibration of atoms and discrete nature of radiation of warm
     objects.
 The general equation is:
 Where g = gray value, σ = standard deviation and µ = mean. Generally Gaussian
  noise mathematical model represents the correct approximation of real world
  scenarios.
 Effect of Standard Deviation(sigma) on Gaussian noise.
 For example, In this noise model, the mean value is zero, variance is 0.1 and 256
  gray levels, which is shown in below.
 Due to this equal randomness the normalized Gaussian noise curve look like in
  bell shaped.
 This picture of this noise model shows that 70% to 90% noisy pixel values of
  degraded image in between (µ-σ) and (µ+σ).
 The shape of normalized histogram is almost same in spectral domain.
Effect of Standard Deviation(sigma) on Gaussian noise
   ➢ The magnitude of Gaussian Noise depends on the Standard Deviation(sigma).
   ➢ Noise Magnitude is directly proportional to the sigma value.
Rayleigh noise
    Radar range and velocity images typically contain noise that can be modeled by
     the Rayleigh distribution.
   Where mean =                        and variance =
    are given as, respectively.
Gamma noise
  Gamma noise is generally seen in the laser based images. It obeys the Gamma
  distribution. This is shown below
Exponential noise
Uniform noise
   The uniform noise cause by quantizing the pixels of image to a number of
    distinct levels is known as quantization noise. It has approximately uniform
    distribution.
   In the uniform noise the level of the gray values of the noise are uniformly
    distributed across a specified range.
   Uniform noise can be used to generate any different type of noise distribution.
   This noise is often used to degrade images for the evaluation of image
    restoration algorithms.
   This noise provides the most neutral or unbiased noise .
Impulse Noise
   One of the noises commonly corrupting digital image is the impulse noise.
    Therefore, impulse noise reduction has become one of the active researches in
    these recent years. Many impulse noise models have been proposed by
    researchers for this research purpose.
Types of Impulse Noise
   There are three types of impulse noises.
         Salt Noise,
         Pepper Noise,
       Salt and Pepper Noise.
 Salt Noise: Salt noise is added to an image by addition of random bright (with
  255 pixel value) all over the image.
 Pepper Noise: Salt noise is added to an image by addition of random dark (with
  0 pixel value) all over the image.
 Salt and Pepper Noise: Salt and Pepper noise is added to an image by addition
  of both random bright (with 255 pixel value) and random dark (with 0 pixel
  value) all over the image. This model is also known as data drop noise because
  statistically it drop the original data values. Source: Malfunctioning of camera’s
  sensor cell.
Periodic Noise
    This noise is generated from electronics interferences, especially in power signal
     during image acquisition.
    This noise has special characteristics like spatially dependent and sinusoidal in
     nature at multiples of specific frequency.
    It’s appears in form of conjugate spots in frequency domain. It can be
     conveniently removed by using a narrow band reject filter or notch filter.
What is meant by called unconstrained restoration?
    In the absence of any knowledge about the noise ‘n‘, a meaningful criterion
     function is to seek an f^ such that H f^ approximates of in a least square sense
     by assuming the noise term is as small as possible.
    It is also known as least square error approach, n=g-Hf
    To estimate the original image f^, noise n has to be minimized and
            F^=g/H
      Where H = system operator.
      f^ = estimated input image.
      g = degraded image
What is meant by called constrained restoration?
    It is also unknown maximum square error approach,
                         n=g-Hf.
    To estimate the original image f^, noise n has to be maximized and
                         F^=g/H
      Where H = system operator.
      f^ = estimated input image.
      g = degraded image
Restoration in the presence of Noise only- Spatial filtering:
    When the only degradation present in an image is noise,
             i.e. g(x,y)=f(x,y)+η(x,y)
                    or
             G(u,v)= F(u,v)+ N(u,v)
   • The noise terms are unknown so subtracting them from g(x,y) or G(u,v) is not a
     realistic approach.
   • In the case of periodic noise it is possible to estimate N(u,v) from the spectrum
     G(u,v).
   • So N(u,v) can be subtracted from G(u,v) to obtain an estimate of original image.
   • Spatial filtering can be done when only additive noise is present.
The following techniques can be used to reduce the noise effect:
   • Mean Filter:
      (a)Arithmetic Mean filter
      (b)Geometric Mean filter
      (c)Harmonic Mean filter
   • Order statistics filter
   • (a)Median filter
   • (b)Max and Min filter
   • ©Midpoint filter
Arithmetic Mean filter
   • 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.
  • This operation can be using a convolution mask in which all coefficients have
    value 1/mn.
  • A mean filter smoothes local variations in image Noise is reduced as a result of
    blurring.
  • For every pixel in the image, the pixel value is replaced by the mean value of its
    neighboring pixels with a weight .
  • This will resulted in a smoothing effect in the image.
Geometric Mean filter
  • An image restored using a geometric mean filter is given by the expression
  • 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.
Harmonic Mean filter
  • The harmonic mean filtering operation is given by the expression
   • The harmonic mean filter works well for salt noise but fails for pepper noise. It
     does well with Gaussian noise also.
Order statistics filter
   • Order statistics filters are spatial filters whose response is based on ordering
     the pixel contained in the image area encompassed by the filter.
   • The response of the filter at any point is determined by the ranking result
Median filter
   • It is the best order statistic filter.
   • It replaces the value of a pixel by the median of gray levels in the
     Neighborhood of the pixel.
   • The original of the pixel is included in the computation of the median of the
     filter are quite possible because for certain types of random noise, the provide
     excellent noise reduction capabilities with considerably less blurring then
     smoothing filters of similar size.
   •   These are effective for bipolar and unipolor impulse noise.
Max and Min filter
   • Using the l00th percentile of ranked set of numbers is called the max filter and
     is given by the equation
   • It is used for finding the brightest point in an image.
   • Pepper noise in the image has very low values; it is reduced by max filter using
     the max selection process in the sublimated area sky.
   • The 0th percentile filter is min filter. This filter is useful for flinging the darkest
     point in image. Also, it reduces salt noise of the min operation.
   • The midpoint filter simply computes the midpoint between the maximum and
     minimum values in the area encompassed by
   • It comeliness the order statistics and averaging.
   • This filter works best for randomly distributed noise like Gaussian or uniform
     noise.
Periodic Noise by Frequency domain filtering
These types of filters are used for this purpose
   • Band Reject Filters
   • Butterworth Band reject Filter
   • Gaussian Band reject Filter
   • Band pass Filter
   • Notch Filters
   • Inverse Filtering
   • Minimum mean Square Error (Wiener) filtering
   • Constrained least squares filtering
Band Reject Filters
   • It removes a band of frequencies about the origin of the Fourier transformer.
Ideal Band reject Filter
   • D(u,v)- the distance from the origin of the centered frequency rectangle. W- the
     width of the band.
      Do- the radial center of the frequency rectangle.
Butterworth Band reject Filter
   • D(u,v)- the distance from the origin of the centered frequency rectangle. W- the
     width of the band.
      Do- the radial center of the frequency rectangle.
Gaussian Band reject Filter
These filters are mostly used when the location of noise component in the frequency
domain is known.
      Sinusoidal noise can be easily removed by using these kinds of filters because it
shows two impulses that are mirror images of each other about the origin. Of the
frequency transform
Band pass Filter
    The function of a band pass filter is opposite to that of a band reject filter.
    It allows a specific frequency band of the image to be passed and blocks the rest
     of frequencies.
    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
    These filters cannot be applied directly on an image because it may remove too
     much details of an image but these are effective in isolating the effect of an
     image of selected frequency bands.
Notch Filters
    A notch filter rejects (or passes) frequencies in predefined neighborhoods about
     a center frequency.
    Due to the symmetry of the Fourier transform notch filters must appear in
     symmetric pairs about the origin.
    The transfer function of an ideal notch reject filter of radius D0 with centers a
     (u0 , v0) and by symmetry at (-u0 , v0) is
    Ideal, butterworth, Gaussian notch filters
Inverse Filtering
    The simplest approach to restoration is direct inverse filtering where we
     complete an estimate F^(u,v) 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)
Restoration with an inverse filter
Limitation of Inverse Filtering
    From the previous equation we observe that we cannot recover the undegraded
     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.
Minimum mean Square Error (Wiener) filtering
    The inverse filtering approach has poor performance.
    The wiener filtering approach uses the degradation function and statistical
     characteristics of noise into the restoration process.
    The objective is to find an estimate f^ of the uncorrupted image f such that the
     mean square error between them is minimized.
    The error measure is given by
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.
    Where H(u,v)= degradation function
    H*(u,v)=complex conjugate of H(u,v)
    |H(u,v)|2=H* (u,v) H(u,v)
    Sn(u,v)=|N(u,v)|2= power spectrum of the noise
    Sf(u,v)=|F(u,v)|2= power spectrum of the underrated image
    The power spectrum of the undegraded image is rarely known.
    An approach used frequently when these quantities are not known or cannot be
     estimated then the expression used is
    Where K is a specified constant.
Constrained least squares filtering
    The wiener filter has a disadvantage that we need to know the power spectra of
     the undegraded 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 a optimal result. This method require 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
    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
APPLICATIONS OF RESTORATION
    1. In the area of astronomical applications characterized by poisson noise,
     Gaussian noise; image restoration has played a very important role in the area
     of imaging.
    2. SR technique is also useful in medical imaging such as computerised
     tomography(CT) and magnetic resonance imaging (MRI) Since resolution while
     the resolution quality is limited the acquisition of multiple images is possible.
   This can help the surgeon to operate more successfully over the exact part of
   the body with care.
 3. Over the multispectral bands of satellite imagery , multispectral image
  restoration can be carried out in order to improve the resolution of the captured
  satellite images.
 4. To enhance the HR of the mobile camera.
 5. In order to improve the video resolution, the motion blur estimation can be
  performed in the real time video image processing applications.