A new tool in Rawtherapee "Abstract Profile"

Done for sliders :slight_smile:

3 Likes

And again he shoots faster then his shadow :grinning:

Pulled, build and it works nicely.

That’s a much nicer solution and its more consistent with the default prophoto working profile.

Thanks!

1 Like

Hello Jacques and others!

Do I understand this right? Luminance estimation is done by CAM02 or CAM16 and that luminance is then changed when adjusting the TRC?

Cheers!

@PhotoPhysicsGuy

In most cases we act on the 3 channels R,G,B which are at their values at this moment of the process.

So we don’t only act on the luminance. Depending on the case, we use :

  • either a function of LCMS which calculates according to gamma and slope (TRC parameters) some parameters which will be passed to the virtual profile
  • or the new RGB values are calculated directly by applying gamma and slope (case where the user does not use the primaries)

The 2 values gamma and slope are used to calculate 5 parameters which allow the connection of the linear part and the parabolic part without discontinuities. This is the absolute condition to have a good result.

The values using cat02 or cat16 are only taken into account if Ciecam is activated, to elaborate the calibration if you want to change the illuminant of the input profile. This will change the RGB values, otherwise everything is the same as before.

Is this clear?

jacques

1 Like

Good job @jdc and friends! And quality explanations and documentation!

I just open a PULL REQUEST with a general Reset button

  • Set the “destination primaries” to the same value that “working profile”,(and set sliders primaries and illuminant to the destination primaries)
  • set gamma slope, preserv to default values
  • set general menu TRC to none

https://github.com/Beep6581/RawTherapee/pull/6243

jacques

This part I don’t understand fully, but probably because I do not know enough about how RT works internally. But the TRC is not derived from a ciecam model if I understand you right. Ciecam is only used, in whatever version, for color adaptation transforms.

I think it’s clear. I’ll try to find something about the linear and parabolic parts of the TRC.
thank you so much!

While the term ‘abstract profile’ makes a lot of sense in the classification of profiles, it may be useful to think about a different name for the module, revealing more about the intended use. The name is pretty abstract (3a or even 1b). Has this been discussed elsewhere?

for info this is one of the 7 ICC profile types ColorWiki - The 7 ICC Profile Types

I found a PDF Building ICC Profiles - the Mechanics and Engineering that describes the abstract profile.

This profile may be used to perform some overall image affect and might normally be used in a link between other device profiles.

3 Likes

I have merge in “dev” the “reset” button

Jacques

2 Likes

I have to say I think I agree about changing the name to something else besides abstract profile. Since there’s already a type of ICC profile that does LAB to LAB conversions (basically they are what cube luts are to RGB) it’s kind of odd to see something called “abstract profiles” where you load in the input and output color profiles. One would expect being able to load in that particular type of ICC profile given its location! I think the abstract profiles bit would be good in its own module, perhaps in the same tab as Retinex and CIECAM. Even if the name is kept, at least it wouldn’t be mixed in with the color profiles.

That’s just my two cents. Ultimately it’s not terribly important :upside_down_face:

1 Like

@bkv

Thank you for this evaluation. :wink:

There has been a long (very) long debate on this subject since October 2020 (name, location, what it’s for…)

I remind that “abstract profile” does not load or change the input and output profiles…
They only use “working profiles” (which are not ICC profiles, but only RGB->XYZ code)

As a reminder 2 rawpedia links.
https://rawpedia.rawtherapee.com/Color_Management#Abstract_Profiles

https://rawpedia.rawtherapee.com/Color_Management#Which_data_and_profiles_are_used_or_modified.3F

I think that changing the location would be a mistake (beyond taking over the code, especially GUI…), and I think it will stay as it is now

:slight_smile:
jacques

2 Likes

Yeah, ultimately my opinion is a cosmetic complaint and the most important thing is the function. It’s always nice to have new tools in the toolbox .

Plus if I want to use one or more abstract icx profiles it’s easy to chain them together with the basic input profile at the start with lcms2’s linkicc function. I’m.getting so deep into color management I think I’m starting to “color micromanage” :grin:

Hello Jacques, I like your abstract profile tool !
Found a little problem though. Open a raw (nef in my case), then go to the Color tab, choose Abstract profile - User defined. Then choose for Destination primaries Custom (sliders). Set Rx, Ry, Gx, Gy and Bx to 0 and By to 5.0 and RT segfaults.
Terminal says this:

Thread 97 “rawtherapee” received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffbaffd700 (LWP 149681)]
0x00007ffff69040fa in cmsWriteTag () from /lib/x86_64-linux-gnu/liblcms2.so.2
(gdb)

Edit.
Version: 5.8-3005-gb6449bfd5
Branch: dev

I tried to reproduce (with a nef), but I can not set the values you used…

Edit: I can reproduce the crash when setting By to 0.5 (not 5.0)

Hello

I confirme the crash when setting By to 0.5…I will have a look :slight_smile:
With all others sliders to minimum
jacques

I will push a commit by chnaging limit By to 0.49, which should not be a problem. The maximum value of By for all spaces is 0.06.

I just try with 0.49 and all others sliders in various positions, no crash

I understand system must not crash…but if you look to Cie Xy diagram…with this settings,the color space is “curious”… :slight_smile:

Jacques

1 Like

Hello Jacques, not only the color space is curious, also the user was ! :wink:

Paul , Ingo

The crash is also possible in some cases when Bx,By is “aligned” with the line “GxGy, RxRy”

I will push a fix…in this case (very rare) the system will not crash, but display a black screen…Because there is not space possible (a line)

Jacques

2 Likes