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

Color calibration can't handle dng files. #6840

Closed
jade-nl opened this issue Nov 10, 2020 · 5 comments
Closed

Color calibration can't handle dng files. #6840

jade-nl opened this issue Nov 10, 2020 · 5 comments

Comments

@jade-nl
Copy link

jade-nl commented Nov 10, 2020

Describe the bug
When using a dng file and if you press reset params on the white balance module while in the modern chromatic adaption workflow the image is completely messed up.

Only way to recover from this is to go back to the legacy workflow, discard the history and go back to the modern workflow. I have not found a way to restore the original image while in the modern workflow.

To Reproduce

  1. Load a dng file
    I used this one from pixls: https://discuss.pixls.us/t/playraw-is-this-dng-ok/14871)

1 loaded

  1. Activate color calibration:

2 calibration on

  1. Press white balance reset params:

3 reset wb

Expected behavior
Keep a decent image after pressing reset params or be able to reset

Platform

  • darktable : 3.3.0+1484 gd64d8b0ad
  • OpenCL installed : Yes (nvidia-opencl-common 450.80.02-1)
  • OpenCL activated : Yes
  • OS : Linux (kernel 5.8.10-1)
  • Distro : Debian Buster (rel. 10.6)

Additional context

  • Self compiled : Yes.
  • Compilers : gcc 8.3.0 - clang 10.0.1 - LLVM 10.0.1
  • Cmake : 3.13.4
  • Gtk : 3.24.5-1
  • Glib : 2.58.3-2
  • Sqlite : 3.27.2
  • Optimization : None
@jade-nl
Copy link
Author

jade-nl commented Nov 10, 2020

I just noticed this in lighttable:

screen

These 3 images, also DNG files, I did not touch!

@jade-nl
Copy link
Author

jade-nl commented Nov 11, 2020

@aurelienpierre : Could it be that the (variable) value calculated by using the camera reference button is the culprit?

It was already noted/established that the maths behind that white balance module button does not come close to a D65 value when it encounters a DNG file (4360)

If the output of the maths used should come close to 6504 (CIE Standard Illuminant D65) could this be solved by using this, fixed, value instead of the variable output of the maths used?

Just a morning coffee though......

@aurelienpierre
Copy link
Member

Reproduced and understood, fix incoming.

The DNG case, where matrix is embedded, is simply not handled.

aurelienpierre added a commit to aurelienpierreeng/ansel that referenced this issue Nov 11, 2020
aurelienpierre added a commit to aurelienpierreeng/ansel that referenced this issue Nov 11, 2020
@aurelienpierre
Copy link
Member

aurelienpierre commented Nov 11, 2020

See #6836 for a fix. I have only reverted the behaviour to original for DNG (aka the input matrix is embedded and darktable can't find it), which means color calibration disregard DNG and let white balance deal with them.

We still need to improve DNG handling in darktable, so far the modern CAT will not apply to them and the white balance module is only loading presets for them, not fetching the real numbers. Plus, the WB can be achieved in DNG by using DNG profiles, which basically profile the camera sensor for 2 illuminants (A and D65) with a LUT for each one, so the WB is actually achieved by interpolation between the LUTs at profile level.

@jade-nl
Copy link
Author

jade-nl commented Nov 11, 2020

After integrating your personal cat-workflow branch mentioned in #6836 I am not able to (forcefully) recreate the above issue any longer.

Closing this one.

@jade-nl jade-nl closed this as completed Nov 11, 2020
aurelienpierre added a commit to aurelienpierreeng/ansel that referenced this issue Nov 12, 2020
aurelienpierre added a commit to aurelienpierreeng/ansel that referenced this issue Nov 12, 2020
elstoc pushed a commit to elstoc/darktable that referenced this issue Nov 12, 2020
elstoc pushed a commit to elstoc/darktable that referenced this issue Nov 12, 2020
aurelienpierre added a commit to aurelienpierreeng/ansel that referenced this issue Nov 12, 2020
aurelienpierre added a commit to aurelienpierreeng/ansel that referenced this issue Nov 12, 2020
TurboGit pushed a commit that referenced this issue Nov 13, 2020
#6836)

* channelmixerrgb: display an error message when temperature.c does not use camera reference white balance

* handle modern CAT with DNG embeded matrix
fix #6840 part one

* fix #6840 part two

* advertise the module doing CAT on the pipeline
handles multi instances of channelmixerrgb too.
adds another error on the 2nd and next instances doing CAT

* temperature.c : add warning message
advertize the use of D65 RGB coeff on the pipe,
simplify channelmixerrgb handling

* channelmixerrgb: display an error message when temperature.c does not use camera reference white balance

Co-authored-by: Chris.Elston <chris.elston@blueyonder.co.uk>
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

2 participants