1

I have an old aerial image that I am trying to use Orfeo Toolbox's Segmentation tool in QGIS on. The image is grey-scale. I don't know if this is a problem or not, but I am experimenting at this point, I haven't used image analysis before. It would be great if I could get this to work, I have a few images like this that I would like to use.

enter image description here

I found a youtube video to run a meanshift segmentation to get me started. The video left the defaults in the options window of Segmentation, so I did the same. The log of the operation follows:

Algorithm Segmentation (meanshift) starting...
\otbcli_Segmentation
-in
"C:\Users\d\Documents\GIS\Musklutifs\Musk002.tif"
-filter
meanshift
-filter.meanshift.spatialr
5
-filter.meanshift.ranger
15
-filter.meanshift.thres
0.1
-filter.meanshift.maxiter
100
-filter.meanshift.minsize
100
-mode
vector
-mode.vector.outmode
ulco
-mode.vector.neighbor
true
-mode.vector.stitch
true
-mode.vector.minsize
1
-mode.vector.simplify
0.1
-mode.vector.layername
layer
-mode.vector.fieldname
DN
-mode.vector.tilesize
1024
-mode.vector.startlabel
1
-mode.vector.out
"C:\Users\d\AppData\Local\Temp\processing5cb9f70856de45bfa3be2c41f8dad49d\04296f5ee3534a49a59470503afd57aa\mode.vector.out.shp"
'"\otbcli_Segmentation"' is not recognized as an internal or external command, operable program or batch file. 
Converting outputs
Loading resulting layers

The following layers were not correctly generated.
Output vector file
You can check the log messages to find more information about the execution of the algorithm

To see if it was just the grey-scale image, I also used the tool with a color raster. The operation failed with the same log message. I just updated to QGIS 2.18.3 with the OTB-__ library (forgot which one it's supposed to be) in the advanced install before trying to use this tool.

1

The problem was apparently not having the correct setting for Orfeo in Processing>Options>Provider. For Windows (7), the OTB applications folder should be set to "C:[path to OSGEO4W64 directory]\apps\orfeotoolbox" and the OTB commandline tools folder should be set to "C:[path to OSGEO4W64 directory]\bin".

0

Thanks for sharing the configuration issue in QGIS. You could also at first test otb applications including the segmentation application "out of the box" with the standalone installers:

https://www.orfeo-toolbox.org/download/

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.