Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

pnmpsnr(1) [minix man page]

pnmpsnr(1)                                                    General Commands Manual                                                   pnmpsnr(1)

pnmpsnr - compute the difference between two portable anymaps SYNOPSIS
pnmpsnr [pnmfile1] [pnmfile2] DESCRIPTION
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. If the inputs are PBM or PGM, pnmpsnr 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. 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. 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]. The maximum mean square difference is identically 1. 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. SEE ALSO
pnm(5) 04 March 2001 pnmpsnr(1)

Check Out this Related Man Page

pnmarith(1)                                                   General Commands Manual                                                  pnmarith(1)

pnmarith - perform arithmetic on two portable anymaps SYNOPSIS
pnmarith -add|-subtract|-multiply|-difference|-minimum|-maximum. pnmfile1 pnmfile2 DESCRIPTION
Reads two portable anymaps as input. Performs the specified arithmetic operation, and produces a portable anymap as output. The two input anymaps must be the same width and height. The arithmetic is performed between corresponding pixels in the two anymaps, as if maxval was 1.0, black was 0.0, and a linear scale in between. Results that fall outside of [0..1) are truncated. The operator -difference calculates the absolute value of pnmarith -subtract pnmfile1 pnmfile2, i.e. no truncation is done. All flags can be abbreviated to their shortest unique prefix. SEE ALSO
pbmmask(1), pnmpaste(1), pnminvert(1), pnm(5) AUTHOR
Copyright (C) 1989, 1991 by Jef Poskanzer. Lightly modified by Marcel Wijkstra <> 26 August 1993 pnmarith(1)
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

difference between == and =

This is probably a stupid question to ask. But could somebody help me clearly distinguish the difference between these two operators in unix '==' and '='? (7 Replies)
Discussion started by: Vikas Sood
7 Replies

2. Shell Programming and Scripting

String Comparison between two files using awk

I have two files with field seperator as "~". File A: 12~13~14~15 File B: 22~22~32~11 i want to calculate the difference between two files and than calculate the percentage difference and output it to a new file. How do i do this using awk. Also please suggest GOOD awk tutorials. Thank... (7 Replies)
Discussion started by: rudoraj
7 Replies

3. Solaris

Difference between two timestamps

I'm writting a script to find the difference between two timestamp. One field i get on delivery time of the file like 07:17 AM and other is my SLA time 06:30 AM I need to find the difference between these two time (time exceeded to meet SLA). Need some suggestions. (8 Replies)
Discussion started by: raman1605
8 Replies

4. Shell Programming and Scripting

Help with showing the difference in two lines of input

I would like my script to be able to tell the difference between to lines of input, like: Input 1: 1 2 3 4 5 Input 2: 1 2 3 4 5 6 I want the script to tell me that the difference between the two lines is the 6. Is there anyway I can have it do this? Here's an example of what my script... (12 Replies)
Discussion started by: Kweekwom
12 Replies

5. Linux

date difference

hi, i have 2 dates in the form: '20080315120030' and '20080310140030'. i.e. YYYYMMDDHHMMSS. i need a way of getting the difference between them using shell script. any thoughts? (14 Replies)
Discussion started by: muay_tb
14 Replies

6. UNIX for Dummies Questions & Answers

Difference between two huge files

Hi, As per my requirement, I need to take difference between two big files(around 6.5 GB) and get the difference to a output file without any line numbers or '<' or '>' in front of each new line. As DIFF command wont work for big files, i tried to use BDIFF instead. I am getting incorrect... (13 Replies)
Discussion started by: pyaranoid
13 Replies

7. UNIX for Dummies Questions & Answers

Korn vs. Bash - which to use

Hello: I'm a newbie to Unix/Linus and shell scripting. This is probably a stupid question but here goes. Some people at work use Korn for scripting while others use Bash. What is the difference between the two? If the two is better to use? When a person logs in, one will type... (9 Replies)
Discussion started by: hbradshaw
9 Replies

8. UNIX for Dummies Questions & Answers

least-square fit in Gnuplot

Does anyone know how to find the best least square fit in Gnuplot? (6 Replies)
Discussion started by: cosmologist
6 Replies

9. Solaris

Group Permissions - How to tell the difference

I am a member of a few different user groups. I would like to see what the difference is.... Can anyone tell me how to look at permissions side by side ? We are using : SunOS xxxxxx 5.10 Generic_127111-09 sun4u sparc SUNW,Sun-Fire-V440 Thanks ! (10 Replies)
Discussion started by: popeye
10 Replies

10. Shell Programming and Scripting

How to calculate the difference between two adjacent columns?

Dear All, I need to find the difference between two adjacent columns. The file is having 'i' columns and i need to find the difference between two adjacent columns (like $1 difference $2; $2 difference $3; .... and $(i-1) difference $i). I have used the following coding awk '{ for (i=1; i<NF;... (7 Replies)
Discussion started by: Fredrick
7 Replies

11. UNIX for Dummies Questions & Answers

Find difference between two files

I have two files as below File1: a b c d File2: a b When i find the difference the output would be c&d.. How can i get my requirement...pls help... Many thanks in advance (10 Replies)
Discussion started by: jagadish_gaddam
10 Replies

12. Shell Programming and Scripting

File Comparison Columnar?

I'm looking to build up a process which would compare 2 files and show difference, the difference needs to be done in such a way that it also shows which column value is differing. So i think of this. Run a diff between the files , then someway find which columns have different values need to... (6 Replies)
Discussion started by: dinjo_jo
6 Replies

13. Shell Programming and Scripting

Escaping square brackets when defining a Csh list

Hi All, I was trying to define a Csh list where one string item contains square brackets, I escaped them as follows in order not to get "No match" error: set LIST = {a,b\,c,d} foreach ITEM ($LIST) echo $ITEM end In this case foreach gives "No match" error, which makes sense.... (7 Replies)
Discussion started by: mohy
7 Replies

14. Shell Programming and Scripting

Help with displaying difference between two arrays (Bash)

The code I have is kind of long, so I'm just posting the part I'm struggling with. I've found many examples online of comparing two arrays in Bash and printing the difference between them. I've tried them all, even mixed and matched some examples with no luck. I know this can't be as hard as I'm... (9 Replies)
Discussion started by: Azrael
9 Replies

15. UNIX for Beginners Questions & Answers

awk code to find difference in second file which is not present in first file .

Hi All, I want to find difference between two files and output only lines which are not present in second file .I am using awk and I am getting only the first difference but I want to get all the lines which are not present in file2 .Below is the code I am using . Please help to get the desired... (7 Replies)
Discussion started by: srinivasrao
7 Replies