Ask Your Question
0

Stereo vision - Tilted camera and triangulation landmark

asked 2016-03-16 06:47:13 -0500

Bilou563 gravatar image

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?

image description

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2016-03-16 08:50:16 -0500

Oguzhan gravatar image

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.

edit flag offensive delete link more

Comments

I could use rvecs1 from my left camera calibration?

Bilou563 gravatar imageBilou563 ( 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?

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

Yep i could use rvecs and tvecs?

Bilou563 gravatar imageBilou563 ( 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

Oguzhan gravatar imageOguzhan ( 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?

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

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

Oguzhan gravatar imageOguzhan ( 2016-03-18 11:07:37 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-03-16 06:47:13 -0500

Seen: 468 times

Last updated: Mar 16 '16