Software guide 3.20.0

820
The ORFEO Tool Box Software Guide Updated for OTB-3.20 OTB Development Team November 12, 2013 http://www.orfeo-toolbox.org e-mail: [email protected]

description

 

Transcript of Software guide 3.20.0

  • 1. The ORFEO Tool Box Software Guide Updated for OTB-3.20 OTB Development Team November 12, 2013 http://www.orfeo-toolbox.org e-mail: [email protected]

2. The ORFEO Toolbox is not a black box. Ch.D. 3. FOREWORD Beside the Pleiades (PHR) and Cosmo-Skymed (CSK) systems developments forming ORFEO, the dual and bilateral system (France - Italy) for Earth Observation, the ORFEO Accompaniment Program was set up, to prepare, accompany and promote the use and the exploitation of the images derived from these sensors. The creation of a preparatory program1 is needed because of: the new capabilities and performances of the ORFEO systems (optical and radar high resolu- tion, access capability, data quality, possibility to acquire simultaneously in optic and radar), the implied need of new methodological developments : new processing methods, or adapta- tion of existing methods, the need to realise those new developments in very close cooperation with the nal users for better integration of new products in their systems. This program was initiated by CNES mid-2003 and will last until mid 2013. It consists in two parts, between which it is necessary to keep a strong interaction: A Thematic part, A Methodological part. The Thematic part covers a large range of applications (civil and defence), and aims at specifying and validating value added products and services required by end users. This part includes consideration about products integration in the operational systems or processing chains. It also includes a careful thought on intermediary structures to be developed to help non-autonomous users. Lastly, this part aims at raising future users awareness, through practical demonstrations and validations. 1http://smsc.cnes.fr/PLEIADES/A prog accomp.htm 4. iv The Methodological part objective is the denition and the development of tools for the operational exploitation of the submetric optic and radar images (tridimensional aspects, changes detection, texture analysis, pattern matching, optic radar complementarities). It is mainly based on R&D studies and doctorate and post-doctorate researches. In this context, CNES2 decided to develop the ORFEO ToolBox (OTB), a set of algorithms encapsu- lated in a software library. The goals of the OTB is to capitalise a methological savoir faire in order to adopt an incremental development approach aiming to efciently exploit the results obtained in the frame of methodological R&D studies. All the developments are based on FLOSS (Free/Libre Open Source Software) or existing CNES developments. OTB is distributed under the CeCILL licence, http://www.cecill.info/licences/Licence_CeCILL_V2-en.html. OTB is implemented in C++ and is mainly based on ITK3 (Insight Toolkit). 2http://www.cnes.fr 3http://www.itk.org 5. CONTENTS I Introduction 1 1 Welcome 3 1.1 Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.2 How to Learn OTB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.3 Software Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.3.1 Obtaining the Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.4 Downloading OTB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.4.1 Join the Mailing List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.4.2 Directory Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.4.3 Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.4.4 Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.5 The OTB Community and Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.6 A Brief History of OTB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.6.1 ITKs history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2 Installation 11 2.1 Installing binary packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2.1.1 Windows 2000/XP/Vista/Seven . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2.1.2 MacOS X . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2.1.3 Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 6. vi CONTENTS Ubuntu 10.04 and higher . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 OpenSuse 11.X and higher . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 CentOS 5.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 2.2 Building from sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 2.2.1 Getting the OTB source code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 2.2.2 External Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 2.2.3 Conguring OTB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Preparing CMake . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Compiling OTB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 2.3 Getting Started With OTB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 2.3.1 Hello World ! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 3 System Overview 25 3.1 System Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 3.2 Essential System Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 3.2.1 Generic Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 3.2.2 Include Files and Class Denitions . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 3.2.3 Object Factories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 3.2.4 Smart Pointers and Memory Management . . . . . . . . . . . . . . . . . . . . . . . 28 3.2.5 Error Handling and Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 3.2.6 Event Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.2.7 Multi-Threading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 3.3 Numerics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 3.4 Data Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 3.5 Data Processing Pipeline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 3.6 Spatial Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 II Tutorials 37 4 Building Simple Applications with OTB 39 4.1 Hello world . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 4.2 Pipeline basics: read and write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 7. CONTENTS vii 4.3 Filtering pipeline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 4.4 Handling types: scaling output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 4.5 Working with multispectral or color images . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 4.6 Parsing command line arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 4.7 Viewer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 4.8 Going from raw satellite images to useful products . . . . . . . . . . . . . . . . . . . . . . . 56 III Users guide 61 5 Data Representation 63 5.1 Image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 5.1.1 Creating an Image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 5.1.2 Reading an Image from a File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 5.1.3 Accessing Pixel Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 5.1.4 Dening Origin and Spacing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 5.1.5 Accessing Image Metadata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 5.1.6 RGB Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 5.1.7 Vector Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 5.1.8 Importing Image Data from a Buffer . . . . . . . . . . . . . . . . . . . . . . . . . . 76 5.1.9 Image Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 5.2 PointSet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 5.2.1 Creating a PointSet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 5.2.2 Getting Access to Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 5.2.3 Getting Access to Data in Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 5.2.4 Vectors as Pixel Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 5.3 Mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 5.3.1 Creating a Mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 5.3.2 Inserting Cells . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 5.3.3 Managing Data in Cells . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 5.4 Path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 5.4.1 Creating a PolyLineParametricPath . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 8. viii CONTENTS 6 Reading and Writing Images 99 6.1 Basic Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 6.2 Pluggable Factories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 6.3 IO Streaming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 6.3.1 Implicit Streaming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 6.3.2 Explicit Streaming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 6.4 Reading and Writing RGB Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 6.5 Reading, Casting and Writing Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 6.6 Extracting Regions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 6.7 Reading and Writing Vector Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 6.7.1 Reading and Writing Complex Images . . . . . . . . . . . . . . . . . . . . . . . . . 111 6.8 Reading and Writing Multiband Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 6.8.1 Extracting ROIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 6.9 Reading Image Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 6.10 Extended lename for reader and writer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 6.10.1 Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 6.10.2 Reader options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 6.10.3 Writer options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 7 Reading and Writing Auxilary Data 123 7.1 Reading DEM Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 7.2 Elevation management with OTB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 7.3 Lidar data Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 7.4 Reading and Writing Shapeles and KML . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 7.5 Handling large vector data through OGR . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 8 Basic Filtering 139 8.1 Thresholding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 8.1.1 Binary Thresholding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 8.1.2 General Thresholding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 8.1.3 Threshold to Point Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146 8.2 Mathematical operations on images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 9. CONTENTS ix 8.3 Gradients . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 8.3.1 Gradient Magnitude . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150 8.3.2 Gradient Magnitude With Smoothing . . . . . . . . . . . . . . . . . . . . . . . . . 152 8.3.3 Derivative Without Smoothing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154 8.4 Second Order Derivatives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 8.4.1 Laplacian Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 Laplacian Filter Recursive Gaussian . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 8.5 Edge Detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 8.5.1 Canny Edge Detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 8.5.2 Ratio of Means Detector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 8.6 Neighborhood Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164 8.6.1 Mean Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164 8.6.2 Median Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 8.6.3 Mathematical Morphology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167 Binary Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168 Grayscale Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 8.7 Smoothing Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172 8.7.1 Blurring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 Discrete Gaussian . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 8.7.2 Edge Preserving Smoothing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175 Introduction to Anisotropic Diffusion . . . . . . . . . . . . . . . . . . . . . . . . . . 175 Gradient Anisotropic Diffusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 Mean Shift ltering and clustering . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 8.7.3 Edge Preserving Speckle Reduction Filters . . . . . . . . . . . . . . . . . . . . . . 180 8.7.4 Edge preserving Markov Random Field . . . . . . . . . . . . . . . . . . . . . . . . 183 8.8 Distance Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186 8.9 Rasterization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188 9 Image Registration 191 9.1 Registration Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191 9.2 Hello World Registration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192 9.3 Features of the Registration Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200 10. x CONTENTS 9.3.1 Direction of the Transform Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . 200 9.3.2 Registration is done in physical space . . . . . . . . . . . . . . . . . . . . . . . . . 202 9.4 Multi-Modality Registration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203 9.4.1 Viola-Wells Mutual Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203 9.5 Centered Transforms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208 9.5.1 Rigid Registration in 2D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208 9.5.2 Centered Afne Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213 9.6 Transforms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219 9.6.1 Geometrical Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219 9.6.2 Transform General Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222 9.6.3 Identity Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223 9.6.4 Translation Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224 9.6.5 Scale Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224 9.6.6 Scale Logarithmic Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226 9.6.7 Euler2DTransform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226 9.6.8 CenteredRigid2DTransform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227 9.6.9 Similarity2DTransform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229 9.6.10 QuaternionRigidTransform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230 9.6.11 VersorTransform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231 9.6.12 VersorRigid3DTransform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232 9.6.13 Euler3DTransform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232 9.6.14 Similarity3DTransform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233 9.6.15 Rigid3DPerspectiveTransform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234 9.6.16 AfneTransform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236 9.6.17 BSplineDeformableTransform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237 9.6.18 KernelTransforms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238 9.7 Metrics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239 9.7.1 Mean Squares Metric . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240 Exploring a Metric . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240 9.7.2 Normalized Correlation Metric . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241 9.7.3 Mean Reciprocal Square Differences . . . . . . . . . . . . . . . . . . . . . . . . . . 241 11. CONTENTS xi 9.7.4 Mutual Information Metric . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242 Parzen Windowing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242 Viola and Wells Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243 Mattes et al. Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244 9.7.5 Kullback-Leibler distance metric . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244 9.7.6 Normalized Mutual Information Metric . . . . . . . . . . . . . . . . . . . . . . . . 245 9.7.7 Mean Squares Histogram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245 9.7.8 Correlation Coefcient Histogram . . . . . . . . . . . . . . . . . . . . . . . . . . . 246 9.7.9 Cardinality Match Metric . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246 9.7.10 Kappa Statistics Metric . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246 9.7.11 Gradient Difference Metric . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247 9.8 Optimizers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247 9.9 Landmark-based registration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249 10 Disparity Map Estimation 255 10.1 Disparity Maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255 10.1.1 Geometric deformation modeling . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257 10.1.2 Similarity measures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259 10.1.3 The correlation coefcient . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261 10.2 Regular grid disparity map estimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261 10.3 Irregular grid disparity map estimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263 10.4 Stereo reconstruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269 11 Orthorectication and Map Projection 277 11.1 Sensor Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278 11.1.1 Types of Sensor Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278 11.1.2 Using Sensor Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279 11.1.3 Evaluating Sensor Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286 11.1.4 Limits of the Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288 11.2 Map Projections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288 11.3 Orthorectication with OTB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291 11.4 Vector data projection manipulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293 12. xii CONTENTS 11.5 Geometries projection manipulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294 11.6 Elevation management with OTB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296 11.7 Vector data area extraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298 12 Radiometry 301 12.1 Radiometric Indices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301 12.1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301 12.1.2 NDVI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302 12.1.3 ARVI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305 12.1.4 AVI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307 12.2 Atmospheric Corrections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309 13 Image Fusion 319 13.1 Simple Pan Sharpening . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319 13.2 Bayesian Data Fusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322 14 Feature Extraction 327 14.1 Textures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327 14.1.1 Haralick Descriptors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327 14.1.2 PanTex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330 14.1.3 Structural Feature Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331 14.2 Interest Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333 14.2.1 Harris detector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333 14.2.2 SIFT detector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336 14.2.3 SURF detector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340 14.3 Alignments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344 14.4 Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346 14.4.1 Line Detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346 14.4.2 Segment Extraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352 Local Hough Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352 Line Segment Detector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354 14.4.3 Right Angle Detector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356 14.5 Density Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358 13. CONTENTS xiii 14.5.1 Edge Density . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359 14.5.2 SIFT Density . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360 14.6 Geometric Moments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362 14.6.1 Complex Moments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362 Complex Moments for Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362 Complex Moments for Paths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363 14.6.2 Hu Moments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364 Hu Moments for Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365 14.6.3 Flusser Moments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366 Flusser Moments for Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366 14.7 Road extraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367 14.7.1 Road extraction lter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368 14.7.2 Step by step road extraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371 14.8 Cloud Detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377 15 Multi-scale Analysis 381 15.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381 15.2 Morphological Pyramid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381 15.2.1 Morphological Pyramid Exploitation . . . . . . . . . . . . . . . . . . . . . . . . . . 388 16 Image Segmentation 395 16.1 Region Growing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395 16.1.1 Connected Threshold . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396 16.1.2 Otsu Segmentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399 16.1.3 Neighborhood Connected . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403 16.1.4 Condence Connected . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406 16.2 Segmentation Based on Watersheds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409 16.2.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409 16.2.2 Using the ITK Watershed Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 412 16.3 Level Set Segmentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415 16.3.1 Fast Marching Segmentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417 17 Image Simulation 425 14. xiv CONTENTS 17.1 PROSAIL model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425 17.2 Image Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429 17.2.1 LAI image estimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429 17.2.2 Sensor RSR Image Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431 18 Dimension Reduction 443 18.1 Principal Component Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443 18.2 Noise-Adjusted Principal Components Analysis . . . . . . . . . . . . . . . . . . . . . . . . 445 18.3 Maximum Noise Fraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447 18.4 Fast Independant Component Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 450 18.5 Maximum Autocorrelation Factor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452 19 Classication 455 19.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455 19.2 Unsupervised classication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455 19.2.1 K-Means Classication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455 Simple version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455 General approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459 k-d Tree Based k-Means Clustering . . . . . . . . . . . . . . . . . . . . . . . . . . . 461 19.2.2 Kohonens Self Organizing Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466 Building a color table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467 SOM Classication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471 Multi-band, streamed classication . . . . . . . . . . . . . . . . . . . . . . . . . . . 474 19.2.3 Bayesian Plug-In Classier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475 19.2.4 Expectation Maximization Mixture Model Estimation . . . . . . . . . . . . . . . . . 480 19.2.5 Statistical Segmentations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484 Stochastic Expectation Maximization . . . . . . . . . . . . . . . . . . . . . . . . . . 484 19.2.6 Classication using Markov Random Fields . . . . . . . . . . . . . . . . . . . . . . 487 ITK framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487 OTB framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 492 19.3 Supervised classication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 501 19.3.1 Generic machine learning framework . . . . . . . . . . . . . . . . . . . . . . . . . 501 15. CONTENTS xv 19.3.2 An example of supervised classication method: Support Vector Machines . . . . . 502 SVM general description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 502 SVM mathematical formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 502 19.3.3 Learning from samples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504 19.3.4 Learning from images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 506 19.3.5 Multi-band, streamed classication . . . . . . . . . . . . . . . . . . . . . . . . . . . 508 19.3.6 Generic Kernel SVM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 509 Learning with User Dened Kernels . . . . . . . . . . . . . . . . . . . . . . . . . . . 510 Classication with user dened kernel . . . . . . . . . . . . . . . . . . . . . . . . . . 512 19.4 Fusion of Classication maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 513 19.4.1 General approach of image fusion . . . . . . . . . . . . . . . . . . . . . . . . . . . 513 19.4.2 Majority voting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 513 General description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 513 An example of majority voting fusion . . . . . . . . . . . . . . . . . . . . . . . . . . 513 19.4.3 Dempster Shafer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 514 General description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 514 Mathematical formulation of the combination algorithm . . . . . . . . . . . . . . . . 515 An example of Dempster Shafer fusion . . . . . . . . . . . . . . . . . . . . . . . . . 515 19.5 Classication map regularization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517 20 Object-based Image Analysis 521 20.1 From Images to Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 522 20.2 Object Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 523 20.3 Object Filtering based on radiometric and statistics attributes . . . . . . . . . . . . . . . . . . 525 20.4 Hoover metrics to compare segmentations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 528 21 Change Detection 531 21.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 531 21.1.1 Surface-based approaches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 532 21.2 Change Detection Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 533 21.3 Simple Detectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 536 21.3.1 Mean Difference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 536 16. xvi CONTENTS 21.3.2 Ratio Of Means . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 539 21.4 Statistical Detectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 542 21.4.1 Distance between local distributions . . . . . . . . . . . . . . . . . . . . . . . . . . 542 21.4.2 Local Correlation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 544 21.5 Multi-Scale Detectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 547 21.5.1 Kullback-Leibler Distance between distributions . . . . . . . . . . . . . . . . . . . 547 21.6 Multi-components detectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 549 21.6.1 Multivariate Alteration Detector . . . . . . . . . . . . . . . . . . . . . . . . . . . . 549 22 Geospatial analysis 553 22.1 Reading from and Writing to Geospatial DBs . . . . . . . . . . . . . . . . . . . . . . . . . . 553 23 Hyperspectral 555 23.1 Unmixing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 556 23.1.1 Linear mixing model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 556 23.1.2 Simplex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 558 23.1.3 State of the art unmixing algorithms selection . . . . . . . . . . . . . . . . . . . . . 559 Family 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 559 Family 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 559 Family 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 561 Further remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 561 Basic hyperspectral unmixing example . . . . . . . . . . . . . . . . . . . . . . . . . 562 23.2 Dimensionality reduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 563 23.3 Anomaly detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 564 24 Image Visualization and output 569 24.1 Viewer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 569 24.2 Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 570 24.2.1 Grey Level Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 570 24.2.2 Multiband Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 572 24.2.3 Indexed Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 573 24.2.4 Altitude Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 574 17. CONTENTS xvii 25 Online data 579 25.1 Name to Coordinates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 579 25.2 Open Street Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 580 IV Developers guide 585 26 Iterators 587 26.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 587 26.2 Programming Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 588 26.2.1 Creating Iterators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 588 26.2.2 Moving Iterators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 588 26.2.3 Accessing Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 590 26.2.4 Iteration Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 591 26.3 Image Iterators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 592 26.3.1 ImageRegionIterator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 592 26.3.2 ImageRegionIteratorWithIndex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 594 26.3.3 ImageLinearIteratorWithIndex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 596 26.4 Neighborhood Iterators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 598 26.4.1 NeighborhoodIterator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 604 Basic neighborhood techniques: edge detection . . . . . . . . . . . . . . . . . . . . . 604 Convolution ltering: Sobel operator . . . . . . . . . . . . . . . . . . . . . . . . . . 607 Optimizing iteration speed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 608 Separable convolution: Gaussian ltering . . . . . . . . . . . . . . . . . . . . . . . . 610 Random access iteration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 611 26.4.2 ShapedNeighborhoodIterator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 613 Shaped neighborhoods: morphological operations . . . . . . . . . . . . . . . . . . . . 615 27 Image Adaptors 619 27.1 Image Casting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 620 27.2 Adapting RGB Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 622 27.3 Adapting Vector Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 624 27.4 Adaptors for Simple Computation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 626 18. xviii CONTENTS 27.5 Adaptors and Writers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 628 28 Streaming and Threading 629 28.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 629 28.2 Streaming and threading in OTB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 629 28.3 Division strategies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 630 29 How To Write A Filter 631 29.1 Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 631 29.2 Overview of Filter Creation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 632 29.3 Streaming Large Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 633 29.3.1 Overview of Pipeline Execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . 634 29.3.2 Details of Pipeline Execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 636 UpdateOutputInformation() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 636 PropagateRequestedRegion() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 637 UpdateOutputData() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 638 29.4 Threaded Filter Execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 638 29.5 Filter Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 639 29.5.1 Optional . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 640 29.5.2 Useful Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 640 29.6 How To Write A Composite Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 641 29.6.1 Implementing a Composite Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . 641 29.6.2 A Simple Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 642 30 Persistent lters 647 30.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 647 30.2 Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 647 30.2.1 The persistent lter class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 648 30.2.2 The streaming decorator class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 648 30.3 An end-to-end example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 649 30.3.1 First step: writing a persistent lter . . . . . . . . . . . . . . . . . . . . . . . . . . . 649 30.3.2 Second step: Decorating the lter and using it . . . . . . . . . . . . . . . . . . . . . 651 30.3.3 Third step: one class to rule them all . . . . . . . . . . . . . . . . . . . . . . . . . . 651 19. CONTENTS xix 31 How to write an application 653 31.1 Application design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 653 31.2 Architecture of the class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 654 31.2.1 DoInit() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 654 31.2.2 DoUpdateParameters() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 654 31.2.3 DoExecute() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 654 31.2.4 Parameters selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 655 31.2.5 Parameters description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 656 31.3 Compile your application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 656 31.4 Execute your application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 657 31.5 Testing your application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 657 31.6 Application Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 657 V Appendix 661 32 Frequently Asked Questions 663 32.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 663 32.1.1 What is OTB? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 663 32.1.2 What is ORFEO? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 664 Where can I get more information about ORFEO? . . . . . . . . . . . . . . . . . . . 664 32.1.3 What is the ORFEO Accompaniment Program? . . . . . . . . . . . . . . . . . . . . 664 Where can I get more information about the ORFEO Accompaniment Program? . . . 665 32.1.4 Who is responsible for the OTB development? . . . . . . . . . . . . . . . . . . . . . 665 32.2 Licence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 665 32.2.1 Which is the OTB licence? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 665 32.2.2 If I write an application using OTB am I forced to distribute that application? . . . . 666 32.2.3 If I write an application using OTB am I forced to contribute the code into the ofcal repositories?666 32.2.4 If I wanted to distribute an application using OTB what license would I need to use? 666 32.2.5 I am a commercial user. Is there any restriction on the use of OTB? . . . . . . . . . . 666 32.3 Getting OTB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 666 32.3.1 Who can download the OTB? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 666 32.3.2 Where can I download the OTB? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 666 20. xx CONTENTS 32.3.3 How to get the latest bleeding-edge version? . . . . . . . . . . . . . . . . . . . . . . 667 32.4 Compiling and installing OTB from source . . . . . . . . . . . . . . . . . . . . . . . . . . . 667 32.4.1 Which platforms are supported? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 667 32.4.2 Which libraries/packages are needed before compiling and installing OTB? . . . . . 667 32.4.3 Main steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 669 Unix/Linux Platforms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 669 Microsoft Visual Studio (Express 2008/Express 2010) . . . . . . . . . . . . . . . . . 671 32.4.4 Specic platform issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 671 Visual Studio 2010/Express 2010 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 671 MacOSX 10.6 Snow Leopard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 671 Debian Linux / Ubuntu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 671 32.5 Using OTB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 672 32.5.1 Where to start ? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 672 32.5.2 What is the image size limitation of OTB ? . . . . . . . . . . . . . . . . . . . . . . 672 32.6 Getting help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 673 32.6.1 Is there any mailing list? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 673 32.6.2 Which is the main source of documentation? . . . . . . . . . . . . . . . . . . . . . . 673 32.7 Contributing to OTB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 673 32.7.1 I want to contribute to OTB, where to begin? . . . . . . . . . . . . . . . . . . . . . 673 32.7.2 What are the benets of contributing to OTB? . . . . . . . . . . . . . . . . . . . . . 674 32.7.3 What functionality can I contribute? . . . . . . . . . . . . . . . . . . . . . . . . . . 674 32.8 Running the tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 674 32.8.1 What are the tests? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 674 32.8.2 How to run the tests? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 675 32.8.3 How to get the test data? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 675 32.8.4 How to submit the results? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 676 32.9 OTBs Roadmap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 676 32.9.1 Which will be the next version of OTB? . . . . . . . . . . . . . . . . . . . . . . . . 676 What is a major version? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 676 What is a minor version? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 676 What is a bugx version? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 677 21. CONTENTS xxi 32.9.2 When will the next version of OTB be available? . . . . . . . . . . . . . . . . . . . 677 32.9.3 What features will the OTB include and when? . . . . . . . . . . . . . . . . . . . . 677 33 Release Notes 679 34 Wrappings to other languages 733 34.1 OTB-Wrapping: bindings to Java language . . . . . . . . . . . . . . . . . . . . . . . . . . . 733 34.1.1 Mangling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 733 34.1.2 How to Use OTB-Wrapping in Java . . . . . . . . . . . . . . . . . . . . . . . . . . 734 Import OTB classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 734 Compile Java programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 734 Java programs execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 735 34.1.3 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 736 34.1.4 Use OTB-Wrapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 737 Download sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 737 Required Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 737 Compile OTB-Wrapping sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 737 Download binaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 738 Use OTB-Wrapping with Eclipse . . . . . . . . . . . . . . . . . . . . . . . . . . . . 738 34.2 Java tutorials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 738 34.2.1 Hello World . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 738 34.2.2 Pipeline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 739 34.2.3 Filtering pipeline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 739 34.2.4 Smarter Filtering Pipeline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 740 34.2.5 Scaling Pipeline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 742 34.2.6 MultiSpectral . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 743 34.2.7 OrthoFusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 745 34.3 Python tutorials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 748 34.3.1 Hello World . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 748 34.3.2 Pipeline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 749 34.3.3 Filtering pipeline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 749 34.3.4 Smarter Filtering Pipeline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 750 22. xxii CONTENTS 34.3.5 Scaling Pipeline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 752 34.3.6 MultiSpectral . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 753 34.4 Developer Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 756 34.4.1 Add a new Library : Creating a new CMakeList.txt le . . . . . . . . . . . . . . . . 756 34.4.2 Add a new cmake le . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 756 A simple Example : otb::StreamingShrinkImageFilter . . . . . . . . . . . . . . . . . 757 34.4.3 Predened Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 757 OTB-Wrapping predened variables . . . . . . . . . . . . . . . . . . . . . . . . . . . 758 OTB-Wrapping predened lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 758 Macro MANGLE NAME . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 760 34.4.4 HTML JavaDoc generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 760 Generate JavaDoc documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 760 Generate JavaDoc while compilation . . . . . . . . . . . . . . . . . . . . . . . . . . 761 35 Contributors 763 Index 777 23. LIST OF FIGURES 2.1 Cmake user interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 5.1 OTB Image Geometrical Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 5.2 PointSet with Vectors as PixelType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 6.1 Collaboration diagram of the ImageIO classes . . . . . . . . . . . . . . . . . . . . . . . . . . 101 6.2 Use cases of ImageIO factories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 6.3 Class diagram of ImageIO factories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 6.4 Initial SPOT 5 image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 6.5 ROI of a SPOT5 image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 7.1 DEM To Image generator Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 7.2 Image from lidar data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 8.1 BinaryThresholdImageFilter transfer function . . . . . . . . . . . . . . . . . . . . . . . . . . 140 8.2 BinaryThresholdImageFilter output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142 8.3 ThresholdImageFilter using the threshold-below mode. . . . . . . . . . . . . . . . . . . . . . 142 8.4 ThresholdImageFilter using the threshold-above mode . . . . . . . . . . . . . . . . . . . . . 143 8.5 ThresholdImageFilter using the threshold-outside mode . . . . . . . . . . . . . . . . . . . . . 143 8.6 Band Math . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 8.7 GradientMagnitudeImageFilter output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 24. xxiv List of Figures 8.8 GradientMagnitudeRecursiveGaussianImageFilter output . . . . . . . . . . . . . . . . . . . . 153 8.9 Effect of the Derivative lter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 8.10 Output of the RecursiveGaussianImageFilter. . . . . . . . . . . . . . . . . . . . . . . . . . . 159 8.11 Output of the LaplacianRecursiveGaussianImageFilter. . . . . . . . . . . . . . . . . . . . . . 160 8.12 CannyEdgeDetectorImageFilter output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 8.13 Touzi Edge Detector Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164 8.14 Effect of the MedianImageFilter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 8.15 Effect of the Median lter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168 8.16 Effect of erosion and dilation in a binary image. . . . . . . . . . . . . . . . . . . . . . . . . . 170 8.17 Effect of erosion and dilation in a grayscale image. . . . . . . . . . . . . . . . . . . . . . . . 172 8.18 DiscreteGaussianImageFilter Gaussian diagram. . . . . . . . . . . . . . . . . . . . . . . . . . 173 8.19 DiscreteGaussianImageFilter output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175 8.20 GradientAnisotropicDiffusionImageFilter output . . . . . . . . . . . . . . . . . . . . . . . . 178 8.21 Mean Shift . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180 8.22 Lee Filter Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 8.23 Frost Filter Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 8.24 MRF restauration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186 8.25 DanielssonDistanceMapImageFilter output . . . . . . . . . . . . . . . . . . . . . . . . . . . 187 8.26 Rasterized SRTM water bodies near Arcachon, France. . . . . . . . . . . . . . . . . . . . . . 190 9.1 Image Registration Concept . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191 9.2 Registration Framework Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192 9.3 Fixed and Moving images in registration framework . . . . . . . . . . . . . . . . . . . . . . . 197 9.4 HelloWorld registration output images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198 9.5 Pipeline structure of the registration example . . . . . . . . . . . . . . . . . . . . . . . . . . 199 9.6 Registration Coordinate Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201 9.7 Multi-Modality Registration Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207 9.8 Multi-Modality Registration outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208 9.9 Rigid2D Registration input images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212 9.10 Rigid2D Registration output images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212 9.11 Rigid2D Registration input images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214 9.12 Rigid2D Registration output images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214 25. List of Figures xxv 9.13 AfneTransform registration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218 9.14 AfneTransform output images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219 9.15 Geometrical representation objects in ITK . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219 9.16 Parzen Windowing in Mutual Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243 9.17 Class diagram of the Optimizer hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247 9.18 Estimation of afne transformation using least square optimisation from SIFT points . . . . . 253 10.1 Estimation of the correlation surface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260 10.2 Deformation eld and resampling from ne registration . . . . . . . . . . . . . . . . . . . . . 263 10.3 Deformation eld and resampling from disparity map estimation . . . . . . . . . . . . . . . . 270 10.4 From stereo pair to elevation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276 11.1 Image Ortho-registration Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277 12.1 ARVI Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305 12.2 ARVI Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307 12.3 AVI Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310 13.1 Simple pan-sharpening . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320 13.2 Pan sharpening . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321 13.3 Bayesian Data Fusion Example inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324 13.4 Bayesian Data Fusion results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325 14.1 Results of applying Haralick contrast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330 14.2 PanTex Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331 14.3 Right Angle Detection Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334 14.4 Harris Filter Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335 14.5 SIFT Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340 14.6 SURF Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344 14.7 Alignment Detection Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346 14.8 Line Ratio Detector Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348 14.9 Line Correlation Detector Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351 14.10Line Correlation Detector Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353 26. xxvi List of Figures 14.11Line Correlation Detector Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354 14.12LSD Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356 14.13Right Angle Detection Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358 14.14Edge Density Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360 14.15SIFT Density Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362 14.16Road extraction lter application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371 14.17Spectral Angle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372 14.18Road extraction lter application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376 14.19Road extraction lter application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376 14.20Cloud Detection Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379 15.1 Morphological pyramid analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385 15.2 Morphological pyramid analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385 15.3 Morphological pyramid analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385 15.4 Morphological pyramid analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385 15.5 Morphological pyramid analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386 15.6 Morphological pyramid analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386 15.7 Morphological pyramid analysis and synthesis . . . . . . . . . . . . . . . . . . . . . . . . . . 389 15.8 Morphological pyramid analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391 16.1 ConnectedThreshold segmentation results . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398 16.2 OtsuThresholdImageFilter output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400 16.3 OtsuThresholdImageFilter output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402 16.4 NeighborhoodConnectedThreshold segmentation results . . . . . . . . . . . . . . . . . . . . 405 16.5 CondenceConnected segmentation results . . . . . . . . . . . . . . . . . . . . . . . . . . . 409 16.6 Watershed Catchment Basins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 410 16.7 Watersheds Hierarchy of Regions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411 16.8 Watersheds lter composition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411 16.9 Watershed segmentation output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414 16.10Zero Set Concept . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415 16.11Grid position of the embedded level-set surface. . . . . . . . . . . . . . . . . . . . . . . . . . 416 16.12FastMarchingImageFilter collaboration diagram . . . . . . . . . . . . . . . . . . . . . . . . . 417 27. List of Figures xxvii 16.13FastMarchingImageFilter intermediate output . . . . . . . . . . . . . . . . . . . . . . . . . . 423 16.14FastMarchingImageFilter segmentations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424 17.1 LAIFromNDVIImageTransform Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430 18.1 PCA Filter (forward trasnformation) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445 18.2 PCA Filter (forward trasnformation) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448 18.3 PCA Filter (forward trasnformation) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 450 18.4 PCA Filter (forward trasnformation) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453 18.5 Maximum Autocorrelation Factor results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454 19.1 Output of the KMeans classier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458 19.2 Two normal distributions plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463 19.3 Kohonens Self Organizing Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466 19.4 SOM Image Classication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471 19.5 SOM Image Classication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 474 19.6 Bayesian plug-in classier for two Gaussian classes . . . . . . . . . . . . . . . . . . . . . . . 476 19.7 SEM Classication results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487 19.8 Output of the ScalarImageMarkovRandomField . . . . . . . . . . . . . . . . . . . . . . . . . 492 19.9 OTB Markov Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 493 19.10MRF restauration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 496 19.11MRF restauration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 497 19.12MRF restauration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 500 19.13MRF restauration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 501 20.1 Image to Label Object Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 523 20.2 Object based extraction based on . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 527 21.1 Spot Images for Change Detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 537 21.2 Difference Change Detection Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 539 21.3 Radarsat Images for Change Detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 540 21.4 Ratio Change Detection Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 541 21.5 Kullback-Leibler Change Detection Results . . . . . . . . . . . . . . . . . . . . . . . . . . . 544 28. xxviii List of Figures 21.6 ERS Images for Change Detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 545 21.7 Correlation Change Detection Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 547 21.8 Kullback-Leibler prole Change Detection Results . . . . . . . . . . . . . . . . . . . . . . . 549 21.9 Multivariate Alteration Detection Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . 551 23.1 Hyperspectral cube . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 555 23.2 Linear mixing model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 556 23.3 Decomposition of the LMM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 556 23.4 Hyperspectral cube vectorization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 557 23.5 Simplex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 558 23.6 Unmixing Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 564 23.7 Concept of detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 565 23.8 Anomaly detection block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 566 23.9 Sliding window and parameters denitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 567 24.1 Image visualization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 571 24.2 Scaling images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 572 24.3 Scaling images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 574 24.4 Scaling images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 575 24.5 Grayscale to color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 576 24.6 Hill shading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 577 25.1 Open street map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 583 26.1 ITK image iteration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 589 26.2 Copying an image subregion using ImageRegionIterator . . . . . . . . . . . . . . . . . . . . 595 26.3 Using the ImageRegionIteratorWithIndex . . . . . . . . . . . . . . . . . . . . . . . . . . . . 596 26.4 Neighborhood iterator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 599 26.5 Some possible neighborhood iterator shapes . . . . . . . . . . . . . . . . . . . . . . . . . . . 600 26.6 Sobel edge detection results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 607 26.7 Gaussian blurring by convolution ltering . . . . . . . . . . . . . . . . . . . . . . . . . . . . 612 26.8 Finding local minima . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 613 26.9 Binary image morphology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 618 29. List of Figures xxix 27.1 ImageAdaptor concept . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 620 27.2 Image Adaptor for performing computations . . . . . . . . . . . . . . . . . . . . . . . . . . . 627 29.1 Relationship between DataObjects and ProcessObjects . . . . . . . . . . . . . . . . . . . . . 632 29.2 The Data Pipeline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 634 29.3 Sequence of the Data Pipeline updating mechanism . . . . . . . . . . . . . . . . . . . . . . . 635 29.4 Composite Filter Concept . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 641 29.5 Composite Filter Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 642 30. LIST OF TABLES 2.1 Available installation procedures with respect to system conguration and target usage . . . . 12 9.1 Geometrical Elementary Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220 9.2 Identity Transform Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223 9.3 Translation Transform Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224 9.4 Scale Transform Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225 9.5 Scale Logarithmic Transform Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . 226 9.6 Euler2D Transform Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227 9.7 CenteredRigid2D Transform Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . 228 9.8 Similarity2D Transform Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229 9.9 QuaternionRigid Transform Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . 230 9.10 Versor Transform Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231 9.11 Versor Rigid3D Transform Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232 9.12 Euler3D Transform Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233 9.13 Similarity3D Transform Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234 9.14 Rigid3DPerspective Transform Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . 235 9.15 Afne Transform Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236 9.16 BSpline Deformable Transform Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . 237 10.1 Characterization of the geometric deformation sources . . . . . . . . . . . . . . . . . . . . . 257 10.2 Approaches to image registration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258 31. xxxii List of Tables 12.1 Vegetation indices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302 12.2 Soil indices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302 12.3 Water indices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303 12.4 Built-up indices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303 14.1 Haralick features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328 16.1 ConnectedThreshold example parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398 16.2 NeighborhoodConnectedThreshold example parameters . . . . . . . . . . . . . . . . . . . . . 405 16.3 ConnectedThreshold example parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409 16.4 FastMarching segmentation example parameters . . . . . . . . . . . . . . . . . . . . . . . . . 422 32.1 Libraries used in the OTB. In the column Where, the default behavior during the conguration of OTB is indicated by when the 34.1 Mangling of the basic types used. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 734 34.2 Mangling of the usually types used. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 734 34.3 C++ code translation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 736 32. Part I Introduction 33. CHAPTER ONE WELCOME Welcome to the ORFEO ToolBox (OTB) Software Guide. This document presents the essential concepts used in OTB. It will guide you through the road of learning and using OTB. The Doxygen documentation for the OTB application programming interface is available on line at http://orfeo-toolbox.sourceforge.net/Doxygen/html. 1.1 Organization This software guide is divided into several parts, each of which is further divided into several chap- ters. Part I is a general introduction to OTB, within the next chaptera description of how to install the ORFEO Toolbox on your computer. Part I also introduces basic system concepts such as an overview of the system architecture, and how to build applications in the C++ programming language. Part II is a short guide with gradual difculty to get you start programming with OTB. Part III describes the system from the user point of view. Dozens of examples are used to illustrate important system features. Part IV is for the OTB developer. It explains how to create your own classes and extend the system. 1.2 How to Learn OTB There are two broad categories of users of OTB. First are class developers, those who create classes in C++. The second, users, employ existing C++ classes to build applications. Class developers must be procient in C++, and if they are extending or modifying OTB, they must also be familiar with OTBs internal structures and design (material covered in Part IV). The key to learning how to use OTB is to become familiar with its palette of objects and the ways of combining them. We recommend that you learn the system by studying the examples and then, if you are a class developer, study the source code. Start by the rst few tutorials in Part II to get 34. 4 Chapter 1. Welcome familiar with the build process and the general program organization, follow by reading Chapter 3, which provides an overview of some of the key concepts in the system, and then review the exam- ples in Part III. You may also wish to compile and run the dozens of examples distributed with the source code found in the directory OTB/Examples. (Please see the le OTB/Examples/README.txt for a description of the examples contained in the various subdirectories.) There are also several hundreds of tests found in the source distribution in OTB/Testing/Code, most of which are mini- mally documented testing code. However, they may be useful to see how classes are used together in OTB, especially since they are designed to exercise as much of the functionality of each class as possible. 1.3 Software Organization The following sections describe the directory contents, summarize the software functionality in each directory, and locate the documentation and data. 1.3.1 Obtaining the Software Periodic releases of the software are available on the OTB Web site. These ofcial releases are available a few times a year and announced on the ORFEO Web pages and mailing lists. This software guide assumes that you are working with the latest ofcial OTB release (available on the OTB Web site). 1.4 Downloading OTB OTB can be downloaded without cost from the following web site: http://www.orfeo-toolbox.org/ In order to track the kind of applications for which OTB is being used, you will be asked to complete a form prior to downloading the software. The information you provide in this form will help developers to get a better idea of the interests and skills of the toolkit users. Once you ll out this form you will have access to the download page. This page can be book marked to facilitate subsequent visits to the download site without having to complete any form again. Then choose the tarball that better ts your system. The options are .zip and .tgz les. The rst type is better suited for MS-Windows while the second one is the preferred format for UNIX systems. 35. 1.4. Downloading OTB 5 Once you unzip or untar the le, a directory called OTB will be created in your disk and you will be ready for starting the conguration process described in Section 2.2.3 on page 18. You can also get the current version following instructions in Section 32.3.3, on page 667. 1.4.1 Join the Mailing List It is strongly recommended that you join the users mailing list. This is one of the primary resources for guidance and help regarding the use of the toolkit. You can subscribe to the users list online at http://groups.google.com/group/otb-users The otb-users mailing list is also the best mechanism for expressing your opinions about the toolbox and to let developers know about features that you nd useful, desirable or even unnecessary. OTB developers are committed to creating a self-sustaining open-source OTB community. Feedback from users is fundamental to achieving this goal. 1.4.2 Directory Structure To begin your OTB odyssey, you will rst need to know something about OTBs software organiza- tion and directory structure. It is helpful to know enough to navigate through the code base to nd examples, code, and documentation. OTB is organized into several different modules. There are three: the OTB, OTB-Documents and OTB-Wrapping modules. The source code, examples and applications are found in the OTB module; documentation, tutorials, and material related to the design and marketing of OTB are found in OTB-Documents; and resources to wrap OTB classes into other languages (such as Java or Python) are available from OTB-Wrapping. Usually you will work with the OTB module unless you are a developer, are teaching a course, or are looking at the details of various design documents. The OTB module contains the following subdirectories: OTB/Codethe heart of the software; the location of the majority of the source code. OTB/Applicationsa set of applications modules that can be launched in different ways (command-line, graphical interface, Python/Java), refer to the OTB Cookbook for more infor- mation OTB/CMakeinternal les used during the conguration process OTB/Copyrightthe copyright information of OTB and all the dependencies included in the OTB source tree OTB/Examplesa suite of simple, well-documented examples used by this guide and to il- lustrate important OTB concepts. 36. 6 Chapter 1. Welcome OTB/Testinga large number of small programs used to test OTB. These examples tend to be minimally documented but may be useful to demonstrate various system concepts. OTB/Utilitiessupporting software for the OTB source code. For example, libraries such as ITK.GDAL. The source code directory structurefound in OTB/Codeis important to understand since other directory structures (such as the Testing directory) shadow the structure of the OTB/Code directory. OTB/Code/ApplicationEnginethe core library for building applications based on OTB OTB/Code/Commoncore classes, macro denitions, typedefs, and other software constructs central to OTB. OTB/Code/BasicFiltersbasic image processing lters. OTB/Code/Fusionimage fusion algorithms, as for instance, pansharpening. OTB/Code/FeatureExtractionthe location of many feature extraction algorithms. OTB/Code/ChangeDetectiona set of remote sensing image change detection algorithms. OTB/Code/DisparityMaptools for estimating disparities deformations between im- ages. OTB/Code/Fuzzyfuzzy logic based algorithms, with Dempster-Shaffer theory related classes OTB/Code/GeospatialAnalysisclasses allowing to connect to geospatial database like PostGIS. OTB/Code/Guivery basic widgets for building graphical user interfaces, such as progress bars for lters, etc. OTB/Code/Hyperspectralhyperspectral images analysis OTB/Code/IOclasses that support the reading and writing of data. OTB/Code/Learningseveral functionnalities for supervised learning and classication. OTB/Code/Markovimplementation of Markov Random Fields regularization and segmen- tation. OTB/Code/MultiScalea set of functionalities for multiscale image analysis and synthesis. OTB/Code/MultiTemporaltime series interpolation related algorithms OTB/Code/OBIAObject Based Image Analysis lters and data structures OTB/Code/ObjectDetectionObject detection chain based on local feature extraction 37. 1.4. Downloading OTB 7 OTB/Code/Projectionsclasses allowing to deal with sensor models and cartographic pro- jections. OTB/Code/Radiometryclasses allowing to compute vegetation indices and radiometric corrections. OTB/Code/SARPolarimetrysome add-ons for SAR polarimetry synthesis and analysis. OTB/Code/Segmentationseveral functionnalities for image segmentation. OTB/Code/SimulationSensor simulator OTB/Code/SpatialReasoningseveral functionnalities high level image analysis using spatial reasoning techniques. OTB/Code/Testinginternal classes used in the used in the testing framework OTB/Code/Visualizationutilities for simple image visualization. OTB/Code/Wrapperswrappers of applications in several access points (command-line, QT Gui, SWIG...). The OTB-Documents module contains the following subdirectories: OTB-Documents/CourseWarematerial related to teaching OTB. OTB-Documents/LatexLATEX styles to produce this work as well as other documents. OTB-Documents/SoftwareGuideLATEX les used to create this guide. (Note that the code found in OTB/Examples is used in conjunction with these LATEX les.) 1.4.3 Documentation Besides this text, there are other documentation resources that you should be aware of. Doxygen Documentation. The Doxygen documentation is an essential resource when working with OTB. These extensive Web pages describe in detail every class and method in the system. The documentation also contains inheritance and collaboration diagrams, listing of event invocations, and data members. The documentation is heavily hyper-linked to other classes and to the source code. The Doxygen documentation is available on-line at http://www.orfeo-toolbox.org/doxygen/. Header Files. Each OTB class is implemented with a .h and .cxx/.txx le (.txx le for templated classes). All methods found in the .h header les are documented and provide a quick way to nd documentation for a particular method. (Indeed, Doxygen uses the header documentation to produces its output.) 38. 8 Chapter 1. Welcome 1.4.4 Data The OTB Toolkit was designed to support the ORFEO Acompaniment Program and its associated data. This data is available at http://smsc.cnes.fr/PLEIADES/index.htm. 1.5 The OTB Community and Support OTB was created from its inception as a collaborative, community effort. Research, teaching, and commercial uses of the toolkit are expected. If you would like to participate in the community, there are a number of possibilities. Users may actively report bugs, defects in the system API, and/or submit feature requests. Currently the best way to do this is through the OTB users mailing list. Developers may contribute classes or improve existing classes. If you are a developer, you may request permission to join the OTB developers mailing list. Please do so by sending email to otb at cnes.fr. To become a developer you need to demonstrate both a level of competence as well as trustworthiness. You may wish to begin by submitting xes to the OTB users mailing list. Research partnerships with members of the ORFEO Acompaniment Program are encouraged. CNES will encourage the use of OTB in proposed work and research projects. Educators may wish to use OTB in courses. Materials are being developed for this purpose, e.g., a one-day, conference course and semester-long graduate courses. Watch the OTB web pages or check in the OTB-Documents/CourseWare directory for more information. 1.6 A Brief History of OTB Beside the Pleiades (PHR) and Cosmo-Skymed (CSK) systems developments forming ORFEO, the dual and bilateral system (France - Italy) for Earth Observation, the ORFEO Accompaniment Program was set up, to prepare, accompany and promote the use and the exploitation of the images derived from these sensors. The creation of a preparatory program1 is needed because of : the new capabilities and performances of the ORFEO systems (optical and radar high resolu- tion, access capability, data quality, possibility to acquire simultaneously in optic and radar), the implied need of new methodological developments : new processing methods, or adapta- tion of existing methods, 1http://smsc.cnes.fr/PLEIADES/A prog accomp.htm 39. 1.6. A Brief History of OTB 9 the need to realise those new developments in very close cooperation with the nal users for better integration of new products in their systems. This program was initiated by CNES mid-2003 and will last until 2010 at least It consists in two parts, between which it is necessary to keep a strong interaction : A Thematic part A Methodological part. The Thematic part covers a large range of applications (civil and defence ones), and aims at spec- ifying and validating value added products and services required by end users. This part includes consideration about products integration in the operational systems or processing lines. It also in- cludes a careful thought on intermediary structures to be developed to help non-autonomous users. Lastly, this part aims at raising future users awareness, through practical demonstrations and valida- tions. The Methodological part objective is the denition and the development of tools for the operational exploitation of the future submetric optic and radar images (tridimensional aspects, change detec- tion, texture analysis, pattern matching, optic radar complementarities). It is mainly based on R&D studies and doctorate and post-doctorate research. In this context, CNES2 decided to develop the ORFEO ToolBox (OTB), a set of algorithms encapsu- lated in a software library. The goals of the OTB is to capitalise a methological savoir faire in order to adopt an incremental development approach aimin to efciently exploit the results obtained in the frame of methodological R&D studies. All the developments are based on FLOSS (Free/Libre Open Source Software) or existing CNES developments. OTB is implemented in C++ and is mainly based on ITK3 (Insight Toolkit): ITK is used as the core element of OTB OTB classes inherit from ITK classes The software development procedure of OTB is strongly inspired from ITKs (Extreme Pro- gramming, test-based coding, Generic Programming, etc.) The documentation production procedure is the same as for ITK Several chapters of the Software Guide are litterally copied from ITKs Software Guide (with permission). Many examples are taken from ITK. 2http://www.cnes.fr 3http://www.itk.org 40. 10 Chapter 1. Welcome 1.6.1 ITKs history In 1999 the US National Library of Medicine of the National Institutes of Health awarded six three-year contracts to develop an open-source registration and segmentation toolkit, that eventu- ally came to be known as the Insight Toolkit (ITK) and formed the basis of the Insight Software Consortium. ITKs NIH/NLM Project Manager was Dr. Terry Yoo, who coordinated the six prime contractors composing the Insight consortium. These consortium members included three com- mercial partnersGE Corporate R&D, Kitware, Inc., and MathSoft (the company name is now Insightful)and three academic partnersUniversity of North Carolina (UNC), University of Ten- nessee (UT) (Ross Whitaker subsequently moved to University of Utah), and University of Penn- sylvania (UPenn). The Principle Investigators for these partners were, respectively, Bill Lorensen at GE CRD, Will Schroeder at Kitware, Vikram Chalana at Insightful, Stephen Aylward with Luis Ibanez at UNC (Luis is now at Kitware), Ross Whitaker with Josh Cates at UT (both now at Utah), and Dimitri Metaxas at UPenn (now at Rutgers). In addition, several subcontractors rounded out the consortium including Peter Raitu at Brigham & Womens Hospital, Celina Imielinska and Pat Mol- holt at Columbia University, Jim Gee at UPenns Grasp Lab, and George Stetten at the University of Pittsburgh. In 2002 the rst ofcial public release of ITK was made available. 41. CHAPTER TWO INSTALLATION This section describes the process for installing OTB on your system. OTB is a toolbox, and as such, once it is installed in your computer, provides by default a set of useful libraries. You can use these libraries to build your own applications based on it. What OTB does provide, besides the toolbox, is a large set of test les and examples that will introduce you to OTB concepts and will show you how to use OTB in your own projects. Since the release 3.12, OTB embeds a specic framework to generate applications in a more user- friendly way. If you activate the specic option BUILD APPLICATIONS, OTB builds for each appli- cation one shared library (also known as plugin). This plugin ca