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

1"""

2 Fujifilm Colourspaces

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

4

5 Define the *Fujifilm* colourspaces:

6

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

8- :attr:`colour.models.RGB_COLOURSPACE_F_GAMUT_C`.

9

10 References

11----------

12- :cite:`Fujifilm2022a` : Fujifilm. (2022). F-Log Data Sheet Ver.1.1 (pp.

13 1-4). https://dl.fujifilm-x.com/support/lut/F-Log_DataSheet_E_Ver.1.1.pdf

14- :cite:`Fujifilm2024` : Fujifilm. (2024). F-Log2 C Data Sheet Ver.1.0.

15 Retrieved December 8, 2024, from

16 https://dl.fujifilm-x.com/support/lut/F-Log2C_DataSheet_E_Ver.1.0.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 log_decoding_FLog,

33 log_decoding_FLog2,

34 log_encoding_FLog,

35 log_encoding_FLog2,

36 normalised_primary_matrix,

37)

38 from colour.models.rgb.datasets.itur_bt_2020 import (

39 CCS_WHITEPOINT_BT2020,

40 MATRIX_BT2020_TO_XYZ,

41 MATRIX_XYZ_TO_BT2020,

42 PRIMARIES_BT2020,

43 WHITEPOINT_NAME_BT2020,

44)

45

46 __author__ = "Colour Developers"

47 __copyright__ = "Copyright 2013 Colour Developers"

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

49 __maintainer__ = "Colour Developers"

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

51 __status__ = "Production"

52

53 __all__ = [

54 "PRIMARIES_F_GAMUT",

55 "WHITEPOINT_NAME_F_GAMUT",

56 "CCS_WHITEPOINT_F_GAMUT",

57 "MATRIX_F_GAMUT_TO_XYZ",

58 "MATRIX_XYZ_TO_F_GAMUT",

59 "RGB_COLOURSPACE_F_GAMUT",

60]

61

62 PRIMARIES_F_GAMUT: NDArrayFloat = PRIMARIES_BT2020

63"""*Fujifilm F-Gamut* colourspace primaries."""

64

65 WHITEPOINT_NAME_F_GAMUT: str = WHITEPOINT_NAME_BT2020

66"""*Fujifilm F-Gamut* colourspace whitepoint name."""

67

68 CCS_WHITEPOINT_F_GAMUT: NDArrayFloat = CCS_WHITEPOINT_BT2020

69"""*Fujifilm F-Gamut* colourspace whitepoint chromaticity coordinates."""

70

71 MATRIX_F_GAMUT_TO_XYZ: NDArrayFloat = MATRIX_BT2020_TO_XYZ

72"""*Fujifilm F-Gamut* colourspace to *CIE XYZ* tristimulus values matrix."""

73

74 MATRIX_XYZ_TO_F_GAMUT: NDArrayFloat = MATRIX_XYZ_TO_BT2020

75"""*CIE XYZ* tristimulus values to *Fujifilm F-Gamut* colourspace matrix."""

76

77 RGB_COLOURSPACE_F_GAMUT: RGB_Colourspace = RGB_Colourspace(

78 "F-Gamut",

79 PRIMARIES_F_GAMUT,

80 CCS_WHITEPOINT_F_GAMUT,

81 WHITEPOINT_NAME_F_GAMUT,

82 MATRIX_F_GAMUT_TO_XYZ,

83 MATRIX_XYZ_TO_F_GAMUT,

84 log_encoding_FLog,

85 log_decoding_FLog,

86)

87 RGB_COLOURSPACE_F_GAMUT.__doc__ = """

88*Fujifilm F-Gamut* colourspace.

89

90 References

91----------

92:cite:`Fujifilm2022a`

93"""

94

95

96 PRIMARIES_F_GAMUT_C: NDArrayFloat = np.array(

97 [

98 [0.73470, 0.26530],

99 [0.02630, 0.97370],

100 [0.11730, -0.02240],

101 ]

102)

103"""*Fujifilm F-Gamut C* colourspace primaries."""

104

105 WHITEPOINT_NAME_F_GAMUT_C: str = "D65"

106"""*Fujifilm F-Gamut C* colourspace whitepoint name."""

107

108 CCS_WHITEPOINT_F_GAMUT_C: NDArrayFloat = CCS_ILLUMINANTS[

109 "CIE 1931 2 Degree Standard Observer"

110][WHITEPOINT_NAME_F_GAMUT_C]

111"""*Fujifilm F-Gamut C* colourspace whitepoint chromaticity coordinates."""

112

113 MATRIX_F_GAMUT_C_TO_XYZ: NDArrayFloat = normalised_primary_matrix(

114 PRIMARIES_F_GAMUT_C, CCS_WHITEPOINT_F_GAMUT_C

115)

116"""*Fujifilm F-Gamut C* colourspace to *CIE XYZ* tristimulus values matrix."""

117

118 MATRIX_XYZ_TO_F_GAMUT_C: NDArrayFloat = np.linalg.inv(MATRIX_F_GAMUT_C_TO_XYZ)

119"""*CIE XYZ* tristimulus values to *Fujifilm F-Gamut C* colourspace matrix."""

120

121 RGB_COLOURSPACE_F_GAMUT_C: RGB_Colourspace = RGB_Colourspace(

122 "F-Gamut C",

123 PRIMARIES_F_GAMUT_C,

124 CCS_WHITEPOINT_F_GAMUT_C,

125 WHITEPOINT_NAME_F_GAMUT_C,

126 MATRIX_F_GAMUT_C_TO_XYZ,

127 MATRIX_XYZ_TO_F_GAMUT_C,

128 log_encoding_FLog2,

129 log_decoding_FLog2,

130)

131 RGB_COLOURSPACE_F_GAMUT_C.__doc__ = """

132*Fujifilm F-Gamut C* colourspace.

133

134 References

135----------

136:cite:`Fujifilm2024`

137"""