added yuv422_yuy2

This commit is contained in:
dmalad 2024-04-27 15:10:33 +02:00
parent cfa57e8298
commit 810a56c215
3 changed files with 4 additions and 3 deletions

View File

@ -2,11 +2,11 @@
ros__parameters: ros__parameters:
# If camera serves as a source # If camera serves as a source
camera: True camera: False
source: "v4l2src device=/dev/video0" source: "v4l2src device=/dev/video0"
# If the source is a ros2 topic # If the source is a ros2 topic
topic: "/color/image_raw" topic: "/image_raw"
# General setup # General setup
mountpoint: "/back" mountpoint: "/back"

View File

@ -98,7 +98,7 @@ namespace sensor_msgs
// Miscellaneous // Miscellaneous
// This is the UYVY version of YUV422 codec http://www.fourcc.org/yuv.php#UYVY // This is the UYVY version of YUV422 codec http://www.fourcc.org/yuv.php#UYVY
// with an 8-bit depth // with an 8-bit depth
const std::string YUV422="yuv422"; const std::string YUV422="yuv422_yuy2";
// Prefixes for abstract image encodings // Prefixes for abstract image encodings
const std::string ABSTRACT_ENCODING_PREFIXES[] = { const std::string ABSTRACT_ENCODING_PREFIXES[] = {

View File

@ -114,6 +114,7 @@ GstCaps *Image2rtsp::gst_caps_new_from_image(const sensor_msgs::msg::Image::Shar
{sensor_msgs::image_encodings::BGRA16, "BGRA16"}, {sensor_msgs::image_encodings::BGRA16, "BGRA16"},
{sensor_msgs::image_encodings::MONO8, "GRAY8"}, {sensor_msgs::image_encodings::MONO8, "GRAY8"},
{sensor_msgs::image_encodings::MONO16, "GRAY16_LE"}, {sensor_msgs::image_encodings::MONO16, "GRAY16_LE"},
{sensor_msgs::image_encodings::YUV422, "YUY2"},
}; };
if (msg->is_bigendian){ if (msg->is_bigendian){