Update from comments by @malharjajoo:
Camera info parameters are described and illustrated at that link.
You can see some illustrations at stereo_image_proc that show left and right are with respect to the cameras, not to any external reference frame such as an observer.
From OpenCV the projection matrices are P1 and P2 as described in cv::stereoRectify(),
P = [K | [Tx 0 0]'
.
Originally posted by Thomas D with karma: 4347 on 2018-02-26
This answer was ACCEPTED on the original site
Post score: 2
Original comments
Comment by malharjajoo on 2018-02-26:
Hi, thanks a lot for answering... I'd like to point out, from the same openCV docs, the cv::stereoRectify() function mentions that P2 (for right camera) 4th coloumn contains by Tx * f (not Tx).
Comment by malharjajoo on 2018-02-26:
regardless of the scaled value, this Translation is negative. How is that correct ? shouldnt the right camera be positively translated since openCVs coordinate system has postive x-axis to the right.
Comment by malharjajoo on 2018-02-26:
I think rectification matrix given as output on camera calibration is the R1 and R2 from OpenCV docs. Hence rotation is not part of P1 and P2 ( P is not R | t
, but instead K | [ Tx 0 0 ]'
as indicated in cv:stereoRectify().
Comment by Thomas D on 2018-02-26:
P1 and P2 do seem to be described in cv::stereoRectify. Since the right camera has the x-axis pointing to the right you have to translate along the negative x axis to get to the left camera
Comment by malharjajoo on 2018-02-27:
ok yeah, that makes sense. For some reason I was assuming the transform provided were from left to right coordinate system.
Comment by malharjajoo on 2018-02-28:
Hi, I have found a reference in the ROS wiki :D ! - See last para
Comment by malharjajoo on 2018-02-28:
Also, @Thomas D, thanks for your help. Although a bit unrelated, I have been able to obtain a point cloud image using the stereo_image_proc using 2 cheap webcams. The point cloud gets very bad if the cameras are interchanged and hence this post helped me in that way too :D. cheers!