Hi all, I'm working on some code like what's in the cookbook examples (e.g.
http://www.orfeo-toolbox.org/CookBook/CookBooksu108.html). It looks like
this at the moment:
Segmentation = otbApplication.Registry.CreateApplication("Segmentation")
>
> # The following lines set all the application parameters:
> Segmentation.SetParameterString("in", compositeFileName)
> Segmentation.SetParameterString("mode.raster.out", rasterSegmentsFileName)
> Segmentation.SetParameterString("filter","meanshift")
> Segmentation.SetParameterString("mode","raster")
> Segmentation.SetParameterInt("filter.meanshift.spatialr",spatial_radius)
> Segmentation.SetParameterFloat("filter.meanshift.ranger",range_radius)
> Segmentation.SetParameterFloat("filter.meanshift.thres",threshold)
> Segmentation.SetParameterInt("filter.meanshift.maxiter",max_iterations)
> Segmentation.SetParameterInt("filter.meanshift.minsize",min_size)
> Segmentation.SetParameterOutputImagePixelType("mode.raster.out", 3)
>
> # The following line executes the application
> Segmentation.ExecuteAndWriteOutput()
With the image I'm working on, the memory consumed by the Python process is
~40MB before I run this piece of code, and ~550MB after. All the memory is
taken up when the first line, which creates the otbApplication, is run. I'm
looking for a good way to free up the memory after the last line, which
write the desired result to file. I've searched for something like
*otbApplication.Registry.DestroyApplication()*, but that doesn't exist.
I've tried *Segmentation = None*, doesn't work either.
Any ideas? Anything in the cookbook? (If not, probably worth putting
something in there)
--
--
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.