Blind Image Deblurring Using Dark Channel Prior
Jinshan Pan1,2,3, Deqing Sun2,4, Hanspeter Pfister2, and Ming-Hsuan Yang3
1Dalian University of Technology 2Harvard University 3UC Merced 4 NVIDIA
Blind Image Deblurring Using Dark Channel Prior Jinshan Pan 1,2,3 , - - PowerPoint PPT Presentation
Blind Image Deblurring Using Dark Channel Prior Jinshan Pan 1,2,3 , Deqing Sun 2,4 , Hanspeter Pfister 2 , and Ming-Hsuan Yang 3 1 Dalian University of Technology 2 Harvard University 3 UC Merced 4 NVIDIA Overview Blurred image captured in
Blind Image Deblurring Using Dark Channel Prior
Jinshan Pan1,2,3, Deqing Sun2,4, Hanspeter Pfister2, and Ming-Hsuan Yang3
1Dalian University of Technology 2Harvard University 3UC Merced 4 NVIDIA
Overview
Blurred image captured in low-light conditions
2
Overview
Restored image
3
Overview
Blurred image
4
Overview
Restored image
5
Overview
– A generic method
text images, face images)
– No edge selection for natural image deblurring – No engineering efforts to incorporate domain knowledge for specific scenario deblurring
6
Blur Process
Blurred image Sharp image Noise Blur kernel
7
Blur Process
Blurred image Sharp image Noise Blur kernel Convolution operator
8
Challenging
9
Ill-Posed Problem
10
Ill-Posed Problem
11
Related Work
𝑞 𝑙, 𝐽 𝐶 ∝ 𝑞 𝐶 𝐽, 𝑙 𝑞 𝐽 𝑞 𝑙
Posterior distribution Likelihood Prior on 𝐽 Prior on 𝑙
Blur kernel 𝑙 Latent image 𝐽 Blurred image 𝐶
12
Related Work
– Positive and sparse
0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 10 20 30 40 50 60 70b p(b)
Most elements near zero A few can be large
k P(k) Shan et al., SIGGRAPH 2008 13
Related Work
– Fergus et al., SIGGRAPH 2006, Levin et al, CVPR 2009, Shan et al., SIGGRAPH 2008…
Histogram of image gradients
Log # pixels 14
Related Work
log ( ) , 1
i i
p I I
α
α = − ∇ <
∑
Derivative distributions in natural images are sparse: Parametric models I
Log prob
I
Gaussian:
Laplacian:
Levin et al., SIGGRAPH 2007, CVPR 2009 15
Related Work
𝑞 𝑙, 𝐽 𝐶 ∝ 𝑞 𝐶 𝐽, 𝑙 𝑞 𝐽 𝑞 𝑙 argmax𝑙,𝐽𝑞 𝑙, 𝐽 𝐶 (𝐽, 𝑙) = argmin𝑙,𝐽{𝑚 𝐶 − 𝐽 ∗ 𝑙 + 𝜒 𝐽 + 𝜚 𝑙 }
16
Related Work
Latent image kernel Latent image kernel 17
Related Work
sharp blurred
α
i α
i
18
Related Work
Red windows = [ p(sharp I) >p(blurred I) ]
15x15 windows 25x25 windows 45x45 windows
simple derivatives [-1,1],[-1;1] FoE filters (Roth&Black) 19
Related Work
1 | | = d
5 . | |
1 =
d 5 . | |
2 =
d
P(blurred step edge)
sum of derivatives: cheaper
1 1 5
. 0 =
41 . 1 5 . 5 .
5 . 5 .
= +
P(blurred impulse) P(impulse)
5 .
1 =
d 5 .
2 =
d 1
1 =
d 1
2 =
d
2 1 1
5 . 5 .
= + 41 . 1 5 . 5 .
5 . 5 .
= +
sum of derivatives: cheaper
P(step edge)
k=[0.5,0.5] 20
Related Work
P(blurred real image) P(sharp real image)
cheaper
0.5
5.8
i i
I ∇ =
∑
0.5
4.5
i i
I ∇ =
∑
Noise and texture behave as impulses - total derivative contrast reduced by blur
21
Related Work
– Maximum marginal probability estimation
– MAPI,k
𝑞 𝑙 𝐶 ∝ 𝑞 𝐶 𝑙 𝑞 𝑙 = ∫ 𝑞 𝐶, 𝐽 𝑙 𝑞 𝑙 𝑒𝐽
𝐽
= ∫ 𝑞 𝐶 𝐽, 𝑙 𝑞(𝐽)𝑞 𝑙 𝑒𝐽
𝑚
Marginalizing over 𝐽
𝑞 𝑙, 𝐽 𝐶 ∝ 𝑞 𝐶 𝐽, 𝑙 𝑞(𝐽)𝑞 𝑙
22
Related Work
– Maximum marginal probability estimation
– Computationally expensive
Variational Bayes Optimization surface for a single variable Maximum a-Posteriori (MAP) Pixel intensity Score
23
Related Work
– [Krishnan et al., CVPR 2011, Pan et al., CVPR 2014, Michaeli and Irani, ECCV 2014] – Effective for some specific images, such as natural images or text images – Cannot be generalized well E(Clear image) < E(Blurred image)
24
Related Work
– Main idea
CVPR 2009]
– [Cho and Lee SIGGRAPH Asia 2009, Xu and Jia ECCV 2010, …]
– Advantages and Limitations
image filters and usually fail when sharp edges are not available
25
Related Work
– Exemplar based methods [Sun et al., ICCP 2013, HaCohen et al., ICCV 2013, Pan et al., ECCV 2014]
26
Our Work
27
Convolution and Dark Channel
an image
( ) { , , }
( )( ) min ( )
c y N x c r g b
D I x I y
∈ ∈
=
∑
28
Convolution and Dark Channel
z
s (x) (x+[ ] - z) (z) 2
k
B I k
∈Ω
= ∑
k
Ω : the domain of blur kernel
[ ] : the rounding operator
z
(z) (z)=1
k
k k
∈Ω
≥
∑
,
29
Convolution and Dark Channel
at pixel x with size the same as the blur kernel. We have:
y N(x)
(x) min (y) B I
∈
≥
72 63 35 183 73 54 9 73 81 103 142 89 49 141 149 255 18 32 27 86 146 163 29 7 9 1/9 1/9 1/9 1/9 1/9 1/9 1/9 1/9 1/9 30 ≥ A toy example 30
Convolution and Dark Channel
channel of the blurred and clear images, we have:
image I. If there exist some pixels x ∈ Ω such that I(x) = 0, we have:
D( )(x) D( )(x) B I ≥ ||D( )|| > ||D( )|| B I
31
Convolution and Dark Channel
20000 40000 60000 0.01 0.02 0.03 0.04 0.05 Average number of dark pixels Intensity Blurred images Clear images
The statistical results on the dataset with 3,200 examples 32
Convolution and Dark Channel
Clear Blurred Clear Blurred Blurred images have less sparse dark channels than clear images 33
Proposed Method
– Add the dark channel prior into standard deblurring model – How to solve?
2 2 2 2 ,
min || * || + || || || || | || ( ) |
I k
I k B I D I k γ µ λ − + ∇ +
34
Optimization
– L0 norm
– Non-linear min operator
2 2 2 2
min || * || || ||
k
I k B k γ − +
2 2
min || * || || || + || ( ) ||
I
I k B I D I µ λ − + ∇
35
Optimization
– Alternative minimization
2 2
min || * || || || || ( ) ||
I
I k B I D I µ λ − + ∇ +
2 2 2 2 2 2 , ,
|| || + || ( ) min || * || || || || || ||
I u g
I g D I u I k B g u α β µ λ ∇ − − + + − +
2 2 2 2 2 2
min || * || || ( ) || || ||
I
I k B D I u I g β µ − + − + ∇ −
2 2 ,
|| || || ( ) || || || || | min |
u g
I g D I u g u α β µ λ ∇ − + − + +
Half-quadratic splitting [Xu et al., SIGGRAPH Asia 2011, Pan et al., CVPR 2014] 36
2 2
| min | | || || ( || | * || )
I
I B I I k D µ λ − + ∇ +
Optimization
– u, g sub-problem
2 2 ,
min || || + || ( ) || || || || ||
u g
I g D I u g u α β µ λ ∇ − − + +
2 2
min || ( ) || || || min || || || ||
u g
D I u u x g g β λ α µ − + ∇ − +
2
( ),| ( ) | 0,otherwise D I D I u λ β ≥ =
2
,| | 0,otherwise I I g µ α ∇ ∇ ≥ =
Related papers: [Xu et al., SIGGRAPH Asia 2011, Xu et al., CVPR 2013, Pan et al., CVPR 2014]
u and g are independent!
37
Optimization
– I sub-problem – Our observation
2 2 2 2
min || * || || ( ) || || ||
I
I k B D I u I g β µ − + − + ∇ −
( )=MI D I 1, z=y, M(x, z)= 0, otherwise.
38 min operator
Optimization
– Compute M
Intermediate image I D(I) Visualization of 𝐍Tu u 𝐍 𝐍T Toy example 39
Experimental Results
– Text images – Face images – Low-light images
40
Natural Image Deblurring Results
– Levin et al., CVPR 2009 – Köhler et al. ECCV 2012 – Sun et al., ICCP 2013
41
Natural Image Deblurring Results
20 40 60 80 100 1.5 2 2.5 3 3.5 4 Success rate (%) Error ratios Ours Xu et al. Xu and Jia Pan et al. Levin et al. Cho and Lee Michaeli and Irani Krishnan et al.
Quantitative evaluations on the dataset by Levin et al., CVPR 2009 100% 42
Natural Image Deblurring Results
18 21 24 27 30 33 im01 im02 im03 im04 Average Average PSNR Values Blurred images Fergus et al. Shan et al. Cho and Lee Xu and Jia Krishnan et al. Hirsch et al. Whyte et al. Pan et al. Ours
Quantitative evaluations on the dataset by Köhler et al. ECCV 2012 43
Natural Image Deblurring Results
20 40 60 80 100 1 2 3 4 5 6 Success rate (%) Error ratios Ours Xu and Jia Pan et al. Michaeli and Irani Sun et al. Xu et al. Levin et al. Krishnan et al. Cho and Lee
Quantitative evaluations on the dataset by Sun et al. ICCP 2013 44
Natural Image Deblurring Results
Blurred image Cho and Lee SIGGRAPH Asia 2009 Xu and Jia, ECCV 2010 Krishnan et al., CVPR 2011 Ours without D(I) Ours
45
Natural Image Deblurring Results
Blurred image Krishnan et al., CVPR 2011 Xu et al., CVPR 2013 Pan et al., CVPR 2014 Ours without D(I) Ours
Our real captured example 46
Text Image Deblurring Results
Average PSNRs Cho and Lee 23.80 Xu and Jia 26.21 Krishnan et al. 20.86 Levin et al. 24.90 Xu et al. 26.21 Pan et al. 28.80 Ours 27.94
Quantitative evaluations on the text image dataset by Pan et al., CVPR 2014 Natural image debluring methods
47
Text Image Deblurring Results
Blurred image Xu et al., CVPR 2013 Pan et al., CVPR 2014 Ours
Real captured example
48
Saturated Image Deblurring Results
Pan et al., CVPR 2014 Ours Blurred image Xu et al., CVPR 2013
Real captured example
49
Face Image Deblurring Results
Blurred image Pan et al., ECCV 2014 Ours Xu et al., CVPR 2013
50 Real captured example
Non-Uniform Deblurring
Blurred image Krishnan et al., CVPR 2011 Whyte et al., IJCV 2012 Xu et al., CVPR 2013 Ours Our estimated kernels 51
Convergence
0.76 0.78 0.8 0.82 1 12 23 34 45 Average Kernel Similarity Iterations 40 80 120 160 1 12 23 34 45 Average Energies Iterations
Kernel similarity plot Objective function value plot 52
Running Time
Method 255 x 255 600 x 600 800 x 800 Xu et al. (C++) 1.11 3.56 4.31 Krishnan et al. (Matlab) 24.23 111.09 226.58 Levin et al. (Matlab) 117.06 481.48 917.84 Ours without D(I) (Matlab) 2.77 15.65 28.94 Ours with naive implementation (Matlab) 134.31 691.71 964.90 Ours (Matlab) 17.07 115.86 195.80 Running time (/s) comparisons (obtained on the same PC). 53
Analysis and Discussions
Results on the dataset by Köhler et al. ECCV 2012 Results on the dataset by Levin et
75 85 95 105 1.5 2 2.5 3 Success rate (%) Error ratios Ours without dark channel Ours 25 27 29 31 33 im01 im02 im03 im04 Average Average PSNR Values Ours without dark channel Ours
54
Analysis and Discussions
1 2
|| || ( ) || || I p I I ∇ = ∇
20000000 40000000 60000000 80000000 1 14 27 40 53 66 79 92 105 118 Energy Values of p(I) Image index Blurred images Clear images
Statistics of different priors on the text image deblurring by Pan et al., CVPR 2014. The normalized sparsity sometimes favors blurred text images 55
Analysis and Discussions
Statistics of different priors on the text image deblurring by Pan et al., CVPR 2014. The dark channel prior favors clear text images
20000 40000 60000 80000 0.2 0.4 0.6
Average number of dark pixels
Intensity Blurred images Clear images
56
Limitations
contain zero-elements
– Property 2 does not hold – Dark channel prior has no effect on image deblurring
|| ( ) || || ( ) || D B D I =
57
Limitations
contain zero-elements
Blurred image Without D(I) Ours Dark channel of clear image Dark channel of blurred image Estimated dark channel
Dark channel prior has no effect on image deblurring 58
Limitations
Blurred image 59
Limitations
Without D(I) 60
Limitations
With D(I) 61
Take Home Message
is an inherent property of the blur process!
Code and datasets will be available at the authors’ websites.
62
More Results
63 Real captured image
More Results
64 Our result
More Results
65 Real captured image
More Results
66 Our result
Our Related Deblurring Work
– http://vllab.ucmerced.edu/~jinshan/projects/outli er-deblur/
– http://vllab.ucmerced.edu/~jinshan/projects/obje ct-deblur/
2016)
– http://vllab.ucmerced.edu/~jinshan/projects/text- deblur/
67