Defines LLAB(l:c) colour appearance model objects:
References
[1] | Mark D. Fairchild, Color Appearance Models, 3nd Edition, The Wiley-IS&T Series in Imaging Science and Technology, published June 2013, ASIN: B00DAYO8E2, locations 6019-6178. |
[2] | Luo, M. R., & Morovic, J., Two Unsolved Issues in Colour Management – Colour Appearance and Gamut Mapping, 5th International Conference on High Technology: Imaging Science and Technology – Evolution & Promise published 1996, pp. 136–147. |
[3] | Luo, M. R., Lo, M. C., & Kuo, W. G., The LLAB (l:c) colour model, Color Research & Application, Volume 21, Issue 6, pages 412–429, December 1996 |
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 colourspace matrix 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 colourspace matrix.
Notes
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 Mark D. Fairchild 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 Mark D. Fairchild 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, 21.78])
>>> XYZ_0 = np.array([95.05, 100, 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.3680474..., C=0.0086506..., h=229.4635727..., s=0.0002314..., M=0.0183832..., HC=None, a=-0.0119478..., b=-0.0139711...)
Converts from CIE XYZ colourspace to normalised cone responses.
Parameters: | XYZ (array_like, (3,)) – CIE XYZ colourspace matrix. |
---|---|
Returns: | Normalised cone responses. |
Return type: | ndarray, (3,) |
Examples
>>> XYZ = np.array([19.01, 20, 21.78])
>>> XYZ_to_RGB_LLAB(XYZ)
array([ 0.9414279..., 1.0404012..., 1.0897088...])
Applies chromatic adaptation to given RGB normalised cone responses matrix.
Parameters: |
|
---|---|
Returns: | Adapted CIE XYZ colourspace matrix. |
Return type: | ndarray, (3,) |
Examples
>>> RGB = np.array([0.94142795, 1.0404012, 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.0099957..., 20.0009186..., 21.7799386...])
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 colourspace matrix.
The opponent colour dimensions are based on a modified CIE Lab colourspace formulae.
Parameters: |
|
---|---|
Returns: | Opponent colour dimensions. |
Return type: | ndarray, (3,) |
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 |
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 |
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 |
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 |
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: | tuple |
Examples
>>> C_L = 0.0183832899143
>>> h_L = 4.004894857014253
>>> final_opponent_signals(C_L, h_L)
(-0.0119478..., -0.0139711...)