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

ROS stereo disparity issues

asked 2015-05-30 15:06:29 -0600

Fullmetal99012 gravatar image

updated 2015-05-30 20:55:57 -0600

Im having issues getting a stereo disparity image to work with the PS4EYE

this is what I am getting from the camera. the left and right cameras seem to be working, but disparity is way off. Even when I point it at a person. how do I fix this? I'm using the PS4EYE node from longjie.

Screenshot from 2015-05-29 23_15_01.png

EDIT: Looks like its in the parameters, but I have no idea what values I should change to make it look right.

edit retag flag offensive close merge delete

Comments

Did you calibrate the cameras using stereo_calibration? Also, what parameters are you using? A min_disparity (lower values allow you to see further) of 0 and disparity range of 64 seem to work for me. Also mess with texture threshold to remove noise. 500 worked well for me on that param.

frankb gravatar image frankb  ( 2015-05-31 01:53:36 -0600 )edit

looks like I forgot to calibrate. Will do that when I get back to the lab

Fullmetal99012 gravatar image Fullmetal99012  ( 2015-06-01 16:31:20 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-06-01 00:44:22 -0600

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/calib3... 3. plot sIFT : http://www.mathworks.com/matlabcentra...

Tell me in case of any doubt.

Hope I helped Sudeep

edit flag offensive delete link more

Comments

ah. yeah I completely forgot to calibrate it.

When I get the calibration values, and convert them to the .yaml, where do I pass in the parameters? since this is a stereo camera, are they passed into stereo_image_proc?

Fullmetal99012 gravatar image Fullmetal99012  ( 2015-06-01 16:30:50 -0600 )edit

Hi, Publish them under your namespace as /(your_nameSpace)/left/camera_info and (namespace)/right/camera_info as camera_info msgs link

Sudeep gravatar image Sudeep  ( 2015-06-03 04:21:55 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2015-05-30 15:06:29 -0600

Seen: 1,047 times

Last updated: Jun 01 '15