Beep6581 / RawTherapee

A powerful cross-platform raw photo processing program
https://rawtherapee.com
GNU General Public License v3.0
2.77k stars 314 forks source link

Using "as_shot" WB in early stages instead of current WB results in artifacts when WB difference is large #2043

Closed Beep6581 closed 9 years ago

Beep6581 commented 9 years ago

Originally reported on Google Code with ID 2059

Using "as_shot" WB before demosaic results in artifacts when "as shot" dosen't match
real scene WB.

The problem is most evident when UniWB (all WB multipliers =1 ..or around) was used
for a shot.

http://rawtherapee.com/forum/viewtopic.php?f=1&t=3776&p=27263#p27263
http://rawtherapee.com/forum/viewtopic.php?f=1&t=4410#p34227

UniWB Files from the second link corrected to autoWB with exiftool

http://filebin.net/ha15wlpjmh

Reported by iliasgiarimis on 2013-11-17 14:04:20

Beep6581 commented 9 years ago
Do you think we should change so that autolevels always work on "Camera"/"AsShot" white
balance? In a way it's more logical. As far as I understand the main purpose of autolevels
is to exist in a default profile and provide a good look when you first open the file.
And when you first open the file it will be shown with the "Camera" white balance.

Actually I prefer how Lightroom has done it, where the first open is something that's
similar to the camera jpeg (ie just a fixed tone curve which brightens the(rather than
toggle) image and compress the highlights), and you have a "AutoTone" button which
you press if you want maximizing contrast etc, which work similar to autolevels, but
all it does is set slider values, it's not a function you toggle and put in the pp3.
By having it just as a slider setting "assistant" and not storable in the PP3 you can
also do all sorts of improvements to the algorithm without breaking PP3 compatibility.
But that's a different story.

Reported by torger@ludd.ltu.se on 2013-11-20 16:27:28

Beep6581 commented 9 years ago
Sorry for late answer. I had to read all comments of this Issue to understand what happens
;-)

Wouldn't that conflict with the UniWb shooters? Or did I miss a point here? The 'default'
profile is only one of many profiles (in contrast to the 'neutral' profile), so we
could make a second one 'Default AutoWB' (for the uniWB shooters).

Reported by heckflosse@i-weyrich.de on 2013-11-20 17:55:49

Beep6581 commented 9 years ago
Forgot to mention, that I do like the output after your patch. AutoCa is much better
now and demosaic also gives more pleasant results.

Reported by heckflosse@i-weyrich.de on 2013-11-20 17:58:16

Beep6581 commented 9 years ago
Just tried out Lightroom to really remember how it works there. They have an "autotone".
It's not turned on per default. When you press it it moves the sliders to desired positions
and you cannot press it again, ie its "enabled", but as soon as you move a slider it's
disabled and you can press it again to restore the slider positions. In that way it
works exactly the same as RT's autolevels.

However, it also reacts if I change white balance, then I can re-apply it and get a
different result, based on the new white balance. So their autolevels did like my advanced
patch did, ie run autolevels always with the user's white balance, but rather than
recalculating it automatically when changing white balance, autolevels is auto-disabled
just as if you move an exposure slider.

I kind of like that, as it takes away some of the confusion. Ie autolevels get special
treatment and will always use the current user-set white balance, and if enabled it
will be deactivated if you change white balance, so you can press it again and get
a new evaluation for the current white balance.

I'll look into updating the patch with that behavior.

Reported by torger@ludd.ltu.se on 2013-11-20 18:20:42

Beep6581 commented 9 years ago
Ingo, there is no conflict for (us) UniWB shooters I guess, as nobody wants the greenish
look and should know how to take a correct rendering out of UniWB shots. 
Instead of conflicting, with this patch they (we) have a better demosaicing, autoCa
and flexibility to change output WB. And output same with Dcraw/Libraw and derivatives.

As about increased brightness, it is logical since R and B channels are amplified to
their normal levels instead of staying dumped with using UniWB's unity WB multipliers.
UniWB is about having almost raw in-camera histograms i.e. no fake channel-clipping
indication due to WBalanced (amplified) R /B. And use this real raw-info to better
expose to the right (ETTR). This means that, most times, UniWB shots are (safely) overexposed
so the first that the user has to do is decrease exposure to the normal value (mean
grey at 2.5-3 stops down from clipping) using the exposure slider.

Reported by iliasgiarimis on 2013-11-20 18:31:47

Beep6581 commented 9 years ago
On second thought I think we'll add autolevels white balance adjustment in another patch,
to keep down complexity of this one. I'll file a separate issue.

For now autolevels will use autowb just as the others.

I'm going to commit this. If people hate the slight change in autolevels we can always
revert that part.

Reported by torger@ludd.ltu.se on 2013-11-20 18:47:01

Beep6581 commented 9 years ago
Now it's clear what you meant. Running auto-Levels with the user's white-balance (whatever
it is set to) sounds good. But I couldn't read that in #52, where you said 'we should
change so that autolevels always work on "Camera"/"AsShot" white balance'.
Mabye this confused me a bit.

Ingp

Reported by heckflosse@i-weyrich.de on 2013-11-20 18:58:35

Beep6581 commented 9 years ago
I was talking mostly rubbish in #52 :-)

I have now committed this to default, and I'm now adding a new issue for the autolevels
improvement.

Reported by torger@ludd.ltu.se on 2013-11-20 19:00:53

Beep6581 commented 9 years ago
IMHO autolevels does not perform well the way it is anyway, the exposure it seems to
target is underexposed, sometimes even by 2EV, but that is a separate issue. 

Reported by entertheyoni on 2013-11-20 19:23:22

Beep6581 commented 9 years ago
Can we close? I confirm fix on my end using uniwb images from here and forum.

Reported by entertheyoni on 2013-12-01 16:20:02

Beep6581 commented 9 years ago
Is issue 2095 solved with the patch also ??

http://code.google.com/p/rawtherapee/issues/detail?id=2095#c5

Tito reports that changing the WB in exif data solved the noise discontinuity in his
experiments. I wonder how the preprocess-autoWB deals with this issue (I cannot compile
to check it myself ..). 

Reported by iliasgiarimis on 2013-12-02 14:24:15

Beep6581 commented 9 years ago
#62: I have no idea :-)

Setting this to fixed.

Reported by torger@ludd.ltu.se on 2013-12-17 20:20:31