added haze removal tool

Based on the paper:
  "Single Image Haze Removal Using Dark Channel Prior" by He, Sun and Tang
using a guided filter for the "soft matting" of the transmission map
This commit is contained in:
Alberto Griggio
2018-10-10 10:02:06 +02:00
parent 30d8a674aa
commit 14ac4babec
24 changed files with 617 additions and 19 deletions

View File

@@ -692,7 +692,7 @@ void Crop::update(int todo)
std::unique_ptr<Imagefloat> fattalCrop;
if ((todo & M_HDR) && params.fattal.enabled) {
if ((todo & M_HDR) && (params.fattal.enabled || params.dehaze.enabled)) {
Imagefloat *f = origCrop;
int fw = skips(parent->fw, skip);
int fh = skips(parent->fh, skip);
@@ -741,6 +741,7 @@ void Crop::update(int todo)
}
if (need_fattal) {
parent->ipf.dehaze(f);
parent->ipf.ToneMapFattal02(f);
}