Using OTB algorithms in QGIS Model Designer

Hello,

I would like to use the OTB algorithms in the Model Designer of QGIS.

I first used the “Segmentation” algorithm, but it seems not to be valid. I receive this error :

The “Segmentation” algorithm is invalid, because:

  • Value for filter.cc.expr is not acceptable for this parameter

Is there a way to make it usable in the Model Designer ?

I’m not sure if I’ll be able to use the output model from the “TrainVectorClassifier” afterward, on the Model Designer, but this is another issue.

Configuration setup
Windows10
Version of the OTB: 8.0.1
I installed the OTB with: Can’t remember
QGIS version: 3.26.0-Buenos Aires

Thank you for your attenion,
Bye !

Dear @Jib,

Thank you for using OTB.

The output of “TrainVectorClassifier” application is a model file that you can use with the “VectorClassifier” application. I don’t think you will be able to use it with Model Designer of QGIS.

When using the “Segmentation” application, you can select the segmentation algorithm with the -filter [meanshift|cc|watershed|mprofiles] parameter. If you select the cc (Connected Components) algorithm, you are expected to provide the -filter.cc.expr string parameter, to precise the connection condition for the algorithm, written as a mathematical expression. For example, you could set this parameter to intensity_p2 > 0.5.

Your error means that the mathematical expression provided is not built correctly.

1 Like

Thank you for your answer !