PTGui: Quick Guide For Stitching Microscope Images PTGui – Quick Guide Georg vo

PTGui: Quick Guide For Stitching Microscope Images PTGui – Quick Guide Georg von Arx 2 A. INTRODUCTION AND OVERVIEW PTGui (www.ptgui.com) is a commercial stitching tool for creating panorama images of large scenes taken with a camera on a tripod. In this application it has to deal with camera rotation and distortions caused by lens systems. However, with the appropriate settings and handling as described in this quick guide it is a great tool for creating mosaic images of microscopic samples, too. Usually, the entire process is done fully automatic, and batch processing of created project files is available to enhance efficiency. Problematic samples may be manually edited if needed. A great advantage of PTGui is the correction of any distortion caused by most microscope and camera lenses. Accordingly the pixel/unit-conversion does no more change from image centre to image periphery. This is particularly valuable to avoid biases in quantitative image analysis. Although I found PTGui extremely efficient, reliable and just amazing for my purposes (e.g. stitching microscopic mosaic images of more than 70 sub-images!), I cannot guarantee equal success in any other application. 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. Correcting registration errors.................................................................................................8 J. Batch processing (stitching multiple images from projects)....................................................8 K. Image cropping (removing dispensible image parts)..............................................................9 L. Recommended computer performance..................................................................................9 M. Questions?............................................................................................................................9 B. TAKING MICROSCOPIC IMAGES • Make sure sub-images overlap by at least 15-25%. • Avoid rotation of the sample while shifting it on the light or object table. (Use an X/Y-stage if available!) • Keep exposure time and all other sensitivity settings constant for all sub-images of a sample. PTGui – Quick Guide Georg von Arx 3 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 D. SETTING UP PTGUI (BEFORE GETTING STARTED) -> Navigate to Tools Tools Tools Tools > Options Options Options Options General General General General-Tab • Check Automatically set panorama filename upon first saving of project • Saving > Default folder for new projects: select Same as source images • Saving > Default folder for stitched output: select Same as project Folders & Files Folders & Files Folders & Files Folders & Files-Tab • Standard folder for templates: define a folder of choice • 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. PTGui – Quick Guide Georg von Arx 4 Plugins Plugins Plugins Plugins-Tab • Autopano: browse to the folder containing autopano.exe (e.g., “C:\Program files\ PTGui\auto- pano_v103\autopano.exe) and select it. • Smartblend: browse to the folder containing smartblend.exe and select it. E. GETTING STARTED (1 ST PROJECT) 1. Launch PTGui 2. Push the Advanced-button 3. Load all images of the first stitching project (1. Load images…) 4. Camera / lens data (EXIF)-window pops up; Push Cancel* 5. Set Focal length to “17,300” and Focal length multiplier to “1” ** 6. Create a preview of the stitched image (2. Align images…) -> The Panorama Editor-window pops up after a couple of seconds to one minute; if it doesn’t do so, open it manual by going to main menu Tools > Panorama Editor -> If no preview of the stitched image is visible, follow instructions in “I. CORRECTING REGISTRATION ERRORS, 4.a”). 7. Go to the Optimizer-tab and select Simple mode a) Deselect Optimize lens field of view b) Minimize lens distortion select Heavy + lens shift c) Optimize using select Panorama Tools Optimizer d) Push Run Optimizer e) The Optimizer Results-window pops up; hopefully it states a very good statistics; push OK 8. Optional but recommended: improve the quality of the stitched images: a) In main menu, navigate to Control Points > Delete Worst Control Points b) A process summary window pops up; push OK. c) The Optimizer Results-window pops up; hopefully it states a very good statistics; push OK d) Optional: Open the Control Point Table (Tools > Control Point Table) and delete Outliers if any (Distance much above other control point pairs). e) Cycle through a)-d) until you get satisfying statistics (e.g. Average: <0.8, Maximum: <2.0) 9. Optional: If you still are not satisfied with the results, follow the instructions in “I. CORRECTING REGISTRATION ERRORS” (below) and resume at step 8 or 10 when finished. 10. Go to the Create Panorama-tab a) Set optimum size (button) to Maximum size to obtain an un-resized mosaic image b) Choose an appropriate File Format and compression option in Settings c) Blend using > Smartblend plugin d) Uncheck Use fast transform PTGui – Quick Guide Georg von Arx 5 11. In main menu select File > Make Default -> Most settings will be automatically applied to future projects as default values 12. Optional: Go to main menu Project > Calculate Required Temporary Disk Space to check out whether you have sufficient disk space available to stitch your project 13. a) If you want to stitch the image now: Go to the Create Panorama-tab and push Create Panorama-button b) If you want to stitch the image later, together with other projects (more efficient, cf. J. BATCH PROCESSING): In main menu select File > Save; name the project * The optics used in the microscope setup differs from the EXIF data (EXchangeable Image Format – extension holding the camera settings that were used to take the picture); it is misleading PTGui. ** 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 (1.73×104 -> 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 PTGui PTGui 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 “How can I stitch 'flat' images, like partial scans from a flatbad scanner of a large image? Start with the “How can I stitch 'flat' images, like partial scans from a flatbad scanner of a large image? Start with the “How can I stitch 'flat' images, like partial scans from a flatbad scanner of a large image? Start with the following settings: following settings: following settings: 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 uploads/Geographie/ ptgui-guide.pdf

  • 32
  • 0
  • 0
Afficher les détails des licences
Licence et utilisation
Gratuit pour un usage personnel Attribution requise
Partager