当前位置:网站首页>Camera calibration (2): summary of monocular camera calibration
Camera calibration (2): summary of monocular camera calibration
2022-07-07 11:47:00 【@BangBang】
1. Review of coordinate system transformation

- First, the world coordinate system is rotated 、 The translation matrix is transformed into the camera coordinate system
- The camera coordinate system passes through similar triangles ( Principle of pinhole imaging ), Convert camera coordinate system to image coordinate system , What we use here is actually the focal length of the camera .
- It is best to use camera internal reference , Convert image coordinate system to pixel coordinate system .
Camera calibration
The purpose of camera calibration is to obtain the internal and external parameters and distortion parameters of the camera .
Camera calibration process

- 1. Print calibration board
- 2. Shoot the calibration plate from different angles
- 3. use opencv The characteristic points in the interface detection calibration board ( Generally, square is used , Check its corners )
- 4. Find the internal and external parameters of the ideal without distortion
- 5. The maximum likelihood estimation is used to iteratively optimize the accuracy ( Use Zhang Zhengyou calibration method to solve internal and external parameters , In fact, it is an initial value of iterative solution of maximum likelihood estimation , Given the initial solution parameters , In order to obtain more accurate internal and external parameters, we need to use iterative method to optimize )
- 6. The radial distortion parameters are solved by the least square method
- 7. Comprehensive internal and external parameters 、 Distortion parameters , Using the maximum likelihood method , Improve estimation accuracy
- 8 It's best for us to calculate internal and external parameters distortion coefficient of the camera
Camera calibration trick
Calibration plate pattern
We usually use checkerboard to calibrate the board pattern , But we don't have to use checkerboards , Other patterns can be used .
- have access to
The three dimensional 、 A two-dimensional , circular , grid , Random patterns.( If you use black and white checkerboard , It will be easier to detect corners ; If you use a circle , It will detect the center of the circle .Opencv Both interfaces are provided ) - Generally choose to use multiple perspectives of plane objects , Instead of constructing three-dimensional objects .
Number of checkerboard corners and parameters
- The number of calibration plates is generally the more the better , There are more grids per calibration board . Without introducing noise
- Total number of parameters : Four camera internal parameters
($f_x,f_y,u_0,v_0$),5 Distortion parameters(k1~k3,p1,p2),3 Two rotation parameters ( One parameter per axis , Can determine the rotation matrix ),3 Translation parameters . - Suppose the checkerboard has N Corner points ,K Images in different positions
- K Checkerboard provides 2NK A constraint , Two constraints per corner
- Temporarily ignore the distortion parameter : Yes
4Internal parameters ,6External parameters ( Take different pictures in different positions , The rotation translation matrix is different , The external parameters are different ) - The premise of being able to solve parameters :
2NK( constraint ) >6K +4, Introduction(N-3)*K>2, Only when the number of equations is greater than the parameters can it be solved - Homography matrix ,
adopt 4 A point can be uniquely determined,4 A point can express a plane perspective , stay 4 Extend edges in both directions - No matter how many points there are on the chessboard , Only four effective corner information are actually useful
- K>1 , You need to shoot at least two checkerboards
- Considering noise and numerical stability , You need to use a larger checkerboard , Capture more images
- For more effective effect , In general use
10More than one ,7*8Or a larger chessboard . Collect more pictures , Filter these graphs , Choose a more effective picture , Images with high noise can be removed .
How to evaluate the calibration effect of the camera
Evaluate the re projection error :
Without the real parameters of the camera , Evaluate the effect of camera calibration
- Corner of the detected two-dimensional image , The distance between the projection point and the real-world three-dimensional point ;
- Use the camera internal and external parameters obtained by calibration , Project the three-dimensional world points to the two-dimensional points in the pixel coordinate system
- And then with the corner of the two-dimensional picture detected by the algorithm , Calculate the mean square error RM
We will take a camera to shoot a checkerboard , Shooting a checkerboard will get a two-dimensional image , Two dimensional images can be used opencv Feature point detection algorithm , It can detect the corner coordinates of the two-dimensional image A; in addition , When shooting a checkerboard, we know its coordinates in the world coordinate system , Then we use the camera internal and external parameters and distortion parameters we have solved , To coordinate matrix transformation , The coordinates of the corners of the chessboard are obtained through calculation B. And then to solve A,B The mean square error of RMS
- It is acceptable that the average projection error is less than one pixel
- Calculate the re projection error of each graph , It can be used to select pictures with large errors

External parameter visualization - View of the calibration board with the camera as the center
- View of the camera centered on the calibration plate , Visualize external parameters
- The camera is fixed , Calibration plate movement , Suitable for camera centric views
- conversely , It is suitable to use the view with calibration as the center

Observe the image after distortion correction
- Observe the chessboard after distortion correction , Whether the curved line becomes straight , It is suitable for cases with obvious distortion 
How to improve the effect of camera calibration
Add more pictures
The calibration plate covers the complete image , Especially the image edge 、 Where the distortion is relatively large at the corner
The calibrated image needs enough changes , Different angles , Different positions
Remove picture , For noisy pictures
Remove blurred pictures
The inclination of the removed calibration plate relative to the camera is greater than 45 degree
边栏推荐
- Reasons for the failure of web side automation test
- 核舟记(一):当“男妈妈”走进现实,生物科技革命能解放女性吗?
- ‘module‘ object is not callable错误
- Swiftui swift internal skill: five skills of using opaque type in swift
- 总结了200道经典的机器学习面试题(附参考答案)
- STM32 entry development NEC infrared protocol decoding (ultra low cost wireless transmission scheme)
- 通过环境变量将 Pod 信息呈现给容器
- What is cloud computing?
- R語言使用magick包的image_mosaic函數和image_flatten函數把多張圖片堆疊在一起形成堆疊組合圖像(Stack layers on top of each other)
- R Language Using Image of magick package Mosaic Function and Image La fonction flatten empile plusieurs images ensemble pour former des couches empilées sur chaque autre
猜你喜欢

Talk about SOC startup (VI) uboot startup process II

. Net Maui performance improvement

Activity lifecycle

分布式数据库主从配置(MySQL)

About the application of writing shell script JSON in JMeter

聊聊SOC启动(七) uboot启动流程三

About how to install mysql8.0 on the cloud server (Tencent cloud here) and enable local remote connection

The database synchronization tool dbsync adds support for mongodb and es

Automated testing framework

【滤波跟踪】基于matlab捷联惯导仿真【含Matlab源码 1935期】
随机推荐
超标量处理器设计 姚永斌 第9章 指令执行 摘录
Test the foundation of development, and teach you to prepare for a fully functional web platform environment
La voie du succès de la R & D des entreprises Internet à l’échelle des milliers de personnes
Drive HC based on de2115 development board_ SR04 ultrasonic ranging module [source code attached]
Android interview knowledge points
【问道】编译原理
总结了200道经典的机器学习面试题(附参考答案)
Flet教程之 14 ListTile 基础入门(教程含源码)
CMU15445 (Fall 2019) 之 Project#2 - Hash Table 详解
R语言使用magick包的image_mosaic函数和image_flatten函数把多张图片堆叠在一起形成堆叠组合图像(Stack layers on top of each other)
Electron adding SQLite database
Zhou Yajin, a top safety scholar of Zhejiang University, is a curiosity driven activist
VIM command mode and input mode switching
请查收.NET MAUI 的最新学习资源
MySQL安装常见报错处理大全
. Net Maui performance improvement
Swiftui tutorial how to realize automatic scrolling function in 2 seconds
STM32 entry development write DS18B20 temperature sensor driver (read ambient temperature, support cascade)
R语言可视化分面图、假设检验、多变量分组t检验、可视化多变量分组分面箱图(faceting boxplot)并添加显著性水平、添加抖动数据点(jitter points)
Some opinions and code implementation of Siou loss: more powerful learning for bounding box regression zhora gevorgyan