Date post: | 21-Mar-2017 |
Category: |
Education |
Upload: | krzysztof-wegner |
View: | 33 times |
Download: | 3 times |
Camera calibration techniquewprowadzenie teoretyczne
Krzysztof WegnerChair of Multimedia Telecommunications and Microelectronics
PoznaΕ University of Technology, Poland
1
Goal of the calibration Knowledge about
Intrinsic camera parameters Focal length Optical center
Extrinsic camera parameters -Position of the camera in 3D world
Orientation of the camera Translation
2
Goal of the calibration Knowledge about
Intrinsic camera parameters Focal length Optical center
Extrinsic camera parameters -Position of the camera in 3D world
Orientation of the camera Translation Common word coordinate system
3
Camera parameters Intrinsic camera parameters
Focal length Optical center
Extrinsic camera parameters -Position of the camera in 3D world
Orientation of the camera Translation
4
π¨=[ π π’ πΎ ππ’
0 π π£ ππ£
0 0 1 ]
πΉ=[ππ ππ ππ ]π»=[π‘π₯π‘π¦π‘ π§ ]
Camera model Projection of a 3D point Onto a point at image plane
s is a scale β distance to the point
5
π β[π’π£1 ]=π΄ β [π βπ βπ ] β [πππ1 ]
Zhangβs Algorithm Allows estimation of
intrinsic parameters - matrix extrinsic parameters β rotation matrix and
translation vector Planar template
6Z. Zhang, βA flexible new technique for camera calibrationβ, IEEE Transactions on Pattern Analysis and Machine Intelligence, 22(11):1330β1334, 2000
π β[π’π£1 ]=π΄ β [π 1 π2 π 3~π‘ ] β [ πππ1 ]
Zhangβs algorithm Planar template
7Z. Zhang, βA flexible new technique for camera calibrationβ, IEEE Transactions on Pattern Analysis and Machine Intelligence, 22(11):1330β1334, 2000
Zhangβs algorithm Planar template
8Z. Zhang, βA flexible new technique for camera calibrationβ, IEEE Transactions on Pattern Analysis and Machine Intelligence, 22(11):1330β1334, 2000
Estimating Homography H We know position of the patternβs feature points From registrated image we know
So
9Z. Zhang, βA flexible new technique for camera calibrationβ, IEEE Transactions on Pattern Analysis and Machine Intelligence, 22(11):1330β1334, 2000
Estimating Homography H We know position of the patternβs feature points From registrated image we know
10Z. Zhang, βA flexible new technique for camera calibrationβ, IEEE Transactions on Pattern Analysis and Machine Intelligence, 22(11):1330β1334, 2000
Estimating Homography H
Letβs assign
We have 2 equations and 9 variables so we need at least 5 points to solve uniquely for
11Z. Zhang, βA flexible new technique for camera calibrationβ, IEEE Transactions on Pattern Analysis and Machine Intelligence, 22(11):1330β1334, 2000
Estimating Homography H Defined up to a scale factor We know position of the patternβs feature points From registrated image we know
Multiplication of both side by donβt change known
So we donβt know whether we obtain or So we donβt know scale of the scene
12Z. Zhang, βA flexible new technique for camera calibrationβ, IEEE Transactions on Pattern Analysis and Machine Intelligence, 22(11):1330β1334, 2000
π βπ β [π’π£1 ]=π βπ― β[ ππ1 ] π βπ β[π’π£1 ]=~π― β[ ππ1 ]
Homography H Defined up to a scale factor We know position of the patternβs feature points From registrated image we know
13Z. Zhang, βA flexible new technique for camera calibrationβ, IEEE Transactions on Pattern Analysis and Machine Intelligence, 22(11):1330β1334, 2000
Homography H Defined up to a scale factor We know position of the patternβs feature points From registrated image we know
Multiplication of both side by donβt change known
14Z. Zhang, βA flexible new technique for camera calibrationβ, IEEE Transactions on Pattern Analysis and Machine Intelligence, 22(11):1330β1334, 2000
π βπ β [π’π£1 ]=π βπ― β[ ππ1 ]π βπ β [π’π£1 ]=~π― β[ ππ1 ]
Homography H Defined up to a scale factor
Multiplication of both side by donβt change known
So we donβt know whether we obtain or So we donβt know Z scale of the scene
15Z. Zhang, βA flexible new technique for camera calibrationβ, IEEE Transactions on Pattern Analysis and Machine Intelligence, 22(11):1330β1334, 2000
π βπ β [π’π£1 ]=π βπ― β[ ππ1 ]π βπ β [π’π£1 ]=~π― β[ ππ1 ]
Constraints on the intrinsic Vectors , are orthonormal so taking dot product
gives
and length of , should be the same
For
we have
and
16Z. Zhang, βA flexible new technique for camera calibrationβ, IEEE Transactions on Pattern Analysis and Machine Intelligence, 22(11):1330β1334, 2000
πππ» βππ=π
βπ πβπ=βππβ
πβΉπππ» βπ π=ππ
π» βππ
Constraints on the intrinsic Puting all together
17Z. Zhang, βA flexible new technique for camera calibrationβ, IEEE Transactions on Pattern Analysis and Machine Intelligence, 22(11):1330β1334, 2000
πππ» βππ=π
πππ» βππ=π π
π» βππ
(πβ1 βπ¨βπ βππ )π» βπβ1 β π¨βπ βππ=πππ
π» βπ¨βπ» βπβ1β πβ 1 β π¨βπ βππ=πππ
π» βπ¨βπ» β π¨βπ βππ=π
(πβ1 βπ¨βπ βππ )π» β πβ1 β π¨βπ βππ=(πβ 1 β π¨βπ βππ )π» βπβ1 βπ¨βπ βππ
πππ» βπ¨βπ» β πβ1 βπβ 1 β π¨βπ βππ=ππ
π» βπ¨βπ» βπβ 1 βπβ 1 β π¨βπ βππ
πππ» βπ¨βπ» β π¨βπ βππ=ππ
π» β π¨βπ» βπ¨βπ βππ
Constraints on the intrinsic Puting all together
18Z. Zhang, βA flexible new technique for camera calibrationβ, IEEE Transactions on Pattern Analysis and Machine Intelligence, 22(11):1330β1334, 2000
πππ» βππ=π
πππ» βππ=π π
π» βππ
(πβ1 βπ¨βπ βππ )π» βπβ1 β π¨βπ βππ=πππ
π» βπ¨βπ» βπβ1β πβ 1 β π¨βπ βππ=πππ
π» βπ¨βπ» β π¨βπ βππ=π
(πβ1 βπ¨βπ βππ )π» β πβ1 β π¨βπ βππ=(πβ 1 β π¨βπ βππ )π» βπβ1 βπ¨βπ βππ
πππ» βπ¨βπ» β πβ1 βπβ 1 β π¨βπ βππ=ππ
π» βπ¨βπ» βπβ 1 βπβ 1 β π¨βπ βππ
πππ» βπ¨βπ» β π¨βπ βππ=ππ
π» β π¨βπ» βπ¨βπ βππ
Closed form solution Try to solve
Intrinsic matrix
Letβs assign
19Z. Zhang, βA flexible new technique for camera calibrationβ, IEEE Transactions on Pattern Analysis and Machine Intelligence, 22(11):1330β1334, 2000
π¨=[ π π’ πΎ ππ’
0 π π£ ππ£
0 0 1 ]ππ
π» βπ¨βπ» β π¨βπ βππ=πππ
π» βπ¨βπ» β π¨βπ βππ=πππ» β π¨βπ» βπ¨βπ βππ
π©=π¨βπ» β π¨βπ
π©=[1π π’2
βπΎπ π’2 π π£
ππ£πΎβ π π£ππ’
π π’2 π π£
βπΎπ π’2 π π£
1π π£
2+πΎ2
π π’2 π π£
2
βππ£β
π π£2 β
πΎ (ππ£πΎβ π π£ππ’)π π’2 π π£
2
ππ£πΎβ π π£ππ’
π π’2 π π£
βππ£β
π π£2 β
πΎ (ππ£πΎβ π π£ππ’ )π π’2 π π£
2 1+ππ£
2
π π£2 +
(ππ£πΎβ π π£ππ’ )2
π π’2 π π£
2]=[π΅11 π΅12 π΅13
π΅12 π΅22 π΅23
π΅13 π΅23 π΅33]
Closed form solution Letβs assign
is symetrical Letβs assign
20Z. Zhang, βA flexible new technique for camera calibrationβ, IEEE Transactions on Pattern Analysis and Machine Intelligence, 22(11):1330β1334, 2000
π©=π¨βπ» β π¨βπ
π©=[1π π’2
βπΎπ π’2 π π£
ππ£πΎβ π π£ππ’
π π’2 π π£
βπΎπ π’2 π π£
1π π£
2+πΎ2
π π’2 π π£
2
βππ£β
π π£2 β
πΎ (ππ£πΎβ π π£ππ’)π π’2 π π£
2
ππ£πΎβ π π£ππ’
π π’2 π π£
βππ£β
π π£2 β
πΎ (ππ£πΎβ π π£ππ’ )π π’2 π π£
2 1+ππ£
2
π π£2 +
(ππ£πΎβ π π£ππ’ )2
π π’2 π π£
2]=[π΅11 π΅12 π΅13
π΅12 π΅22 π΅23
π΅13 π΅23 π΅33]
π=[π΅11 π΅12 π΅13 π΅22 π΅23 π΅33 ]
Closed form solution We try to solve
Letβs see pattern in the equations
21Z. Zhang, βA flexible new technique for camera calibrationβ, IEEE Transactions on Pattern Analysis and Machine Intelligence, 22(11):1330β1334, 2000
πππ» βπ¨βπ» β π¨βπ βππ=π
πππ» βπ¨βπ» β π¨βπ βππ=ππ
π» β π¨βπ» βπ¨βπ βππ
π©=π¨βπ» β π¨βπ
πππ» βπ© βππ=πππ
π» βπ© βππ=πππ» βπ© βππ
πππ» βπ© βπ π=πππ
π» βπ=
ΒΏπ΅11 β hπ1 β h π 1+π΅12 β hπ1 β h π2+π΅13 β hπ1 β h π3+ΒΏ
ΒΏ ππππ» βπ
+ ++
π πππ»=[hπ 1 β h π 1 hπ1 β h π 2+hπ2 β h π1 hπ1 βh π3+hπ3 β h π 1 hπ2 β h π 2 hπ 2 β h π 3+hπ 3 β h π2 hπ3 β h π3 ]
Closed form solution We try to solve
so
22Z. Zhang, βA flexible new technique for camera calibrationβ, IEEE Transactions on Pattern Analysis and Machine Intelligence, 22(11):1330β1334, 2000
πππ» βπ© βππ=πππ
π» βπ© βππβπππ» βπ© βππ=π
πππ» βπ© βπ π=πππ
π» βπ
ππππ» βπ=πππππ» βπβπππ
π» βπ=πππππ» βπ=π
(ππππ» βπππ
π» ) βπ=π
[ ππππ»
(πππβπππ )π» ] βπ=π
Solving for b
Two equation are defined but have 6 unknowns. So at least 3 images are required to uniquly solve for Because all images are captured with the same
camera we can stack equation for together
23Z. Zhang, βA flexible new technique for camera calibrationβ, IEEE Transactions on Pattern Analysis and Machine Intelligence, 22(11):1330β1334, 2000
[ ππππ»
(πππβπππ )π» ] βπ=π
[ πππβ²π»
(π β²ππβπ β²ππ)π» ] βπ=π
[ π β² β²πππ»
(π β² β²ππβπ β² β²ππ )π» ]βπ=π
[ ππππ»
(πππβπππ )π» ] βπ=π
[ππππ»
(πππβπππ )π»
πππβ²π»
(π β²ππβπ β²ππ )π»
π β² β²πππ»
(π β² β²ππβπ β² β²ππ)π»] βπ=ππ½=[
ππππ»
(πππβπππ )π»
πππβ²π»
(π β²ππβπ β²ππ)π»
π β² β²πππ»
(π β² β²ππβπ β² β²ππ )π»]
Solving for b
There is trivia solution
But we look for non trivial solution so Such solution is given by eigenvector of
asociated with the smallest eigenvalue (right singulart vector of
24Z. Zhang, βA flexible new technique for camera calibrationβ, IEEE Transactions on Pattern Analysis and Machine Intelligence, 22(11):1330β1334, 2000
π½ βπ=π
π½ π» βπ½
Retriving intrinsic parameters Once we have We can calculate intrinsic parameters from
25Z. Zhang, βA flexible new technique for camera calibrationβ, IEEE Transactions on Pattern Analysis and Machine Intelligence, 22(11):1330β1334, 2000
π©=[1π π’2
βπΎπ π’2 π π£
ππ£πΎβ π π£ππ’
π π’2 π π£
βπΎπ π’2 π π£
1π π£
2+πΎ2
π π’2 π π£
2
βππ£β
π π£2 β
πΎ (ππ£πΎβ π π£ππ’)π π’2 π π£
2
ππ£πΎβ π π£ππ’
π π’2 π π£
βππ£β
π π£2 β
πΎ (ππ£πΎβ π π£ππ’ )π π’2 π π£
2 1+ππ£
2
π π£2 +
(ππ£πΎβ π π£ππ’ )2
π π’2 π π£
2]=[π΅11 π΅12 π΅13
π΅12 π΅22 π΅23
π΅13 π΅23 π΅33]
π=[π΅11 π΅12 π΅13 π΅22 π΅23 π΅33 ]
ππ£=π΅12 βπ΅13βπ΅11 βπ΅23
π΅11 βπ΅22βπ΅122π π’=β π
π΅11
π=π΅33βπ΅132 +ππ£ (π΅12 βπ΅13βπ΅11 βπ΅23 )
π΅11
π π£=β π βπ΅11
π΅11 βπ΅22βπ΅122
πΎ=βπ΅12 β π π’2 β π π£
πππ’=
πΎ βππ£
π π£βπ΅13
π π’2
π
Retriving position We know constraints
To complete rotation matrix we calculater third column
Finally we ortonormalize rotation matrix
26Z. Zhang, βA flexible new technique for camera calibrationβ, IEEE Transactions on Pattern Analysis and Machine Intelligence, 22(11):1330β1334, 2000
ππ=ππΓπ π
βπ πβ=βππβ=βππβ=π
Summary Camera parameters requires at least 5
point pattern Intrinsic camera parameters estimation
requires at least 3 images at different orientation
All parameters are defined up to a unknown scale
M37232, October 2015, Geneve 27