Ask Your Question
1

stereo calibration translation vector

asked 2013-10-11 11:49:30 -0500

sam.petrocelli gravatar image

When using the stereoCalibrate function, I a putting the left images in for camera one and the right images in for camera two (standing behind the cameras). I would assume the translation vector would be in the positive x direction (ie. to the right), but it is not. The magnitude of the vector is correct, it's just going in the "wrong" direction. I was just curious why it's coming back negative. Thanks.

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
2

answered 2014-01-16 04:11:02 -0500

jensenb gravatar image

This is a consequence of choice of coordinate system mapping directions. By convention OpenCV sets the left cameras as the world coordinate origin (0, 0, 0) with identity orientation, and the translation t is defined as

image description

where C is the camera center in world coordinates. Basically this definition gives you the vector that maps points from the left camera coordinate system into the right camera coordinate system, i.e. points in the left camera system are translated by a negative x value when mapped into the right coordinate system, when there is purely x translational motion between the two cameras.

edit flag offensive delete link more
-1

answered 2014-11-06 12:33:48 -0500

dave89 gravatar image

I'm sorry, I know this is a old post but I have a dubpt about it.

jensenb wrote "Basically this definition gives you the vector that maps points from the left camera coordinate system into the right camera coordinate system"

It should be the opposite. If I have two points Pleft and Pright, in 3D coordinate system; Pleft - Pright = vector from Pright to Pleft. (section "subtraction" in this link http://docs.unity3d.com/Manual/UnderstandingVectorArithmetic.html) If that i wrote above is right, T vector should be the vector that maps the points in right camera to left camera.

Am I wrong?

edit flag offensive delete link more

Comments

No my definition is correct. This of it this way: image a stereo camera setup where the left camera center is at the origin (0, 0) and the right camera is translated purely in positive x-direction to (5, 0) relative to the world frame. Now image a a point at the origin in the world frame. Since the left camera also is it the origin, the point is also at (0, 0) relative to the left camera. Now that same point relative to the second right will be at the coordinates (-5, 0) since it is to the "left", or more mathematically negative, of right camera's origin. Thus to maps points from the left camera frame to the right camera we move their relative coordinates to the "left", by adding the difference between their origins in the world frame (c_left - c_right).

jensenb gravatar imagejensenb ( 2014-11-11 07:25:23 -0500 )edit
Login/Signup to Answer

Question Tools

Stats

Asked: 2013-10-11 11:49:30 -0500

Seen: 1,231 times

Last updated: Nov 06 '14