ptomorph man page
ptomorph — Distort photos before stitching
ptomorph [options] project.pto
Options: -h | --help Outputs help documentation -o | --output name Output .pto project name, defaults to 'morphed.pto' -p | --polynomial num Uses a polynomial best fit, num is 'order' of polynomial and must be 1, 2, 3, 4 or 5
ptomorph looks at control points in a Hugin PTO panorama project and creates a new set of photos that are distorted such that these control points line up perfectly. Distortion is a 'rubber-sheet' type morph.
A PTO project is created that references these distorted photos, this project can then be stitched as normal.
Temporary distorted images are in PNG format with filenames based on the prefix of the new PTO filename. i.e. this command:
ptomorph -o /path/to/morphed.pto project.pto
..will produce the following files:
/path/to/morphed.pto /path/to/morphed_0000.png /path/to/morphed_0001.png /path/to/morphed_0002.png etc...
Control point positions are calculated using the 'pano_trafo' tool from the Hugin project, the morphed photos are created with 'convert' from the ImageMagick project.
By default the 'Shepards' distortion is used, if a polynomial is specified then the ImageMagick 'Polynomial' distortion is used, see <http://www.imagemagick.org/Usage/distorts/#polynomial> and <http://www.imagemagick.org/Usage/distorts/#shepards>
Masks and cropping settings are not distorted, so projects with masks that need lots of distortion may not work so well.
Note: Due to the way that the 'pano_trafo' process is spawned, it is likely that this proof of concept tool doesn't currently work on Windows.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
Bruno Postle - April 2012.