Coverage for models/rgb/datasets/itur_bt_709.py: 0%

1"""

2 Recommendation ITU-R BT.709 Colourspace

3=======================================

4

5 Define the *Recommendation ITU-R BT.709* colourspace:

6

7- :attr:`colour.models.RGB_COLOURSPACE_BT709`.

8

9 References

10----------

11- :cite:`InternationalTelecommunicationUnion2015i` : International

12 Telecommunication Union. (2015). Recommendation ITU-R BT.709-6 - Parameter

13 values for the HDTV standards for production and international programme

14 exchange BT Series Broadcasting service (pp. 1-32).

15 https://www.itu.int/dms_pubrec/itu-r/rec/bt/\

16 R-REC-BT.709-6-201506-I!!PDF-E.pdf

17"""

18

19 from __future__ import annotations

20

21 import typing

22

23 import numpy as np

24

25 from colour.colorimetry import CCS_ILLUMINANTS

26

27 if typing.TYPE_CHECKING:

28 from colour.hints import NDArrayFloat

29

30 from colour.models.rgb import (

31 RGB_Colourspace,

32 normalised_primary_matrix,

33 oetf_BT709,

34 oetf_inverse_BT709,

35)

36

37 __author__ = "Colour Developers"

38 __copyright__ = "Copyright 2013 Colour Developers"

39 __license__ = "BSD-3-Clause - https://opensource.org/licenses/BSD-3-Clause"

40 __maintainer__ = "Colour Developers"

41 __email__ = "colour-developers@colour-science.org"

42 __status__ = "Production"

43

44 __all__ = [

45 "PRIMARIES_BT709",

46 "CCS_WHITEPOINT_BT709",

47 "WHITEPOINT_NAME_BT709",

48 "MATRIX_BT709_TO_XYZ",

49 "MATRIX_XYZ_TO_BT709",

50 "RGB_COLOURSPACE_BT709",

51]

52

53 PRIMARIES_BT709: NDArrayFloat = np.array(

54 [

55 [0.6400, 0.3300],

56 [0.3000, 0.6000],

57 [0.1500, 0.0600],

58 ]

59)

60"""*Recommendation ITU-R BT.709* colourspace primaries."""

61

62 WHITEPOINT_NAME_BT709: str = "D65"

63"""*Recommendation ITU-R BT.709* colourspace whitepoint name."""

64

65 CCS_WHITEPOINT_BT709: NDArrayFloat = CCS_ILLUMINANTS[

66 "CIE 1931 2 Degree Standard Observer"

67][WHITEPOINT_NAME_BT709]

68"""

69*Recommendation ITU-R BT.709* colourspace whitepoint chromaticity coordinates.

70"""

71

72 MATRIX_BT709_TO_XYZ: NDArrayFloat = normalised_primary_matrix(

73 PRIMARIES_BT709, CCS_WHITEPOINT_BT709

74)

75"""

76*Recommendation ITU-R BT.709* colourspace to *CIE XYZ* tristimulus values

77 matrix.

78"""

79

80 MATRIX_XYZ_TO_BT709: NDArrayFloat = np.linalg.inv(MATRIX_BT709_TO_XYZ)

81"""

82*CIE XYZ* tristimulus values to *Recommendation ITU-R BT.709* colourspace

83 matrix.

84"""

85

86 RGB_COLOURSPACE_BT709: RGB_Colourspace = RGB_Colourspace(

87 "ITU-R BT.709",

88 PRIMARIES_BT709,

89 CCS_WHITEPOINT_BT709,

90 WHITEPOINT_NAME_BT709,

91 MATRIX_BT709_TO_XYZ,

92 MATRIX_XYZ_TO_BT709,

93 oetf_BT709,

94 oetf_inverse_BT709,

95)

96 RGB_COLOURSPACE_BT709.__doc__ = """

97*Recommendation ITU-R BT.709* colourspace.

98

99 References

100----------

101:cite:`InternationalTelecommunicationUnion2015i`

102"""