当前位置:网站首页>Camera calibration: key point method vs direct method
Camera calibration: key point method vs direct method
2022-04-23 06:38:00 【mightbxg】
The most common method in camera calibration is the key point method , such as OpenCV and MatLab Use Checkerboard in 、 Circle array and other two-dimensional patterns for calibration , The corners and center of the chessboard are the so-called key points . Although the key point method has many advantages , However, in some cases, it is easy to encounter insufficient calibration data , Therefore, there is a direct camera calibration method based on photometric error . This paper introduces the general principle, advantages and disadvantages of key point method and direct method .
Principle of key point method
The principle of calculating camera parameters by key point method is simply to minimize the re projection error .
The camera imaging process can be expressed as :
u = π ( T ( x ) ) \bold{u} = \pi\bigl(T(\bold{x})\bigr) u=π(T(x))
among x = [ x y z ] T \bold{x}=[x\ y\ z]^T x=[x y z]T Is the three-dimensional point coordinate in the world coordinate system , u = [ u v ] T \bold{u}=[u\ v]^T u=[u v]T Is the coordinates of two-dimensional points on the image .
T ( ) T() T() Transform for 3D rigid body , Rotation translation , contain 6 A degree of freedom , In the optimization process, the rotation vector is generally used / Four yuan number + Translation vector to represent , Its function is to convert the three-dimensional coordinates from the world coordinate system to the camera coordinate system . In the key point method , The world coordinate system is established on the plane of the calibration plate , Therefore, the rotation and translation here can also be understood as the pose of the calibration plate in the camera coordinate system , External reference .
π ( ) \pi() π() Is the camera projection function , Can be split into pinhole projections P ( ) P() P() And distortion D ( ) D() D() Two processes : π ( x ′ ) = D ( P ( x ′ ) ) \pi(\bold{x}') = D\bigl( P(\bold{x}') \bigr) π(x′)=D(P(x′)), Parameters include focal length ( f x , f y f_x, f_y fx,fy)、 Principal point ( c x , c y c_x, c_y cx,cy) And distortion parameters ( Related to distortion model ), Collectively referred to as camera internal reference .
The internal and external parameters can obtain the initial estimation through some algorithms or a priori information , The three-dimensional coordinates of the key points on the calibration plate are known , The actual image coordinates of the key points projected on the image and extracted ( u ′ u' u′) Make a difference , You can build optimization problems :
arg min { 1 2 ∑ [ π ( T ( x ) ) − u ′ ] 2 } \argmin \Bigl\{\dfrac{1}{2}\sum{\Big[ \pi\bigl(T(\bold{x})\bigr) - u' \Bigr]^2}\Bigr\} argmin{
21∑[π(T(x))−u′]2}
Accurate internal and external parameters can be obtained through nonlinear optimization .
advantage : The key point method model is relatively simple , The calculation is also relatively simple 、 Fast . The special calibration board pattern can easily extract and decode key points ( Identify the unique of each key point ID). The extraction of key points is usually not easy to be illuminated 、 Noise and other factors .
shortcoming : The key itself is a sparse feature , Wasted some useful image information . For example, in the chessboard calibration board image , It's not just corners that are useful , Each edge of the grid has strong gradient information, which can be used for calibration , But they are ignored in the key point method . Therefore, the utilization rate of image information of key point method is low , It often needs to be compensated by a large number of drawings .
Principle of direct method
The word direct method comes from SLAM ( Front end tracking based on direct method ), The principle is similar to optical flow , That is to minimize photometric error .
Record the camera imaging process as u = L ( x ) = π ( T ( x ) ) \bold{u} = L(\bold{x}) = \pi\bigl(T(\bold{x})\bigr) u=L(x)=π(T(x)). Obviously x \bold{x} x There is z = 0 z=0 z=0 The constraints of , L ( ) L() L() It's reversible , Write it down as x = L − 1 ( u ) \bold{x} = L^{-1}(\bold{u}) x=L−1(u). in other words , When internal and external parameters are known , Any point on the image can find its coordinates on the calibration plate . The calibration plate pattern is known , It can be expressed as : v x = I b ( x ) v_x = I_b(\bold{x}) vx=Ib(x), The specific coordinates of a given pixel can be obtained . So we can get every point on the image “ should ” Pixel value :
v u = I b ( L − 1 ( u ) ) v_u = I_b(\bold{L^{-1}(\bold{u})}) vu=Ib(L−1(u))
Based on the above formula, the calibration image can be simulated , In the direct calibration method, it can be compared with the actual pixel value ( v u ′ v_u' vu′) Make a difference ( Photometric error ), Build optimization problems :
arg min { 1 2 ∑ [ v u − v u ′ ] 2 } \argmin \Bigl\{\dfrac{1}{2}\sum{\Big[ v_u - v_u' \Bigr]^2}\Bigr\} argmin{
21∑[vu−vu′]2}
Theoretically, every point on the image can provide photometric error information ( The area not covered by the calibration plate is not considered ), But in fact, the points with small gray gradient have little contribution to the solution of the optimization problem , On the contrary, it increases the amount of calculation . Therefore, we can do gradient analysis on the calibration image first (Sobel), Only the points with large gradient and the points near them are added to the solution of the optimization problem .
advantage : Direct method can make full use of image pixel information , Improve image utilization efficiency , So as to reduce the requirements of calibration image acquisition . in addition , Through reasonable modeling , The direct method can also solve the relevant parameters of camera exposure ( time of exposure 、 Line delay of roller shutter exposure, etc ).
shortcoming : Due to the common distortion model (Brown、KB) There is no analytical solution to the inverse operation of , De distortion process ( L − 1 ( ) L^{-1}() L−1() Part of the function ) It requires iterative computation , And the number of residuals in each graph is much larger than that of the feature point method , As a result, the calibration speed of direct method is very slow . On the other hand , If the exposure parameters are not considered in the simplified direct method model , Photometric error will be affected by brightness value deviation and uneven illumination , However, this problem can be solved by image brightness matching and brightness homogenization algorithm .
Reference material :
- Rehder, Joern, Janosch Nikolic, Thomas Schneider, and Roland Siegwart. “A Direct Formulation for Camera Calibration,” n.d., 8.
- Hannemose, Morten, Jakob Wilm, and Jeppe R. Frisvad. “Superaccurate Camera Calibration via Inverse Rendering.” In Modeling Aspects in Optical Metrology VII, edited by Bernd Bodermann, Karsten Frenner, and Richard M. Silver, 40. Munich, Germany: SPIE, 2019. https://doi.org/10.1117/12.2531769.
- Usenko, Vladyslav, Nikolaus Demmel, and Daniel Cremers. “The Double Sphere Camera Model.” In 2018 International Conference on 3D Vision (3DV), 552–60. Verona: IEEE, 2018. https://doi.org/10.1109/3DV.2018.00069.
版权声明
本文为[mightbxg]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230546583580.html
边栏推荐
- GDB debugger installation and use
- 圆整 round 的一点点小细节
- Easy to use data set and open source network comparison website
- Cross domain issues - allow origin header contains multiple values but only one is allowed
- vs中能编译通过,但是会有红色下划线提示未定义标示符问题
- Programmers can also write novels
- Conversion between JS object and string
- [ThreadX] h743 + ThreadX + Filex migration record
- clion安装教程
- Linux 用rpm的方式安装mysql(超简单)
猜你喜欢
随机推荐
批量导出Arcgis属性表
类和对象
The waterfall waterfall flow of uview realizes single column and loads more
【UDS统一诊断服务】五、诊断应用示例:Flash Bootloader
带默认模板实参的类模板与模板模板形参的匹配
The most practical chrome plug-in
[untitled]
Gesture recognition research
Explanation of the second I interval of 2020 Niuke summer multi school training camp
【UDS统一诊断服务】四、诊断典型服务(4)— 在线编程功能单元(0x34-0x38)
Excel打开超大csv格式数据
Rust: Tcp 服务器与客户端的一个简单例子
Matlab标定板角点检测原理
Installation of GCC, G + +, GDB
Jeu de devinettes
Dynamic creation and release, assignment and replication of objects
【UDS统一诊断服务】四、诊断典型服务(3)— 读故障信息功能单元(存储数据传输功能单元)
MySQL groups are sorted by a field, and the first value is taken
【学习一下】HF-Net 训练
Robocode教程8——AdvancedRobot