Skip to content

Floating-point image data range seems to be assumed to be at least 0-255. #4624

@kpreid

Description

@kpreid

Describe the bug
When an archetypes::Image is logged, if the pixel values do not reach at least 255.0, then none of them will be displayed with full brightness in the viewer. It seems that there is an auto-ranging/auto-exposure feature (logging very large values causes the rest of the image to darken) but it never uses a maximum less than 255.0.

This is contrary to typical usage (in my personal experience in computer graphics and GIS) of floating-point pixel formats, where if there is an assumed 100% brightness value, then that value is 1.0.

To Reproduce
Steps to reproduce the behavior:

  1. Log an archetypes::Image whose data contains a datatypes::TensorBuffer::F16 with values in the 0.0 - 1.0 range.
  2. Observe that in the viewer it appears black, yet the pixel data is displayed on hover.
  3. Try again with a larger range such as 0.0 - 100.0.
  4. Observe that in the viewer the image appears dim.

Expected behavior
The auto-ranging should select a range that either matches the data, or has an assumed maximum of 1.0.

I'm not sure what would be best to do with the alpha component — which should generally not be auto-scaled since "opaque" is semantically different from "all X% transparent". I haven't investigated Rerun's current behavior with it.

Screenshots
image

Desktop (please complete the following information):

  • OS: macOS Sonoma 14.2.1 (23C71)

Rerun version
rerun-cli 0.11.0 [rustc 1.75.0 (82e1608df 2023-12-21), LLVM 17.0.6] x86_64-apple-darwin

Metadata

Metadata

Assignees

No one assigned

    Labels

    uiconcerns graphical user interface🪵 Log & send APIsAffects the user-facing API for all languages

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions