Penguin
Annotated edit history of pnmpsnr(1) version 1, including all changes. View license author blame.
Rev Author # Line
1 perry 1 pnmpsnr
2 !!!pnmpsnr
3 NAME
4 SYNOPSIS
5 DESCRIPTION
6 SEE ALSO
7 ----
8 !!NAME
9
10
11 pnmpsnr - compute the difference between two images (the PSNR)
12 !!SYNOPSIS
13
14
15 __pnmpsnr__ [[''pnmfile1'']
16 [[''pnmfile2'']
17 !!DESCRIPTION
18
19
20 Reads two PBM, PGM, or PPM files, or PAM equivalents, as
21 input. Prints the peak signal-to-noise ratio (PSNR)
22 difference between the two images. This metric is typically
23 used in image compression papers to rate the distortion
24 between original and decoded image.
25
26
27 If the inputs are PBM or PGM, __pnmpsnr__ prints the PSNR
28 of the luminance only. Otherwise, it prints the separate
29 PSNRs of the luminance, and chrominance (Cb and Cr)
30 components of the colors.
31
32
33 The PSNR of a given component is the ratio of the mean
34 square difference of the component for the two images to the
35 maximum mean square difference that can exist betwee any two
36 images. It is expressed as a decibel value.
37
38
39 The mean square difference of a component for two images is
40 the mean square difference of the component value, comparing
41 each pixel with the pixel in the same position of the other
42 image. For the purposes of this computation, components are
43 normalized to the scale [[0..1].
44
45
46 The maximum mean square difference is identically
47 1.
48
49
50 So the higher the PSNR, the closer the images are. A
51 luminance PSNR of 20 means the mean square difference of the
52 luminances of the pixels is 100 times less than the maximum
53 possible difference, i.e. 0.01.
54 !!SEE ALSO
55
56
57 pnm(5)
58 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.