Queuing ROS images / creating a frame-grabber for ViSP [closed]
I'm currently subscribing to a stream of ROS images and using the subscriber callback function to do image processing. I'm also using cv_bridge to convert the images to cv::Mat. The goal is to use the processed images as an input to a ViSP line tracker in order to do visual servoing.
How can I i) shift the image processing out of the subscriber callback and into a separate function, and ii) store the image sequence as a queue.
I've read a related which talks about using a boost shared pointer but the solution provided seems incomplete.
Please note that the visp_tracker package does something different to what I'm trying to do. I'm trying to implement the visp-servo-4lines.cpp example using images from a ROS topic rather than an openCV / ViSP frame-grabber:
Any help would be greatly appreciated,
James
P.s. I would post links but I don't have enough 'karma'