Opencv 3D from points in stereo pair

时间秒杀一切 提交于 2020-01-01 03:40:07

问题


Is there a simple function in OpenCV to get the 3D position and pose of an object from a stereo camera pair?

I have the cameras and baseline calibrated with the chess board. I now want to take a known object like the same chessboard, with known 3D points in it's own coordinates and find the real world position (in the camera coordinates).

There are functions to do this for a single camera (POSIT) and functions to find the 3D disparity image for the entire scene.

It must be simple to do almost the same process as for the camera calibration and find the chessboard in the camera pair - but I can't find any function that takes object + image coords and returns camera coords for a stereo pair.

Thank you


回答1:


After calibrating your stereo camera system, you have got the relative pose (=translation+orientation) between the two cameras. Using solvePnP/solvePnPRansac if you find the relative pose between one of the cameras and the object and then consequently you have got the relative pose between the object and the other camera as well. For example, in stereo systems used for robot navigation usually reconstructed 3D points from previous frames are matched against only one of the cameras and then the relative camera pose from the 3d points is estimated. The stereo system just eases and improves the quality of triangulation/structure reconstruction.



来源:https://stackoverflow.com/questions/12008548/opencv-3d-from-points-in-stereo-pair

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!