Download as pdf or txt
Download as pdf or txt
You are on page 1of 42

ECE 484 Digital Image Processing

Lec 11 - 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, ECE484 Digital Image Processing, 2019 p.1


Outline
 Recap of Lec 10: Sampling/Interpolation
 Image restoration
 Degradation models
 Combat nosie
 Inverse Filter to combat PSF
 Summary

Z. Li, ECE484 Digital Image Processing, 2019 p.2


Sampling in 1D
 Sampling in time domain is convolution in freq domain

Z. Li, ECE484 Digital Image Processing, 2019 p.3


Sampling in 2D
 Very similar

Z. Li, ECE484 Digital Image Processing, 2019 p.4


Aliasing
 Sampling freq is below Nyquist rate
 Nyquist rate:

Z. Li, ECE484 Digital Image Processing, 2019 p.5


Filtering to combat Aliasing
 Pre-filtering to limit image bandwidth to fit in sampling rate

Z. Li, ECE484 Digital Image Processing, 2019 p.6


Interpolation
 Interpolation

 2D interpolation

Z. Li, ECE484 Digital Image Processing, 2019 p.7


Bilinear & DCTIF Interpolation
 Bilinear

 DCTIF

Z. Li, ECE484 Digital Image Processing, 2019 p.8


Outline
 Recap of Lec 10:
 Image restoration
 Degradation models
 Inverse Filter and Weiner Filter
 Summary

Z. Li, ECE484 Digital Image Processing, 2019 p.9


degraded images
 What caused the image to blur?
 Can we improve the image, or “undo” the effects?

Z. Li, ECE484 Digital Image Processing, 2019 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, ECE484 Digital Image Processing, 2019 11


Image Restoration
 started from the 1950s
 application domains
 Scientific explorations original

 Legal investigations
 Film making and archival
 Image and video (de-)coding optical blur

 …
 Consumer photography
motion blur
 related problem: image
reconstruction in radio
astronomy, radar imaging and quantization
tomography

additive noises

[Banham and Katsaggelos 97]

Z. Li, ECE484 Digital Image Processing, 2019 12


Deconvolution
 Restoration via Deconvolution

Z. Li, ECE484 Digital Image Processing, 2019 p.13


Degradation Model
 Degradation as a linear time invariant process: g = f*h
 e.g. out of focus blur

h(x,y) is the impulse response or point spread function (PSF) of the imaging
system

Z. Li, ECE484 Digital Image Processing, 2019 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, ECE484 Digital Image Processing, 2019 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, ECE484 Digital Image Processing, 2019 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, ECE484 Digital Image Processing, 2019 17
Common Noise Models
 Prob model for noises

 additive noise

aR,aI zero mean, independent Gaussian


 multiplicative noise on signal magnitude
Z. Li, ECE484 Digital Image Processing, 2019 18
Noise Effects
 Noise effects on Histogram

Z. Li, ECE484 Digital Image Processing, 2019 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, ECE484 Digital Image Processing, 2019 20


example: Gaussian noise

Z. Li, ECE484 Digital Image Processing, 2019 21


example: salt-and-pepper noise
 Salt & Peper recovery from median filter

Z. Li, ECE484 Digital Image Processing, 2019 22


Periodic noise reduction
 Pure sine wave
 Appear as a pair of impulse (conjugate) in the frequency domain

Z. Li, ECE484 Digital Image Processing, 2019 p.23


Bandreject filters

* Reject an isotropic frequency

ideal Butterworth Gaussian

Z. Li, ECE484 Digital Image Processing, 2019 p.24


example of bandreject filter
 Freq domain filter denoise from Butterworth filters

Z. Li, ECE484 Digital Image Processing, 2019 25


notch filter
 Notch Filters
 Ideal
 Butterworth
 Gaussian

Z. Li, ECE484 Digital Image Processing, 2019 26


Combat Point Spread Function
 Inverse Filtering
 Recall degradation model

 Inverse Filtering

Z. Li, ECE484 Digital Image Processing, 2019 p.27


Inverse Filtering
 An 1-D example

spatial domain inverse freq domain inverse

Z. Li, ECE484 Digital Image Processing, 2019 p.28


Inverse filter
 assume h is known: low-pass filter H(u,v)
H(u,v)

 inverse filter
 recovered image

[EE381K, UTexas]
Z. Li, ECE484 Digital Image Processing, 2019 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

Z. Li, ECE484 Digital Image Processing, 2019 p.30


Estimation by modeling (1)
 Ex. Atmospheric model

original k=0.0025

k=0.001 k=0.00025

Z. Li, ECE484 Digital Image Processing, 2019 p.31


Estimation by modeling (2)
 Derive a mathematical model
 Ex. Motion of image- Motion Blur

Planar motion
Fourier
transform

Z. Li, ECE484 Digital Image Processing, 2019 p.32


Estimation by modeling: example
 Motion Blur

original Apply motion model

Z. Li, ECE484 Digital Image Processing, 2019 p.33


Inverse filtering
 With the estimated degradation function H(u,v)

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

Unknown
noise

=>

Estimate of Problem: 0 or small values


original image
Sol: limit the frequency
around the origin

Z. Li, ECE484 Digital Image Processing, 2019 p.34


Inverse Filter
 De-bluring Filtering

Z. Li, ECE484 Digital Image Processing, 2019 p.35


Inverse Filtering
 When it falls apart...

Z. Li, ECE484 Digital Image Processing, 2019 p.36


What is wrong ?
 Noise Amplification

introduces high freq noises

Z. Li, ECE484 Digital Image Processing, 2019 p.37


High Freq Noise from Inverse Filtering
 Previous example
 added high freq nosie amplified by the inverse of H()

Z. Li, ECE484 Digital Image Processing, 2019 p.38


How to resolve noise amplification ?
 Quick & Dirty Fix

 Inverse filter with high freq cut off

 Pseudo Inverse Filter

Z. Li, ECE484 Digital Image Processing, 2019 p.39


Pseudo Inverse
 Pseudo Inverse

Z. Li, ECE484 Digital Image Processing, 2019 p.40


Inverse with Cut Off
 Cut off high freq part assuming orginal images are band limited

Z. Li, ECE484 Digital Image Processing, 2019 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, ECE484 Digital Image Processing, 2019 p.42

You might also like