.TL Pnmpsnr User Manual .SH 1 pnmpsnr .LP Updated: 04 March 2001 .br Table Of Contents .SH 2 NAME .LP pnmpsnr - compute the difference between two images (the PSNR) .SH 2 SYNOPSIS .LP \fBpnmpsnr\fR [\fIpnmfile1\fR] [\fIpnmfile2\fR] .SH 2 DESCRIPTION .LP .LP This program is part of Netpbm. .LP \fBpnmpsnr\fR reads two PBM, PGM, or PPM files, or PAM equivalents, as input and prints the peak signal-to-noise ratio (PSNR) difference between the two images. This metric is typically used in image compression papers to rate the distortion between original and decoded image. .LP If the inputs are PBM or PGM, \fBpnmpsnr\fR prints the PSNR of the luminance only. Otherwise, it prints the separate PSNRs of the luminance, and chrominance (Cb and Cr) components of the colors. .LP The PSNR of a given component is the ratio of the mean square difference of the component for the two images to the maximum mean square difference that can exist between any two images. It is expressed as a decibel value. .LP The mean square difference of a component for two images is the mean square difference of the component value, comparing each pixel with the pixel in the same position of the other image. For the purposes of this computation, components are normalized to the scale [0..1]. .LP The maximum mean square difference is identically 1. .LP So the higher the PSNR, the closer the images are. A luminance PSNR of 20 means the mean square difference of the luminances of the pixels is 100 times less than the maximum possible difference, i.e. 0.01. .SH 2 SEE ALSO .LP \fBpnm\fR .br \l'5i' .SH 2 Table Of Contents .LP .IP \(bu NAME .IP \(bu SYNOPSIS .IP \(bu DESCRIPTION .IP \(bu SEE ALSO .LP