Ask Your Question
0

stereo_image_proc rectified and depth image issues

asked 2015-11-22 15:30:34 -0600

ewillcox gravatar image

I'm currently using ROS Indigo with Ubuntu 14.04 and am trying to use stereo_image_proc to create an RGB point cloud using a ZED stereo camera. I am currently able to see both the left and right raw image data from the camera wrapper / driver, the source code of which you can see here where I am running it without depth information.

Once I start stereo_image_proc I then get the left and right mono and color topics out which work fine but the depth topics and rectified images do not give me anything useful. I thought it maybe had to do with my camera parameters not being published properly but this is what is being sent out by the driver and it all seems okay.

---
header: 
  seq: 3802
  stamp: 
    secs: 1448224934
    nsecs: 834037829
  frame_id: /zed_left_frame
height: 720
width: 1280
distortion_model: plumb_bob
D: [-0.1599999964237213, 0.0, 0.0, 0.0, 0.0]
K: [698.1664428710938, 0.0, 621.9573364257812, 0.0, 698.1664428710938, 360.76654052734375, 0.0, 0.0, 1.0]
R: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
P: [698.1664428710938, 0.0, 621.9573364257812, 0.0, 0.0, 698.1664428710938, 360.76654052734375, 0.0, 0.0, 0.0, 1.0, 0.0]
binning_x: 0
binning_y: 0
roi: 
  x_offset: 0
  y_offset: 0
  height: 0
  width: 0
  do_rectify: False
---

I then checked out the left rectified color image topic and get the following which does not look correct as it's just 50, 60, 55 repeating until the end of the message!

header: 
  seq: 0
  stamp: 
    secs: 1448227450
    nsecs: 451346583
  frame_id: /zed_left_frame
height: 720
width: 1280
encoding: bgr8
is_bigendian: 0
step: 3840
data: [50, 60, 55, 50, 60, 55, 50, 60, 55, <snip - sequence repeats>

I don't have enough score to upload to images to show you the output of the rectified images and the disparity map so I hosted them on imgur here. Each screen shows a solid color and isn't the rectified image as I excepted and I don't know why! If I were to cover up one of the camera lenses the respective window becomes black and if I put some color in front of it I can see that color but nothing more.

If anyone has any ideas what could be wrong any help would be greatly appreciated! I've been stuck for a couple of days now and am not too sure what to do. I am able to compute disparity data using the camera driver if that helps but I wasn't too sure on who to convert that into an XYZRGB point cloud which is why I was trying to use stereo_image_proc.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2015-11-23 04:42:55 -0600

Miquel Massot gravatar image

Hi ewillcox!

First you need to calibrate your cameras. I recommend you this tutorial. Try to get a rigid cardboard or a piece of wood to attach the calibration pattern. The stiffer the better. And check if your calibration score or reprojection error is as low as possible. Values below 0.5 pixels are desirable. After that, your camera_info distortion vector should be populated.

Then, follow this tutorial to choose good stereo parameters in stereo_image_proc.

edit flag offensive delete link more

Comments

Thank you very much that seems to have done it! I'll have to play with the parameters a good bit to get them somewhere good as there's a ton of empty space just testing it in my room. I'm hoping I can get it to be as good as the software the company provided which was giving out about 860k points.

ewillcox gravatar imageewillcox ( 2015-11-23 22:24:46 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-11-22 15:30:34 -0600

Seen: 1,106 times

Last updated: Nov 23 '15