home | download | howto | module docs | git

colour: essential colour handling

this is a unified module to handle important things concerning colour. the input is in camera rgb and the output will be rec2020.

input device transform

it supports two modes of operation: using 3x3 colour matrices and profiles created from spectral response curves of the cameras colour filter array (CFA). to use such a profile, first create one for your camera using the profiling toolchain. then set the matrix parameter to clut. to route the profile data to the input here, there is a clut.pst preset.

the second, more simplistic mode of operation applies a 3x3 matrix. this kind of input transform is known to be imprecise especially for saturated colours and produce all kinds of artifacts (say way out of gamut dark blue tones).

colour mapping

to fine tune calibration or for artistic purposes, this module comes with a corrective radial basis function (RBF) applied after white balance and matrix (or clut). it allows to map arbitrary source to target points in 3d rec2020 colour space.

this mechanism be used to calibrate the input colour against a measured test chart (for instance an IT8), or for artistic colour manipulation.

so far, the gui only allows you to change the target values, the source values can be filled using the colour picker (using the import button) and from a preset (see the colourcc.pst preset for the 24 ColorChecker patches).or, of course, by editing the .cfg file by hand, the rbmap parameter is a series of src r:src g:src b:tgt r:tgt g:tgt b elements, the number of source and target pairs is given by the cnt parameter.

white balancing

white balancing (using CAT16) will adjust rec2020 D65 white to the colour represented by the three white sliders. to input alternative source colours instead of D65, connect the picked input from an instance of a colour picker module, operating on the input to this colour module. the picked patch will be used as source colour and white balancing will be adjusted such that it will match the destination colour defined by the sliders. in conjunction with skin tone presets (cf. colour-monk-[0-9].pst), this is useful to match skin rendition precisely in difficult lighting situations.

to pick a neutral spot, you can use the pick-neutral.pst preset.

gamut mapping

the gamut parameter employs a few lookup tables to work. in particular the optional inputs abney and spectra have to be connected. you can easily do this by applying the gamut.pst preset (press ctrl-p and start to type gamut.pst until it shows as the first entry in the list, then press enter). once this is done, the parameter is closely intertwined with the sat control: if gamut is set to unlimited, increasing chroma will quickly push colours outside of the spectral locus, which can be observed by connecting an instance of a ciediag module between this module and the hist display for instance. limiting to spectral locus instead will only show an effect if sat is increased, and never push colours off limits. the two other options (rec2020 and rec709) first scale down all colours such that the theoretical maximum (on the spectral locus boundary) will fit into the respective colour space. sat can then be used to increase saturation again from there, but will never produce values outside the respective tristimulus gamut.

parameters

connectors

April 2024