-
Notifications
You must be signed in to change notification settings - Fork 21
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
Allows cameras to publish images in RGB24 format #3
base: hydro-devel
Are you sure you want to change the base?
Conversation
} | ||
else | ||
{ | ||
ROS_WARN("rgb24 format is not supported by your camera"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not be hard coded to error about rgb24.
Thanks, Tully, fixed the overlooked debug statements. |
I'll take a look at this. Also be aware that there is a debayer node that is part of image_proc that can do this conversion as part of your image processing pipeline. I think it's also available as a nodelet. |
@@ -38,5 +38,6 @@ gen.add("exposure_auto_max", double_t, SensorLevels.RECONFIGURE_RUNNING, "The | |||
gen.add("exposure_auto_target", int_t, SensorLevels.RECONFIGURE_RUNNING, "The auto exposure target mean value as a percentage, from 0=black to 100=white.", 50, 0, 100) | |||
gen.add("gain_auto_max", int_t, SensorLevels.RECONFIGURE_RUNNING, "The max gain level in auto gain mode, in dB.", 24, 0, 24) | |||
gen.add("gain_auto_target", int_t, SensorLevels.RECONFIGURE_RUNNING, "The auto gain target mean value as a percentage, from 0=black to 100=white.", 50, 0, 100) | |||
gen.add("pixel_format", str_t, SensorLevels.RECONFIGURE_RUNNING, "The pixel format - default is Bayer8. Currently, the only other supported format is 24-bit rgb: use 'Rgb24'", "Bayer8") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably be an enumeration rather than a raw string. Take a look at how the enum for the streaming mode is implemented.
Bump. This looks reasonable, but needs a little clean up. |
AVT/Prosilica cameras publish images in Bayer8 by default, but this doesn't work for my code. Fortunately, it's easy to put them in RGB24 format if the cameras support it. This code check for the pixel_format parameter and sets the camera pixel format appropriately (Bayer8 or Rgb24 only). Works with Mako and Manta cameras. Feel like this should be a part of the main driver.
This change is