PTOMORPH(1)

πŸ“¦
version 0.29 Β· 2 versions
, in fedora 43

πŸ’… 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:


⚠️ 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