API Reference >>

`skvideo.utils`

.rgb2gray
`skvideo.utils`

.rgb2gray¶-
`skvideo.utils.`

`rgb2gray`

(*videodata*)[source]¶ Computes the grayscale video.

Computes the grayscale video from the input video returning the standardized shape (T, M, N, C), where T is number of frames, M is height, N is width, and C is number of channels (here always 1).

Parameters: **videodata**: ndarrayInput data of shape (T, M, N, C), (T, M, N), (M, N, C), or (M, N), where T is number of frames, M is height, N is width, and C is number of channels.

Returns: **videodataout**: ndarrayStandardized grayscaled version of videodata, shape (T, M, N, 1)