1Pnmpsnr User Manual(0)                                  Pnmpsnr User Manual(0)
2
3
4

NAME

6       pnmpsnr - compute the difference between two images (the PSNR)
7
8

SYNOPSIS

10       pnmpsnr
11
12       [pnmfile1]
13
14       [pnmfile2]
15
16

DESCRIPTION

18       This program is part of Netpbm(1).
19
20       pnmpsnr  reads two PBM, PGM, or PPM files, or PAM equivalents, as input
21       and prints the peak signal-to-noise ratio (PSNR) difference between the
22       two  images.  This metric is typically used in image compression papers
23       to rate the distortion between original and decoded image.
24
25       If the inputs are PBM or PGM, pnmpsnr prints the PSNR of the  luminance
26       only.   Otherwise,  it  prints the separate PSNRs of the luminance, and
27       chrominance (Cb and Cr) components of the colors.
28
29       The PSNR of a given component is the ratio of the mean  square  differ‐
30       ence  of  the  component  for the two images to the maximum mean square
31       difference that can exist between any two images.  It is expressed as a
32       decibel value.
33
34       The  mean  square  difference of a component for two images is the mean
35       square difference of the component value, comparing each pixel with the
36       pixel  in  the  same  position of the other image.  For the purposes of
37       this computation, components are normalized to the scale [0..1].
38
39       The maximum mean square difference is identically 1.
40
41       So the higher the PSNR, the closer the images are.  A luminance PSNR of
42       20  means the mean square difference of the luminances of the pixels is
43       100 times less than the maximum possible difference, i.e. 0.01.
44
45

SEE ALSO

47       pnm(1)
48
49
50
51netpbm documentation             04 March 2001          Pnmpsnr User Manual(0)
Impressum