ORFEO Toolbox (OTB) Frequently Asked Questions (FAQ).

OTB Development Team



Contents

Introduction

What is OTB?

OTB, the ORFEO Toolbox is a library of image processing algorithms developed by CNES in the frame of the ORFEO Accompaniment Program. OTB is based on the medical image processing library ITK, http://www.itk.org, and offers particular functionalities for remote sensing image processing in general and for high spatial resolution images in particular.

OTB provides:

Many of these functionalities are provided by ITK and have been tested and documented for the use with remote sensing data.

You can get more information on OTB on the web at http://www.orfeo-toolbox.org.

What is ORFEO?

ORFEO stands for Optical and Radar Federated Earth Observation. In 2001 a cooperation program was set between France and Italy to develop ORFEO, an Earth observation dual system with metric resolution: Italy is in charge of COSMO-Skymed the radar component development, and France of PLEIADES the optic component.

The PLEIADES optic component is composed of two "small satellites" (mass of one ton) offering a spatial resolution at nadir of 0.7 m and a field of view of 20 km. Their great agility enables a daily access all over the world, essentially for defense and civil security applications, and a coverage capacity necessary for the cartography kind of applications at scales better than those accessible to SPOT family satellites. Moreover, PLEIADES will have stereoscopic acquisition capacity to meet the fine cartography needs, notably in urban regions, and to bring more information when used with aerial photography.

The ORFEO "targeted" acquisition capacities made it a system particularly adapted to defense or civil security missions, as well as critical geophysical phenomena survey such as volcanic eruptions, which require a priority use of the system resources.

With respect to the constraints of the franco-italian agreement, cooperations have been set up for the PLEIADES optical component with Sweden, Belgium, Spain and Austria.

Where can I get more information about ORFEO?

At the PLEIADES HR web site: http://smsc.cnes.fr/PLEIADES/.

What is the ORFEO Accompaniment Program?

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 program is needed because of :

This program was initiated by CNES mid-2003 and will last until mid 2011. It consists in two parts, between which it is necessary to keep a strong interaction:

This Accompaniment Program uses simulated data (acquired during airborne campaigns) and satellite images quite similar to Pleiades (as QuickBird and Ikonos), used in a communal way on a set of special sites. The validation of specified products and services will be realized with those simulated data

Apart from the initial cooperation with Italy, the ORFEO Accompaniment Program enlarged to Belgium, with integration of Belgian experts in the different WG as well as a participation to the methodological part.

Where can I get more information about the ORFEO Accompaniment Program?

Go to the following web site: http://smsc.cnes.fr/PLEIADES/A_prog_accomp.htm.

Who is responsible for the OTB development?

The French Centre National d'Études Spatiales, CNES, initiated the ORFEO Toolbox and is responsible for the specification of the library. CNES funds the industrial development contracts and research contracts needed for the evolution of OTB.

Licence

Which is the OTB licence?

OTB is distributed under a free software licence:
http://www.cecill.info/licences/Licence_CeCILL_V2-en.html.

If I write an application using OTB am I forced to distribute that application?

No. The license gives you the option to distribute your application if you want to. You do not have to exercise this option in the license.

If I wanted to distribute an application using OTB what license would I need to use?

The CeCILL licence.

I am a commercial user. Is there any restriction on the use of OTB?

OTB can be used internally ("in-house") without restriction, but only redistributed in other software that is under the CeCILL licence.

Getting OTB

Who can download the OTB?

Anybody can download the OTB at no cost.

Where can I download the OTB?

Go to http://www.orfeo-toolbox.org and follow the "download OTB" link. You will have access to the OTB source code and to the Software User's Guide.


How to get the latest bleeding-edge version?

You can get the current development version, as our repository is public, using Mercurial (available at http://www.selenic.com/mercurial). Be aware that, even if the golden rule is what is commited will compile, this is not always the case. Changes are usually more than ten per day.

The first time, you can get the source code using:

      hg clone http://hg.orfeo-toolbox.org/OTB

Then you can build OTB as usual using this directory as the source (refer to build instructions).

Later if you want to update your source, from the OTB source directory, just do:

      hg pull -u

A simple make in your OTB binary directory will be enough to update the library (recompiling only the necessary stuff).


Installing OTB

Which platforms are supported?

OTB is a multi-platform library. It has successfully been installed on the following platforms:

Which libraries/packages are needed before installing OTB?

Main steps

In order to install OTB on your system follow these steps (in the given order):
  1. Install CMake (binary packages are available for most platforms).
  2. Install GDAL (binary packages are available for most platforms, some are available on http://www.orfeo-toolbox.org/packages).
  3. Install OTB using CMake for the configuration.

We assume that you will install everything on a directory called INSTALL_DIR, which usually is /usr/local, /home/jordi/local or whatever you want. Make sure that you have downloaded the source code for:

Unix/Linux Platforms

Important note: on some Linux distributions (eg. Debian, Ubuntu, Fedora), you should use the official packages for CMake, GDAL and Fltk (including the development packages). Once you have installed these packages, you can skip to step 4.

  1. Install GDAL (or use your distribution package)
          cd INSTALL_DIR
          gunzip gdal.1.5.2.tar.gz
          tar xvf gdal.1.5.2.tar
          cd gdal.1.5.2
          ./configure --prefix=INSTALL_DIR
          make
          make install
    

    It seems to be a bug in the GDAL install procedure: if you are installing it without root privileges, even if your INSTALL_DIR is a directory for which you have the write permissions, GDAL tries to copy the python bindings together with the Python site packages, which are usually somewhere in /usr/lib.

    Actually, since this is the last step in the GDAL install procedure, when you get the error message, the GDAL libs and header files are already installed, so you can safely ignore the error.

    The -without-python option passed to the configure step avoids this. However, some users may want to have Python bindings, so recommending this option for the install may not be OK for everybody.

  2. Install CMake (or use your distribution package)
          cd INSTALL_DIR
          gunzip cmake-2.6.0.tar.gz
          tar xvf cmake-2.6.0.tar
          cd cmake-2.6.0
          ./configure --prefix=INSTALL_DIR
          make
          make install
    
    In order to properly use cmake, add INSTALL_DIR/bin to your path with export PATH=$PATH:INSTALL_DIR/bin or something similar.

  3. Install Fltk (optional) using CMake (do not use the configure script) (or use your distribution package)
          cd INSTALL_DIR
          bunzip2 fltk-1.1.9-source.tar.bz2 OR
          gunzip fltk-1.1.9-source.tar.gz
          tar xvf fltk-1.1.9-source.tar
          mkdir Fltk-binary
          cd Fltk-binary
          ccmake ../fltk-1.1.9
          --> follow the CMake instructions, in particular:
              --> set CMAKE_INSTALL_PREFIX to INSTALL_DIR within CMake
    	  --> set BUILD_EXAMPLES to ON within CMake
    	  --> generate the configuration with 'g'
          make
          make install
          --> check that the examples located in
          INSTALL_DIR/Fltk-binary/bin work, in particular, the fractals
          example which makes use of the OpenGL library needed by OTB.
    

    You can also choose to use the FLTK version we included in the source of OTB, in this case, everything will be compile at the same time. To do that, you will have to set the option OTB_USE_EXTERNAL_FLTK to OFF

  4. Install OTB
          cd INSTALL_DIR
          gunzip OrfeoToolbox-3.4.0.tgz
          tar xvf OrfeoToolbox-3.4.0.tar
          mkdir OTB-Binary
          cd OTB-Binary
          ccmake ../OrfeoToolbox-3.4.0
          --> follow the CMake instructions, in particular:
    	  --> set BUILD_EXAMPLES to ON within CMake
    	  --> set BUILD_SHARED_LIBS to ON within CMake
    	  --> set BUILD_TESTING to OFF within CMake
    	  --> set CMAKE_INSTALL_PREFIX to INSTALL_DIR within CMake
    	  --> set GDAL_INCLUDE_DIRS to INSTALL_DIR/include within CMake
    	  --> set GDAL_LIBRARY_DIRS to INSTALL_DIR/lib within CMake
    	  --> set OTB_USE_EXTERNAL_ITK to OFF within CMake
    	  --> set FLTK_DIR to INSTALL_DIR/Fltk-Binary within CMake OR
    	      if you do not have FLTK, you can use the OTB internal FLTK setting  
    	      OTB_USE_EXTERNAL_ITK to OFF. If you don't have FLTK and don't want to use 
    	      the internal one, press 't' to change to advanced mode and set OTB_USE_VISU to OFF
    	  --> generate the configuration with 'g'
           make -j 2
    

    If you want a faster compilation and don't want the compilation of the examples, you can set BUILD_EXAMPLES to OFF. Some platforms apparently have more difficulties with shared libraries, if you experience any problem with that, you can set BUILD_SHARED_LIBS to OFF but the built size might reach 1 GB.

    After these steps, you have the source of OTB in INSTALL_DIR/OrfeoToolbox-3.0.0 and the compiled binaries and libraries in INSTALL_DIR/OTB-Binary. Keeping the sources is important as most programs you will designed will need an access to the .txx files during compilation. However, the binaries directory knows were its sources are and you will need to point only to the INSTALL_DIR/OTB-Binary when the cmake for your program will ask you where the OTB is.

    If you want to put OTB in a standard location, you can proceed with:

          make install
    

    but this is only optional.

Microsoft Visual Studio (7.1 .NET 2003/8.0 .NET 2005/Express 2005/Express 2008)

Since OTB 3.4, installation of required libraries for OTB compilation on Windows Platform is eased with the OSGeo4W installer. OSGeo4W is a binary distribution of a broad set of open source geospatial software for Win32 environments (Windows XP, Vista, etc).
  1. Install OSGEO4W with the following packages : gdal16, curl, libtiff, libgeotiff, libjpeg, zlib, libpng

  2. Configure OTB with CMake (Example for release mode, with internal FLTK and ITK)

    First give the path where the source code is and where to build the binaries.

    Then press the "Configure" button and choose the generator for your project. For example, Visual Studio 9 2008.

    Select the option "Advanced View".

    Then set the option USE_EXTERNAL_FLTK to OFF. (or uncheck the button).

    Select the value Release for the option CMAKE_CONFIGURATION_TYPES

    Press the "Configure" button and you will be asked to set the following variables :

    GDAL_INCLUDE_DIR = "C:/OSGeo4W/apps/gdal-16/include"
    GDAL_LIBRARY_DIR = "C:/OSGeo4W/apps/gdal-16/lib/gdal_i.lib"
    OGR_INCLUDE_DIR = "C:/OSGeo4W/apps/gdal-16/include"
    CURL_INCLUDE_DIR = "C:/OSGeo4W/include/curl"
    CURL_LIBRARY = "C:/OSGeo4W/lib/libcurl_imp.lib"
    TIFF_INCLUDE_DIRS = "C:/OSGeo4W/include"
    TIFF_LIBRARY = "C:/OSGeo4W/lib/libtiff_i.lib"
    GEOTIFF_INCLUDE_DIRS = "C:/OSGeo4W/include"
    GEOTIFF_LIBRARY = "C:/OSGeo4W/lib/geotiff_i.lib"
    JPEG_INCLUDE_DIR = "C:/OSGeo4W/include"
    JPEG_INCLUDE_DIRS = "C:/OSGeo4W/include "
    JPEG_LIBRARY = "C:/OSGeo4W/lib/jpeg_i.lib"
    PNG_PNG_INCLUDE_DIR = "C:/OSGeo4W/include"
    PNG_LIBRARY = "C:/OSGeo4W/lib/libpng13.lib"
    ZLIB_INCLUDE_DIR = "C:/OSGeo4W/include"
    ZLIB_LIBRARY = "C:/OSGeo4W/lib/zlib.lib"

  3. Compile OTB with Microsoft Visual Studio When the MSVC++ project is generated, you can open the solution and build the otb project.

Microsoft Visual Studio 2010 is currently not supported.

Cygwin

  1. Download the lastest version at http://www.cygwin.com and install it. Then, launch it, a prompt appears (similar to Linux one).

  2. Install GDAL

    To compile GDAL, at configure step, use these options :

    	./configure --prefix=INSTALL_DIR --with-png=internal --with-libtiff=internal
    	--with-jpeg=internal
    
    Then the usual make and make install.

  3. Install OTB

    See Linux part for details (same procedure).

That should be all! Otherwise, subscribe to otb-users@googlegroups.com and you will get some help.

Specific platform issues

SunOS/HP UX

Due to a bug in the tar command shipped with some versions of SunOS, problems may appear when configuring, compiling or installing OTB.

See http://www.gnu.org/software/tar/manual/tar.html#Checksumming for details on the bug characterization.

The solution is to use the GNU tar command if it is available on your system (gtar).

Cygwin

Due to an unknown bug, Fltk can't compile on some versions of Cygwin (OpenGL problems).

Put OTB_USE_VISU to OFF to avoid these problems.

Some bugs can appear while compiling GDAL with JPEG2000 files : disable this format to solve the problem.

MacOSX 10.6 Snow Leopard

Since 10.6 (Snow Leopard), OS X does not support Carbon calls from 64bit code anymore. Until FLTK is ported to Cocoa, it can only be compiled in 32 bits mode, thus OTB needs to be compiled in 32 bits mode, as well as GDAL. Moreover, there is a compilation issue with liblas, so liblas must be disabled. You can follow these steps :

  1. Install GDAL

    To compile GDAL, at configure step, use these options :

    	export CFLAGS="-O2 -W -arch i386 "
    	export CXXFLAGS="-O2 -W  -arch i386 "
    	export LDFLAGS="-arch i386"
    
    	./configure --prefix=INSTALL_DIR --with-png=internal --with-libtiff=internal
    	--with-geotiff=internal --with-jpeg=internal
    

    Then the usual make and make install.

  2. Configure OTB

    Follow the Unix/Linux instructions. In particular set the following variables : CMAKE_OSX_ARCHITECTURES = i386
    GDAL_INCLUDE_DIR
    GDAL_LIBRARY_DIR
    OTB_USE_LIBLAS = OFF

    Then the usual make and make install.

Open Solaris

There are some issues on Open Solaris 2009.06 and before with libLAS (library included in OTB to process LIDAR data). You will need to deactivate it: set the OTB_USE_LIBLAS option to OFF.

It seems to be fine with the more recent release of Open Solaris.

Using OTB

Where to start ?

OTB presents a large set of features and it is not always easy to start using it. After the installation, you can proceed to the tutorials (in the Software Guide). This should give you a quick overview of the possibilities of OTB and will teach you how to build your own programs.

What is the image size limitation of OTB ?

The maximum physical space a user can allocate depends on her platform. Therefore, image allocation in OTB is restricted by image dimension, size, pixel type and number of bands.

Fortunately, thanks to the streaming mechanism implemented within OTB's pipeline (actually ITK's), this limitation can be bypassed. The use of the http://www.orfeo-toolbox.org/doxygen/classotb_1_1StreamingImageFileWriter.htmlotb::StreamingImageFileWriter at the end of the pipeline, or the http://www.orfeo-toolbox.org/doxygen/classitk_1_1StreamingImageFilter.htmlitk::StreamingImageFilter at any point of the pipeline will seamlessly break the large, problematic data into small pieces whose allocation is possible. These pieces are processed one afther the other, so that there is not allocation problem anymore. We are often working with images of $ 25000 \times 25000$ pixels.

For the streaming to work, all the filters in the pipeline must be streaming capable (this is the case for most of the filters in OTB). The output image format also need to be streamable (not PNG or JPEG, but TIFF or ENVI, for instance).

To tune the size of the streaming pieces, the OTB has two CMake variables. The first is named OTB_STREAM_IMAGE_SIZE_TO_ACTIVATE_STREAMING. It represents the minimum size of the image in bytes for which streaming may be helpful. The second, OTB_STREAM_MAX_SIZE_BUFFER_FOR_STREAMING, specifies the maximum size in bytes a streaming piece should have. It can be used to compute the optimal number of pieces to break the input data into.

These two parameters have been used in the OTB-Applications/Utils/ applications. Take this as an example of how they can be used. They can also be tuned by the user to match her specific needs.

Getting help

Is there any mailing list?

Yes. There is a discussion group at http://groups.google.com/group/otb-users/ where you can get help on the set up and the use of OTB.

Which is the main source of documentation?

The main source of documentation is the OTB Software Guide which can be downloaded at http://www.orfeo-toolbox.org/packages/OTBSoftwareGuide.pdf. It contains tenths of commented examples and a tutorial which should be a good starting point for any new OTB user. The code source for these examples is distributed with the toolbox. Another information source is the on-line API documentation which is available at http://www.orfeo-toolbox.org/doxygen.


Contributing to OTB

I want to contribute to OTB, where to begin?

First, you can send an email to otb@cnes.fr or the the user mailing list (otb-users@googlegroups.com) to let us know what functionality you would like to introduce in OTB. If the functionality seems important for the OTB users, we will then discuss on how to retrieve your code, make the necessary adaptions, check with you that the results are correct and finally include it in the next release.

You can also run the nightly tests so we have a wider range of plateforms to detect bugs earlier. Look at section 8.

What are the benefits of contributing to OTB?

Besides the satisfaction of contributing to an open source project, we will include the references to relevant papers in the software guide. Having algorithms published in the form of reproducible research helps science move faster and encourages people who needs your algorithms to use them.

You will also benefit from the strengths of OTB: multiplatform, streaming and threading, etc.

What functionality can I contribute?

All functionalities which are useful for remote sensing data are of interest. As OTB is a library, it should be generic algorithms: change, detection, fusion, object detection, segmentation, interpolation, etc.

More specific applications can be contributed to the OTB-Applications package.


Running the tests

What are the tests?

OTB is an ever changing library, it is quite active and have scores of changes per day from different people. It would be a headache to make sure that the brand new improvement that you introduced didn't break anything, if we didn't have automated tests. You also have to take into account differences in OS, compilers, options, versions of external libraries, etc. By running the tests and submitting it to the dashboard, you will help us detect problems and fix them early.

For each class, at minimum there is a test which tries to instantiate it and another one which uses the class. The output of each test (image, text file, binary file) is controlled against a baseline to make sure that the result hasn't changed.

All these test are available in the directory Testing and are also good examples on how to use the different classes.

How to run the tests?

There is more than 1000 tests for OTB and about 100 for the OTB-Applications and it takes from 20 minutes to 3 hours to run all the test, mainly depending on your compilation options (Release mode does make a difference) and of course your hardware.

To run the tests, you first have to make sure that you set the option BUILD_TESTING to ON before building the library. If you want to modify it, just rerun ccmake, change the option, then make.

For some of the tests, you also need the test data and the baselines (see 8.3).

Once OTB is built with the tests, you just have to go to the binary directory where you built OTB and run ctest -N to have a list of all the tests. Just using ctest will run all the tests. To select a subset, you can do ctest -R Kml to run all tests related to kml files or ctest -I 1,10 to run tests from 1 to 10.


How to get the test data?

If you have a problem at the compilation, you can skip this step first. Data used for the tests are also versioned using Mercurial (see 3.3).

You can get the base doing:

      hg clone http://hg.orfeo-toolbox.org/OTB-Data

This is about 1 GB of data, so it will take a while, but you have to do it only once, as after, a simple

      hg pull -u
will update you to the latest version of the repository.

You can also easily synchronize the directory you retrieve between different computers on your network, so you don't have to get it several times from the main server. Check out Mercurial capabilities.

How to submit the results?

Once you know how to run the tests, you can also help us to detect the bugs or configuration problems specific to your configuration. As mentionned before, the possible combinations between OS, compiler, options, external libraries version is too big to be tested completely, but the more the better.

You just have to launch ctest with the -D Experimental switch. Hence:

      ctest -D Experimental -A CMakeCache.txt

And you will be able to see the result at

http://dash.orfeo-toolbox.org/Dashboard/index.php?project=OTB.

If you are interested in setting up a nightly test (automatically launched every night), please contact us and we will give you the details.

OTB's Roadmap

Which will be the next version of OTB?

OTB's version numbers have 3 digits. The first one is for major versions, the second one is for minor versions and the last one is for bugfixes.

The first version was 1.0.0 in July 2006. Version 1.2.0, 1.4.0 and 1.6.0 were released in between. The 2.0.0 major version was released in December 2007. The 2.2.0, 2.4.0 and 2.6.0 in June, July and November 2008 respectively. The 2.8.0 came out in January 2009, the 3.0.0 in May 2009 and the 3.2.0 in January 2010. The current one is 3.4.0.

What is a major version?

A major version of the library implies the addition of high-level functionalities as for instance image registration, object recognition, etc.

What is a minor version?

A minor version is released when low-level functionalities are available within one major functionality, as for instance a new change detector, a new feature extractor, etc.

What is a bugfix version?

A bugfix version is released when significant bugs are identified and fixed.

When will the next version of OTB be available?

We plan to release major new OTB version once a year, that is, version 2.0.0 was available at the end of 2007, version 3.0.0 was released in May 2009, and so on.

What features will the OTB include and when?

There is no detailed plan about the availability of OTB new features, since OTB's content depends on ongoing research work and on feedback from thematic users of the ORFEO Accompaniment Program.

Nevertheless, the main milestones for the OTB development are the following:

Emmanuel Christophe 2010-07-13