0
$\begingroup$

Rosanswers logo

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.


Originally posted by ewillcox on ROS Answers with karma: 3 on 2015-11-22

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by Miquel Massot with karma: 1471 on 2015-11-23

This answer was ACCEPTED on the original site

Post score: 3


Original comments

Comment by ewillcox on 2015-11-23:
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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.