Image restoration1

Views:
 
     
 

Presentation Description

No description available.

Comments

Presentation Transcript

Dr Prasad Gandikota: 

Dr Prasad Gandikota Image Restoration

Introduction: 

Introduction Enhancement : heuristic procedures designed to manipulate an image in order to take advantage of the psychophysical aspects of the human visual system Restoration : a process that attempts to reconstruct or recover an image that has been degraded by using some a priori knowledge of degradation phenomenon Methodology: Model the degradation and apply the inverse process in order to recover the original image 2

Image Restoration : 

Image Restoration 3

Outline: 

Outline Degradation Model Noise Model Mean Filter Order-Statistics Filter Adaptive Filtering Inverse Filtering Wiener Filtering 4

Degradation Model : 

Degradation Model Given , some knowledge about the degradation function H , and some knowledge about the additive noise term -- objective : to obtain an estimate of the original image 5 Spatial domain Frequency domain

Noise Models: 

Noise Models Images are often degraded by random noise Noise can occur during image capture, transmission or processing, and may be dependent on or independent of image content Noise is usually described by its probabilistic characteristics White noise -- constant power spectrum (its intensity does not decrease with increasing frequency) 6

Slide 7: 

It is frequently applied as a crude approximation of image noise in most cases The advantage is that it simplifies the calculations Noises Gaussian (Normal) noise Rayleigh noise Gamma noise Exponential noise Uniform noise Impulse noise 7

Gaussian (Normal) noise: 

Gaussian (Normal) noise A very good approximation of noise that occurs in many practical cases Probability density of the random variable is given by the Gaussian function 8

Rayleigh noise: 

Rayleigh noise Note The displacement from the origin (Gaussian) The shape is skewed to the right 9

Gamma noise: 

Gamma noise a > 0, b : positive integer Laser imaging 10

Images & histograms resulting from adding noises: 

Images & histograms resulting from adding noises 11

Exponential noise & Uniform noise: 

Exponential noise & Uniform noise Exponential noise Uniform noise 12

Impulse noise (Salt and Pepper Noise): 

Impulse noise (Salt and Pepper Noise) Appearance is randomly scattered white (salt) or black (pepper) pixels over the image 13

Images & histograms resulting from adding noises: 

Images & histograms resulting from adding noises 14

Periodic Noise: 

Periodic Noise It irises typically from electrical or electromechanical interference during image acquisition Periodic noise can be reduced significantly via frequency domain filtering The Fourier transform of a pure sinusoid : a pair of conjugate impulses located at the conjugate frequencies of the sine wave Only periodic noise is global effect. Others can be models as local degradation 15

Image corrupted by sinusoidal noise: 

Image corrupted by sinusoidal noise 16 Image corrupted by sinusoidal noise Spectrum (each pair of conjugate impulses corresponds to one sine wave )

Estimation of Noise Parameters (Ⅰ): 

Estimation of Noise Parameters (Ⅰ) The parameters of noise PDFs may be known partially from sensor specification, but it is often necessary to estimate them for a particular imaging arrangement estimate the parameters of the PDF from small patches of reasonably constant gray level 17

Estimation of Noise Parameters (Ⅰ): 

Estimation of Noise Parameters (Ⅰ) 18

Estimation of Noise Parameters (Ⅱ): 

Estimation of Noise Parameters (Ⅱ) The shape of the histogram identifies the closest PDF match get mean & variance of the gray levels use mean & variance to solve for the parameters a & b Gaussian noise : mean & variance only Impulse noise : the actual probability of occurrence of white & black pixels are needed 19

Restoration in the Presence of Noise Only – Spatial Filtering: 

Restoration in the Presence of Noise Only – Spatial Filtering The only degradation present in an image is noise Noise : unknown cannot be subtracted from image or Fourier spectrum exception : periodic noise Spatial filtering is the method of choice in situations when only additive noise is present Enhancement & restoration become almost indistinguishable disciplines in this particular case 20

Mean filters (Ⅰ): 

Mean filters (Ⅰ) Arithmetic : average value of the corrupted image g(s,t) in the area defined by mask S of size m x n The kernel contains coefficients of value 1/mn Smoothing local variations; noise reduction as a result of blurring 21

Mean filters (Ⅱ): 

Mean filters (Ⅱ) Geometric : Smoothing is comparable to arithmetic mean Tend to lose less image detail What are the drawbacks with mean filtering? A single pixel with a very unrepresentative value can significantly affect the mean value of all the pixels in its neighborhood When the filter neighborhood straddles an edge, the filter will interpolate new values for pixels on the edge and so will blur that edge. This may be a problem if sharp edges are required in the output 22

Order-Statistics Filter (Ⅰ): 

Order-Statistics Filter (Ⅰ) The response is based on ordering the pixels contained in the image area encompassed by the filter There are several variations: Median filter : Max filter : reduce pepper noise Min filter : reduce salt noise 23

Order-Statistics Filter (Ⅱ): 

Order-Statistics Filter (Ⅱ) Midpoint filter : works best for Gaussian or uniform noise Order statistics + averaging Alpha-trimmed mean filter : Delete the d/2 lowest and d/2 highest gray-level values of g (x-a,y-b) Let g r (x,y) be the sum of the remaining pixels Useful in situations involving multiple types of noise 24

Demo1: 

Demo1 Repeated application of the median filter 25 Corrupted by pepper-and-salt noise 1 st time 2 nd time 3 rd time

Demo2: 

Demo2 26 ? ? original Max filter Corrupted by pepper noise Min filter

Order-Statistics Filter: Drawback: 

Order-Statistics Filter: Drawback Relatively expensive and complex to compute. To find the median it is necessary to sort all the values in the neighborhood into numerical order and this is relatively slow, even with fast sorting algorithms such as quicksort Possible remedies? When the neighborhood window is slid across the image, many of the pixels in the window are the same from one step to the next, and the relative ordering of these with each other will obviously not have changed 27

Adaptive Filtering (Ⅰ): 

Adaptive Filtering (Ⅰ) Changing the behavior according to the values of the grayscales under the mask 28 Mean under the mask Variance under the mask Variance of the image Current grayscale

Adaptive Filtering (Ⅱ): 

Adaptive Filtering (Ⅱ) If is high, then the fraction is close to 1; the output is close to the original value g High implies significant detail, such as edges If the local variance is low, such as the background, the fraction is close to 0; the output is close to 29

Adaptive Filtering: Variation: 

Adaptive Filtering: Variation is often unknown, so is taken as the mean of all values of over the entire image In practice, we adopt the slight variant : 3 purposes : Remove salt-and-pepper noise Smooth other noise that are not be impulsive Reduce distortion( e.g., excessive thinning/thickening of object boundaries) 30

Demo (7x7 mask): 

Demo (7x7 mask) 31 original Corrupted by Gaussian noise with variance=1000 Mean filter Adaptive filtering

Undoing the Degradation: 

Undoing the Degradation 32 Knowing G & H, how to obtain F? Two methods: Inverse filtering Wiener filtering Filter (degradation function) Original image (what we’re after) Degraded image

Estimating degration function: 

Estimating degration function Estimation by IMAGE OBSERVATION Estimation by Experimentation Estimation by modeling 33

Estimation by Image observation: 

Estimation by Image observation Given a degraded image without any knowledge about the degradation function H. One way to estimate H is to gather information from image itself Assume image is blurred Look for a small rectangular section of the image containing part of the image and background. Take this from a strong signal area Process the subimage to arrive at a result that is as unblurred as possible 34

Slide 35: 

Let observed subimage be denoted as gs(x,y) and processed image be fs(x,y) Hs(u,v) = Gs(u,v)/Fs(u,v) From the characteristics of this function, we then deduce degradation function H(u,v) Example If the radial plot of Hs(u,v) has approximate shape of gaussian curve. That information is used to construct H(u,v) in large scale 35

Estimation by Experimentation: 

Estimation by Experimentation If equipment similar to equipment used to acquire the degraded image is available it is possible to obtain accurate estimate of the degradation Images similar to degradation can be acquired with various system settings until they are degraded as closely as possible to the image we wish to restore The idea is to obtain impulse response of the degradation of by imaging an impulse using the same system settings H(u,v) = G(u,v)/A; 36

Estmation by Modeling: 

Estmation by Modeling Degradation model proposed by Hufnagel & Stanley is based on physical characteristics of atmospheric turbulences k is constant that depends on nature of the turbulances. k = 0.0025 server trubulance and k = 0.001 is mild turbulance k = 0.00025. 37

Inverse Filtering: 

Inverse Filtering The simplest approach to restoration is a random function whose Fourier transform is unknown: we cannot recover the undegraded image even if we know Problem: if approaches 0, / dominate the estimate solution: limit the analysis to frequencies near the origin 38 Noise – random function

Slide 39: 

There are two similar approaches: Low-pass filtering with filter L(u,v): Thresholding (using only filter frequencies near the origin) 39 D(u,v) being the distance from the center

The Poor Performance of Direct Inverse Filtering: 

The Poor Performance of Direct Inverse Filtering 40

Inverse Filtering: Weaknesses: 

Inverse Filtering: Weaknesses Inverse filtering is not robust enough Doesn’t explicitly handle the noise It is easily corrupted by the random noise The noise can completely dominate the output 41

Wiener Filtering: 

Wiener Filtering 42 What measure can we use to say whether our restoration has done a good job? Given the original image f and the restored version r , we would like r to be as close to f as possible One possible measure is the sum-squared-differences Wiener filtering: minimum mean square error: Specified constant

Comparison of Inverse & Wiener Filtering: 

Comparison of Inverse & Wiener Filtering 43

Slide 44: 

44 Column 1: Blurred image with additive Gaussian noise of variances 650, 65 and 0.0065 Column 2: Inverse filtering Column 3: Wiener filtering