colour.characterisation.apply_matrix_colour_correction_Cheung2004#

colour.characterisation.apply_matrix_colour_correction_Cheung2004(RGB: ArrayLike, CCM: ArrayLike, terms: Literal[3, 4, 5, 7, 8, 10, 11, 14, 16, 17, 19, 20, 22, 35] = 3) NDArrayFloat[source]#

Apply given colour correction matrix \(CCM\) computed using Cheung et al. (2004) method to given RGB colourspace array.

Parameters:
  • RGB (ArrayLike) – RGB colourspace array to apply the colour correction matrix \(CCM\) to.

  • CCM (ArrayLike) – Colour correction matrix \(CCM\).

  • terms (Literal[3, 4, 5, 7, 8, 10, 11, 14, 16, 17, 19, 20, 22, 35]) – Number of terms of the expanded polynomial.

Returns:

Colour corrected RGB colourspace array.

Return type:

numpy.ndarray

References

[CWCR04], [WR04]

Examples

>>> RGB = np.array([0.17224810, 0.09170660, 0.06416938])
>>> CCM = np.array(
...     [
...         [1.05263767, 0.13780789, -0.22763399],
...         [0.07395843, 1.02939945, -0.1060115],
...         [0.05725508, -0.20526336, 1.10151945],
...     ]
... )
>>> apply_matrix_colour_correction_Cheung2004(RGB, CCM)  
array([ 0.1793456...,  0.1003392...,  0.0617218...])