On Thu, Apr 9, 2015 at 3:21 PM, Pugazhendhi N <[email protected]> wrote:
> Hi All,
>
> I am new to Orfeo, I have installed QGIS v2.8.1 and OSGeo4W in my sys and
> I am using windows7 OS(win32).
>
> I have configured OTB with Qgis Python2.7 by copying the 3
> files(_otbApplication.pyd, otbApplication.py, otbApplication.pyc) from
> "C:\OSGeo4W\apps\orfeotoolbox\python\" to "C:\Program Files (x86)\QGIS
> Wien\apps\Python27\Lib\site-packages\".
>
> I am using Landsat8 image with 7 bands and the size of the image is 15mb.
> I have taken this example from otb cookbook and tried to run the following
> code in Qgis Python and ending up with the below error
>
> # Import the otb applications package
> import otbApplication
>
> img = r"D:\\temp\\landsat8.img"
> filterImg = "D:\\temp\\filter.tif"
> spatialImg = "D:\\temp\\spatial.tif"
> MeanShiftSmoothing =
> otbApplication.Registry.CreateApplication("MeanShiftSmoothing")
>
> MeanShiftSmoothing.SetParameterString("in", img)
> MeanShiftSmoothing.SetParameterString("fout", filterImg)
> MeanShiftSmoothing.SetParameterString("foutpos", spatialImg)
> MeanShiftSmoothing.SetParameterInt("spatialr", 16)
> MeanShiftSmoothing.SetParameterFloat("ranger", 16)
> MeanShiftSmoothing.SetParameterFloat("thres", 0.1)
> MeanShiftSmoothing.SetParameterInt("maxiter", 100)
> # The following line execute the application
> MeanShiftSmoothing.ExecuteAndWriteOutput()
>
>
will come back to python, but do you have the same error when using
otbcli_MeanShiftSmoothing or otgui_MeanShiftSmoothing ?
you can launch them from osgeo4w shell(cmd) not from the osgeo4w msys
>
>
> Error:
> File "<input>", line 1, in <module>
> File "c:/users/abc/appdata/local/temp/tmp94byjq.py", line 17, in <module>
> MeanShiftSmoothing.ExecuteAndWriteOutput()
> File
> "C:\PROGRA~2\QGISWI~1\apps\Python27\lib\site-packages\otbApplication.py",
> line 871, in ExecuteAndWriteOutput
> def ExecuteAndWriteOutput(self): return
> _otbApplication.Application_ExecuteAndWriteOutput(self)
> RuntimeError: Exception thrown in otbApplication
> Application_ExecuteAndWriteOutput:
> c:\users\jmalik\dashboard\src\itkv4\modules\core\common\include\itkImportImageContainer.hxx:192:
> Failed to allocate memory for image.
>
> Am I doing anything wrong in configuring the otb application with qgis? or
> anything else?
>
> Thanks
>
> --
> --
> 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.
>
--
Regards,
Rashad
--
--
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.