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 magnitude of difference between the two images as a peak
22       signal-to-noise  ratio  (PSNR)  This  metric is typically used in image
23       compression papers to rate the distortion between original and  decoded
24       image.
25
26       If  the inputs are PBM or PGM, pnmpsnr prints the PSNR of the luminance
27       only.  Otherwise, it prints the separate PSNRs of  the  luminance,  and
28       chrominance (Cb and Cr) components of the colors.
29
30       The  PSNR  of a given component is the ratio of the maximum mean square
31       difference of component values that could exist between the two  images
32       (a  measure  of the information content in an image) to the actual mean
33       square difference for the two subject images.  It  is  expressed  as  a
34       decibel value.
35
36       The  mean  square  difference of a component for two images is the mean
37       square difference of the component value, comparing each pixel with the
38       pixel  in  the  same  position of the other image.  For the purposes of
39       this computation, components are normalized to the scale [0..1].
40
41       The maximum mean square difference is identically 1.
42
43       So the higher the PSNR, the closer the images are.  A luminance PSNR of
44       20  means the mean square difference of the luminances of the pixels is
45       100 times less than the maximum possible difference, i.e. 0.01.
46
47

SEE ALSO

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