colour.characterisation.colour_correction_Vandermonde¶
-
colour.characterisation.
colour_correction_Vandermonde
(RGB, M_T, M_R, degree=1)[source]¶ Performs colour correction of given RGB colourspace array using the colour correction matrix from given \(M_T\) colour array to \(M_R\) colour array using Vandermonde method.
Parameters: - RGB (array_like, (3, n)) – RGB colourspace array to colour correct.
- M_T (array_like, (3, n)) – Test array \(M_T\) to fit onto array \(M_R\).
- M_R (array_like, (3, n)) – Reference array the array \(M_T\) will be colour fitted against.
- degree (int, optional) – Expanded polynomial degree.
Returns: Colour corrected RGB colourspace array.
Return type: ndarray
References
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_Vandermonde(RGB, M_T, M_R) # doctest: +ELLIPSIS array([ 0.2128689..., 0.1106242..., 0.036213 ...])