colour.characterisation.matrix_colour_correction_Vandermonde#

colour.characterisation.matrix_colour_correction_Vandermonde(M_T: ArrayLike, M_R: ArrayLike, degree: int = 1) numpy.ndarray[source]#

Compute a colour correction matrix from given \(M_T\) colour array to \(M_R\) colour array using Vandermonde method.

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

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

  • degree (int) – Expanded polynomial degree.

Returns

Colour correction matrix.

Return type

numpy.ndarray

References

[Wikipedia03f]

Examples

>>> 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
>>> matrix_colour_correction_Vandermonde(M_T, M_R)  
array([[ 1.0300256...,  0.1141770..., -0.2621816...,  0.0418022...],
       [ 0.0670209...,  1.0221494..., -0.1166108...,  0.0128250...],
       [ 0.0744612..., -0.1872819...,  1.1278078..., -0.0318085...]])