I've tried the whole weekend to get the Orfeo Tool Box running in QGIS 2.18.19 (stand-alone version) and today I finally managed it by setting the paths to the bin-folder of the stand-alone version on Orfeo Toolbox 6.4.0. Now it finally shows the menu in the processing tool box and I thought, I finally made it work


I tried to execute the Unsupervised K-Means Image Classification and it failed, because the parameter for convergence threshold (-ct) doesn't exist in the application. So I ran the otbgui_KMeansClassification.bat in the OSGEO4W Shell and saw, that there really is no parameter for convergence threshold like it used to be in OTB 5.0.

Im not sure if I already made a mistake with how I got the OTB running in QGIS (my way feels kind of awkward and there might be an easier solution). But now Im completely clueless on how I can execute the Image classification.

Maybe somebody knows how to deal with this.

This is the log:

Algorithm Unsupervised KMeans image classification starting...
ERROR: Parameter -ct does not exist in the application. 
Converting outputs
Loading resulting layers
The following layers were not correctly generated.
Output Image
You can check the log messages to find more information about the execution of the algorithm

1 Answer 1


Maybe the QGis descriptor isn't up to date with latest OTB release. A quick hack would consist in modifying it manually. Open your file browser, be sure to show hidden files and folders, and go to some path like


Inside this path, there is a lot of .xml files that describe OTB applications. In your case, you can edit the KMeansClassification.xml and remove the ct block parameter (Make a copy before editing!).

This should do the trick waiting for the update in QGIS/OTB.

  • That helped - even if the path was more complicated since I didnt install QGIS with OSGEO4W64 - so I had to look through the QGIS-folder in C:\Programs\...
    – Spuddeline
    May 16, 2018 at 18:00

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.