3 #include <opencv2/highgui/highgui.hpp> 4 #include <cv_bridge/cv_bridge.h> 6 int main(
int argc,
char** argv)
13 cv::Mat image = cv::imread(argv[1], CV_LOAD_IMAGE_COLOR);
14 sensor_msgs::ImagePtr msg = cv_bridge::CvImage(std_msgs::Header(),
"bgr8", image).toImageMsg();
Manages advertisements of multiple transport options on an Image topic.
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
Publisher advertise(const std::string &base_topic, uint32_t queue_size, bool latch=false)
Advertise an image topic, simple version.
int main(int argc, char **argv)
void publish(const sensor_msgs::Image &message) const
Publish an image on the topics associated with this Publisher.
Advertise and subscribe to image topics.
ROSCPP_DECL void spinOnce()