问题描述
所以我有一个深度图和相机的外在和内在.我想取回 3D 点和表面法线.我正在使用函数ReprojectImageTo3D.在立体校正函数中找到 Q 如何获得旋转矩阵之间第 1 和第 2 相机的坐标系?我有单独的旋转矩阵和平移向量,但是如何在相机之间"获得它?.另外这会给我3D点.有没有一种方法可以生成表面法线?
So I have a depth map and the extrinsics and intrinsics of the camera.I want to get back the 3D points and the surface normals .I am using the functionReprojectImageTo3D.In the stereo rectify function to find Q how do I get the The rotation matrix betweenthe 1st and the 2nd cameras’ coordinate systems? I have individual rotation matrix and translation vector but how do I get it for "between the cameras?".Also this would give me the 3D points .Is there a method to generate the surface normals?
推荐答案
既然你有两个摄像头的外在矩阵,你不能简单地把摄像头1的逆外在矩阵乘以摄像头2的外在矩阵?此外,对于两台相机之间的直接关系,请查看基本矩阵(或更具体地说,基本矩阵).看看你能不能找到 Hartley 和 Zisserman 所著的《Multiple View Geometry》一书.
Given that you have the extrinsic matrix of both cameras, can't you simply take the inverse extrinsic matrix of camera 1, multiplied by the extrinsic matrix of camera 2?Also, for a direct relation between the two cameras, take a look at the Fundamental Matrix (or, more specific, the Essential matrix). See if you can find a copy of the book Multiple View Geometry by Hartley and Zisserman.
至于表面法线,您可以通过计算三角形角上的叉积来自己计算.但是,您首先需要重建的 3D 点云.
As for the surface normals, you can compute those yourself by computing crossproducts on the corners of triangles. However, you then first need the reconstructed 3D point cloud.
这篇关于为“立体校正"寻找两个相机之间的旋转矩阵的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!