OpenCV Q&A Forum - RSS feedhttp://answers.opencv.org/questions/OpenCV answersenCopyright <a href="http://www.opencv.org">OpenCV foundation</a>, 2012-2018.Thu, 06 Nov 2014 12:33:48 -0600stereo calibration translation vectorhttp://answers.opencv.org/question/22307/stereo-calibration-translation-vector/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.Fri, 11 Oct 2013 11:49:30 -0500http://answers.opencv.org/question/22307/stereo-calibration-translation-vector/Answer by jensenb for <p>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.</p>
http://answers.opencv.org/question/22307/stereo-calibration-translation-vector/?answer=26572#post-id-26572This 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](/upfiles/13898667114007508.png)
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.Thu, 16 Jan 2014 04:11:02 -0600http://answers.opencv.org/question/22307/stereo-calibration-translation-vector/?answer=26572#post-id-26572Answer by dave89 for <p>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.</p>
http://answers.opencv.org/question/22307/stereo-calibration-translation-vector/?answer=46635#post-id-46635I'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?Thu, 06 Nov 2014 12:33:35 -0600http://answers.opencv.org/question/22307/stereo-calibration-translation-vector/?answer=46635#post-id-46635Answer by dave89 for <p>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.</p>
http://answers.opencv.org/question/22307/stereo-calibration-translation-vector/?answer=46636#post-id-46636I'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?Thu, 06 Nov 2014 12:33:48 -0600http://answers.opencv.org/question/22307/stereo-calibration-translation-vector/?answer=46636#post-id-46636