man-pages/man1/pnmpsnr.1.html
2021-03-31 01:06:50 +01:00

77 lines
2.3 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of pnmpsnr</TITLE>
</HEAD><BODY>
<H1>pnmpsnr</H1>
Section: User Commands (1)<BR>Updated: 04 March 2001<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="ixAAB"></A>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
pnmpsnr - compute the difference between two portable anymaps
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<B>pnmpsnr</B>
[<I>pnmfile1</I>]
[<I>pnmfile2</I>]
<P>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
Reads two PBM, PGM, or PPM files, or PAM equivalents, as input.
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.
<P>
If the inputs are PBM or PGM,
<B>pnmpsnr</B>
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.
<P>
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 betwee any two images. It is expressed as a decibel value.
<P>
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].
<P>
The maximum mean square difference is identically 1.
<P>
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.
<P>
<A NAME="lbAE">&nbsp;</A>
<H2>SEE ALSO</H2>
<B><A HREF="/cgi-bin/man/man2html?5+pnm">pnm</A></B>(5)
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="1"><A HREF="#lbAB">NAME</A><DD>
<DT id="2"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="3"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="4"><A HREF="#lbAE">SEE ALSO</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:05:24 GMT, March 31, 2021
</BODY>
</HTML>