-
Notifications
You must be signed in to change notification settings - Fork 707
Support images in BGR and BGRA #2340
Copy link
Copy link
Closed
Labels
enhancementNew feature or requestNew feature or requestuser-requestThis is a pressing issue for one of our usersThis is a pressing issue for one of our users🍏 primitivesRelating to Rerun primitivesRelating to Rerun primitives📺 re_vieweraffects re_viewer itselfaffects re_viewer itself😤 annoyingSomething in the UI / SDK is annoying to useSomething in the UI / SDK is annoying to use
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestuser-requestThis is a pressing issue for one of our usersThis is a pressing issue for one of our users🍏 primitivesRelating to Rerun primitivesRelating to Rerun primitives📺 re_vieweraffects re_viewer itselfaffects re_viewer itself😤 annoyingSomething in the UI / SDK is annoying to useSomething in the UI / SDK is annoying to use
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()orVideoCaptureinstead yield BGR numpy arrays.rr.log_image()expects RGB and yields false colours otherwise.At the very least, this should be documented.Ideally, some optionalformatargument 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: