Color Management: Difference between revisions

From RawPedia
Jump to navigation Jump to search
Line 179: Line 179:
When one of the primaries is outside the limits of human vision we speak of imaginary colors.
When one of the primaries is outside the limits of human vision we speak of imaginary colors.


===Utilisation des données du diagramme "CIE xy" par "Abstract profiles"===
===Use of data from the "CIE xy" diagram in Abstract profiles.===
[[File:cie-abstract.jpg|600px|thumb|center|Abstract profiles]]
[[File:cie-abstract.jpg|600px|thumb|center|Abstract profiles]]
Vous pouvez agir comme vous le souhaitez sur les 3 composantes du profil virtuel.  
You can act as you wish on the 3 components of the virtual profile. The screen capture represents the configuration when you want to improve the "calibration" of the Input profile.
La saisie d'écran représente la configuration lorsqu'on souhaite améliorer la "calibration" du profil d'entrée (Input profile).
* In this example, the Working profile is Prophoto. When you choose "Destination primaries: Custom" the algorithm will choose this particular Working profile to build the virtual profile.
* Dans cet exemple, le profil de travail (Working profile) est Prophoto. lorsque vous choisissez "Destination primaries: Custom" l'algorithme va choisir ce même profil de travail pour élaborer le profil virtuel
* If you change "Destination primaries:" to any other value than "Working profile" you will generate special effects such as "Color Toning" or those produced with a "Channel Mixer.
* si vous changez toujours dans "Destination primaries:" pour une valeur différente de celle de "Working profile" vous allez générer des effets spéciaux  de type "Color Toning" ou "Channel Mixer"
* If you change "Illuminant:" D50, to another value, either you want to create or amplify some special effect, or you want to adapt the illuminant for a specific use.
* si vous changez "Illuminant:" D50, pour une autre valeur, soit vous cherchez à créer / amplifier des effets spéciaux, soit vous souhaitez adapter l'illuminant pour une usage spécifique.


Remarque importante:
Important note:
* l'idéal serait qu'au niveau des primaires et du point blanc on puisse avoir une interface plus "conviviale" que la saisie de données  avec 6 curseurs et urne combobox. L'édition d'un diagramme "CIE xy" permettrait en déplaçant, un des sommets du triangle et/ou le point blanc de voir directement l'incidence sur les couleurs
* Ideally the adjustment of the primaries and white point would be done using a more Output
* convivial  interface than the current panel with 6 cursors and a combobox. Having a visual interpretation  of the "CIE xy" diagram with adjustable vertices and white point would allow the user to see the impact on the colors directly.


=== Quelles données et profiles sont utilisés-modifiés===
Les "Abstract profiles" (profils virtuels) implantés ici
* ne modifient pas le "working profile"
* ne modifient pas les "Input profile"
* ne modifient pas les "Output profiles"
* mais ils modifient des données (datas) comme le font n'importe quel algorithme de Rawtherapee. Les particularités:
** l'abstract profile - qui correspond à un profil ICC virtuel de LCMS - agit comme un patch en fin de processus (juste avant Ciecam - et juste avant la conversion vers un profil écran ou un profil de sortie), agit sur les 3 composantes d'un profil ICC (Tone Response Curve, Illuminant (point blanc), Primaires). En fonction des choix et des réglages ont peut modifier l'image
*** en profondeur dans son apparence en agissant sur le répartition de la luminance et les couleurs - comme un "Channel Mixer" ou "Color Toning" auquel on aurait ajouté une dimension supplémentaire.
*** uniquement sur la répartition de la luminance via la TRC - soit pour changer l'aspect par défaut qui dans Rawtherapee est une TRC sRGB - soit pour agir comme Shadows/Highlights
*** pour modifier / affiner les résultats du profil d'entrée (Input profile) à l'aide d'une charte de couleurs (Colorchecher24 ou autre), soit avec le même illuminant qui a servi lors de l'élaboration du profil d'entrée, soit avec un autre illuminant - dans le cas l'utilisation conjointe de Ciecam sera nécessaire.


=== Trois usages principaux, associés ou non à Ciecam :===
===Which data and profiles are used or modified?===
* TRC : ajuster le gamma et la pente à des fins diverses. a) modifier le rendu de l'image qui par défaut est g=2.4 s=12.92 ; b) relever les ombres et agir sur les tons clairs tout en préservant la colorimétrie et le gamut.
The Abstract profiles (Virtual profiles) implemented here:
* Illuminant (point blanc) : a) ajuster le gamut du " profil de travail " pour l'adapter aux conditions de prise de vue. Dans ce cas, on cherchera à privilégier la colorimétrie. Si une image est prise à 4000K, en sRGB (qui est D65), le gamut peut ne pas être adapté. L'action conjointe de " l'illuminant " et du Ciecam (symétrique) doit permettre de mettre en œuvre une adaptation chromatique de qualité ; b) utilisée conjointement avec les modifications primaires ci-dessous.
* do not change the Working profile
* Primaires : c'est ici que la notion de « Profils abstraits » a tout son sens. Plusieurs possibilités sont offertes : a) Se servir de ce module comme « Channel mixer » afin d'aboutir si on le souhaite à des effets spéciaux proches de ceux de « Color Toning » en association ou non avec Ciecam ; b) S'en servir pour modifier / affiner le résultat du profil d'entrée (Input profile) afin d'assurer  une meilleure colorimétrie (calibration).  
* do not modify the Input profile
* do not modify the Output profiles
* but they modify the data in the same way as any other Rawtherapee algorithm. Particular features:
** the Abstract profile, which corresponds to a virtual ICC profile in LCMS, acts as a patch at the end of the process (just before Ciecam and just before the conversion to a screen profile or an Output profile). It acts on the 3 components of an ICC profile (Tone Response Curve, Illuminant (white point) & Primaries). Depending on the choices and settings, the image appearance can be modified as follows:
*** in depth by acting on the distribution of luminance and colors – rather like a Channel Mixer or Color Toning to which an extra dimension has been added.
*** only on the luminance distribution via the TRC, either to change the default aspect which in Rawtherapee is an sRGB TRC, or to act as a Shadows/Highlights control.
*** to modify or refine the results of the Input profile with the help of a color chart (Colorchecker24 or other), either with the same illuminant that was used during the elaboration of the Input profile, or with another illuminant. In this case Ciecam will need to be used also.


=== Où est-il situé dans le processus de Rawtherapee ?===
===Three main uses (with or without Ciecam)===
Il est situé en fin de processus - juste avant Ciecam - et permet ainsi soit:
* TRC: adjust gamma and slope for various purposes. a) modify the rendering of the image which by default is g=2.4 s=12.92; b) raise the shadows and modify the lighter tones while preserving the colorimetry and the gamut.
* d'appliquer des effets spéciaux sensiblement au "même niveau" que "Color toning - Color corrections regions"
* Illuminant (white point): a) adjust the gamut of the Working profile to adapt it to the shooting conditions. In this case, we will pay particular attention to the colorimetry. If an image is taken at 4000K, in sRGB (which is D65), the gamut may not be suitable. The joint action of the "illuminant" and Ciecam (symmetrical mode) allows you to ensure good chromatic adaptation; b) used in conjunction with the primary modifications below.
* d'apporter une correction colorimétrique (calibration) en fin de processus - tenant compte des modifications apportées en amont à l'image - juste avant les profils de sortie.
* Primaries: this is where the notion of Abstract profiles comes into its own. Several possibilities are offered: a) Use this module as a "Channel mixer" in order to achieve, if desired, special effects similar to "Color Toning", with or without Ciecam; b) Use it to modify or refine the result of the Input profile to improve the colorimetry (calibration).


Cette position permet également d'éviter d'introduire des non-linéarités.
===Where is it located in the Rawtherapee process?===
It is located at the end of the process - just before Ciecam - and thus allows the user to either:
* apply special effects at about the "same level" as "Color toning - Color corrections regions".
* make color corrections (calibration) at the end of the process just before the Output profiles taking into account the image modifications made upstream.
 
This position also avoids the introduction of non-linearities.


=== TRC - Courbe de réponse tonale ===
=== TRC - Courbe de réponse tonale ===

Revision as of 07:17, 8 April 2021

Color Management

Input Profile

A raw file contains a dump of light values captured and quantized by the sensor and related electronics. The input profile's role is to accurately map these values into a known color space to ensure that all colors in the captured scene are faithfully reproduced. The input profile is applied to the image data at the beginning of RawTherapee's processing pipeline, and most tools process data downstream in the pipeline.

For detailed information, see:

No Profile

No input color profile will be applied. The color matrix will use "1" along the diagonal and "0" everywhere else.

  • Raw files will show the camera's native RGB color. They will only be demosaiced and white-balanced.
  • Non-raw files will be displayed without any embedded input profile applied, including no gamma correction, which means they will look bright.

This feature is generally only useful for didactic and scientific purposes. For example if the camera has recorded colors far outside of the conventional gamuts, using no input profile ensures that no color clipping occurs.

Camera Standard

RawTherapee looks for the color matrix in three places:

  • In the dcraw code which is embedded inside RawTherapee,
  • In the raw file itself,
  • In a text file on your system which is installed with RawTherapee called camconst.json

Information is gathered from all three places, and values from camconst.json are prioritized above those from other sources. There is an exception for the input color matrix, in that if the raw file is in the DNG format and the Software Exif tag (0x0131) does not begin with the string "Adobe DNG Converter" and the file does contain a ColorMatrix2 tag, then the value from this tag is prioritized.

A color matrix is a matrix of 3x3 constant values which is multiplied with the camera's native RGB colors to convert them to colors which are as faithful as possible. A color matrix works best (i.e. provides most accurate colors) when the white balance is close to what the matrix was calibrated for. The "camera standard" matrix is calibrated for D65, i.e. 6500K. Do not worry if the white balance is quite far off from that, as colors will be reasonably accurate anyway.

For applications where the most accurate and fine-tuned color is not of highest importance, such as landscape photography, the color matrix will provide good colors. An advantage of color matrix processing, as opposed to lookup table-based DCP and ICC conversions, is that it's purely linear, i.e. dark and bright colors of the same hue and saturation are translated the same way. This makes it robust and may be the best choice if you will be exporting images for processing in an HDR application or other application where a predictable linear color response is required.

Auto-Matched Camera Profile

Uses a DCP or ICC input profile. DCP profiles are prioritized. These profiles can provide more accurate colors than the standard matrix.

These profiles are meticulously created by us, using photos of color targets submitted by users. If you have access to a color target and we do not yet have a dual-illuminant DCP profile for your camera (see [1]), then submit the required photographs so that we may improve color accuracy for your camera model. You will find instructions in the article titled "How to create DCP color profiles".

If neither a DCP nor an ICC profile is available for your camera model, RawTherapee will revert to the camera standard color matrix.

Camera profiles work in the normal range, from black up to clipping. If you enable highlight reconstruction, new data is added above the clipping level and if you bring it into visible space (by negative exposure for example), that range will not be naturally covered by the profile. However, RawTherapee will linearly extend the profile to cover this range too - colors there will get the same correction as the brightest colors of the same hue and saturation in the normal range.

Custom

Specify a custom DCP or ICC camera input profile.

If RawTherapee does not have a DCP profile for your camera model and you do not have access to a color target, one place where you can get a profile from is Adobe DNG Converter. See the article "How to get LCP and DCP profiles" to learn how to get them.

DCP is a format specially designed for camera profiles and RawTherapee should support the most recent DNG standard (which defines DCP), so you can for example use DCPs provided by Adobe's DNG converter. ICC profiles, on the other hand, are more tricky. ICC profiles can be used for a multitude of purposes (printers, displays, etc.) and since they're not designed specifically for camera profiling, different vendors have chosen different approaches for their ICC profiles. In practice this means that the input image must be pre-processed in some specific way for the profile to work. The profile itself lacks information on how to do this, which means that if you are using a third-party profile RawTherapee may not necessarily do the expected pre-processing - results may vary.

DCP

DCP Illuminant

Some of RawTherapee's profiles are single-illuminant (Daylight/D50), while others are double-illuminant (Daylight/D50 and Tungsten/StdA). If a dual-illuminant profile is loaded the "DCP Illuminant" setting will be enabled and you can choose which illuminant to use. The actual DCP standard (part of the DNG standard) does not provide this choice, but instead an interpolation between the two illuminants is calculated based on the chosen white balance (there will only be an interpolation if the white balance is in-between both illuminants, otherwise the closest is picked). This "interpolated" mode is the default setting of "DCP Illuminant" and for any normal use you do not need to change this.

You can however choose to base the color rendering on one of the specific illuminants. In some cases this might produce more pleasing color. It can also be interesting for diagnostic purposes to see how large (or small) a difference there is in color rendering between the illuminants, but, as said, for general use this setting should be untouched.

DCP Tone Curve

Some DCPs contain a tone curve which may be used to add contrast and brightness to provide a film-like look. This is mainly used for profiles simulating camera maker settings. The tone curve checkbox will be disabled for profiles which do not contain a tone curve.

The curve mode used by the DCP tone curve is the same as the Exposure tool's "film-like" mode, meaning you can reproduce the effect using the Exposure tool's tone curves in film-like mode. When contrast is applied with a film-like curve the appearance of the colors will change and overall saturation is increased, except for bright colors which instead are de-saturated. Some profiles which have curves embedded are pre-corrected for this color appearance change and will thus not provide the intended look without the curve applied. Most will however work well without the tone curve applied especially if you add a similar curve yourself using the Exposure tool's curves, but if you want to see exactly how the profile designer intended the colors to look you should enable the tone curve.

While the input color profile is applied at the first stages of the toolchain pipeline, the DCP tone curve is applied later in the pipeline at some point after the Exposure tool.

The tone curve used in some of RawTherapee's bundled DCPs, DCP tone curve.rtc

The curve used in some of RawTherapee's bundled DCP profiles is the same as the default curve used by Adobe Camera Raw. You can get the curve from this file: File:DCP tone curve.rtc
Set either tone curve in the Exposure tool to "Standard", set its mode to "Film-Like", and then use the Folder-open.png "Load a curve from file" button to apply DCP tone curve.rtc

If the DCP profile has a copyright tag with the value "Adobe Systems", regardless whether it contains a tone curve or not, RawTherapee will automatically create a tone curve shaped identically to the Adobe Camera Raw curve. The reason for this is so that using the DCP in RawTherapee can match the results of using that DCP in Lightroom. This is why the "Tone curve" checkbox will not be grayed-out when using a DCP profile which has no embedded tone curve, as long as it has the copyright tag set as described.

DCP Base Table

This enables the DCP "HueSatMap" lookup table which is used to add non-linear corrections on top of the basic matrix. This is an advanced user setting and unless you want only the pure matrix result should leave it on. It's grayed out if the loaded profile lacks a HueSatMap table.

DCP Look Table

This enables the DCP "LookTable" lookup table which is intended to add a subjective look on top generally together with an embedded tone curve. That is if you disable the DCP curve and looktable you may get a neutral "colorimetric" profile, if the DCP was designed that way which is not always the case (if the DCP has both a look table and a base table it's likely that it is, but if it only has a look table it will probably not work well with it disabled). Disabling individual DCP elements are considered advanced user settings, normally you would leave this on.

DCP Baseline Exposure

The DCP may indicate an exposure offset that corresponds to an offset of the exposure slider. The purpose of this is typically to make the brightness of the image match the brightness of the camera's own JPEGs, which can be useful if you're shooting with auto-exposure. Currently this offset is applied "under the surface" so you don't see it on the exposure slider.

Note that if you are using Adobe's proprietary profiles those are expecting that the DNG's "baseline exposure" tag is applied too (the profile's offset is added on top). Currently there is no support for the DNG tag so you need to find that out on your own (using exiftool for example) and then set that offset using the exposure slider if you want to get the exact same brightness as in Adobe Camera Raw.

Implementation Notes

Third-Party DCP Support

The DNG Camera Profile, DCP, is the preferred camera input profile format for RawTherapee. All elements of the 1.4 DNG specification are supported, with the exception of the black render tag (see below). A DCP can be a pure matrix profile, it can have a LUT (typically 2.5D) to improve the colorimetric accuracy, and then it can have an embedded curve and a separate "look table" on top. It may also add an exposure offset. All these elements can be toggled on/off via checkboxes. However, you should be aware that a profile will produce the most accurate colors when all the elements it was designed to include are enabled. For example, using a tone curve changes the color appearance, so if you disable an embedded tone curve to get a linear profile you can't count on the colors being absolutely accurate. Nonetheless, most photographers rely on an aesthetically-pleasing appearance, and not on absolute accuracy, so this should not be a concern unless absolute accuracy is crucial. Typically, third-party profiles would come from Adobe Camera Raw/Lightroom/DNG Converter, and RawTherapee supports them. Many of Adobe's profiles lack a tone curve, but in Adobe's world that does not mean that no tone curve should be applied, but that Adobe's default curve should be applied. RawTherapee will therefore identify Adobe profiles (from the copyright string) and add the default curve to those (which you can toggle with the tone curve checkbox).

Adobe DNG Converter may add a "baseline exposure" to the DNG file. Some of Adobe's DCPs are designed to work with that baseline exposure and then produce a default output which is about the same brightness and contrast as the out-of-camera JPEG. RawTherapee can honor this baseline exposure if the DCP contains one.

The DCP format also has a black render tag. This indicates if the raw converter should do "automatic" black subtraction or not. RawTherapee ignores this tag - you can perform manual black subtraction with the Raw Black Points tool or with the black slider in the Exposure tool. As many of Adobe's profiles indicate auto black subtraction and Adobe Camera Raw/Lightroom does it, in those cases RawTherapee will render slightly lower contrast and brighter shadows.

Third-Party ICC Support

RawTherapee has specific support for ICC profiles bundled with Capture One and Nikon NX2, so those should work well. Older ICC profiles are not likely to work well though (typically the image becomes extremely dark with unsupported ICC profiles).

Some ICC profiles apply a tone-curve and desaturate bright highlights for a more film-like look. Those profiles may not work well together with Highlight Reconstruction. If you see a radical change in contrast when you apply your ICC profile, it has applied a tone-curve and then you should not use it together with Highlight Reconstruction.

Unlike DCP profiles, ICC profile processing may cause clipping of extremely saturated colors during conversion. In practice this is rarely a problem, but still DCP should be considered the primary choice if available.

Note on using Capture One ICC profiles: RawTherapee applies the ICC before exposure adjustments, as the intention is that input profiles should only be used to make the colors more accurate, and not to apply a look - you design the look using the tools instead. Phase One's ICC profiles contain a subjective look though, which means that they typically contain "hue twists", for example saturation in the shadows is increased. This means that if you have an underexposed file and push it a few stops, those hue twists have been applied to the dark image before the exposure adjustment and will thus be in the wrong place after adjustment; that is you don't get the same look as in Phase One's Capture One. Therefore it is recommended to have the right exposure out of the camera when using Phase One ICC profiles. You should also apply a suitable RGB film-like curve, as those ICC profiles are designed to be used together with that.

We are aware that LUT ICCs should typically be applied after exposure (just as DCP LookTables are applied), and that would support for example Capture One profiles better. This may be fixed in a future version.

Save Reference Image

Clicking the "Save Reference Image" button saves a linear TIFF image before the input profile is applied. This file can then be used for profiling, i.e. creating a camera input profile. You can use the open-source ArgyllCMS program to create ICC profiles, and DCamProf to create ICC or DCP profiles.

Cropping, resizing and transformations (rotation) will be applied, allowing you to make the output image more manageable by the receiving software. ArgyllCMS is very picky for instance, and requires that only the test target is visible in the image.

You can also choose if you want to export with white balance applied or not. For ICC profiles you should export with white balance applied, but if you intend to make a DNG profile or a dcraw-style color matrix you should export without applying white balance.

Working Profile

The default working profile is ProPhoto and should not be changed for normal use.

The working profile specifies the working color space, which is the color space used for internal calculations, for instance for calculating saturation, RGB brightness/contrast and tone curve adjustments, chrominance, etc.

When RawTherapee was based on integer math it was wise to not use working space larger than absolutely needed to get the best precision in the calculations. However, RawTherapee had switched to floating-point processing in 2011, and since version 4.0.12 the default working profile is ProPhoto, which has a very large gamut.

The choice of working profile has an influence on the effect of the curves in all modes except for perceptual - in that mode, changing the working profile will not alter the effect of the curve. If you have trouble fitting colors within the output gamut you can experiment with changing the working profile when using curves in any mode but perceptual.

Note that the working profile will only specify the red, green and blue primaries, gamma will not change as RawTherapee's processing pipeline is floating point with no gamma encoding (that is gamma = 1.0). Some tools (like curves and histograms) will still display with a gamma (usually sRGB gamma) which is hard-coded for the tool and stays the same regardless of working profile.

Adding Custom Working Profiles

RawTherapee 5.5 allows you to specify custom working profiles through a JSON file. The file should be named workingspaces.json and it can reside in:

  • the ICC profile folder as set in Preferences > Color Management > Directory containing color profiles,
  • or in RawTherapee's own ICC profile folder:
    • Windows: <rt-install-folder>\iccprofiles
    • Linux:
      • When installed using your package manager or self-compiled with BUILD_BUNDLE=OFF: /usr/share/rawtherapee/iccprofiles
      • When self-compiled with BUILD_BUNDLE=ON: <rt-install-folder>/iccprofiles
    • macOS: /library/ColorSync/Profiles/Displays

The format of workingspaces.json is as follows:

{"working_spaces": [
    {
        "name" : "ACES",
        "file" : "/path/to/ACES.icc"
    },
    {
        "name" : "ACEScg",
        "matrix" : [0.7184354, 0.16578523, 0.09882643, 0.29728935, 0.66958117, 0.03571544, -0.00647622, 0.01469771, 0.66732561]
    }
]}

If "matrix" is present, "file" is ignored. If only "file" is present, the matrix is extracted from the ICC profile. For this, RawTherapee looks only at the R, G, and B matrix columns and the white point set in the profile. Bradford adaptation is used to convert the matrix to D50. Anything else in the profile (LUT, TRC, etc.) is ignored.

It is the user's responsibility to ensure that the profile is suitable to be used as a working space.


Abstract profiles - under development – April 2021

What is an Abstract profile?

  • According to the International Color Consortium (ICC), Abstract profiles allow you to perform custom image effects, such as applying a particular “look” to a series of images. Such a profile allows you to define CIELAB (or CIEXYZ) values as both Input and Output. Thus you can algorithmically define colour changes of whatever type you like and produce the LUT that achieves that. A small number of color management applications support the creation and/or use of Abstract profiles.
  • In the case of Rawtherapee this is achieved using the Virtual profiles in LCMS, which allow you to modify the data using the same algorithms and principles as those used for "Input profiles" or "Output profiles" i.e. by acting on one or more of the 3 ICC profile components: Tonal response curve (TRC), Illuminant (white point) and Primaries.
  • Is an Abstract profile part of color management? This is debatable but it is certainly more so than the Working profile, which is simply a transformation in C++ code that converts RGB data into XYZ. If we use the ICC and LCMS (virtual profile) definitions, the answer is obviously yes.

The CIE xy diagram

The LCMS virtual profile modifies the "x", "y" data which is one of the possible representations of the colorimetry. This representation makes it possible to easily see:

  • the limits of human sight in terms of visible frequencies from 380nm to 770nm
Limits of human vision
  • a triangular color-space model based on the primaries
Colorimetric spaces
  • the curve showing the evolution of the white point (one of the bases of the illuminants D50, D65, Std A, )
White point
  • Note that this representation must be interpreted with care, because it is a vertical projection of the gamut. A color that is outside the triangle of the gamut is necessarily out of gamut, but a color inside the triangle can also be out of gamut, because this projection ignores the luminance component.

Some "Primary" values

  • sRGB - Red x=0.64 y=0.33 - Green x=0.30 y=0.60 - Blue x=0.15 y=0.06
  • Rec2020 - Red x=0.708 y=0.292 - Green x=0.17 y=0.797 - Blue x=0.131 y=0.046
  • ProPhoto - Red x=0.7347 y=0.2653 - Green x=0.1596 y=0.8404 - Blue x=0.0366 y=0.0001
  • ACESp0 - Red x=0.7347 y=0.2653 - Green x=0 y=1.0 - Blue x=0.0001 y=-0.077

When one of the primaries is outside the limits of human vision we speak of imaginary colors.

Use of data from the "CIE xy" diagram in Abstract profiles.

Abstract profiles

You can act as you wish on the 3 components of the virtual profile. The screen capture represents the configuration when you want to improve the "calibration" of the Input profile.

  • In this example, the Working profile is Prophoto. When you choose "Destination primaries: Custom" the algorithm will choose this particular Working profile to build the virtual profile.
  • If you change "Destination primaries:" to any other value than "Working profile" you will generate special effects such as "Color Toning" or those produced with a "Channel Mixer.
  • If you change "Illuminant:" D50, to another value, either you want to create or amplify some special effect, or you want to adapt the illuminant for a specific use.

Important note:

  • Ideally the adjustment of the primaries and white point would be done using a more Output
  • convivial interface than the current panel with 6 cursors and a combobox. Having a visual interpretation of the "CIE xy" diagram with adjustable vertices and white point would allow the user to see the impact on the colors directly.


Which data and profiles are used or modified?

The Abstract profiles (Virtual profiles) implemented here:

  • do not change the Working profile
  • do not modify the Input profile
  • do not modify the Output profiles
  • but they modify the data in the same way as any other Rawtherapee algorithm. Particular features:
    • the Abstract profile, which corresponds to a virtual ICC profile in LCMS, acts as a patch at the end of the process (just before Ciecam and just before the conversion to a screen profile or an Output profile). It acts on the 3 components of an ICC profile (Tone Response Curve, Illuminant (white point) & Primaries). Depending on the choices and settings, the image appearance can be modified as follows:
      • in depth by acting on the distribution of luminance and colors – rather like a Channel Mixer or Color Toning to which an extra dimension has been added.
      • only on the luminance distribution via the TRC, either to change the default aspect which in Rawtherapee is an sRGB TRC, or to act as a Shadows/Highlights control.
      • to modify or refine the results of the Input profile with the help of a color chart (Colorchecker24 or other), either with the same illuminant that was used during the elaboration of the Input profile, or with another illuminant. In this case Ciecam will need to be used also.

Three main uses (with or without Ciecam)

  • TRC: adjust gamma and slope for various purposes. a) modify the rendering of the image which by default is g=2.4 s=12.92; b) raise the shadows and modify the lighter tones while preserving the colorimetry and the gamut.
  • Illuminant (white point): a) adjust the gamut of the Working profile to adapt it to the shooting conditions. In this case, we will pay particular attention to the colorimetry. If an image is taken at 4000K, in sRGB (which is D65), the gamut may not be suitable. The joint action of the "illuminant" and Ciecam (symmetrical mode) allows you to ensure good chromatic adaptation; b) used in conjunction with the primary modifications below.
  • Primaries: this is where the notion of Abstract profiles comes into its own. Several possibilities are offered: a) Use this module as a "Channel mixer" in order to achieve, if desired, special effects similar to "Color Toning", with or without Ciecam; b) Use it to modify or refine the result of the Input profile to improve the colorimetry (calibration).

Where is it located in the Rawtherapee process?

It is located at the end of the process - just before Ciecam - and thus allows the user to either:

  • apply special effects at about the "same level" as "Color toning - Color corrections regions".
  • make color corrections (calibration) at the end of the process just before the Output profiles taking into account the image modifications made upstream.

This position also avoids the introduction of non-linearities.

TRC - Courbe de réponse tonale

Cette fonctionnalité permet de faire varier le gamma et la pente sur la base du "working profile" - elle ne modifie pas ce profil, mais prend en compte ses caractéristiques. Elle s'applique à la fin du processus, juste avant Ciecam. On la retrouve dans d'autres logiciels comme UFRaw ©, mais aussi incorporé aux profils de sortie...

Elle vise plusieurs objectifs :

  • Pédagogique : vous pouvez ainsi voir directement à l'écran les importantes différences induites par les changements de gamma (g) et de pente (s) par exemple:
    • un gamma standard = 1.8 - utilisé en Output profile par Prophoto
    • un gamma standard = 2.2 - utilisé en Output profile par AdobeRGB
    • une TRC - "BT709" qui correspond à gamma =2.22 et pente (slope) = 4.5 - une partie linéaire "jusque 4.5", puis une partie logarithmique avec g=2.22. Cet ensemble donne pour les moyennes et hautes lumières le même résultat que "gamma standard = 1.8", mais apporte un bien meilleur rendu des ombres, en supprimant l'impression de grisaille.
    • une TRC - "sRGB" qui correspond à g=2.4 et s=12.92 - une partie linéaire "jusque 12.92", puis une partie logarithmique avec g=2.4. C'est le rendu habituel choisi par des nombreux logiciels dont par exemple Lightroom ©, ainsi que la sortie écran et output par défaut de Rawtherapee.
    • etc.
  • Exportation - activités particulières : vous pouvez décider de travailler avec un gamma linéaire, par exemple pour exporter vers un autre logiciel (pour impression, ou modifier avec Photoshop ou Gimp) et / ou voir directement les résultats.
  • Action sur Ombres et Lumières (Shadows - Highlights) : cette fonctionnalité ne remplace pas les autres modules de Rawtherapee comme par exemple "Shadows/Highlights", ou les courbes dans "Exposure", etc., mais elle les complète :
    • vous pouvez déboucher les ombres en agissant sur le curseur "Slope", des valeurs jusque 300 permettent une transformation importante de l'image dans les ombre.
    • vous pouvez agir sur les hautes et moyennes lumières en agissant sur le curseur "gamma", des valeurs jusque 15 sont disponibles
    • regardez l'évolution de l'histogramme
  • En complément de la calibration, pour ajuster la luminance des gris, lorsqu'on se sert par exemple d'une ColorChecker24

Différences avec une Tone-Curve classique

  • comme évoqué précédemment, elle est située en fin de processus - évitant au maximum les non-linéarités, gage d'une meilleur qualité des résultats
  • lorsqu'elles sont utilisées conjointement avec "Illuminant" ou "Primaires" elles garantissent une inscription dans le gamut et une meilleure colorimétrie. Cette maîtrise du gamut n'est pas garantie autrement - utilisation de la TRC isolée afin d'optimiser les temps de traitement, mais néanmoins est pertinente dans une très grande majorité de cas.
  • la partie linéaire, souvent de faible valeur (s= 2..s=13) raccordée à une partie parabolique, est pratiquement impossible à réaliser avec une tone-curve
  • elle constitue - dès qu'on active "Illuminant" (ne serait-ce que pour confirmer l'illuminant, par exemple D50 pour ProPhoto), ou "Primaires" - une partie d'un profil ICC virtuel qui peut être appliqué en fin de processus à une image ou une série d'images.

Illuminant - point blanc

Par défaut l'illuminant est réglé sur la valeur correspondant au "working profile", à titre d'exemple cela correspond à D50 pour "ProPhoto", D65 pour "sRGB", D60 pour "ACESp1".

Point blanc

Pourquoi le changer ? Plusieurs raisons peuvent amener à vouloir changer cette valeur :

  • pour volontairement changer les couleurs comme on le ferait avec "Channel Mixer" ou "Color Toning". Si on examine le diagramme "CIE xy", on voit que lorsqu'on change l'illuminant le point blanc se déplace
    • vers la zone des rouges si la température de l'illuminant baisse
    • vers la zone des bleus si la température de l'illuminant augmente
    • donc avec cet usage on modifie son équilibre rouge / bleu pour l'essentiel
  • pour "patcher" le "working profile" et adapter la colorimétrie à des images spécifiques. Par exemple imaginons qu'on ait pris des photos vers la tombée du jour et que le "working profile" soit "Prophoto" - illuminant D50.
    • réglons l'illuminant sur D41 - la plus petite valeur répertoriée de l'illuminant lumière du jour - pouvant correspondre à l'illuminant réel lors de la prise de vue
    • ne touchons à rien d'autre
    • le profil virtuel va "patcher" les données en changeant les valeurs XYZ de la matrice de conversion RGB-XYZ les adaptant mieux aux données de l'image, évitant ainsi les valeurs hors-gamut

Primaires

Par défaut les primaires sont réglées sur les valeurs de celles du "Working profile". Pourquoi les changer ?

  • pour créer des effets spéciaux de type "Channel Mixer" ou "Color Toning" - à noter qu'un Channel Mixer de type "primaires" est un peu plus intuitif qu'un Channel Mixer RGB dans le sens où l'action sur une primaire agit principalement sur cette couleur - , dans ce cas vous avez 2 possibilités:
    • choisir dans "Destination primaries", des primaires différentes de celles du "Working profile". L'examen du diagramme "CIE xy" montre que le triangle est déplacé globalement - bien sûr en fonction du couple "Working profile" - "Destination primaires" introduisant un écart de chaque primaires constant quelque soit les images auxquelles on applique ce "patch". Bien sûr les résultats seront différents d'une image à l'autre, car la répartition des couleurs est différente, mais le "patch" sera constant.
    • choisir dans "Destination primaries" des primaires différentes / ou identiques à celles du "Working profile", en choisissant ensuite "Custom". Dans ce cas vous allez vous même modifier l'emplacement des 3 sommets du triangle de "Destination primaries" ouvrant des possibilités quasiment illimitées
  • pour modifier/affiner les images afin qu'elles soient le plus en conformité avec la prise de vue - réduction des deltaE.
    • l'utilisation avec une charte (ColorChecker24 ...) est quasi obligatoire
    • Ciecam devra être utilisé si on souhaite que la profil d'entrée puisse être utilisé avec pertinence avec un autre illuminant que celui ayant servi à l'élaborer

Exemple possible d'utilisation pour modifier / améliorer l'action du profil d'entrée

  • basculer sur "Neutral"
  • chargez l'image de la charte qui a servi à élaborer le profil d'entrée (Input profile)
  • choisissez "abstract profile" - et "Custom" par défaut le profil sélectionné sera le même que "Working profile" (ainsi que l'illuminant) - ne changez pas ces valeurs
  • sélectionnez "Custom" dans "Destination primaries"
  • les primaires du "working profiles" s'affichent, vous pouvez maintenant les modifier
  • utilisez le "lockable color picker"
    • sélectionnez parmi les cellules : 2 ou 3 gris répartis entre les plus sombres et les plus clairs, 1 rouge (saturé), 1 vert (saturé), 1 bleu (saturé)
    • les valeurs L*a*b* de ces cellules (celles de la charte - valeurs de référence) vont devenir les objectifs à atteindre.
    • adaptez gamma (g) et slope (s) de telle manière que les 3 gris soient le plus proches des valeurs de référence
    • modifiez les valeurs "x" et "y" des primaires "rouge", "vert" et "bleu" de telle manière que les valeurs mesurées soient le plus proche des valeurs de référence
    • Agir si nécessaire sur "Preserves Pastel tones" : ce curseur permet d'éviter l'action sur les teintes très peu saturés (proches des tons neutres) et de réduire progressivement l'action sur les tons pastels.
    • sauvez le résultat.

Si vous souhaitez que votre profil (par exemple élaboré en D50) puisse servir dans une autre plage de température. Il est nécessaire de prendre en compte Cat16 dans Ciecam:

  • choisissez dans "White balance" la nouvelle température - par exemple 6000K
  • sélectionnez "Color Appearance & Lightning (Ciecam02/16)
  • sélectionnez: CAM Model > CIECAM16
  • sélectionnez CatO2/16 mode > Automatic symmetric
  • Ajustez la température dans "Viewing conditions" à celle de la balance des blancs (dans cet exemple 6000K)
  • puis utilisez le même processus que précédemment.

Pour utiliser les résultats de ce profil virtuel pour d'autres images, procédez comme suit:

  • sur la vignette dans le "file browser" - cliquer droite - “Processing profile operations”, “Copy”…then “Paste partial” “Color management”.

Remarque: Bien sûr, les valeurs peuvent aussi être ajustées empiriquement comme dans ART et Lightroom. Pour de petits écarts par rapport aux primaires d'origine, on peut avoir une assez bonne prévisibilité du résultat. Par contre, si nous faisons de gros changements, les résultats seront plus variés.

Output Profile

Specify the output color profile; the saved image will be transformed into this color space and the profile will be embedded in the metadata. The effects the output profile has on the image cannot be seen in the preview.

RawTherapee lets you specify "input" (e.g. you're camera's profile), "display" and "output" (i.e. printer) device class profiles with an RGB color space, because RawTherapee saves only RGB images. Profiles listed in this combobox are those which come bundled with RawTherapee and those located in the folder set in Preferences > Color Management.

The soft-proofing feature is dedicated to simulating printer rendering. It lets you preview what your image will look like when printed, assuming you use a printer profile which correctly simulates your printer and paper combination. For best printout quality, after you have tweaked your photo using soft-proofing, you should select your printer profile as the output profile and save the image using it. This ensures that the image is encoded using your printer's color space directly from RawTherapee's internal high quality floating-point representation, instead of being saved to an 8-bit image in sRGB for example and then having to be subsequently converted to the printer profile, which would be quite lossy.

The main histogram, navigator and clipping indicators will use either the working or the output profile, depending on your setting in Preference > General.

RawTherapee comes bundled with a number of custom-made high quality output profiles:

RT_sRGB
Similar to sRGB
Gamma close to sRGB: g=2.40, slope=12.92
RT_sRGB_gBT709
Similar to sRGB
Gamma BT709: g=2.22, slope=4.5
RT_sRGB_g10
Similar to sRGB
Linear gamma g=1.0, slope=0
RT_Medium_gsRGB
Similar to AdobeRGB1998
Gamma close to sRGB: g=2.40, slope=12.92
RT_Large_gsRGB
Similar to ProPhoto
Gamma close to sRGB g=2.40, slope=12.92 (close to "Melissa" used by Lightroom)
RT_Large_gBT709
Similar to ProPhoto
Gamma BT709: g=2.22, slop=4.5
RT_Large_g10
Similar to ProPhoto
Linear gamma g=1.0, slope=0
Rec2020
Wide gamut, larger than AdobeRGB but smaller than ProPhoto
Gamma BT709: g=2.22, slope=4.5

The recommended output profile when you're saving to an 8-bit format and/or publishing to the web is RT_sRGB. If no profile is selected, none will be embedded, which means that "sRGB" is implied, though it is safer to embed RT_sRGB in terms of getting your image displayed properly in various applications.

RT_sRGB is a higher quality version of the standard sRGB profile, which surprisingly is inconsistent between implementations. RT_sRGB was custom-made for RawTherapee by Jacques Desmis and has 4096 LUT points, as opposed to the lower quality 1024 point sRGB profiles. Applications that aren't color managed and won't take advantage of RT_sRGB will fall back on sRGB.

Wide-gamut output profiles such as RT_Large_gsRGB are generally used if you export to a 16-bit or higher bit-depth format for further editing in another application. If you will be sending your image for printing, a wide-gamut output profile is also recommended, since some printers may have wide gamuts (at least in certain colors).

You should have a wide-gamut monitor if you want to work with wide-gamut profiles, otherwise you're flying in the dark.