ECE 484 Digital Image Processing Lec 10 - Image Restoration I Zhu Li Dept of CSEE, UMKC Office: FH560E, Email: lizhu@umkc.edu, Ph: x 2346. http://l.web.umkc.edu/lizhu slides created with WPS Office Linux and EqualX equation editor Z. Li, Digital Image Processing, 2018 p.1
Outline Recap of Lec 09: Sampling Image restoration Degradation models Inverse Filter Summary Z. Li, Digital Image Processing, 2018 p.2
Sampling in 1D Sampling in time domain is convolution in freq domain Z. Li, Digital Image Processing, 2018 p.3
Sampling in 2D Very similar Z. Li, Digital Image Processing, 2018 p.4
Aliasing Sampling freq is below Nyquist rate Nyquist rate: Z. Li, Digital Image Processing, 2018 p.5
Filtering to combat Aliasing Pre-filtering to limit image bandwidth to fit in sampling rate Z. Li, Digital Image Processing, 2018 p.6
Resampling Interpolation 2D interpolation Z. Li, Digital Image Processing, 2018 p.7
Bilinear & DCTIF Interpolation Bilinear DCTIF Z. Li, Digital Image Processing, 2018 p.8
Outline Recap of Lec 09: Sampling Image restoration Degradation models Inverse Filter and Weiner Filter Summary Z. Li, Digital Image Processing, 2018 p.9
degraded images What caused the image to blur? Can we improve the image, or undo the effects? Z. Li, Digital Image Processing, 2018 10
Image Restoration Image enhancement: improve an image subjectively. Image restoration: remove distortion from image in order to go back to the original objective process. Z. Li, Digital Image Processing, 2018 11
Image Restoration started from the 1950s application domains Scientific explorations Legal investigations Film making and archival Image and video de-coding Consumer photography related problem: image reconstruction in radio astronomy, radar imaging and tomography original optical blur motion blur quantization additive noises [Banham and Katsaggelos 97] Z. Li, Digital Image Processing, 2018 12
Deconvolution Restoration via Deconvolution Z. Li, Digital Image Processing, 2018 p.13
Degradation Model Degradation as a linear time invariant process: g = f*h e.g. out of focus blur hx,y is the impulse response or point spread function PSF of the imaging system Z. Li, Digital Image Processing, 2018 p.14
Degradation Model Image enhancement: improve an image subjectively. Image restoration: remove distortion from image, to go back to the original -- objective process Z. Li, Digital Image Processing, 2018 15
a model for image distortion Image restoration Use a priori knowledge of the degradation Modeling the degradation and apply the inverse process Formulate and evaluate objective criteria of goodness Z. Li, Digital Image Processing, 2018 16
usual assumptions for the distortion model Noise Independent of spatial location Exception: periodic noise Uncorrelated with image Degradation function H Linear Position-invariant divide-and-conquer step #1: image degraded only by noise. Z. Li, Digital Image Processing, 2018 17
Prob model for noises Common Noise Models 0, 0,!,,, 2 2 1 1 / 2 / 2 2 2 ³ = ³ - = ³ - = = - - - - - - - z for ae z p Exponential z for e a b z a z p b a Gamma Erlang a z for e a z b z p Rayleigh e z p Gaussian az az b b b a z z s m ps a R,a I zero mean, independent Gaussian multiplicative noise on signal magnitud additive noise 18 Z. Li, Digital Image Processing, 2018
Noise effects on Histogram Noise Effects Z. Li, Digital Image Processing, 2018 19
Recovering from Noise Spatial Filtering: Box and Gaussian filters Order stats filters: Median and Mean filters Freq domain Filters LP filtering in Freq domain BP filter in Freq domain Non-Linear Filters Bilateral filters Cross Bilateral & Guided Filters Z. Li, Digital Image Processing, 2018 20
example: Gaussian noise Z. Li, Digital Image Processing, 2018 21
example: salt-and-pepper noise Salt & Peper recovery from median filter Z. Li, Digital Image Processing, 2018 22
Periodic noise reduction Pure sine wave Appear as a pair of impulse conjugate in the frequency domain sin, 0 0 y v x u A y x f + = ú û ù ê ë é + + - - - = - 2, 2 2, 2 2, 0 0 0 0 p p d p p d v v u u v v u u A j v u F
Bandreject filters * Reject an isotropic frequency ideal Butterworth Gaussian
example of bandreject filter Freq domain filter denoise from Butterworth filters Z. Li, Digital Image Processing, 2018 25
notch filter Notch Filters Ideal Butterworth Gaussian Z. Li, Digital Image Processing, 2018 26
Combat Point Spread Function Inverse Filtering Recall degradation model Inverse Filtering Z. Li, Digital Image Processing, 2018 p.27,,,,,, ˆ v u H v u N v u F v u H v u G v u F + = =
Inverse Filtering An 1-D example spatial domain inverse freq domain inverse Z. Li, Digital Image Processing, 2018 p.28
Inverse filter assume h is known: low-pass filter Hu,v Hu,v inverse filter recovered image [EE381K, UTexas] 29
How to obtain PSF? PSF or H is not generally known, how to obtain? If the image acquisition system is ready Obtain the impulse response impulse Impulse response
Estimation by modeling 1 Ex. Atmospheric model 2 2 5 / 6 H u, v = e -k u + v original k=0.0025 k=0.001 k=0.00025
Estimation by modeling 2 Derive a mathematical model Ex. Motion of image- Motion Blur g x, y = ò T f x - x0 t, y - y0 t dt 0 Fourier transform Planar motion G u, v = F u, v ò T 0 e - j 2p [ ux0 t + vy0 t ] dt
Estimation by modeling: example Motion Blur original Apply motion model
Inverse filtering With the estimated degradation function Hu,v Gu,v=Fu,vHu,v+Nu,v Unknown noise => ˆ G u, v F u, v = = F u, v + H u, v N u, v H u, v Estimate of original image Problem: 0 or small values Sol: limit the frequency around the origin
Inverse Filter De-bluring Filtering Z. Li, Digital Image Processing, 2018 p.35
Inverse Filtering When it falls apart... Z. Li, Digital Image Processing, 2018 p.36
What is wrong? Noise Amplification introduces high freq noises Z. Li, Digital Image Processing, 2018 p.37
High Freq Noise from Inverse Filtering Previous example added high freq nosie amplified by the inverse of H Z. Li, Digital Image Processing, 2018 p.38
How to resolve noise amplification? Quick & Dirty Fix Inverse filter with high freq cut off Pseudo Inverse Filter Z. Li, Digital Image Processing, 2018 p.39,,,,,, ˆ v u H v u N v u F v u H v G u v u F + = =
Pseudo Inverse Pseudo Inverse Z. Li, Digital Image Processing, 2018 p.40
Inverse with Cut Off Cut off high freq part assuming orginal images are band limited Z. Li, Digital Image Processing, 2018 p.41
Summary Image Restoration overall model Noises are indepent Degradation/PSF are linear and shift invariant Noise supression via linear/non-linear filtering Recover from PSF degradation by estimation of PSF and Inverse Filtering Can we do better? Yes we can. Weiner Filter Z. Li, Digital Image Processing, 2018 p.42