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

Allows cameras to publish images in RGB24 format #3

Open
wants to merge 4 commits into
base: hydro-devel
Choose a base branch
from

Conversation

aaost
Copy link

@aaost aaost commented Oct 29, 2013

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 Reviewable

}
else
{
ROS_WARN("rgb24 format is not supported by your camera");
Copy link

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.

@aaost
Copy link
Author

aaost commented Oct 29, 2013

Thanks, Tully, fixed the overlooked debug statements.

@ahendrix ahendrix self-assigned this Feb 27, 2014
@ahendrix
Copy link
Contributor

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")
Copy link
Contributor

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.

@trainman419
Copy link
Contributor

Bump. This looks reasonable, but needs a little clean up.

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

Successfully merging this pull request may close these issues.

4 participants