Module rgb_derivation::matrix [−][src]
Functions for calculating RGB↔XYZ conversion matrices and performing basic matrix manipulation.
Specifically, calculate
generates the RGB→XYZ change of basis matrix
from chromacities of the reference white point and red, green and blue
primary colours. Inversing that matrix with inversed_copy
constructs
change of basis in the opposite direction and transposing with
transposed_copy
results in a matrix whose rows are XYZ coordinates of
the primary colours.
Traits
Scalar | Trait for scalar type used in calculations. |
Functions
calculate | Calculates change of basis matrix for moving from linear RGB to XYZ colour spaces. |
inversed_copy | Returns inversion of a 3✕3 matrix M, i.e. M⁻¹. |
transposed | Transposes a 3×3 matrix. Consumes the argument and returns a new matrix. |
transposed_copy | Transposes a 3×3 matrix. Constructs a new matrix and returns it. |
Type Definitions
Matrix | A two-dimensional 3×3 array. |