colour.models.cie_luv Module¶
CIE Luv Colourspace¶
Defines the CIE Luv colourspace transformations:
See also
References
[1] | CIE TC 1-48. (2004). CIE 1976 uniform colour spaces. In CIE 015:2004 Colorimetry, 3rd Edition (p. 24). ISBN:978-3-901-90633-6 |
[2] | CIE TC 1-48. (2004). CIE 1976 uniform chromaticity scale diagram (UCS diagram). In CIE 015:2004 Colorimetry, 3rd Edition (p. 24). ISBN:978-3-901-90633-6 |
-
colour.models.cie_luv.
XYZ_to_Luv
(XYZ, illuminant=array([ 0.3457, 0.3585]))[source]¶ Converts from CIE XYZ tristimulus values to CIE Luv colourspace.
Parameters: - XYZ (array_like) – CIE XYZ tristimulus values.
- illuminant (array_like, optional) – Reference illuminant xy chromaticity coordinates or CIE xyY colourspace array.
Returns: CIE Luv colourspace array.
Return type: ndarray
Notes
- Input CIE XYZ tristimulus values are in domain [0, 1].
- Input illuminant xy chromaticity coordinates or CIE xyY colourspace array are in domain [0, \(\infty\)].
- Output \(L^*\) is in range [0, 100].
Examples
>>> XYZ = np.array([0.07049534, 0.10080000, 0.09558313]) >>> XYZ_to_Luv(XYZ) array([ 37.9856291..., -28.8021959..., -1.3580070...])
-
colour.models.cie_luv.
Luv_to_XYZ
(Luv, illuminant=array([ 0.3457, 0.3585]))[source]¶ Converts from CIE Luv colourspace to CIE XYZ tristimulus values.
Parameters: - Luv (array_like) – CIE Luv colourspace array.
- illuminant (array_like, optional) – Reference illuminant xy chromaticity coordinates or CIE xyY colourspace array.
Returns: CIE XYZ tristimulus values.
Return type: ndarray
Notes
- Input \(L^*\) is in domain [0, 100].
- Input illuminant xy chromaticity coordinates or CIE xyY colourspace array are in domain [0, \(\infty\)].
- Output CIE XYZ tristimulus values are in range [0, 1].
Examples
>>> Luv = np.array([37.9856291 , -28.80219593, -1.35800706]) >>> Luv_to_XYZ(Luv) array([ 0.0704953..., 0.1008 , 0.0955831...])
-
colour.models.cie_luv.
Luv_to_uv
(Luv, illuminant=array([ 0.3457, 0.3585]))[source]¶ Returns the \(uv^p\) chromaticity coordinates from given CIE Luv colourspace array.
Parameters: - Luv (array_like) – CIE Luv colourspace array.
- illuminant (array_like, optional) – Reference illuminant xy chromaticity coordinates or CIE xyY colourspace array.
Returns: \(uv^p\) chromaticity coordinates.
Return type: ndarray
Notes
- Input \(L^*\) is in domain [0, 100].
- Input illuminant xy chromaticity coordinates or CIE xyY colourspace array are in domain [0, \(\infty\)].
- Output \(uv^p\) chromaticity coordinates are in range [0, 1].
Examples
>>> Luv = np.array([37.9856291 , -28.80219593, -1.35800706]) >>> Luv_to_uv(Luv) array([ 0.1508531..., 0.4853297...])
-
colour.models.cie_luv.
Luv_uv_to_xy
(uv)[source]¶ Returns the xy chromaticity coordinates from given CIE Luv colourspace \(uv^p\) chromaticity coordinates.
Parameters: uv (array_like) – CIE Luv u”v” chromaticity coordinates. Returns: xy chromaticity coordinates. Return type: ndarray Notes
- Input \(uv^p\) chromaticity coordinates are in domain [0, 1].
- Output xy is in range [0, 1].
References
[3] Wikipedia. (n.d.). The reverse transformation. Retrieved from http://en.wikipedia.org/wiki/CIELUV#The_reverse_transformation Examples
>>> uv = np.array([0.150853098829857, 0.485329708543180]) >>> Luv_uv_to_xy(uv) array([ 0.2641477..., 0.3777000...])
-
colour.models.cie_luv.
Luv_to_LCHuv
(Luv)[source]¶ Converts from CIE Luv colourspace to CIE LCHuv colourspace.
Parameters: Luv (array_like) – CIE Luv colourspace array. Returns: CIE LCHuv colourspace array. Return type: ndarray Notes
- Input / output \(L^*\) is in domain / range [0, 100].
Examples
>>> Luv = np.array([37.9856291 , -28.80219593, -1.35800706]) >>> Luv_to_LCHuv(Luv) array([ 37.9856291..., 28.8341927..., 182.6994640...])
-
colour.models.cie_luv.
LCHuv_to_Luv
(LCHuv)[source]¶ Converts from CIE LCHuv colourspace to CIE Luv colourspace.
Parameters: LCHuv (array_like) – CIE LCHuv colourspace array. Returns: CIE Luv colourspace array. Return type: ndarray Notes
- Input / output \(L^*\) is in domain / range [0, 100].
Examples
>>> LCHuv = np.array([37.98562910, 28.83419279, 182.69946404]) >>> LCHuv_to_Luv(LCHuv) array([ 37.9856291..., -28.8021959..., -1.3580070...])