Go to the documentation of this file.
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::IMREAD_COLOR);
14 sensor_msgs::ImagePtr msg = cv_bridge::CvImage(std_msgs::Header(),
"bgr8", image).toImageMsg();
int main(int argc, char **argv)
Advertise and subscribe to image topics.
Manages advertisements of multiple transport options on an Image topic.
ROSCPP_DECL void init(const M_string &remappings, const std::string &name, uint32_t options=0)
ROSCPP_DECL void spinOnce()
Publisher advertise(const std::string &base_topic, uint32_t queue_size, bool latch=false)
Advertise an image topic, simple version.
void publish(const sensor_msgs::Image &message) const
Publish an image on the topics associated with this Publisher.
image_transport
Author(s): Patrick Mihelich
autogenerated on Sat Jan 20 2024 03:14:50