45
Toward Non-stationary Blind Image Deblurring: Models and Techniques Ji, Hui Department of Mathematics National University of Singapore NUS, 30-May-2017

Toward Non-stationary Blind Image Deblurring: Models and Techniquesims.nus.edu.sg/events/2017/data/files/jihui.pdf ·  · 2017-05-30Toward Non-stationary Blind Image Deblurring:

Embed Size (px)

Citation preview

Page 1: Toward Non-stationary Blind Image Deblurring: Models and Techniquesims.nus.edu.sg/events/2017/data/files/jihui.pdf ·  · 2017-05-30Toward Non-stationary Blind Image Deblurring:

Toward Non-stationary Blind Image Deblurring: Models and Techniques

Ji, Hui

Department of Mathematics

National University of Singapore

NUS, 30-May-2017

Page 2: Toward Non-stationary Blind Image Deblurring: Models and Techniquesims.nus.edu.sg/events/2017/data/files/jihui.pdf ·  · 2017-05-30Toward Non-stationary Blind Image Deblurring:

Outline of the talk

• Non-stationary Image blurring

– Motion blurring

– Out-of-focus blurring

• Brief Introduction to blind deconvolution (stationary image blurring)

• A two-stage approach for recovering images with non-stationary motion blurring

• A fast method for estimating de-focus map of images with non-stationary out-of-focus blurring

Page 3: Toward Non-stationary Blind Image Deblurring: Models and Techniquesims.nus.edu.sg/events/2017/data/files/jihui.pdf ·  · 2017-05-30Toward Non-stationary Blind Image Deblurring:

Image blurring

• Degradation of sharpness and contrast of the image, causing loss of image details (high frequency information)

Page 4: Toward Non-stationary Blind Image Deblurring: Models and Techniquesims.nus.edu.sg/events/2017/data/files/jihui.pdf ·  · 2017-05-30Toward Non-stationary Blind Image Deblurring:

Image blurring

• Degradation of sharpness and contrast of the image, causing loss of image details (high frequency information)

Motion blurring Out-of-focus blurring

Page 5: Toward Non-stationary Blind Image Deblurring: Models and Techniquesims.nus.edu.sg/events/2017/data/files/jihui.pdf ·  · 2017-05-30Toward Non-stationary Blind Image Deblurring:

Motion blurring

• Blurring caused by the relative motion between camera or object during shutter time

– Larger motion; more blurring

t

t+Δ𝑡

image sensor

lens

Object point

Motion blurring

Page 6: Toward Non-stationary Blind Image Deblurring: Models and Techniquesims.nus.edu.sg/events/2017/data/files/jihui.pdf ·  · 2017-05-30Toward Non-stationary Blind Image Deblurring:

• Blurring caused by objects away from focal plane

– More away from focal plane; more blurring

Out-of-focus (defocus) blurring

d

Defocus plane

c

f0d f

Focal plane Lens Image sensor

Page 7: Toward Non-stationary Blind Image Deblurring: Models and Techniquesims.nus.edu.sg/events/2017/data/files/jihui.pdf ·  · 2017-05-30Toward Non-stationary Blind Image Deblurring:

Motion blur : motion path on image plane

• Pinhole camera

• 2D Motion field in image

– Spatially invariant motion blur == constant motion field

• Scene depth Z is close to constant

• Camera motion:

3D rigid camera motion:

t= ,

x x

y y

z z

t

t

t

1

x Xf

y YZ

Z

( )( )

( )

x z

y z

t t xfx tr t

ty tt y

Z

2

2

( 1)

( 1)

x y z

x y z

xy x y

y xy x

, 0( , 0);x yt tt

Page 8: Toward Non-stationary Blind Image Deblurring: Models and Techniquesims.nus.edu.sg/events/2017/data/files/jihui.pdf ·  · 2017-05-30Toward Non-stationary Blind Image Deblurring:

Motion blurring: Stationary VS Non-stationary

Slanted scene depth

In-plane camera translation

Dynamic scene with moving object

Constant scene depth

In-plane camera translation

Rotational camera motion

Page 9: Toward Non-stationary Blind Image Deblurring: Models and Techniquesims.nus.edu.sg/events/2017/data/files/jihui.pdf ·  · 2017-05-30Toward Non-stationary Blind Image Deblurring:

De-focus blurring: usually nonstationary

• Image usually contains several depth layer

• Different layer has different blurring

De-focus blurring amount ≈ Ordinal scene depth

Page 10: Toward Non-stationary Blind Image Deblurring: Models and Techniquesims.nus.edu.sg/events/2017/data/files/jihui.pdf ·  · 2017-05-30Toward Non-stationary Blind Image Deblurring:

Convolution model for stationary image blurring

= +

f g p Blurred

imageSharp

image

Kernel

(PSF)Noise

known

Blind deblurring:

unknown unknownunknown

: Convolution(non-invertible) , 1 2 1 2, ] [ ,[ ]m np k p m ng k kg k

Page 11: Toward Non-stationary Blind Image Deblurring: Models and Techniquesims.nus.edu.sg/events/2017/data/files/jihui.pdf ·  · 2017-05-30Toward Non-stationary Blind Image Deblurring:

Regularization for blind image deconvolution

• Infinite number of solutions: how to avoid the trivial solution:

• ℓ1-norm relating regularization (either TV or wavelet)

f pg

, 1 1 2 2

2

2

1( ) ( )min . .2

g pf g p g p s t p ‖ ‖

2

2 1 2

1( ) || ||

[ ]{ : [ ] 1, 0}

( ) || || || ||

;

j J

g Wg

p p jp j

h Wh h

[1] J. Cai, H. Ji, C. Liu and Z. Shen, Blind motion deblurring from a single image using sparse approximation, CVPR’09

f f

Page 12: Toward Non-stationary Blind Image Deblurring: Models and Techniquesims.nus.edu.sg/events/2017/data/files/jihui.pdf ·  · 2017-05-30Toward Non-stationary Blind Image Deblurring:

Regularization for blind image deconvolution

• Infinite number of solutions: how to avoid the trivial solution:

• ℓ1-norm relating regularization (either TV or wavelet)

f pg

, 1 1 2 2

2

2

1( ) ( )min . .2

g pf g p g p s t p ‖ ‖

2

2 1 2

1( ) || ||

[ ]{ : [ ] 1, 0}

( ) || || || ||

;

j J

g Wg

p p jp j

h Wh h

[1] J. Cai, H. Ji, C. Liu and Z. Shen, Blind motion deblurring from a single image using sparse approximation, CVPR’09

f f

Remark: ℎ2

2is for avoiding

convergence to 𝛿, as 1 2

2[1, ,1] arg min || || s.t. n h h

Page 13: Toward Non-stationary Blind Image Deblurring: Models and Techniquesims.nus.edu.sg/events/2017/data/files/jihui.pdf ·  · 2017-05-30Toward Non-stationary Blind Image Deblurring:

Demonstration

Real blurred image Our result

Page 14: Toward Non-stationary Blind Image Deblurring: Models and Techniquesims.nus.edu.sg/events/2017/data/files/jihui.pdf ·  · 2017-05-30Toward Non-stationary Blind Image Deblurring:

Demonstration

Real blurred image Our result

Page 15: Toward Non-stationary Blind Image Deblurring: Models and Techniquesims.nus.edu.sg/events/2017/data/files/jihui.pdf ·  · 2017-05-30Toward Non-stationary Blind Image Deblurring:

Non-stationary image blurring

Motion blurring Out-of-focus blurring

Page 16: Toward Non-stationary Blind Image Deblurring: Models and Techniquesims.nus.edu.sg/events/2017/data/files/jihui.pdf ·  · 2017-05-30Toward Non-stationary Blind Image Deblurring:

Stationary VS Non-stationary (in 1D case)

• Matrix form of Convolution:

– Stationary: all rows of 𝐾 are same, up to a shift

– Nonstationary: each row of K might be different

• Motion blurring

– Each row is of free-form, but with compact support

• Out-of-focus blurring

– Each row is a Gaussian, but with different standard deviation

, n nKf Kg

Page 17: Toward Non-stationary Blind Image Deblurring: Models and Techniquesims.nus.edu.sg/events/2017/data/files/jihui.pdf ·  · 2017-05-30Toward Non-stationary Blind Image Deblurring:

A piece-wise stationary model based framework [2]

[2] H. Ji and K. Wang, A two-stage approach to remove spatially-varying motion blur from a single photograph, CVPR’12

Input blurred image

Estimate one kernelfor each region

Identify and removeerroneous kernels

PCA-based Interp. for blurring matrix

Non-blind Image deblurring robust to matrix error

The output

Piece-wise uniform motion-blur approx.

Interp. for blurringmatrix & deblurring

Page 18: Toward Non-stationary Blind Image Deblurring: Models and Techniquesims.nus.edu.sg/events/2017/data/files/jihui.pdf ·  · 2017-05-30Toward Non-stationary Blind Image Deblurring:

Sensitivity of deconvolution to blur kernel error

Clear image Image blurred by horizontal constantkernel of size 10 pixels

Page 19: Toward Non-stationary Blind Image Deblurring: Models and Techniquesims.nus.edu.sg/events/2017/data/files/jihui.pdf ·  · 2017-05-30Toward Non-stationary Blind Image Deblurring:

Sensitivity of deconvolution to blur kernel error

Clear image Image blurred by horizontal constantkernel of size 10 pixels

Image de-blurred by ℓ1-norm based regularization, and an erroneous kernel (horizontal constant of size 12 pixels

Page 20: Toward Non-stationary Blind Image Deblurring: Models and Techniquesims.nus.edu.sg/events/2017/data/files/jihui.pdf ·  · 2017-05-30Toward Non-stationary Blind Image Deblurring:

Robust non-blind image deconvolution [3]

• An EIV (Error-In-Variable) model for de-convolution

• Problem : given f and , estimate g

[3] H. Ji and K. Wang, Robust image de-convolution with an inaccurate blur kernel. IEEE Trans. Image Proc.. 2012

: kernel err : or; image noin se

( )

p

pf g n gpp n

p

Page 21: Toward Non-stationary Blind Image Deblurring: Models and Techniquesims.nus.edu.sg/events/2017/data/files/jihui.pdf ·  · 2017-05-30Toward Non-stationary Blind Image Deblurring:

Robust non-blind image deconvolution [3]

• An EIV (Error-In-Variable) model for de-convolution

• Problem : given f and , estimate g

• Reformulation:

Two unknowns:

[3] H. Ji and K. Wang, Robust image de-convolution with an inaccurate blur kernel. IEEE Trans. Image Proc.. 2012

: kernel err : or; image noin se

( )

p

pf g n gpp n

p

f = (p -d p )*g+ n = p*g- q+ n

distortion by kernel error

clear image

image

:

: p

g

q g {

Page 22: Toward Non-stationary Blind Image Deblurring: Models and Techniquesims.nus.edu.sg/events/2017/data/files/jihui.pdf ·  · 2017-05-30Toward Non-stationary Blind Image Deblurring:

Two sparsity-relating regularization

• Sparsity of in pixel space q = d p*g

g p*g p*g d p*g

Page 23: Toward Non-stationary Blind Image Deblurring: Models and Techniquesims.nus.edu.sg/events/2017/data/files/jihui.pdf ·  · 2017-05-30Toward Non-stationary Blind Image Deblurring:

Two sparsity-relating regularization

• Sparsity of in pixel space

• Second: Artifacts in solution caused by kernel error is sparse

in DCT domain

q = d p*g

g p*g p*g d p*g

Result using Erroneous kernel

The resulting error along edges

Page 24: Toward Non-stationary Blind Image Deblurring: Models and Techniquesims.nus.edu.sg/events/2017/data/files/jihui.pdf ·  · 2017-05-30Toward Non-stationary Blind Image Deblurring:

Convex minimization model

• Model for robust image deconvolution

– W: framelet transform, D: DCT transformClear image Artifacts System error

Page 25: Toward Non-stationary Blind Image Deblurring: Models and Techniquesims.nus.edu.sg/events/2017/data/files/jihui.pdf ·  · 2017-05-30Toward Non-stationary Blind Image Deblurring:

Demo.

Our nonstationary method

Blurry image

Gupta et al. ECCV’10(nonstationary

Stationary blind deconvolution

Page 26: Toward Non-stationary Blind Image Deblurring: Models and Techniquesims.nus.edu.sg/events/2017/data/files/jihui.pdf ·  · 2017-05-30Toward Non-stationary Blind Image Deblurring:

Demo.

Our nonstationary method

Blurry image

Gupta et al. ECCV’10 (non-stationary)

Stationary blind deconvolution

Page 27: Toward Non-stationary Blind Image Deblurring: Models and Techniquesims.nus.edu.sg/events/2017/data/files/jihui.pdf ·  · 2017-05-30Toward Non-stationary Blind Image Deblurring:

Demo.

Our nonstationary method

Blurry image

Whyte et al. CVPR’10 (non-stationary)

Stationary blind deconvolution

Page 28: Toward Non-stationary Blind Image Deblurring: Models and Techniquesims.nus.edu.sg/events/2017/data/files/jihui.pdf ·  · 2017-05-30Toward Non-stationary Blind Image Deblurring:

Demo.

Our nonstationary method

Blurry image

Whyte et al. CVPR’10 (non-stationary)

Stationary blind deconvolution

Page 29: Toward Non-stationary Blind Image Deblurring: Models and Techniquesims.nus.edu.sg/events/2017/data/files/jihui.pdf ·  · 2017-05-30Toward Non-stationary Blind Image Deblurring:

Out-of-focus (defocus) blurring

d

Defocus plane

c

f0d f

Focal plane Lens Image sensor

2

0

0

| |

( )

f

s f

d d fc

d n d f

Circle of Confusion

0

2

20 2 2

0

0

for each pixel , blur kern

||1( ) exp( )

2

e

( )

l

||

r

r rp r

r

0 0)(defocus amount) ( (Gaussian s.t.d) .( )~r rc

Page 30: Toward Non-stationary Blind Image Deblurring: Models and Techniquesims.nus.edu.sg/events/2017/data/files/jihui.pdf ·  · 2017-05-30Toward Non-stationary Blind Image Deblurring:

Defocus amount estimation from a single image [4]

[4] G. Xu, Y. Quan and H. Ji, Defocus amount estimation via maximum rank of patches, 2017

Darker color = less defocus amount = less blurring = closer distance

Page 31: Toward Non-stationary Blind Image Deblurring: Models and Techniquesims.nus.edu.sg/events/2017/data/files/jihui.pdf ·  · 2017-05-30Toward Non-stationary Blind Image Deblurring:

• Defocus amount ≈ ordinal scene depth

– foreground/background segmentation

– Image matting; image refocusing

Defocus amount estimation from a single image [4]

[4] G. Xu, Y. Quan and H. Ji, Defocus amount estimation via maximum rank of patches, 2017

Darker color = less defocus amount = less blurring = closer distance

Page 32: Toward Non-stationary Blind Image Deblurring: Models and Techniquesims.nus.edu.sg/events/2017/data/files/jihui.pdf ·  · 2017-05-30Toward Non-stationary Blind Image Deblurring:

Rank of patches and Separable blur kernel

0

Consider three matrices U,I,G associated by 2D

convolution: I=U . Suppose U is positive (negative) definite

ˆ ˆand Then, Rank(I)=|

| || is DFT of

. , whe e r g.

G

G gg g g

Proposition

• Constructing positive (negative) patches at edges points

– Sampling K image patches with different orientations.

– One of these different oriented patches is positive definite.

Page 33: Toward Non-stationary Blind Image Deblurring: Models and Techniquesims.nus.edu.sg/events/2017/data/files/jihui.pdf ·  · 2017-05-30Toward Non-stationary Blind Image Deblurring:

Rank of patches and Separable blur kernel

0

Consider three matrices U,I,G associated by 2D

convolution: I=U . Suppose U is positive (negative) definite

ˆ ˆand Then, Rank(I)=|

| || is DFT of

. , whe e r g.

G

G gg g g

Proposition

• Constructing positive (negative) patches at edges points

– Sampling K image patches with different orientations.

– One of these different oriented patches is positive definite.

• Defocus amount and maximum rank of oriented patches

0max Rank )1 1(or

(P ) ~ ln(1 )k K k

c n

Page 34: Toward Non-stationary Blind Image Deblurring: Models and Techniquesims.nus.edu.sg/events/2017/data/files/jihui.pdf ·  · 2017-05-30Toward Non-stationary Blind Image Deblurring:

Completion of defocus map

Input image Defocus estimation at edge points

Page 35: Toward Non-stationary Blind Image Deblurring: Models and Techniquesims.nus.edu.sg/events/2017/data/files/jihui.pdf ·  · 2017-05-30Toward Non-stationary Blind Image Deblurring:

• Defocus map completion by matting Laplacian method– Keep the values in complete map are close to the ones given

at edge points– Keeping the discontinuities of defocus map consistent with

image edges.

Completion of defocus map

Input image Defocus estimation at edge points

Page 36: Toward Non-stationary Blind Image Deblurring: Models and Techniquesims.nus.edu.sg/events/2017/data/files/jihui.pdf ·  · 2017-05-30Toward Non-stationary Blind Image Deblurring:

Demonstration

Input image defocus map at edges

Page 37: Toward Non-stationary Blind Image Deblurring: Models and Techniquesims.nus.edu.sg/events/2017/data/files/jihui.pdf ·  · 2017-05-30Toward Non-stationary Blind Image Deblurring:

Demonstration

Input image defocus map at edges

Complete defocus map

Page 38: Toward Non-stationary Blind Image Deblurring: Models and Techniquesims.nus.edu.sg/events/2017/data/files/jihui.pdf ·  · 2017-05-30Toward Non-stationary Blind Image Deblurring:

Demonstration

Input image defocus map at edges

Complete defocus map Foreground segmentation

Page 39: Toward Non-stationary Blind Image Deblurring: Models and Techniquesims.nus.edu.sg/events/2017/data/files/jihui.pdf ·  · 2017-05-30Toward Non-stationary Blind Image Deblurring:

More

Input image Bae et al. Tang et al. ours

Page 40: Toward Non-stationary Blind Image Deblurring: Models and Techniquesims.nus.edu.sg/events/2017/data/files/jihui.pdf ·  · 2017-05-30Toward Non-stationary Blind Image Deblurring:

Evaluation on fore/background segmentation

• Test defocus dataset from CUHK: 704 images

– Manually segmented in-focus foreground and out-of-focus background

Precision and recall curves of foreground/background segmentation using the defocus maps generated by different methods

Page 41: Toward Non-stationary Blind Image Deblurring: Models and Techniquesims.nus.edu.sg/events/2017/data/files/jihui.pdf ·  · 2017-05-30Toward Non-stationary Blind Image Deblurring:

Occlusion-aware image composition

Source image

Target

Page 42: Toward Non-stationary Blind Image Deblurring: Models and Techniquesims.nus.edu.sg/events/2017/data/files/jihui.pdf ·  · 2017-05-30Toward Non-stationary Blind Image Deblurring:

Occlusion-aware image composition

Source image

Target

Image composition 1

Page 43: Toward Non-stationary Blind Image Deblurring: Models and Techniquesims.nus.edu.sg/events/2017/data/files/jihui.pdf ·  · 2017-05-30Toward Non-stationary Blind Image Deblurring:

Occlusion-aware image composition

Source image

Target Image composition 2

Image composition 1

Page 44: Toward Non-stationary Blind Image Deblurring: Models and Techniquesims.nus.edu.sg/events/2017/data/files/jihui.pdf ·  · 2017-05-30Toward Non-stationary Blind Image Deblurring:

List of co-authors

• Blind deconvolution for removing motion blur

– Jianfeng Cai, Chaoqiang Liu and Zuowei Shen

• Non-stationery blind motion deblurring

– Wang Kang

• Non-stationary out-of-focus blurring estimation and applications

– Xu Guodong and Yuhui Quan

Page 45: Toward Non-stationary Blind Image Deblurring: Models and Techniquesims.nus.edu.sg/events/2017/data/files/jihui.pdf ·  · 2017-05-30Toward Non-stationary Blind Image Deblurring:

Thank You