Professional Documents
Culture Documents
Lecture1 PDF
Lecture1 PDF
DD2429
• Image enhancement
• Removal of artifacts
(a)
(a) ⇓
(b)
scene point
image plane
optical center
input
sequence
Feature
Extraction/ (matched)
Matching features
Relating multi-view
Images relations
Projective
Reconstruction projective
3D model
metric
Self-Calibration
3D model
textured metric
3D Model Building
3D surface model
Figure 1.7: Overview of the presented approach for 3D modeling from images
Applications of image based geometric computing
• Examination:
- Panoramic image + 3D visualization lab (Pass/Fail) (3 hp)
- Written examination (results in final grade) (3 hp)
Lab Part 1: Image stitching to panoramas (image mosaics)
Volumental Univrses
Computer vision courses at RPL/CSC
X
x m11 m12 m13 m14 Y
=
y m21 m22 m23 m24 Z
1
X
x 1 m11 m12 m13 m14 Y
1 1 1 1
=
y 1 m121 m122 m123 m124 Z
1
X
x2 m211 m212 m213 m14
2
Y
=
y2 m221 m222 m223 2
m24 Z
1
X
x m11 m12 m13 m14 Y
=
y m21 m22 m23 m24 Z
1
X1
x1 1
m11 m12 m13 m14 Y
=
y1 m21 m22 m23 m24 Z 1
1
2
X2
x2
m11 m12 m13 m14
Y
=
y2 m21 m22 m23 m24 Z 2
1
3
X3
x3
m11 m12 m13 m14
Y
=
y3 m21 m22 m23 m24 Z 3
1
4
X4
x4
m11 m12 m13 m14
Y
=
y4 m21 m22 m23 m24 Z 4
1
X
x m11 m12 m13 m14 Y
=
y m21 m22 m23 m24 Z
1
X Y
x= y=
Z Z
Homogeneous coordinates
X Y
x= y=
Z Z
• This makes things awkward...
X Y
x= y=
Z Z
• This makes things awkward...
X Y
x= y=
Z Z
• This makes things awkward...
X Y
x= y=
Z Z
• This makes things awkward...
X Y
x= y=
Z Z
• This makes things awkward...
X Y
x= y=
Z Z
• This makes things awkward...
In first camera:
x X
y = λ Y
1 Z
Relating projections in different cameras
In second camera:
0 0
x X
y 0 = λ0 Y 0
1 Z0
Relating projections in different cameras
In first camera:
x X
y = λ Y
1 Z
In second camera:
0 0
x X
y 0 = λ0 Y 0
1 Z0
0
x x
0
How do we relate y to y ??
1 1
Camera rotations - single axis
θ
Camera rotations - single axis
0
X cos(θ) 0 sin(θ) X
In matrix notation: Y 0 = 0 1 0 Y
Z0 − sin(θ) 0 cos(θ) Z
Camera rotation - single axis
• Therefore:
0
θ x cos(θ) 0 sin(θ) X
y 0 = λ0 0 1 0 Y
1 − sin(θ) 0 cos(θ) Z
cos(θ) 0 sin(θ) x
λ0
= 0 1 0 y
λ
− sin(θ) 0 cos(θ) 1
Next part of the lecture
image A
image A
Z0
image B
image A
X0
Z0
image B
image A
Extend image plane of camera A
X0
σ(cos(θ) xb − sin(θ))
a
x
y a = σy b
1 σ(sin(θ) xb + cos(θ))
Estimating the camera rotation
Given the matched image points, what can we say about θ?
σ(cos(θ) xb − sin(θ))
a
x
y a = σy b
1 σ(sin(θ) xb + cos(θ))
cos(θ) xb − sin(θ)
xa =
sin(θ) xb + cos(θ)
yb
ya =
sin(θ) xb+ cos(θ)
Estimating the camera rotation
Given the matched image points, what can we say about θ?
cos(θ) xb − sin(θ)
xa =
sin(θ) xb + cos(θ)
yb
ya =
sin(θ) xb + cos(θ)
• Unknowns:
s = sin(θ) c = cos(θ)
s ai + c bi + ei ≈ 0
s ci + c di + fi ≈ 0
Optimization problem
s ai + c bi + ei ≈ 0
s ci + c di + fi ≈ 0
n
X
min (s ai + c bi + ei )2 + (s ci + c di + fi )2
s,c
i=1
Optimization problem
n
X
min (s ai + c bi + ei )2 + (s ci + c di + fi )2
s,c
i=1
n
X
C(s, c) = (s ai + c bi + ei )2 + (s ci + c di + fi )2
i=1
n
X
C(s, c) = (s ai + c bi + ei )2 + (s ci + c di + fi )2
i=1
n
1 ∂C(s, c) X
= [(s ai + c bi + ei ) ai + (s ci + c di + fi ) ci ]
2 ∂s i=1
n
X n
X n
X
=s (a2i + c2i ) + c (ai bi + ci di ) + (ai ei + ci fi )
i=1 i=1 i=1
Calculate the derivatives
n
X
C(s, c) = (s ai + c bi + ei )2 + (s ci + c di + fi )2
i=1
n
1 ∂C(s, c) X
= [(s ai + c bi + ei ) bi + (s ci + c di + fi ) di ]
2 ∂c i=1
n
X n
X n
X
=s (ai bi + ci di ) + c (b2i + d2i ) + (ei bi + di fi )
i=1 i=1 i=1
Set derivatives to zero
n
X
C(s, c) = (s ai + c bi + ei )2 + (s ci + c di + fi )2
i=1
n
X
C(s, c) = (s ai + c bi + ei )2 + (s ci + c di + fi )2
i=1
n
X
C(s, c) = (s ai + c bi + ei )2 + (s ci + c di + fi )2
i=1
n
X
C(s, c) = (s ai + c bi + ei )2 + (s ci + c di + fi )2
i=1
Thus
n n
−1 n
X 2 2
X X
! (ai + ci ) (ai bi + ci di ) (ai ei + ci fi )
s i=1 i=1
i=1
= − n n
n
c
X X 2
2 X
(ai bi + ci di ) (bi + di ) (ei bi + di fi )
i=1 i=1 i=1
To summarize
• Know
One camera is related to another by a rotation around the
Y -axis by an unknown θ.
• Given
n point matches between the two cameras’ images
• Estimate
sin(θ) and cos(θ) from the correspondences by solving an
unconstrained optimization problem - linear least squares.
Technical issue
Z0
image B
image A
Extend image plane of camera A
X0
extended
image
a
x
rotation
center
x-coordinate transformation
In eq (8) we have extended thisto themodel
simple cylindrical include rotationθaround
somewhat tocoordinate is the
Y − axis.
x
tan(θ) =
In this section we will extend the camera models even further and include a complete
f
description of the position and orientation in 3D , known as external parameters, as well
as a description of scale factors and other parameters affecting the projection from 3D
to the image known as internal parameters
Extended image back-projected to cylinder
R = RX RY RZ