11 May 2019 19:24:26 UTC
- Distribution: Panotools-Script
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (2)
- Testers (401 / 0 / 0)
- KwaliteeBus factor: 0
- 67.49% Coverage
- License: unknown
- Activity24 month
- Download (160.4KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version++ed by:1 non-PAUSE userBPOSTLE Bruno Postle
ptomorph - Distort photos before stitching
ptomorph [options] project.pto
Options: -h | --help Outputs help documentation -j | --jobs numb Use that many jobs parallel if possible -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.
Module Install Instructions
To install Panotools::Script, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Panotools::Script
For more information on module installation, please visit the detailed CPAN module installation guide.