PTStitcherNG 0.7b Prof. Dr. H. Dersch - HFU Furtwangen
IntroductionPTStitcherNG reads and transforms any number and type of input images, and combines them into one seamless panoramic image with larger field-of-view. Given enough input images, full spherical 360x180 degree views can be synthesized suitable for virtual-reality viewers or printing. Transformation parameters and names of the input images are read from a plain-text projectfile. The transformations consist of correcting distortions due to camera lenses, perspective tranlation and remapping to any of the usual panorama projections. Merging employs an eight level multiresolution algorithm which hides seams even if the source images fit badly. PTStitcherNG natively reads PPM, TIFF and JPEG images, and almost any raw or other format through plug-ins. PTStitcherNG combines a panorama stitcher and multiresolution blender in one application. It is optimized for speed by using parallel processing (SIMD-instructions, multiple processor cores). The main novel feature is the tight coupling of the remapper and blender, with an optimized management of temporary data. This enables PTStitcherNG to keep all intermediate data and processed images in ram (in the case of the CUDA-version: in gpu-ram) even when stitching hundreds of images to gigapixel sized panoramas. As a result, no data have to be written to disk, or reread from disk with corresponding speed improvements. As an aside, this makes PTStitcherNG perform fast even on low profile host systems Some speedresults, obtained with my fastest platform (Intel Celeron 1.8GHz, 1 GByte ram, Nvidia GeForce GTX 285, OpenSUSE 11.1):
3 x 11 MPixel -------> 18 MPixel equirect 2.1 sec
(the decimal point is correct)
337 x 6 MPixel ------->1433 MPixel cylinder 250 sec (4min 10 sec)
The cellprocessor version (Playstation 3) has been discontinued: Recent decisions by Sony (new PS3 without Linux) and IBM (dim future for the cellprocessor) made me switch to CUDA as one basis for PTStitcherNG. Friendly folks from Nvidia sent me one of their gpu-cards for evaluation. However, PTStitcherNG also runs very fast on plain vanilla current x86 systems. PTStitcherNG is free software. No license is required to download and use it. See the licenses for auxiliary components in the Licenses folder. InstallationAll versions of PTStitcherNG are copy-installed, i.e. the necessary program files are simply copied to a suitable location on your computer. No automatic "installer" corrupts your system by manipulating low-level settings. WindowsThe Windows version of PTStitcherNG has now been tested to work on Windows 7. Binaries for 32bit and 64bit platforms, with and without CUDA are provided. Use one of the files PTStitcherNG_cuda.exe or PTStitcherNG.exe. PTStitcherNG.exe should run as is, while the CUDA-version requires two libraries (dlls): The file pano_cuda.dll from the distribution, and Nvidias CUDA-runtime cudart.dll which is now included in the distribution. You also need Nvidias CUDA-driver (and, of course, a CUDA-capable grapics card): Download from Nvidia and install it. X86-MacOSOnly the non-CUDA version of PTStitcherNG is available for Macintoshs. Simply copy the files PTStitcherNG (the actual program) and the file PTStitcherNG.app (an AppleScript GUI-wrapper for PTStitcherNG) to your computer. The default PTStitcherNG application is compiled for MacOS 10.5 (Leopard). There is no version for older versions of MacOS or PowerPC processors. Extending PTStitcherNGAs is, PTStitcherNG reads TIFF, JPEG and PPM-images. Reading RAW and other formats is accomplished by external readers, which feed PPM-data to PTStitcherNG. Once setup, this is done automatically. On startup PTStitcherNG reads a textfile PTImageReader.txt, which contains fileextensions and program commands, see the example of the distribution. Download and install dcraw for reading almost any RAW format, pngtopnm for reading PNG images, or any other of the netpbm utilities for almost any format. The distribution now includes dcraw. Just move it to the same folder as the PTStitcherNG executable together with the PTImageReader.txt file. Edit PTImageReader.txt to set special dcraw options, e.g. for using 16bit-pixels etc. PTStitcherNG writes TIFF (multilayer using "tiff_m" and single layer "tiff", see scriptsyntax below), PPM ("ppm"), PSD / PSB and JPEG images. Pixelsize defaults to 3-byte RGB. The commandline option -p switches output format to 6-byte RGB (only PPM and TIFF). Large files exceeding 2GByte size can be written in PPM and (flat) TIFF-format, provided the operating system and file format permits it. In the case of TIFF-multilayer format, a filename with extension ".btf" or ".tf8" has to be used to force BigTIFF format on Linux and MacOS, the Windows-version supports multilayer format only for regular TIFFs. Using PTStitcherNGPTStitcherNG can be run as standalone programs with minimal graphical user interface. Simply drag and drop a suitable projectfile (e.g. the speedtest.pts-files from the above mentioned speedtests) onto PTStitcher's icon (in the case of MacOS: onto PTStitcherNG.app's icon). You will be asked for a save-location, and PTStitcherNG will then proceed and convert the input images. PTStitcherNG can be run as a console application from the command line with many more options to finetune the conversion process. This might be used for batch-processing large amounts of images using shell scripts. See the man-page ptstitcher_man.pdf for details. Finally, PTStitcherNG can be registered into one of the many graphical frontends to panorama tools, see the docs of your favorite system for details. Examples
The distribution includes a small sample project which can be used to test
the installation. Open the folder test and locate the file project.txt.
Drag and drop this file onto PTStitcherNG's icon (on Macs: on PTStitcherNG.app's icon).
PTStitcherNG should start up, ask for a save-location and convert the 6 images to
a cylindrical panorama. Open the file project.txt with any plain-text editor,
and change the settings to test other features, see the documentation on scripting syntax below.
To run PTStitcherNG from the commandline, open a console window,
navigate to the test-folder, and issue the command
For larger panoramas and to test image quality, download any of the speedtest examples mentioned above: 18 megapixel sphere or 1433 megapixel cylinder . ProjectfileProjectfiles are plain-text files generated either by hand using any texteditor or (usually) using one of the panorama tools utilities for aligning images, e.g. PTOptimizer, which is integrated in most graphical frontends to panorama tools. A subset of PTStitcher and PTGui scripting parameters is supported:
One line describing the output panoramic image:
Some notes on Photoshop native formats (PSD - up to 30000 pixels wide, PSB - up to 300000 pixels wide):
Both can be 8 or 16 bit color depths. In default mode a multilayer image is created with each
layer hosting one fixed-length rectangular tile. This tiled scheme is choosen for fast reading
and writing access, and has no resemblance to the original source images. If so desired
it can be collapsed in Photoshop onto the backgound layer without any editing or blending.
and one line describing each input image:
and one line describing global options:
Viewpoint correction is supported using
PTGui-pts-format:
Inverse Mode
Using the command option -i name instead of the usual -o name
to specify the panorama image name switches PTStitcherNG into inverse mode.
In this mode the panorama image must exist and all images specified
in o-lines are created. All sensible options are supported including
all warp transformations, radial distortions and perspective transformations.
The fileformat specification on the p-line (tiff/jpeg/etc) is applied to the output
images.
There are numerous applications for this mode: Create 6 cubic faces
from an equirectangular source for cubic panorama viewers with this script:
|