Call for example raw files

Sure. Every example is welcome :slight_smile:

I tried to shoot worst case scenario, and came up with two images that have somewhat unique qualities.

Here is one that the bottom right has heavier flaring than the rest of the image.
DSCF2983.RAF (23.8 MB)

Here is one that got some rainbow flares. I’m curious to what the algorithm does to it.
DSCF2988.RAF (22.8 MB)

@chaimav Thanks for the examples :+1:

The first one did a nice job. I like how the rainbow flare was enhanced. But this one - not so much. The shed came out way too black on the upper left. It is really much more red in real life. Then again, I am not sure any better is possible. The image was pretty shabby to start with.

Well, the algorithm just subtracts values from each pixel in the image, which also causes a darkening of the image.

How about this?

It still has more black in it and is higher contrast than the ground truth, but it is definitely improved.

I finally got shareable orange cast images.
Here is one with recognizable subjects DSCF3463.RAF (22.7 MB) (The car color is ‘sterling gray metallic’)
And here is one with hazing cranked all the up to 11 DSCF3461.RAF (23.4 MB) (shot through a window screen which explains the grid artifact)

Heckflosse’s new tool will probably best be used in conjunction with some either Shadows / Highlights, or dynamic range compression, or good old reducing contrast in the exposure tools, to lessen the effect of too deep of shadows, resulting in a lower contrast, yet less washed out, image.

Here’s a before/after of the car shot

Definite improvement. It is also interesting to note that the algorithm did not change the color cast in meaningful way. It still kept the warm tones. This is exactly why I wanted to get an image like this for test. (This can be a good thing or a bad thing of course… depending on the image, the hue of the haze, etc).

This is different than the existing haze removal tool that in standard mode shifts some colors and has a tendency to make them look washed out in luminance mode. :+1:

Any estimates on when this will be available for public testing? There is a fairly large market out there for vintage and cheap fast lenses.

If I understand correctly, RAWs with haze are somehow acceptable?

If so, I’m giving you the following two files: Hazy RAWs.zip (86.0 MB)
The permission is to use them only for open source development/testing. You probably have one more RAW with similar problem from me from GitHub issue. I don’t expect miracles from the RAW editor, so I avoid to take such photographs.

There is a noticeable color shift in the dog examples.

Thanks for the files :+1:

Here a comparison:

Top left: RT Standard Film Curve Iso Low profile.
Bottom left: As top left but + current Dehaze at default settings
Top right: As top left but + the new method
Bottom right: As top left but + the new method + current Dehaze at default settings

2 Likes

Thanks, the top right results look promising. I usually use curves to mitigate the haze. I think that my approach is a bit flawed, because the tone curves work in non-linear space.

I don’t use Dehaze and other tools with spatially varying effect, because I prefer to preserve the realism in my photos. The attempts to outsmart the nature or to deceive the viewer with spatially varying effects usually produce images with chewed up look. As I understand your method is spatially invariant (global).

1 Like

It works on raw data (linear) before demosaic und just subtracts for each channel of RGB the mininmal value of the channel. Totally simple and cheap.

Hmmm, interesting assertion, (asking the audience) is this really the case? My understanding of control-point curves is, they don’t care about the input data; with regard to linear, they’re just harder to work with because the data is all over on the left side of the histogram… ??

My approach is to do this:

Assume you have a long distance landscape shot and/or a lens/camera-combo which has a lot of internal reflections.

Further assume there is an area in the image which is not not bright enough to reflect light to the sensor.

Conclusion => This amount of light must be caused by either haze between lens and subject and/or reflections between lens and sensor.

If that’s the case, we probably can measuere it and subtract it. That’s my approach.

Ingo

1 Like

Some relevant explanations from RawPedia taken from here and here:

The working profile specifies the working color space, which is the color space used for internal calculations, for instance for calculating saturation, RGB brightness/contrast and tone curve adjustments, chrominance, etc.

Note that the working profile will only specify the red, green and blue primaries, gamma will not change as RawTherapee’s processing pipeline is floating point with no gamma encoding (that is gamma = 1.0). Some tools (like curves and histograms) will still display with a gamma (usually sRGB gamma) which is hard-coded for the tool and stays the same regardless of working profile.

The curve and histogram is always displayed with sRGB gamma, regardless of working or output profile. This means that the shadow range is expanded and highlights compressed to better match human perception.

So any tone curve (except for the diagonal) will be deformed before it is applied to the image data in the linear by default working color space. This means that it is practically impossible to create a tone curve with purely linear effect (except for the diagonal) and therefore any attempt to do this will have non-linear side effect on the image. It is technically better to avoid side effects – that’s why I think the method of Ingo is preferable. Also for the same reason it is preferable to use Exposure compensation instead of tone curve for adjusting the exposure (especially for severely underexposed RAWs).

I think we were probably talking past each other. When you said, “the tone curves work in non-linear space”, I thought you were referring to the input to the tone curve having to be non-linear. Yes, a “non-diagonal” tone curve applied to linear data takes it out of linear, agree there.

We’d had prior discussion about how control-point curves need non-linear input so the control point mechanism can be effectively applied, that’s where my head was at.

Apologies for the sidetrack…

Is this feature in any of the Dev versions yet? I’d love to play with it

It is in branch poor_man_dehaze. But currently it logs the values only in console and you have to enter them manually.

2 Likes