rob fergus courant institute of mathematical sciences new york university a variational approach to...

37
Rob Fergus Courant Institute of Mathematical Sciences New York University A Variational Approach to Blind Image Deconvolution

Upload: emil-webb

Post on 18-Dec-2015

223 views

Category:

Documents


7 download

TRANSCRIPT

Page 1: Rob Fergus Courant Institute of Mathematical Sciences New York University A Variational Approach to Blind Image Deconvolution

Rob Fergus

Courant Institute of Mathematical Sciences

New York University

A Variational Approach to Blind Image Deconvolution

Page 2: Rob Fergus Courant Institute of Mathematical Sciences New York University A Variational Approach to Blind Image Deconvolution

Overview

• Much recent interest in blind deconvolution:

• Levin ’06, Fergus et al. ’06, Jia et al. ’07, Joshi et al. ’08, Shan et al. ’08, Whyte et al. ’10

• This talk:

– Discuss Fergus ‘06 algorithm

– Try and give some insight into the variational methods used

Page 3: Rob Fergus Courant Institute of Mathematical Sciences New York University A Variational Approach to Blind Image Deconvolution

Removing Camera Shake from a Single Photograph

Rob Fergus, Barun Singh, Aaron Hertzmann, Sam T. Roweis and William T. Freeman

Massachusetts Institute of Technology and

University of Toronto

Page 4: Rob Fergus Courant Institute of Mathematical Sciences New York University A Variational Approach to Blind Image Deconvolution

Image formation process

=

Blurry image Sharp image

Blur kernel

Input to algorithm Desired output

Convolutionoperator

Model is approximationAssume static scene & constant

blur

Page 5: Rob Fergus Courant Institute of Mathematical Sciences New York University A Variational Approach to Blind Image Deconvolution

Why such a hard problem?

=

Blurry image

Sharp image Blur kernel

=

=

Page 6: Rob Fergus Courant Institute of Mathematical Sciences New York University A Variational Approach to Blind Image Deconvolution

Statistics of gradients in natural images

Histogram of image gradients

Characteristic distribution with heavy tails

Log

# pi

xels

Image gradient is difference between spatially adjacent pixel intensities

Page 7: Rob Fergus Courant Institute of Mathematical Sciences New York University A Variational Approach to Blind Image Deconvolution

Blurry images have different statistics

Histogram of image gradients

Log

# pi

xels

Page 8: Rob Fergus Courant Institute of Mathematical Sciences New York University A Variational Approach to Blind Image Deconvolution

Parametric distribution

Histogram of image gradients

Use parametric model of sharp image statistics

Log

# pi

xels

Page 9: Rob Fergus Courant Institute of Mathematical Sciences New York University A Variational Approach to Blind Image Deconvolution

Three sources of information

1. Reconstruction constraint:

=

Input blurry imageEstimated sharp imageEstimatedblur kernel

2. Image prior: 3. Blur prior:

Positive&

SparseDistribution of gradients

Page 10: Rob Fergus Courant Institute of Mathematical Sciences New York University A Variational Approach to Blind Image Deconvolution

Three sources of information

y = observed image b = blur kernel x = sharp image

Page 11: Rob Fergus Courant Institute of Mathematical Sciences New York University A Variational Approach to Blind Image Deconvolution

Posterior

p(b;xjy) = k p(yjb;x) p(x) p(b)

Three sources of information

y = observed image b = blur kernel x = sharp image

Page 12: Rob Fergus Courant Institute of Mathematical Sciences New York University A Variational Approach to Blind Image Deconvolution

Posterior 1. Likelihood(Reconstruct

ion constraint)

2. Image prior

3. Blurprior

p(b;xjy) = k p(yjb;x) p(x) p(b)

Three sources of information

y = observed image b = blur kernel x = sharp image

Page 13: Rob Fergus Courant Institute of Mathematical Sciences New York University A Variational Approach to Blind Image Deconvolution

y = observed image b = blur x = sharp image

1. Likelihood Reconstruction constraint

p(yjb;x) =Q

i N (yi jxi b;¾2)i - pixel

index

Overview of model

2. Image prior p(x)

Mixture of Gaussians fit to empirical distribution of image gradients

3. Blur prior p(b)

Exponential distribution to

keep kernel +ve & sparse

Page 14: Rob Fergus Courant Institute of Mathematical Sciences New York University A Variational Approach to Blind Image Deconvolution

The obvious thing to do

– Combine 3 terms into an objective function

– Run conjugate gradient descent

– This is Maximum a-Posteriori (MAP)

No success!

Posterior 1. Likelihood(Reconstruct

ion constraint)

2. Image prior

3. Blurprior

p(b;xjy) = k p(yjb;x) p(x) p(b)

Page 15: Rob Fergus Courant Institute of Mathematical Sciences New York University A Variational Approach to Blind Image Deconvolution

Variational Independent Component Analysis

• Binary images

• Priors on intensities

• Small, synthetic blurs

• Not applicable to natural images

Miskin and Mackay, 2000

Page 16: Rob Fergus Courant Institute of Mathematical Sciences New York University A Variational Approach to Blind Image Deconvolution

Variational Bayes

Variational Bayesian approach

Keeps track of uncertainty in estimates of image and blur by using a distribution instead of a single estimate

Toy illustration: Optimization surface for a single variable

Maximum a-Posteriori (MAP)

Pixel intensity

Score

Page 17: Rob Fergus Courant Institute of Mathematical Sciences New York University A Variational Approach to Blind Image Deconvolution

Simple 1-D blind deconvolution example

y = observed image b = blurx = sharp image

n = noise ~ N(0,σ2)

Let y = 2

y = bx + n

Page 18: Rob Fergus Courant Institute of Mathematical Sciences New York University A Variational Approach to Blind Image Deconvolution

Let y = 2 σ2 = 0.1

N (yjbx;¾2)

p(b;xjy) = k p(yjb;x) p(x) p(b)

Page 19: Rob Fergus Courant Institute of Mathematical Sciences New York University A Variational Approach to Blind Image Deconvolution

Gaussian distribution:

N (xj0;2)

p(b;xjy) = k p(yjb;x) p(x) p(b)

Page 20: Rob Fergus Courant Institute of Mathematical Sciences New York University A Variational Approach to Blind Image Deconvolution

p(b;xjy) = k p(yjb;x) p(x) p(b)

Page 21: Rob Fergus Courant Institute of Mathematical Sciences New York University A Variational Approach to Blind Image Deconvolution

Marginal distribution p(b|y)

p(bjy) =R

p(b;xjy) dx = kR

p(yjb;x) p(x) dx

0 1 2 3 4 5 6 7 8 9 100

0.02

0.04

0.06

0.08

0.1

0.12

0.14

0.16

b

Bayes

p(b

|y)

Page 22: Rob Fergus Courant Institute of Mathematical Sciences New York University A Variational Approach to Blind Image Deconvolution

0 1 2 3 4 5 6 7 8 9 100

0.02

0.04

0.06

0.08

0.1

0.12

0.14

0.16

b

Bayes

p(b

|y)

MAP solution

Highest point on surface:argmaxb;x p(x;bjy)

Page 23: Rob Fergus Courant Institute of Mathematical Sciences New York University A Variational Approach to Blind Image Deconvolution

Variational Bayes

• True Bayesian approach not tractable

• Approximate posterior with simple distribution

Page 24: Rob Fergus Courant Institute of Mathematical Sciences New York University A Variational Approach to Blind Image Deconvolution

Fitting posterior with a Gaussian

• Approximating distribution is Gaussian

• MinimizeK L (q(x;b) jj p(x;bjy))

q(x;b)

Page 25: Rob Fergus Courant Institute of Mathematical Sciences New York University A Variational Approach to Blind Image Deconvolution

KL-Distance vs Gaussian width

0 0.1 0.2 0.3 0.4 0.5 0.6 0.74

5

6

7

8

9

10

11

Gaussian width

KL(

q||

p)

Page 26: Rob Fergus Courant Institute of Mathematical Sciences New York University A Variational Approach to Blind Image Deconvolution

Variational Approximation of Marginal

0 1 2 3 4 5 6 7 8 9 100

0.5

1

1.5

2

2.5

b

p(b

|y)

Variational

True marginal

MAP

Page 27: Rob Fergus Courant Institute of Mathematical Sciences New York University A Variational Approach to Blind Image Deconvolution

Try sampling from the model

Let true b = 2

Repeat:

• Sample x ~ N(0,2)

• Sample n ~ N(0,σ2)

• y = xb + n

• Compute pMAP(b|y), pBayes(b|y) & pVariational(b|y)

• Multiply with existing density estimates (assume iid)

0 1 2 3 4 5 6 7 8 9 100

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

b

p(b

|y)

Page 28: Rob Fergus Courant Institute of Mathematical Sciences New York University A Variational Approach to Blind Image Deconvolution

Actual Setup of Variational Approach

Work in gradient domain:

! r x b= r yx b= y

Approximate posterior with

is Gaussian on each pixel

is rectified Gaussian on each blur kernel element

p(r x;bjr y)q(r x;b)

q(r x;b) = q(r x)q(b)q(r x)q(b)

K L (q(r x)q(b) jj p(r x;bjr y))

Assume

Cost function

Page 29: Rob Fergus Courant Institute of Mathematical Sciences New York University A Variational Approach to Blind Image Deconvolution
Page 30: Rob Fergus Courant Institute of Mathematical Sciences New York University A Variational Approach to Blind Image Deconvolution
Page 31: Rob Fergus Courant Institute of Mathematical Sciences New York University A Variational Approach to Blind Image Deconvolution

Close-up

• Original

• Output

Page 32: Rob Fergus Courant Institute of Mathematical Sciences New York University A Variational Approach to Blind Image Deconvolution

Original photograph

Page 33: Rob Fergus Courant Institute of Mathematical Sciences New York University A Variational Approach to Blind Image Deconvolution

Our output

Blur kernel

Page 34: Rob Fergus Courant Institute of Mathematical Sciences New York University A Variational Approach to Blind Image Deconvolution

Blur kernelOur outputOriginal image

Close-up

Page 35: Rob Fergus Courant Institute of Mathematical Sciences New York University A Variational Approach to Blind Image Deconvolution

Recent Comparison paper

Percent success

(higher is better)

IEEE CVPR 2009 conference

Page 36: Rob Fergus Courant Institute of Mathematical Sciences New York University A Variational Approach to Blind Image Deconvolution

Related Problems

• Bayesian Color Constancy

– Brainard & Freeman

• JOSA 1997

– Given color pixels, deduce:

• Reflectance Spectrum of surface

• Illuminant Spectrum

– Use Laplace approximation

– Similar to Gaussian q(.) From Foundation of Vision by Brian Wandell, Sinauer

Associates, 1995

Page 37: Rob Fergus Courant Institute of Mathematical Sciences New York University A Variational Approach to Blind Image Deconvolution

Conclusions

• Variational methods seem to do the right thing for blind deconvolution.

• Interesting from inference point of view: rare case where Bayesian methods are needed

• Can potentially be applied to other ill-posed problems in image processing