[ros-users] Save ROIs inside bag files

Forside
Vedhæftede filer:
Indlæg som e-mail
+ (text/plain)
+ (text/html)
Slet denne besked
Besvar denne besked
Skribent: J H
Dato:  
Til: ROS user discussions
Emne: [ros-users] Save ROIs inside bag files
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