[Playraw] Presolana (was: Salvaging a raw)

Hello.
I just wanted to share how I managed to salvage a raw photo. I don’t know if I just discovered hot water :slight_smile:
By the way, the original photo looked like this:


Very low dynamic range, and heavy blue haze. The mountains were several km away.
After a long and unsuccesful wrestling with Darktable, due to my scarce knowledge of it, I was about to surrender, when I had the idea of giving the file a run through Luminance HDR. I choose the Ferradans operator, and here is the result (after minor tweakings):

I was almost moved to tears :slight_smile:

This means that the data was there in the raw, and I wasn’t able to extract it in a meaningful way. Hence my question: what is a general approach to this kind of washed out blue photos? I think I’m missing some color theory principles to be able to understand the problem and therefore its solution.

Thanks,

Dario

10 Likes

The Farradans method, assuming it is TSTM as documented in https://www.ima.umn.edu/sites/default/files/2253.pdf, includes halo-less local contrast enhancement. It seems to be an effective method, but the maths is beyond my tiny brain.

We can get a similar result from simple tools. First, adjust colours with curves in Gimp or your favourite editor:

Then sharpen with an unsharp mask, a technique as old as photography:

The result isn’t the same as from Farradans, but not a million miles away.

[EDIT: I uploaded the wrong curve. Now corrected, I hope.]

2 Likes

Nice work!

If you post the raw file, other users might make suggestions how to achieve something similar also in DT.

1 Like

DSC00989.ARW (23.9 MB)
Here it is. If someone would share a darktable solution, I’d be happy.

This file is licensed Creative Commons, By-Attribution, Share-Alike
(Creative Commons, By-Attribution, Share-Alike)

Thanks,

Dario

A quick try in RawTherapee:

DSC00989.ARW.pp3 (10.4 KB)

See: https://www.darktable.org/usermanual/ch03s04s02.html.php

@jdc I tried Retinex in RawTherapee. Nice things happen to the lightness, but the colors are washed out. Do you know how to preserve the colors minus the blue haze?

Neutral + Retinex in RT:


rt_retinex.arw.pp3 (10.5 KB)

What I did with Darktable:


DSC00989.ARW.xmp (4.3 KB)

RawTherapee
rt_retinex.jpg.out.pp3 (10.4 KB)

3 Likes

The mountains are quite striking in black & white; the hills leave a little to be desired in the lower parts.

RawTherapee

Dario-Haze-DSC00989.ARW.pp3 (11.0 KB)

2 Likes

DSC00989_01.ARW.xmp (7.0 KB)

My try with darktable. A little of this, a little of that. Balancing the foreground and distance colors through the haze is a challenge.
DSC00989.ARW.xmp (20.1 KB)

2 Likes

@Morgan_Hardwood

Have you tried the branch “waveletnew” ? Inside, I made a modification which is inspired by the one realized for “Retinex in wavelet”, but which concerns Retinex (just after demoisaicing).
There is a slider for chroma, which acts on the “a” and “b” components of L * a * b *. :slight_smile:

@jdc it’s been a long time since I last tried it. I liked the changes. Will have to give it another go!

@Dario Thanks for sharing this problem. People sure are raring to tackle it. It is starting to look like a PlayRaw! Maybe include a license to your raw… Here was my result using dcraw and gmic. I will try to explain it in general terms so that you may apply it any way you would like.

  1. Demosaicing: In this step, I used the camera’s WB (I decided not to color correct here but you could!) with clipping and exported a linear gamma sRGB image for more latitude in later steps. (Edit: the output file should be 16 bit or more.) As a bonus, I used @LuisSanz’s RCD method.

  2. Processing: To remove the color cast, I subtracted (a fraction of) the average color from the image. I haven’t done it this way before but it sort of worked out. Next, I applied a curve to compress the highlights and consequently lift the shadows and mid-tones. This is the curve I used:

    image

    After that, guided smoothing in preparation for local contrast adjustments followed by an increase in chroma (LCH), since lifted dark areas have less chroma.

Salvaged! There is still some haze and color cast. My method doesn’t remove all of it but I think that leaving some behind makes the image more realistic – maybe.  Sorry, I didn’t resize the image for the post; I already spent too much time on this :blush:.

2 Likes

@afre thank you for flagging your own post for moderation. I have revised it and conclude that it is likely not spam.

Morning, all,

I have not yet managed to produce anything better than the postings above, but here is an idea that looks promising so far:

In darktable, stack three or four haze removal modules on top of each other. That, in combination with clever masks, ought to work wonders!

Have fun!
Claes in Lund, Sweden

Although you can use the haze removal module of the darktable, I usually find out that I prefer to remove haze manually using tone curves with drawn masks. The following photo has been developed by such a technique.


DSC00989.ARW.xmp (7.3 KB)

4 Likes

Hi. I’m trying to use your xmp but Darktable tells me about wrong version of bilat filter (?), and the image results very dark. I’m running Darktable 2.2.5 on Arch Linux. Besides, I have no haze removal moduel, maybe it’s found in the latest git version?

Dario