Question about Auto Matched Tone Curves

It looks like I need to create some custom sidecar (.pp3 processing profile) files now the I have multiple different cameras. If I save a .pp3 file where Auto Matched Tone Curve (AMTC) has been turned on what happens when that file gets invoked on a different raw file. In that, is the AMTC recalculated (i.e., customized) for the new usage? or is the same tone curve going to be applied to every raw file it is applied to?

Also, I notice that one of the so called bundled profiles is called AMTC. How does loading it differ from simply turning on the AMTC tool (Note: I have preferences set to use Dynamic Profiles rather than AMTC)?

At least for my cameras the Auto Matched Tone Curve won’t be identical for all photos from the same camera with the same settings. I think the camera does something beyond applying a single tone curve. Hence the AMTC is a better fit than the profile tone curve. It also respects some of the tweaks I’ve done to my camera jpegs such as increased contrast.

Your pp3 can have a truly auto matched AMTC but I sort this out by deleting some lines from the pp3 file ensuring that no specific curve points are saved. Perhaps this can be done with the gui but I just open the file in a text editor.

Keep in mind, AMTC computes a curve that is the difference between the raw data and the embedded JPEG extracted from that same raw file. So, if you don’t choose your in-camera Picture Control wisely, your AMTC probably won’t look nice…

I’ve become more and more enthusiastic about the AMTC because of this. It means you can set a starting point for your raw editing on site. A trace of your intentions.

1 Like

I actually often prefer the dcp file with all elements turned on… I find that the automatch often blows the highlights and so I just have to correct for that. If the DNR is not too large then I find it works better…

Is it possible you are thinking of “Auto Matched Camera Profiles” found under Color Management as opposed to Auto Matched Tone Curves found on the Exposure Tab?

I don’t do it for AMTC but I generally keep the camera settings as neutral as possible with most modifiers disabled. The JPEG would look the blandest it can be. This is mainly for accurate histogram and metering. Doing so also prevents the JPEG from being a distraction to my raw processing.

Yes I know…Infact the two interact if you use the tone curve in the DCP file…check it out often the auto matched tone curve becomes almost a strait line once you apply the TC in the DCP … I prefer to apply the tone curve via the DCP file is what I was referring to. I just disable the auto tone curve…

@ajax

If you create a profile from the exposure module after you have pressed Auto Matched Tone Curve the settings that the AMTC calculated will be put in that profile. Loading that profile, be it dynamically or manually will not invoke a recalculation, it will apply the previously found values that are present in the stored profile.

If you want to dynamically apply an AMTC you need to use the ones that are part of the Bundled Processing Profiles. The AMTC will be the same for the High, middle and Low ISO versions. The differences between the 3 are changes in demosaicing, capture sharpening and noise reduction modules. So, worth making sure that the correct ones are set for the ISO setting.

Alternatively:

Although RawTherapee does not come with a large amount of camera+type specific dcp profiles out-of-the-box it might be worth looking into (the Colour Management module), especially if you have access to the profiles that adobe supplies. You can get them via the Adobe DNG converter. One of the installed directory contains tons of camera and type specific DCP profiles. These have general and, if needed settings specific (flat/neutral/vivid/landscape etc) embedded tone curves that can be used if you want (you can turn them on/off).

That is what I suspected.

I think I know how to invoke so-called bundled profiles manually (i.e., individually) but NOT dynamically. I did recently learn about Another RT program (i.e., called ART) which comes (out-of-box so to speak) with several of the bundled profiles included in Preferences>Dynamic Profile Rules. Those rules have NO camera or lens defined (i.e., fields are blank) which I take to mean they apply to any/all cameras/lenses. If I define such rules in RT (i.e., myself as opposed to out-of-the box) will they work that way?

Short answer: Yes.

In the New Dynamic Profile Rule window point Processing Profile to an existing or self made profile and leave the rest as-is. This will be a globally applied rule.

The order in which the dynamic rules are applied do matter! They are applied from top to bottom when viewing the dynamic rule window. So start with your global rule(s) and then the specific rules (if you want/have any).

I’ll sometimes deviate from this, but rarely, if I’m “on the go” and want to quickly post something to social media from mobile. (Usually for the purposes of promoting a friends’ concert on social media as it’s happening).

I personally prefer “standard film curve” to get consistent behavior regardless of what camera I’m using. I’ve rarely felt a need to deviate from it.

Edit: Getting back to the OP’s question, I wasn’t sure what the answer was to that, others have provided it. I will point out that additionally, you can save the curve separately from other profiles within the curve tool. I’ve done that for the purpose of feeding the curve to some Python scripts I have for a project involving reverse engineering camera transfer functions - using the AMTC results as a sanity check of my xOpenCV calibrateRobertson approach.

That’s actually a bit strange, unless you’re pulling one of the Adobe “Camera ***” profiles which I believe are tuned by Adobe to look like the JPEGs. The RT bundled profiles are using Anders Torger’s “neutral tone reproduction operator” approach IIRC. (Ones built using the rawpedia documentation definitely are, but most of the bundled profiles are generated by the GUI variant of dcamprof, lumariver, and while the engine is the same I’m not sure if settings were changed.)

My camera shoots native DNG and embeds the tone curve. It’s actually a bit hard to know exactly what matrix and tone curve is being used when selecting standard (sorry wording in english escapes me because my work computer is windows and has swedish language RT installed) because the tooltip suggests three possibilities without indicating which is active. I think ART has solved this.

Anyway I also get a near linear AMTC with some settings and scenes, the adobe camera dcp is close as well. However as mentioned my camera doesnt seem to have excactly the same tone curve all the time.

WOW - that’s rare!

hmm perhaps I was wrong and it’s only the simple matrix. “At work” so used dcpTool on windows and I don’t know if it extracts tone curves. Perhaps I should move 5m so that I’m “at home” :slight_smile: and see how art reports it.

<dcpData>
  <CalibrationIlluminant1>17</CalibrationIlluminant1>
  <CalibrationIlluminant2>21</CalibrationIlluminant2>
  <ColorMatrix1 Rows="3" Cols="3">
    <Element Row="2" Col="2">0.755400</Element>
    <Element Row="2" Col="1">0.042400</Element>
    <Element Row="2" Col="0">-0.018400</Element>
    <Element Row="1" Col="2">0.378600</Element>
    <Element Row="1" Col="1">1.016600</Element>
    <Element Row="1" Col="0">-0.341200</Element>
    <Element Row="0" Col="2">-0.126100</Element>
    <Element Row="0" Col="1">-0.604900</Element>
    <Element Row="0" Col="0">1.171800</Element>
  </ColorMatrix1>
  <ColorMatrix2 Rows="3" Cols="3">
    <Element Row="2" Col="2">0.650900</Element>
    <Element Row="2" Col="1">0.174600</Element>
    <Element Row="2" Col="0">-0.092800</Element>
    <Element Row="1" Col="2">0.155000</Element>
    <Element Row="1" Col="1">1.220400</Element>
    <Element Row="1" Col="0">-0.361200</Element>
    <Element Row="0" Col="2">-0.131800</Element>
    <Element Row="0" Col="1">-0.301300</Element>
    <Element Row="0" Col="0">0.939900</Element>
  </ColorMatrix2>
  <ForwardMatrix1 Rows="0" Cols="0"/>
  <ForwardMatrix2 Rows="0" Cols="0"/>
  <ReductionMatrix1 Rows="0" Cols="0"/>
  <ReductionMatrix2 Rows="0" Cols="0"/>
  <EmbedPolicy>0</EmbedPolicy>
  <ProfileHueSatMapEncoding>0</ProfileHueSatMapEncoding>
  <UniqueCameraModelRestriction>PENTAX K-1</UniqueCameraModelRestriction>
  <ProfileLookTableEncoding>0</ProfileLookTableEncoding>
  <BaselineExposureOffset>0.000000</BaselineExposureOffset>
  <DefaultBlackRender>0</DefaultBlackRender>
</dcpData>

It’s been a sort of question on my mind for a while what excactly it is that RT is using.

RawTherapee/rtdata/dcpprofiles/RICOH PENTAX K-1.dcp at dev · Beep6581/RawTherapee · GitHub - RT has a dual-illuminant DCP for that camera, so that’s probably what is being used.

Note that AMTC operates via histogram matching, so it not always giving the same results is expected if the scene content changes. Also in-camera lens distortion correction was in the past known to throw off AMTC - I can’t remember if there were fixes put in for that.

The curve of most cameras is probably close enough to Anders’ default curve that running AMTC against it will probably be a fairly gentle correction - I wouldn’t expect it to be perfectly linear but I would also not expect it to be significant.

The results vary somewhat from image to image and maybe I was not clear from what I said but it would appear the ATMC is trying to give the same overall result so when you apply the tone curve from the adobe DCP file (which must get applied first) often there is not much correction left in that curve so the resulting ATMC displayed can be anything from almost linear to a curve consisting mainly of a bit more shadow toe or highlight bump. In any case I turn it off. Some might see this as a tweak of the adobe curve and like it who knows and I don’t know if in the end you get the same image as ATMC alone or not… I have not looked that closely…

Sorry but I got distracted and have just now gotten back to working on this.

It does seem to work as desired. In that, AMTC can be dynamically applied. However, based on my finding some care is required. My specific rules are fairly basic. They consist of identifying the camera & lens and explicitly (manually maybe the RT term) selecting the DCP & lens profiles along with my preferred Output (Color) Profile. Then AMTC becomes a why NOT see what that does for starters.

My method of defining the camera specific rules involves starting with a RT provide Negative Processing Profile and then setting the things mentioned above. However, because I want AMTC to be dynamic (i.e., computed separately for each raw file) it is turned off (reset) in the camera specific profiles that I save for the purpose of dynamically invoking. It seems that off (reset) is explicitly defined in those profiles such that if those profiles are positioned last (or after the AMTC profile in the list of profiles) then it will reset the AMTC. At least, that is the behavior I’m witnessing. As long as I position the AMTC in the list of Dynamic Profiles after the camera specific profiles it seems to get applied as desired.

If there is a way to create a profile that simply omits the setting for AMTC, I don’t know how to do that.

To be honest you lost me with the above, not enough details about what it is you are actually doing/trying. That being said:

Assuming you are talking about the Auto-Matched Tone Curve that is found in the Exposure Tab → Exposure: This one cannot be activated or deactivated in a stored profile. This one only works on-the-fly (as in: press it manually to make RT calculate values for that specific RAW), as mentioned before: The calculated numbers for that specific RAW are stored in a saved profile and not the calculate values action itself (no intelligence).

Besides all that, there’s the issue of applying the Film Negative profile, which already sets some values/curves in the Exposure Tab → Exposure. This profile also uses the default values for the Colour Tab → Film Negative settings. This might be worth looking into and correcting if you are using the same film brand/type negative.

If you apply another dynamic rule that also targets Exposure Tab → Exposure all (!!) previously set settings will be changed/overwritten in this module. Not sure if that is what you want. The film negative profile sets these for a reason, although you might want to change those, that’s up to you of course.

Not sure if you are aware of this but you mention picking the correct camera, lens and DCP profile: You do realize that you need to pick the camera/lens/profile for the camera that “scanned” the negative and not the (35mm film) camera that was used to take the actual image, right? You need to correct the scanning process, the correcting of the film/negative is done via the Film Negative module.

You can automate this, the correcting of the scan, though: Use Auto matched camera profile in the the Colour Tab → Colour Management module. If RT cannot find one it will fall back onto the Camera Standard type. Things become a bit more complicated if you have and are using the adobe DCP profiles extracted from Adobe DNG converter. But if the camera(s) used for scanning are known you can create specific dynamic rules for those.

Anyway, hope you get something out of the above answer(s). If not: Ask again :slight_smile:

1 Like

Are you really sure about that? I haven’t worked with it for a while but I’m pretty sure I have a base pp3 that applies the Auto Matched Tone Curve. I’m pretty sure you can toggle the AMTC button and if it’s pressed it will be applied upon loading the profile. I think it just won’t work when pasting a profile.

I can be completely off though and I can’t test it right now…