Beep6581 / RawTherapee

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

darktable's haze removal tool? #4326

Closed agriggio closed 5 years ago

agriggio commented 6 years ago

Darktable has a new haze removal tool. It seems to be very simple to use and effective. The code doesn't look too complicated. I'd like to "borrow" this for RT as well. Thoughts? (not for 5.4, too late)

Benitoite commented 6 years ago

Nice work @agriggio Here's a look at Soderasen_1.hdr.dng using the tool as compiled from branch dehaze:

Neutral neutral

W/Default Haze Removal default


Just the automatched tone curve. automatched

W/Default Haze Removal autoanddefault

W/Haze Removal, other settings dramatic

Benitoite commented 6 years ago

Here's a look at Amsterdam.pef:

Neutral neutral

Default Haze Removal default


Neutral neutral2

Default Haze Removal default2

agriggio commented 6 years ago

I've just pushed a changeset with significant simplifications and tweaks to the algorithm. I think now it's reasonably useable. Let me know if you have comments!

sguyader commented 6 years ago

@agriggio Alberto, I don't know what you changed, but the results are really awesome now! Almost no halos! There's just one strange thing, when I try it on one of @gaaned92 's images (WZ4A7192.CR2 from https://keybase.pub/gaaned92/haze) it doesn't do anything anymore (it used to do something in the previous version of the tool). The depth mask is all black. Can you test on your machine to see if it's a problem on my side?

agriggio commented 6 years ago

@sguyader thanks for testing. It should work now

gaaned92 commented 6 years ago

@agriggio That's now really better! impressive improvement with awesome result. The depth mask is significantly different from previous version and seems now coherent with the perception of foregroud/background. same remark as @sguyader for WZ4A7192.CR2. The depth mask is black thus no correction. Perhaps it is normal with this photo. Could you briefly decribe what you did? Waiting for commit.

agriggio commented 6 years ago

@gaaned92 when did you test? I pushed a fix for that corner case after @sguyader's report, now also the above pic should be corrected (though the effect is still subtle).

gaaned92 commented 6 years ago

I used:

Version: 5.4-930-g59339644d
Benitoite commented 5 years ago

Nice work @agriggio Here's a look at Soderasen_1.hdr.dng using the tool as compiled from branch dehaze, comparison between old and new codes:

Neutral neutral

W/Old Default Haze Removal default

W/New Default Haze Removal 59339644d screen shot 2018-10-18 at 12 35 18 pm


Just the automatched tone curve. automatched

W/Old Default Haze Removal autoanddefault

W/New Default Haze Removal 59339644d screen shot 2018-10-18 at 12 43 22 pm

Benitoite commented 5 years ago

Here's a look at Amsterdam.pef:

Neutral neutral

Old Default Haze Removal default

New Default Haze Removal 5933964 screen shot 2018-10-18 at 12 48 08 pm


Neutral neutral2

Default Haze Removal default2

New Default Haze Removal 5933964 screen shot 2018-10-18 at 12 50 36 pm

Thanatomanic commented 5 years ago

Closing, since this is done with PR #4898.