简体   繁体   中英

How can we compute rotation and translation two stereo cameras to use in opencv StereoRectify(r,t argument)

I know that I can compute the rotation and translation about two stereo cameras using having some real 3d points and then calling solvepnp function in opencv but I don't have these 3d points. I have intrinsic parameters and extrinsic parameters for each images. Also I have some 2d points in left image and their corresponding points in right image. If I have the rotation and translation about two stereo cameras, I will be able to use stereoRectify function and then can compute 3d real coordinates of some 2d points in images. I searched a lot in different sites but didn't find a routine and straightforward way to compute 3d real coordinates(x,y,z) from 2d points in two stereo cameras.

Why don't you use triangulatePoints? You said you have extrinsic and intrinsic calibration for both image, which means, that you have their projection matrices. And thats all you need as parameters for triangulatePoints.

http://docs.opencv.org/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.html#triangulatepoints

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM