PTStitcher Readme

From Wiki
Jump to navigation Jump to search


This is the text of the original readme for PTStitcher by Helmut Dersch. It is provided for historical purpose and not intended as an up to date document. For a recent documentation of PTStitcher scripting see Jim Watter's page

The text of the links mentioned in the document was left as in the original. However, when you click them you get directed to a page on a mirror. Links to other pages are clickable only, if the linkedpage still exists.


Readme PTStitcher 1.9.2

PTStitcher combines images to panoramic views. You simply
drop all input images onto the application icon of PTStitcher
and a panoramic file to be viewed with all major VR-viewers
is generated in one step.

An updated version of the Photoshop plug-in 'Panorama Tools'
is included. Please use only the same version numbers of
these programs together.

Version notes

Changes to 1.9.1:
o JPEG output supported for IBM-Hotmedia support.
o Folders with images can be processed like single
  images. This solves a problem with Windows
  command line limitations.
o Mac-version reads images through Quicktime importer.
  Thus almost any format is supported, and the 'PICT'-
  limitation on image size no longer applies.
o Mac version has some rudimentary user interface.
  Images can be loaded via menus, and there is even
  a program icon.
o PTAverage, the density enhancing software, is
  now included in this distribution. Also included
  is a first Windows version of this program.
o Bug fixes: Mode line in scripts is read correctly,
  IVR-files for LivePicture Cylinders are corrected,
  and some more minor fixes.
o Scripting syntax for macs has been changed to that
  of Windows machines, see Readme.
o The Photoshop plug-in 'Panorama Tools' has been
  updated, too, see the separate Readme about changes.

Changes to 1.9.0:
o First Windows version.
o Panorama conversion capability added: Almost any
  output format can be generated using any input format.
o More formats available: LivePicture Cylinder.
o VRML-output now includes Zoom-tool.
o Viewer scripts can be customized via templates.
o Script file can be dropped together with image files
  on PTStitcher.
o Some bug fixes

Changes to 1.0b1:
o More output formats available: VRML-cubes and LivePicture-Java
o Fully Apple-scriptable: Build your Web-Panocam.
o PTOptimizer finds optimum image position automatically,
  see separate documentation.
o More options for panorama creation: see examples.
o Several bug fixes.

Changes to 1.0b0:
o Fixed error in PICT-reader, which only worked for 72dpi images.
  (Copied faithfully from Apple's sample code site...)


Output options

Output options:
o QTVR movie ready to be viewed with Quicktime plug-in.
  (Windows version requires free VRMakePano utility).
o Smoothmove full spherical panorama ready to be viewed
  with Infinite Images (iMove) plug-in.
o RealVR full spherical and cylindrical panorama ready to
  be viewed with LivePicture's ZoomIt viewer.
o LivePicture Java format: Cylindrical and Spherical
  ready to be viewed with LivePicture Applet
o VRML-Background node (Cubes)
  ready to be viewed with VRML-browsers.
  Viewer Script with Zoom tool generated.
o JPEG-images for IBM Hotmedia format, ready to
  be imported in free IBM authoring software.
o Panoramic images for viewing and printing
o Multilayer Photoshop file containing one image per layer for

Input Options

Input options:
o Rectilinear lenses with any focal length
o Fisheye lenses with any focal length
o Panoramic cameras
o Any orientation possible (multirow etc)
o PSphere images, allows conversion of
  almost any format to any format.
o Can read almost any format on Macs/
  uncompressed BMP and JPEG images on Windows.




Drop the file 'pano12.lib' onto your 'System Folder'.
Your system should then move it to the 'Extensions'-folder.
It replaces the pano-library which comes with my
Photoshop plug-in 'Panorama Tools'. This library only
works with the current version 1.9.2 plug-in which
is included in this package.


Put the library file 'pano12.dll' in your
\Windows\System directory. This library also works
with the current 1.9.2 version of the Panorama
Tools plug-in. If you do not use that plug-in
you can also leave the library together with


The folder 'Templates' has to be in PTStitcher's
directory. It contains HTML and VRML templates, which
are used to generate the output files. You can edit
them to suit your needs. They can be opened with any
plain text editor, and hold a C-language format
string. The placeholders starting with a '%' sign
are used by PTStitcher to insert proper output
values. You can move them, but not delete them
or change order.

You need one file with name 'Script' (Windows: 'Script.txt', the
extension is invisible!) in PTStitcher's directory. This scriptfile
holds the information about how to assemble the panorama.
See the tutorials section below for details.

Getting Started

Getting Started:

With the original Script of the distribution we can
start making a spherical pano using two fisheye images.
The Script should reside in PTStitcher's directory. Now
open the folder 'fisheye', then 'Images'. You can open
these image in any graphics program. They resemble
scaled down fisheye images. Grab both images and drop
them together(!) on PTStitcher's icon. Alternatively,
you can drop the folder containing the images. PTStitcher
starts up and asks for a name and location for the panoramic
output file. Choose whatever you like (eg 'pano'), and
click 'ok'. After several transformations, the program
quits, and generates two files:
pano.JPG, which is the panoramic image, and pano.IVR,
which is required by the LivePicture ZoomIt viewer.
To view the panorama, you have to download and install
this viewer from into your browser.
Then open 'pano.IVR' in the browser (if you use Netscape,
you can simply doubleclick 'pano.IVR', only mac).

Please note that the images for this tutorial are heavily compressed
for bandwidth reasons (JPEG quality 25%) and display many artifacts.

Other Formats

Other Formats:
Open the file 'Script'. It contains the commands for
panorama generation and a comprehensive list of all
commands available. There are a couple of scripts included
in this package to show the various options:

o Smoothmove spherical panoramas can be generated using
  the script 'Script_Fisheye_Smoothmove'. Grab this file
  together with the two images, and drop all three files
  at once on PTStitcher's icon. Alternatively, you can
  activate this script as default script by moving it to
  'PTStitcher's directory, and renaming it to 'Script'
  (On Windows: Script.txt, extension is invisible). First you have
  to move the old Script out of the way. Then drop the two fisheye
  images onto PTStitcher's icon. A file with extension 'pan' is
  created, which can be viewed using the Smoothmove plug-in from

o QTVR-panos can be generated using the script 'Script_Fisheye_QTVR'
  Repeat the steps from the last paragraph, and you get a QTVR-movie.
  On Windows, a 'bmp' file with QTVR-dimensions is generated, which
  has to be processed by Apple's free program 'VRMakePano'. It is
  available for download at Apple's Quicktime site (developers->sample
  code). Also, be sure that Quicktime is installed on your system.
  To use VRMakePano, start it up, then open the 'bmp'-file.
  The next dialog asks for a hotspot image, which you can dismiss
  if you have none. Then VRMakePano generates the QTVR-movie.
  Plug-in available at

o Multilayer Photoshop files can be generated using the script
  Script_Fisheye_PSD. Open the outputfile in Photoshop, and examine the
  various layers and masks. This is the perfect format to edit the
  final image.

o LivePicture offers a free java viewer, which enables viewing
  on any platform without the need for a special plug-in. Use
  the script 'Script_Fisheye_Java_Sphere' to create a spherical, and
  'Script_Fisheye_Java_Cylinder' to create a cylindrical pano. Three
  files are generated: pano.html, pano.IVR and pano.JPG.
  Additionally, you need the Java applet files '' and
  ''. You can download them from LivePicture's site, they are part of the Java-developer's
  package. Put both files into the same folder as the other three
  files, and open pano.html in your browser. If you use Netscape,
  simply double-click pano.html.

o VRML-background nodes are an alternative to spherical panoramas.
  Viewers are available for almost any platform, eg the Cosmo-viewer
  for the Macintosh. Use the script 'Script_Fisheye_VRML'. Seven files are
  generated, which are six cubic-face images and pano.WRL, the
  VRML-scriptfile. Open this file in your browser to view the scene.
  VRML-viewers have no Zoom-control. The pano.WRL file generated
  by PTStitcher implements such a control via javascript.

Multirow Stitching

Multirow Stitching:
A second example using 10 images resembling a 14mm wide angle
rectilinear lens is available in the folder 'rectilinear'.
These images correspond to two rows made at pitch angles of
+/-43 degrees. Scripts are provided to create the same formats as above.
Be sure to drop _all_ 10 images at once.

Panorama Conversions

Panorama Conversions:
See the directory 'conversions' for examples of Panorama
format conversions. First, generate a Master-panorama using the
script 'InputPanorama' and the two fisheye images. This is in
'PSphere'-format. Then generate different formats using the
scripts 'to_VRML' and 'to_QTVR'. By editing these scripts
any input format and output format can be combined.

More examples

More examples:
The examples from my site
for 'Panorama Tools' also work in PTStitcher. Try the images
from the tutorial 'HowToStitch' as an example for spherical
panoramas made with full frame fisheye lenses. Use the example
for the Nikon Coolpix with fisheye adapter. In this latter case
you have to add the commands 'mx900 my900' to the script, see
the example 'fisheye' in this distribution.

How to go on

How to go on:
To use PTStitcher with your setup, you have to generate a script
for your needs. Even if you use something similar to the examples
you probably need some finetuning. This can be done in various
o 'Panorama Tools' (included) has a robust and fast position optimizer
based on feature points. Setting these points, however, is somewhat
tedious, and not feasible if you have many images to stitch.It can
determine image positions, correction parameters, and automatically
generate scripts.

o 'PTOptimizer' in this package uses 'PTStitcher' to generate
panoramas with different parameters until they fit. It is very slow
but does not require setting feature points. See the separate

o Manual alignment. Generate a Photoshop file (PSD_mask or PSD_nomask)
in PSphere-format. Then edit this image, in Photoshop or any other
suitable Graphic program (eg move the layers and set seam positions),
and save the result in lossless PICT(Mac)/ BMP(Win) format. Then use
one of the Conversion scripts to generate the panoramic file(s).

The images dropped onto PTStitcher are processed in alphabetical/numerical
order. Be sure that is the same order they appear in the script.

Scripting PTStitcher


Scripting PTStitcher:

PTStitcher is fully scriptable. PTOptimizer uses this feature to interact
with it, and lets it generate various trial images. PTStitcher responds
to 'DoScript' Apple Events embedded in a launch. The data sent should be
text consisting of a list of full paths in Apple-notation, ie with
':' as delimiter. The syntax has been changed for version 1.9.2:

-o outputpano scriptfile image1 image2 ....

Filenames containing spaces should be quoted. Example:

-o "Macintosh HD:panos:result" "Macintosh HD:myscript" "Macintosh HD:image1" "Macintosh HD:image2"


PTStitcher can be controlled via  commandline arguments.PTOptimizer uses
this feature to interact with it, and lets it generate various trial images.
The syntax is as follows

PTStitcher -o outputpano script.txt image1 image2 ....

The outputpano describes the location for the result panorama, ie what
PTStitcher asks for when run interactively. This file should not exist yet.
The scriptfile is identified via extension 'txt' and need not appear
as second entry, nor has to be named 'script'.
All input images follow, and are processed in the order they appear
in the command line.


Helmut Dersch

Spherical Panoramas, Macro Panoramas,
Free Panorama Software: