Title: Removing Camera Shake from a Single Photograph
1Removing Camera Shake from a Single Photograph
Rob Fergus, Barun Singh, Aaron Hertzmann, Sam T.
Roweis and William T. Freeman
Massachusetts Institute of Technology
andUniversity of Toronto
2Overview
Our algorithm
Original
3Close-up
Original
Naïve Sharpening
Our algorithm
4Lets take a photo
Blurry result
5Slow-motion replay
6Slow-motion replay
Motion of camera
7Image formation process
?
Blur kernel
Blurry image
Sharp image
Input to algorithm
Desired output
Convolutionoperator
Model is approximation
8Why is this hard?
Simple analogy 11 is the product of two
numbers. What are they?
No unique solution 11 1 x 11 11 2 x
5.5 11 3 x 3.667 etc..
Need more information !!!!
9Multiple possible solutions
Sharp image
Blur kernel
?
Blurry image
10Natural image statistics
Characteristic distribution with heavy tails
Histogram of image gradients
11Blury images have different statistics
Histogram of image gradients
12Parametric distribution
Histogram of image gradients
Use parametric model of sharp image statistics
13Uses of natural image statistics
- Denoising Roth and Black 2005
- Superresolution Tappen et al. 2005
- Intrinsic images Weiss 2001
- Inpainting Levin et al. 2003
- Reflections Levin and Weiss 2004
- Video matting Apostoloff Fitzgibbon 2005
- Corruption process assumed known
14Existing work on image deblurring
- Software algorithms
- Extensive literature in signal processing
community
- Mainly Fourier and/or Wavelet based
- Strong assumptions about blur ? not true for
camera shake
- Image constraints are frequency-domain power-laws
15Hardware approaches
Existing work on image deblurring
Coded shutter
Dual cameras
Image stabilizers
Raskar et al. SIGGRAPH 2006
Ben-Ezra and Nayar 2004
Our approach can be combined with these hardware
methods
16Three sources of information
- 1. Reconstruction constraint
2. Image prior
Distribution of gradients
17How do we use this information?
- Obvious thing to do
- Combine 3 terms into an objective function
- Run conjugate gradient descent
- This is Maximum a-Posteriori (MAP)
18Results from MAP estimation
Input blurry image
Maximum a-Posteriori (MAP)
Our method Variational Bayes
19Variational Bayesian method
- Based on work of Miskin Mackay 2000
-
- Keeps track of uncertainty in estimates of image
and blur by using a distribution instead of a
single estimate - Helps avoid local maxima and over-fitting
20Variational Bayesian method
Objective function for a single variable
Maximum a-Posteriori (MAP)
Variational Bayes
Score
Pixel intensity
21Overview of algorithm
Input image
- Pre-processing
- Kernel estimation
- Multi-scale approach
- Image reconstruction
- - Standard non-blind deconvolution routine
22Preprocessing
Input image
Convert tograyscale
Remove gammacorrection
User selects patch from image
- Bayesian inference too slow to run on whole
image
Infer kernel from this patch
23Initialization
Input image
Convert tograyscale
Remove gammacorrection
User selects patch from image
Initialize 3x3 blur kernel
Initial image estimate
Initial blur kernel
Blurry patch
24Inferring the kernel multiscale method
Input image
Convert tograyscale
Remove gammacorrection
User selects patch from image
Loop over scales
VariationalBayes
Upsampleestimates
Initialize 3x3 blur kernel
Use multi-scale approach to avoid local minima
25Image Reconstruction
Input image
Convert tograyscale
Remove gammacorrection
User selects patch from image
Loop over scales
VariationalBayes
Upsampleestimates
Initialize 3x3 blur kernel
Full resolutionblur estimate
Non-blind deconvolution (Richardson-Lucy)
Deblurred image
26Results on real images
- Submitted by people from their own photo
collections - Type of camera unknown
- Output does contain artifacts
- Increased noise
- Ringing
- Compares well to existing methods
27Original photograph
28Our output
Blur kernel
29Original photograph
Matlabs deconvblind
30Close-up of garland
Original
Matlabs deconvblind
Our output
31Original photograph
32Matlabs deconvblind
33Photoshop sharpen more
34Our output
Blur kernel
35(No Transcript)
36Original photograph
37Our output
Blur kernel
38Original photograph
39Our output
Blur kernel
40Matlabs deconvblind
41Original photograph
42Our output
Blur kernel
43Close-up of child
Our output
Original photograph
44Original photograph
45Our output
Blur kernel
46Close-up of bird
Original
Unsharp mask
Our output
47Original photograph
48Blur kernel
Our output
49Image artifacts estimated kernels
Blur kernels
Image patterns
Note blur kernels were inferred from large image
patches, NOT the image patterns shown
50Summary
- Method for removing camera shake from real
photographs - First method that can handle complicated blur
kernels - Uses natural image statistics
- Non-blind deconvolution currently simplistic
- Things we have yet to model
- Correlations in colors, scales, kernel continuity
- JPEG noise, saturation, object motion
51Acknowledgements
- James Miskin David Mackay for putting their
code on the web - Antonio Torralba, Fredo Durand and Berthold
Horn for their insights and suggestions. - People who submitted their home photos
- Omar Khan, Reinhard Klette, Michael Lewicki,
Pietro Perona, Lyndsey Pickup, Mukta Prasad, Ian
Reid and Elizabeth van Ruitenbeek
52nts
53Blurry synthetic image
54Our output
55Ground truth
56Matlabs deconvblind
57True kernel
Estimated kernel
58Does real camera shake give a spatially-invariant
blur kernel?
Subjects handholding DSLR with 1 sec exposure
Close-up of dots
59Does real camera shake give a spatially-invariant
blur kernel?
Subjects handholding DSLR with 1 sec exposure
60MAP vs Variational
MAP
Variational
MAP using variational initialization
61Histograms of café scene
62Close-up view of the dots at each corner of
photos taken
Person 1
Person 2
Topleft
Topright
Bot.left
Bot.right
Person 3
Person 4
63Uses of natural image statistics
- Denoising Roth and Black 2005
64Uses of natural image statistics
- Superresolution Tappen et al. 2005
65Comparison of non-blind deconvolution methods
- Variational inference hold b fixed and
marginalize out over it - Conjugate gradient descent on MAP solution (with
field of experts prior Roth Black) - Richardson-Lucy
66Comparison of non-blind deconvolution methods
- Variational inference hold b fixed and
marginalize out over it - Conjugate gradient descent on MAP solution (with
field of experts prior Roth Black) - Richardson-Lucy
67Comparison of non-blind deconvolution methods
- Variational inference hold b fixed and
marginalize out over it - Conjugate gradient descent on MAP solution (with
field of experts prior Roth Black) - Richardson-Lucy
68A very simple image
Start
image
x
blur
b
69Miskin and Mackay, 2000
- Binary images
- Priors on intensities
- Small, synthetic blurs
- Not applicable to natural images