videolib.standards.Standard

class Standard(name, white_xy, red_xy, green_xy, blue_xy, linear_range, oetf, eotf, bitdepth, dtype)[source]

Bases: object

Class to define an image/video standard.

Methods

Attributes

primaries

Color primaries of the standard

range

Non-linear encoded range

name

Name of the standard

white_xy

White point in CIE xy format

red_xy

Red primary in CIE xy format

green_xy

Green primary in CIE xy format

blue_xy

Blue primary in CIE xy format

linear_range

Linear light value range

oetf

Opto-Electrical (or as appropriate, inverse Electro-Optical) Transfer Function

eotf

Electro-Optical Transfer Function

bitdepth

Bitdepth of the standard

dtype

Data-type of pixel values being read from files

bitdepth: int[source]

Bitdepth of the standard

blue_xy: Tuple[float, float][source]

Blue primary in CIE xy format

dtype: Union[str, dtype][source]

Data-type of pixel values being read from files

eotf: Callable[source]

Electro-Optical Transfer Function

green_xy: Tuple[float, float][source]

Green primary in CIE xy format

linear_range: float[source]

Linear light value range

name: str[source]

Name of the standard

oetf: Callable[source]

Opto-Electrical (or as appropriate, inverse Electro-Optical) Transfer Function

property primaries: Dict[str, Tuple[float, float]][source]

Color primaries of the standard

Returns:

Dictionary of RGB primaries and white point of the standard.

Return type:

Dict[str, Tuple[float, float]]

property range: int[source]

Non-linear encoded range

Returns:

Range of non-linear encoded values. Equal to \(2^{\text{bitdepth}}-1\) if integer dtype, else 1.0.

Return type:

int

red_xy: Tuple[float, float][source]

Red primary in CIE xy format

white_xy: Tuple[float, float][source]

White point in CIE xy format