Function ros_image_to_qimage::Convert
Defined in File ros_image_to_qimage.hpp
Function Documentation
-
QImage ros_image_to_qimage::Convert(const sensor_msgs::msg::Image &msg, const cv_bridge::CvtColorForDisplayOptions &options = cv_bridge::CvtColorForDisplayOptions())
Converts a ROS image message to a QImage.
Converts ROS image messages of different encodings to QImage. This function calls cv_bridge::toCvCopy to convert the image to a cv image first. If the cv image is not of type rgb8, it converts the image to an rgb format using cv_bridge::CvtColorForDisplay with
options
. The cv image is then converted to a QImage.- Parameters:
msg – The ROS image message to convert.
options – The options to use when converting a single-channeled image (eg. depth images)
- Returns:
QImage The QImage representation of the ROS image message.