Image Restoration: B14 Image Analysis Michaelmas 2014 A. Zisserman - Image Degradations
Image Restoration: B14 Image Analysis Michaelmas 2014 A. Zisserman - Image Degradations
• Image degradations
• motion blur, focus blur, resolution
• MAP formulation
• original
• optical blur
• motion blur
original blurred
*
FT FT Inverse FT
Blurring acts as a low pass filter and attenuates higher spatial frequencies
Definitions
h(x,y) n(x,y)
Fourier trick
Example : Deblurring (deconvolution)
f(x,y) g(x,y)
g(x,y)
f(x,y)
The problem of noise amplification
Schematically …
1 N(u,v)
F(u,v) H(u,v)
F(u,v)
x +
H(u,v)F(u,v)
1/H(u,v) G(u,v)
F(u,v)
x
1
f(x,y)
blur = 1.0 pixels
The Wiener filter
The Wiener filter
Schematically …
x +
H(u,v)F(u,v)
0 u,v 0 u,v
1/H(u,v) G(u,v)
F(u,v) x
1
W(u,v)
Restoration with a Wiener filter
G(u,v) = H(u,v) F(u,v) + N(u,v)
K = 5.0 e -4
Wiener filter – sketch derivation
Parseval’s Theorem
Degradation model
where
pixels
FT of …
Algorithm
1. Rotate image so that blur is horizontal
2. Estimate length of blur
3. Construct a bar modelling the convolution
4. Compute and apply a Wiener filter
5. Optimize over values of K
f(x,y) h(x,y) f(x,y)
blur = 30 pixels
Maximum a posteriori (MAP)
Estimation
Generative model (forward process)
• original f(x,y)
• motion blur
ĝ = Af + n
where ĝ and f are n-vectors, and A is an n × n matrix.
Inverse problem
f̂ 2
= arg min (g − Af ) + λp (f )
f
Likelihood/ prior/
loss function regularization
Example
p (f ) = (∇f ) 2
• increase resolution
High-resolution
image, f.
Registrations,
lighting and
M1 M2 M3 M4 blur.
g1 g2 g3 g4
Low-resolution images
Sketch solution Non-examinable
gi = Mif + η i
where Mi combines registration, lighting and down-sampling.
likelihood prior
Super resolution example I: Mars
rotating DV camera
Mosaic
Super-resolution result for ROI
85 JPEG images
g = A(h) f
G = HF
= *
observed generated
image image
2
min (g − A(h) f ) + λpf (f ) + μph (h)
f ,h
Likelihood/ image blur
loss function prior prior
Example I: Blind deblurring
estimated
blurred image restored image
blur filter
More examples of blind deblurring
Blurry input Deblurred output