Pamtohdiff User Manual



Pamtohdiff User Manual

NAME
SYNOPSIS
DESCRIPTION
SEE ALSO
AUTHOR

NAME

pamtohdiff - convert PAM image to horizontal difference image

SYNOPSIS

pamtohdiff [pamfile] [-verbose]

Minimum unique abbreviation of option is acceptable. You may use double hyphens instead of single hyphens to denote options. You may use white space in place of the equals sign to separate an option name from its value.

DESCRIPTION

This program is part of Netpbm(1)

pamtohdiff takes a PAM (or PNM) image as input and produced a horizontal difference image version of it as output. A horizontal difference image is one where the samples in each row indicate the difference between the sample value in the corresponding sample of the input image and the sample directly above it (in the previous row) in the input image. The horizontal difference image has the property that if a row of the original image is identical to the row above it over a long extent, the corresponding row in the horizontal difference image will contain all zeroes. That makes it compress better than the original image.

Because the horizontal difference samples can be positive or negative, but PAM samples are unsigned integers, the samples in the horizontal difference image PAM are defined to be the difference modulus the range of the input (maxval + 1). This doesn’t lose any information, as it might seem, because: of the two differences that could result in the same pamtohdiff output value (e.g. if maxval is 99, +20 and -80 would both result in "20" in the output), only one is possible in context and the other would result, when reconstructing the original image, in a value less than 0 or greater than maxval.

Before the modulus operation, the values pamtohdiff computes are also biased by half the maxval. This is to make the results easier to inspect visually. Because of the bias, you can display the pamtohdiff output as if it were a PNM image. As long as none of your differences are more than half the maxval, large negative differences show up as dark spots, smaller negative differences are lighter, zero differences are medium intensity, and positive differences are light. If you want this to work even for images that have differences that exceed half the maxval, just use ppmdim 50 on the original image. To avoid losing information, though, do a pamdepth to double the maxval first.

Note that because of the transfer function just described, a difference of zero, which is most common, is represented by a PAM sample value in the output of one half the maxval.

The output PAM has a tuple type of "hdiff".

You can use hdifftopam to recover the original image from a horizontal difference image PAM.

SEE ALSO

hdifftopam(1) , pamdepth(1) ,

AUTHOR

Bryan Henderson







Opportunity


Personal Opportunity - Free software gives you access to billions of dollars of software at no cost. Use this software for your business, personal use or to develop a profitable skill. Access to source code provides access to a level of capabilities/information that companies protect though copyrights. Open source is a core component of the Internet and it is available to you. Leverage the billions of dollars in resources and capabilities to build a career, establish a business or change the world. The potential is endless for those who understand the opportunity.

Business Opportunity - Goldman Sachs, IBM and countless large corporations are leveraging open source to reduce costs, develop products and increase their bottom lines. Learn what these companies know about open source and how open source can give you the advantage.





Free Software


Free Software provides computer programs and capabilities at no cost but more importantly, it provides the freedom to run, edit, contribute to, and share the software. The importance of free software is a matter of access, not price. Software at no cost is a benefit but ownership rights to the software and source code is far more significant.


Free Office Software - The Libre Office suite provides top desktop productivity tools for free. This includes, a word processor, spreadsheet, presentation engine, drawing and flowcharting, database and math applications. Libre Office is available for Linux or Windows.





Free Books


The Free Books Library is a collection of thousands of the most popular public domain books in an online readable format. The collection includes great classical literature and more recent works where the U.S. copyright has expired. These books are yours to read and use without restrictions.


Source Code - Want to change a program or know how it works? Open Source provides the source code for its programs so that anyone can use, modify or learn how to write those programs themselves. Visit the GNU source code repositories to download the source.





Education


Study at Harvard, Stanford or MIT - Open edX provides free online courses from Harvard, MIT, Columbia, UC Berkeley and other top Universities. Hundreds of courses for almost all major subjects and course levels. Open edx also offers some paid courses and selected certifications.


Linux Manual Pages - A man or manual page is a form of software documentation found on Linux/Unix operating systems. Topics covered include computer programs (including library and system calls), formal standards and conventions, and even abstract concepts.