Online image processing with Orfeo Toolbox WPS

mercredi 01 Avril 2015 OTBWPSZOO

At GeoLabs we are keen on implementing WPS compliant web services. This time we are glad to introduce 50+ new services based on Orfeo Toolbox, and we show you how in this post.

Processing satellite imagery allows to extract meaningful information about objects or areas, and to create knowledge and value out of it. Simple to advanced open source algorithms are available for such purpose, and bringing them to the server not only promotes their wider use and adoption, but also opens door to better dissemination and sharing of the created value.

Following our standard oriented approach, think of one or several raster files that would be published as WCS (Web Coverage Service), given as input to a WPS service which would process them remotely for you, and finally output the results as a new WCS, WMS or WMTS service. It is now possible to implement such workflow using the latest version of the Open WPS Platform. Among other significant improvements, the upcoming ZOO-Project 1.5 release indeed introduces new optional support for Orfeo Toolbox (OTB).

OTB is a library of choice to process images from remote sensors like Landsat, SPOT or Pléiades. It is open source and ships with a set of ready-to-use tools for classical remote sensing tasks such as image manipulation, classification or segmentation, but also features extraction, change detection or hyper-spectral processing.

For our concern, we are taking advantage of the powerful OTB Applications. Each OTB Application is written once for all in a shared library (also known as plugin). This plugin can be auto-loaded into appropriate tools without recompiling, and is able to fully describe its parameters, behavior and documentation. Pretty awesome.

After investigating a bit more and with technical support from Rashad Mohammed (OTB team), we managed to load these shared libraries directly from ZOO-Kernel, the ZOO-Project WPS server. This basically adds 50+ additional WPS services to the usual GetCapabilities response (check it out !), and each service can be executed individually, but also possibly be chained with others.

Using the OTB Cookbook recipes, we can then send some interesting Execute requests to our WPS server. For example, the OTB Smoothing application applies either gaussian, mean, or anisotropic diffusion smoothing filter to an image, and so does our WPS service (OTB.Smoothing). We can execute it with this example WPS request:


Input Landsat image
Output smoothed image

In this first example, we process a small extract of a Landsat 8 scene, with the following parameters:

The input image file, here in GeoTIFF format ( Note that the xlink:href value could be a WCS request).
The output image type (it can be set to uint8, uint16, int16n, int32, float or double)
The smoothing type (it can be set to mean, gaussian or anidif )
The smoothing radius value in pixels (used in case the mean type was selected)
The Anisotropic Diffusion equation time step (used in case the anidif type was selected)
The number of iterations which controls the sensitivity of the conductance term (used in case the anidif type was selected).

Another example right out of the OTB cookbook that demonstrates a more complex process is the OTB BandMath application which basically allows you to do maths with raster bands, as follow:


For this example, we process the three images which are used in the OTB Band Math example, as shown bellow:


The three images are given as input to the OTB.BandMath service with the following parameters:

The list of input images (once again they could be accessed with WCS request instead of simple file link)
The output image type (it can be set to uint8, uint16, int16n, int32, float or double)
The mathematical formula to compute

In this case, we are using the following expression:


A classified color ramp can finally be applied to the resulting GeoTIFF image for highlighting the extracted NDVI values, as shown bellow:

Output tiff
Classified output tiff
Classified output tiff on top of ortho

These basic examples demonstrate the use of the optional Orfeo Toolbox support now available in ZOO-Project. If you want to learn more about OTB and the ZOO-Project OTB support, join the OTB Hackfest in June. We will present our work in more details there. See you in Toulouse !

This work was supported by a grant from the European Union's 7th Framework Programme (2007-2013) provided for the project PublicaMundi (GA no. 609608).