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

@@ -952,7 +952,7 @@ inline void rescale_nearest (const Array2Df &src, Array2Df &dst, bool multithrea
inline float luminance (float r, float g, float b, TMatrix ws)
{
return r * ws[1][0] + g * ws[1][1] + b * ws[1][2];
return Color::rgbLuminance(r, g, b, ws);
}