colour.Kim2009_to_XYZ#

colour.Kim2009_to_XYZ(specification: Annotated[CAM_Specification_Kim2009, 100, 100, 360, 100, 100, 100, 400], XYZ_w: Annotated[_Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str], 100], L_A: ArrayLike, media: MediaParameters_Kim2009 = MEDIA_PARAMETERS_KIM2009['CRT Displays'], surround: InductionFactors_Kim2009 = VIEWING_CONDITIONS_KIM2009['Average'], n_c: float = 0.57, discount_illuminant: bool = False) Annotated[ndarray[tuple[Any, ...], dtype[float16 | float32 | float64]], 100][source]#

Convert the Kim, Weyrich and Kautz (2009) colour appearance model specification to CIE XYZ tristimulus values.

Parameters:
  • specification (Annotated[CAM_Specification_Kim2009, (100, 100, 360, 100, 100, 100, 400)]) – Kim, Weyrich and Kautz (2009) colour appearance model specification. Correlate of Lightness \(J\), correlate of chroma \(C\) or correlate of colourfulness \(M\) and hue angle \(h\) in degrees must be specified, e.g., \(JCh\) or \(JMh\).

  • XYZ_w (Annotated[_Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str], 100]) – CIE XYZ tristimulus values of reference white.

  • L_A (ArrayLike) – Adapting field luminance \(L_A\) in \(cd/m^2\), (often taken to be 20% of the luminance of a white object in the scene).

  • media (MediaParameters_Kim2009) – Media parameters.

  • surround (InductionFactors_Kim2009) – Surround viewing conditions induction factors.

  • n_c (float) – Cone response sigmoidal curve modulating factor \(n_c\).

  • discount_illuminant (bool) – Truth value indicating if the illuminant should be discounted.

Returns:

CIE XYZ tristimulus values.

Return type:

numpy.ndarray

Raises:

ValueError – If neither \(C\) nor \(M\) correlates have been defined in the specification argument.

Notes

Domain

Scale - Reference

Scale - 1

specification.J

100

1

specification.C

100

1

specification.h

360

1

specification.s

100

1

specification.Q

100

1

specification.M

100

1

specification.H

360

1

XYZ_w

100

1

Range

Scale - Reference

Scale - 1

XYZ

100

1

References

[KWK09]

Examples

>>> specification = CAM_Specification_Kim2009(
...     J=28.861908975839647, C=0.5592455924373706, h=219.04806677662953
... )
>>> XYZ_w = np.array([95.05, 100.00, 108.88])
>>> L_A = 318.31
>>> media = MEDIA_PARAMETERS_KIM2009["CRT Displays"]
>>> surround = VIEWING_CONDITIONS_KIM2009["Average"]
>>> Kim2009_to_XYZ(specification, XYZ_w, L_A, media, surround)
...
array([ 19.0099995...,  19.9999999...,  21.7800000...])