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

Extreme Magenta Artifacts #196

Open
fanckush opened this issue Nov 11, 2019 · 7 comments
Open

Extreme Magenta Artifacts #196

fanckush opened this issue Nov 11, 2019 · 7 comments

Comments

@fanckush
Copy link
Contributor

fanckush commented Nov 11, 2019

so i needed some new HDR samples for some bugfixes i'm working on and here's what i got:

LEFT: V0.6 the highlights are simply magenta/purple and nothing can done about it
RIGHT: V0.5 better than 0.6 but there is a magenta tint all in the highlights
image

What i'd like to know is why magenta? what is the technical reason behind it?
files can be found here https://gofile.io/?c=QBkfj6

shot on: a6300 + 10-18mm

@Beep6581
Copy link
Collaborator

@fanckush
Copy link
Contributor Author

Thanks for the link, in there it says that (2.0, 1.0, 1.4) is magenta which I find hard to understand.
Magenta is #FF00FF meaning no green.. doesn't a fully saturated clipped raw image result in fully saturated values for each channel (after demosaicing) aka: white. why is purple happening?
If anyone has any explanation I would be very grateful

@Beep6581
Copy link
Collaborator

@fanckush if my understanding of this is correct:
if raw values are in the range [0;1], clipped would mean rgb(1.0, 1.0, 1.0),
and multiplying that by those white balance coefficients would produce rgb(2.0, 1.0, 1.4),
which scaled to [0-255] for better viewing produces rgb(255, 127.5, 178.5)

@fanckush
Copy link
Contributor Author

that makes a lot of sense. I tested in darktable to disable white balance and indeed the magenta turned into gray ( shade of white). I understand this now BUT it creates another problem for me that I don't get:
normal raw images are also often clipped and saturated. why are they not magenta after white balance correction? isn't every channel fully saturated as well? for example my source files contain a bunch of saturated pixels but in darktable they look perfectly white and perfectly clipped :)

@Beep6581
Copy link
Collaborator

I can answer part of that.

The raw file's channels can saturate at different levels, and differ by ISO and also sometimes by aperture. That is why we measure the white levels and find a good level at which to clip: http://rawpedia.rawtherapee.com/Adding_Support_for_New_Raw_Formats#White_Levels
These levels are stored in the camconst.json file.

The image is white-balanced somewhere in the pipeline: http://rawpedia.rawtherapee.com/Toolchain_Pipeline
In RawTherapee that seems to happen after decoding and demosaicing, if that page is correct, so after camconst.json. I either don't know or don't recall how white balancing does not lead to magenta whites. We could ask @heckflosse @Desmis @iliasg how that magic works.

@LigH-de
Copy link

LigH-de commented Feb 24, 2020

A v0.6 exists? ... Apparently not for Windows?

@Beep6581
Copy link
Collaborator

v0.6 does not exist yet... Apologies for the delay, I'm 90% there, just need to find time for the last 10% of the work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants