OpenCV的外部参数 [英] Extrinsic parameters from OpenCV

查看:120
本文介绍了OpenCV的外部参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用OpenCV校准立体声摄像机对.我已经拍摄了各种校准照片,并且使用cv2.calibrateCamera对内部参数非常满意.但是,尚不清楚如何获取外部参数.

I'm using OpenCV to calibrate a stereo camera pair. I've taken various calibration photos and I have a satisfactory fit for the intrinsic parameters using cv2.calibrateCamera. However, it's not clear how to get the extrinsic parameters out.

该函数仅返回cameraMatrix,尽管它只是故事的一半,但仍然有用.我希望能够获得文档顶部所示的旋转/平移-即从世界原点到相机透视中心的矢量和旋转.

The function just returns the cameraMatrix, which while useful is only half the story, as it were. I'd like to be able to obtain the rotation/translation shown in the top of the documentation - i.e. a vector from the world origin to the camera perspective centre and a rotation.

我猜cv2.solvePnP类似于我需要的东西,但是尚不清楚确切的R/T是-投影公式中的[R | t]还是其他?

I'm guessing cv2.solvePnP is something like what I need, but it's unclear exactly what R/T are - are they [R|t] in the projection formula or something else?

我意识到也可以使用cv2.stereoCalibrate,但是我不明白为什么必须要有两台摄像机.原则上,每个摄像机都可以获取投影矩阵.

I realise that it's also possible to use cv2.stereoCalibrate, but I don't see why it's necessary to have two cameras. In principle the projection matrix is obtainable for each camera individually.

推荐答案

R和T是3x1向量,用于描述相机的旋转和平移

R and T are 3x1 vectors describing the rotation and translation of your camera

这篇关于OpenCV的外部参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆