Preset with Auto Levels

I have some values that I want to use as defaults, specifically the the highlight compression threshold. For example I would like to set it at 100, However I also I want to also use the auto levels feature, that then resets this value. Is it to possible to do this without modify the code?

You can apply multiple partial profiles to a raw file.

1 Like

How would that solve the problem? Thanks

Well, you have one partial PP3 which sets among other values for instance the highlight compression threshold. Another partial PP3 sets among other things the auto level feature. Now you first apply the first PP3 then the other one. And this can be done based on rules if you use dynamic profiles …

OK, so I don’t think you understand my question.

What I would like to is set for example the highlight compression threshold to 100 and then be able to press the autolevels button and the highlight compression to remain at 100.

Well in your OP you said that the initially set value should be reset by the auto level feature … that is exactly how the auto level works, it calculates all values on its own.

In you last post you said

That sounds like the opposite of the first post …

However, if you turn the sequence of the partial profiles around you will have the desired result.

Poorly worded on my part. In that sentence I was describing how the auto level feature currently works.

I will try again.

I would like to set a few presets in the exposure, namely the highlight compression threshold, these presets are then used by the autolevels algorithm as defaults. i.e. those default will not change when the autolevels button is clicked AND the values will be considered in the calculation.

Is this possible without hacking the code?

No, RT does not know, if a value is set manually or automatically or not. So the automatic does not know which values have to be set and which not.

OK, then as far as hacking the code, any tips? I built RT a while ago, with the intention of doing that. Is there a short developer guide on working through the RT code. Any preferred tools? Can I use gdb to step through some of the code etc. I programmed in C++ in a previous life.

Any tips appreciated.

auto level code

1 Like

Imho auto levels would benefit from some revamping :slight_smile:
ideally it should be more configurable, allowing the user to select what is affected by it. it should also work when the Dcp tone curve is used (and tone curves in general), currently it produces results that are way off in these cases.
also, just thinking out loud, it would be cool to have an “auto jpeg-like” that could eg. use histogram matching like suggested by @snibgo in another thread – I have no idea how well it would work, but it’d definitely meet the desires of many users if it turned out feasible…

2 Likes

Thanks, I will have a go at my first enhancement :slight_smile:

This is a great idea!

Not to forget HDR Tone Mapping which also fails in combination with auto levels (or vice versa)

Ok, I succeeded in changing the default highlight threshold to work with autolevels.

I am trying to get gdb to break on the entry to getAutoExp

I do:

(gdb) break getAutoExp
Function “getAutoExp” not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (getAutoExp) pending.

but it just goes right past it?

https://sourceware.org/gdb/onlinedocs/gdb/Linespec-Locations.html#Linespec-Locations

OK, the code change was pretty straightforward.

Now I can set the highlight threshold to 100% and make the contrast stay on 0, and press the auto levels and it basically just adjusts the exposure.

Is this something worth submitting a patch for?

depends on how this works exactly…can you elaborate? thanks!

It was a pretty simple change, as for the moment I just hard coded the Contrast to 0 and the Highlight Threshold to 100 (which is about 1 stop). Mainly because I am using RT to supplement, some other software (scans of camera film negatives) that pre processes the image, but I still want RT to have a first stab at adjusting the exposure, and BP and highlights.

So for me, the ability to influence the outcome of the auto levels is important. It would be pretty trivial to make the change configurable, in the PPS files, if you stored say 175, for the contrast, when you in fact wanted 75 for the value. etc.

But my solution works fine for me at the moment. Just expressing an interest, Indeed at some point I hope to understand the exposure section, well enough to write my own modified version, to support the film scanning project I working on.

I have still haven’t fully understood how the exposure algorithms work, so perhaps that a little too ambitious.:grinning: