How to convert cv::Mat to sensor_msgs::Image::Ptr?
I was wondering about how to publish cv:Mat. The tutorial wiki http://www.ros.org/wiki/cv_bridge/Tut... didn't give me an answer and following code seems working, but I suppose there are a way to do this without using old CvBridge interface.
IplImage out_msg = sal_float_image;
sensor_msgs::CvBridge bridge_;
sensor_msgs::Image::Ptr saliency_msg = bridge_.cvToImgMsg(&out_msg, "passthrough");
saliency_img_pub.publish(saliency_msg);