PTOMORPH(1)
π PTOMORPH(1) β like, the manual, but make it make sense π
okay bestie, so this is ptomorph, a user-contributed Perl thing. Sit down, grab a strawberry π, and let's get into it.
β¨ NAME β¨
ptomorph β Distort photos before stitching π¦
πΈ SYNOPSIS πΈ
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
So basically you hand it a project.pto and it does the thing. π
π DESCRIPTION π
okay so picture this: ptomorph peeks at the control points in a Hugin PTO panorama project π and then it creates a whole new set of photos, all distorted so those control points line up perfectly. The distortion is a "rubber-sheet" type morph. It's giving stretchy. It's giving elastic. It's giving π«Ά.
Then it makes a PTO project that references those distorted photos, and you can just stitch that project like normal. No cap. β¨
π the temporary files situation π
The temporary distorted images are in PNG format, and their filenames are based on the prefix of the new PTO filename. So like, this command right here:
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...
iconic, honestly. π
π¦ how the magic happens π¦
Control point positions are calculated using the pano_trafo tool from the Hugin project, and the morphed photos are created with convert from the ImageMagick project. That's the whole pipeline, bestie, that's it.
By default the Shepards distortion is used. But if a polynomial is specified, then the ImageMagick Polynomial distortion is used instead. Go look:
- <http://www.imagemagick.org/Usage/distorts/#polynomial>
- <http://www.imagemagick.org/Usage/distorts/#shepards>
β οΈ the caveats, because we keep it real β οΈ
Masks and cropping settings are not distorted, so projects with masks that need lots of distortion may not work so well. Not me finding out the hard way. π
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. π
π LICENSE π
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.
periodt. πβ¨
π SEE ALSO π
go read, iykyk π§
π AUTHOR π
Bruno Postle β April 2012.
and that's the whole thing, my love π
this page was served up by perl v5.42.0 on 2025-07-25, so if you're reading this, the vibes are current and the documentation is immaculate. mwah. πππ¦
π¦ where this page comes from
- fedora 43: perl-Panotools-Script 0.29-20.fc43 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms