For an analysis of several multilayer raster files I want to perform some kind of image segmentation (multi-resolution, ...) to extract polygon object of similar raster properties. I know that Trimble's eCognition is quite useful fot this kind of tasks. However I am trying to find a script based solution, since there are multiple (some 20s) of rasters the image segmentation schould be performed on.

I personally prefer the script languages R or Python.

  • Are you working with singleband data or multiband data?
    – Aaron
    Commented Sep 18, 2020 at 13:46

3 Answers 3


For Python, there are very few option for free source RS based image segmentation. I'll suggest two,

  • Orfeo Toolbox: Probably the best free alternative of eCognition. It has quite a few segmentation module. Its available inside Python, in QGIS; even has its own gui alternative called Monteverdi.
  • RSGISLib: Another Python library which also has a decent set of segmentation module. RSGISLib binaries are currently available for Linux and osx users only.

If it's not remote sensing I'll suggest OpenCV.

  • 2
    More information about the segmentation and object based classification within RSGISLib is available in the following open access paper: mdpi.com/2072-4292/6/7/6111
    – danclewley
    Commented Jul 7, 2016 at 19:26

For segmentation, while you can probably go into the detailed statistical properties of the data (particularly for SAR), it is often a good start to assume that these are normal images/stacks of images, so standard image processing segmentation approaches will often work well. All you need to do is to read in the data as numpy arrays using e.g. GDAL/rasterio.

Once you have the data available, scikit-image is an actively developed image processing library with lots of useful segmentation algorithms and tools to help you understand the results.


Saga is another option, to carry out processes without programming, it has tools for segmentation including watershed, region growing, OBIA and is easy to use

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.