当前位置:网站首页>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
边栏推荐
- 【UDS统一诊断服务】三、应用层协议(1)
- 斯坦福机器学习课程汇总
- PHP junior programmers, take orders and earn extra money
- NVIDIA Jetson: GStreamer 和 openMAX(gst-omx) 插件
- Cross domain issues - allow origin header contains multiple values but only one is allowed
- The most practical chrome plug-in
- Rust 中的指针:Box、Rc、Cell、RefCell
- 共用数据的保护
- Cf6d lizards and fundamentals 2 problem solving
- 安装pyshp库
猜你喜欢

大学概率论与数理统计知识点详细整理
[ThreadX] h743 + ThreadX + Filex migration record

Robocode教程7——雷达锁定

拷贝构造函数

Graduation project, curriculum link, student achievement evaluation system

如何安装jsonpath包

【UDS统一诊断服务】(补充)五、ECU bootloader开发要点详解 (1)

Detailed arrangement of knowledge points of University probability theory and mathematical statistics

Robocode教程5——Enemy类

Vscode custom comments
随机推荐
PM2 deploy nuxt project
Rust:单元测试(cargo test )的时候显示 println 的输出信息
NVIDIA Jetson: GStreamer 和 openMAX(gst-omx) 插件
Arcpy为矢量数据添加字段与循环赋值
Vscode custom comments
爬取小米有品app商品数据
xlsxwriter.exceptions.FileCreateError: [Errno 13] Permission denied问题
selenium+PhantomJS破解滑动验证2
The most practical chrome plug-in
Figure guessing game
1006 finding a mex (hdu6756)
Dynamic creation and release, assignment and replication of objects
C#中?的这种形式
Gesture recognition research
Rust:如何实现一个线程池?
Make your own small program
Protection of shared data
声明为全局变量
文件查看命令和用户管理命令
【UDS统一诊断服务】四、诊断典型服务(2)— 数据传输功能单元