colour.models.ucs_luo2006 Module

CAM02-LCD, CAM02-SCD, and CAM02-UCS Colourspaces - Luo, Cui and Li (2006)

Defines the Luo et al. (2006) CAM02-LCD, CAM02-SCD, and CAM02-UCS colourspaces transformations:

  • JMh_CIECAM02_to_CAM02LCD()
  • CAM02LCD_to_JMh_CIECAM02()
  • JMh_CIECAM02_to_CAM02SCD()
  • CAM02SCD_to_JMh_CIECAM02()
  • JMh_CIECAM02_to_CAM02UCS()
  • CAM02UCS_to_JMh_CIECAM02()

References

[1]Luo, R. M., Cui, G., & Li, C. (2006). Uniform Colour Spaces Based on CIECAM02 Colour Appearance Model. Color Research and Application, 31(4), 320–330. doi:10.1002/col.20227
class colour.models.ucs_luo2006.Coefficients_UCS_Luo2006[source]

Bases: colour.models.ucs_luo2006.Coefficients_UCS_Luo2006

Defines the the class storing Luo et al. (2006) fitting coefficients for the CAM02-LCD, CAM02-SCD, and CAM02-UCS colourspaces.

Create new instance of Coefficients_UCS_Luo2006(K_L, c_1, c_2)

colour.models.ucs_luo2006.COEFFICIENTS_UCS_LUO2006 = CaseInsensitiveMapping({u'CAM02-LCD': Coefficients_UCS_Luo2006(K_L=0.77, c_1=0.007, c_2=0.0053), u'CAM02-SCD': Coefficients_UCS_Luo2006(K_L=1.24, c_1=0.007, c_2=0.0363), u'CAM02-UCS': Coefficients_UCS_Luo2006(K_L=1.0, c_1=0.007, c_2=0.0228)})

Luo et al. (2006) fitting coefficients for the CAM02-LCD, CAM02-SCD, and CAM02-UCS colourspaces.

COEFFICIENTS_UCS_LUO2006 : CaseInsensitiveMapping
{‘CAM02-LCD’, ‘CAM02-SCD’, ‘CAM02-UCS’}
colour.models.ucs_luo2006.JMh_CIECAM02_to_UCS_Luo2006(JMh, coefficients)[source]

Converts from CIECAM02 \(JMh\) correlates array to one of the Luo et al. (2006) CAM02-LCD, CAM02-SCD, or CAM02-UCS colourspaces \(J'a'b'\) array.

The \(JMh\) correlates array is constructed using the CIECAM02 correlate of Lightness \(J\), the CIECAM02 correlate of colourfulness \(M\) and the CIECAM02 Hue angle \(h\) in degrees.

Parameters:
  • JMh (array_like) – CIECAM02 correlates array \(JMh\).
  • coefficients (array_like) – Coefficients of one of the Luo et al. (2006) CAM02-LCD, CAM02-SCD, or CAM02-UCS colourspaces.
Returns:

Luo et al. (2006) CAM02-LCD, CAM02-SCD, or CAM02-UCS colourspaces \(J'a'b'\) array.

Return type:

ndarray

Examples

>>> from colour.appearance import (
...     CIECAM02_VIEWING_CONDITIONS,
...     XYZ_to_CIECAM02)
>>> XYZ = np.array([19.01, 20.00, 21.78])
>>> XYZ_w = np.array([95.05, 100.00, 108.88])
>>> L_A = 318.31
>>> Y_b = 20.0
>>> surround = CIECAM02_VIEWING_CONDITIONS['Average']
>>> specification = XYZ_to_CIECAM02(
...     XYZ, XYZ_w, L_A, Y_b, surround)
>>> JMh = (specification.J, specification.M, specification.h)
>>> JMh_CIECAM02_to_UCS_Luo2006(  
...     JMh, COEFFICIENTS_UCS_LUO2006['CAM02-LCD'])
array([ 54.9043313...,  -0.0845039...,  -0.0685483...])
colour.models.ucs_luo2006.UCS_Luo2006_to_JMh_CIECAM02(Jpapbp, coefficients)[source]

Converts from one of the Luo et al. (2006) CAM02-LCD, CAM02-SCD, or CAM02-UCS colourspaces \(J'a'b'\) array to CIECAM02 \(JMh\) correlates array.

Parameters:
  • Jpapbp (array_like) – Luo et al. (2006) CAM02-LCD, CAM02-SCD, or CAM02-UCS colourspaces \(J'a'b'\) array.
  • coefficients (array_like) – Coefficients of one of the Luo et al. (2006) CAM02-LCD, CAM02-SCD, or CAM02-UCS colourspaces.
Returns:

CIECAM02 correlates array \(JMh\).

Return type:

ndarray

Examples

>>> Jpapbp = np.array([54.90433134, -0.08450395, -0.06854831])
>>> UCS_Luo2006_to_JMh_CIECAM02(  
...     Jpapbp, COEFFICIENTS_UCS_LUO2006['CAM02-LCD'])
array([  4.1731091...e+01,   1.0884217...e-01,   2.1904843...e+02])