Could RawTherapee export edits as ICC profile?

Hello,
I recently saw a video (https://www.youtube.com/watch?v=SCFoqJhl8po) that discusses the new type of presets in Adobe Lightroom (colour profiles) and how some of the old Lightroom presets were converted to them. it’s basically like applying a LUT, in the sense that the image adopts what colours would result from a preset, but without the ability to manipulate the details of it …in exchange you get to now have a clean slate with all the other settings like brightness, contrast, curves, to apply on top of that effect.

I realize we can do this in RawTherapee by saving a LUT, applying it to the raw file and then doing further editing; but I was wondering, instead of a LUT,

could we export the change in colour that a particular combo of edit would cause to a raw file, as an ICC file instead?

Anything that manipulates color or tone could conceivably have its effect baked into a ICC camera profile. Thing is, it’s kinda like using a screwdriver to do wood carving; there are better tools for the job.

That said, you should probably read all of Anders Torger’s dcamprof documentation, paying particular attention to “look profiles”. A lot of what dcamprof does, and most of what Lumariver is targeted to, is the construction of such profiles that do essentially what you posit.

http://rawtherapee.com/mirror/dcamprof/dcamprof.html
http://rawtherapee.com/mirror/dcamprof/camera-profiling.html

1 Like

@ggbutcher thanks for the link and the comment!

I’m a big fan of what the LUT implementation does in RT, that we can save a particular look into a single file we can then load and do additional editing on top of it. Speaking of that, layers would be nice but that’s another topic.

The one advantage of icc output rather than creating a hald clut is that the iccs can be loaded into other software such as Lightroom so they too can partake in the RawTherapee awesomeness :stuck_out_tongue:

The answer to this question is complex, because each software has its own rules of operation.
Linear or not, choice of “working profile”, choice of “pp3” type files, etc. So thinking that you can switch from one software to another is necessarily limited.

Nevertheless some features are I think generally “compatible”, as for example in RT, the output profiles that you can generate with “ICC Profile Creator” and that I think can be used elsewhere.

I can point out the branch under development (trcnew) which is inspired by the principle you mentioned, with the notion of “Abstract profile”.

Here are the main features
Here is a summary of the current functions I have implemented in “trcnew” and “trcprim” along with the reasons for the design choices and the advantages and disadvantages.
Some aspects are similar to:

  • Darktable (calibration module), but completely different in the way it has been implemented
  • Photoshop as far as the basic concepts are concerned
  • Some of the Lightroom ‘camera calibration principles’ i.e. the ability to modify the Input profile data (I don’t have Lightroom to test it and I don’t have access to the code to see how it has been implemented).
  • ART in so far as the possibility of modifying the primaries is concerned (I didn’t look at the code).

Functions

  1. Ability to modify the TRCs at the end of the process - just before Ciecam. (I moved it recently to be able to use “Cat02”).
  • the TRC as implemented has at least 3 uses:
    a) change the aspect of the image, for example by replacing the sRGB TRC with BT709;
    b) process underexposed images (high slope - the higher the gamma, the higher the slope can be);
    c) “refine” the data of the “input profiles” (primaries and illuminant).
  • the TRC changes the data at the end of the process, maintaining downstream linearity (which will always be destroyed by any tone-curves placed downstream) and preserving the colorimetry.
  • as this TRC is “embedded” in a (virtual) ICC profile, there is gamut control (that of the selected “destination profile”).
  1. The possibility to modify the illuminant (white point: D50, D65, …) with 3 possible uses:
  • adapt the gamut of the current “working profile”, when the shooting conditions are notably different from those of the working profile illuminant. When you change this, the values of the RGB-XYZ matrix are changed (I recommend using Ciecam as well in this case although it isn’t mandatory). This ensures that any out-of-gamut colors go back into the gamut.
  • create “artistic” effects with enhanced “color toning”
  • Ensure that any changes to the input profile are taken into account. For example, if the abstract profile is used to ‘modify’ the way the input profile data is interpreted and in doing so the white balance is changed for example from 5000K (D50) to 6000K, then the illuminant of the profile should be changed to D60.
  1. The possibility to change the primaries using the same principle as Photoshop (“xy” data)
  • either for artistic purposes, in which case there are 2 possibilities:
    a) using a series of presets for “working profile” and destination profile;
    b) using “Custom”, in which case much larger changes can be made. I changed the limits of the possible values “xy” which will lead to virtual colors. However this is not important because that’s precisely the goal and the profile ensures that the output remains in gamut. Using Ciecam (placed just after) in conjunction with this feature increases the possibilities for special effects.
  • or for colorimetry purposes, to adapt the data of the “input profile" / “Working profile” and improve the “calibration”. By placing it at the end, we take into account - when applied - all the functions that have been activated in the processing pipeline, and in particular will make everything fit into the gamut. This avoids sending imaginary colors and/or with colors with negative RGB values to the monitor and Output profile .
  • Whatever the changes, the use of the ICC profile will ensure the data stays in gamut.

This summary roughly translates how it works along with the advantages. The module must be at the end of the process, when I put it at the beginning… it was a mistake.

I see the following disadvantages:

  • increased processing time
  • module not very GUI friendly - a GUI with a CIE XY diagram would be ideal - similar to the “Color correction grid” (I don’t know how to do)
  • Partial paste to modify the data of the input profile. This may not be a disadvantage because creating a real ICC profile would cause more problems than it solves.
  • lack of documentation…but we can fix that.

Admittedly this does not allow the passage of parameters from one software to another, but allows in RT, this passage of parameters, especially for an identical camera

We find this same principle here

1 Like

What I mean is to use RawTherapee to generate an ICC profile that can later be loaded and give a look that matches the RT edits.

@stefan.chirila

You can do this with “abstract profiles”…But, to simplify and avoid complex manipulations to “save” (where, with what name…) and “load” (where, name,…) the ICC profile, you do this with :

  • “Processing Profile Operations - Copy” with the file “master”.
  • Then with the file “destination” - “Processing Profile Operations” - “Partial paste” - “Color Management settings”.

But of course, I think for 95% of the data (not for “Preserves neutral tones”) an ICC profile could be created and then loaded.

All work in “Master” with “Abstract profile”, which is a “virtual profile” of ICC type, but hiden in the code will be applied in the destination image.
This “virtual profile” has the same ICC characteristics (moreover the code is very close) as the profiles generated by “ICC profile creator”

This profile is applied at the end of the process, just before the screen profiles (monitor) or the output profile , and of course modifies “RGB and Lab values”… all the upstream code is unchanged, put all datas in gamut…and prevent negatives or virtual datas…

With that you can (simplified):

  • change slightly the tones of images (for example to change the appearance of the image which is usually “sRGB” for example for BT709… try it and you will see the difference)
  • process “underexposed” , “high dynamics” images
  • create “artistics effects”
  • refine or adapt “Input profile” (calibration)
  • etc.

Jacques

But, of course, one cannot put in the ICC profile anything other than what is possible. For example, I don’t think we can put all the luminance, contrast, color settings.

The profiles used make it possible to retouch 3 things: a) the TRCs, b) the white point (illuminant D50…D65…), c) the 3 primaries (red, green, blue) of the workspace

Maybe, and I’m not sure, more complex profiles with A2B, B2A instead of primaries and TRC fields, could bring a small improvement…but I don’t know how to do that.

Jacques