I have a set of aerial photos of vegetation which needs to be classified. Instead of using manual interpretation, I want to try using Object-Based classification based on the Orfeo Toolbox in QGIS Processing.

However, I cannot find any tutorial that explains how to do it in QGIS. In the Orfeo guide, the steps are

  1. Image segmentation (the whole or only parts of it);
  2. Image to LabelObjectMap (a kind of std::map) transformation;
  3. Eventual relabeling;
  4. Attribute computation for the regions using the image before segmentation:
  5. Object filtering
  6. LabelObjectMap to image transformation.

But I cannot find any specific step-by-step, which geo algorithm to use. I tried to follow LSMC (Large-Scale Mean-shift Classification) workflow, and also run Segmentation (Meanshift). The LSMC result was quite good, but I have no idea what to do next to label the object (or make a training object) and classify it. LSMS and Meanshift result

I tried the TrainImageClassifier(SVM), TrainORGLayerClassifier, ORGLayerClassifier, but there were no outputs came out. I tried to find some tutorials, but could not find any. I am totally confused about the workflow.

1 Answer 1


I found a tutorial here

But it is not that helpful, as when I am in the preparation of reference data (join attributes by location), it results in shapefile, and there is no XML file. Meanwhile, the next step requires an XML file. Still stuck.

In the end, I classified them based on ruleset like eCognition, but have to write the script down in field calculator

The XML file in the next step is for output ... doc. says:

"Output XML file: XML filename where the statistics are saved for future reuse."

SORRY, this manual is of different tool... really seems, that something is missing in that tutorial. I will try to use scikit-learn. As I have now layer with segments and its features (in 4th step of segmentation I have used as an input stack of layers, which I want to use as classification features). I will report here.

  • Regarding the saving of XML files and empty outputs, the most likely reason is a QGIS version issue. The Orfeo Toolbox runs better in QGIS 2.14, see my answer here: gis.stackexchange.com/questions/267178/…
    – 15Step
    Jan 30, 2018 at 13:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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