Stereo vision - Tilted camera and triangulation landmark

I m using a stereo system and so i m trying to get world coordinates of some points by a triangulation.

My cameras present an angle, the Z axis direction (direction of the depth) is not normal to my surface. That s why when i observe flat surface, i get no constant depth but a "linear" variation" isnt it correct? And i want the depth from the baseline direction. So i have to rotate my points?

edit retag close merge delete

Sort by ยป oldest newest most voted

Yes, it is correct. To be able to get constant depth, you may make your cameras parallel which is not good for depth precision. Another way is to fit a plane to the points you get from triangulation and align this plane to xy plane so that the normal is towards to z direction.

more

I could use rvecs1 from my left camera calibration?

( 2016-03-16 12:55:29 -0500 )edit

I just realized that, you're calibrating your cameras separately by using cv::calibrateCamera() function, aren't you?

( 2016-03-18 10:01:59 -0500 )edit

Yep i could use rvecs and tvecs?

( 2016-03-18 10:09:05 -0500 )edit

If you're using stereo system, just use cv::stereoCalibrate() to find rotation matrix and translation vector between cameras, which will be used in triangulation.cv::cameraCalibrate() gives you the relationship between the camera and outside world, not the relationship between two cameras

( 2016-03-18 10:15:03 -0500 )edit

I used the product of R2 and R1.T of each cameraCalibrate for the minimum reprojection error to get the rotation matrix and then :

P1 = np.dot(C1,np.hstack((np.identity(3),np.zeros((3,1)))))

P2 =np.dot(C2,np.hstack(((R_0),T_0)))

for i in range(Coord1.shape[0]) z = cv2.triangulatePoints(P1, P2, Coord1[i,],Coord2[i,]) Is it not correct?

( 2016-03-18 10:36:02 -0500 )edit

not sure. if correct, you can use rvecs1 from left camera I guess

( 2016-03-18 11:07:37 -0500 )edit