Commit e3cdcd21 authored by santipe83's avatar santipe83

DOC: remove previous version of otb app python merged now in apps-python

parent b1057978
** The Orfeo ToolBox Application mechanism :slides:
*** Data and Objectives
**** Objectives
- Know how to set the environnement to use OTB application in Python
- Know how to set application parameter in Python
- Know how to use in memory connection of applications
- Know how to use OTB/NumPy bridge.
**** Data
Data can be found in folder ~Data/otb-python/~.
*** Outline
This exercise consists in coding a Python script to perform surface water
extraction on Sentinel-2 images over the area of /Laguna la nina/ in Peru.
#+ATTR_LaTeX: width=0.95\textwidth center
(Twitter pic from @hombredeltiempo)
*** Quick introduction to OTB applications
- Orfeo ToolBox is a *library* offering remote sensing features
- Often several features of OTB must be combined within a processing chain
- Need for higher level interfaces (parameters, input and output data, logs ...)
- Each application corresponds to a high level function (segmentation, orthorectification, raster calculator ...)
- And corresponds to a C++ class (/otb::Application/) $\rightarrow$ library
- Plugin mechanism
- One can develop and distribute his/her own homemade applications
*** OTB applications in Python
- Library called *otbApplication*
- 2 main classes can be manipulated:
- Registry: list available applications (or create some)
- Application: base class for all applications (interact with an
- Example:
#+begin_src python
import otbApplication
*** Syntax
- Getters
#+begin_src python
- Setters
#+begin_src python
app.SetParameterString("in", argv[1])
- How to launch an application
- Execute() -> wire the pipeline
- ExecuteAndWriteOutput() -> wire the pipeline and write output
*** Syntactic sugar
- Instead of:
#+begin_src python
ExtractROI.SetParameterInt('startx', 140)
- Use:
#+begin_src python
- Upper case is mandatory for now
*** In-memory connection
- Applications are often use as parts of larger workflow
- Heavy I/O operations generally in remote sensing image processing
- Connect output parameter from app1 to the input parameter of app2
- Available both in C++ API and Python
- Related to ITK/OTB streaming mechanisms
*** NumPy bridge
- Plug OTB into any image processing chain in Python
- Use etImageFromNumpyArray() and SetImageFromNumpyArray() methods
*** Useful links
- [[][Introduction to OTB applications]]
- [[][Application Reference Documentation]]
- Application help: /otbcli\textunderscore{}XXX -help/
** Utiliser les applications OTB en Python (TODO) :slides:
*** Objectifs et données
**** Objectifs
- Savoir configurer l'environnement pour utiliser les applications en Python
- Savoir paramétrer une application OTB en Python
- Savoir utiliser la connexion en mémoire entre applications
- Savoir utiliser le /bridge/ entre OTB et NumPy
**** Données
Les données se trouvent dans le répertoire ~Data/otb-python/~.
*** Déroulement
Le TP consiste à mettre en place un script Python pour réaliser l'extraction
des surfaces en eaux dans une série d'images Sentinel-2 sur le zone de
/Laguna la nina/ au Pérou.
#+ATTR_LaTeX: width=0.95\textwidth center
(photo Twitter de @hombredeltiempo)
*** OTB-Applications en Python
#+begin_src python
import otbApplication
*** Liens utiles
- [[][Introduction aux OTB applications]]
- [[][Documentation de référence des applications]]
- [[][Exemples utilisation des OTB applications]]
- Aide d'une application: /otbcli\textunderscore{}XXX -help/
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment