Is CvImagePtr invariable?
I am using toCvCopy to work with my camera data. Basically i am writing a small camera adapter which subscribes to the camera and stores the sensor_msgs::ImageConstPtr with toCVCopy. The adapter shares the CvImagePtr when the GetImagePtr() function is called. A friend of mine pointed out that using the CvImagePtr is risky because the data the pointer is pointing to could change when new camera data has been recieved, which is why I should store and share the image data differently (for example storing the whole image data myself).
Now I am wondering if this is true. What is the best way to store and share image data (performance-wise)?
Thanks a lot!
Can you clarify whether this is a ROS-related question? OpenCV may be used with ROS, but this is not an OpenCV support forum.
Well i am using it with ROS so i thought it might be better here as some other people might wonder the same (i tried googling but couldnt find anything). I see that its not really ROS specific, i´ll ask on a different forum if its against the rules.
It's not necessarily completely "against the rules", but there may be a forum where you'd get an answer sooner.