How to convert ROS image message to OpenCV image array(circle buffer)?
We usually use the below code to convert ROS image message to OpenCV image
cv_bridge::CvImagePtr cv_ptr; cv_ptr = cv_bridge::toCvCopy(msg, "bgr8"
I need save ROS image message to a circular buffer for time delay. But I didn't know how coding that converting ROS image message to OpenCV image array(circular buffer). Does anyone help me ?
Thanks
what do you mean by circular buffer ? let say your image is named "image" if i understand your question you need to convert an image from ros (image.png,or jpg ...) to opencv (image.mat) to use it in a buffer