I'm trying to classify a raster with PyQGIS:
import processing
processing.runalg("otb:unsupervisedkmeansimageclassification","FalseColor.tif",128,None,100,3,1000,0.95,"class.tif",None)
The python console indicate :
AttributeError: module 'processing' has no attribute 'runalg'
It is a little bit surprising because I've followed the QGIS documentation. https://docs.qgis.org/testing/en/docs/user_manual/processing_algs/otb/learning.html#unsupervised-kmeans-image-classification
I've seen this post: QGIS 3.0 Error when calling processing.runalg()
I've tried with processing.run
:
processing.run("otb:unsupervisedkmeansimageclassification","FalseColor.tif",128,None,100,3,1000,0.95,"class.tif",None)
The python console indicate :
TypeError: run() takes from 2 to 5 positional arguments but 10 were given
Is there an updated documentation about the algorithm otb:unsupervisedkmeansimageclassification
?