ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

Hi,

It seems that your cameras are not calibrated properly. any stereo matching code assumes that epi-polar lines are horizontal in left and right images. which means that if you take any point in the left(u,v) image, the corresponding point should lie on the same row i.e., (u1,v). To make sure that this happen, you need to calibrate the cameras, once you calibrate them, you will get these parameters M1,M2(camera matrix) R,T,P1,P2(projection matrix) etc. From these params you will need to rectify the input images using image_proc.

If you have already done the calibration, redo it again, and make sure that your calibration and rectification is accurate. If calibration/rectification fails again then use OpenCV's calibration procedure,(It produces a bit different results than ROS).

To check the rectification, just save rectified images and run SIFT matching code on stereo pairs, plot the lines between two images and these line should come strait and perfectly horizontal. Links, 1. ROS calibration : wiki.ros.org/camera_calibration 2. Opencv calibration : http://docs.opencv.org/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.html 3. plot sIFT : http://www.mathworks.com/matlabcentral/fileexchange/30849-image-mosaic-using-sift/content/siftMatch.m

Tell me in case of any doubt.

Hope I helped Sudeep