Raw Therapee - how to stretch the histogram?

Simple task: the image was underexposed such that all pixels are below some threshold - let’s say all values are at 40% of maximum brightness or less.

With some apps, such as Astra Image, it’s pretty trivial to grab a slider next to the histogram, that defines the top brightness of the image, and move that slider to the left, essentially re-defining the top brightness. If you move it close to the brightest pixels in the histogram, then the histogram has been “stretched” - now the brightest pixels are close to 100%. Save image, and that’s all.

Is there an easy way to do that in Raw Therapee?

@Florin_Andrei Welcome to the forum!

The quick answer would be to adjust the exposure. Each stop increase is just doubling the value in linear space. Of course, we don’t have to increase by single stops; we can go by decimal increments.

But there is probably a question behind your question. The best way to get a good answer to your problem is to give a concrete example of your use case with a sample raw file. However, you may have to write a few more posts before the forum allows you to drag and drop files.

Is there not an auto levels in RT…I thought there was in exposure…I don’t use it that much but I am pretty sure…

EDIT It does not seem to be a traditional auto levels as it changes several parameters in a way the histogram is not a simple stretch but you could just drag in the bp and wp using a simple linear tone curve that should be the same…
image

1 Like

I agree with @afre in that you should do this yourself using the exposure slider until you get the desired (baseline) effect.

RawTherapee does have a few “smart” automated options: @priort mentioned auto levels already but there are also some bundled profiles that might be worth looking at. Especially the Standard Film Curve and the Auto-Matched Curve.

These are “smart” in that they try not to push the highlights too far and blow them out. This does happen on occasion though and the opposite, the image being still too dark, might also happen.

Maybe these can be of use to you, but I would suggest you do these things manually in order to get the best results.

I think the linear tone curve trick is close to what I need, or maybe identical.

For some workflows, the actual values of the pixels are important - e.g. for astrophotography. Many times, the images are captured in a way that the maximum value of any 8-bit component is below some threshold (say, 50%, or 127 in absolute values). While processing, you want to restore the whole dynamic range, while avoiding clipping, so you need to move the “ceiling” of the histogram down, close to the top pixels. That’s the essence of the “stretch” process, which is very popular in astrophotography circles.

I believe that’s exactly what Astra Image does when you grab the top histogram slider and you move it left towards the bright end of the histogram curve - it’s probably the same process as the linear tone curve transformation.

I’ll give it a try. If I enable clipping highlight, then it might be easy enough.

I still lack the simplicity of dragging a slider along the histogram. That’s the only reason why I use Astra Image - for everything else Raw Therapee does the job well.

Darktable has this traditional levels control with auto stretch and manual points to grab and drag gray white and black levels… if that is of any use to you

1 Like

One thing to note is that the histogram has adjustable clip limits. Warnings activate based on the conditions set under settings. If you are new to RT, check out its excellent docs to learn how to make the most out of the histogram tool’s features. Docs: RawPedia.

It may also be worth your time to look into math, programming or astrophotographic packages that are more technical in scope and will let you do exactly what you want with your images. Although RT and dt are useful in many cases of photography, they are generalist apps for the photographic workflow.

1 Like

Yup. For example that’s why I do stacking in siril and then feed the result to RawTherapee for final color management/tonemapping/etc.

Right. Well, I’ll probably never do everything in just one app. But RT is quite powerful and can do a lot for astrophoto. I’m comfortable with its highlight / shadow adjustments, black levels, stuff like that. Very useful.

If I could bring the histogram processing into that fold, it would reduce the size of the “fleet of apps” required to process images.

Do you mean the clip warnings that are adjustable for the preview? I.e. the level at which the preview shows the black and white indicators? The histogram just shows clipping in general at the highest and lowest values.

@Thanatomanic My mistake: must be thinking about another app.