ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

sensor_msg_image.h

asked 2011-07-21 07:44:13 -0600

ros_beginner gravatar image

updated 2011-09-03 15:31:18 -0600

kwc gravatar image

Hello,

I'm trying to get image information from Image message and make a image data.

I found that there is some guideline to do this by using open cv.

However, I want to create image class defined by myself, which takes image data like matrix format.

I found that message has uint8_t data. how should I convert to image data to double??

Am I understanding image.h header file correctly?

If not, can you give me some comments?

Thanks

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2011-07-21 07:50:25 -0600

makokal gravatar image

This is a very openCV kinda question, I suggest you look at the very well written documentation given in the wiki http://opencv.willowgarage.com/documentation/cpp/index.html. Pay special attention to the Mat data structure.

edit flag offensive delete link more

Comments

Okay, so what I am thinking is. convert imageMessage into Iplimage format. Then, I want to convert this Iplimage into Mat format. Then, I want to copy this Mat data using memcpy so that I can construct image. Then, I know width and height, but I don't know what is the type of the data Mat data. How should I know the type of Mat data. is it just uint8_t?
ros_beginner gravatar image ros_beginner  ( 2011-07-21 08:31:32 -0600 )edit
0

answered 2011-07-21 08:33:15 -0600

fergs gravatar image

You may be interested in taking a look at cv_bridge which converts ROS images into OpenCV images.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2011-07-21 07:44:13 -0600

Seen: 385 times

Last updated: Jul 21 '11