-
Notifications
You must be signed in to change notification settings - Fork 383
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
Support images in BGR and BGRA #2340
Comments
rr.log_image
silently expects RGB image formatrr.log_image
only handles RGB image format
FWIW |
This is related to adding more semantics to color tensors in general:
|
The quick-fix is just to reorder the data into RGB on the SDK side. The deeper fix is adding a "ColorSemantics" component or similar. |
rr.log_image
only handles RGB image formatrr.Image
only handles RGB image format
|
rr.Image
only handles RGB image format
Note some places in the code indicate we should change our defaults to BGR. I do NOT think we should do this. BGR is a bad, legacy choice from opencv. It should not be our default. |
The simple way to implement BGR and BGRA right now is to upload them as RGB(A) textures, and add a |
not blocked by it, we can have bgr ofc without it being editable |
Describe the annoyance
There is generally no consensus between RGB and BGR image formats. For example, Pillow's
PIL.Image.open()
yields RGB format (including when the image is converted to a Numpy array). OpenCV'scv2.imread()
orVideoCapture
instead yield BGR numpy arrays.rr.log_image()
expects RGB and yields false colours otherwise.At the very least, this should be documented.Ideally, some optionalformat
argument should be added so alternative formats may be correctly ingested.To Reproduce
This code yields false color (e.g. blue skins):
This is fixed by adding explicit format conversion:
Ideally, something like that would be possible:
The text was updated successfully, but these errors were encountered: