예제 #1
0
    def setUp(self):
        """
        Initialises common tests attributes.
        """

        p = np.array([0.73470, 0.26530, 0.00000, 1.00000, 0.00010, -0.07700])
        whitepoint = np.array([0.32168, 0.33767])
        RGB_to_XYZ_matrix = np.identity(3)
        XYZ_to_RGB_matrix = np.identity(3)
        self._colourspace = RGB_Colourspace(
            'RGB Colourspace', p, whitepoint, 'D60', RGB_to_XYZ_matrix,
            XYZ_to_RGB_matrix, lambda x: x, lambda x: x)
예제 #2
0
    def setUp(self):
        """Initialise the common tests attributes."""

        p = np.array([0.73470, 0.26530, 0.00000, 1.00000, 0.00010, -0.07700])
        whitepoint = np.array([0.32168, 0.33767])
        matrix_RGB_to_XYZ = np.identity(3)
        matrix_XYZ_to_RGB = np.identity(3)
        self._colourspace = RGB_Colourspace(
            "RGB Colourspace",
            p,
            whitepoint,
            "ACES",
            matrix_RGB_to_XYZ,
            matrix_XYZ_to_RGB,
            lambda x: x,
            lambda x: x,
        )
예제 #3
0
    def test_use_derived_transformation_matrices(self):
        """
        Tests :func:`colour.models.rgb.rgb_colourspace.RGB_Colourspace.range.\
use_derived_transformation_matrices` method.
        """

        p = np.array([0.73470, 0.26530, 0.00000, 1.00000, 0.00010, -0.07700])
        whitepoint = np.array([0.32168, 0.33767])
        RGB_to_XYZ_matrix = np.identity(3)
        XYZ_to_RGB_matrix = np.identity(3)
        colourspace = RGB_Colourspace('RGB Colourspace', p, whitepoint, 'D60',
                                      RGB_to_XYZ_matrix, XYZ_to_RGB_matrix)

        np.testing.assert_array_equal(colourspace.RGB_to_XYZ_matrix,
                                      np.identity(3))
        np.testing.assert_array_equal(colourspace.XYZ_to_RGB_matrix,
                                      np.identity(3))

        self.assertTrue(colourspace.use_derived_transformation_matrices())

        np.testing.assert_almost_equal(
            colourspace.RGB_to_XYZ_matrix,
            np.array(
                [[0.95255240, 0.00000000, 0.00009368],
                 [0.34396645, 0.72816610, -0.07213255],
                 [0.00000000, 0.00000000, 1.00882518]]),
            decimal=7)  # yapf: disable
        np.testing.assert_almost_equal(
            colourspace.XYZ_to_RGB_matrix,
            np.array(
                [[1.04981102, 0.00000000, -0.00009748],
                 [-0.49590302, 1.37331305, 0.09824004],
                 [0.00000000, 0.00000000, 0.99125202]]),
            decimal=7)  # yapf: disable

        colourspace.use_derived_RGB_to_XYZ_matrix = False
        np.testing.assert_array_equal(colourspace.RGB_to_XYZ_matrix,
                                      np.identity(3))
        colourspace.use_derived_XYZ_to_RGB_matrix = False
        np.testing.assert_array_equal(colourspace.XYZ_to_RGB_matrix,
                                      np.identity(3))
예제 #4
0
*CIE XYZ* colourspace to *ProPhoto RGB* colourspace matrix.

XYZ_TO_PROPHOTO_RGB_MATRIX : array_like, (3, 3)
"""

PROPHOTO_RGB_TRANSFER_FUNCTION = lambda x: (x * 16
                                            if x < 0.001953 else x**(1 / 1.8))
"""
Transfer function from linear to *ProPhoto RGB* colourspace.

PROPHOTO_RGB_TRANSFER_FUNCTION : object
"""

PROPHOTO_RGB_INVERSE_TRANSFER_FUNCTION = lambda x: (x / 16 if x < 0.001953 else
                                                    x**1.8)
"""
Inverse transfer function from *ProPhoto RGB* colourspace to linear.

PROPHOTO_RGB_INVERSE_TRANSFER_FUNCTION : object
"""

PROPHOTO_RGB_COLOURSPACE = RGB_Colourspace(
    'ProPhoto RGB', PROPHOTO_RGB_PRIMARIES, PROPHOTO_RGB_WHITEPOINT,
    PROPHOTO_RGB_TO_XYZ_MATRIX, XYZ_TO_PROPHOTO_RGB_MATRIX,
    PROPHOTO_RGB_TRANSFER_FUNCTION, PROPHOTO_RGB_INVERSE_TRANSFER_FUNCTION)
"""
*ProPhoto RGB* colourspace.

PROPHOTO_RGB_COLOURSPACE : RGB_Colourspace
"""
예제 #5
0
XYZ_TO_RUSSELL_RGB_MATRIX = np.linalg.inv(RUSSELL_RGB_TO_XYZ_MATRIX)
"""
*CIE XYZ* colourspace to *Russell RGB* colourspace matrix.

XYZ_TO_RUSSELL_RGB_MATRIX : array_like, (3, 3)
"""

RUSSELL_RGB_TRANSFER_FUNCTION = lambda x: x**(1 / 2.2)
"""
Transfer function from linear to *Russell RGB* colourspace.

RUSSELL_RGB_TRANSFER_FUNCTION : object
"""

RUSSELL_RGB_INVERSE_TRANSFER_FUNCTION = lambda x: x**2.2
"""
Inverse transfer function from *Russell RGB* colourspace to linear.

RUSSELL_RGB_INVERSE_TRANSFER_FUNCTION : object
"""

RUSSELL_RGB_COLOURSPACE = RGB_Colourspace(
    'Russell RGB', RUSSELL_RGB_PRIMARIES, RUSSELL_RGB_WHITEPOINT,
    RUSSELL_RGB_TO_XYZ_MATRIX, XYZ_TO_RUSSELL_RGB_MATRIX,
    RUSSELL_RGB_TRANSFER_FUNCTION, RUSSELL_RGB_INVERSE_TRANSFER_FUNCTION)
"""
*Russell RGB* colourspace.

RUSSELL_RGB_COLOURSPACE : RGB_Colourspace
"""
예제 #6
0
파일: s_log.py 프로젝트: canavandl/colour
S_LOG_TRANSFER_FUNCTION = lambda x: (
    (0.432699 * math.log10(x + 0.037584) + 0.616596) + 0.03)
"""
Transfer function from linear to *S-Log* colourspace.

S_LOG_TRANSFER_FUNCTION : object
"""

S_LOG_INVERSE_TRANSFER_FUNCTION = lambda x: (
    (math.pow(10, ((x - 0.616596 - 0.03) / 0.432699)) - 0.037584))
"""
Inverse transfer function from *S-Log* colourspace to linear.

S_LOG_INVERSE_TRANSFER_FUNCTION : object
"""

S_LOG_COLOURSPACE = RGB_Colourspace(
    'S-Log',
    S_LOG_PRIMARIES,
    S_LOG_WHITEPOINT,
    S_LOG_TO_XYZ_MATRIX,
    XYZ_TO_S_LOG_MATRIX,
    S_LOG_TRANSFER_FUNCTION,
    S_LOG_INVERSE_TRANSFER_FUNCTION)
"""
*S-Log* colourspace.

S_LOG_COLOURSPACE : RGB_Colourspace
"""
예제 #7
0
"""
Opto-electronic conversion function of *Ekta Space PS 5*
colourspace.

EKTA_SPACE_PS_5_OECF : object
"""

EKTA_SPACE_PS_5_EOCF = (
    _ekta_space_ps_5_EOCF)
"""
Electro-optical conversion function of *Ekta Space PS 5* colourspace to
linear.

EKTA_SPACE_PS_5_EOCF : object
"""

EKTA_SPACE_PS_5_COLOURSPACE = RGB_Colourspace(
    'Ekta Space PS 5',
    EKTA_SPACE_PS_5_PRIMARIES,
    EKTA_SPACE_PS_5_WHITEPOINT,
    EKTA_SPACE_PS_5_V_ILLUMINANT,
    EKTA_SPACE_PS_5_TO_XYZ_MATRIX,
    XYZ_TO_EKTA_SPACE_PS_5_MATRIX,
    EKTA_SPACE_PS_5_OECF,
    EKTA_SPACE_PS_5_EOCF)
"""
*Ekta Space PS 5* colourspace.

EKTA_SPACE_PS_5_COLOURSPACE : RGB_Colourspace
"""
예제 #8
0
"""
*CIE XYZ* colourspace to *Ekta Space PS 5* colourspace matrix.

XYZ_TO_EKTA_SPACE_PS_5_MATRIX : array_like, (3, 3)
"""

EKTA_SPACE_PS_5_TRANSFER_FUNCTION = lambda x: x**(1 / 2.2)
"""
Transfer function from linear to *Ekta Space PS 5* colourspace.

EKTA_SPACE_PS_5_TRANSFER_FUNCTION : object
"""

EKTA_SPACE_PS_5_INVERSE_TRANSFER_FUNCTION = lambda x: x**2.2
"""
Inverse transfer function from *Ekta Space PS 5* colourspace to linear.

EKTA_SPACE_PS_5_INVERSE_TRANSFER_FUNCTION : object
"""

EKTA_SPACE_PS_5_COLOURSPACE = RGB_Colourspace(
    'Ekta Space PS 5', EKTA_SPACE_PS_5_PRIMARIES, EKTA_SPACE_PS_5_WHITEPOINT,
    EKTA_SPACE_PS_5_TO_XYZ_MATRIX, XYZ_TO_EKTA_SPACE_PS_5_MATRIX,
    EKTA_SPACE_PS_5_TRANSFER_FUNCTION,
    EKTA_SPACE_PS_5_INVERSE_TRANSFER_FUNCTION)
"""
*Ekta Space PS 5* colourspace.

EKTA_SPACE_PS_5_COLOURSPACE : RGB_Colourspace
"""
예제 #9
0
XYZ_TO_PAL_SECAM_RGB_MATRIX = np.linalg.inv(PAL_SECAM_RGB_TO_XYZ_MATRIX)
"""
*CIE XYZ* colourspace to *Pal/Secam RGB* colourspace matrix.

XYZ_TO_PAL_SECAM_RGB_MATRIX : array_like, (3, 3)
"""

PAL_SECAM_RGB_TRANSFER_FUNCTION = lambda x: x**(1 / 2.8)
"""
Transfer function from linear to *Pal/Secam RGB* colourspace.

PAL_SECAM_RGB_TRANSFER_FUNCTION : object
"""

PAL_SECAM_RGB_INVERSE_TRANSFER_FUNCTION = lambda x: x**2.8
"""
Inverse transfer function from *Pal/Secam RGB* colourspace to linear.

PAL_SECAM_RGB_INVERSE_TRANSFER_FUNCTION : object
"""

PAL_SECAM_RGB_COLOURSPACE = RGB_Colourspace(
    'Pal/Secam RGB', PAL_SECAM_RGB_PRIMARIES, PAL_SECAM_RGB_WHITEPOINT,
    PAL_SECAM_RGB_TO_XYZ_MATRIX, XYZ_TO_PAL_SECAM_RGB_MATRIX,
    PAL_SECAM_RGB_TRANSFER_FUNCTION, PAL_SECAM_RGB_INVERSE_TRANSFER_FUNCTION)
"""
*Pal/Secam RGB* colourspace.

PAL_SECAM_RGB_COLOURSPACE : RGB_Colourspace
"""
예제 #10
0
    b = REC_2020_CONSTANTS.beta(is_10_bits_system)
    return np.where(value < _rec_2020_OECF(b), value / 4.5,
                    ((value + (a - 1)) / a)**(1 / 0.45))


REC_2020_OECF = _rec_2020_OECF
"""
Opto-electronic conversion function of *Rec. 2020* colourspace.

REC_2020_OECF : object
"""

REC_2020_EOCF = _rec_2020_EOCF
"""
Electro-optical conversion function of *Rec. 2020* colourspace.

REC_2020_EOCF : object
"""

REC_2020_COLOURSPACE = RGB_Colourspace('Rec. 2020', REC_2020_PRIMARIES,
                                       REC_2020_WHITEPOINT,
                                       REC_2020_ILLUMINANT,
                                       REC_2020_TO_XYZ_MATRIX,
                                       XYZ_TO_REC_2020_MATRIX, REC_2020_OECF,
                                       REC_2020_EOCF)
"""
*Rec. 2020* colourspace.

REC_2020_COLOURSPACE : RGB_Colourspace
"""
예제 #11
0
파일: max_rgb.py 프로젝트: scooperly/colour
    value = np.asarray(value)

    return value**2.2


MAX_RGB_OECF = _max_rgb_OECF
"""
Opto-electronic conversion function of *Max RGB* colourspace.

MAX_RGB_OECF : object
"""

MAX_RGB_EOCF = _max_rgb_EOCF
"""
Electro-optical conversion function of *Max RGB* colourspace.

MAX_RGB_EOCF : object
"""

MAX_RGB_COLOURSPACE = RGB_Colourspace('Max RGB', MAX_RGB_PRIMARIES,
                                      MAX_RGB_WHITEPOINT, MAX_RGB_ILLUMINANT,
                                      MAX_RGB_TO_XYZ_MATRIX,
                                      XYZ_TO_MAX_RGB_MATRIX, MAX_RGB_OECF,
                                      MAX_RGB_EOCF)
"""
*Max RGB* colourspace.

MAX_RGB_COLOURSPACE : RGB_Colourspace
"""
예제 #12
0
CINEMA_GAMUT_OECF = _cinema_gamut_OECF
"""
Opto-electronic conversion function of *Cinema Gamut* colourspace.

CINEMA_GAMUT_OECF : object
"""

CINEMA_GAMUT_EOCF = (
    _cinema_gamut_EOCF)
"""
Electro-optical conversion function of *Cinema Gamut* colourspace.

CINEMA_GAMUT_EOCF : object
"""

CINEMA_GAMUT_COLOURSPACE = RGB_Colourspace(
    'Cinema Gamut',
    CINEMA_GAMUT_PRIMARIES,
    CINEMA_GAMUT_WHITEPOINT,
    CINEMA_GAMUT_ILLUMINANT,
    CINEMA_GAMUT_TO_XYZ_MATRIX,
    XYZ_TO_CINEMA_GAMUT_MATRIX,
    CINEMA_GAMUT_OECF,
    CINEMA_GAMUT_EOCF)
"""
*Cinema Gamut* colourspace.

CINEMA_GAMUT_COLOURSPACE : RGB_Colourspace
"""
예제 #13
0
RED_LOG_FILM_OECF : object
"""

RED_LOG_FILM_EOCF = _red_log_film_to_linear
"""
Electro-optical conversion function of *REDLogFilm* to linear.

RED_LOG_FILM_EOCF : object
"""

RED_COLOR_COLOURSPACE = RGB_Colourspace(
    'REDcolor',
    RED_COLOR_PRIMARIES,
    RED_COLOR_WHITEPOINT,
    RED_COLOR_ILLUMINANT,
    RED_COLOR_TO_XYZ_MATRIX,
    XYZ_TO_RED_COLOR_MATRIX,
    RED_LOG_FILM_OECF,
    RED_LOG_FILM_EOCF)
"""
*REDcolor* colourspace.

RED_COLOR_COLOURSPACE : RGB_Colourspace
"""

RED_COLOR_2_PRIMARIES = np.array(
    [[0.8786825104761286, 0.3249640074099105],
     [0.3008887143674324, 0.6790547557905675],
     [0.0953986946056151, -0.0293793268343266]])
"""
예제 #14
0
    """

    return luminance_1976(value * 100) / 100


ECI_RGB_V2_OECF = _eci_rgb_v2_OECF
"""
Opto-electronic conversion function of *ECI RGB v2* colourspace.

ECI_RGB_V2_OECF : object
"""

ECI_RGB_V2_EOCF = _eci_rgb_v2_EOCF
"""
Electro-optical conversion function of *ECI RGB v2* colourspace.

ECI_RGB_V2_EOCF : object
"""

ECI_RGB_V2_COLOURSPACE = RGB_Colourspace('ECI RGB v2', ECI_RGB_V2_PRIMARIES,
                                         ECI_RGB_V2_WHITEPOINT,
                                         ECI_RGB_V_ILLUMINANT,
                                         ECI_RGB_V2_TO_XYZ_MATRIX,
                                         XYZ_TO_ECI_RGB_V2_MATRIX,
                                         ECI_RGB_V2_OECF, ECI_RGB_V2_EOCF)
"""
*ECI RGB v2* colourspace.

ECI_RGB_V2_COLOURSPACE : RGB_Colourspace
"""
예제 #15
0
파일: max_rgb.py 프로젝트: canavandl/colour
XYZ_TO_MAX_RGB_MATRIX : array_like, (3, 3)
"""

MAX_RGB_TRANSFER_FUNCTION = lambda x: x ** (1 / 2.2)
"""
Transfer function from linear to *Max RGB* colourspace.

MAX_RGB_TRANSFER_FUNCTION : object
"""

MAX_RGB_INVERSE_TRANSFER_FUNCTION = lambda x: x ** 2.2
"""
Inverse transfer function from *Max RGB* colourspace to linear.

MAX_RGB_INVERSE_TRANSFER_FUNCTION : object
"""

MAX_RGB_COLOURSPACE = RGB_Colourspace(
    'Max RGB',
    MAX_RGB_PRIMARIES,
    MAX_RGB_WHITEPOINT,
    MAX_RGB_TO_XYZ_MATRIX,
    XYZ_TO_MAX_RGB_MATRIX,
    MAX_RGB_TRANSFER_FUNCTION,
    MAX_RGB_INVERSE_TRANSFER_FUNCTION)
"""
*Max RGB* colourspace.

MAX_RGB_COLOURSPACE : RGB_Colourspace
"""
예제 #16
0
"""
Opto-electronic conversion function of *Adobe Wide Gamut RGB*
colourspace.

ADOBE_WIDE_GAMUT_RGB_OECF : object
"""

ADOBE_WIDE_GAMUT_RGB_EOCF = (
    _adobe_wide_gamut_rgb_EOCF)
"""
Electro-optical conversion function of *Adobe Wide Gamut RGB* colourspace to
linear.

ADOBE_WIDE_GAMUT_RGB_EOCF : object
"""

ADOBE_WIDE_GAMUT_RGB_COLOURSPACE = RGB_Colourspace(
    'Adobe Wide Gamut RGB',
    ADOBE_WIDE_GAMUT_RGB_PRIMARIES,
    ADOBE_WIDE_GAMUT_RGB_WHITEPOINT,
    ADOBE_WIDE_GAMUT_RGB_ILLUMINANT,
    ADOBE_WIDE_GAMUT_RGB_TO_XYZ_MATRIX,
    XYZ_TO_ADOBE_WIDE_GAMUT_RGB_MATRIX,
    ADOBE_WIDE_GAMUT_RGB_OECF,
    ADOBE_WIDE_GAMUT_RGB_EOCF)
"""
*Adobe Wide Gamut RGB* colourspace.

ADOBE_WIDE_GAMUT_RGB_COLOURSPACE : RGB_Colourspace
"""
예제 #17
0
*CIE XYZ* colourspace to *sRGB* colourspace matrix.

XYZ_TO_sRGB_MATRIX : array_like, (3, 3)
"""

sRGB_TRANSFER_FUNCTION = lambda x: (x * 12.92 if x <= 0.0031308 else 1.055 *
                                    (x**(1 / 2.4)) - 0.055)
"""
Transfer function from linear to *sRGB* colourspace.

sRGB_TRANSFER_FUNCTION : object
"""

sRGB_INVERSE_TRANSFER_FUNCTION = lambda x: (x / 12.92 if x <= 0.0031308 else
                                            ((x + 0.055) / 1.055)**2.4)
"""
Inverse transfer function from *sRGB* colourspace to linear.

sRGB_INVERSE_TRANSFER_FUNCTION : object
"""

sRGB_COLOURSPACE = RGB_Colourspace('sRGB', sRGB_PRIMARIES, sRGB_WHITEPOINT,
                                   sRGB_TO_XYZ_MATRIX, XYZ_TO_sRGB_MATRIX,
                                   sRGB_TRANSFER_FUNCTION,
                                   sRGB_INVERSE_TRANSFER_FUNCTION)
"""
*sRGB* colourspace.

sRGB_COLOURSPACE : RGB_Colourspace
"""
예제 #18
0
*CIE XYZ* colourspace to *NTSC RGB* colourspace matrix.

XYZ_TO_NTSC_RGB_MATRIX : array_like, (3, 3)
"""

NTSC_RGB_TRANSFER_FUNCTION = lambda x: x**(1 / 2.2)
"""
Transfer function from linear to *NTSC RGB* colourspace.

NTSC_RGB_TRANSFER_FUNCTION : object
"""

NTSC_RGB_INVERSE_TRANSFER_FUNCTION = lambda x: x**2.2
"""
Inverse transfer function from *NTSC RGB* colourspace to linear.

NTSC_RGB_INVERSE_TRANSFER_FUNCTION : object
"""

NTSC_RGB_COLOURSPACE = RGB_Colourspace('NTSC RGB', NTSC_RGB_PRIMARIES,
                                       NTSC_RGB_WHITEPOINT,
                                       NTSC_RGB_TO_XYZ_MATRIX,
                                       XYZ_TO_NTSC_RGB_MATRIX,
                                       NTSC_RGB_TRANSFER_FUNCTION,
                                       NTSC_RGB_INVERSE_TRANSFER_FUNCTION)
"""
*NTSC RGB* colourspace.

NTSC_RGB_COLOURSPACE : RGB_Colourspace
"""
예제 #19
0

XTREME_RGB_OECF = _xtreme_rgb_OECF
"""
Opto-electronic conversion function of *Xtreme RGB* colourspace.

XTREME_RGB_OECF : object
"""

XTREME_RGB_EOCF = _xtreme_rgb_EOCF
"""
Electro-optical conversion function of *Xtreme RGB* colourspace.

XTREME_RGB_EOCF : object
"""

XTREME_RGB_COLOURSPACE = RGB_Colourspace(
    'Xtreme RGB',
    XTREME_RGB_PRIMARIES,
    XTREME_RGB_WHITEPOINT,
    XTREME_RGB_ILLUMINANT,
    XTREME_RGB_TO_XYZ_MATRIX,
    XYZ_TO_XTREME_RGB_MATRIX,
    XTREME_RGB_OECF,
    XTREME_RGB_EOCF)
"""
*Xtreme RGB* colourspace.

XTREME_RGB_COLOURSPACE : RGB_Colourspace
"""
예제 #20
0
    value = np.asarray(value)

    return value**2.2


BEST_RGB_OECF = _best_rgb_OECF
"""
Opto-electronic conversion function of *Best RGB* colourspace.

BEST_RGB_OECF : object
"""

BEST_RGB_EOCF = _best_rgb_EOCF
"""
Electro-optical conversion function of *Best RGB* colourspace.

BEST_RGB_EOCF : object
"""

BEST_RGB_COLOURSPACE = RGB_Colourspace('Best RGB', BEST_RGB_PRIMARIES,
                                       BEST_RGB_WHITEPOINT,
                                       BEST_RGB_ILLUMINANT,
                                       BEST_RGB_TO_XYZ_MATRIX,
                                       XYZ_TO_BEST_RGB_MATRIX, BEST_RGB_OECF,
                                       BEST_RGB_EOCF)
"""
*Best RGB* colourspace.

BEST_RGB_COLOURSPACE : RGB_Colourspace
"""
예제 #21
0
파일: rec_709.py 프로젝트: scooperly/colour
REC_709_OECF = _rec_709_OECF
"""
Opto-electronic conversion function of *Rec. 709* colourspace.

REC_709_OECF : object
"""

REC_709_EOCF = _rec_709_EOCF
"""
Electro-optical conversion function of *Rec. 709* colourspace.

REC_709_EOCF : object

Warning
-------
*Recommendation ITU-R BT.709-5* doesn't specify an electro-optical conversion
function. This definition is used for symmetry in unit tests and other
computations but should not be used as an *EOCF* for *Rec. 709* colourspace!
"""

REC_709_COLOURSPACE = RGB_Colourspace('Rec. 709', REC_709_PRIMARIES,
                                      REC_709_WHITEPOINT, REC_709_ILLUMINANT,
                                      REC_709_TO_XYZ_MATRIX,
                                      XYZ_TO_REC_709_MATRIX, REC_709_OECF,
                                      REC_709_EOCF)
"""
*Rec. 709* colourspace.

REC_709_COLOURSPACE : RGB_Colourspace
"""
예제 #22
0
    value = np.asarray(value)

    return value**2.2


NTSC_RGB_OECF = _ntsc_rgb_OECF
"""
Opto-electronic conversion function of *NTSC RGB* colourspace.

NTSC_RGB_OECF : object
"""

NTSC_RGB_EOCF = _ntsc_rgb_EOCF
"""
Electro-optical conversion function of *NTSC RGB* colourspace.

NTSC_RGB_EOCF : object
"""

NTSC_RGB_COLOURSPACE = RGB_Colourspace('NTSC RGB', NTSC_RGB_PRIMARIES,
                                       NTSC_RGB_WHITEPOINT,
                                       NTSC_RGB_ILLUMINANT,
                                       NTSC_RGB_TO_XYZ_MATRIX,
                                       XYZ_TO_NTSC_RGB_MATRIX, NTSC_RGB_OECF,
                                       NTSC_RGB_EOCF)
"""
*NTSC RGB* colourspace.

NTSC_RGB_COLOURSPACE : RGB_Colourspace
"""
예제 #23
0
ALEXA_WIDE_GAMUT_RGB_TRANSFER_FUNCTION = (
    _alexa_wide_gamut_rgb_transfer_function)
"""
Transfer function from linear to *ALEXA Wide Gamut RGB* colourspace.

ALEXA_WIDE_GAMUT_RGB_TRANSFER_FUNCTION : object
"""

ALEXA_WIDE_GAMUT_RGB_INVERSE_TRANSFER_FUNCTION = (
    _alexa_wide_gamut_rgb_inverse_transfer_function)
"""
Inverse transfer function from *ALEXA Wide Gamut RGB* colourspace to linear.

ALEXA_WIDE_GAMUT_RGB_INVERSE_TRANSFER_FUNCTION : object
"""

ALEXA_WIDE_GAMUT_RGB_COLOURSPACE = RGB_Colourspace(
    'ALEXA Wide Gamut RGB',
    ALEXA_WIDE_GAMUT_RGB_PRIMARIES,
    ALEXA_WIDE_GAMUT_RGB_WHITEPOINT,
    ALEXA_WIDE_GAMUT_RGB_TO_XYZ_MATRIX,
    XYZ_TO_ALEXA_WIDE_GAMUT_RGB_MATRIX,
    ALEXA_WIDE_GAMUT_RGB_TRANSFER_FUNCTION,
    ALEXA_WIDE_GAMUT_RGB_INVERSE_TRANSFER_FUNCTION)
"""
*ALEXA Wide Gamut RGB* colourspace.

ALEXA_WIDE_GAMUT_RGB_COLOURSPACE : RGB_Colourspace
"""
예제 #24
0
파일: v_gamut.py 프로젝트: scooperly/colour
    value = np.where(value < cut2, (value - 0.125) / 5.6,
                     np.power(10, ((value - d) / c)) - b)

    return value


V_LOG_OECF = _linear_to_v_log
"""
Opto-electronic conversion function of *V-Log*.

V_LOG_OECF : object
"""

V_LOG_EOCF = _v_log_to_linear
"""
Electro-optical conversion function of *V-Log* to linear.

V_LOG_EOCF : object
"""

V_GAMUT_COLOURSPACE = RGB_Colourspace('V-Gamut', V_GAMUT_PRIMARIES,
                                      V_GAMUT_WHITEPOINT, V_GAMUT_ILLUMINANT,
                                      V_GAMUT_TO_XYZ_MATRIX,
                                      XYZ_TO_V_GAMUT_MATRIX, V_LOG_OECF,
                                      V_LOG_EOCF)
"""
*V-Gamut* colourspace.

V_GAMUT_COLOURSPACE : RGB_Colourspace
"""
예제 #25
0
XYZ_TO_ADOBE_RGB_1998_MATRIX = np.linalg.inv(ADOBE_RGB_1998_TO_XYZ_MATRIX)
"""
*CIE XYZ* colourspace to *Adobe RGB 1998* colourspace matrix.

XYZ_TO_ADOBE_RGB_1998_MATRIX : array_like, (3, 3)
"""

ADOBE_RGB_1998_TRANSFER_FUNCTION = lambda x: x**(1 / (563 / 256))
"""
Transfer function from linear to *Adobe RGB 1998* colourspace.

ADOBE_RGB_1998_TRANSFER_FUNCTION : object
"""

ADOBE_RGB_1998_INVERSE_TRANSFER_FUNCTION = lambda x: x**(563 / 256)
"""
Inverse transfer function from *Adobe RGB 1998* colourspace to linear.

ADOBE_RGB_1998_INVERSE_TRANSFER_FUNCTION : object
"""

ADOBE_RGB_1998_COLOURSPACE = RGB_Colourspace(
    'Adobe RGB 1998', ADOBE_RGB_1998_PRIMARIES, ADOBE_RGB_1998_WHITEPOINT,
    ADOBE_RGB_1998_TO_XYZ_MATRIX, XYZ_TO_ADOBE_RGB_1998_MATRIX,
    ADOBE_RGB_1998_TRANSFER_FUNCTION, ADOBE_RGB_1998_INVERSE_TRANSFER_FUNCTION)
"""
*Adobe RGB 1998* colourspace.

ADOBE_RGB_1998_COLOURSPACE : RGB_Colourspace
"""
예제 #26
0
*CIE XYZ* colourspace to *Best RGB* colourspace matrix.

XYZ_TO_BEST_RGB_MATRIX : array_like, (3, 3)
"""

BEST_RGB_TRANSFER_FUNCTION = lambda x: x**(1 / 2.2)
"""
Transfer function from linear to *Best RGB* colourspace.

BEST_RGB_TRANSFER_FUNCTION : object
"""

BEST_RGB_INVERSE_TRANSFER_FUNCTION = lambda x: x**2.2
"""
Inverse transfer function from *Best RGB* colourspace to linear.

BEST_RGB_INVERSE_TRANSFER_FUNCTION : object
"""

BEST_RGB_COLOURSPACE = RGB_Colourspace('Best RGB', BEST_RGB_PRIMARIES,
                                       BEST_RGB_WHITEPOINT,
                                       BEST_RGB_TO_XYZ_MATRIX,
                                       XYZ_TO_BEST_RGB_MATRIX,
                                       BEST_RGB_TRANSFER_FUNCTION,
                                       BEST_RGB_INVERSE_TRANSFER_FUNCTION)
"""
*Best RGB* colourspace.

BEST_RGB_COLOURSPACE : RGB_Colourspace
"""
예제 #27
0
XYZ_TO_SMPTE_C_RGB_MATRIX = np.linalg.inv(SMPTE_C_RGB_TO_XYZ_MATRIX)
"""
*CIE XYZ* colourspace to *SMPTE-C RGB* colourspace matrix.

XYZ_TO_SMPTE_C_RGB_MATRIX : array_like, (3, 3)
"""

SMPTE_C_RGB_TRANSFER_FUNCTION = lambda x: x**(1 / 2.2)
"""
Transfer function from linear to *SMPTE-C RGB* colourspace.

SMPTE_C_RGB_TRANSFER_FUNCTION : object
"""

SMPTE_C_RGB_INVERSE_TRANSFER_FUNCTION = lambda x: x**2.2
"""
Inverse transfer function from *SMPTE-C RGB* colourspace to linear.

SMPTE_C_RGB_INVERSE_TRANSFER_FUNCTION : object
"""

SMPTE_C_RGB_COLOURSPACE = RGB_Colourspace(
    'SMPTE-C RGB', SMPTE_C_RGB_PRIMARIES, SMPTE_C_RGB_WHITEPOINT,
    SMPTE_C_RGB_TO_XYZ_MATRIX, XYZ_TO_SMPTE_C_RGB_MATRIX,
    SMPTE_C_RGB_TRANSFER_FUNCTION, SMPTE_C_RGB_INVERSE_TRANSFER_FUNCTION)
"""
*SMPTE-C RGB* colourspace.

SMPTE_C_RGB_COLOURSPACE : RGB_Colourspace
"""
예제 #28
0
    """

    value = np.asarray(value)

    return value**2.8


PAL_SECAM_RGB_OECF = _pal_secam_rgb_OECF
"""
Opto-electronic conversion function of *Pal/Secam RGB* colourspace.

PAL_SECAM_RGB_OECF : object
"""

PAL_SECAM_RGB_EOCF = (_pal_secam_rgb_EOCF)
"""
Electro-optical conversion function of *Pal/Secam RGB* colourspace.

PAL_SECAM_RGB_EOCF : object
"""

PAL_SECAM_RGB_COLOURSPACE = RGB_Colourspace(
    'Pal/Secam RGB', PAL_SECAM_RGB_PRIMARIES, PAL_SECAM_RGB_WHITEPOINT,
    PAL_SECAM_RGB_ILLUMINANT, PAL_SECAM_RGB_TO_XYZ_MATRIX,
    XYZ_TO_PAL_SECAM_RGB_MATRIX, PAL_SECAM_RGB_OECF, PAL_SECAM_RGB_EOCF)
"""
*Pal/Secam RGB* colourspace.

PAL_SECAM_RGB_COLOURSPACE : RGB_Colourspace
"""
예제 #29
0

ALEXA_LOG_C_OECF = _linear_to_alexa_log_c
"""
Opto-electronic conversion function of *ALEXA Log C*.

ALEXA_LOG_C_OECF : object
"""

ALEXA_LOG_C_EOCF = _alexa_log_c_to_linear
"""
Electro-optical conversion function of *ALEXA Log C* to linear.

ALEXA_LOG_C_EOCF : object
"""

ALEXA_WIDE_GAMUT_RGB_COLOURSPACE = RGB_Colourspace(
    'ALEXA Wide Gamut RGB',
    ALEXA_WIDE_GAMUT_RGB_PRIMARIES,
    ALEXA_WIDE_GAMUT_RGB_WHITEPOINT,
    ALEXA_WIDE_GAMUT_RGB_ILLUMINANT,
    ALEXA_WIDE_GAMUT_RGB_TO_XYZ_MATRIX,
    XYZ_TO_ALEXA_WIDE_GAMUT_RGB_MATRIX,
    ALEXA_LOG_C_OECF,
    ALEXA_LOG_C_EOCF)
"""
*ALEXA Wide Gamut RGB* colourspace.

ALEXA_WIDE_GAMUT_RGB_COLOURSPACE : RGB_Colourspace
"""
예제 #30
0
"""
*CIE XYZ* colourspace to *ColorMatch RGB* colourspace matrix.

XYZ_TO_COLOR_MATCH_RGB_MATRIX : array_like, (3, 3)
"""

COLOR_MATCH_RGB_TRANSFER_FUNCTION = lambda x: x**(1 / 1.8)
"""
Transfer function from linear to *ColorMatch RGB* colourspace.

COLOR_MATCH_RGB_TRANSFER_FUNCTION : object
"""

COLOR_MATCH_RGB_INVERSE_TRANSFER_FUNCTION = lambda x: x**1.8
"""
Inverse transfer function from *ColorMatch RGB* colourspace to linear.

COLOR_MATCH_RGB_INVERSE_TRANSFER_FUNCTION : object
"""

COLOR_MATCH_RGB_COLOURSPACE = RGB_Colourspace(
    'ColorMatch RGB', COLOR_MATCH_RGB_PRIMARIES, COLOR_MATCH_RGB_WHITEPOINT,
    COLOR_MATCH_RGB_TO_XYZ_MATRIX, XYZ_TO_COLOR_MATCH_RGB_MATRIX,
    COLOR_MATCH_RGB_TRANSFER_FUNCTION,
    COLOR_MATCH_RGB_INVERSE_TRANSFER_FUNCTION)
"""
*ColorMatch RGB* colourspace.

COLOR_MATCH_RGB_COLOURSPACE : RGB_Colourspace
"""