<div><span class="Apple-style-span" style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">Hi Jan,</span></div><div><span class="Apple-style-span" style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); "><br>

</span></div><div><span class="Apple-style-span" style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">If you post this question to</span><span class="Apple-style-span" style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); "> </span><span class="Apple-style-span" style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); "><a href="http://answers.ros.org/" target="_blank" style="color: rgb(17, 85, 204); "><span class="il" style="background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(255, 255, 204); color: rgb(34, 34, 34); background-position: initial initial; background-repeat: initial initial; ">answers</span>.ros.org</a> then I'm sure someone will be able to help.</span></div>

<br>Tim<br><br><div class="gmail_quote">On Wed, Oct 5, 2011 at 9:10 AM, J H <span dir="ltr"><<a href="mailto:dahoc3150@yahoo.com">dahoc3150@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div><div style="color:#000;background-color:#fff;font-family:arial, helvetica, sans-serif;font-size:12pt"><div><font size="2" face="'lucida console', sans-serif">Hi,</font></div><div><font size="2" face="'lucida console', sans-serif">I would like to save ROIs (cv::Rect) and masks (cv::Mat) inside a bag file along with images (cv::Mat).</font></div>

<div><font size="2" face="'lucida console', sans-serif">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.</font></div>

<div><font size="2" face="'lucida console', sans-serif"><br></font></div><div><font size="2" face="'lucida console', sans-serif">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.</font></div><div><font size="2" face="'lucida console', sans-serif">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.</font></div>

<div><font size="2" face="'lucida console', sans-serif"><br></font></div><div><font size="2" face="'lucida console', sans-serif">Any help appreciated,</font></div><div><font size="2" face="'lucida console', sans-serif"><br>

</font></div><div><font size="2" face="'lucida console', sans-serif">best regards,</font></div><div><font size="2" face="'lucida console',
 sans-serif">Jan Hendriks</font></div></div></div><br>_______________________________________________<br>
ros-users mailing list<br>
<a href="mailto:ros-users@code.ros.org">ros-users@code.ros.org</a><br>
<a href="https://code.ros.org/mailman/listinfo/ros-users" target="_blank">https://code.ros.org/mailman/listinfo/ros-users</a><br>
<br></blockquote></div><br>