如何在OpenCV和Matlab校准工具箱中形成投影矩阵? [英] How to form a projection matrix in OpenCV and Matlab calibration tool box?

查看:802
本文介绍了如何在OpenCV和Matlab校准工具箱中形成投影矩阵?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

相机校准中的投影矩阵是一个3x4矩阵

The projection matrix in camera calibration is a 3x4 matrix


P =相机矩阵* [R | t]

P = camera matrix * [R|t]

但是在 OpenCV文档,但没有提到R和t是否由 rodrigues(rvec).t(rvec)形成。 )和 - rodrigues(rvec).t()* tvec'。维基百科提供了更详细的说明

However in the OpenCV Documentation, it didn't mention if the R and t are formed by the rvec and tvec, the calibration target object space to the camera space transformation, or they are formed by the camera world space orientation rodrigues(rvec).t() and - rodrigues(rvec).t() * tvec'. The wikipedia gives a more detailed explaination.

T是以摄像机为中心的坐标系的坐标表示的世界坐标系的原点的位置。 T常常被错误地视为相机的位置。

T is the position of the origin of the world coordinate system expressed in coordinates of the camera-centered coordinate system. T is often mistakenly considered the position of the camera.

但我还是有点困惑,那么外在参数究竟是什么?是上面的T还是外部参数应该是世界空间中的相机位置和取向,并且投影矩阵公式中的R和t不应该是外部参数?

But I still kind of confused, so what exactly the extrinsic parameters ? Is it the T above, or the extrinsic parameters should be the camera position and orientation in the world space, and the R and t in the projection matrix formula should not be the extrinsic parameters ?

我想确认投影矩阵中的R和t是什么?

I'd like to confirm what exactly the R and t in the projection matrix are ?

推荐答案

基本上,外部参数用于将均匀世界坐标转换为摄像机坐标。然后,内部参数用于将相机坐标中的点映射到图像平面上,这导致像素坐标。

Basically the extrinsic parameters are used to transform homogeneous world coordinates into camera coordinates. Afterwards the intrinsic parameters are used to map points in camera coordinates onto the image plane, which leads to pixel coordinates.

维基百科报价 R T 到投影矩阵 P R t R 基本上表示摄像机坐标系的方向, t 是摄像机坐标系中世界坐标系的原点。

Wikipedia quotes R and T and they are equivalent to the R and t of your projection matrix P. R basically represents the orientation of the camera coordinate system and t is the origin of the world coordinate system in camera coordinates.

但是,如果你想让相机中心 C 投影矩阵:

However, if you want to make the camera centre C (in world coordinates) explicit you have to rewrite your projection matrix:

P = K[R|-RC].

正如你可以看到 t = -RC ,但实际上没有什么区别。两种组合都是外部参数

As you can see t=-RC, but actually there is no difference. Both combinations are extrinsic parameters.

有关详情,请多视角几何在计算机视觉是一种圣经关于这一领域。

For more details, Multiple View Geometry in Computer Vision is kind of the bible regarding this field.

我希望我回答了你的问题。不要犹豫,问我是否不清楚,或者我误解了你。

I hope I answered your question. Do no hesitate to ask if something was not clear or if I misunderstood you.

这篇关于如何在OpenCV和Matlab校准工具箱中形成投影矩阵?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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