image_viewer

class ImageViewer : public rclcpp::Node
#include <image_viewer.hpp>

An ImageViewer class object. The ImageViewer class object inherits from the rclcpp::Node object to provide a localized way of viewing the output inference visualization results.

Public Functions

ImageViewer()

A Constructor function.

Private Functions

int encoding2mat_type(const std::string &encoding) const

A Mutator function that sets the appropriate image encodings for displaying input images.

void image_callback(const sensor_msgs::msg::Image::SharedPtr msg) const

A ROS2 callback function utilized by sub_1.

Private Members

rclcpp::Subscription<sensor_msgs::msg::Image>::SharedPtr sub_1_

A subscriber member variable to receive images to receive.

rclcpp::Subscription<std_msgs::msg::String>::SharedPtr sub_2_

A subscriber member variable to receive remote calls to shutdown.