Stitching distortion-free mosaic images for QWA using PTGui. Georg von Arx

Similar documents
The upper rail is adjusted so that the gold ring is vertically in line with the axis of rotation as shown in the image below.

Creating Stitched Panoramas

Digital Design and Communication Teaching (DiDACT) University of Sheffield Department of Landscape. Adobe Photoshop CS4 INTRODUCTION WORKSHOPS

How to combine images in Photoshop

Managing images with NewZapp

PosterArtist Quick Guide

ImagesPlus Basic Interface Operation

Photoshop Elements Hints by Steve Miller

Windows INSTRUCTION MANUAL

Before you start, make sure that you have a properly calibrated system to obtain high-quality images.

MC3 Motion Control System Shutter Stream Quickstart

ISCapture User Guide. advanced CCD imaging. Opticstar

Advanced Diploma in. Photoshop. Summary Notes

Photoshop CS2. Step by Step Instructions Using Layers. Adobe. About Layers:

CHAPTER1: QUICK START...3 CAMERA INSTALLATION... 3 SOFTWARE AND DRIVER INSTALLATION... 3 START TCAPTURE...4 TCAPTURE PARAMETER SETTINGS... 5 CHAPTER2:

PandroidWiz and Presets

Digital Portable Overhead Document Camera LV-1010

Neat Image plug-in for Photoshop /Mac

Quick Guide for Zeiss 710 Laser Scanning Confocal MGH Cancer Center

Introduction to: Microsoft Photo Story 3. for Windows. Brevard County, Florida

First English edition for Ulead COOL 360 version 1.0, February 1999.

Which equipment is necessary? How is the panorama created?

Neat Image. User guide. To make images look better. Document version 4.2, January 10, Copyright by ABSoft. All rights reserved.

INSTRUCTION MANUAL MM-A209

SCANNING IMAGES - USER S GUIDE. Scanning Images with Epson Smart Panel and PhotoShop [for Epson 1670 scanners]

Quick Operation Guide

5. Image processing. 4D construction learning environment virtual tour making. Team leader: Dr Chris Landorf. Contributors:

Geometric Functions. The color channel toolbar buttons are disabled.

Photoshop Elements 3 Panoramas

Introduction. Let s get started...

Contents Downloading and installing IrfanView.. 1

ACDSee Pro 3 tutorials: Pro 3 overview for new users

LESSON 02: GET STRONGER FOR PS USERS COMPANION BOOK. Digital Scrapbook Academy. February 2018: Lesson 02 Get Stronger for Photoshop Users

Optika ISview. Image acquisition and processing software. Instruction Manual

Movie 10 (Chapter 17 extract) Photomerge

Introduction to Autodesk Inventor for F1 in Schools (Australian Version)

BacklightFly Manual.

TRAINING MANUAL. Olympus FV1000

KODAK DIGITAL ROC Professional Plug-In 2.1

1. What is SENSE Batch

Table of Contents. Lesson 1 Getting Started

Creating a Panorama Photograph Using Photoshop Elements

PanaVue ImageAssembler Documentation

Getting Started. with Easy Blue Print

Stitching panorama photographs with Hugin software Dirk Pons, New Zealand

Manual Stitching of Multiple Images to Produce a Panorama

Copyright Notice. Trademarks

Modeling Basic Mechanical Components #1 Tie-Wrap Clip

Movie Merchandising. Movie Poster. Open the Poster Background.psd file. Open the Cloud.jpg file.

12. Creating a Product Mockup in Perspective

GXCapture 8.1 Instruction Manual

It makes sense to read this section first if new to Silkypix... How to Handle SILKYPIX Perfectly Silkypix Pro PDF Contents Page Index

v Introduction Images Import images in a variety of formats and register the images to a coordinate projection WMS Tutorials Time minutes

2014 by Microtek International, Inc. All rights reserved.

Title: Leica SP5 Confocal User Manual

NEORSD. Cad Standards and Procedures Manual

Companion Processing Software for SIGMA Digital Cameras. Version 4.1 For Macintosh

Basic Image Editing Tutorial

Lenticular Images using Stereo Photo Maker Class 1

Table of Contents. 1 Autopano Pro - Installation and registration INSTALLATION REGISTRATION...1

Guidance on Using Scanning Software: Part 5. Epson Scan

BOOK BUILDING. for beginners. Lightroom Tutorial by Mark Galer

What can Photoshop's Bridge do for me?

Recitation 2 Introduction to Photoshop

Version 4.2 For WINDOWS

Shutter Stream Software V 5.0 User Guide

Module 1G: Creating a Circle-Based Cylindrical Sheet-metal Lateral Piece with an Overlaying Lateral Edge Seam And Dove-Tail Seams on the Top Edge

Photoshop: a Beginner s course. by: Charina Ong Centre for Development of Teaching and Learning National University of Singapore

User Guide of ISCapture

ID Photo Processor. Batch photo processing. User Guide

Veco User Guides. Property Photos & Images

Training Guide for Carl Zeiss AxioZoom V16 Stereo Microscope

digitization station DIGITAL SCRAPBOOKING 120 West 14th Street

1 ImageBrowser Software User Guide 5.1

Chapter 16: Batch Scanning

How To Resize & Crop Images to 1024 x 768 Pixels For Projection

Module 1C: Adding Dovetail Seams to Curved Edges on A Flat Sheet-Metal Piece

Apple Photos Quick Start Guide

Using the AmScope Microscope Cameras

CHROMACAL User Guide (v 1.1) User Guide

WORKFLOW GUIDE. Trimble TX8 3D Laser Scanner Camera and Nodal Ninja R1w/RD5 Bracket Kit

Mid_Term_Review_PhotoShop_Design Test B Name

Micro-Image Capture 8 Installation Instructions & User Guide

Scanning Procedure Using SilverFast Ai Software (6.6.1r2b) 1

Chroma Mask. Manual. Chroma Mask. Manual

Color and More. Color basics

Extending the Dynamic Range of Film

Working With Drawing Views-I

Olympus Digital Microscope Camera (DP70) checklist

Shutter Stream 360 Software V 5.0 User Guide

Resizing for ACCC Competition. Rev 1.0 9/12/2011

Photoshop CC Editing Images

Digital Photo Guide. Version 8

ENGINEERING CO., LTD.

Kitchen and Bath Design Tutorial

For customers in USA This device complies with Part 15 of the FCC rules. Operation is subject to the following two conditions:

The Basics of Focus Stacking. by Michael K. Miller

Go Daddy Online Photo Filer

Using Photoshop Elements

ColorCode 3-D Editor Version 1.2 Manual. Make ColorCode 3-D, Auto 3-D and Standard 3-D images on your PC by ColorCode 3-D, Denmark!!!

Transcription:

Stitching distortion-free mosaic images for QWA using PTGui Georg von Arx

Index A. Introduction and overview... 2 B. Taking microscopic images... 2 C. Installing PTGui... 3 D. Initial Setup... 3 E. Preparing and executing stitching projects... 4 F. Batch stitching multiple mosaic images... 9 G. Correcting registration errors... 10 H. Eliminating distortions in single images... 13 I. Determining the spatial resolution... 13 J. Image cropping... 14 K. Finding help... 14 A. INTRODUCTION AND OVERVIEW PTGui (www.ptgui.com) is an affordable 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 also a great tool for creating mosaic images of microscopic anatomical samples. Usually, the entire process is done fully automatic, and batch processing of created project files is available to enhance efficiency. Problematic samples can be manually edited if needed. A great advantage of PTGui is the correction of distortions caused by some microscope and camera lenses (plan-type objectives are distortion-free!). Accordingly, one micrometer in the center of the mosaic image will be represented by the same number of pixels at the edges of the mosaic image. This is particularly valuable to avoid biases in quantitative image analysis. I find PTGui very efficient and reliable compared to other stitching software I have evaluated, also for large mosaic images (composed of >100 individual images) A very similar tool in terms of efficiency, reliability and quality of output is Autopano (www.kolor.com). Please also note that using a slide scanner is nowadays the best choice, if available, because it directly and extremely fast produces an image of the entire anatomical sample in a very high quality. B. TAKING MICROSCOPIC IMAGES Make sure individual images overlap by at least 15-25% in angiosperm and 30% in conifer samples Avoid rotation of the sample while shifting it on the light or object table. Use a X/Y-stage! Keep all microscope and camera settings constant for all your project. v3.0 21 February 2017 2 / 14

C. INSTALLING PTGUI 1. Download full [licensed] version from: 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. Recommended: download Smartblend-plugin 1 from: www.ptgui.com/plugins.html. 5. Recommended: unzip the Smartblend-plugin folder and move it inside the PTGui program folder. 6. You may want to create a desktop shortcut for PTGui and for the batch stitcher (RunStitcher.exe within PTGui program folder). D. INITIAL SETUP Navigate to Tools > Options 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. 1 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). v3.0 21 February 2017 3 / 14

Plugins tab: Recommended: Smartblend: browse to the folder containing smartblend.exe and select it. E. PREPARING AND EXECUTING STITCHING PROJECTS 1. Launch PTGui 2. On first run only: push the Advanced-button to show full program menu 3. Load all images of the first stitching project (1. Load images in Project Assistant tab) 4. On first run only: Camera / lens data (EXIF)-window pops up; push Cancel 2 Option Automatic (use EXIF data from camera, if available) should be unchecked! 2 The optics used in the microscope setup differs from the EXIF data (EXchangeable Image Format extension containing the camera settings that were used to take the picture); it is misleading PTGui. v3.0 21 February 2017 4 / 14

5. On first run only: Set Focal length to a large number such as 10,000 to 200,000 and Focal length multiplier to 1 3 6. Create a preview of the stitched image (2. Align images ) See G. CORRECTING REGISTRATION ERRORS for trouble-shooting unsuccessful registration 3 PTGui assumes that all images are taken from a fixed position and images were taken by rotating the camera relative to the captured object (e.g. as when using a tripod).. In the case of microscopic images, the sample is shifted under the microscope for each image, i.e. the camera is always perpendicular to the sample ( orthographic projection ). By setting the focal length to a large value, the rotation assumed by PTGui is reduced to <1, which virtually eliminates any spatial contraction by PTGui, resulting in a flat stitch. See also: www.ptgui.com/support.html#5_5 v3.0 21 February 2017 5 / 14

7. Go to the Optimizer tab and select Simple mode a) On first run only: Deselect Optimize lens field of view b) On first run only: Minimize lens distortion: select Heavy + lens shift c) Push Run Optimizer d) The Optimizer Results window pops up; hopefully it states a very good statistics; push OK 8. Recommended: improve the quality of the stitched mosaic image: 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); push Run Optimizer e) Cycle through a)-d) until you get satisfying statistics (e.g. Average: <0.8, Maximum: <2.0) v3.0 21 February 2017 6 / 14

9. Optional: If you still are not satisfied with the results, follow the instructions in G. CORRECTING REGISTRATION ERRORS. 10. Optional: crop/trim and rotate the mosaic image a) Select or open (CTRL + E) the Panorama Editor window b) Drag vertical and horizontal image edges with left mouse button; yellow lines show the applied trimming c) Hold down the right mouse button to rotate image In linear anatomical samples (e.g. from an increment cores) you may want to rotate the image until the ring borders are aligned horizontally 11. Go to the Create Panorama tab a) Push Set optimum size button to obtain mosaic image with same resolution/detail. b) On first run only: Choose an appropriate File Format and compression option in Settings (100% for JPG) c) On first run only: Blend using > Smartblend plugin d) On first run only: Output file > Use default v3.0 21 February 2017 7 / 14

The maximum image dimension for JPG output is 25,000 pixels in any direction. Other file formats (e.g. TIFF) support larger mosaic images. For ROXAS analysis, the input image should not be larger than 32,768 pixels (corresponding to integer data type) in any dimension. Consider to create overlapping mosaic images to keep final image size within manageable limits. 12. On first run only: In main menu select File > Make Default Most settings will be automatically applied to future projects as default values, i.e. the steps introduced by On first run only are no more required. 13. Optional (only apply if using distortion-free plan-type lenses!): remove residual tiny distortion (cf. step 5) by resetting in the Lens Settings tab the a, b, c, d and e to 0. When asked, do not optimize the control points again! 14. a) To stitch the image now: Go to the Create Panorama tab and push Create Panorama-button b) To stitch the image later, together with other projects (more efficient! cf. G.BATCH STITCHING MULTIPLE MOSAIC IMAGES): In main menu select File > Save; name the project Saving the project even if stitched immediately (option (a)) is recommended because it allows later to check and reproduce the stitching settings v3.0 21 February 2017 8 / 14

F. BATCH STITCHING MULTIPLE MOSAIC IMAGES 1. Launch batch stitcher (RunStitcher.exe) or navigate in PTGui menu bar to Tools > Batch Stitcher 2. Add all projects (*.pts) you want to stitch; batch stitching initiates automatically Don t 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 v3.0 21 February 2017 9 / 14

G. CORRECTING REGISTRATION ERRORS Option 1: manually position orphaned images: 1. In the Panorama Editor window, select Mode > Edit individual images 2. Drag orphaned images to appropriate/corrected locations. 3. In the PTGui menu bar push Control Points > Generate Control Points for all images 4. Follow steps 7-14 in E. PREPARING AND EXECUTING STITCHING PROJECTS Option 2: retry image alignment with changed field of view settings 1. In the Project Assistant tab, Change the Focal length value to a smaller number (e.g. 1,000, 5,000 ; see step 5 in E. PREPARING AND EXECUTING STITCHING PROJECTS). 2. Follow steps 6-14 in E. PREPARING AND EXECUTING STITCHING PROJECTS v3.0 21 February 2017 10 / 14

Option 3: manually add control points If PTGui was unable to find control points for all images, you may try to add them manually In the example below images 0 and 9 are orphaned, while there are two clusters. Let s try to connect the clusters by linking image 4 and 5. 1. Select images 4 and 5 in the numbered tab and adjust the zoom level see a bit more detail v3.0 21 February 2017 11 / 14

2. Position the images to see the overlapping regions (common structures). Then click on a conspicuous point in the left hand image and on the corresponding point in the right hand image. Use the arrow keys for fine tuning Try to well distributed the control points over the overlapping images After adding two pairs of control points, the Auto Add feature will suggest the matching second point of a new pair of control points. Read in the PTGui help files for more detailed information about manually adding control points 3. After adding at least 3 pairs of control points, navigate to main menu Control Points > Generate Control Points for image 4 and 5 to automatically add additional control points based on your manual selection. 4. Repeat steps 1-3 for all unconnected images and image clusters. 5. Follow steps 7-14 in E. PREPARING AND EXECUTING STITCHING PROJECTS v3.0 21 February 2017 12 / 14

H. ELIMINATING DISTORTIONS IN SINGLE IMAGES The following trick removes distortions from single images. Note: You must have processed multi-image projects before applying the following procedure! In addition, the procedure has to be repeated for each optical setup. 1 st time: 1. Open a project with multiple 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 4. Load the image of a single-image sample 2 (1. Load images ) 5. Go to the Lens Settings tab and paste the values for a-c. Set d and e to 0 6. Go to the Create Panorama tab and push Set optimum size button 7. In main menu select File > Save; name the project 8. Optional: you may stitch the image now 9. Navigate to the project file and copy it to your standard folder for templates (cf. D. INITIAL SETUP) 10. Rename the copy of the project file that from now on will serve as a template for stitching single images into something sensible, e.g. Stitch_1_image.pts 2 nd and consecutive times: 1. Load the image of a single-image sample 2 (1. Load images ) 2. Go to File > Apply Template and choose the previously created template (e.g. Stitch_1_image) 3. Save the project or perform an instant stitching I. DETERMINING THE SPATIAL RESOLUTION For quantitative image analysis the spatial scale (pixels/unit) must be determined. While professional microscope-camera systems usually provide this information, there are two approaches for low-budget systems. Although approach 2 is more laborious, it will be more accurate and efficient in most cases. Approach 1: Spatial reference in each (mosaic) image 1. Capture images of your sample with the desired zoom factor 2. Create the mosaic image ( distortions removed) 3. Measure the extension (in pixels) of the spatial reference with a line measuring tool (e.g., using ImageJ) and calculate the pixels/unit conversion Approach 2: Using focal length of camera and stage micrometer 1. Capture two images of stage micrometer (microscope slide with a scale etched on the surface), one with the lowest and one the highest camera zoom level v3.0 21 February 2017 13 / 14

2. Stitch each of the single images to remove distortions (cf. H. ELIMINATING DISTORTIONS IN SINGLE IMAGES) 3. For each image, measure the distance (in pixels) of two distant divisions on the stage micrometer with a line measuring tool (e.g., using ImageJ). 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). J. IMAGE CROPPING You may want to crop the output images. I recommend using IrfanView (www.irfanview.com), because it can handle very large images and will not compress the cropped image (alternatively: Photoshop, ImageJ, Image Pro Plus, etc.). In IrfanView: Make sure the plugins package is installed, then: a) With left mouse, select crop area b) Options > JPG Lossless Crop (PlugIn) Re-opening and overwriting the cropped image file (File > Save as ) will make the image much smaller without losing any information. It seems that the stitched images still contain the information from overlapping planes of the individual images. K. FINDING HELP Check the help files and user-group (http://tech.groups.yahoo.com/group/panotoolsng) or the support/faq site (www.ptgui.com/support.html) for specific questions. PTGui has a steep learning curve! v3.0 21 February 2017 14 / 14