asked May 01 '11
This post is a wiki. Anyone with karma >750 is welcome to improve it.
I'm just doing this wrong somehow.
I've got a Sensor_msgs/Image already. I want to put it into my message which has "Sensor_msgs/Image image" in it's definition.
Can I just do this:
msg.image = *imgPtr; Or do I need to do some form of deep copy? The data types are a bit too complicated for me to figure out what's going on.
Later, in a service, I want to extract that image and convert it to a IplImage* for use with OpenCV. i'm trying this:
cv_img = cv_bridge::toCvCopy(image, enc::BGR8);
IplImage img;
img = cv_img->image;
And it seems to be working alright now, but it's hard to tell since i think that first bit is not working. answered May 01 '11
This post is a wiki. Anyone with karma >750 is welcome to improve it.
I suggest you take a look at the cv_bridge tutorials
Asked: May 01 '11
Seen: 142 times
Last updated: May 02 '11
ROS Answers is licensed under Creative Commons Attribution 3.0 Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.