[ros-users] Save ROIs inside bag files

J H dahoc3150 at yahoo.com
Wed Oct 5 16:10:06 UTC 2011


Hi,
I would like to save ROIs (cv::Rect) and masks (cv::Mat) inside a bag file along with images (cv::Mat).
I put the 4 rect values (x,y,width,height) inside a cv::Mat and store them and the masks and the images each with a separate topic and the same corresponding time stamp as the image inside the bag file.

Now it may occur that I have multiple ROIs and masks for one image, in which case I need to save several cv::Mat with the same time stamp into the bag file and I don't think that even works.
What would be an elegant approach to cleanly resolve this? I currently add one nsec for each additional mask and ROI to the timestamp of the image, but that clearly is a bad solution.

Any help appreciated,

best regards,
Jan Hendriks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osuosl.org/pipermail/ros-users/attachments/20111005/e183ae14/attachment-0003.html>


More information about the ros-users mailing list