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

1"""

2 DJI D-Gamut Colourspace

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

4

5 Define the *DJI D-Gamut* colourspace:

6

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

8

9 References

10----------

11- :cite:`DJI2017` : Dji. (2017). White Paper on D-Log and D-Gamut of DJI

12 Cinema Color System (pp. 1-5).

13 https://dl.djicdn.com/downloads/zenmuse+x7/20171010/\

14 D-Log_D-Gamut_Whitepaper.pdf

15"""

16

17 from __future__ import annotations

18

19 import typing

20

21 import numpy as np

22

23 from colour.colorimetry import CCS_ILLUMINANTS

24

25 if typing.TYPE_CHECKING:

26 from colour.hints import NDArrayFloat

27

28 from colour.models.rgb import (

29 RGB_Colourspace,

30 log_decoding_DJIDLog,

31 log_encoding_DJIDLog,

32)

33

34 __author__ = "Colour Developers"

35 __copyright__ = "Copyright 2013 Colour Developers"

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

37 __maintainer__ = "Colour Developers"

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

39 __status__ = "Production"

40

41 __all__ = [

42 "PRIMARIES_DJI_D_GAMUT",

43 "WHITEPOINT_NAME_DJI_D_GAMUT",

44 "CCS_WHITEPOINT_DJI_D_GAMUT",

45 "MATRIX_DJI_D_GAMUT_TO_XYZ",

46 "MATRIX_XYZ_TO_DJI_D_GAMUT",

47 "RGB_COLOURSPACE_DJI_D_GAMUT",

48]

49

50 PRIMARIES_DJI_D_GAMUT: NDArrayFloat = np.array(

51 [

52 [0.71, 0.31],

53 [0.21, 0.88],

54 [0.09, -0.08],

55 ]

56)

57"""*DJI D-Gamut* colourspace primaries."""

58

59 WHITEPOINT_NAME_DJI_D_GAMUT: str = "D65"

60"""*DJI D-Gamut* colourspace whitepoint name."""

61

62 CCS_WHITEPOINT_DJI_D_GAMUT: NDArrayFloat = CCS_ILLUMINANTS[

63 "CIE 1931 2 Degree Standard Observer"

64][WHITEPOINT_NAME_DJI_D_GAMUT]

65"""*DJI D-Gamut* colourspace whitepoint chromaticity coordinates."""

66

67 MATRIX_DJI_D_GAMUT_TO_XYZ: NDArrayFloat = np.array(

68 [

69 [0.6482, 0.1940, 0.1082],

70 [0.2830, 0.8132, -0.0962],

71 [-0.0183, -0.0832, 1.1903],

72 ]

73)

74"""*DJI D-Gamut* colourspace to *CIE XYZ* tristimulus values matrix."""

75

76 MATRIX_XYZ_TO_DJI_D_GAMUT: NDArrayFloat = np.array(

77 [

78 [1.7257, -0.4314, -0.1917],

79 [-0.6025, 1.3906, 0.1671],

80 [-0.0156, 0.0905, 0.8489],

81 ]

82)

83"""*CIE XYZ* tristimulus values to *DJI D-Gamut* colourspace matrix."""

84

85 RGB_COLOURSPACE_DJI_D_GAMUT: RGB_Colourspace = RGB_Colourspace(

86 "DJI D-Gamut",

87 PRIMARIES_DJI_D_GAMUT,

88 CCS_WHITEPOINT_DJI_D_GAMUT,

89 WHITEPOINT_NAME_DJI_D_GAMUT,

90 MATRIX_DJI_D_GAMUT_TO_XYZ,

91 MATRIX_XYZ_TO_DJI_D_GAMUT,

92 log_encoding_DJIDLog,

93 log_decoding_DJIDLog,

94)

95 RGB_COLOURSPACE_DJI_D_GAMUT.__doc__ = """

96*DJI_D-Gamut* colourspace.

97

98 References

99----------

100:cite:`DJI2017`

101"""