PTGui Guide
PTGui Guide
Index
A. Introduction and overview...................................................................................................... 2
B. Taking microscopic images ................................................................................................... 2
C. Installing PTGui ..................................................................................................................... 3
D. Setting up PTGui (before getting started) .............................................................................. 3
E. Getting started (1st project) .................................................................................................... 4
F. Creating projects (2nd and following projects)......................................................................... 5
G. Eliminating distortions in single images ................................................................................. 6
H. Calibrating the spatial scale (pixel/unit).................................................................................. 7
I.
C. INSTALLING PTGUI
1. Download full [licensed] version from: http://www.ptgui.com/download.html
2. Run PTGui installer
3. Launch PTGui; you will be asked to provide the license information to activate the full version;
exit PTGui when finished.
4. Download Smartblend-plugin * from: http://www.ptgui.com/plugins.html.
5. Unzip the Smartblend-plugin folder and move it inside the PTGui program folder.
6. Download the Autopano-plugin ** from: http://autopano.kolor.com/autopano_v103.zip
7. Unzip the Autopano-plugin folder and move it inside the PTGui program folder.
8. You may want to create a desktop shortcut for PTGui and for the batch stitcher
(RunStitcher.exe within PTGui program folder).
* Smartblend evens out slight illumination heterogeneities between the stitched images; it also deals with slight
parallax-issues when moving the sample around (parallax: shift of an object against the background that is caused
by a change in the observer's position).
** Autopano is an alternative plugin tool for finding control points. Sometimes it performs better than the PTGui
algorithms. Cf. I. CORRECTING REGISTRATION ERRORS
General-Tab
Saving > Default folder for new projects: select Same as source images
Saving > Default folder for stitched output: select Same as project
Temporary folders: create one to several temporary folders that reside in a partition with
plenty of free disk space and PTGui can use for memory-intense processes. Check this
(these) folder(s) as preferred.
Plugins-Tab
Autopano: browse to the folder containing autopano.exe (e.g., C:\Program files\ PTGui\autopano_v103\autopano.exe) and select it.
** PTGui assumes that all sub-images are taken from a fixed position, i.e. that the camera was rotated around its
axes. Consequently, peripheral images are assumed to be captured in an acute angle, and PTGui tries to correct
for the resultant spatial contraction. In the case of microscopic images, the sample was shifted under the
microscope for each sub-image, i.e. the camera was always perpendicular to the sample (orthographic
projection). By setting the focal length (distance between camera lens and image sensors) to a large value
4
(1.7310 -> the largest value accepted by PTGui), the rotation assumed by PTGui is reduced to <0.2, which
virtually eliminates any spatial contraction by PTGui.
Note: Some other approaches (cf. below) may be mathematically more correct, but this one produced the best
results.
The distortion by the microscope/camera lenses are fully corrected by PTGui
In the online help of PTGui, the following entry can be found:
How can I stitch 'flat' images, like partial scans from a flatbad scanner of a large image? Start with the
following settings:
- Switch PTGui to Advanced mode using the Advanced... button on the Project Assistant
- Lens Parameters: Rectilinear projection; horizontal field of view: 1 degree
- Panorama Settings: Rectilinear projection; horizontal and vertical field of view: some multiple of 1 degree,
depending on the number and arrangement of images.
Now there are two ways to position the images:
1. Set all yaw, roll and pitch parameters to zero. Use Individual Shift parameters for all images and use the
horizontal shift (d and e) parameters in the Image Parameters tab to position each image. Add control
points, set the optimizer to Advanced and optimize only the d and e parameters of each image. Or:
2. Position the images as if it were a normal panorama, using the Panorama Editor and/or the yaw, roll and
pitch parameters. Add control points. Set the Optimizer to Simple, don't optimize the lens field of view
and don't optimize the lens distortion.
The first method is mathematically more correct, but the second method is easier and should give similar
results. PTGui's Panorama Editor only supports the second method. Whichever method you prefer,
numerically change the horizontal and vertical Field of View parameters on the Panorama Setting tab
afterwards, until there is no excessive black or cropped area.
1st time:
1. Open a project with multiple sub-images
2. Go to the Lens Settings-tab and jot down the values in Lens correction parameters for a-c.
3. In main menu select File > New
6
4. For each image, divide the measured line length (in pixels) by the actual length (in the
dimension of choice, e.g. microns) pixel/unit
5. Repeat steps 3-4 at least 10 to get a robust statistical mean
6. For each image, get the focal length (a measure for the zoom level) from the EXIF file
(EXchangeable Image Format extension holding the camera settings that were used to
take the picture; accessible by, e.g. IrfanView)
7. Use linear interpolation to calculate the pixel/unit-conversion for each intermediate focal
length (zoom level).
Dont stitch images if you intend to work on your computer at the same time, since stitching
uses ample system resources!
Stitched images are saved under the project name into the folder that contains the project
PC or Mac
500 MB RAM
5 GB free disk space
M. QUESTIONS?
Check the help files and user-group (http://tech.groups.yahoo.com/group/PanoToolsNG) or the
support/faq site (http://www.ptgui.com/support.html) for specific questions.