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

Grayscale image presented too dark #3994

Closed
playreplayoliver opened this issue Oct 25, 2023 · 1 comment · Fixed by #3999
Closed

Grayscale image presented too dark #3994

playreplayoliver opened this issue Oct 25, 2023 · 1 comment · Fixed by #3999
Assignees
Labels
🪳 bug Something isn't working 🔺 re_renderer affects re_renderer itself 🦟 regression A thing that used to work in an earlier release

Comments

@playreplayoliver
Copy link

Describe the bug
Gray scale images is presented much darker in 0.9.1 compared to <= 0.8.2

To Reproduce
Running the following code...

import numpy as np
import rerun

x, _ = np.meshgrid(np.arange(0, 640), np.arange(0, 400))
im = (255 * x / x.max()).astype(np.uint8)
im[:, 350:] = 0
rerun.init('gray')
rerun.spawn()
rerun.log_image('image', im)

... on versions
pip3 install rerun-sdk==0.8.2
0.8.2

pip3 install rerun-sdk==0.9.1
0.9.1
Expected behavior
The behavior of 0.8.2 is expected

Desktop (please complete the following information):
6.2.0-35-generic #35~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Oct 6 10:23:26 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

Rerun version
rerun_py 0.9.1 [rustc 1.72.1 (d5c2e9c34 2023-09-13), LLVM 16.0.5] x86_64-unknown-linux-gnu 00fa796, built 2023-10-12T12:13:35Z

Additional context
See previous issue: #1990
And previous pr: #2014

@playreplayoliver playreplayoliver added 👀 needs triage This issue needs to be triaged by the Rerun team 🪳 bug Something isn't working labels Oct 25, 2023
@Wumpf Wumpf added 🔺 re_renderer affects re_renderer itself and removed 👀 needs triage This issue needs to be triaged by the Rerun team labels Oct 25, 2023
@Wumpf Wumpf self-assigned this Oct 25, 2023
@Wumpf Wumpf added the 🦟 regression A thing that used to work in an earlier release label Oct 25, 2023
@Wumpf
Copy link
Member

Wumpf commented Oct 25, 2023

emilk added a commit that referenced this issue Oct 25, 2023
### What
* Closes #3994

We previously would apply a grayscale colormap to a grayscale image -
this was not only a bit redundant; it actually caused the wrong colors.
Now we only apply the grayscale color map for things like depth images
and tensors (when the user has selected such a colormap) and in all
other cases we preserve the raw grayscale values as best we can.

We tested:
* grayscale images of different bit depth and ranges (see below)
* tensor selection colormap preview
* tensor with grayscale colormap
* depth point cloud selection colormap preview
* depth point cloud with grayscale colormap
* NV12 test


![image](https://github.com/rerun-io/rerun/assets/1148717/94886ddb-61e2-4356-96b7-191015256b02)

### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [x] I've included a screenshot or gif (if applicable)
* [x] I have tested [demo.rerun.io](https://demo.rerun.io/pr/3999) (if
applicable)
* [x] The PR title and labels are set such as to maximize their
usefulness for the next release's CHANGELOG

- [PR Build Summary](https://build.rerun.io/pr/3999)
- [Docs
preview](https://rerun.io/preview/4edf5f6b5d8ccf6ec33c359f85347ac7b0d40866/docs)
<!--DOCS-PREVIEW-->
- [Examples
preview](https://rerun.io/preview/4edf5f6b5d8ccf6ec33c359f85347ac7b0d40866/examples)
<!--EXAMPLES-PREVIEW-->
- [Recent benchmark results](https://ref.rerun.io/dev/bench/)
- [Wasm size tracking](https://ref.rerun.io/dev/sizes/)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪳 bug Something isn't working 🔺 re_renderer affects re_renderer itself 🦟 regression A thing that used to work in an earlier release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants