0% found this document useful (0 votes)
30 views17 pages

Lecture 11 Background Subtraction

The document discusses various 2D imaging transformations including translation, rotation, scaling, and affine transformations. It describes how to represent these transformations mathematically using matrix operations and how multiple transformations can be combined. It also covers recovering the best affine transformation between two images by using control point correspondences to compute the transformation parameters via a least squares solution.

Uploaded by

mayajogi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views17 pages

Lecture 11 Background Subtraction

The document discusses various 2D imaging transformations including translation, rotation, scaling, and affine transformations. It describes how to represent these transformations mathematically using matrix operations and how multiple transformations can be combined. It also covers recovering the best affine transformation between two images by using control point correspondences to compute the transformation parameters via a least squares solution.

Uploaded by

mayajogi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

2D Imaging Transformations

Lecture 3
10/09/02

Image Capturing Devices


„ Charged-Coupled Device (CCD) Cameras
„ Tiny solid state cells convert light to electric
charge
„ May or may not have a shutter
„ Integrates light energy till reset to zero
„ CCD array acts as memory
„ Frame Buffer
„ Analog vs Digital Capture
„ IEEE 1394 Standard

1
Capturing Devices
„ Video Cameras
„ 30 fps or 25 fps
„ Interlacing of 60 half frames
„ TV Standards, can encode Audio, Text,
color and gray signals
„ Effect of Display Standards
„ Interlacing
„ 4:3 image ratio

Human Eye
„ Spherical camera, 20mm
focal length
Iris
„ Focuses on Retina,
containing 100 million
receptors Retina
„ Non-linearly distributed,
„ Fovea, rods, cones Fovea
„ Iris controls amount of light
entering Blind spot
„ Very large dynamic range
„ Visual processing of the
brain
„ Ability to perceive depth
seamlessly, while in motion Cornea
Lens

2
Image Coordinates
„ Row, Column format y

I(0,0) c

x
(0,0)

r↔x
c↔y
r
90° cc rotation
I(8,15)

Transformations
„ Relate one coordinate system to
another
„ Translation, rotation, scaling, shear
„ 2D and 3D transformations

3
2D Transformation
„ Definition: A mapping from one 2D
coordinate system to another
„ Also called
„ spatial transformation,
„ geometric transformation,
„ warp
„ Image Registration: Process of transforming
two images so that same features overlap

Image Registration

Reference
Image

4
Mission
Images

Registration = Computing Transformation

5
Initial Estimate from ESD

Refined Transformation

6
Featureless images

7
Point/Pixel
„ Coordinate, Value

 x
P = [ x, y ] =  
t

 y

Point/Pixel
„ Homogeneous Coordinates

P = [ x, y ]t = [ sx, sy, s ]t
„ If homogeneous coordinates are [a,b,c]t
then: a
x=
c
b
y=
c

8
2D Translation
„ Point in 2D given by (x1 y1)
„ Translated by (dx dy)

x2 = x1 + dx
y2 = y1 + d y

Translation
„ In matrix form

 x2  1 0 d x   x1 
 y  = 0 1 d   y 
 2  y  1

 1  0 0 1   1 

9
Inverse Transformation

1 0 d x  1 0 − d x 
T = 0 1 d y  T −1 = 0 1 − d y 
0 0 1  0 0 1 

T T-1 = I

Scaling
„ Point in 2D given by (x1 y1)
„ Scaled by (sx sy)

x2 = x1 * sx
y2 = y1 * sy

10
Scaling
„ In matrix form

 x2   s x 0 0  x1 
y  =  0 sy 0  y1 
 2 
 1   0 0 1  1 

Inverse Transformation

1 
sx 0 0 s 0 0
 x 
S =  0 sy 0 S =0
−1 1
0
 sy 
 0 0 1 0 0 1
 
 

S S-1 = I

11
Multiplicity of Transformations

 x2   x1  sx 0 dx 
 y  = ST  y  ST =  0 sy d y 
 2  1
 1   1   0 0 1 

In general, AB ≠ BA

Rotation
y
(x2 y2)

(x1 y1)
θ

„ Task: Relate (x2 y2) to (x1 y1)

12
Rotation
y
(x2 y2) x2 = R cos(θ + ϕ )
R y2 = R sin(θ + ϕ )
R (x1 y1)
θ
y1 = R sin ϕ
ϕ

x1 = R cos ϕ
x2 = R cosθ cos ϕ − sin θ sin ϕ
y2 = R sin θ cos ϕ + cosθ sin ϕ

Rotation

x2 = R cosθ cos ϕ − sin θ sin ϕ


y2 = R sin θ cos ϕ + cosθ sin ϕ

x2 = x1 cosθ − y1 sin θ  x2  cosθ − sin θ 0  x1 


 y  =  sin θ cosθ 0  y1 
y2 = x1 sin θ + y1 cosθ  2 
 1   0 0 1  1 

13
Combination of
Transformations
„ p2 = T[dx dy] S[s s]Rθ p1
„ Rules of matrix multiplication apply

Affine Transformation
„ Encodes rotation, scaling, translation and
shear

x2 = a11 x1 + a12 y1 + a13


y2 = a21 x1 + a22 y1 + a23
„ 6 parameters
„ Linear transformation
„ Parallel lines are preserved

14
 x2   a11 a12 a13   x1 
 y  = a a22 a23   y1 
 2   21
 1   0 0 1   1 

Recovering Best Affine


Transformation
„ Given two images with unknown
transformation between them…
„ Given at least three control points…
„ Compute the values for [a11 … a23]

15
Control Points

Recovering Best Affine


Transformation
 x2   a11 a12 a13   x1 
 y  = a a22 a23   y1 
 2   21
 1   0 0 1   1 
 a1 
a 
 12 
 x1 y1 1 0 0 0  a13   x2 
0  =
 0 0 x1 y1 1  a21   y2 
a22 
 
Ax=B  a23 

16
Recovering Best Affine
Transformation
„ Concatenate n control points in A and B
„ A is 2n*6
„ B is 2n*1
„ Solve using pseudo inverse
„ (least squares solution)
„ x = (ATA)-1ATB

17

You might also like