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

Banding is visible when strong expossure correction is applied. #7050

Open
MOJNICK opened this issue Apr 21, 2024 · 4 comments
Open

Banding is visible when strong expossure correction is applied. #7050

MOJNICK opened this issue Apr 21, 2024 · 4 comments
Labels
scope: color management Related to handling of colour processing

Comments

@MOJNICK
Copy link

MOJNICK commented Apr 21, 2024

Short description

Banding is visible, after a strong exposure correction is applied ( 10 EV ). I'm operating on high bit depth TIFF image ( 32 bits per channel ). I assure it is not a problem with provided image, as GIMP and other tool chains I'm using are able to render high quality image.
As a not important note, the image is a TIFF obtained from DNG ( the conversion was done by Siril software ).

Steps to reproduce

  1. Open provided .tif image in RawTherapee and apply 10 EV correction - verify banding is visible on the sky ( I have uploaded all images and RawTherapee vs GIMP comparision screenshots:
    https://drive.google.com/drive/folders/1Gliec48pKajwO-ArriPdKer8EHjzWleH?usp=drive_link

Expected behavior

No banding visible on the sky. The quality should be comparable with original .dng file.

Additional information

RawTherapee 5.9 AppImage, running under Ubuntu 22.04.4 LTS

@Entropy512
Copy link
Contributor

All I see in that link is a single JPEG file.

@MOJNICK
Copy link
Author

MOJNICK commented Apr 29, 2024

Sorry, wrong link, fixed.

@Lawrence37
Copy link
Collaborator

Possibly related to the embedded color profile. Choosing one of the RT sRGB profiles for the input profile avoids posterization. GIMP does not have the issue. darktable also shows posterization with the embedded profile, but not when selecting sRGB.

@Lawrence37 Lawrence37 added the scope: color management Related to handling of colour processing label May 5, 2024
@Entropy512
Copy link
Contributor

Entropy512 commented May 5, 2024

Hmm. When siril implemented color management, I reviewed the general architecture and it looked good, but didn't review the color profiles themselves. They were using canned pregenerated profiles instead of generating them on the fly and I suggested they used LCMS2 to generate them on the fly. Unfortunately last year I was severely burned out at work and suffering from chronic sleep deprivation so I didn't review it nearly as well as I should have. Looking at the MR again, they rearchitected it significantly since I last looked.

Also I could have sworn they were using linear for higher bit depths than 8, but that was an older version of the MR. Combining sRGB with 32-bit data is a bit... weird. Especially 32-bit float data!

Looks like there's now a choice of sRGB, Working, or "image profile" in a UI preference: https://gitlab.com/free-astro/siril/-/merge_requests/542/diffs#d6bad6a891d344d6133b1ec6628ca876ea75828e_731_829 - no choice for linear which IMO should be provided for high bitdepth as an option. There's also a comment that "32 bit files are always saved in the colorspace of their current profile" - https://gitlab.com/free-astro/siril/-/merge_requests/542/diffs#d6bad6a891d344d6133b1ec6628ca876ea75828e_731_858 - I haven't yet determined what the definition of "current" profile is.

A definite difference is that they're using what looks like a 1024 entry lookup TRC, while RT uses a parametric TRC for sRGB. I'm not sure why GIMP doesn't posterize, but given the particular nature of this file, a LUT-style TRC with only 1024 entries might be problematic. LCMS should be interpolating values between LUT entries but maybe something isn't working quite right there? (Especially since this appears to be combining a LUT TRC with floating point data...)

The fact that the maximum value in the image data is a little over 0.01, it seems like there might also be some scaling issues with how this was saved. Especially given that the input DNG is well exposed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: color management Related to handling of colour processing
Projects
None yet
Development

No branches or pull requests

3 participants