一、ROS官网Converting between ROS images and OpenCV images (C++)
二、使用cv_bridge遇到的问题
1、头文件
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <image_transport/image_transport.h>
#include <cv_bridge/cv_bridge.h>
#include <sensor_msgs/image_encodings.h>
2、节点CMakeLists文件
find_package(catkin REQUIRED COMPONENTS