Project

General

Profile

Bug #9686

Fix highlight reconstruction

Added by Moritz Moeller over 5 years ago. Updated over 4 years ago.

Status:
In Progress
Priority:
Medium
Assignee:
-
Category:
Darkroom
Target version:
-
Start date:
11/22/2013
Due date:
% Done:

50%

Affected Version:
git development version
System:
other GNU/Linux
bitness:
64-bit
hardware architecture:
amd64/x86

Description

Try it on this:
https://dl.dropboxusercontent.com/u/1708784/GH2/_1170827.dng

The thing that works for almost all of my images is rawthreapee's slow but excellent highlight reconstruction in 'Color Propagation' mode.

See the above image processed by this here:
https://dl.dropboxusercontent.com/u/1708784/GH2/_1170827_rt_hr_cp.jpg

The results in the current 'highlights' branch of DT give me results that look a lot like, rawtherapee's 'CIELab Blending' mode which gives some detail but totally desaturated highlights, i.e. useless for most of my images, see given sample.

One issue is module order. Exposure comes /after/ highlight reconstruction, it seems.
This is a mistake imho.

Highlight reconstruction commonly works on values close to or bigger than 1. To shift them into the 0..1 range or clip them above 1.0.
However, when I apply exposure, I am compressing or expanding the entire 0..1 range. So if highlight reconstruction comes /before/ exposure and I use an exposure of e.g. -1ev, my highlights turn gray! That's not what anyone wants, almost all the time.

What most people want is to compress the entire range 0..x by the value set in exposure and then do whatever highlight reconstruction to what is still, after this multiplication from the exposure module, close to or over 1.

img_0001.jpg (4.06 MB) Tobias Ellinghaus, 12/08/2014 01:44 PM

highlights_dt.jpg - darktable's reconstruct in LCh (123 KB) Mike Pflueger, 12/09/2014 07:10 PM

highlights_rt.jpg - rawtherapee's colour propagation (160 KB) Mike Pflueger, 12/09/2014 07:10 PM

highlights_dt2.jpg - reconstruct colour with adjusted clipping (155 KB) Mike Pflueger, 12/09/2014 08:49 PM

History

#1 Updated by Roman Lebedev almost 5 years ago

  • Category set to Darkroom
  • Status changed from New to In Progress
  • % Done changed from 0 to 50
  • Affected Version changed from 1.2.3 to git development version

One of the first outcomes of LGM, hanatos has implemented an idea by a1ex from magic lantern, which reconstructs color in your blown highlights (3rd combo box entry in our highlights module, git master): [1]

Please try it and report your findings :)

#2 Updated by Moritz Moeller over 4 years ago

Roman Lebedev wrote:

One of the first outcomes of LGM, hanatos has implemented an idea by a1ex from magic lantern, which reconstructs color in your blown highlights (3rd combo box entry in our highlights module, git master): [1]

Please try it and report your findings :)

I tried this at the time and now again, with 1.6 released. There is still no way to get remotely close to the result from RawTherapee. Check the files I linked in this ticket, everything written there still applies. :(

Furthermore, it seems the exposure module is still clipping. When I bring exposure down, the highlight turns gray. It should stay white.
Lastly, this highlights a problem with the color picker.
The values are reported at 8 bit rgb 0.255. They should be float 0..1 and display values over 1 in the highlight.

#3 Updated by Tobias Ellinghaus over 4 years ago

  • Priority changed from High to Medium

The color picker (the one on the left, not the ones inside some modules) is picking at the end of the preview pipe. Yes, that is broken.
Exposure does not clip. You raw file is clipped. So bringing down a value of 1.0 does result in something < 1.0.

#4 Updated by Tobias Ellinghaus over 4 years ago

I added an example from dt. It has some artefacts but looks good to me otherwise.

#5 Updated by Moritz Moeller over 4 years ago

Tobias Ellinghaus wrote:

I added an example from dt. It has some artefacts but looks good to me otherwise.

That looks very good indeed. Could you share the XML?

#6 Updated by Moritz Moeller over 4 years ago

Tobias Ellinghaus wrote:

The color picker (the one on the left, not the ones inside some modules) is picking at the end of the preview pipe. Yes, that is broken.
Exposure does not clip. You raw file is clipped. So bringing down a value of 1.0 does result in something < 1.0.

Are you sure? How do I check if a raw is clipped? Is there a cmdline utility that prints ranges e.g.?

#7 Updated by Tobias Ellinghaus over 4 years ago

The XMP is embedded in the JPEG. All I did was exposure -1, highlight reconstruction to the 3rd mode.

And yes, unfortunately I am sure about the color picker. :( I tried to change that once (it currently even works in display color space) but introduced other bugs that were worse. In my eyes color pickers in dt are useless (as they are now) and could be removed entirely.

#8 Updated by Moritz Moeller over 4 years ago

Tobias Ellinghaus wrote:

And yes, unfortunately I am sure about the color picker. :( I tried to change that once (it currently even works in display color space) but introduced other bugs that were worse. In my eyes color pickers in dt are useless (as they are now) and could be removed entirely.

Aha, I see. Now this looks very good and works as expected. Sorry for the noise earlier.

So there is some mach banding that needs to be fixed still in the highligt but I think this ticket can now be set to 75% done. :))))

#9 Updated by Mike Pflueger over 4 years ago

I also think rawtherapee's colour propagation is quite a bit better than the current methods in darktable, see attached images. I can provide the raw if needed, but i guess the results should be similar with any other overexposed cloudy sky.
DT's new reconstruct colour mode gives me pink highlights, so that doesn't work here.

#10 Updated by Mike Pflueger over 4 years ago

Whoops, i should've checked the clipping setting earlier, i can reduce this a bit to remove the pink highlights with the reconstruct colour method.
Reconstruct colour is quite similar to rawtherapee's colour propagation, the highlights in my example are coloured differently though.
Overall i think i still like rawtherapee's method/highlight colours a little more, but DT's reconstruct colour method is a good option to have.

Also available in: Atom PDF