Custom Input Profile (Color Management) DCP

I was wondering is it possible in Rawtherapee 5.9 linux installation to write a script and thus auto import based on the exif data of the RAW file a Custom DCP profile?

Right now what I do each end every time is to load the RAWs from the camera/CF card into Rawtherapee and then Batch Edit them using the Color Management tab and into InputProfile module select the custom profile (DCP profile) of my camera.

The above process via a script does not save too much time, since the batch edit process does not take too much time, yet is another automation that might be useful. The main question is if Rawtherepee allows of such a script execution and recognition of the results.

Reference: https://rawpedia.rawtherapee.com/Color_Management#DCP

Did you already look at RawTherapee’s Dynamic processing profiles?

This would, automatically when loading the RAW, apply certain wanted changes based on certain criteria.

In short and for your specific case:

  1. load a RAW and set the wanted DCP options in the Colour management tab,
  2. do a selected (colour management tab only) save to create a cm/dcp specific profile,
  3. go to the Dynamic Profile Rules section in preferences,
  4. create a new one based on the previously created profile (step 2) and maybe some other criteria.

The above steps would look like this for a random canon i choose:

1 Like

That is an awesome feature. Thank you.

I did read some more on the link I sent about Adding Custom Working Profiles and using dcamprof (DCamProf) tool but I think what you posted is more relevant.

Thank you once more!

Well I have tried on linux build and it did not work as expected.

The only different thing I did is to add the lens future in. Consequent photos for the dynamic profile to be applied are in the same settings (camera, lens etc) but when I click to the next photo (app even restarted after the application of Dynamic Profile Rule) it does not apply the DCP settings that I saved previously via settings in RawTherapee.

Version: 5.9
Branch: releases
Commit: 9b8583988
Commit date: 2022-11-27
Compiler: cc 12.2.0
Processor: x86_64
System: Linux
Bit depth: 64 bits

Here on the second video you have uploaded you edit a Canon cr2 file. On the previous one you did edit a Nikon .nef one. I was wondering if you have multiple rules saved as profiles do you have to move them up and down every and each time that you edit a mix of files with different lenses and/or cameras? Does the system recognises those changes or do you have to move the saved profiles around (up) for the automation to be successful?

No, you set a condition on each line like camera or iso or whatever you have as a criteria available.

It is not clear to me what you did(n’t) do that might give you this result. I can give you some general pointers that come to mind, though.

The order in which dynamic profiles are applied might be the culprit depending on what is in the profiles. They are always applied from top to bottom, assuming that criteria is met, and if an entry exists for one that has been set by a previous rule it will be overwritten.

Set up general stuff first (a base profile for example) and then set up very specific profiles for very specific cases.

I mostly use 3 different camera’s and need to take care that the correct one is targeted by those specific rules. These rules can be finicky btw! Make sure that the camera/lens/etc names are correct (as shown by the Quick Info button (i shortcut in editing mode or in the Metadata tab).

As shown in the above video a restart shouldn’t be needed when you create/edit a rule.

There’s no need to move rules up/down before applying them, assuming that rules are unique and that the above mentioned is taken care off.

If you want/need multiple profiles that are not unique (i.e.: you have 2 different, personalized DCP files that are specific to one and the same camera) you cannot use auto dynamic rules (there’s no unique identifier, so the second one will always be applied if dynamic rules are used). In this case you can select all the RAWs you want to apply the profile to in the file browser and:
Right click → Processing profile operations → Apply → My profiles → DCP.PROFILE.X

You do need to make sure that any (dynamic) profile that is auto loaded after that action does not have the same entry (be it empty or otherwise filled).

If this still doesn’t give you any clues about what it is that isn’t working on your side of things please tell us a bit more about the workflow and what has been set up.

One other thing just came to mind: The Processing profiles fill mode (the icon left of the Last Saved pull down). This one regulates overwrite/fill when using loading profiles.


The RawTherapee version shouldn’t be a problem. I use(d) different development versions and stable versions, both self compiled and the available appimage. I’m also on Linux.

Clear enough on what you said. I’ve made a small video on my process. Starting the video I have already made a profile that it should work with the lens included as mentioned in the information on the top left on the working panel in the RT program.
I go on and make a second attempt just with the camera name on but this does not work either.

Have you set this to dynamic?

grafik

Also, if you test with previously opened photos, make sure to “Reset to default” instead of “Clear” the profile before testing.

1 Like

That was it. Its now fixed and working.

1 Like

Just tried the RT 5.10 with the old settings and DCP profiles I had from RT 5.9

It does not seem to work. Do I have to recreate them from scratch?

My dynamic profiles are still there an working.

Where did you install 5.9 and 5.10 from? Do they use the same config folders? From a repo, appimage or appimage-dev can all have different config folders…

grafik

It seems that the program does find the folder as seen from the PrntScn

Its RT 5.10 flatpaked

And 5.9 was too? Or you copied your 5.9 config folder to 5.10 flatpak config folder?

Yes 5.9 was flatpak installation from the Tumbleweed repository.

I did not copy anything. Just upgraded to the newer version via the CLI prompt and giving the command $flatpak update

Please note that the Default Processing Profile is set to (Dynamic) as you mentioned in a previous post in this thread.

Hm, I’m afraid I’ve no idea why it doesn’t work. I’ve just installed the flatpak, copied my config from my appimage version, and dynamic profiles seem to work properly.

1 Like

Well I started doing the profiles from scratch while I noticed a weird behaviour of RT 5.10 as far as the identification of the lens is concerned.

On some lenses such as Tokina 100mm f/2.8 Macro and Tokina 16-28mm f/2.8 and Tamron 70-200mm f/2.8 G2 the RT recognises them as plain numbers as seen in the following PrntScrn

Here the lens is a Tamron 70-200mm f/2.8 G2 and on the top left it recognises it as 226 !!
Is that a general problem? Could someone please verify?

The exiv2 version (if that is what RT 5.10 uses) on Tumbleweed right now is:

> exiv2 --version
exiv2 0.28.2

And I am uploading a photo that is also recognised wrongly that was taken with a Tokina 16-28 f/2.8 for anyone to test on RT 5.10 (+ 140 appears for a lens on the top left info panel)
NIKON D4_Tokina_16-28mm_f2.8.NEF (19.4 MB)

For 'NIKON D4_Tokina_16-28mm_f2.8.NEF, exiftool finds the following nomenclature for the lens:

[MakerNotes]    Lens                            : 16-28mm f/2.8

In the current Lensfun database, this is the nomenclature for the only Tokina 16-28mm lens:

Tokina AF 16-28mm f/2.8 AT-X Pro SD FX

Since Nikon metadata doesn’t tie a manufacturer with the lens spec, this is a case where you will probably need to manually select the lens…

Edit: Oh, I should point out that exiftool does supply this information in their Composite tag section:

Composite]     Lens ID                         : Tokina opera 16-28mm F2.8 FF

That’s an exiftool assertion; don’t know how they come up with that…

5.9 appimage:

grafik

5.10 appimage:

grafik

RT 5.10 like ART and darktable uses exiv2 to get the exif info and it doesn’t have a mapping from nikon exif tags to a lens name like done by exiftool (exiftool/lib/Image/ExifTool/Nikon.pm at master · exiftool/exiftool · GitHub).
Indeed all of them see the lens only by id 140.

RT 5.9 used its own exif parsing and code like the one from exiftool to map some nikon lens names: RawTherapee/rtexif/nikonattribs.cc at 5.9 · Beep6581/RawTherapee · GitHub but this has been lost when migrating to exiv2.

Probably this should be reported (if there isn’t an issue opened) and fixed directly in exiv2 GitHub - Exiv2/exiv2: Image metadata library and tools instead of adding the same workaround in every program using it. They should probably be added here.
As a workaround you can make a local exiv2 config file with the lens mapping exiv2/exiv2.md at main · Exiv2/exiv2 · GitHub