image restoration juan navarro sorroche phys-6314 physics department the university of texas at...

20
Image Restoration Juan Navarro Sorroche Phys-6314 Physics Department The University of Texas at Dallas Fall 2010 School of Natural Sciences & Mathematics Department of Physics

Upload: alan-baker

Post on 02-Jan-2016

214 views

Category:

Documents


0 download

TRANSCRIPT

Image Restoration

Juan Navarro Sorroche

Phys-6314

Physics Department

The University of Texas at Dallas

Fall 2010

School of Natural Sciences & MathematicsDepartment of Physics

School of Natural Sciences & MathematicsDepartment of Physics

Image Restoration

1. Motivations for image restoration

2. Pin-hole camera model

3. Sources of image distortion

4. Distortion models

5. Correcting algorithms and implementation

G. Ferioli, R. Jung - LHC-BI Review Workshop November 19&20

LHC Screen Profile Monitors

G. Ferioli, R. Jung

. ( )

. ( )u d d

u d d

x x f r

y y f r

2 41 2

21

2 3 41 2 3 4

( ) 1

( ) 1

( ) 1

f r k r k r

f r k r

f r k r k r k r k r

2 4 6

2

11 ( ) ( ) ( ) ..........

1 ( )kr kr kr

kr

School of Natural Sciences & MathematicsDepartment of Physics

Image Distortion

,u n

,v m2 2 1 2( )r u v

Motivations for image restoration

8’x4’ camera calibration board

Introduction

School of Natural Sciences & MathematicsDepartment of Physics

Image Distortion

Close up view of 8’x4’ camera calibration board

Introduction

School of Natural Sciences & MathematicsDepartment of Physics

Any DAQ system where images are created requires restoration of images

• Oscilloscopes• Microscopes• X-rays machines• Robotic vision• CCD/CMOS sensors• Medical imaging equipment• Ionization chambers• Mass spectrometers• Any projective type of detector

Introduction

Projective Transformation

X

Y

Z

C

wz

wx

wy

wu

v

P

( , , )w w w wP x y zw

w

w

w

x u

z w

y v

z w

u

v

0

0

( ) 0 0

( ) 0 0 *

0 0 1

w x w

w y w

w w

z p n n f x

z p m m f y

z z

0

0

( )

( )x

y

u n n p

v m m p

World coordinates to pixels transformation

Pin-Hole Camera ModelSchool of Natural Sciences & MathematicsDepartment of Physics

projection center to image plane distance = focal length

origin of camera reference system world coordinate origin

w f

C

. .

. .

ww w

w

ww w

w

x u uu z f x

z w f

y vv z f x

z f

0 0

0 0 *

1 0 0 1

w w

w w w

w w

z u u f x

z v z v f y

z z

ov

0u

vu

, (0,0)n m

xp

yp

, (640,480)n m

0

0

0

0 *

10 0 1

xw

w wy

w

f npn xfz m m yp

z

CCD/CMOS camera sensor pixel’s coordinates n, n0, m, m0 = # of pixelspx, py = pixel size

0

0

( )

( )

x w

w

y w

w

p xun n

f f z

p yvm m

f f z

Projective Transformation

X

Y

Z

C

wz

wx

wy

wu

v

P

( , , )w w w wP x y zw

w

w

w

x u

z w

y v

z w

u

v

011 12 13

21 22 230

31 32 33

0

1 0 0 0

0 * 0 1 0 0 * *

1 0 0 1 00 0 1 0 0 0 1 1

x wx

y ww

z w

fn

r r r c xpn

r r r c yfz m m

r r r c zpy

( | ) . u K R t x P x

[ , , ,1]w w wx y zx

11 12 13 14

21 22 23 24

31 32 34 3411

w

w

w

xn P P P P

yz m P P P P

zP P P P

0w

x w

xfn n

p z

0w

y w

yfm m

p z

World coordinates to pixels transformation: general case

School of Natural Sciences & MathematicsDepartment of Physics

projection center-image plane distance=focal length

origin of camera reference system world coordinate origin

w f

C

0

0

0

0 *

10 0 1

xw

w wy

w

f npn xfz m m yp

z

General expression for the camera transform

xw,yw,zw homogenous 4-vector

K= Camera calibration matrixR=Rotation matrixC=camera center coordinatesP=Projective Transformation matrix

For the case of camera rotation and translation

Pin-Hole Camera Model

School of Natural Sciences & MathematicsDepartment of Physics

Image Distortion Sources

1. Intrinsic

• Radial distortion• Tangential distortion• Skew distortion

2. Extrinsic

• Projection distortion• Perspective distortion• Skew distortion

0 tan( )k m

. uc

u

k nn

k m

. uc

u

k mm

k m

0

. ( )lim u u

ku

k n m

k m

. ( ) ( )lim

1

u u u uk

uu

k n m n mmk mk

un

um

0um

0,0

pun

pum

0un

n

m

School of Natural Sciences & MathematicsDepartment of Physics

Image Distortion Sources

Perspective Distortion

Distortion Models

School of Natural Sciences & MathematicsDepartment of Physics

Distortion Correction Models

. ( )

. ( )u d d

u d d

x x f r

y y f r

2 41 2( ) 1f r k r k r

2 4 62

11 ( ) ( ) ( ) ..........

1 ( )kr kr kr

kr

. ( )u d dr r f r

21( ) 1f r k r

2 3 41 2 3 4( ) 1f r k r k r k r k r

Model

Radial functions

Most used

Best approximation

Easiest. Good approximation

Radial distortion

Perspective distortion ( )

( )

i

i

ic

i

kxx

k y

kyy

k y

c#( , )

tan( )2

v h pixelsk

Commercial packages

AdobeRoboRealmPhotoModellerFireWorks

Open Source

GIMP

Professional metrology

Halcon

Calibration Board Pixel Plot

School of Natural Sciences & MathematicsDepartment of Physics

Correcting Algorithms & Implementation

Radial Points - Fitting Function Plot

School of Natural Sciences & MathematicsDepartment of Physics

Correcting Algorithms & Implementation

Pin-hole Vs. Radial Distortion Corrected Pixel Plot

School of Natural Sciences & MathematicsDepartment of Physics

Correcting Algorithms & Implementation

Pin-hole Vs. Rad/Persp. Corrected Pixel Plot

School of Natural Sciences & MathematicsDepartment of Physics

Correcting Algorithms & Implementation

School of Natural Sciences & MathematicsDepartment of Physics

Correcting Algorithms & Implementation

>

>

School of Natural Sciences & MathematicsDepartment of Physics

Correcting Algorithms & Implementation

School of Natural Sciences & MathematicsDepartment of Physics

Correcting Algorithms & Implementation

School of Natural Sciences & MathematicsDepartment of Physics

Correcting Algorithms & Implementation

Conclusions

School of Natural Sciences & MathematicsDepartment of Physics

Images must be corrected from optical system distortions prior of making any measurement

Radial distortion affects object’s position determination & other derived variables

Perspective distortion can leads to large errors in position determination depending on angle of tilt

Distortions must be removed before ideal (pin-hole) camera transformations are made

Conclusions