Dehaze explained

Moderator: jsachs

Post Reply
tomczak
Posts: 1415
Joined: April 25th, 2009, 12:56 am
What is the make/model of your primary camera?: Fuji X-E2
Contact:

Dehaze explained

Post by tomczak »

Jonathan, could you v. briefly explain how Dehaze works internally?
Maciej Tomczak
Phototramp.com
jsachs
Posts: 4398
Joined: January 22nd, 2009, 11:03 pm

Re: Dehaze explained

Post by jsachs »

Jonathan Sachs
Digital Light & Color
tomczak
Posts: 1415
Joined: April 25th, 2009, 12:56 am
What is the make/model of your primary camera?: Fuji X-E2
Contact:

Re: Dehaze explained

Post by tomczak »

Is the 'Strength' slider what the authors call the 'scattering coefficient beta' in eq. 2? Thanks for the paper - not that important, just interesting.
Maciej Tomczak
Phototramp.com
jsachs
Posts: 4398
Joined: January 22nd, 2009, 11:03 pm

Re: Dehaze explained

Post by jsachs »

Sorry, I don't remember all the details and I am working on something else right now.

I had a change to take a look at the code at strength does appear to be related to beta.
Jonathan Sachs
Digital Light & Color
croos
Posts: 30
Joined: June 30th, 2018, 6:57 am

Re: Dehaze explained

Post by croos »

What does dehaze do in practice, in not so technical terms? From the look of it it increases contrast and saturation. Is that it or is it more to it?

I just discovered this feature in darktable and now I realize it's also in the new PWP. It seems it can sort of work as a shortcut to enhance a photo that's a little washed out or to add a little zing to any photo if used with care, not only to remove actual haze. But I can't decide if it's any different from increasing local contrast and saturation "on my own".
priort
Posts: 60
Joined: November 8th, 2019, 12:19 pm

Re: Dehaze explained

Post by priort »

It can often shift the colors...easy to get way too heavy handed with it but it can deepen and really help those washed out photos...
tomczak
Posts: 1415
Joined: April 25th, 2009, 12:56 am
What is the make/model of your primary camera?: Fuji X-E2
Contact:

Re: Dehaze explained

Post by tomczak »

I read the paper that Jonathan linked to above, and it is complicated... The way I understand the method is this:

1) First, they use the combination of saturation and brightness of the image to figure out the 'depth-map' of the image - haze, being an atmospheric scattering phenomenon, is higher for the image element farther away from the camera.

2) Then, they figure out the brightest pixel(s) from the original image that are also farthest away (according to the 'depth map' above) - that's their pure haze.

3) Finally, they darken the image and probably correct for haze tint (i.e. remove haze), the degree of this darkening depending on a) the 'depth map' b) the brightness/tint of pure haze.

In PWP the colour of the haze is guessed automatically, but you can change it to your liking. The Strenght slider is related to the ability of the haze to scatter light - not all hazes are equal...
Maciej Tomczak
Phototramp.com
Post Reply