De-haze tool suggestion

Would it possible to provide the RawTherapee de-haze tool with a scale running from -100 to +100? The idea would be to provide the option to add some haze, in addition to the more-usual haze removal.

I’ve seen this feature on later versions of Lightroom, and the effect is quite pleasing, for certain types of shots.

1 Like

Do you mean to add more haze to the image or recover some haze after dehazing? I know the original DCP dehaze algorithm allows for haze recovery to make the scene feel more natural.

I meant adding haze to an image. Unlike many people, I don’t like super-sharp, super-clear images, so I sometimes try to soften images. However, simple ‘blurring’ (as available in many photo-editors) doesn’t produce the effect that I want.

However, having been impressed by some examples of the ‘negative’ haze removal in Lightroom cc, it would be good to have that option in RT.

Shouldn’t be a problem to implement, though I wonder the merit of adding haze using a dehaze tool. Personally, I would do the following in GIMP.

1 Output 2 images from RT: 1 without dehazing and the other with it.

2 Subtract the two and generate a new layer from that.

3 Add this difference to the image without dehazing.

Voila, you should have a more hazed image. You might need to fiddle around with the range and tones but it should work. (I haven’t verified it but you can!)

1 Like

Thanks for the reply. What is the method for subtracting and adding images? I don’t use Gimp… I have an ancient version of PS. Any suggestions for that?

Thanks again. :slightly_smiling_face:

In PS, to get a “difference” image, you subtract with an offset of 127.

Thanks for the reply, @JenSCDC, but I’m afraid you’ve lost me. How does one “subtract with an offset of 127”?

I’m no expert in this stuff, so I could do with an “Idiot’s Guide”. :wink:

Thanks again. :slightly_smiling_face:

Sorry, should have been more verbose.

Do “apply image”, mode = subtract, and there will be an entry for offset.

Ok, let’s see if I’ve got this:-

Apply the dehazed image to the non-dehazed image with blend mode = subtract, and offset = 127

Apply the resulting image to the non-dehazed image using blend mode = Linear Dodge (Add)?

Is this correct? If so the results don’t look like I’d expected. I’m probably doing something wrong, so any advice would be appreciated. Thanks.

Sorry, I simply don’t have the time to demonstrate but what I will say is that Linear Dodge is definitely wrong because it doesn’t subtract or add all of the pixels in the same way. What you need is straightforward subtraction and addition.

1 Normal - Dehazed = Difference
2 Normal + Difference = Normal with more haze

Not sure if step 1 should be Dehazed - Normal instead. It depends on how PS orders its layers.

A long time ago, I liked adding some “haze” by simply applying a gaussian blur with large radius to a duplicate layer, and then play with blend mode and transparency.
@porchard could you post an image we could play with?

Thanks @sguyader - that seems to get fairly close to what I was looking for. I tried this method some time ago, but I couldn’t have been using a large enough radius, because the results weren’t as good. The larger radius seems to to do a decent job. I still think that a negative dehaze would be a good feature to have in RT, though! :slightly_smiling_face:

Thanks to you, and to all the others who replied. :+1:

Hello @porchard

If you are really interested in having this feature considered for inclusion in some future RawTherapee versions it might be helpful to add it as an “enhancement” in the Github web-page:

In short, you need to create a new “issue” in this web-page and add your request. Needless to say, you need to have a personal account before adding this proposal on Github.

Only having this request on this forum might be less effective for your proposal in the long run…

1 Like

Thanks @Silvio_Grosso. I hadn’t realised that there was a separate area for feature requests. :blush: :+1:

I decided to verify my instructions above. I didn’t use GIMP since you don’t use it, only G’MIC for a strict subtraction and addition. Raw file was processed using RT with neutral profile and some lens corrections and raw tab tweaks.

No dehaze

More haze = ( no dehaze - dehazed ) + no haze

More haze = ( no dehaze - dehazed_luminance ) + no haze

Hint You can control the strength of the haze by multiplying the difference with a factor; i.e., controlling opacity or adding new layers to stack on top.


Very cool @afre!

I’m in front of PS right now. Here are the steps to “reverse dehaze”.

  1. Take the dehazed image. “Apply image” with original image, mode = subtract, offset = 127. Let’s call the result “diff” because it’s the offset difference between the two images.

  2. Take the original (or copy thereof). Do Apply Image, using diff as the source, mode = subtract, offset = 127, opacity as desired.

1 Like

Many thanks again @JenSCDC. I’ve just tried this again, and it’s working well.

I really appreciate the time and trouble to which you - and the other contributors - have gone, to help with my request. Thanks, all!

so …,might we see an implementation of this in RT sometime :stuck_out_tongue: ?

Don’t know if you are aware of it, but the local adjustment dehaze does allow negative values. I’ve been using it for a while now.