当前位置:网站首页>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
4
Internal parameters ,6
External 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
10
More than one ,7*8
Or 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
边栏推荐
- 对比学习之 Unsupervised Learning of Visual Features by Contrasting Cluster Assignments
- 【滤波跟踪】基于matlab捷联惯导仿真【含Matlab源码 1935期】
- MIF file format record
- About how to install mysql8.0 on the cloud server (Tencent cloud here) and enable local remote connection
- 正在运行的Kubernetes集群想要调整Pod的网段地址
- 一起探索云服务之云数据库
- Talk about SOC startup (11) kernel initialization
- 正在運行的Kubernetes集群想要調整Pod的網段地址
- sql里,我想设置外键,为什么出现这个问题
- Audit migration
猜你喜欢
The Oracle message permission under the local Navicat connection liunx is insufficient
【纹理特征提取】基于matlab局部二值模式LBP图像纹理特征提取【含Matlab源码 1931期】
软件内部的定时炸弹:0-Day Log4Shell只是冰山一角
学习笔记|数据小白使用DataEase制作数据大屏
相机标定(1): 单目相机标定及张正友标定基本原理
Complete collection of common error handling in MySQL installation
基于华为云IOT设计智能称重系统(STM32)
一起探索云服务之云数据库
The post-90s resigned and started a business, saying they would kill cloud database
Excel公式知多少?
随机推荐
正在運行的Kubernetes集群想要調整Pod的網段地址
sql里,我想设置外键,为什么出现这个问题
【纹理特征提取】基于matlab局部二值模式LBP图像纹理特征提取【含Matlab源码 1931期】
【愚公系列】2022年7月 Go教学课程 005-变量
对比学习之 Unsupervised Learning of Visual Features by Contrasting Cluster Assignments
Flet教程之 14 ListTile 基础入门(教程含源码)
千人規模互聯網公司研發效能成功之路
大佬们有没有人遇到过 flink oracle cdc,读取一个没有更新操作的表,隔十几秒就重复读取
Le Cluster kubernets en cours d'exécution veut ajuster l'adresse du segment réseau du pod
When sink is consumed in mysql, the self incrementing primary key has been set in the database table. How to operate in Flink?
通过环境变量将 Pod 信息呈现给容器
OneDNS助力高校行业网络安全
Verilog design responder [with source code]
What is high cohesion and low coupling?
STM32 entry development NEC infrared protocol decoding (ultra low cost wireless transmission scheme)
There are so many factors that imprison you
The Oracle message permission under the local Navicat connection liunx is insufficient
【系统设计】指标监控和告警系统
CMU15445 (Fall 2019) 之 Project#2 - Hash Table 详解
聊聊SOC启动(六)uboot启动流程二