Defines LLAB(l:c) colour appearance model objects:
References
[1] | Fairchild, M. D. (2013). LLAB Model. In Color Appearance Models (3rd ed., pp. 6025–6178). Wiley. ASIN:B00DAYO8E2 |
[2] | Luo, M. R., & Morovic, J. (1996). Two Unsolved Issues in Colour Management – Colour Appearance and Gamut Mapping. In Conference: 5th International Conference on High Technology: Imaging Science and Technology – Evolution & Promise (pp. 136–147). Retrieved from http://www.researchgate.net/publication/236348295_Two_Unsolved_Issues_in_Colour_Management__Colour_Appearance_and_Gamut_Mapping |
[3] | Luo, M. R., Lo, M.-C., & Kuo, W.-G. (1996). The LLAB (l:c) colour model. Color Research & Application, 21(6), 412–429. doi:10.1002/(SICI)1520-6378(199612)21:6<412::AID-COL4>3.0.CO;2-Z |
Bases: colour.appearance.llab.LLAB_InductionFactors
LLAB(l:c) colour appearance model induction factors.
Parameters: |
|
---|
Reference LLAB(l:c) colour appearance model viewing conditions.
Aliases:
LLAB(l:c) colour appearance model CIE XYZ tristimulus values to normalised cone responses matrix.
LLAB_XYZ_TO_RGB_MATRIX : array_like, (3, 3)
LLAB(l:c) colour appearance model normalised cone responses to CIE XYZ tristimulus values matrix.
LLAB_RGB_TO_XYZ_MATRIX : array_like, (3, 3)
Bases: colour.appearance.llab.LLAB_ReferenceSpecification
Defines the LLAB(l:c) colour appearance model reference specification.
This specification has field names consistent with Fairchild (2013) reference.
Parameters: |
|
---|
Bases: colour.appearance.llab.LLAB_Specification
Defines the LLAB(l:c) colour appearance model specification.
This specification has field names consistent with the remaining colour appearance models in colour.appearance but diverge from Fairchild (2013) reference.
Parameters: |
|
---|
Computes the LLAB(l:c) colour appearance model correlates.
Parameters: |
|
---|---|
Returns: | LLAB(l:c) colour appearance model specification. |
Return type: | LLAB_Specification |
Warning
The output domain of that definition is non standard!
Notes
Examples
>>> XYZ = np.array([19.01, 20.00, 21.78])
>>> XYZ_0 = np.array([95.05, 100.00, 108.88])
>>> Y_b = 20.0
>>> L = 318.31
>>> surround = LLAB_VIEWING_CONDITIONS['ref_average_4_minus']
>>> XYZ_to_LLAB(XYZ, XYZ_0, Y_b, L, surround)
LLAB_Specification(J=37.3668650..., C=0.0089496..., h=270.0000000..., s=0.0002395..., M=0.0190185..., HC=None, a=1.4742890..., b=-0.0190185...)
Converts from CIE XYZ tristimulus values to normalised cone responses.
Parameters: | XYZ (array_like) – CIE XYZ tristimulus values. |
---|---|
Returns: | Normalised cone responses. |
Return type: | ndarray |
Examples
>>> XYZ = np.array([19.01, 20.00, 21.78])
>>> XYZ_to_RGB_LLAB(XYZ)
array([ 0.9414279..., 1.0404012..., 1.0897088...])
Applies chromatic adaptation to given RGB normalised cone responses array.
Parameters: |
|
---|---|
Returns: | Adapted CIE XYZ tristimulus values. |
Return type: | ndarray |
Examples
>>> RGB = np.array([0.94142795, 1.04040120, 1.08970885])
>>> RGB_0 = np.array([0.94146023, 1.04039386, 1.08950293])
>>> RGB_0r = np.array([0.94146023, 1.04039386, 1.08950293])
>>> Y = 20.0
>>> chromatic_adaptation(RGB, RGB_0, RGB_0r, Y)
array([ 19.01, 20. , 21.78])
Defines the nonlinear response function of the LLAB(l:c) colour appearance model used to model the nonlinear behavior of various visual responses.
Parameters: |
|
---|---|
Returns: | Modeled visual response variable \(x\). |
Return type: | numeric or array_like |
Examples
>>> x = np.array([0.23350512, 0.23351103, 0.23355179])
>>> f(0.20000918623399996, 3)
array(0.5848125...)
Returns opponent colour dimensions from given adapted CIE XYZ tristimulus values.
The opponent colour dimensions are based on a modified CIE Lab colourspace formulae.
Parameters: |
|
---|---|
Returns: | Opponent colour dimensions. |
Return type: | ndarray |
Examples
>>> XYZ = np.array([19.00999572, 20.00091862, 21.77993863])
>>> Y_b = 20.0
>>> F_S = 3.0
>>> F_L = 1.0
>>> opponent_colour_dimensions(XYZ, Y_b, F_S, F_L)
array([ 3.7368047...e+01, -4.4986443...e-03, -5.2604647...e-03])
Returns the hue angle \(h_L\) in degrees.
Parameters: |
|
---|---|
Returns: | Hue angle \(h_L\) in degrees. |
Return type: | numeric or ndarray |
Examples
>>> hue_angle(-4.49864756e-03, -5.26046353e-03)
229.4635727...
Returns the correlate of chroma \(Ch_L\).
Parameters: |
|
---|---|
Returns: | Correlate of chroma \(Ch_L\). |
Return type: | numeric or ndarray |
Examples
>>> a = -4.49864756e-03
>>> b = -5.26046353e-03
>>> chroma_correlate(a, b)
0.0086506...
Returns the correlate of colourfulness \(C_L\).
Parameters: |
|
---|---|
Returns: | Correlate of colourfulness \(C_L\). |
Return type: | numeric or ndarray |
Examples
>>> L = 318.31
>>> L_L = 37.368047493928195
>>> Ch_L = 0.0086506620517144972
>>> F_C = 1.0
>>> colourfulness_correlate(L, L_L, Ch_L, F_C)
0.0183832...
Returns the correlate of saturation \(S_L\).
Parameters: |
|
---|---|
Returns: | Correlate of saturation \(S_L\). |
Return type: | numeric or ndarray |
Examples
>>> Ch_L = 0.0086506620517144972
>>> L_L = 37.368047493928195
>>> saturation_correlate(Ch_L, L_L)
0.0002314...
Returns the final opponent signals \(A_L\) and \(B_L\).
Parameters: |
|
---|---|
Returns: | Final opponent signals \(A_L\) and \(B_L\). |
Return type: | ndarray |
Examples
>>> C_L = 0.0183832899143
>>> h_L = 4.004894857014253
>>> final_opponent_signals(C_L, h_L)
array([-0.0119478..., -0.0139711...])