Bug report
Required Info:
- Operating System:
- Installation type:
- Debian apt install (binaries?)
- Version or commit hash:
- ros-iron-image-tools/jammy,now 0.27.0-2jammy.20230429.031022 amd64
- DDS implementation:
- tested with Fast-RTPS and RTI Connext
- Client library (if applicable):
Steps to reproduce issue
Open two terminals and source the ros2 space in each (i.e. source /opt/ros/iron/setup.bash)
In terminal 1, run the cam2image executable
ros2 run image_tools cam2image --ros-args -p show_camera:=true
In terminal 2, run the showimage executable
ros2 run image_tools showimage
Expected behavior
The image being published and displayed by cam2image matches the image displayed by showimage.
Actual behavior
cam2image reads a BGR image from the camera, publishes it as a CV_U8C3, cv::Mat image, which does not preserve the channel ordering information.
showimage receives the image and assumes that since it is a CV_U8C3, cv::Mat, it should convert it from RGB to BGR. But since that is not true, the result is an image whose channel ordering is flipped.
Here is the output I am getting (Left image: cam2image visual, Right image: showimage visual)

Thank you for your time! (-:
Bug report
Required Info:
Steps to reproduce issue
Open two terminals and source the ros2 space in each (i.e.
source /opt/ros/iron/setup.bash)In terminal 1, run the cam2image executable
In terminal 2, run the showimage executable
Expected behavior
The image being published and displayed by cam2image matches the image displayed by showimage.
Actual behavior
cam2image reads a BGR image from the camera, publishes it as a CV_U8C3, cv::Mat image, which does not preserve the channel ordering information.
showimage receives the image and assumes that since it is a CV_U8C3, cv::Mat, it should convert it from RGB to BGR. But since that is not true, the result is an image whose channel ordering is flipped.
Here is the output I am getting (Left image: cam2image visual, Right image: showimage visual)
Thank you for your time! (-: