pnmpsnr
Calculate peak signal-to-noise ratio between images
TLDR
SYNOPSIS
pnmpsnr [file1] [file2]
DESCRIPTION
pnmpsnr calculates the Peak Signal-to-Noise Ratio (PSNR) between two PNM images. PSNR is a standard metric for measuring image quality, commonly used to evaluate the fidelity of compressed or processed images against the original.Higher PSNR values (measured in decibels) indicate greater similarity between the images. Typical values range from 30-50 dB for acceptable quality, while identical images produce an infinite PSNR. For color images, the tool reports PSNR for each channel (red, green, blue) as well as an overall luminance value.Both images must have the same dimensions and depth. Part of the Netpbm toolkit.
PARAMETERS
file1
First input image (reference/original).file2
Second input image (comparison/distorted). Reads from standard input if omitted.
CAVEATS
Images must have the same dimensions. Only supports PNM/PAM formats; convert other formats first using Netpbm tools. PSNR is not always a reliable indicator of perceptual quality.
