Skip to content
New issue

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

Executables in image_tools #661

Closed
2 tasks
Yadunund opened this issue Apr 5, 2023 · 4 comments
Closed
2 tasks

Executables in image_tools #661

Yadunund opened this issue Apr 5, 2023 · 4 comments

Comments

@Yadunund
Copy link
Member

Yadunund commented Apr 5, 2023

Setup

  • DDS vendor: FastDDS
  • BuildType: Debian
  • Os: Ubuntu Jammy
  • Chip: Amd64

Checks

  • Check cam2image

    details

    Try

    1. # User input in terminal 1
      ros2 run image_tools cam2image
  • Check showimage

    details

    Try

    1. # User input in terminal 1
      ros2 run image_tools showimage

You can find the code used to generate this test case here

@jjd9
Copy link

jjd9 commented May 6, 2023

I would like to do this one please.

Terminal 1

ros2 run image_tools showimage --ros-args -p show_image:=true --ros-args -p window_name:="VeggieBurgers" --ros-args -p reliability:=best_effort

Terminal 2:

ros2 run image_tools cam2image --ros-args -p burger_mode:=true --ros-args -p reliability:=best_effort --ros-args -p width:=640 --ros-args -p height:=480

Image displayed in opencv GUI:
image

These executable's both appear to work properly.

One oddity (not really a bug, just something i found odd during testing with my webcam) is that that the cv::Mat adapter these executable's use doesnt preserve channel ordering. (e.g. if you have cam2image publish your webcam video and visualize it using showimage, cam2image is publishing a BGR image but showimage assumes any CV_8UC3 image it receives is RGB (since all the cv::Mat message conveys is that the image is CV_8UC3).

@clalancette
Copy link
Collaborator

One oddity (not really a bug, just something i found odd during testing with my webcam) is that that the cv::Mat adapter these executable's use doesnt preserve channel ordering. (e.g. if you have cam2image publish your webcam video and visualize it using showimage, cam2image is publishing a BGR image but showimage assumes any CV_8UC3 image it receives is RGB (since all the cv::Mat message conveys is that the image is CV_8UC3).

Hm, that does sound like a bit of a bug. Could you please open up an issue at https://github.com/ros2/demos describing this issue? We probably won't have time to fix it for Iron, but it is something we should track.

@jjd9
Copy link

jjd9 commented May 6, 2023

One oddity (not really a bug, just something i found odd during testing with my webcam) is that that the cv::Mat adapter these executable's use doesnt preserve channel ordering. (e.g. if you have cam2image publish your webcam video and visualize it using showimage, cam2image is publishing a BGR image but showimage assumes any CV_8UC3 image it receives is RGB (since all the cv::Mat message conveys is that the image is CV_8UC3).

Hm, that does sound like a bit of a bug. Could you please open up an issue at https://github.com/ros2/demos describing this issue? We probably won't have time to fix it for Iron, but it is something we should track.

Sure! Issue posted: ros2/demos#612

@clalancette
Copy link
Collaborator

Sure! Issue posted: ros2/demos#612

Thank you, it is much appreciated.

Given that, I'm going to close this out. Thank you for testing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants