Sie sind auf Seite 1von 5

2012 International Conference on System Science and Engineering

June 30-July 2, 2012, Dalian, China

Comparison of the Camera Calibration between


Photogrammetry and Computer Vision

Haixia Wang and Shuhan Shen Xiao Lu


National Laboratory of Pattern Recognition Key Laboratory for Robot & Intelligent Technology of
Institute of Automation, Chinese Academy of Sciences Shandong Province
Beijing, China Shandong University of Science and Technology
Key Laboratory for Robot & Intelligent Technology of Qingdao, China
Shandong Province luxiao98@163.com
Shandong University of Science and Technology
Qingdao, China
h_x_wang@163.com
AbstractAt present, the camera with high resolution has been photogrametry cannot be directly transplanted to computer
widely used. However, it is not accurate for the above camera to vision, and they need some conversions.
use the traditional computer vision method for calibration. So, a
method for camera calibration in photogrametry is referred to, Currently, some kinds of software like OpenCV, Matlab,
and the comparison of the coordinate system, parameter Halcon are usually used in computer vision. Halcon is a kind
definitions and the camera model between in photogrametry and of software to be paid and is not an universal one; Matlab runs
in computer vision is presented. Thus, the calibration result of slowly, and cant run normally for the high resolution images
photogrametry can be transplanted well to computer vision. mentioned in this paper under the memory of 4G. While,
Finally, 5DmarkII is used as an example, and its calibration OpenCV is an open, portable, high performance development
result in the photogrametry is verified by OpenCV functions. software, and it is widely used in field of the domestic and
foreign computer vision. This paper mainly analyzes the
Keywords-Camera calibration; Photogrammetric survey; similarities and differences of camera calibration model
Computer vision; OpenCV between the fields of the computer vision and the
photogrametry, and transplants the calibration parameters from
I. INTRODUCTION the photogrametry to OpenCV according to the analysis
In the field of the computer vision, there are many methods results, which provides a platform for the further application of
for camera calibration. According to the used calibration object, high resolution camera. Moreover, there are a lot of camera
the methods for camera calibration are sorted as stereo calibration models in the field of computer vision. But in order
calibration method [1], plane calibration method [2], line to compare conveniently, this paper only focuses on the
calibration method [3], and self-calibration method [4]. calibration model realized with OpenCV functions.
However, the constraint conditions will become weaker and
the precision will become lower when the dimension is II. CAMERA PARAMETERS IN
reduced. So, if we need the high precision of the results, the PHOTOGRAMMETRY
latter two methods are not considered, in addition, it is very There are three commonly used coordinate systems in
difficult to make the calibration block with the three- photogrametry, such as the object space coordinate system D-
dimension method. Therefore, the plane calibration method is XYZ, the image space coordinate system S-xyz, and the
widely used in the field of computer vision because of its assistant space coordinate system S-XYZ in Figure 1, where
flexibility and simplicity. the direction of the coordinate system is also given. Assume
With the persistent improvement of the computer that the coordinates of the camera center S, the space point M
technology and the digital camera technology, the high and the image point m are respectively ( X s , Ys , Z s ),
resolution camera has been widely used in the world. The ( X , Y , Z ), and ( X m , Ym , Z m ) in S-XYZ, and the coordinate
features of the high resolution camera are clear, taking big of image point m is (x, y, -f) in S-xyz. In addition, the rotation
pictures, needing large memory space, thus if the plane matrix of the assistant space coordinate system to the image
calibration method is used, we should make calibration board space coordinate system is R , and the function is shown as
about 10 square meters, and take more than 20 photos. It is a follows [8]:
tough work, because it is difficult to make the calibration
board and the memory space the pictures occupy is so big that x u u0 Xm X Xs
it is beyond the processing capacity of the ordinary computer. y = v v = R Y = 1 R Y Y (1)
However, due to the difference of the application background 0 m s

and the object, there are some differences among the f f Z m Z Z s


coordinate relationship, parameters meanings, and some
mathematical models. So the calibration results of

978-1-4673-0945-5/12/$31.00 2012 IEEE


358
Z a2 ( X X s ) + b2 (Y Ys ) + c2 (Z Z s ) (4)
Z' v v0 = f
a3 ( X X s ) + b3 (Y Ys ) + c3 ( Z Z s )
Z"
The above Eq. (3) and Eq. (4) are called the collinear condition
Y
y X' equation which is the collinear equation of image point, project
z centre and object point. By considering the distortion of the
X
S x camera lens, the equations can be corrected by Brown model
[9] as follows:
f
uu = u d + u d ( a1 rd2 + a 2 rd4 ) + b1 ( rd2 + 2u d2 )
v + 2b2 u d vd + u d + vd
(5)
K

(u0 , v0 )
Z m
vu = vd + vd ( a1rd2 + a2 rd4 ) + b2 (rd2 + 2vd2 )
(6)
+ 2b1ud vd
Y u
M where, ud = u u0 , vd = v v0 are image points with distortion,

D X uu , vu are corrected points. rd = ud2 + vd2 , a1 , a2 are radial

Figure 1. Coordinate system


distortion parameters, and b1 ,b2 are tangential distortion
parameters. is the pixels square scaling factor, and is the
where is the zoom coefficient between ( X m , Ym , Z m ) and nonorthogonality distortion coefficient of CCD array.
( X X s , Y Ys , Z Z s ) , (u0 , v0 ) is the principal point and f is
the principal focus, which are called inner orientation Take place of the left of (3) and (4) by uu , vu , then we
elements; The rotation matrix R is decided by three angle
yield the final camera calibration model. There are fifteen
elements, , , , where ( , , ) and ( X s , Ys , Z s ) are called
unknown numbers in the model, including three inner
exterior orientation elements. The expression of R is different
orientation elements f , u0 , v0 , six exterior orientation
according to different rotational angle system. The paper
, , , X s , Ys , Z s and six distortion
mainly focuses on the rotational angle system which takes the
parameters a1 , a2 , b1 , b2 , , .
Y axis as the main axis. In Figure 1, S-XYZ is set up on the
position of S in order that the three axes parallel to the object
III. CAMERA PARAMETERS IN COMPUTER VISION
space coordinate system. Next, it is rotated clockwise about
Before introducing the camera model, we firstly introduce
the Y axis and the X and Z axes separately rotated to the
three kinds of coordinate systems, including word coordinate
positions of X' and Z'. After that, it is rotated counterclockwise
system, camera coordinate system, and image coordinate
about the X axis. Then, the Z axis is rotated to Z'' which
system, which are respectively indicated by {W}, {C} and
coincides with the z axis of image space coordinate system.
{O}
Finally, it is rotated counterclockwise about the Z'' axis [8].
C
The expression of R due to the above rotation matrix is as
follows:
x
R = R( y, ) R( x, ) R( z , ) =
cos 0 sin 1 0 0 cos sin 0 (2) y O u
0 1 0 0 cos sin sin cos 0 = v

sin 0 cos 0 sin cos 0 0 1
(u0 , v0 )
a1 b1 c1
a b c
Z m
2 2 2
a3 b3 c3
Combined with equation (1) and divide them by the third Y
expression on both sides, we have: z
u u0 = f
a1 ( X X s ) + b1 (Y Ys ) + c1 ( Z Z s ) (3)
W X M
a3 ( X X s ) + b3 (Y Ys ) + c3 ( Z Z s )

359
Figure 2. Coordinate system
xd = xu xu (k1 ru2 +k 2 ru4 + k3 ru6 ) 2 p1 xu yu
(13)
shown in Figure 2. ( u0 , v0 ) is the central coordinate of the p2 (ru2 + 2 xu2 )
image. The image point m ( u , v ) is counterpart with a space
point M (X, Y, Z), while ( x , y , z ) is the coordinate of M point y d = y u y u ( k1ru2 +k 2 ru4 + k3 ru6 ) 2 p2 xu yu
(14)
in camera coordinate system, then according to the pinhole p1 (ru2 + 2 y u2 )
model, the relationship between the image point and the point
where, ( xu , y u ) is the point without distortion, ( xd , y d )
in camera coordinate system is as follows:
2 2
distorted point, ru = x +y u u , k1 ,k 2 and k 3 are radial
x
u = f x + u0 (7)
z distortion parameters, p1 ,p 2 are tangential distortion
y parameters. k 3 =0 is generally set, and it is only considered in
v = f y + v0 (8)
z
the correction of fish-eye camera.
The relationship between the image point and the point in
word coordinate system is: From the above, camera parameters in computer vision
includes five internal parameters ( f x , f y , u0 , v0 , s ) , six external
f f parameters ( l1 , l2 , l3 , t1 , t2 , t3 ) and five distortion
dx s dx u0 X X
u Y Y parameters ( k1 , k2 , k3 , p1 , p2 ) .
v = 1 0 f 1
v0 R | t = K R | t (9)
dy Z Z
1 IV. ANALYSIS RESULTS
0 0 1 1 1
According to the analysis of camera calibration models in
two fields, there are main two differences: The definition of
where s is the nonorthogonality distortion coefficient of CCD
the external parameters and the style of distortion model. For
array, is the deep factor, K is called the camera internal
the field of photogrammetry, the distortion model is proposed
parameters matrix, R and t are the camera external
by Brown in 1971, and it is corrected for origin image point.
parameters, where R is the rotation matrix which is indicated For the case of OpenCV, the approximate inverse model of
by Rodrigues formula, and the corresponding rotation vector is
Brown model proposed by Heikkila in 2000 is used, and it is
I [10].
corrected for the unitary image point. For Brown model, the
un-distortion image is denoted by distortion image point, but it
sin( ) 1 cos( ) need recover the origin distortion image from un-distortion
R ( , I) = I + [I] + 2
[I]
(10)
2 image when corrected, which need to recursion iterative to
solve, while the inverse model can be solved directly. In
where, [I] is the antisymmetry matrix of I, and = I is
general, the nonlinear model can be approximately as linear
model when the coefficient is small, thus, the non-analytical
the rotation angle and I= I I is the rotation axis.
inverse model proposed by Heikkila is better.

However, the above camera model is ideal and there is For the convenience of comparison, Eq. (5) and Eq. (6) can
distortion in the real lens, generally including radial distortion be described by inverse model [11] as
and tangential distortion. So, the unitary coordinate value in
camera coordinate system can be given as: ud = uu uu (a1ru + a2 ru2 ) b1 (ru + 2uu2 ) 2b2uu vu
(15)
u u0 uu vu
xd = (11)
fx
v v0 vd = vu vu (a1ru + a2 ru2 ) b2 (ru + 2uu2 ) 2b1uu vu (16)
y d = (12)
fx Then compare the two image coordinate systems from
So, there are the following equations according to the inverse Figure 1 and Figure 2, we have
non-analytical Brown Model [11]:
u = u , v = h v (17)

360
u0 = u0 , v0 = h v0 (18)
Compare (25)-(26) with (13)-(14), it can be given as
where h is the height of the image, and according to the k1 = f 2 a1 , (27)
definition in Section II, we have
k2 = f 4 a2 , (28)
ud = u u0 = u u0 , (19)
p1 = fb2 , (29)
vd = v v0 = (v v0 ) (20)
p2 = fb1 (30)
Take (19)-(20) into (11)-(12), then, In addition, we assume f x = f y = f in photogrammetry, and
ud = fxd , (21)
if f x f y , it can be corrected by parameter as,
vd = fyd (22)

Similarly, we have f y = f x /(1 + ) (31)


uu = fxu , (23)
It should be noted that the difference between two
vu = fyu (24) distortion parameters is given in TAB. I which is mainly
caused by that the image points are not normalized in the field
Take (21)-(24) into (15)-(16), we have
of photogrammetry. Based on the above parameters

xd = xu xu ( f 2 a1ru + f 4 a2 ru2 ) fb1 ( ru + 2 xu2 ) relationship, in this paper, we use OpenCV function for the
(25) spatial point location experiment and use two 5DmarkII
2 fb2 xu yu xu yu
cameras which resolution are 5616*3744, and the lens are
fixed-foci of 24mm. In the experiments, the cameras are fixed
y d = yu yu ( f 2 a1ru + f 4 a2 ru2 ) + fb2 (ru + 2 y u2 ) on a bracket and the relative position is fixed, and the result
(26)
2 fb1 xu yu can be given as TAB. II

TABLE I. DIFFERENCES BETWEEN THE CAMERA PARAMETERS

Internal Parameters External Parameters Distortion Parameter

Radial Tangential Pixels square CCD array


Principal Principal Rotation Position
distortion distortion scaling nonorthogonality
distance point matrix vector
parameter parameters factor distortion coefficient

R( y , )
Photogrammetric f 2 a1
Survey
f (u0, v0) R ( x, ) t fb2 , fb1
f 4 a2
R( z, )
Xs
fx = f (u0 , h v0 )
Computer Vision R( , I ) R Ys k1 , k2 p1 , p2 --- s
f y = f (1 + )
Z s

TABLE II. VERIFICATION RESULT OF THE TWO CAMERAS

Name Left Camera Right Camera


f 3895.0774 3838.5995
(u0, v0) 2835.9561, 1826.6562 2823.8741, 1837.0408
a1 , a2 0. 8963E-08, -0. 3430 E-15 0. 9823 E-08 ,-0.3680 E-15

b1 , b2 0. 2032E-06,0. 5321E-06 -0. 2174 E-06,0. 3146 E-06


, - -0. 1999E-03,-0. 1845 E-03 -0. 1898 E-03,0. 1950 E-03
, , 0.91, 16.28, -1.61 3.06, 17.50, -1.86
X s , Ys , Z s 4.456, -0.11, -1.811 4.810, -0.121, -1.729

361
The corresponding OpenCV parameter values are given in TAB. III:

TABLE III. OPENCV PARAMETER VALUES

Name Left Camera Right Camera


3.8950 0 2.8360 3.8386 0 2.8239
0 E + 03 0 3.8374 1.8370 E + 03
3.8951 1.8267
K
0 0 1 0 0 1

I -0.0198, 0.283, -0.025 -0.0580, 0.304, -0.024

t 4.456, -0.11, -1.811 4.810, -0.121, -1.729

k1 , k2 P1 , P2 -0.134, 0.0757 0.002, 0.000728 -0.141, 0.0747, 0.0012, -0.0008

s -0. 1845 E-03 0. 1950 E-03

Measure the edge length of the spatial checkerboard by [5] P. F. Sturm, S. J. Maybank, On Plane-Based Camera
using the above camera calibration data, and the actual is size Calibration: A General Algorithm, Singularities, Applications.
30 h 30mm. Take eight section distance as an example, we IEEE Conference on Computer Society Conference on Computer
have Vision and Pattern Recognition (CVPR'99), vol. 1, pp.1432-
1437,1999.
TABLE IV. DISTANCE RESULTS (mm)
[6] M. Kimura, M. Mochimaru, T. Kanade, Projector Calibration
name D1 D2 D3 D4 D5 D6 D7 D8
Calculat 30.0 30.1 29.8 30.4 29.7 29.9 30.4 30.2 using Arbitrary Planes and Calibrated Camera, IEEE
ion value 5 4 8 5 6 1 3 5 Conference on Computer Vision and Pattern Recognition, 2007.

CVPR '07. 17-22 June 2007, pp.1-2
Seen from the above TABLE, the precision is less than
[7] T. Ueshiba, F. Tomita, Plane-based Calibration Algorithm for
0.5mm, so the proposed approach is effective.
Multi-camera Systems via Factorization of Homography
Matrices, Proceedings of the Ninth IEEE International
V. ACKOWLEDGMENTS
Conference on Computer Vision (ICCV 2003) ,vol. 2, pp.966-
The authors would like to thank the support from NSF 973
Grant (61105032, 60804034), the Nature Science Foundation [8] W. H. Feng, Close Range Photogrammetry. Wuhan University
of Shandong Province (ZR2009GQ006), SDUST Research Press, 2002.
Fund (2010KYJQ105), and the Project of Shandong Province >@D. C. Brown. Close-Range Camera. Calibration.Photometric
Higher Educational Science, Technology Program (J11LG53). Engineering. vol. 37. no. 8, pp. 855-866, 1971.
[10] F. C. Wu, Z. H. Wang and Z. H. Hu, Cayley transformation
and numerical stability of calibration equations, International
REFERENCES Journal of Computer Vision, vol. 82, no. 4, pp. 156-184, 2009.
[11]J. Heikkila. Geometric camera calibration using circular control
[1] Y. Abdel-Aziz, H. M. Karara, Direct linear transformation from
points,In IEEE Transactions on Pat tern Analysis and Machine
comparator coordinates into object space coordinates into object
Intelligence, vol. 22, no. 10, pp. 1066-1077, 2000
space coordinates in close range photo grammetry, Proceedings
of the ASP Symposium on Close-range Photogrammetry,
Urbana, IL, USA, 1971, pp. 420-75.
[2] Z. Zhang, A flexible new technique for camera calibration,
IEEE Transactions on Pattern Analysis and Machine Intelligence,
vol. 22, no. 11, pp. 1330- 1334, 2000.
[3]Z. Y. Zhang, Camera Calibration with One-Dimensional
Objects, Proc. European Conf. Computer Vision, vol. 4, pp. 161-
174, May 2002.
[4] S. D. Ma, A self-calibration technique for active vision systems,
IEEE Trans. Robot. Automat., vol. 12, pp. 114-120, Feb. 1996.

362

Das könnte Ihnen auch gefallen