Commit 55444874 authored by Manuel Grizonnet's avatar Manuel Grizonnet

Merge branch 'otb_app_python' into 'master'

Otb app python

See merge request !2
parents f3ba6987 da6e2e1b
......@@ -50,13 +50,13 @@ Install a minimal command line environment for Windows. For instance, Git for Wi
To install OTB and Monteverdi, download the appropriate package for your architecture (32 or 64 bits). If you have a 32 bit machine:
\begin{verbatim}
OTB-6.2.0-rc1-Win32.zip
OTB-6.4.0-Win32.zip
\end{verbatim}
If you have a 64 bit machine:
\begin{verbatim}
OTB-6.2.0-rc1-Win64.zip
OTB-6.4.0-Win64.zip
\end{verbatim}
These files are available at:
......@@ -80,7 +80,7 @@ $\rightarrow$ "OTB-Applications browser".
(see figure \ref{fig:windows-mapla}).
\item Go to the \texttt{bin} folder in the OTB install directory and double-click on the \texttt{.bat} file corresponding to the application to be run, for instance:\\
\texttt{John{\textbackslash}install{\textbackslash}OTB-6.2.0-rc1-win32{\textbackslash}bin{\textbackslash}otbgui\_Rescale.bat}
\texttt{John{\textbackslash}install{\textbackslash}OTB-6.4.0-win32{\textbackslash}bin{\textbackslash}otbgui\_Rescale.bat}
(see figure \ref{fig:windows-otbgui}).
\end{enumerate}
......@@ -159,15 +159,15 @@ Download the self-extracting binary for Linux (64 bits), available at:
The self-extracting binary will extract itself in the current directory. First, the archive has to be made executable, and then it can be run:
\begin{verbatim}
chmod +x OTB-6.2.0-rc1-Linux64.run
./OTB-6.2.0-rc1-Linux64.run
chmod +x OTB-6.4.0-Linux64.run
./OTB-6.4.0-Linux64.run
\end{verbatim}
The executable binaries will be inside the 'bin' directory, and you can put this directory in your PATH variable if you want to.
There are also scripts which set all the environment variables to allow to run Monteverdi and Mapla:
\begin{verbatim}
cd OTB-6.2.0-rc1-Linux64
cd OTB-6.4.0-Linux64
./monteverdi.sh
./mapla.sh
\end{verbatim}
......@@ -194,8 +194,41 @@ $\rightarrow$ "OTB-Applications browser".
The software can also be installed on Mac OS X.
First install QGIS using the instructions for Mac OS X on the official site. To install OTB and Monteverdi download
OTB-6.2.0-rc1-Darwin64.run from \url{https://www.orfeo-toolbox.org/download/}.
OTB-6.4.0-Darwin64.run from \url{https://www.orfeo-toolbox.org/download/}.
This is a self-extracting binary which extracts itself in the current directory. Testing the installation is done like in the Linux case.
\clearpage
\section{Python install for OTB}
Starting from OTB 5.8.0, OTB bindings for Python 2.7 are distributed with binary package. With OTB 6.4.0, additional bindings for Python 3.5 are also included. Please note that using a different Python version may not be compatible with OTB wrappings. If no compatible Python 2.x version is found a notification is generated during the installation process. If the installation completes without issue, information relating to your Python bindings will be provided.
You must have Python numpy bindings installed in your system. They can be installed locally without admin rights as follows: “pip install –user numpy”. This is to give users the option to select their own existing Python installation rather than the one dibstributed by the OTB package.
By default, bindings for Python 2.7 will be enabled with the otbenv script. If you want to use bindings for Python 3.5, you can copy this script and modify:
\begin{verbatim}
lib/python into lib/python3, for variable PYTHONPATH
\end{verbatim}
Notes:
\begin{enumerate}
\item You must use monteverdi and mapla through mapla.sh and monteverdi.sh helper scripts in extracted directory.
\item The helper scripts for monteverdi and mapla set required environment variables
\item You might be tempted to move “OTB-6.4.0-Linux64” into another location say /usr/local/ after extraction. But avoid this action!
\item To have “OTB-6.4.0-Linux64” installed in /usr/local or /opt execute “OTB-6.4.0-Linux64.run” in that directory.
\item Multiple installation of OTB can exists in same system without one conflicting the other!
\end{enumerate}
\subsection{Test}
In order to test the Python OTB dependencies, try:
\begin{enumerate}
\item Load the environment variables (Linux : sourcing the otb.profile; Windows: executing otbenv.bat)
\item Launch the python console (Linux: execute python ; Windows: python.exe)
\item Execute in the python console : import numpy
\item Execute in the python console : import otbApplication
\end{enumerate}
If no error message is printed after the import commands, everything is fine. If not, check the Python version (2.7 or 3.5), and the PATH,OTB_APPLICATION_PATH and PYTHONPATH variables.
\end{document}
This diff is collapsed.
......@@ -60,10 +60,8 @@ orth=otb.Registry.CreateApplication("OrthoRectification")
*sqrt(im1b1*im1b1+im1b2*im1b2+im1b3*im1b3)))"
- -exp "im1b1>0.5?255:0"
*** Useful links
- [[https://www.orfeo-toolbox.org/CookBook/CookBookse1.html#x7-60001.1][Introduction to OTB applications]]
- [[https://www.orfeo-toolbox.org//Applications/][Application Reference Documentation]]
- [[https://www.orfeo-toolbox.org/CookBook/CookBookch3.html#x38-370003][Examples of use]]
- [[http://docs.qgis.org/2.8/en/docs/user_manual/processing/index.html][QGIS processing]]
- [[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/
** The Orfeo ToolBox Application mechanism :guide:
*** Description :desc:
......
......@@ -65,10 +65,8 @@ orth=otb.Registry.CreateApplication("OrthoRectification")
*sqrt(im1b1*im1b1+im1b2*im1b2+im1b3*im1b3)))"
- -exp "im1b1>0.5?255:0"
*** 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]]
- [[http://docs.qgis.org/2.8/en/docs/user_manual/processing/index.html][QGIS processing]]
- [[https://www.orfeo-toolbox.org/CookBook/OTB-Applications][Introduction aux OTB applications]]
- [[https://www.orfeo-toolbox.org/CookBook/Applications.html][Documentation de référence des applications]]
- Aide d'une application: /otbcli\textunderscore{}XXX -help/
** Le mécanisme des applications *Orfeo ToolBox* :guide:
*** Description :desc:
......
......@@ -51,6 +51,7 @@ image processing chains using OTB applications, including:
- Classification
- Segmentation
- Synthetic Aperture Radar processing
- OTB Application Python API
** Training kit
*** Data package
......@@ -130,4 +131,6 @@ For more information on these satellites:
#+INCLUDE: "segmentation-en.org" :minlevel 2
#+INCLUDE: "classification-en.org" :minlevel 1
* SAR processing on Sentinel-1 images
#+INCLUDE: "sar-en.org" :minlevel 2
#+INCLUDE: "sar-en.org" :minlevel 2
* Using OTB Application in Python
#+INCLUDE: "app-python-en.org" :minlevel 2
......@@ -122,3 +122,5 @@ Know how to set up OTB processing and use OTB applications to perform:
#+INCLUDE: "classification-en.org" :minlevel 2
* TP4: SAR processing with Sentinel-1
#+INCLUDE: "sar-en.org" :minlevel 2
* TP5: OTB Applications in Python
#+INCLUDE: "app-python-en.org" :minlevel 2
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