API Reference >> skvideo.motion.blockComp
Fork me on GitHub


skvideo.motion.blockComp(videodata, motionVect, mbSize=8)[source]

Block-based motion compensation

Using the given motion vectors, this function returns the motion-compensated video data.


videodata : ndarray

an input frame sequence, shape (T, M, N, C), (T, M, N), (M, N, C) or (M, N)

motionVect : ndarray

ndarray representing block motion vectors. Expects ndarray, shape (T-1, M/mbSize, N/mbSize) or (M/mbSize, N/mbSize).

mbSize : int

Size of macroblock in pixels.


compImg : ndarray

ndarray holding the motion compensated image frame, shape (T, M, N, C)