在Matlab中创建立体声参数类:相对相机旋转参数应使用哪个坐标系? [英] Creating stereoParameters class in Matlab: what coordinate system should be used for relative camera rotation parameter?

查看:409
本文介绍了在Matlab中创建立体声参数类:相对相机旋转参数应使用哪个坐标系?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

stereoParameters具有两个外部参数:RotationOfCamera2TranslationOfCamera2.

stereoParameters takes two extrinsic parameters: RotationOfCamera2 and TranslationOfCamera2.

问题在于文档并不是很详细说明RotationOfCamera2的真正含义,只说:Rotation of camera 2 relative to camera 1, specified as a 3-by-3 matrix.

The problem is that the documentation is a not very detailed about what RotationOfCamera2 really means, it only says: Rotation of camera 2 relative to camera 1, specified as a 3-by-3 matrix.

在这种情况下,坐标系是什么?

What is the coordinate system in this case ?

可以在任何坐标系中指定旋转矩阵.

A rotation matrix can be specified in any coordinate system.

摄像机1的坐标系"到底是什么意思?它的x,y,z轴是什么?

What does it exactly mean "the coordinate system of Camera 1" ? What are its x,y,z axes ?

换句话说,如果我计算基本矩阵,如何从基本矩阵中获取相应的RotationOfCamera2TranslationOfCamera2?

In other words, if I calculate the Essential Matrix, how can I get the corresponding RotationOfCamera2 and TranslationOfCamera2 from the Essential Matrix ?

推荐答案

RotationOfCamera2TranslationOfCamera2描述了从camera1的坐标到camera2的坐标的转换. 相机的坐标系的起源是在相机的光学中心.它的X和Y轴在像平面中,Z轴沿光轴指向.

RotationOfCamera2 and TranslationOfCamera2 describe the transformation from camera1's coordinates into camera2's coordinates. A camera's coordinate system has its origin at the camera's optical center. Its X and Y-axes are in the image plane, and its Z-axis points out along the optical axis.

等效地,摄像机1的外部是身份旋转和零平移,而摄像机2的外部是RotationOfCamera2TranslationOfCamera2.

Equivalently, the extrinsics of camera 1 are identity rotation and zero translation, while the extrinsics of camera 2 are RotationOfCamera2 and TranslationOfCamera2.

如果您具有基本矩阵,则可以将其分解为旋转和平移.要牢记两件事.首先,转换是按比例缩放的,因此t将是一个单位向量.其次,由于向量矩阵乘法约定的不同,旋转矩阵将是您从estimateCameraParameters获得的结果的转置.

If you have the Essential matrix, you can decompose it into the rotation and a translation. Two things to keep in mind. First, the translation is up to scale, so t will be a unit vector. Second, the rotation matrix will be a transpose of what you get from estimateCameraParameters, because of the difference in the vector-matrix multiplication conventions.

出于好奇,您要完成的任务是什么?您正在使用单个移动相机吗?否则,为什么不使用Stereo Camera Calibrator应用程序来校准您的相机,并免费获得旋转和平移?

Out of curiosity, what is it that you are trying to accomplish? Are you working with a single moving camera? Otherwise, why not use the Stereo Camera Calibrator app to calibrate your cameras, and get rotation and translation for free?

这篇关于在Matlab中创建立体声参数类:相对相机旋转参数应使用哪个坐标系?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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