1 \documentclass{article}
4 \usepackage{amsmath,mathtools}
5 \title{Colour conversion in DCP-o-matic}
11 Conversion from an RGB pixel $(r, g, b)$ is done in three steps.
12 First, the input gamma $\gamma_i$ is applied. This is done in one of
13 two ways, depending on the setting of the ``linearise input gamma
14 curve for low values'' option. If linearisation is disabled, we use:
22 otherwise, with linearisation enabled, we use:
26 \frac{r}{12.92} & r \leq 0.04045 \\
27 \left(\frac{r + 0.055}{1.055}\right)^{\gamma_i} & r > 0.04045
31 and similarly for $g$ and $b$.
33 Next, the colour transformation matrix is used to convert to XYZ:
36 \left[\begin{array}{c}
41 \left[\begin{array}{ccc}
42 m_{11} & m_{12} & m_{13} \\
43 m_{21} & m_{22} & m_{23} \\
44 m_{31} & m_{32} & m_{33}
46 \left[\begin{array}{c}
53 Note: some tools apply a white-point correction here, but DCP-o-matic currently does not do that.
55 Finally, the output gamma $\gamma_o$ is applied to give our final XYZ values $(x', y', z')$:
58 x' &= x^{1/\gamma_o} \\
59 y' &= y^{1/\gamma_o} \\
60 z' &= z^{1/\gamma_o} \\