Input colour profile in the pipeline

Hi,

The Input colour profile module is quite “high” or late in the pipeline. I thought converting the image to the working colour space would happend as early as possible but I see a list of module working in the original colour space before it.

For example, Exposition is working on the image colour space, not the working colour space. Or lense correction.

Is there a reason to not use the working colour space instead of the image colour space ?

Thanks :slight_smile:

A general overview of it is in the manual:

https://www.darktable.org/usermanual/en/darkroom/processing-modules-and-pixelpipe/the-pixelpipe-and-module-order/

https://darktable-org.github.io/dtdocs/darkroom/pixelpipe/the-pixelpipe-and-module-order/

2 Likes

It seems the explanation lies on that modules placed before the working colour input module are there because they have to work on the original colour space (which could be RAW or any colour space of the current image).

Of note, in my software where I can arbitrarily arrange operations, I currently don’t use a working profile. I do all operations in the camera space, then convert to the rendition space at export. The look just fine to me… :smiley:

That is interesting ! You mean you switch off that module for every edits ?

No Glen has his own software Rawproc

In DT its explained pretty well near the end of this sections as to the transition from data to camera colorspace to working colorspace…

https://darktable-org.github.io/dtdocs/special-topics/color-management/color-spaces/

1 Like

For the rare case where your input file is gamma encoded instead of linear (for example if it’s a jpeg rather than raw), it is linearized within the input color profile module. So any operations that occur before that point are operating on non-linear data. This includes scaling the image for the zoom level. So if you open a jpeg and set the zoom level to anything other than 100%, you will see the kind of errors described here.

In my software (thanks @priort for introducing it), opening the raw file starts you with the raw data out of the file, with only a conversion from integer to floating point numbers. You then add tools to the toolchain until the image looks nice.

One of those tools has to be a “colorspace assign”, which associates the image with the camera profile data. It by itself doesn’t actually change the image, but if a subsequent “colorspace convert” tool is added, that camera profile is used as the input to the transform. If you don’t add the “colorspace convert” anywhere in the toolchain (for instance, to convert to a working profile), that assigned profile will eventually be used when the image is saved, or for the display.

It’s a bit challenging to describe, but very straightforward when you see it in action. Gee, another reason to make that video…

haha, ys, I forgot you have developped your own software, and jumped over you mentionning it :slight_smile: I had Darktable pipeline in mind !

I think I understand the “colorspace assign”. It’s a but like an environement variable (as in programming) you set at the beginning, as a reference for any subsequent module who would need to have this reference for working.

When the video is going out ? :wink: (joking)

Thanks for your explanation

Pretty much that. I like to think of it as critical information to interpreting the image data, like the width and height.

I’ve been distracted with familly, house, and work stuff, but really I just need to sit down for a half-hour or so and do it. I have an outline, and the mechanics are all set up, just have to swing the microphone around…