Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
otb-documents
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main Repositories
otb-documents
Commits
e3cdcd21
Commit
e3cdcd21
authored
7 years ago
by
santipe83
Browse files
Options
Downloads
Patches
Plain Diff
DOC: remove previous version of otb app python merged now in apps-python
parent
b1057978
No related branches found
No related tags found
2 merge requests
!2
Otb app python
,
!1
Otb app python
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Courses/org/WorkshopGuide/otb-apps-python-en.org
+0
-82
0 additions, 82 deletions
Courses/org/WorkshopGuide/otb-apps-python-en.org
Courses/org/WorkshopGuide/otb-apps-python-fr.org
+0
-34
0 additions, 34 deletions
Courses/org/WorkshopGuide/otb-apps-python-fr.org
with
0 additions
and
116 deletions
Courses/org/WorkshopGuide/otb-apps-python-en.org
deleted
100644 → 0
+
0
−
82
View file @
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.
#+begin_center
#+ATTR_LaTeX: width=0.95\textwidth center
[[file:Images/lluvias-peru.jpg]]
#+end_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
application
- Example:
#+begin_src python
import otbApplication
orth=otb.Registry.CreateApplication("OrthoRectification")
#+end_src
*** Syntax
- Getters
#+begin_src python
app.GetParametersKeys()
#+end_src
- Setters
#+begin_src python
app.SetParameterString("in", argv[1])
#+end_src
- 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)
#+end_src
- Use:
#+begin_src python
ExtractROI.STARTX=140
#+end_src
- 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
- [[https://www.orfeo-toolbox.org/CookBook/OTB-Applications.html][Introduction to OTB applications]]
- [[https://www.orfeo-toolbox.org/CookBook/Applications.html][Application Reference Documentation]]
- Application help: /otbcli\textunderscore{}XXX -help/
This diff is collapsed.
Click to expand it.
Courses/org/WorkshopGuide/otb-apps-python-fr.org
deleted
100644 → 0
+
0
−
34
View file @
b1057978
** 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.
#+begin_center
#+ATTR_LaTeX: width=0.95\textwidth center
[[file:Images/lluvias-peru.jpg]]
#+end_center
(photo Twitter de @hombredeltiempo)
*** OTB-Applications en Python
#+begin_src python
import otbApplication
orth=otb.Registry.CreateApplication("OrthoRectification")
#+end_src
*** Liens utiles
- [[https://www.orfeo-toolbox.org/CookBook/CookBookse1.html#x7-60001.1][Introduction aux OTB applications]]
- [[https://www.orfeo-toolbox.org//Applications/][Documentation de référence des applications]]
- [[https://www.orfeo-toolbox.org/CookBook/CookBookch3.html#x38-370003][Exemples utilisation des OTB applications]]
- Aide d'une application: /otbcli\textunderscore{}XXX -help/
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment