Minimum unique abbreviation of option is acceptable. (But note that
shortest unique prefixes might be longer in future versions of the
program.) You may use single hyphens instead of double hyphen to
denote options. You may use white space in place of the equals sign to
separate an option name from its value. All options starting with
hyphens may be given in any order.
This program is part of Netpbm.
pamperspective reads a Netpbm image as input and produces a Netpbm
image of the same format as output.
pamperspective interprets the input image as a perspective projection
of another image which is in a plane oblique to that of the input
image. For example, a photograph of a painting, taken at an angle.
The arguments upper_left_x ... lower_right_y specify a quadrilateral
in the photograph that pamperspective assumes corresponds to a paral-
lelogram in the painting. The output image consists of this parallel-
ogram, sheared to a rectangle. In this way pamperspective undoes the
effect of a raytracer or scanline renderer.
Note that if the input image is a projection of a solid scene, rather
than a plane, the result is like a different camera angle on that
scene, to the extent that the scene is shallow from the other angle.
The input is from infile, or from Standard Input, if infile is not
specified. The output is to Standard Output.
For options of the form --name=num, You can specify the value num in
any of the traditional ways. Additionally, you can specify it as
num1/num2, where num1 and num2 are specified traditionally. This is
useful for specifying a width/height ratio of 4/3, without having to
write infinitely many digits. Where num is supposed to be a natural
number, pamperspective does not allow this format.
Quadrilateral specification options
By default pamperspective outputs exactly the above parallelogram,
sheared to a rectangle. With the following options, it is possible to
make pamperspective output a larger or smaller portion, which we call
the 'visible part.' We refer to the default rectangle as the 'frame.'
The visible part is always a rectangle the axes of which are parallel
to those of the frame.
The frame options are additive. All the parts of the image specified
by either margin options, --include_frame, or --include (or their
defaults) are in the visible part. The visible part is the smallest
possible rectangle that contains the parts specified those three ways.
The visible part must have nonzero size. That means if you specify
--frame-include=no (overriding the default), you'll need to specify
other frame options in order to have something in the visible part.
The frame options were new in Netpbm 10.25 (October 2004).
Output Size Options
fixed After the width and height are determined
It might be tempting always to use the options --include
0,0;0,1;1,0;1,1 (assuming --input_system=lattice and
--input_unit=image), so that no part of the input image is missing in
the output. There are problems with that:
? If the three dimensional plane defined by the quadrilateral has
? If the horizon is not visible, but close to the border of the
When working with large files pamperspective's memory usage might be
an issue. In order to keep it small, you should minimize each of the
? The vertical range that the top output line consumes in the
? The vertical range that the bottom output line consumes in the
? The vertical range from the topmost (with respect to the
netpbm, pam, pnm, pamcut, pamflip, pnmrotate, pam-
scale, pnmshear, pnmstitch
Mark Weyer wrote pamperspective in March 2004.
It was new in Netpbm 10.22 (April 2004).
This documentation was written by Mark Weyer. Permission is granted
to copy, distribute and/or modify this document under the terms of the
GNU General Public License, Version 2 or any later version published
by the Free Software Foundation.
netpbm documentation 2 September 2004 Pamperspective User Manual(0)