Error with OTB segmentation-meanshift


#2

Hi,

Have you defined the OTB_BIN_DIR variable before installing the plugin?


Beta OTB Adapters available
#3

Yes i have defined the OTB_BIN_DIR variable after installing the plugin
But I have the same error :
otbcli.bat’ n’est pas reconnu en tant que commande interne
ou externe, un programme ex‚cutable ou un fichier de commandes.
Process exited with value 1
Finished tool execution in 0 seconds’


#4

After setting the variable you have to restart SNAP. And please, check also in Tools -> Manage External Tools -> Segmentation-meanshift -> Edit -> System Variables that both variables are activated:


Errors using Orfeo Toolbox
#5

can you run otbcli_Segmentation.bat from your windows command line or does this also produce an error?


#6

hi ABraun,
yes i run otbcli_Segmentation.bat from the windows command line and i have this result


#7

that means it technically works, good.

Try adding the whole path to this file in the OTB_BINSEGMENTATION_MEANSHIFT_EXEC key in SNAPs system variables.


#8

yes i add the whole path, is that correct


#9

if the file was installed there, yes.

I for example installed it under
C:\GIS\OTB-5.8.0-win64\bin

Depends on where you installed otb.

I would also check the OTB_BIN_DIR variable.


#10

yes the instelled file is in C:\Program Files\snap\java\bin

this is the OTB_BIN_DIR variable

but i have the following error


#11

can you please translate the error message in your first post?
We might be missing something…


#12

this is the error message in my first post

Otbcli.bat ‘is not recognized as an internal command
Or external, an executable program or a batch file.
Process exited with value 1
Finished tool execution in 0 seconds’ commands.

First I downloaded the compressed OTB file, after I uncompressed the contents of the folder in the directory C: \ Program Files \ snap \ java, after I installed the plugin in SNAP

Is this right ???


#13

yes.

for me this configuration works:

I also added this path which contains all the *.bat files

C:\GIS\OTB-5.8.0-win64\bin

to my Windows PATH variable and made one new OTB_APPLICATION_PATH as suggested here:
https://www.orfeo-toolbox.org/CookBook/OTB-Applications.html

please make sure that your c:\Program Files \snap \ java really contains the file otbApplicationLauncherCommandLine.exe
I would rather install the OTB file in a different directory instead of using snaps JAVA path.


#14

Hello ABraun,
Thanks for your reply, I followed you remarks, and I got another error

Ossimplugins :: ossimSentinel1Model :: open manifest.safe not found. But checking if xml file is valid
Ossimplugins :: ossimSentinel1Model :: open! XmlFileName.exists () || ! This-> readProduct (xmlFileName) fails
Ossimplugins :: ossimSentinel1Model :: open manifest.safe not found. But checking if xml file is valid
Ossimplugins :: ossimSentinel1Model :: open! XmlFileName.exists () || ! This-> readProduct (xmlFileName) fails
Finished tool execution in 57 seconds


#15

did you apply the segmentation directly on a S1 scene? Because the error message searches “manifest.safe”

I would try making a subset of your image and save it in the BEAM Dimap format first.

Then apply the module on the saved subset and see if the error is related to the input data format.


#16

I applied the segmentation on the saved subset and i have this error


#17

the error indicates that you chose an invalid input file.

Did you click File > Save product after subsetting?
Name it “subset.dim” or anything simple, save it and try again please. Maybe the name is too long (“invalid image filename”)


#18

Yes this is what i did, but i get the same error, i tried to applied the segmentation on all the granule in L2A level and an error is showed again ‘manifest.safe not found’ but i have this file in the directory of the image.
Does this tool work for you ???


#19

I thought it would. But I am getting the same error about the hdr-file now.

What I tried:

  • Converting to Integer (better for the algorithm)
  • Saving in ENVI or GeoTiff format

None of them worked.

I however found that you don’t get proper results when you use data scaled between 0.0 and 1.0
When I made an integer out of it, it at least works in QGIS using the OTB operator:


#20

Hi,

currently OTB tools are only working with image files. The dimap format is not supported, but it should work if you save the image in GeoTiff format.


#21

How to define the working directory for the OTB because at the time of execution it gave an error of working path is not defined?

I have checked the box many times in OTB_DIR and save it but reopen of the same external plugin gave an unchecked box to me.

How to define the bundle binaries for the OTB?

Please help me in the issues of OTB segmentation.