OTB: Wrapping gifts

First of all, we would like to share with all of you the pride and excitement following the success of Pleiades launch on Soyouz which took place on saturday the 17th at 03:03 AM CET. To best prepare OTB for these up-coming images, the next OTB release will happen in late january, allowing to test it against real Pleiades images. Until then, we are starting a series of short posts in order to present one of the major changes of this new release : the new applications framework.

History

Until now, there was an OTB-Applications package built on top of the library, which provided command-line tools, Qt and FLTK based GUIs, and Qgis C++ plugins. This package was not very popular among our users : it was lacking of documentation, missed really useful auto-generated GUIs and did not provide an interface to interpreted languages. These applications were barely more than a serie of mains decorated with an argument parser. However, these applications were providing a lot of image manipulation utilities and high-level processing chains like ortho-rectification, classification or segmentation. Being too obscure, they simply did not get the attention they deserved.

Six month ago, we started a side project called OTB-Wrapper, which was designed as a sand-box to experiment with all the possible enhancements to make the applications really useful. After a while, we came up with a complete solution and implemented it directly into the OTB library. All applications from the OTB-Applications package have then been migrated to this new framework, also directly into the OTB library.

The new framework in a nutshell

So, what does this new framework provide to the users ? A lot of things ! See :

  • Each application is now compiled into a single tiny shared-library,
  • Writing new applications in an external project is as simple as inheriting the base class and calling a CMake macro,
  • These applications shared libraries are loaded dynamically as plugins of several generic access points :
    • Directly from C++
    • From an interpreted or compiled higher level language like Python through the SWIG interface,
    • From a command-line launcher, like the old applications,
    • From a nice auto-generated Qt GUI,
    • From QGis through seamless OTB plugins.

The general philosophy of this new framework is to have to write the processing only once, and then use it from whatever environment, programming language or software you want through one of these access points.

Success !

Even before the official release, success is already showing up :

  • A simple python script allows to generate documentation for all the applications,
  • A simple python script allows to generate applications file descriptors for integration in external tools like the KEO system from ESA,
  • A simple python script allows to perform batched processing chaining several applications,
  • Qt GUIs are really nice to use, with a lot of useful features like automatic parameters estimation (for instance, the ortho-rectification application provides you with the best-fit parameters for your image),
  • The python interface allows nice integration within QGis,
  • And the command-line interface is more robust and easier to use.

Learn more in next posts

If you want to give this a try, clone a the OTB mercurial repository and activate the BUILD_APPLICATIONS flag. You are ready to go ! In the following posts, we will focus on key features that makes this new framework so exciting. But for now, it is time for us to wish you all a merry christmas !

Julien, on behalf of the OTB team

One thought on “OTB: Wrapping gifts

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.