API Reference >> skvideo.utils.vshape
Fork me on GitHub

skvideo.utils.vshape

skvideo.utils.vshape(videodata)[source]

Standardizes the input data shape.

Transforms video data into 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.

Parameters:

videodata : ndarray

Input 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 : ndarray

Standardized version of videodata, shape (T, M, N, C)