API Reference >>

`skvideo.measure`

.psnr
`skvideo.measure`

.psnr¶-
`skvideo.measure.`

`psnr`

(*referenceVideoData*,*distortedVideoData*,*bitdepth=8*)[source]¶ Computes Peak Signal to Noise Ratio (PSNR).

Both video inputs are compared frame-by-frame to obtain T PSNR measurements.

Parameters: **referenceVideoData**: ndarrayReference video, ndarray of dimension (T, M, N, C), (T, M, N), (M, N, C), or (M, N), where T is the number of frames, M is the height, N is width, and C is number of channels.

**distortedVideoData**: ndarrayDistorted video, ndarray of dimension (T, M, N, C), (T, M, N), (M, N, C), or (M, N), where T is the number of frames, M is the height, N is width, and C is number of channels.

**bitdepth**: intThe number of bits each pixel effectively has

Returns: **psnr_array**: ndarrayThe psnr results, ndarray of dimension (T,), where T is the number of frames