Auto-Matched Curve

Hello,

I’m a bit unclear on what the Auto-Match part of the Auto-Matched Curve feature actually means. My uneducated guess is that it works like this.

  1. The application tries to figure out what base curve would work best for the given RAW file.
  2. RawTherapee then searches its curve library and picks the base curve that matches best the ideal one.
  3. The selected base curve is then applied to the RAW file.

Are my assumptions correct, or are they completely off the mark?

Thank you!

Kind regards,
Dmitri

my understanding is that it looks at the embedded jpeg in the raw file and tries to match the tone curve that would have been applied by the camera

7 Likes

@Wayne_Sutton has the right idea. It’s a histogram matching algorithm in essence. No lookup in a database or something like that.

Edit: there seems to be no information on the button on Rawpedia. This is in dire need of documentation, as per https://github.com/Beep6581/RawTherapee/issues/4951

3 Likes

Perfect! Thank you very much for your replies!

1 Like

Actually, RT takes the embedded JPEG in the raw file and computes a tone curve from it. That tone curve represents the difference between the linear raw image and the camera-processed JPEG.

So, the tool should be named “Auto-Matched Tone Curve Based On The Embedded Camera Processed JPEG”, but that would be too long to put in a GUI button… :smiley:

1 Like

If you use a DCP file with auto matching you will see that if you enable the tone curve in the dcp the auto match curve is often essentially linear but when you disable it then its a much stronger S curve like tone curve to compensate for missing tonal enhancement from curve in the DCP file…this shows the dynamic nature of the calculation rather than it looking something up…

3 Likes

@priort It also shows we really need to document this, because it is not obvious at all what the starting point for the auto-matching is (i.e. where does it work in the pipeline?)

I suspect it’s just a version of tone curve one so likely wherever that gets fired will be the same . The different curve styles makes a real difference ie selecting film vs standard vs weighted…some seem to desaturated while others don’t…so you can tweak it for sure

1 Like

Hello to all,
can anyone tell me whether to turn Look table on or off in DCP when I use Auto-Matched Tone Curve? With Look talbe it makes bright skies a bit bluer, but it seems a bit more artificial than without Look table. So far I have understood that if you use A-MTC you should switch off the tone curve in DCP. Is that correct?
By the way, I think A-MTC is really good now, I learned how to easily take back what this curve does too much of a good thing. With A-MTC, getting started with raw machining has become much easier.

micha

The use of the “look table” is just a personal preference (well, technically, everything is in processing images… :slight_smile:
The look table is meant to give a certain ‘look’ (sorry for the pun); the DCP profiles shipped with RT have a “perceptual” look table that tries to compensate for hue/saturation shifts introduced by the tone curve, so it is designed to work with that. However:

  • it’s unclear how this ‘perceptual’ corrections are computed. From my inspection of the dcamprof code, there seems to be a fair bit of personal taste of the dcamprof author in there (nothing wrong with this of course)
  • if the auto-matched curve is significantly different from the DCP tone curve, the look table above might be somewhat “off” (or at least not work as intended)
  • look tables in 3rd party DCP profiles might or might not work well with the auto-matched curve
  • finally, using the curve in ‘perceptual’ mode gives more or less the same effect as the look table in the DCPs shipped with RT (the perceptual curve code is based on an old version of dcamprof)

Hope this helps

Thank you very much for the quick answer. But the details (often) exceed my understanding. Therefore I would like to repeat what I have understood: It’s a matter of taste, both are ok: with or without Look tabel. Sometimes it is good, sometimes not so good. My experience also shows this. Apparently there is no always better or always worse.
I am in the process of changing my own pp3 profile. So far without A-MTC. But now I’m coming back to A-MTC, it brings good results quickly. Is it useful to switch off Look table in general (for my profile)? And the same question applies to the tone curve in DCP. What experience do you have?
micha

If you use the auto-matched curve, turn off the DCP tone curve. As for the look table, it depends on your taste…I can’t really comment on that! :slight_smile:

1 Like

I get along very well with this answer. Thank you very much.
micha

The rt look table for my Pentax cameras is a super saturated look. (Should double check, I learned not to use it way back) Ive always wondered who and why that look was embedded.

So what is the auto matched curve calculated from…I thought I had read something about being based on the embedded jpeg but if you turn on the tone curve in the DCP file that auto-matched curve dials back and is often becomes almost linear so it must come after the application of the DCP tone curve and not be based on the jpg or the result would then be that it would stay the same and the DCP tone curve would be added to it?? Just curious…

AFAIR this auto matched tone curve simulates the luminosity of the embed jpeg so that the resulting image has similar luminosity.

The general description is that it calculates histograms for the linear data and the embedded JPEG, then uses them to compute the cumulative distribution function (CDF, look it up…), which is essentially the curve needed to make the linear data look like the JPEG.

1 Like

Yes, it looks like the auto-match tone curve comes after the DCP tone curve but it tries always to match the JPEG.
I’m not sure to understand where is the problem

It was not a problem just an observation for me that adding the tone curve from a DCP was not really like adding it as the automatch curve changes as well…someone was asking the result of doing so and I thought it imprortant to comment so I am not sure in the end how different the images are if the automatch curve becomes almost linear after adding the DCP curve…I would have to do some comparisons to be definitive…but merely I was just pointing out that the curves are not additive as the automatch curve does not keep its original shape when the DCP curve is added…this might affect the decision to try this or not or etc etc… so this just got me to thinking about asking how is was calculated because if it was merely using the jpg as a reference I would not have expected it to change and then the curves would have been additive which likely is not going to produce a great result anyway so it seems good that the automatch adapts if the DCP curve is added…

Got it, because the DCP tone curve alone is generally very close to match the jpeg, so the auto-matching curve ( after the DCP curve) becomes “flat”.