pdft.color.YCBCR

Contents

pdft.color.YCBCR#

pdft.color.YCBCR = ColorSpace(matrix=array([[ 0.299   ,  0.587   ,  0.114   ],        [-0.168736, -0.331264,  0.5     ],        [ 0.5     , -0.418688, -0.081312]]))#

An invertible change of channels, applied pixel by pixel.

matrix is (C, C): row i gives channel i of the space as a combination of the image’s channels. to_planes takes an image (..., H, W, C) to its planes (..., C, H, W), in the precision the image has (integers become float64); to_image is its inverse.