colour.difference.XYZ_to_metamerism_index#
- colour.difference.XYZ_to_metamerism_index(XYZ_spl_t: Domain1, XYZ_std_t: Domain1, XYZ_spl_r: Domain1, XYZ_std_r: Domain1, correction: str = 'Multiplicative', method: LiteralDeltaEMethod | str = 'CIE 2000', *, additional_data: Literal[False] = False, **kwargs: Any) NDArrayFloat[source]#
- colour.difference.XYZ_to_metamerism_index(XYZ_spl_t: Domain1, XYZ_std_t: Domain1, XYZ_spl_r: Domain1, XYZ_std_r: Domain1, correction: str = 'Multiplicative', method: LiteralDeltaEMethod | str = 'CIE 2000', *, additional_data: Literal[True], **kwargs: Any) DeltaE_Specification
Compute the metamerism index \(M_{t}\) from four specified CIE XYZ colourspace arrays.
Before computing the metamerism index, apply either an additive or multiplicative correction. The correction is based on the difference between the colour sample and colour standard under the reference illuminant and is applied to the colour sample under the test illuminant. The correction is applied in CIE XYZ colourspace. Afterwards, convert to CIE L*a*b* colourspace to compute the metamerism index.
[InternationalOfStandardization24] recommends using multiplicative correction in CIE XYZ.
- Parameters:
XYZ_spl_t (Domain1) – CIE XYZ tristimulus array of the colour sample under the test illuminant.
XYZ_std_t (Domain1) – CIE XYZ tristimulus array of the colour standard under the test illuminant.
XYZ_spl_r (Domain1) – CIE XYZ tristimulus array of the colour sample under the reference illuminant.
XYZ_std_r (Domain1) – CIE XYZ tristimulus array of the colour standard under the reference illuminant.
correction (Literal['Additive', 'Multiplicative'] | str) – Correction method to apply, either
'Additive'or'Multiplicative'.method (LiteralDeltaEMethod | str) – Colour-difference method.
additional_data (bool) – Whether to output additional data.
illuminant – {
colour.models.XYZ_to_Lab()}, Test illuminant CIE xy chromaticity coordinates or CIE xyY colourspace array for conversion from CIE XYZ to CIE L*a*b*.c – {
colour.difference.delta_E_CMC()}, Chroma weighting factor.l – {
colour.difference.delta_E_CMC()}, Lightness weighting factor.textiles – {
colour.difference.delta_E_CIE1994(),colour.difference.delta_E_CIE2000(),colour.difference.delta_E_DIN99()}, Textiles application specific parametric factors \(k_L=2,\ k_C=k_H=1,\ k_1=0.048,\ k_2=0.014,\ k_E=2,\ k_{CH}=0.5\) weights are used instead of \(k_L=k_C=k_H=1,\ k_1=0.045,\ k_2=0.015,\ k_E=k_{CH}=1.0\).kwargs (Any)
- Returns:
Metamerism index \(M_{t}\).
- Return type:
numpy.ndarrayorDeltaE_Specification
Notes
Domain
Scale - Reference
Scale - 1
XYZ_spl_t1
1
XYZ_std_t1
1
XYZ_spl_r1
1
XYZ_std_r1
1
References
[InternationalOfStandardization24]
Examples
>>> import numpy as np >>> from colour import CCS_ILLUMINANTS >>> XYZ_std_r = np.array([7.6576, 10.7116, 5.0731]) / 100 >>> XYZ_std_t = np.array([8.96442, 10.1878, 1.6663]) / 100 >>> XYZ_spl_r = np.array([7.6933, 10.5616, 5.54474]) / 100 >>> XYZ_spl_t = np.array([8.56438, 10.0324, 1.9315]) / 100 >>> XYZ_to_metamerism_index( ... XYZ_spl_t, ... XYZ_std_t, ... XYZ_spl_r, ... XYZ_std_r, ... correction="multiplicative", ... method="CIE 1976", ... illuminant=CCS_ILLUMINANTS["CIE 1964 10 Degree Standard Observer"]["A"], ... ) np.float64(3.7906989...) >>> XYZ_to_metamerism_index( ... XYZ_spl_t, ... XYZ_std_t, ... XYZ_spl_r, ... XYZ_std_r, ... correction="additive", ... method="CIE 1976", ... illuminant=CCS_ILLUMINANTS["CIE 1964 10 Degree Standard Observer"]["A"], ... ) np.float64(4.6910648...)