components.colourspace.rgbtoy
- class RGBtoY(config={}, **kwds)[source]
Bases:
Transformer
RGB to Y converter.
Convert RGB frames to luminance.
The
matrix
config item chooses the matrix coefficient set. It can be'601'
(”Rec. 601”, standard definition) or'709'
(”Rec. 709”, high definition). In'auto'
mode the matrix is chosen according to the number of lines in the image.WARNING: this component assumes RGB input and Y output both have black level 0 and white level 255, not the 16..235 range specified in Rec 601. See
pyctools.components.colourspace.levels
for components to convert the RGB input or Y output.
Comments or questions? Please email jim@jim-easterbrook.me.uk.