Hi Jamie,

Can you try to replace:

Pansharpening.AddChoice("method", "method rcs") by 
Pansharpening.AddChoice("method", "rcs")

To try other method, change “rcs” to “lmvm” or “bayes”.

Can you please tell us if you find this Python snippet in the OTB doc. If it is 
the case we should probably correct this.

Thanks for your report. Let me know if it solves your problem.

Regards,

Manuel

De : [email protected] [mailto:[email protected]] De la part 
de Jamie Xu
Envoyé : mercredi 29 juillet 2015 19:57
À : otb-users
Objet : [otb-users] Python pansharpening Code syntax

Just wondering what the correct syntax is for choosing the pansharpening 
algorithm?
Just following the example from the cookbook I've tried adding the highlighted 
line to choose the rcs algorithm but I get an attribute error.  Also how would 
I choose the bayes or lmvm algorithm?
thanks


#!/usr/bin/python

# Import the otb applications package

import otbApplication

# The following line creates an instance of the Pansharpening application

Pansharpening = otbApplication.Registry.CreateApplication("Pansharpening")

# The following lines set all the application parameters:

Pansharpening.SetParameterString("inp", "QB_Toulouse_Ortho_PAN.tif")

Pansharpening.SetParameterString("inxs", "QB_Toulouse_Ortho_XS.tif")

Pansharpening.SetParameterString("out", "Pansharpening.tif")

Pansharpening.SetParameterOutputImagePixelType("out", 1)

Pansharpening.AddChoice("method", "method rcs")

# The following line execute the application

Pansharpening.ExecuteAndWriteOutput()
--
--
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]<mailto:[email protected]>
To unsubscribe from this group, send email to
[email protected]<mailto:[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]<mailto:[email protected]>.
For more options, visit https://groups.google.com/d/optout.

-- 
-- 
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