2 #include <cv_bridge/cv_bridge.h> 3 #include <opencv2/imgproc/imgproc.hpp> 10 cv::Mat img_rsz = cv_bridge::toCvShare(msg->image, tracked_object_tmp)->image;
13 cv::resize(img_rsz, img_restored, cv::Size(msg->original_width, msg->original_height));
16 cv_bridge::CvImage cv_img(msg->image.header, msg->image.encoding, img_restored);
17 user_cb(cv_img.toImageMsg());
boost::function< void(const sensor_msgs::ImageConstPtr &)> Callback
virtual void internalCallback(const typename image_transport_tutorial::ResizedImage::ConstPtr &message, const Callback &user_cb)
Process a message. Must be implemented by the subclass.