Ask Your Question

How to compute disparity on a specific region of interest only?

asked 2012-03-29 06:02:18 -0500

Thomas gravatar image

updated 2012-03-29 06:20:52 -0500

Is is possible, using stereo_image_proc, to compute disparities on a specific region of interest only?

The setup is as follow:

  1. we detect a color blob in an image
  2. we use stereo to determine its 3d position

It would greatly improve performances if we could just run the stereo on a subwindow. Is there a way to tell stereo_image_proc to do so?

We could probably just pass to stereo_image_proc a new pair of images matching the zone we want but it would be cumbersome to recompute the appropriate camera parameters and crop the images by hand...

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2012-03-30 01:02:03 -0500

Stephan gravatar image

AFAIK the parameter roi in CameraInfo.msg can be used to choose a region of interest. Try republishing a camera info with the roi set to your object region. And use that to feed stereo_image_proc. If you just need some sampled 3D points you should use StereoCameraModel::projectDisparityTo3d. This is way faster than constructing a whole disparity image.

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools


Asked: 2012-03-29 06:02:18 -0500

Seen: 345 times

Last updated: Mar 30 '12