colour.models.hdr_cie_lab Module

hdr-CIELAB Colourspace

Defines the hdr-CIELAB colourspace transformations:

References

[1]Fairchild, M. D., & Wyble, D. R. (2010). hdr-CIELAB and hdr-IPT: Simple Models for Describing the Color of High-Dynamic-Range and Wide-Color-Gamut Images. In Proc. of Color and Imaging Conference (pp. 322–326). ISBN:9781629932156
colour.models.hdr_cie_lab.XYZ_to_hdr_CIELab(XYZ, illuminant=array([ 0.3457, 0.3585]), Y_s=0.2, Y_abs=100)[source]

Converts from CIE XYZ tristimulus values to hdr-CIELAB colourspace.

Parameters:
  • XYZ (array_like) – CIE XYZ tristimulus values.
  • illuminant (array_like, optional) – Reference illuminant xy chromaticity coordinates or CIE xyY colourspace array.
  • Y_s (numeric or array_like) – Relative luminance \(Y_s\) of the surround in domain [0, 1].
  • Y_abs (numeric or array_like) – Absolute luminance \(Y_{abs}\) of the scene diffuse white in \(cd/m^2\).
Returns:

hdr-CIELAB colourspace array.

Return type:

ndarray

Notes

  • Conversion to polar coordinates to compute the chroma \(C_{hdr}\) and hue \(h_{hdr}\) correlates can be safely performed with colour.Lab_to_LCHab() definition.
  • Conversion to cartesian coordinates from the Lightness \(L_{hdr}\), chroma \(C_{hdr}\) and hue \(h_{hdr}\) correlates can be safely performed with colour.LCHab_to_Lab() definition.
  • Input CIE XYZ tristimulus values are in domain [0, math:infty].
  • Input illuminant xy chromaticity coordinates or CIE xyY colourspace array are in domain [0, \(\infty\)].

Examples

>>> XYZ = np.array([0.07049534, 0.10080000, 0.09558313])
>>> XYZ_to_hdr_CIELab(XYZ)  
array([ 24.9020664..., -46.8312760..., -10.14274843])
colour.models.hdr_cie_lab.hdr_CIELab_to_XYZ(Lab_hdr, illuminant=array([ 0.3457, 0.3585]), Y_s=0.2, Y_abs=100)[source]

Converts from hdr-CIELAB colourspace to CIE XYZ tristimulus values.

Parameters:
  • Lab_hdr (array_like) – hdr-CIELAB colourspace array.
  • illuminant (array_like, optional) – Reference illuminant xy chromaticity coordinates or CIE xyY colourspace array.
  • Y_s (numeric or array_like) – Relative luminance \(Y_s\) of the surround in domain [0, 1].
  • Y_abs (numeric or array_like) – Absolute luminance \(Y_{abs}\) of the scene diffuse white in \(cd/m^2\).
Returns:

CIE XYZ tristimulus values.

Return type:

ndarray

Notes

  • Input illuminant xy chromaticity coordinates or CIE xyY colourspace array are in domain [0, \(\infty\)].
  • Output CIE XYZ tristimulus values are in range [0, math:infty].

Examples

>>> Lab_hdr = np.array([24.90206646, -46.83127607, -10.14274843])
>>> hdr_CIELab_to_XYZ(Lab_hdr)  
array([ 0.0704953...,  0.1008    ,  0.0955831...])
colour.models.hdr_cie_lab.exponent_hdr_CIELab(Y_s, Y_abs)[source]

Computes hdr-CIELAB colourspace Lightness \(\epsilon\) exponent.

Parameters:
  • Y_s (numeric or array_like) – Relative luminance \(Y_s\) of the surround in range [0, 1].
  • Y_abs (numeric or array_like) – Absolute luminance \(Y_{abs}\) of the scene diffuse white in \(cd/m^2\).
Returns:

hdr-CIELAB colourspace Lightness \(\epsilon\) exponent.

Return type:

array_like

Examples

>>> exponent_hdr_CIELab(0.2, 100)  
1.8360198...