Processing Sentinel Images with Orfeo Toolbox

I have some experience with the ESA SNAP toolbox to process Sentinel images, but will be working with datasets from other satellites, so I’m looking at other FOSS solutions, mainly OTB, which I especially like for its Python API. I have also been looking at QGIS and GDAL.

To gather a basic overview of the applications, available I have been aiming to replicate RUS Training Kits:

I have a broad idea of how I can replicate functionality for most applications listed in the training kits, and some which I do not; I have listed what I know and don’t know below, any suggestions you can provide will be very helpful. I’ve also been using a workshop guide for Orfeo. Thanks in advance :slight_smile:

LAND01 - Optical Crop mapping with Sentinel-2
Resampling Sentinel data is stored in a SAFE format, with image data stored as JPEG2000 (.jp2). Gdal_warp seems to be the closest solution. I am not sure of my solution through Orfeo, which would make use of StereoRectificationGridGenerator to generates a deformation grid pair, which is passed to GridBasedImageResampling to resample the image according to the resampling grid.
Subset Using OTB’s ExtractROI, with Extent Mode
Import Vector Data + Reproject Using OTB’s VectorDataReprojection, using the vector data file as an input parameter.
Mask Not sure about this one, my current approaches involve Using the ExtractROI application, with Fit mode, supplying the image to be masked and a shape file (.shp) for the vector mask itself. Another is using VectorDataExtractROI, which extracts the vector data features belonging to a region specified by a support image; though I think this only shrinks the vector data to a limited subset, rather than shrinking the image data as well.
Random Forest Classification Based from the Orfeo Workshop, for Single Date Classification makes use of 3 applications: ComputeImageStatistics computes global mean and standard deviation for each band from images, TrainImageClassifier trains a classifier, (including random forests classifier), from multiple pairs of images, training vector data, and statistics of each feature that has been computed, and ImageClassifier performs an image classification based on a model file produced from training. For time-series classification, use the ConcatenateImages application generates a single image, from multiple images of the same size. The ColorMapping application visualises the .tif generated in RGB, and for validation, the ComputeConfusionMatrix application will make use of testing data.

For SAR processing (relating to LAND07 below), the Orfeo Cookbook has a whole section dedicated to this, on which the table is mostly based.

LAND07 - SAR Deforestation Monitoring with Sentinel-1
Apply Orbit File Have not found a similar solution
Thermal Noise Removal Possible solution I found, is OTB’s SARCalibration, which has a disable noise flag, which suggests that noise is removed with calibration, though I’m not sure
Calibration Using SARCalibration
Speckle Filtering Using OTB’s Despeckle
Terrain Correction Using OTB’s OrthoRectification. Not sure about the parameters and retrieving the DEM file, which SNAP seems to do automatically (uncertain if included in dataset, or downloaded)
Subset Using OTB’s ExtentROI, similar as in LAND01
Convert Data Type OTB’s DynamicConvert seems appropriate.
GLCM OTB’s HaralickTextureExtraction, seems appropriate.
Band Merge OTB’s ConcatinateImages seems closest option.
AOI Monitoring I have not looked into this, I presume this would be a feature in QGIS
Random Forest Classification I presume it would similar as in LAND01.

Note: I do have access and can provide the AuxData and Sentinel Datasets if required.

I have posted this on Reddit in the QGIS subreddit, where I added links to all the sources.

Hi Tharen,

Welcome and thank you for your message.
There are a lot of different issues in your message.
Here are some tips for your first recipe “crop mapping with Sentinel2” :

  • for the mask, you could use the Rasterization application (either with a support image, or -spx / -spy to give x and y spacing)
    otbcli_Rasterization -in <your shapefile> -out <your mask> -im <a support image>
  • please note that ExtractRoi is not adapted here, because it will extract a bounding box.
  • for the classification step, you can use the single application “TrainImagesClassifier”, but if you use the full framework (see https://www.orfeo-toolbox.org/CookBook/recipes/pbclassif.html#samples-statistics-estimation), you will better manage the training step.

Did you have a look at our training material (here : https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb-documents/tree/master/Courses/org) or to the OTB in Python demo (https://gitlab.orfeo-toolbox.org/dyoussef/otb-guided-tour) ?
Any contribution is welcome !

Best regards,

Yannick