By Mary Hudachek-Buswell. Overview Atmospheric Turbulence Blur.

16
Conjugate Gradient Iterative Method for Deblurring Images By Mary Hudachek-Buswell

Transcript of By Mary Hudachek-Buswell. Overview Atmospheric Turbulence Blur.

Page 1: By Mary Hudachek-Buswell. Overview Atmospheric Turbulence Blur.

Conjugate Gradient Iterative

Method for Deblurring Images

By Mary Hudachek-Buswell

Page 2: By Mary Hudachek-Buswell. Overview Atmospheric Turbulence Blur.

Overview

Page 3: By Mary Hudachek-Buswell. Overview Atmospheric Turbulence Blur.

Atmospheric Turbulence Blur

2 2( )( , ) k x yH x y e ( , ) [ ( , )] ( , )g x y H f x y n x y

G A F E

Page 4: By Mary Hudachek-Buswell. Overview Atmospheric Turbulence Blur.

2-D Separable Gaussian Blur2 2( )( , ) k x yH x y e

2 2 2 2( )k x y k x k ye e e 2 2

and k x k yA e B e This point spread function represents atmospheric turbulence blur.

Page 5: By Mary Hudachek-Buswell. Overview Atmospheric Turbulence Blur.

Toeplitz Matrix Blur

Toeplitz matrix structure is a matrix with constants along the descending diagonal. These type matrices are spatially invariant and have zero boundary conditions when combined together.

Page 6: By Mary Hudachek-Buswell. Overview Atmospheric Turbulence Blur.

Illustration of Spatially Invariant BLur

Original image Invariant Blur Variant Blur

Page 7: By Mary Hudachek-Buswell. Overview Atmospheric Turbulence Blur.

Illustration of Zero Boundary Conditions

Surrounds the object with a black boundary, or zeros on the outside borders of the image

0 0 0

0 0

0 0 0

X

Page 8: By Mary Hudachek-Buswell. Overview Atmospheric Turbulence Blur.

Minimize the 2-Norm of the Residual

A X B C

2 2R A X B C

A is the column blur, B is the row blur, X is the restored image, and C is distorted image. A & B are overdetermined and positive definite. Overdetermined systems have more equations than unknowns and positive definite matrices have a unique quality where given any nonzero vector, z, the product

0TzAz

Page 9: By Mary Hudachek-Buswell. Overview Atmospheric Turbulence Blur.

Least Squares of an Overdetermined System

0

A B CX

I I

0

T

TA A B CX A I

I I I

T TA BA I X A C

I I

2T TBA A I X A C

I

Page 10: By Mary Hudachek-Buswell. Overview Atmospheric Turbulence Blur.

Least Squares cont.

2

0

T TT TB B A CA A I X B I

I I

2 2T T T TA A I X B B I A C B

1 12 2T T T TX A A I A C B B B I

Page 11: By Mary Hudachek-Buswell. Overview Atmospheric Turbulence Blur.

Necessary Properties

The system of recurrence formulas that generates a unique sequence of iterates with

such that

With the property that at step n, the norm is minimized

n nX K2 2 1 1, , ,..., n n

nK X A X B A X B A X B

Page 12: By Mary Hudachek-Buswell. Overview Atmospheric Turbulence Blur.

Conjugate Gradient AlgorithmInitial values for approximation,

residual and gradient matrices

Scalar to minimize the norm and determine step length

Approximate restoration matrix

Residual matrix

Scalar to measure residual ratio and update gradient

Update conjugate gradient search direction

0 0 00, ,

For 1,2,3,...

X R C P C

n

1 1

1 1

Tn n

n Tn n

R R

P A P B

1 1n n n nX X P

1 1n n n nR R A P

1 1

Tn n

n Tn n

R R

R R

1n n n nP R P

Page 13: By Mary Hudachek-Buswell. Overview Atmospheric Turbulence Blur.

Conjugate Gradient MATLAB C = g; ro = g; p = ro; x = zeros(m, n);

for i = 1:maxiter alpha = trace (ro'*ro)/trace(p'*(A*p*B)); x = x + alpha * p; rn = ro - alpha * A * p * B; beta = trace (rn'*rn)/trace(ro'*ro); p = rn + beta * p; ro = rn; End

The trace function computes the sum of the diagonal elements of the matrix

Page 14: By Mary Hudachek-Buswell. Overview Atmospheric Turbulence Blur.

Comparison between CG & Inverse Methods

Original Blurred Noisy Image

Deblur Inverse Method

RMSE = 0.20442

Conjugate Iterative Deblur Method

CG iter = 9RMSE = 0.060552

Page 15: By Mary Hudachek-Buswell. Overview Atmospheric Turbulence Blur.

Visual Comparison of IterationsOriginal Blurred Noisy Image

Iter 6RMSE = 0.051591

Iter 7RMSE = 0.051865

Iter 8RMSE = 0.053561

Iter 9RMSE = 0.056487

Iter 10RMSE = 0.066383

Iter 11RMSE = 0.082311

Iter 12RMSE = 0.10071

Iter 13RMSE = 0.12304

Iter 14RMSE = 0.14584

Iter 15RMSE = 0.1758

Page 16: By Mary Hudachek-Buswell. Overview Atmospheric Turbulence Blur.

Concluding Thoughts

Direct Methods to find the restoration of a blurred image involve inverting matrices which costs O(n3)

Conjugate gradient iterations require transposing matrices, then multiplying by scalars and matrices which costs O(n2), considerably less than direct methods

The CG computations are faster and can provide better visual results.