Hello,

can you have a look at this test code and see if the fix works for you?

I had to call SetParameterUserValue method for extractroi to work. 
ExtractROI.SetParameterUserValue("sizex", True)

https://github.com/orfeotoolbox/OTB/blob/master/Modules/Wrappers/SWIG/test/python/PythonNumpyTest.py#L24

On Friday, October 7, 2016 at 10:00:14 AM UTC+2, Cécile Cazals wrote:
>
> Hello,
>
> I am trying to use OTB with Python, beginning by a simple image subset 
> using ExtractROI.
>
> The following command line works fine :
> otbcli_ExtractROI -in s1_vv.tif -mode fit -mode.fit.ref emprise.tif -out 
> s1_vv_Extract.tif
>
> The following python code works fine :
> import otbApplication
> ExtractROI = otbApplication.Registry.CreateApplication("ExtractROI")
> ExtractROI.SetParameterString("in",'s1_vv.tif')
> ExtractROI.SetParameterString("startx",'820')
> ExtractROI.SetParameterString("starty",'500')
> ExtractROI.SetParameterString("sizex",'308')
> ExtractROI.SetParameterString("sizey",'444')
> ExtractROI.SetParameterString("out", "s1_vv_Extract.tif")
> ExtractROI.ExecuteAndWriteOutput()
>
> But the following python code returns "Erreur de segmentation (core 
> dumped)"
> import otbApplication
> ExtractROI = otbApplication.Registry.CreateApplication("ExtractROI")
> ExtractROI.SetParameterString("in",'s1_vv.tif')
> ExtractROI.SetParameterString("mode",'fit')
> ExtractROI.SetParameterString("mode.fit.ref",'emprise.tif')
> ExtractROI.SetParameterString("out", "s1_vv_Extract.tif")
> ExtractROI.ExecuteAndWriteOutput()
>
> I can't understand what is happening... It seams that all functions using 
> parameters with '.' like 'io.in' does the same.
> You will find attached the images used.
>
> Many thanks in advanced for any advice !
>
> Cécile
>
>

-- 
-- 
Check the OTB FAQ at
http://www.orfeo-toolbox.org/FAQ.html

You received this message because you are subscribed to the Google
Groups "otb-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/otb-users?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"otb-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to