0
$\begingroup$

Rosanswers logo

Which encoding is most appropriate for using cv_bridge to convert cv::Mat_<cv::Vec3d> matrices into ros images?


Originally posted by Aditya on ROS Answers with karma: 287 on 2011-09-21

Post score: 2

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Use sensor_msgs::image_encodings::TYPE_64FC3. In the OpenCV naming scheme, this is 64-bit floating point (64F, aka double) with 3 channels (C3).

The full list of encodings is defined in sensor_msgs/image_encodings.h and viewable here. We define some named encodings (like RGB8) that specify the color semantics as well as data type and number of channels. The TYPE_* encodings support arbitrary data.


Originally posted by Patrick Mihelich with karma: 4336 on 2011-09-21

This answer was ACCEPTED on the original site

Post score: 7


Original comments

Comment by Median on 2013-03-11:
No matter what enconding type I use, I always get the same message: [ERROR] [1363015855.837613897]: cv_bridge exception: Unrecognized image encoding []. Can you please help me?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.