I'm using the OTB Toolbox to perform an object based classification on a raster (clipped ESRI satellite raster). This raster result from an aggregation of several satellite imageries, which induces differences in the quality of the raster.

In some areas, the Segmentation tool isn't able to distinguish "green" and "blue" entities.

Here are the parameters I am using:

  • Segmentation algorithm: meanshift
  • Spatial radius: 2
  • Range radius: 4
  • Max/min iterations: 100
  • ulco
  • 8 neighbor connectivity
  • Minimum object size: 1

Here is the result: Segmentation result

In red, the segmentation isn't done properly.

I add a link to download the raster I am using, maybe it can help. Raster Zone 8

In my situation, I'm trying to distinguish the mangrove dark green from other entities for a surface calculation.

If you know a better way to do so, I'm also interested.

1 Answer 1


I would use some pixel-wise machine learning approach for this task.

  • traditional machine learning approach: build pixel features (Haralick indices, radiometric indices, etc.). You can use that with native OTB applications (HaralickTextureIndices + RadiometricIndices or BandMath + ConcatenateImages to compute your features image, then use the OTB image classification framework on it). You can directly use traditional OTB applications.
  • deep learning: let the classifier find what's the best features. Use the otbtf remote module (see here for a short insight, dive in this book for more complete land cover mapping use cases with semantic segmentation and other fully convolutional approaches). You should have better results if you have enough terrain truth (say hundreds of labeled pixels will work well enough with a small deep net). You will have to use docker since otbtf is shipped in docker images.
  • I tried machine learning approach following this tutorial: youtube.com/watch?v=msUyQmZwqo8 The result wasn't very good. For now, I didn't find a way to follow the approach you proposed: HaralickTextureIndices + RadiometricIndices or BandMath + ConcatenateImages. RadiometricIndices = black output & don't know how to use BandMath. I'll search more documentation about this approach. Will try the deep learning approach!
    – Giene
    Nov 4, 2022 at 9:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.