colour.characterisation.colour_correction_Finlayson2015#

colour.characterisation.colour_correction_Finlayson2015(RGB: ArrayLike, M_T: ArrayLike, M_R: ArrayLike, degree: Literal[1, 2, 3, 4] | int = 1, root_polynomial_expansion: bool = True) NDArrayFloat[source]#

Perform colour correction of RGB colourspace array using the colour correction matrix from test array \(M_T\) to reference array \(M_R\) using the Finlayson et al. (2015) method.

Parameters:
  • RGB (ArrayLike) – RGB colourspace array to colour correct.

  • M_T (ArrayLike) – Test array \(M_T\) to fit onto reference array \(M_R\).

  • M_R (ArrayLike) – Reference array that the test array \(M_T\) will be fitted against.

  • degree (Literal[1, 2, 3, 4] | int) – Polynomial expansion degree.

  • root_polynomial_expansion (bool) – Whether to use the root-polynomial set for the expansion.

Returns:

Colour corrected RGB colourspace array.

Return type:

numpy.ndarray

References

[FMH15]

Examples

>>> RGB = np.array([0.17224810, 0.09170660, 0.06416938])
>>> prng = np.random.RandomState(2)
>>> M_T = prng.random_sample((24, 3))
>>> M_R = M_T + (prng.random_sample((24, 3)) - 0.5) * 0.5
>>> colour_correction_Finlayson2015(RGB, M_T, M_R)
array([0.1793456..., 0.1003392..., 0.0617218...])