Docsity

Digital Image Processing Lecture 2: Geometric Transformations - Prof. Hairong Qi, Study notes of Electrical and Electronics Engineering

Toggle sidebar
bg1
1
ECE 472/572 - Digital Image
Processing
Lecture 2 - Geometric
Transformation
08/25/09
2
Roadmap
Introduction
– Image format (vector vs.
bitmap)
– IP vs. CV vs. CG
– HLIP vs. LLIP
– Image acquisition
Geometric correction
– Affine vs. Perspective
transformation
• Homogeneous coordinates
• Inverse vs. forward
transform
• Composite transformation
– General transformation
• Model distortion with
polynomial
• Least square solution
3
Questions
Affine transformation vs. Perspective
transformation
Forward transformation vs. Inverse
transformation
Composite transformation vs. Sequential
transformation
Homogeneous coordinate
General geometric transformations
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download Digital Image Processing Lecture 2: Geometric Transformations - Prof. Hairong Qi and more Study notes Electrical and Electronics Engineering in PDF only on Docsity!

ECE 472/572 - Digital Image

Processing

Lecture 2 - Geometric

Transformation

2

Roadmap

 Introduction

  • Image format (vector vs.

bitmap)

  • IP vs. CV vs. CG
  • HLIP vs. LLIP
  • Image acquisition

 Geometric correction

  • Affine vs. Perspective

transformation

  • Homogeneous coordinates
  • Inverse vs. forward

transform

  • Composite transformation
  • General transformation
  • Model distortion with

polynomial

  • Least square solution

3

Questions

Affine transformation vs. Perspective

transformation

Forward transformation vs. Inverse

transformation

Composite transformation vs. Sequential

transformation

Homogeneous coordinate

General geometric transformations

4

Usage

 Image correction

 Color interpolation

 Forensic analysis

 Entertainment effect

http://www.mpi-sb.mpg.de/resources/FAM/demos.html http://w3.impa.br/~morph/

5

Affine transformations

 Preserve lines and parallel lines

 Homogeneous coordinates

 General form

 Special matrices

  • R: rotation, S: scaling, T: translation, H: shear

!

!

!

"

$

$

$

%

&

0 0 1

21 22 23

11 12 13

a a a

a a a

!

R =

cos " #sin " 0

sin " cos " 0

0 0 1

$

%

&

&

&

'

(

)

)

)

, S =

sx 0 0

0 sy 0

0 0 1

$

%

&

&

&

'

(

)

)

)

, T =

1 0 tx

0 1 ty

0 0 1

$

%

&

&

&

'

(

)

)

)

, H =

1 hx 0

hy 1 0

0 0 1

$

%

&

&

&

'

(

)

)

)

!

u

v

1

"

$

$

$

%

&

'

'

'

=

a 11

a 12

a 13

a

21

a

22

a

23

0 0 1

"

$

$

$

%

&

'

'

'

(

x

y

1

"

$

$

$

%

&

'

'

'

6

10

Examples – Translation +

Rotation

theta = PI/

theta = PI/

tx = -140, ty = 60

11

Perspective transformation

 Preserve parallel lines only when they are parallel

to the projection plane. Otherwise, lines converge

to a vanishing point

 General form

a

11

a

12

a

13

a

21

a

22

a

23

a

31

a

32

u "

v "

w "

a

11

a

12

a

13

a

21

a

22

a

23

a

31

a

32

x

y

, u =

u "

w "

, v =

v "

w "

31 32

a! a!

12

Determine the coefficients

8 unknowns, 4-point least squares

u "

v "

w "

a

11

a

12

a

13

a

21

a

22

a

23

a

31

a

32

x

y

, u =

u

w

, v =

v

w

(0,0) (0,255)

(255,0)

(255,255)

(0,0) (0,255)

(255,0)

(511,511)

13

Example - PT

14

General approaches

 Find tiepoints

 Spatial transformation

8/24/09 15

x-ray sensitive

scintillator

fiber optics

CCD array

1242 x 1152

misalignment greater

than 50 micron

Example – CCD butting

19

How is it applied?

 Step 1: Choose a set of tie points

  • ( x

i

, y

i

): coordinates of tie points in

the original (or distorted) image

  • ( u i

, v i

): coordinates of tie points in

the corrected image

 Step 2: Decide on which degree of

polynomial to use to model the

inverse of the distortion, e.g.,

 Step 3: Solve the coefficients of

the polynomial using least-squares

approach

 Step 4: Use the derived polynomial

model to correct the entire original

image

!

X = x 0

x 1

L x [ 24 ]

T

Y = y 0

y 1

L y [ 24 ]

T

!

x ˆ = r u , v ( )

= a 1

u + a 2

v + a 3

uv + a 4

y ˆ = s u , v ( )

= b

1

u + b

2

v + b

3

uv + b

4

!

W =

u 0

v 0

u 0

v 0

1

u 1

v 1

u 1

v 1

1

M M M M

u 24

v 24

u 24

v 24

1

"

$

$

$

$

%

&

'

'

'

'

!

A = a 1

a 2

a 3

a [ 4 ]

T

B = b 1

b 2

b 3

b 4

[ ]

T

!

A = W

" 1 X , B = W

" 1 Y

W

" 1

= ( W

T

W )

" 1

W

T

For each (u,v) in the corrected image,

find the corresponding (x,y) in the

original image and use its intensity as

the intensity at (u,v).

20

Example – Geometric correction

Geometric correction of images from

butted CCD arrays

21

Example - Color correction

Tiepoints are

colors (R, G, B),

instead of spatial

coordinates

22

Example - Image warping

23

Image warping

Two-pass mesh warping by Douglas

Smythe

Reference: G. Wolberg, Digital Image

Warping, 1990

24

Example 1

From Joey Howell and Cory McKay, ECE472, Fall 2000