自定义消息Image赋值、CompressedImage赋值
作者:互联网
自定义消息中的有Image 、compressedImage类型怎么赋值
sensor_msgs::ImagePtr msg = cv_bridge::CvImage(std_msgs::Header(),"bgr8",out_mat).toImageMsg();
raw_image_data.raw_image=*msg;
sensor_msgs::CompressedImagePtr img_bridge = cv_bridge::CvImage(std_msgs::Header(),"bgr8",out_mat).toCompressedImageMsg();
raw_image_data.compressedImage =*img_bridge;
标签:bridge,自定义,msgs,image,raw,CompressedImage,赋值 来源: https://www.cnblogs.com/hiccuplh/p/16450537.html