I’ve found that the entire result is better.
FYI, I dropped out the exposure cutoff code with almost no visual difference. (Edit: I think I had an error in my implementation of the cutoff code that might explain why it didn’t help. Might try a trick tonight.)
If you look at the gaussian weighting function used in mertens’ paper, while it isn’t explicitly mentioned that they used sRGB, a default optimum of 0.5 STRONGLY hints at being designed to work in sRGB. (0.5 in sRGB is roughly middle grey, vs. around 0.18 in linear)
(sorry, didn’t label axes - the x axis is EV delta from the clip point, I know pierre likes that representation and that’s one case where I agree with him)
You can see from the plot that:
0.50 in linear weights towards the highlights significantly - this is the behavior I always saw from DT’s exposure fusion - while some highlight detail was preserved, in general the highlights were severely crushed/compressed and “almost but not quite blown”
Attempting to use linear 0.18 (which matches 0.50 in gamma-2.4) has the side effect of constant significant weights at the low end of things.
Attempting to only apply the weighting function in gamma space but continue to blend in linear provides really horrible results. (Sorry, no example, I deleted the code for that approach because it was so consistently bad and I really don’t want to do it again…)
As to enfuse not requiring gamma-encoded input - enfuse is doing a LOT of color management work internally before performing the fusion/blending, I haven’t yet found an obvious transfer curve transform (enfuse’s code is really hard to read) but I suspect based on the experience of @afre that there is one somewhere internally.
Similarly there may be significant differences between enfuse’s contrast weighting function and the one implemented in DT. The one in DT will definitely create an increasing weight for exposure-shifted images that is proportional to the exposure - which is consistent with the fact that highlights got blown badly when it was present.
I won’t be able to do much code analysis tonight, it’s a drinking night. I’m already behind schedule on getting out the door for work as it is.
As to preserve colors when fusion was on - the fact that it’s forcefully turned off when fusion is on made me think there was some sort of conflict identified?