-
Notifications
You must be signed in to change notification settings - Fork 732
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
image_view_node
: support bayer images
#1046
base: rolling
Are you sure you want to change the base?
image_view_node
: support bayer images
#1046
Conversation
so far bayer images always failed with an error: ``` [ERROR] [..] [image_view_node]: Unable to convert 'bayer_rggb8' image for display: 'cv_bridge.cvtColorForDisplay() does not have an output encoding that is color or mono, and has is bit in depth' ``` the `stereo_view_node` on the other hand already supports bayer images, however it always forcibly converts them to monochrome, even if they are colour images. for now, this adds the same logic for the single-image viewer and thus only partially resolves ros-perception#1045.
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.
Seems reasonable given what we do in stereo node
i just realised that i was a bit tired when i thought yesterday that it's better to go with mono for now and then figure out colour later on... bayer is of course always colour, so i guess it'd be fine to just always use |
I'm pretty sure this won't show the expected colors you want. I think the trick here is that by casting to 'mono8' we treat the 4 pixels (2 green, 1 red, 1 blue) as a black and white image that is basically 2x the resolution of the actual image and so it looks roughly correct. If you do test out 'bgr' and it looks OK - please post some screen shots here of the 'mono' and 'bgr' for review (I don't have any bayer cameras around to test with). |
ok, i'll do that either tonight or in the coming days. it did look ok when i tried it (though the colours were off, but that's because i'd need to set white balance & co. in the camera for it to look correct) |
i've posted it on the issue: #1045 (comment) |
so far bayer images always failed with an error:
the
stereo_view_node
on the other hand already supports bayer images, however it always forcibly converts them to monochrome, even if they are colour images.for now, this adds the same logic for the single-image viewer and thus only partially resolves #1045.