PARAMETER CALIBRATION METHOD AND APPARATUS

Information

  • Patent Application
  • 20150093042
  • Publication Number
    20150093042
  • Date Filed
    December 08, 2014
    10 years ago
  • Date Published
    April 02, 2015
    9 years ago
Abstract
Embodiments of the present invention disclose a parameter calibration method. The method includes: acquiring a calibration template image, where the calibration template image is obtained by photographing a calibration template; performing corner detection on the calibration template image to extract image corners; calculating a radial distortion parameter according to the extracted image corners; performing radial distortion correction according to the calculated radial distortion parameter, so as to reconstruct a distortion correction image; and according to a perspective projection relationship between the calibration template and the reconstructed distortion correction image, calculating intrinsic and extrinsic parameters to implement parameter calibration, where the intrinsic and extrinsic parameters include: a matrix of intrinsic parameters, a rotational vector, and a translational vector. The present invention may be applied to parameter calibration for an imaging apparatus such as a camcorder and a camera in a case of a high distortion.
Description
TECHNICAL FIELD

The present invention relates to the fields of computer vision and image measurement, and in particular, to a camcorder calibration method and apparatus.


BACKGROUND

In an image measurement process and a computer vision application, in order to determine a relationship between a three-dimensional geometric location of a certain point on a surface of a spatial object and a corresponding point thereof in an image, a geometric model for imaging must be established. Parameters of the geometric model are parameters of a photography apparatus, such as a camcorder and a camera. Under most conditions, these parameters can be obtained only by performing experiments and computations; and a process of solving for the parameters is referred to as camcorder calibration (or camera calibration). Camcorder calibration is used as an example. Existing camcorder calibration methods are generally classified into two types: traditional object-based calibration methods and image sequence-based self-calibration methods.


Among the traditional calibration methods, a two-step method and a planar template calibration method are typical. The two-step method is to divide calibration work into two steps: First, determine a perspective projection matrix; and then restore intrinsic and extrinsic parameters of a camcorder from the perspective projection matrix. Because a high precision three-dimensional calibration block needs to be made in this method, it is inconvenient to implement the method. In the planar template calibration method, according to a characteristic that two equations for intrinsic parameters of a camcorder can be established based on calibration points on a same plane, the intrinsic parameters are solved for by using multiple planes of different locations and directions, and then extrinsic parameters of the camcorder are calculated. Because it is required to photograph only several planar templates at different angles or locations in the planar template calibration method, an operation is relatively simple. Therefore, this method is widely used in practice.


Different from the traditional calibration methods, the self-calibration methods do not require a given calibration object but use geometric knowledge of a scene or a constraint relationship of specific camcorder motion to perform calibration on intrinsic and extrinsic parameters of a camcorder. Constraints of intrinsic parameters of a camcorder are mainly used in these types of methods to restore parameters of the camcorder by using a method such as solving of Kruppa equations or hierarchical step-wise calibration, where the constraints are unrelated to a scene and motion of the camcorder. However, because the self-calibration methods are less precise than the traditional calibration methods, the self-calibration methods are applied only to a given scenario.


On the other hand, distortion modeling and calibration of a camcorder are also extremely important content. In fact, a lens distortion may more or less exist on a camcorder. There are multiple types of distortions on a camcorder, and among those types of distortions, a radial distortion is a main type. For distortion calibration, a classical method (such as a planar template method) is to first assume that a camcorder uses a pinhole camera model, obtain intrinsic parameters of the camcorder by performing calibration, and then solve for a polynomial distortion model parameter by using a non-linear optimization method. This method is feasible when a distortion of a camcorder is not severe; however, this method fails when it is applied to a case of a high distortion, such as a fish-eye lens.


It can be learnt that in the prior art, the traditional calibration methods fail in a case of a high distortion, and the self-calibration methods are less precise than the traditional methods; therefore, how to implement a camcorder (or a camera) calibration method that is simple to operate, capable of processing a highly distorted image, and has relatively high precision is an urgent problem to be solved.


SUMMARY

Embodiments of the present invention provide a parameter calibration method and apparatus, which can be applied to parameter calibration for an imaging apparatus such as a camcorder (or a camera) in a case of a high distortion, and are simple to operate and are of high precision.


According to a first aspect, an embodiment of the present invention provides a parameter calibration method, including:


acquiring a calibration template image, where the calibration template image is obtained by photographing a calibration template;


performing corner detection on the calibration template image to extract image corners;


calculating a radial distortion parameter according to the extracted image corners;


performing radial distortion correction according to the calculated radial distortion parameter, so as to reconstruct a distortion correction image; and


according to a perspective projection relationship between the calibration template and the reconstructed distortion correction image, calculating intrinsic and extrinsic parameters to implement parameter calibration, where the intrinsic and extrinsic parameters include: a matrix of intrinsic parameters, a rotational vector, and a translational vector.


Based on a feature of the first aspect, the present invention further provides a parameter calibration method, where the method further includes:


optimizing the calculated intrinsic and extrinsic parameters by using a criterion of a minimum re-projection error and by means of the Levenberg-Marquardt algorithm.


According to a second aspect, an embodiment of the present invention provides a parameter calibration apparatus, where the apparatus includes:


an acquiring unit, configured to acquire a calibration template image, where the calibration template image is obtained by photographing a calibration template;


a detecting unit, configured to perform corner detection on the calibration template image to extract image corners;


a calculating unit, configured to calculate a radial distortion parameter according to the extracted image corners;


a correcting unit, configured to perform radial distortion correction according to the calculated radial distortion parameter, so as to reconstruct a distortion correction image; and


a calibration unit, configured to, according to a perspective projection relationship between the calibration template and the reconstructed distortion correction image, calculate intrinsic and extrinsic parameters to implement parameter calibration, where the intrinsic and extrinsic parameters include: a matrix of intrinsic parameters, a rotational vector, and a translational vector.


With reference to a feature of the second aspect, the present invention further provides a parameter calibration apparatus, where the apparatus further includes:


an optimizing unit, configured to optimize the calculated intrinsic and extrinsic parameters by using a criterion of a minimum re-projection error and by means of the Levenberg-Marquardt algorithm.


In the method provided in the embodiments of the present invention, in order to process a highly distorted image, a calibration template image is first photographed; a radial distortion parameter is estimated by using a constraint that a straight line in a planar calibration template is projected as a circular arc in a calibration template image under a single parameter division model; distortion correction is performed, so that the calibration template image conforms to perspective projection imaging; a homography matrix between a reconstructed distortion correction image and the planar calibration template is calculated; on an assumption that a principal point is a distortion center and an obliquity factor is zero, an ideal focal length is estimated; and the foregoing result is used as an initial value to perform non-linear optimization, so as to obtain a precise calibration result. This method is simple to operate and provides high precision.





BRIEF DESCRIPTION OF DRAWINGS

To describe the technical solutions in the embodiments of the present invention more clearly, the following briefly introduces the accompanying drawings required for describing the embodiments. Apparently, the accompanying drawings in the following description show merely some embodiments of the present invention, and a person of ordinary skill in the art may still derive other drawings from these accompanying drawings without creative efforts.



FIG. 1 is a schematic flowchart of a parameter calibration method according to Embodiment 1 of the present invention;



FIG. 2 is a schematic plan view of a calibration template according to Embodiment 1 of the present invention;



FIG. 3 is a schematic diagram of polar coordinate transformation of a distortion point (xdi, ydi) in a calibration template image and a correction point (xui, yui) in a distortion correction image according to Embodiment 1 of the present invention; and



FIG. 4 is a schematic diagram of a parameter calibration apparatus according to Embodiment 2 of the present invention.





DESCRIPTION OF EMBODIMENTS

The following clearly describes the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are merely a part rather than all of the embodiments of the present invention. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.


Embodiment 1

As shown in FIG. 1, Embodiment 1 of the present invention provides a parameter calibration method, and the method includes the following steps:



101. Acquire a calibration template image, where the calibration template image is obtained by photographing a calibration template.


In step 101, the calibration template adopted in this embodiment may be a calibration template with an array of fixed spacing patterns, specifically including a checkerboard calibration template, a calibration template with an equal spacing solid-circular array, and the like. Preferably, in this embodiment, a checkerboard calibration template generally used in a camcorder (or a camera) calibration method may be adopted, specifically as shown in FIG. 2.


It should be noted that in order to perform radial distortion correction and parameter calibration for a camcorder (or a camera), it is required to photograph a calibration template, so as to obtain a calibration template image. In specific implementation, a distribution condition that is of grid point coordinates of a calibration template and is on a plane is established according to the number of grid points of the calibration template in horizontal and vertical directions and a size of each grid point.



102. Perform corner detection on the calibration template image to extract image corners.


In step 102, because a distortion generally exists in an image actually photographed by using a lens of a camcorder (or a camera), compared with an actual calibration template, the calibration template image is an image with a distortion. Therefore, the image corners extracted by performing corner detection are image corners with a distortion.


A person skilled in the art should understand that a corner is an important feature of an image, which plays an important role in understanding and analysis of an image and a graph. There is no explicit mathematic definition for a corner; it is generally considered that a corner is a point with dramatically varying brightness in a two-dimensional image or a point that has a maximum curvature on an edge curve in an image. A corner effectively reduces a data volume of information while maintaining important features of an image or a graph, thereby causing a large content of information of the image or graph, effectively increasing a computation speed, facilitating reliable matching of images, and making real-time processing possible. A corner also plays an extremely important role in the field of computer vision, such as three-dimensional scene reconstruction, motion estimation, target tracing, target identification, and image registration and matching. Currently, a corner detection algorithm includes grayscale image-based corner detection, binary image-based corner detection, profile curve-based corner detection, and the like.



103. Calculate a radial distortion parameter according to the extracted image corners.


It should be noted that in computer vision, an image is a reflection of a spatial object in an image plane by using an imaging system, that is, a projection of the spatial object onto the image plane. A grayscale of each pixel point in an image represents intensity of reflected light at a certain point on the surface of a spatial object, and a location of the pixel point in the image is related to a geometrical location of a corresponding point on the surface of the spatial object. A relationship between these locations depends on a geometrical projection model of a camcorder (or a camera) system, where a projection relationship of an object from three-dimensional space to an image plane is an imaging model. An ideal projection imaging model is central projection in optics, also referred to as a pinhole model. Under an ideal perspective projection model, a straight line in the calibration template should be also a straight line in the calibration template image. However, because a distortion exists in an actual image, under a single parameter division model, a straight line in the calibration template is presented as a circular arc in the calibration template image.


In step 103, the calculating a radial distortion parameter according to the extracted image corners may specifically include:



103
a. Based on the single parameter division model, model a radial distortion of a camcorder (or a camera), so as to establish a coordinate transformation relationship between the calibration template image and the distortion correction image obtained by correcting the calibration template image, where specific modeling is shown in formula (1):










x
u

=


x
d


1
+

λ






r
d
2








(
1
)







In formula (1), xd=(xd,yd) is a coordinate of any distortion point in the calibration template image, xu=(xu,yu) is a coordinate of a correction point that is in the distortion correction image and obtained after xd=(xd,yd) is corrected, λ is a radial distortion parameter, and rd2=xd2+yd2.



103
b. According to a correspondence that a straight line in the calibration template is presented as a circular arc in the calibration template image due to an imaging distortion, perform fitting in combination with the image corners to obtain circular arc parameters of the circular arc.


Specifically, assuming herein that a non-distortion straight line equation for a straight line in the calibration template and after an ideal perspective projection is performed on the straight line is:






ax
u
+by
u
+c=0  (2)


In formula (2), {a,b,c} are parameters of a straight line.


In an actual image, due to existence of the distortion, under the single parameter division model, the straight line is presented as a circular arc in the calibration template image, and formula (1) is substituted into the straight line equation (2) to obtain:











x
d
2

+

y
d
2

+


a

c





λ




x
d


+


b

c





λ




y
d


+

1
λ


=
0




(
3
)







It can be learnt from formula (3) that the circular arc already includes information about the radial distortion parameter. If the circular arcs are found, the radial distortion parameter may be estimated by using the circular arc parameters.


Herein, formula (3) is modified as a general form of a circular arc:






x
d
2
+y
d
2
+A
i
x
d
+B
i
y
d
+C
i=0  (4)


In formula (4), {Ai,Bi,Ci|i=1, 2, 3} are circular arc parameters, where








A
i

=

a

c





λ



,






B
i

=

b

c





λ



,




and







C
i

=


1
λ

.





For each pixel point belonging to the circular arc, an equation may be obtained. Therefore, to solve for the circular arc parameters in formula (4), at least three pixel points are required to establish an equation set. Because the number of image corners actually extracted is generally greater than 3, the circular arc parameters in a sense of least-square can be obtained by substituting these image corners into formula (4).



103
c. Calculate the radial distortion parameter according to the circular arc parameters obtained by means of fitting.


Specifically, when there exist three circular arcs, according to the circular arc parameters {Ai,Bi,Ci|i=1, 2, 3} obtained by means of fitting, both the radial distortion parameter λ and a distortion center (xd0,yd0) may be calculated according to formula (5):





(A1−A2)xd0+(B1−B2)yd0+(C1−C2)=0





(A1−A3)xd0+(B1−B3)yd0+(C1−C3)=0





(A2−A3)xd0+(B2−B3)yd0+(C2−C3)=0  (5)


In the formula above, {Ai,Bi,Ci|i=1, 2, 3} are three circular arc parameters.


After the distortion center (xd0,yd0) is solved for, the radial distortion parameter λ may be obtained by using formula (6):










1
λ

=


x

d





0

2

+

y

d





0

2

+


A
i



x

d





0



+


B
i



y

d





0



+

C
i






(
6
)







In formula (6), Ai, Bi, Ci is any one of the three circular arcs.


When the number of circular arcs is greater than 3, a solution to the radial distortion parameter λ in the sense of least-square may be calculated.



104. Perform radial distortion correction according to the calculated radial distortion parameter, so as to reconstruct a distortion correction image.


Specifically, radial distortion correction is performed according to the solved radial distortion parameter λ; and


according to formula (1),











x
u

=


x
d


1
+

λ






r
d
2










and







y
u

=


y
d


1
+

λ






r
d
2









(
7
)







are obtained.


Formula (7) shows a formula in which a coordinate (xd,yd) in a calibration template image is directly projected as a coordinate (xu,yu) in a distortion correction image after correction.


It should be noted that under such projection, for reasons of integer sampling, there may be many unknown information points in a distortion correction image. A relatively proper radial distortion correction method is to solve for, in the calibration template image according to the radial distortion parameter and according to an inverse process that the calibration template image is derived from the distortion correction image, a coordinate of a distortion point (xdi,ydi) corresponding to a correction point (xui,yui) in the distortion correction image. Bilinear interpolation is performed on the solved coordinate of the distortion point (xdi,ydi) in the calibration template image, so as to obtain a coordinate of a correction point (xui′,yui′) after radial distortion correction, and so as to implement the reconstruction of the distortion correction image. Herein, a subscript i is a number used for differentiating between different points in a same coordinate system.


Specifically, in an embodiment of the present invention, the radial distortion correction may be performed by using the following method, and specific steps are as follows:


1) Move an original point of the calibration template image to the distortion center (xd0,yd0), so as to obtain:






r
d
2
=x
d
2
+y
d
2.


2) For each correction point (xui,yui) after distortion correction, obtain:











y
ui


x
ui


=




y
di


1
+

λ






r
di
2






x
di


1
+

λ






r
di
2





=



y
di


x
di


=

k
i







(
8
)







In formula (8), ki indicates that the distortion center (xd0,yd0), the distortion point (xdi,ydi), and the correction point (xui,yui) corresponding to the distortion point are collinear.


3) In combination with 1) and 2), establish the following equation set:









{





y
di

=




y
ui


x
ui




x
di


=


k
i



x
di










x
ui

=


x
di


1
+

λ


(


x
di
2

+

y
di
2


)












(
9
)







Solve the equation set to obtain:










x
di

=


1
±


1
-


4
·
λ









x
ui



(

1
+

k
i
2


)


·

x
ui







2





λ







x
ui



(

1
+

k
i
2


)








(
10
)







Because λ<0, formula (10) inevitably has two real number solutions; however, in the two solutions, because xui and xdi must be either positive or negative, a valid solution xdi can still be uniquely determined. After xdi is solved for, xdi is substituted into the first equation of equation set (9) to solve for ydi.


4) After the distortion point (xdi,ydi) is solved for, a pixel value of a point (xui′,yui′), after distortion correction is obtained by performing bilinear interpolation.


In another embodiment of the present invention, a distortion point (xdi,ydi) and a correction point (xui, yui) may further be transformed into polar coordinates for expression. Solving is performed with the polar coordinates, as shown in FIG. 3, which is specifically as follows:


Assuming that a distortion point (ρdd) corresponds to a correction point (ρuu) after correction, θud, and therefore it is required to determine only ρd.


According to formula (7),










ρ
u
2

=



x
u
2

+

y
u
2


=


ρ
d
2


(

1
+

λ






ρ
d
2



)







(
11
)







is obtained.


Then a quadratic equation of one unknown for ρd2 may be established, and by applying ρd>0 and a constraint of ρdu, a unique solution to ρd may be solved for.



105. Calculate intrinsic and extrinsic parameters according to a perspective projection relationship between the calibration template and the reconstructed distortion correction image to implement parameter calibration, where


the intrinsic and extrinsic parameters include a matrix of intrinsic parameters, a rotational vector, and a translational vector.


According to the perspective projection relationship between the calibration template and the reconstructed distortion correction image, a homography matrix (Homography) H may be estimated:






s{tilde over (x)}
u
=H{tilde over (M)}  (12)


In formula (12), s is a scale factor, {tilde over (M)} is a homogeneous coordinate of a point in the calibration template, and {tilde over (x)}u is a homogeneous coordinate of a point obtained after {tilde over (M)} is projected onto the reconstructed distortion correction image, where






H=K[r
1
r
2
t]  (13)


where






k
=

[




f
a



c



u
0





0



f
b




v
0





0


0


1



]





is a matrix of intrinsic parameters of a camcorder (or a camera), r1 and r2 are rotational vectors and r1 and r2 are orthogonal, t is a translational vector, (u0,v0) is a principal point of the matrix of intrinsic parameters, c is an obliquity factor, and (fa,fb) is an ideal focal length of a lens of the camcorder (or the camera).


Due to orthogonality of r1 and r2,









{






h
1
T



K

-
T




K

-
1




h
2


=
0








h
1
T



K

-
T




K

-
1




h
1


=


h
2
T



K

-
T




K

-
1




h
2










(
14
)







In formula (14), h1 and h2 are forms of expressing column vectors of the matrix H, and H=[h1 h2 h3]. Formula (14) shows two basic constraint equations that solve for the matrix of intrinsic parameters.


Because only one calibration template image is adopted in the present invention, it is impossible to solve for all of 5 unknown numbers in the matrix K of intrinsic parameters. Therefore, several parameters in the matrix of intrinsic parameters are predefined:


a) It is preset that an initial value of the principal point (u0,v0) coincides with the distortion center (xd0,yd0). Even though it is proven by many researchers that a principal point does not coincide with a distortion center, it is noted that the principal point is generally extremely close to the distortion center. Therefore, it is proper to assume that the distortion center is the initial value of the principal point. A precise coordinate of the principal point is to be obtained by subsequent non-linear optimization.


b) It is preset that the obliquity factor c=0; and for most lenses, this is a proper assumption.


Therefore, a solution to a matrix of intrinsic parameters of a camcorder (or a camera) is simplified to a solution to two unknown numbers fa and fb. Because of









K

-
T




K

-
1



=

[




1

f
a
2




0



-


u
0


f
a
2







0



1

f
b
2





-


v
0


f
b
2








-


u
0


f
a
2






-


v
0


f
b
2








u
0
2


f
a
2


+


v
0
2


f
b
2


+
1




]


,




the constraint of formula (14) is applied to obtain:











[




m
11




m
12






m
21




m
22




]

·

[




1

f
a
2







1

f
b
2





]


=

[





-

h
13




h
23








h
23
2

-

h
13
2





]





(
15
)







In formula (15):






m
11
=h
11
h
21
−u
0(h13h21+h11h23)+u02(h13h23)






m
12
=h
12
h
22
−v
0(h13h22+h12h23)+v02(h13h23)






m
21=(h112−h212)−2u0(h11h13−h21h23)+u02(h132−h232)






m
22=(h122−h222)−2v0(h12h13−h22h23)+v02(h132−h232)


Formula (15) is linearly solved to obtain fa and fb.


After fa and fb are solved for, in combination with the predefined principal point (u0,v0) and the obliquity factor c, the matrix K of intrinsic parameters may be restored, and then the rotational vector R and the translational vector t may be solved for.


So far, calibration for geometrical and optical parameters of a camcorder (or a camera) is complete.


The parameter calibration method provided in this embodiment can be applied to calibration for a camcorder (or a camera) in a case of a high distortion. In addition, because only one calibration template image is adopted in parameter calibration, compared with an existing camcorder (or a camera) calibration method, this method has advantages, such as being simple and effective, and being easy to operate.


Further, in this embodiment, the parameter calibration method may further include the following steps:



106. Optimize the calculated intrinsic and extrinsic parameters by using a criterion of a minimum re-projection error and by means of the LM (Levenberg-Marquardt, Levenberg-Marquardt) algorithm, so that the intrinsic and extrinsic parameters after optimization become more precise.


Specifically, the following objective function is adopted during optimization:









min





j
=
1

m











m
j

-

m


(

K
,
R
,
t
,

M
j


)





2






(
16
)







In formula (16), mj is a coordinate of a point in the reconstructed distortion correction image, m (K,R,t,Mj) represents a coordinate of a point obtained after a point Mj in the calibration template is perspectively projected onto the calibration template image.


When an iteration error is less than a preset threshold, iteration ends, so that a precise matrix K of intrinsic parameters, rotational vector R, and translational vector t of the camcorder (or the camera) are obtained.


In this embodiment, optimization by means of the LM algorithm makes values of the intrinsic and extrinsic parameters more precise.


A person skilled in the art should learn that the method provided in this embodiment may be applied to parameter calibration for an imaging device, which includes but is not limited to a camcorder, a camera, and the like.


Embodiment 2

Based on the calibration method described in Embodiment 1, as shown in FIG. 4, Embodiment 2 of the present invention provides a parameter calibration apparatus, where the apparatus includes:


an acquiring unit 201, configured to acquire a calibration template image, where the calibration template image is obtained by photographing a calibration template;


a detecting unit 202, configured to perform corner detection on the calibration template image to extract image corners; and


a calculating unit 203, configured to calculate a radial distortion parameter according to the extracted image corners.


In this embodiment, the calculating unit 203 specifically includes:


a modeling module 2031, configured to, based on a single parameter division model, model a radial distortion according to the following formula, so as to establish a coordinate transformation relationship between the calibration template image and the distortion correction image obtained by correcting the calibration template image:








x
u

=


x
d


1
+

λ






r
d
2





,




where xd=(xd,yd) is a coordinate of any distortion point in the calibration template image, xu=(xu,yu) is a coordinate of a correction point that is in the distortion correction image and obtained after xd=(xd,yd) is corrected, λ is a radial distortion parameter, and rd2=xd2+yd2;


a fitting module 2032, configured to, according to a correspondence that a straight line in the calibration template is presented as a circular arc in the calibration template image due to an imaging distortion, perform fitting in combination with the image corners to obtain circular arc parameters of the circular arc, where a straight line equation in the calibration template is axu+byu+c=0, a circular arc equation in the calibration template image is xd2+yd2+Aixd+Biyd+Ci=0, and {Ai,Bi,Ci|i=1, 2, 3} are circular arc parameters, where








A
i

=

a

c





λ



,






B
i

=

b

c





λ



,




and








C
i

=

1
λ


;




a calculating module 2033, configured to, according to the circular arc parameters obtained by means of fitting, and according to





(A1−A2)xd0+(B1−B2)yd0+(C1−C2)=0





(A1−A3)xd0+(B1−B3)yd0+(C1−C3)=0





(A2−A3)xd0+(B2−B3)yd0+(C2−C3)=0


solve for a distortion center (xd0,yd0) and then calculate the radial distortion parameter in combination with a formula








1
λ

=


x

d





0

2

+

y

d





0

2

+


A
i



x

d





0



+


B
i



y

d





0



+

C
i



;




and


a correcting unit 204, configured to perform radial distortion correction according to the calculated radial distortion parameter, so as to reconstruct a distortion correction image.


In this embodiment, the correcting unit 204 is specifically configured to:


according to the radial distortion parameter and according to an inverse process that the calibration template image is derived from the distortion correction image, solve for a coordinate of a distortion point (xdi,ydi) in the calibration template image corresponding to a correction point (xui,yui) in the distortion correction image, where a subscript i is a number; and


perform bilinear interpolation on the solved coordinate, of the distortion point (xdi,ydi) in the calibration template image, so as to obtain a coordinate of a correction point (xui′,yui′) in the reconstructed distortion correction image.


A calibration unit 205 is configured to, according to a perspective projection relationship between the calibration template and the reconstructed distortion correction image, calculate intrinsic and extrinsic parameters to implement parameter calibration, where the intrinsic and extrinsic parameters include: a matrix of intrinsic parameters, a rotational vector, and a translational vector.


In this embodiment, the calibration unit 205 is specifically configured to:


according to the perspective projection relationship between the calibration template and the reconstructed distortion correction image, estimate a homography matrix H according to the following formula:






s{tilde over (x)}
u
=H{tilde over (M)}


where s is a scale factor, {tilde over (M)} is a homogeneous coordinate of a point in the calibration template, {tilde over (x)}u is a homogeneous coordinate of a corresponding point obtained after {tilde over (M)} is projected onto the reconstructed distortion correction image, H=K[r1 r2 t],






k
=

[




f
a



c



u
0





0



f
b




v
0





0


0


1



]





is a matrix of intrinsic parameters, r1 and r2 are rotational vectors and r1 and r2 are orthogonal, t is a translational vector, (u0,v0) is a principal point of the matrix of intrinsic parameters, c is an obliquity factor, and (fa,fb) is an ideal focal length;


according to orthogonality of r1 and r2 obtain a constraint condition






{







h
1
T



K

-
T




K

-
1




h
2


=
0








h
1
T



K

-
T




K

-
1




h
1


=


h
2
T



K

-
T




K

-
1




h
2






;





preset that an initial value of the principal point (u0,v0) coincides with the distortion center (xd0,yd0), set the obliquity factor c=0, and


obtain the ideal focal length (fa,fb) by performing linear solving in combination with formulas








K

-
T




K

-
1



=

[




1

f
a
2




0



-


u
0


f
a
2







0



1

f
b
2





-


v
0


f
b
2








-


u
0


f
a
2






-


v
0


f
b
2








u
0
2


f
a
2


+


v
0
2


f
b
2


+
1




]





and






{







h
1
T



K

-
T




K

-
1




h
2


=
0








h
1
T



K

-
T




K

-
1




h
1


=


h
2
T



K

-
T




K

-
1




h
2






;





and


restore the matrix of intrinsic parameters and then solve for the rotational vector and the translational vector in combination with the preset principal point (u0,v0) and the preset obliquity factor c.


The parameter calibration apparatus provided in this embodiment can be applied to calibration for a camcorder (or a camera) in a case of a high distortion; and compared with that in the prior art, the apparatus is simpler to operate because only one calibration template image is adopted in parameter calibration.


Further, in this embodiment, the apparatus further includes:


an optimizing unit 206, configured to optimize the calculated intrinsic and extrinsic parameters by using a criterion of a minimum re-projection error and by means of the Levenberg-Marquardt algorithm.


In this embodiment, after the calculated intrinsic and extrinsic parameters are optimized by means of the LM algorithm, values of the intrinsic and extrinsic parameters are more precise.


It should be noted that this embodiment is specific physical implementation of Embodiment 1 described above, features of this embodiment and Embodiment 1 can be cross-referenced. A person skilled in the art should learn that the apparatus provided in this embodiment may be applied to parameter calibration for an imaging device, which includes but is not limited to a camcorder, a camera, and the like.


A person of ordinary skill in the art may understand that all or a part of the processes of the methods in the embodiments may be implemented by a computer program instructing relevant hardware. The program may be stored in a computer readable storage medium. When the program runs, the processes of the methods in the embodiments are performed. The storage medium may include: a magnetic disk, an optical disc, a read-only memory (Read-Only Memory, ROM), or a random access memory (Random Access Memory, RAM).


The disclosed are merely exemplary embodiments of the present invention, but are not intended to limit the scope of the present invention. Equivalent variation figured out according to the claims shall fall within the protection scope of the present invention.

Claims
  • 1. A parameter calibration method, comprising: acquiring a calibration template image, wherein the calibration template image is obtained by photographing a calibration template;performing corner detection on the calibration template image to extract image corners;calculating a radial distortion parameter according to the extracted image corners;performing radial distortion correction according to the calculated radial distortion parameter, so as to reconstruct a distortion correction image; andaccording to a perspective projection relationship between the calibration template and the reconstructed distortion correction image, calculating intrinsic and extrinsic parameters to implement parameter calibration, wherein the intrinsic and extrinsic parameters comprise: a matrix of intrinsic parameters, a rotational vector, and a translational vector.
  • 2. The method according to claim 1, wherein the step of calculating a radial distortion parameter according to the extracted image corners comprises: based on a single parameter division model, modeling a radial distortion according to the following formula, so as to establish a coordinate transformation relationship between the calibration template image and the distortion correction image obtained by correcting the calibration template image:
  • 3. The method according to claim 1, wherein the step of performing radial distortion correction according to the calculated radial distortion parameter, so as to reconstruct a distortion correction image comprises: according to the radial distortion parameter and according to an inverse process that the calibration template image is derived from the distortion correction image, solving for a coordinate of a distortion point (xdi,ydi) that is in the calibration template image and corresponding to a correction point (xui,yui) in the distortion correction image; andperforming bilinear interpolation on the solved coordinate of the distortion point (xdi,ydi) in the calibration template image, so as to obtain a coordinate of a correction point (xui′,yui′) in the reconstructed distortion correction image.
  • 4. The method according to claim 3, wherein the step of calculating intrinsic and extrinsic parameters according to a perspective projection relationship between the calibration template and the reconstructed distortion correction image comprises: according to the perspective projection relationship between the calibration template and the reconstructed distortion correction image, estimating a homography matrix H according to the following formula: s{tilde over (x)}u=H{tilde over (M)}wherein s is a scale factor, {tilde over (M)} is a homogeneous coordinate of a point in the calibration template, {tilde over (x)}u is a homogeneous coordinate of a corresponding point obtained after {tilde over (M)} is projected onto the reconstructed distortion correction image, H=K[r1 r2 t],
  • 5. The method according to claim 1, further comprising: optimizing the calculated intrinsic and extrinsic parameters by using a criterion of a minimum re-projection error and by means of the Levenberg-Marquardt algorithm.
  • 6. The method according to claim 1, wherein the calibration template is a calibration template with an array of fixed spacing patterns.
  • 7. A parameter calibration apparatus, comprising: an acquiring unit, configured to acquire a calibration template image, wherein the calibration template image is obtained by photographing a calibration template;a detecting unit, configured to perform corner detection on the calibration template image to extract image corners;a calculating unit, configured to calculate a radial distortion parameter according to the extracted image corners;a correcting unit, configured to perform radial distortion correction according to the calculated radial distortion parameter, so as to reconstruct a distortion correction image; anda calibration unit, configured to, according to a perspective projection relationship between the calibration template and the reconstructed distortion correction image, calculate intrinsic and extrinsic parameters to implement parameter calibration, wherein the intrinsic and extrinsic parameters comprise: a matrix of intrinsic parameters, a rotational vector, and a translational vector.
  • 8. The apparatus according to claim 7, wherein the calculating unit specifically comprises: a modeling module, configured to, based on a single parameter division model, model a radial distortion according to the following formula, so as to establish a coordinate transformation relationship between the calibration template image and the distortion correction image obtained by correcting the calibration template image:
  • 9. The apparatus according to claim 7, wherein the correcting unit is specifically configured to: according to the radial distortion parameter and according to an inverse process that the calibration template image is derived from the distortion correction image, solve for a coordinate of a distortion point (xdi,ydi) that is in the calibration template image and corresponding to a correction point (xui,yui) in the distortion correction image; andperform bilinear interpolation on the solved coordinate of the distortion point (xdi,ydi) in the calibration template image, so as to obtain a coordinate of a correction point (xui′,yui′) in the reconstructed distortion correction image.
  • 10. The apparatus according to claim 9, wherein the calibration unit is specifically configured to: according to the perspective projection relationship between the calibration template and the reconstructed distortion correction image, estimate a homography matrix H according to the following formula: s{tilde over (x)}u=H{tilde over (M)}wherein s is a scale factor, {tilde over (M)} is a homogeneous coordinate of a point in the calibration template, {tilde over (x)}u is a homogeneous coordinate of a corresponding point obtained after {tilde over (M)} is projected onto the reconstructed distortion correction image, H=K[r1 r2 t],
  • 11. The apparatus according to claim 7, further comprising: an optimizing unit, configured to optimize the calculated intrinsic and extrinsic parameters by using a criterion of a minimum re-projection error and by means of the Levenberg-Marquardt algorithm.
Priority Claims (1)
Number Date Country Kind
201210188585.5 Jun 2012 CN national
CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of International Patent Application No. PCT/CN2013/076972, filed on Jun. 8, 2013, which claims priority to Chinese Patent Application No. 201210188585.5, filed on Jun. 8, 2012, both of which are hereby incorporated by reference in their entireties.

Continuations (1)
Number Date Country
Parent PCT/CN2013/076972 Jun 2013 US
Child 14563287 US