从多个 2D 点重建 3D 点?
OpenCV 包含对立体相机 3D 重建的大量支持。就我而言,我有六个校准相机(内部和外部),并且我想获取常见的 2D 点(例如测试球体的)并获得相应的 3D 位置。关于如何做到这一点有什么想法吗?
我有什么:
1)多相机标定参数
2)测试球体的2D位置(在每个图像平面中)
我想要得到的:
1) 测试球体对应的3D点
OpenCV contains a lot of support for 3D reconstruction from stereo cameras. In my case, I have six calibrated cameras (intrinsic and extrinsic), and I'd like to take common 2D points (say, of a test sphere) and get the corresponding 3D position. Any thoughts on how to do this?
What I have:
1) Calibration parameters for multiple cameras
2) 2D position of test sphere (in each image plane)
What I want to get:
1) Corresponding 3D point of test sphere
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您的校准参数将为您提供每个相机的每个 2D 点的射线。如果您已经确定了哪些光线对应于您的测试球体,则需要进行最小二乘拟合为你的目标点。 (虽然该链接使用最小二乘法进行线性回归,但您可以使用相同的方法来查找 3D 点,从而最小化所有 2D 点的平方误差之和。)
Your calibration parameters will give you a ray for each 2D point for each camera. If you have already identified which rays correspond to your test sphere, you want to do a least squares fit for your target point. (Although the link is using least squares for linear regression, you can use the same methods to find the 3D point minimizing the sum of the squared errors of all 2D points.)
你知道摄像机之间的位置关系吗?
然后,每个图像都会根据相机矩阵和极线模型为您提供水平和垂直角度。这为每个摄像机提供了一条进入空间的直线 - 只需求解所有这些相交的点即可。
Do you know the position relationships between the cameras?
Then each image gives you horizontal and vertical angle - from the camera matrix and epipolar model. This gives you one straight line into space for each camera - simply solve for the point where all these intersect.