Assistant Professor Department of Computer Science Engineering AIET, Jaipur Image Restoration • The main objective of restoration is to improve the quality of a digital image which has been degraded due to various phenomena like: • Transmission. • Improper focusing of camera during image acquisition. • Noise. Image Restoration Process
• Restoration attempts to recover an image that has
been degraded by using a prior knowledge of the degradation phenomenon. • Thus, restoration techniques are oriented toward modeling the degradation & applying the inverse process in order to recover the original image. • The purpose of image restoration is to restore a degraded/distorted image to its original image and quality. A Model of the Image Degradation/Restoration Process A Model of the Image Degradation/Restoration Process • The degradation is modeled as a degradation function that, together with an additive noise term, operates on an input image f (x, y) to produce a degraded image g(x, y). • Given, g(x, y) have some knowledge about the degradation function H & also about the additive noise term. • The objective of restoration is to obtain an estimate of the original image. • This estimated image should be closer to the original input image. A Model of the Image Degradation/Restoration Process • In spatial domain, the expression for degraded image is given by:
• Where the symbol indicates spatial
convolution. • In Frequency domain, the expression for degraded image is given by: Noise Model • 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 & by the quality of the sensing elements. • Images are corrupted during transmission principally due to interference in the channel used for transmission. Noise Model 1. Spatial and Frequency Properties of Noise. • With the exception of spatially periodic noise, noise is independent of spatial coordinates, and it is uncorrelated with respect to the image itself. • We can describe that spatial noise is concerned with the statistical behavior of the gray-level values. Some Important Noise • Noise is characterized by their PDF. Each PDF has unique shape. • Noise is additive to image intensity at a pixel location. • Following are some important PDF: 1. Gaussian noise 2.Rayleigh noise 3.Erlang or gamma noise 4. Exponential noise 5. Uniform noise 6. Impulse (salt-and-pepper) noise 2. Important Noise Probability Density Functions. a) Gaussian noise: The PDF of a Gaussian noise is given by
Where z is the intensity of the pixel.
is the mean of intensity. σ is its standard deviation. is variance of z. b) Rayleigh noise: The PDF of a Rayleigh noise is given by c) Erlang or gamma noise: The PDF of a Gamma noise is given by
The mean and variance of this density are given by
d) Exponential noise: The PDF of a Exponential noise is given by
The mean and variance of this density function are
e) Uniform noise: The PDF of a Uniform noise is given by
The mean and variance of this density function are
f) Impulse (salt-and-pepper) noise The PDF of a Impulse noise is given by
• If b>a, intensity b will appear as a light dot in the image.
• If b<a, intensity b will appear as a dark dot in the image. • If Pa & Pb either or is zero, the impulse noise is called unipolar. • If Pa is aprox. Equal to Pb than this noise is also called as salt & pepper granules. Periodic Noise • Periodic noise, in an image arises from electrical or electromechanical interference caused during the image acquisition. • This is the only type of spatially dependent noise. Restoration in the presence of Noise – Spatial Domain • When the only degradation present in an image is noise than equation will be:
A. Mean Filter- Different types of mean filters are:
1. Arithmetic mean filter 2. Geometric mean filter 3. Harmonic mean filter 4. Contra harmonic mean filter. 1. Arithmetic mean filter: • This is the simplest of the mean filters. • Let Sxy represent the set of coordinates in a rectangular sub image window(neighborhood) 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.
• This operation can be implemented using a spatial filter
of size m×n in which all coefficients have value1/mn. • A mean filter smoothes local variations in an image, and noise is reduced as a result of blurring. 2. Geometric mean filter: An image restored using a geometric mean filter is given by the expression
• A geometric mean filter gives better smoothing
than arithmetic mean filter, but here fine details of image can not be retained. 3. 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 also with other types of noise like Gaussian noise. 4. Contra harmonic mean filter: The contra harmonic mean filter yields a restored image based on the expression
• where Q is called the order of the filter.
• This filter is well suited for reducing or 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. • The contra harmonic filter reduces to the arithmetic mean filter if Q = 0, and to the harmonic mean filter if Q = -1. B. Order-Statistic Filters • Order-statistic filters are spatial filters whose response is based on ordering (ranking) the values of the pixels contained in the image area encompassed by the filter. • The ranking result determines the response of the filter. There are different types of Order-Statistic Filters: 1. Median filter 2. Max and min filters 3. Midpoint filter 4. Alpha-trimmed mean filter. 1. Median filter: • The best-known order-statistic filter is the median filter. • Replaces the value of a pixel by the median of the intensity levels in the neighborhood of that pixel:
• The median represents the 50th percentile filter
(because we choose median value) • Advantage: It is used to reduce the impulse noise. 2. Max and Min filters Max Filters: • The 100th percentile results in the called max filter, given by
• Advantage: This filter is useful for finding the
brightest points in an image and also reduce pepper noise. • Min filters • The 0th percentile filter is the min filter:
• Advantage: This filter is useful for finding the
darkest points in an image. Also, it reduces salt noise. 3. Midpoint filter • The midpoint filter simply computes the midpoint between the maximum and minimum values in the area encompassed by the filter:
• Advantages: To reduce Gaussian or uniform
noise. 4. Alpha-trimmed mean filter: • We eliminate 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, Act as arithmetic mean filter. • If d= mn-1, Filter becomes a median filter. • Application: Used to remove salt-and-pepper and Gaussian noise. Adaptive Filters • Two adaptive filters whose behavior changes based on statistical characteristics of the image inside the filter region defined by the m×n rectangular window Sxy.
1. Adaptive local noise reduction filter.
2. Adaptive median filter. 1. Adaptive local noise reduction filter: • We Perform operation on local area that is Neighborhood Sxy. • Random Variables are identified by the statistical measures. • The most popular statistical measures are mean and variance. • The mean gives a measure of average intensity in the region over which the mean is computed, and • The variance gives a measure of average contrast in that region. • Our filter is to operate on a local region, Sxy. • The response of these filter at any point (x, y) depend on four quantities: Conditions:
• Response of Adaptive local noise reduction filter is
given by : 2. Adaptive median filter • The median filter works well if the spatial density of the impulse noise is less i.e. Pa & Pb less than 0.2. This disadvantage can be overcome by Adaptive median filter. • Adaptive median filtering can handle impulse noise of larger values. • An additional benefit of the adaptive median filter is that it preserve details of the image while smoothing non-impulse noise. Let • This algorithm is used for three main purposes: 1. To remove salt-and-pepper noise. 2. To provide smoothing. 3. To reduce distortion, such as excessive thinning or thickening of object boundaries. Estimating the Degradation Function
• There are three principal ways to estimate the
degradation function for use in image restoration: (1) Observation, (2) Experimentation, and (3) Mathematical modeling. Estimation by Image Observation • The degradation function (H) can be estimated by visually looking into a small section of the image. • A degraded image without any knowledge about the degradation function H. • Based on the assumption that the image was degraded by a linear, position-invariant process, one way to estimate H is to gather information from the image itself. • If the image is blurred, we can look at a small rectangular section of the image containing sample structures, like part of an object and the background. • In order to reduce the effect of noise, we would look for an area in which the signal content is strong e.g., an area of high contrast. Estimation by Experimentation • Assumption: If equipment similar to the equipment used to acquire the degraded image is available, it is possible in principle to obtain an accurate estimate of the degradation. • Images similar to the degraded image can be acquired with various system settings. • Then obtain the impulse response of the degradation by imaging an impulse (small dot of light) using the same system settings. • An impulse is simulated by a bright dot of light, as bright as possible to reduce the effect of noise to negligible values. • The Fourier transform of an impulse is a constant. Estimation by Mathematical modeling Inverse Filtering • It is process of restoring an image degraded by a degradation function H. • The simplest approach to restoration is direct, inverse filtering. • Inverse filtering provides 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 the degradation function. Inverse Filtering Assignment Questions Q1. Discuss the model of image degradation and restoration process? Q2. Discuss the different Noise Model. Q3. Explain Inverse filtering in details? Q4. What is homomorphic filtering and also describe the wiener filtering process. Q5. What noise filter? Explain the various types of noise filters.