简体   繁体   English

使用OpenCV进行摄像机校准:使用失真和旋转平移矩阵

[英]Camera Calibration with OpenCV: Using the distortion and rotation-translation matrix

I am reading the following documentation: http://docs.opencv.org/doc/tutorials/calib3d/camera_calibration/camera_calibration.html 我正在阅读以下文档: http : //docs.opencv.org/doc/tutorials/calib3d/camera_calibration/camera_calibration.html

I have managed to successfully calibrate the camera obtaining the camera matrix and the distortion matrix. 我已经成功地校准了摄像机,从而获得了摄像机矩阵和失真矩阵。

I had two sub-questions: 我有两个子问题:

1) How do I use the distortion matrix as I don't know 'r'? 1)我不知道'r'怎么使用失真矩阵?

获取更正坐标的公式

2) For all the views I have the rotation and translation vectors which transform the object points (given in the model coordinate space) to the image points (given in the world coordinate space). 2)对于所有视图,我都有旋转和平移矢量,这些矢量将对象点(在模型坐标空间中给出)转换为图像点(在世界坐标空间中给出)。 So a total of 6 coordinates per image(3 rotational, 3 translational). 因此,每个图像总共有6个坐标(3个旋转坐标,3个平移坐标)。 How do I make use of this information to obtain the rotational-translational matrix? 如何利用此信息获得旋转平移矩阵?

Any help would be appreciated. 任何帮助,将不胜感激。 Thanks! 谢谢!

Answers in order: 依次回答:

1) "r" is the pixel's radius with respect to the distortion center. 1)“ r”是相对于畸变中心的像素半径。 That is: 那是:

r = sqrt((x - x_c)^2 + (y - y_c)^2)

where (x_c, y_c) is the center of the nonlinear distortion (ie the point in the image that has zero nonlinear distortion. This is usually (and approximately) identified with the principal point, ie the intersection of the camera focal axis with the image plane. The coordinates of the principal point are in the 3rd column of the matrix of the camera intrinsic paramers. 其中(x_c,y_c)是非线性失真的中心(即图像中的非线性失真为零的点。这通常(且近似)由主点标识,即相机焦距轴与图像的交点主点的坐标在相机固有参数的矩阵的第3列中。

2) Use Rodrigues's formula to convert between rotation vectors and rotation matrices. 2)使用罗德里格斯公式在旋转向量和旋转矩阵之间进行转换。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM