We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using the image_view / image_view::ImageViewNode with image encoding yuv422_yuy2 causes exception:
image_view
image_view::ImageViewNode
yuv422_yuy2
terminate called after throwing an instance of 'cv::Exception' what(): OpenCV(4.6.0) ./modules/imgproc/src/color.simd_helpers.hpp:92: error: (-2:Unspecified error) in function 'cv::impl::{anonymous}::CvtHelper<VScn, VDcn, VDepth, sizePolicy>::CvtHelper(cv::InputArray, cv::OutputArray, int) [with VScn = cv::impl::{anonymous}::Set<3, 4>; VDcn = cv::impl::{anonymous}::Set<3, 4>; VDepth = cv::impl::{anonymous}::Set<0, 2, 5>; cv::impl::{anonymous}::SizePolicy sizePolicy = cv::impl::<unnamed>::NONE; cv::InputArray = const cv::_InputArray&; cv::OutputArray = const cv::_OutputArray&]' > Invalid number of channels in input image: > 'VScn::contains(scn)' > where > 'scn' is 2
This is probably easiest reproducible with the camera_ros node:
camera_ros
# start camera with YUYV ros2 run camera_ros camera_node --ros-args -p format:=YUYV # start image view node ros2 run image_view image_view --ros-args -r /image:=/camera/image_raw
The exception is thrown by cv::imshow.
cv::imshow
The text was updated successfully, but these errors were encountered:
Hi @christianrauch, I have test the step on my laptop(ubuntu22.04, ros2 humble), seems it is working, cannot reproduce the issue you description
Sorry, something went wrong.
Is this issue based on specific Platform or ROS version
I tested this on Ubuntu 24.04 / ROS jazzy with and compiled the node from source.
I can reproduce this also with the v4l2_camera package on jazzy:
v4l2_camera
jazzy
# 'v4l2_camera' package, 'sudo apt install ros-jazzy-v4l2-camera' ros2 run v4l2_camera v4l2_camera_node --ros-args -p output_encoding:=yuv422_yuy2 ros2 run image_view image_view --ros-args -r /image:=/image_raw
No branches or pull requests
Using the
image_view
/image_view::ImageViewNode
with image encodingyuv422_yuy2
causes exception:This is probably easiest reproducible with the
camera_ros
node:The exception is thrown by
cv::imshow
.The text was updated successfully, but these errors were encountered: