Using the RT 5.5 dehaze tool for images without haze

RawTherapee 5.5 has a new ‘Haze Removal’ tool made by @agriggio.
It’s great in removing haze on hazy shots, but not only for that.
It also allows to get a kind of post card effect very easily.

Left without haze removal, right with haze removal + a white balance correction because haze removal changes the colours a bit:

11 Likes

This seems to be a general feature of dehaze tools. You can get similar (but not identical results) with the haze removal tools in darktable.

I also sometimes use this tool just to change the look by (mainly) increasing contrast.

Both tools calculate the dark channel prior as in K He, J Sun, X Tang, Proceedings of IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR, Miami, 2009), pp. 1956–1963; I think GMIC has dcp dehaze as well.

{{\large J^{dark}(\mathbf x) =}_{}} {{\min_{c∈\mathit\{r,g,b\}}} {\Bigg(_{}} {{\min_{\mathbf y∈Ω(\mathbf x)}}} {{{ \Big(\mathit{J^c}(\mathbf y)\Big)\Bigg)}}_{}}}

I would guess the depth slider in RT sets the aerial perspective ω factor, as it retains haze from being removed:

{{{{{{{\overset {\large\sim}{t}}_{}}(\mathbf x)}_{}}={1-ω}}_{}} \ {{\min_c}}}\left(\min_{\mathbf y∈Ω(\mathbf x)}\Big({I^{c(\mathbf y)}\over A^c}\Big)\right)

For whatever reason, in @agriggio’s code it’s possible to show in verbose mode when there was no haze to remove:

3 Likes