Lecture 11 Background Subtraction
Lecture 11 Background Subtraction
Lecture 3
10/09/02
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
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)
θ
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
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
14
x2 a11 a12 a13 x1
y = a a22 a23 y1
2 21
1 0 0 1 1
15
Control Points
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