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

cv_bridge accuracy?

asked 2012-08-30 12:59:18 -0500

ha gravatar image

ROS passes around images in its own sensor_msgs/image message format. But it is 8bit data. So I wiil want to use images in conhunction with OpenCV. CvBridge is a ROS library that provides an interface between ROS and OpenCV. Maybe Using cv_bridge is 32bit data. Dose from 8bit to 32bit make loss accuracy?

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
4

answered 2012-09-02 07:02:46 -0500

Mac gravatar image

updated 2012-09-04 04:46:42 -0500

ROS Image messages are not necessarily 8-bit data; the Image message supports a variety of encodings. (Note that the message uses an array of 8-bit values to store a binary blob; that doesn't mean it's 8-bit data.)

Unless you specifically tell it not to, cv_bridge will respect the type of the Image message it's operating on, and the resulting cv::Mat will match.

See the documentation on image_transport and cv_bridge for more.

edit flag offensive delete link more
1

answered 2012-09-02 17:45:40 -0500

Kevin gravatar image

Take a look here at the cv_bridge tutorials and there are examples of what @Mac said.

edit flag offensive delete link more
-1

answered 2012-09-03 03:15:54 -0500

ha gravatar image

I appreciate it. I read answers and look here(http://www.ros.org/wiki/cv_bridge/Tutorials/UsingCvBridgeToConvertBetweenROSImagesAndOpenCVImages)

There is "ROS passes around images in its own sensor_msgs/Image message format."

But "sensor_msgs/Image message format" has uint8[] data.(http://ros.org/doc/api/sensor_msgs/html/msg/Image.html)

Is it wrong? I know depth data is 11bit data. I think "sensor_msgs/Image" is encoded and it loss some information.

It convert ROS image to OpenCV image.

Loss image converted also has loss information. Is it right?

So I want to get 11bit raw datas. What can I do?

edit flag offensive delete link more

Comments

2

please don't post updates as answers ... just edit your original question.

Kevin gravatar image Kevin  ( 2012-09-03 06:53:43 -0500 )edit

Question Tools

Stats

Asked: 2012-08-30 12:59:18 -0500

Seen: 586 times

Last updated: Sep 04 '12