How to subscribe & synchronize to two images topics
Hi all !
Now with my own camera driver (thanks to all of you) I'm able to run stereoimageproc and obtain disparity and corrected images.
Now I'm facing a little problem that I'm sure was already solved.
I would like , with the stereo rectified images, to make a stereo matching in OpenCV.
How can I created a node that subscribe to 2 image topics at the same time with the same callback method that will convert the message_image to an OpenCV image with CVbridge.
I know how to convert images and do all the stuff with it thanks to this tutorial http://www.ros.org/wiki/cv_bridge/Tutorials/UsingCvBridgeToConvertBetweenROSImagesAndOpenCVImages
But I don't know how to do it with two images topics to subscribe to :)!
I did a little search within the stereoimageproc node (with the disparity.cpp )how they manage to do that (with the camerainfo too) but the on-demand option do not suit me at all. However, since my camera are not very well synchronized (I use approximatesync because of an arduino external trigger) I 'll also need to sync these two with the ros.time and their according time stamp ! (Or at least check if they'll be approximatly synced !
So I'm asking you is there any tutorials about it ? or do you know a way to do it simply ?
Regards
Thanks
Asked by Vincent_V on 2012-04-18 10:33:31 UTC
Answers
I think this question and it's answer are what you are looking for.
Asked by Eric Perko on 2012-04-18 10:57:58 UTC
Comments