Skip to content
Snippets Groups Projects
Commit a6af49da authored by Manuel Grizonnet's avatar Manuel Grizonnet
Browse files

merge update_cookbook branch in develop

parents 1c8418eb 04c5befb
Branches
Tags
No related merge requests found
Showing
with 600 additions and 526 deletions
Documentation/Cookbook/Art/ClassifImages/sample-selection.png

1.1 MiB

Documentation/Cookbook/Art/ClassifImages/samples-extraction.png

82.8 KiB

Documentation/Cookbook/Art/residual_registration-figure.png

17.5 KiB

% How to export:
% ==============
% pdflatex img.tex
% pdftops -eps img.pdf
% convert -density 300 img.eps img.png
\documentclass[letterpaper,8pt]{article}
\usepackage[latin1]{inputenc}
\usepackage[pdftex]{graphicx}
\usepackage{tikz,amsmath}
\usetikzlibrary{arrows,snakes,backgrounds,patterns,matrix,shapes,fit,calc,shadows,plotmarks}
\usepackage[graphics,tightpage,active]{preview}
\PreviewEnvironment{tikzpicture}
\PreviewEnvironment{equation}
\PreviewEnvironment{equation*}
\newlength{\imagewidth}
\newlength{\imagescale}
\pagestyle{empty}
\thispagestyle{empty}
\begin{document}
\begin{tikzpicture}[scale=0.15]
\tiny
\draw[fill=black!10] (-1,-12) rectangle (75,17);
\foreach \x in {5,...,1}
\draw[fill=red] (\x,\x) rectangle +(4,4);
\node[fill=black!10, text width= 1.5cm] (InputSeries) at
(4,-1) {Input series};
%\pause
\draw[->,thick] (9,5) -- +(3,0);
%%\pause
\draw[fill=black!30,rounded corners=2pt] (12.2,3) rectangle +(6,4);
\node[text width= 0.8cm] (SensorModel) at (15,5) {Sensor Model};
%\pause
\draw[fill=red!30] (1,-10) rectangle +(4,4);
\node[fill=black!10, text width= 1.2cm] (DEM) at
(5,-11) {DEM};
%\pause
\draw[->,thick] (3,-5.5) -- ++(0,3) -- ++(12,0) -- ++(0,5);
%\pause
\draw[->,thick] (18.5,5) -- +(3,0);
%\pause
\foreach \x in {5,...,1}
\draw[fill=blue,xshift=600pt] (\x,\x) rectangle +(4,4);
\node[fill=black!10, text width= 2.8cm] (GeoRefSeries) at
(28,-1) {Geo-referenced Series};
%\pause
\draw[->,thick] (25.5,8.5) -- +(0,3);
\draw[fill=black!30,rounded corners=2pt] (22,12) rectangle +(8.5,4);
\node[text width= 1.5cm] (HomPoExtr) at (27,14) {Homologous Points};
\draw[->,thick] (21.5,14) -- +(-2.5,0);
\draw[fill=black!30,rounded corners=2pt] (11,12) rectangle +(8,4);
\node[text width= 1.3cm] (BBAdj) at (15.5,14) {Bundle-block Adjustement};
\draw[->,thick] (15,11.5) -- +(0,-4);
%\pause
\draw[->,thick] (30,5) -- +(3,0);
%\pause
\draw[fill=black!30,rounded corners=2pt] (33.2,2.5) rectangle +(6,4.5);
\node[text width= 0.7cm] (FineRegistration) at (36,4.9) {Fine Registration};
%\pause
\draw[->,thick] (39.5,5) -- +(3,0);
%\pause
\foreach \x in {5,...,1}
\draw[fill=green,xshift=1200pt] (\x,\x) rectangle +(4,4);
\node[fill=black!10, text width= 1.8cm] (RegistSeries) at
(47,-1) {Registered Series};
%\pause
\draw[->,thick] (36,2) -- ++(0,-10) -- ++(-30,0);
%\pause
\draw[->,thick] (52,5) -- +(3,0);
%\pause
\draw[fill=black!30,rounded corners=2pt] (55.2,2.5) rectangle +(6,4.5);
\node[text width= 0.7cm] (CartoProjection) at (57.5,4.9)
{Map Projection};
%\pause
\draw[->,thick] (61.5,5) -- +(3,0);
%\pause
\foreach \x in {5,...,1}
\draw[fill=yellow,xshift=1810pt] (\x,\x) rectangle +(4,4);
\node[fill=black!10, text width= 1.95cm] (CartoSeries) at
(68,-1) {Cartographic Series};
\end{tikzpicture}
\end{document}
......@@ -37,6 +37,7 @@ execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${RST_GENERATED_SOURC
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${RST_GENERATED_SOURCE_DIR}/recipes)
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${RST_GENERATED_SOURCE_DIR}/Art)
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${RST_GENERATED_SOURCE_DIR}/Art/MonteverdiImages)
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${RST_GENERATED_SOURCE_DIR}/Art/ClassifImages)
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${RST_GENERATED_SOURCE_DIR}/Art/QtImages)
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${RST_GENERATED_SOURCE_DIR}/_static)
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${RST_GENERATED_SOURCE_DIR}/_templates)
......@@ -57,6 +58,12 @@ foreach(mvd_image ${mvd_images})
configure_file(${mvd_image} ${RST_GENERATED_SOURCE_DIR}/Art/MonteverdiImages/${out_file} COPYONLY)
endforeach()
file(GLOB classif_images ${CMAKE_CURRENT_SOURCE_DIR}/Art/ClassifImages/*.*)
foreach(classif_image ${classif_images})
get_filename_component(out_file ${classif_image} NAME)
configure_file(${classif_image} ${RST_GENERATED_SOURCE_DIR}/Art/ClassifImages/${out_file} COPYONLY)
endforeach()
file(GLOB qt_images ${CMAKE_CURRENT_SOURCE_DIR}/Art/QtImages/*.png)
foreach(qt_image ${qt_images})
get_filename_component(out_file ${qt_image} NAME)
......
......@@ -34,8 +34,8 @@ The OTB Applications are now rich of more than 90 tools, which are
listed in the the applications reference documentation, presented in
chapter [chap:apprefdoc], page.
Using the applications
----------------------
Running the applications
------------------------
Common framework
~~~~~~~~~~~~~~~~
......@@ -170,8 +170,8 @@ The resulting graphical application displays a window with several tabs:
- Parameters is where you set the parameters and execute the
application.
- Logs is where you see the information given by the application
during its execution.
- Logs is where you see the output given by the application during its
execution.
- Progress is where you see a progress bar of the execution (not
available for all applications).
......@@ -223,7 +223,7 @@ configured automatically so you don’t need to tweak
Here is one example of how to use Python to run the ``Smoothing``
application, changing the algorithm at each iteration.
::
.. code-block:: python
# Example on the use of the Smoothing application
#
......@@ -264,6 +264,38 @@ application, changing the algorithm at each iteration.
# This will execute the application and save the output file
app.ExecuteAndWriteOutput()
Using OTB from QGIS
~~~~~~~~~~~~~~~~~~~
The processing toolbox
^^^^^^^^^^^^^^^^^^^^^^
OTB applications are available from QGIS. Use them from the processing
toolbox, which is accessible with Processing :math:`\rightarrow`
Toolbox. Switch to “advanced interface” in the bottom of the application
widget and OTB applications will be there.
.. figure:: Art/QtImages/qgis-otb.png
Using a custom OTB
^^^^^^^^^^^^^^^^^^
If QGIS cannot find OTB, the “applications folder” and “binaries folder”
can be set from the settings in the Processing :math:`\rightarrow`
Settings :math:`\rightarrow` “service provider”.
.. figure:: Art/QtImages/qgis-otb-settings.png
On some versions of QGIS, if an existing OTB installation is found, the
textfield settings will not be shown. To use a custom OTB instead of the
existing one, you will need to replace the otbcli, otbgui and library
files in QGIS installation directly.
Advanced applications capabilities
----------------------------------
Load/Save OTB-Applications parameters from/to file
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
......@@ -281,7 +313,7 @@ An example is worth a thousand words
-outxml saved_applications_parameters.xml
Then, you can run the applications with the same parameters using the
output xml file previously saved. For this, you have to use the inxml
output XML file previously saved. For this, you have to use the inxml
parameter:
::
......@@ -296,7 +328,7 @@ time
otbcli_BandMath -inxml saved_applications_parameters.xml
-exp "(im1b1 - im2b1)"
In this cas it will use as mathematical expression “(im1b1 - im2b1)”
In this case it will use as mathematical expression “(im1b1 - im2b1)”
instead of “abs(im1b1 - im2b1)”.
Finally, you can also launch applications directly from the command-line
......@@ -308,31 +340,128 @@ the application name. Use in this case:
otbApplicationLauncherCommandLine -inxml saved_applications_parameters.xml
It will retrieve the application name and related parameters from the
input xml file and launch in this case the BandMath applications.
Using OTB from QGIS
~~~~~~~~~~~~~~~~~~~
The processing toolbox
^^^^^^^^^^^^^^^^^^^^^^
OTB applications are available from QGIS. Use them from the processing
toolbox, which is accessible with Processing :math:`\rightarrow`
Toolbox. Switch to “advanced interface” in the bottom of the application
widget and OTB applications will be there.
.. figure:: Art/QtImages/qgis-otb.png
Using a custom OTB
^^^^^^^^^^^^^^^^^^
If QGIS cannot find OTB, the “applications folder” and “binaries folder”
can be set from the settings in the Processing :math:`\rightarrow`
Settings :math:`\rightarrow` “service provider”.
.. figure:: Art/QtImages/qgis-otb-settings.png
On some versions of QGIS, if an existing OTB installation is found, the
textfield settings will not be shown. To use a custom OTB instead of the
existing one, you will need to replace the otbcli, otbgui and library
files in QGIS installation directly.
input XML file and launch in this case the BandMath applications.
In-memory connection between applications
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Applications are often use as parts of larger processing
chains. Chaining applications currently requires to write/read back
images between applications, resulting in heavy I/O operations and a
significant amount of time dedicated to writing temporary files.
Since OTB 5.8, it is possible to connect an output image parameter
from one application to the input image parameter of the next
parameter. This results in the wiring of the internal ITK/OTB
pipelines together, allowing to perform image streaming between the
applications. There is therefore no more writing of temporary
images. The last application of the processing chain is responsible
for writing the final result images.
In-memory connection between applications is available both at the C++
API level and using the python bindings to the application presented
in the `Using the Python interface`_ section.
Here is a Python code sample connecting several applications together:
.. code-block:: python
import otbApplications as otb
app1 = otb.Registry.CreateApplication("Smoothing")
app2 = otb.Registry.CreateApplication("Smoothing")
app3 = otb.Registry.CreateApplication("Smoothing")
app4 = otb.Registry.CreateApplication("ConcatenateImages")
app1.IN = argv[1]
app1.Execute()
# Connection between app1.out and app2.in
app2.SetParameterInputImage("in",app1.GetParameterOutputImage("out"))
# Execute call is mandatory to wire the pipeline and expose the
# application output. It does not write image
app2.Execute()
app3.IN = argv[1]
# Execute call is mandatory to wire the pipeline and expose the
# application output. It does not write image
app3.Execute()
# Connection between app2.out, app3.out and app4.il using images list
app4.AddImageToParameterInputImageList("il",app2.GetParameterOutputImage("out"));
app4.AddImageToParameterInputImageList("il",app3.GetParameterOutputImage("out"));
app4.OUT = argv[2]
# Call to ExecuteAndWriteOutput() both wires the pipeline and
# actually writes the output, only necessary for last application of
# the chain.
app4.ExecuteAndWriteOutput()
**Note:** Streaming will only work properly if the application internal
implementation does not break it, for instance by using an internal
writer to write intermediate data. In this case, execution should
still be correct, but some intermediate data will be read or written.
Parallel execution with MPI
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Provided that Orfeo ToolBox has been built with MPI and SPTW modules
activated, it is possible to use MPI for massive parallel computation
and writing of an output image. A simple call to ``mpirun`` before the
command-line activates this behaviour, with the following logic. MPI
writing is only triggered if:
- OTB is built with MPI and SPTW,
- The number of MPI processes is greater than 1,
- The output filename is ``.tif`` or ``.vrt``
In this case, the output image will be divided into several tiles
according to the number of MPI processes specified to the ``mpirun``
command, and all tiles will be computed in parallel.
If the output filename extension is ``.tif``, tiles will be written in
parallel to a single Tiff file using SPTW (Simple Parallel Tiff Writer).
If the output filename extension is ``.vrt``, each tile will be
written to a separate Tiff file, and a global VRT_ file will be written.
.. _VRT: http://gdal.org/gdal_vrttut.html
Here is an example of MPI call on a cluster::
$ mpirun -np $nb_procs --hostfile $PBS_NODEFILE \
otbcli_BundleToPerfectSensor \
-inp $ROOT/IMG_PHR1A_P_001/IMG_PHR1A_P_201605260427149_ORT_1792732101-001_R1C1.JP2 \
-inxs $ROOT/IMG_PHR1A_MS_002/IMG_PHR1A_MS_201605260427149_ORT_1792732101-002_R1C1.JP2 \
-out $ROOT/pxs.tif uint16 -ram 1024
------------ JOB INFO 1043196.tu-adm01 -------------
JOBID : 1043196.tu-adm01
USER : michelj
GROUP : ctsiap
JOB NAME : OTB_mpi
SESSION : 631249
RES REQSTED : mem=1575000mb,ncpus=560,place=free,walltime=04:00:00
RES USED : cpupercent=1553,cput=00:56:12,mem=4784872kb,ncpus=560,vmem=18558416kb,
walltime=00:04:35
BILLING : 42:46:40 (ncpus x walltime)
QUEUE : t72h
ACCOUNT : null
JOB EXIT CODE : 0
------------ END JOB INFO 1043196.tu-adm01 ---------
One can see that the registration and pan-sharpening of the
panchromatic and multi-spectral bands of a Pleiades image has bee split
among 560 cpus and took only 56 seconds.
Note that this MPI parallel invocation of applications is only
available for command-line calls to OTB applications, and only for
images output parameters.
......@@ -3,15 +3,13 @@ Recipes
This chapter presents guideline to perform various remote sensing and
image processing tasks with either , or both. Its goal is not to be
exhaustive, but rather to help the non-developper user to get familiar
exhaustive, but rather to help the non-developer user to get familiar
with these two packages, so that he can use and explore them for his
future needs.
.. toctree::
:maxdepth: 6
recipes/pleiades.rst
recipes/optpreproc.rst
recipes/sarprocessing.rst
recipes/residual_registration.rst
......
......@@ -63,9 +63,6 @@ sensors are :
- Formosat
Optical calibration with **OTB Applications**
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The *OpticalCalibration* application allows to perform optical
calibration. The mandatory parameters are the input and output images.
All other parameters are optional. By default the level of calibration
......@@ -84,40 +81,6 @@ A basic TOC calibration task can be performed with the following command:
otbcli_OpticalCalibration -in input_image -out output_image -level toc
Optical calibration with **Monteverdi**
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
These transformations can also be done in **Monteverdi** .
The 6S model needs atmospheric parameters to be able to compute
radiative terms to estimate the atmospheric contributions on the input
signal. Default parameters are available in the module. For atmospheric
parameters, it is possible to indicate AERONET file. The AERONET
(AErosol RObotic NETwork) program is a federation of ground-based remote
sensing aerosol networks established by NASA and PHOTONS (Univ. of Lille
1, CNES, and CNRS-INSU) and is greatly expanded by collaborators from
national agencies, institutes, universities, individual scientists, and
partners. The program provides accessible public domain database of
aerosol optical, mircrophysical and radiative properties.
The module produces four outputs:
- Luminance image.
- TOA reflectance image.
- TOC reflectance image.
- Difference TOA-TOC image, which allows to get the estimation of
atmospheric contribution.
.. figure:: ../Art/MonteverdiImages/monteverdi_optical_calibration.png
Figure 1 : Optical calibration module.
.. figure:: ../Art/MonteverdiImages/monteverdi_optical_calibration_outputs.png
Figure 2 : Optical calibration module’s outputs.
Pan-sharpening
--------------
......@@ -165,9 +128,6 @@ Using either **OTB Applications** or modules from **Monteverdi** , it is
possible to perform both steps in a row, or step-by-step fusion, as
described in the above sections.
Pan-sharpening with **OTB Applications**
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The *BundleToPerfectSensor* application allows to perform both steps in
a row. Seamless sensor modelling is used to perform zooming and
registration of the multi-spectral image on the panchromatic image. In
......@@ -226,38 +186,10 @@ Increasing the available amount of RAM may also result in better
computation time, seems it optimises the use of the system resources.
Default value is 256 Mb.
Pan-sharpening with **Monteverdi**
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
**Monteverdi** allows to perform step-by-step fusion. The followings
screenshots highlight operations needed to perform Pan-Sharpening.
- Open panchromatic and multispectral images in monteverdi using the
*Open Dataset* module or using the ``-il`` option of the
**Monteverdi** executable.
- The *Superimpose* module is used to zoomed and registered the
multispectral on the panchromatic image. As a result, we get a
multispectral dataset with the same geographic extension and the same
resolution as the panchromatic image, cf [fig:qbmulsuper].
.. figure:: ../Art/MonteverdiImages/monteverdi_QB_PAN_ROI.png
.. figure:: ../Art/MonteverdiImages/monteverdi_QB_MUL_Superimpose.png
Figure 4 : Panchromatic, Zoomed, and registered multispectral image.
- Now the *Simple RCS pan-sharpening* module can be used using the
panchromatic and the multispectral images as inputs. It produces a
multispectral image with the same resolution and geographic extension
(cf `Figure 5`).
.. figure:: ../Art/MonteverdiImages/monteverdi_QB_XS_pan-sharpened.png
Figure 5 : Pan-sharpened image using the simple RCS module.
Figure 5 : Pan-sharpened image using Orfeo ToolBox.
Please also note that since registration and zooming of the
multi-spectral image with the panchromatic image relies on sensor
......
This diff is collapsed.
Using Pleiades images in OTB Applications and Monteverdi
========================================================
The typical `Pleiades <http://smsc.cnes.fr/PLEIADES/index.htm>`_
product is a pansharpened image of 40 000 by 40 000 pixels large, with 4
spectral bands, but one can even order larger mosaics, whose size can be
even larger, with hundreds of thousands of pixels in each dimension.
To allow easier storage and transfer of such products, the standard
image file format is
`Jpeg2000 <http://en.wikipedia.org/wiki/JPEG_2000>`_ , which allows to
achieve high compression rates. The counterpart of these better storage
and transfer performances is that the performance of pixels accesses
within those images may be poorer than with an image format without
compression, and even more important, the cost of accessing pixels is
not uniform: it depends on where are the pixels you are trying to
access, and how they are spatially arranged.
To be more specific,
`Pleiades <http://smsc.cnes.fr/PLEIADES/index.htm>`_ images are
internally encoded into 2048 per 2048 pixels tiles (within the
`Jpeg2000 <http://en.wikipedia.org/wiki/JPEG_2000>`_ file). These tiles
represent the atomic decompression unit: if you need a single pixel from
a given tile, you still have to decode the whole tile to get it. As a
result, if you plan to access a large amount of pixels within the image,
you should try to access them on a per tile basis, because anytime you
ask for a given tile more than once, the performances of your processing
chains drop.
What does it mean? In Orfeo Toolbox , the streaming (on the flow)
pipeline execution will try to stay synchronised with the input image
tiling scheme to avoid decoding the same tile several time. But you may
know that in the Orfeo Toolbox world, one can easily chain numerous
processing, some them enlarging the requested region to process the
output - like neighbourhood based operators for instance - or even
completely change the image geometry - like ortho-rectification for
instance. And this chaining freedom is also at the heart of
Monteverdi . In short, it is very easy to build a processing
pipeline in Orfeo Toolbox or chain of modules in Monteverdi that
will get incredibly bad performances, even if the Orfeo Toolbox
back-end does its best to stay in tune with tiles. And here, we do not
even speak of sub-sampling the whole dataset at some point in the
pipeline, which will lead to even more incredibly poor performances, and
is however done anytime a viewer is called on a module output in
Monteverdi .
So, can Monteverdi or OTB Applications open and process
`Pleiades <http://smsc.cnes.fr/PLEIADES/index.htm>`_ images?
Fortunately yes. Monteverdi even takes advantage of
`Jpeg2000 <http://en.wikipedia.org/wiki/JPEG_2000>`_ ability to
generate coarser scale images for quick-look generation for
visualisation purposes. But to ease the use of
`Pleiades <http://smsc.cnes.fr/PLEIADES/index.htm>`_ images in
Monteverdi , we chose to open them in a separate data type, and to
lock the use of most of modules for this data type. It can only be used
in the Viewer module and a dedicated module allowing to uncompress a
user-defined part of a
`Pleiades <http://smsc.cnes.fr/PLEIADES/index.htm>`_ image to disk. One
can still force the data type during the opening of the image, but this
is not advised: the advised way to use the other modules with
`Pleiades <http://smsc.cnes.fr/PLEIADES/index.htm>`_ data is to first
uncompress to disk your area of interest, and then open it again in
Monteverdi (careful, you may need a lot of disk space to do this).
As for the applications, they will work fine even on
`Jpeg2000 <http://en.wikipedia.org/wiki/JPEG_2000>`_
`Pleiades <http://smsc.cnes.fr/PLEIADES/index.htm>`_ data, but keep in
mind that a performance sink might show depending on the processing you
are try to achieve. Again, the advised way of working would be to
uncompress your area of interest first and then work with the
uncompressed file, as you used to with other data.
A final word about metadata: OTB Applications and Monteverdi can
read the Dimap V2 (note that we also read the less non-official Dimap
V1.1 format) metadata file associated with the
`Jpeg2000 <http://en.wikipedia.org/wiki/JPEG_2000>`_ file in the
`Pleiades <http://smsc.cnes.fr/PLEIADES/index.htm>`_ product. It reads
the RPC localisation model for geo-coding and the information needed to
perform radiometric calibration. These metadata will be written in an
associated geometry file (with a *.geom* extension) when uncompressing
your area of interest to disk, so that both Monteverdi and OTB
Applications will be able to retrieve them, even for images extracts.
.. _section1:
Opening a `Pleiades <http://smsc.cnes.fr/PLEIADES/index.htm>`_ image in Monteverdi
----------------------------------------------------------------------------------------
Opening a `Pleiades <http://smsc.cnes.fr/PLEIADES/index.htm>`_ image in
Monteverdi is not different from opening other kind of dataset: use
the *Open Dataset* item from the *File* menu, and select the JP2 file
corresponding to you image using the file browser.
.. figure:: ../Art/MonteverdiImages/pleiades_open.png
Figure 1 : Dialog window when opening a Pleiades image in Monteverdi
.. figure:: ../Art/MonteverdiImages/pleiades_monteverdi.png
Figure 2 : Pleiades images in the main Monteverdi window
`Figure 1` shows the dialog box when opening a `Pleiades <http://smsc.cnes.fr/PLEIADES/index.htm>`_
image in Monteverdi . One can see some changes with respect to
the classical dialog box for images opening.
The first novelty is a combo box allowing to choose the resolution of
the `Jpeg2000 <http://en.wikipedia.org/wiki/JPEG_2000>`_ file one wants
to decode. As said in the introduction of this section, Orfeo
Toolbox can take advantage of
`Jpeg2000 <http://en.wikipedia.org/wiki/JPEG_2000>`_ capability to
access coarser resolution ver efficiently. If you select for instance
the *Resolution: 1* item, you will end with an image half the size of
the original image with pixels twice as big. For instance, on a
`Pleiades <http://smsc.cnes.fr/PLEIADES/index.htm>`_ panchromatic or
pansharpened product, the *Resolution: 0* image has a ground samping
distance of 0.5 meters while the *Resolution: 1* image has a ground
samping distance of one meter. For a multispectral product, the
*Resolution: 0* image has a ground samping distance of 2 meters while
the *Resolution: 1* image has a ground samping distance of 4 meters.
The second novelty is a check-box called *Save quicklook for future
re-use*. This option allows to speed-up the loading of a
`Pleiades <http://smsc.cnes.fr/PLEIADES/index.htm>`_ image within
Monteverdi . In fact, when loading a
`Pleiades <http://smsc.cnes.fr/PLEIADES/index.htm>`_ image,
Monteverdi generates a quicklook of this image to be used as a
minimap in the *Viewer Module* as well as in the *Uncompress Jpeg2000
image* module. This quicklook is the coarser level of resolution from
the `Jpeg2000 <http://en.wikipedia.org/wiki/JPEG_2000>`_ file: it
should decode easily, but can still take a while. This is why if the
check-box is checked, Monteverdi will write this quicklook in
uncompressed *Tiff* format next to the
`Jpeg2000 <http://en.wikipedia.org/wiki/JPEG_2000>`_ file. For
instance, if the file name is:
::
IMG_PHR1A_MS_201204011017343_SEN_IPU_20120529_1596-002_R1C1.JP2
Monteverdi will write, if it can, the following files in the same
directory:
::
IMG_PHR1A_MS_201204011017343_SEN_IPU_20120529_1596-002_R1C1.JP2_ql_by_otb.tif
IMG_PHR1A_MS_201204011017343_SEN_IPU_20120529_1596-002_R1C1.JP2_ql_by_otb.geom
Next time one will try to open this image in Monteverdi , the
application will find these files and load directly the quicklook from
them, instead of decoding it from the
`Jpeg2000 <http://en.wikipedia.org/wiki/JPEG_2000>`_ file, resulting in
an instant loading of the image in Monteverdi . Since the wheight of
these extra files is usually of a few megaoctets, it is recommended to
keep this option checked unless one has a very good reason not to. Now
that the `Pleiades <http://smsc.cnes.fr/PLEIADES/index.htm>`_ image is
loaded in Monteverdi , it appears in the main Monteverdi window,
as shown in `Figure 2`.
Viewing a `Pleiades <http://smsc.cnes.fr/PLEIADES/index.htm>`_ image in Monteverdi
----------------------------------------------------------------------------------------
You can open the `Pleiades <http://smsc.cnes.fr/PLEIADES/index.htm>`_
image in the viewer, either by using the contextual menu or by opening
the *Viewer Module* through the menu bar.
You can notice that the viewer opens quickly without showing the
traditional progress bar. This is because Monteverdi already loaded
the quick-look upon opening, and we do not need to re-compute it each
time the image is opened in the *Viewer Module*.
.. figure:: ../Art/MonteverdiImages/pleiades_viewer.png
Figure 3 : A Pleiades image displayed in Monteverdi viewer. (c) CNES 2012
`Figure 3` shows a `Pleiades <http://smsc.cnes.fr/PLEIADES/index.htm>`_ image displayed in
the *Viewer Module*. One can notice that the navigation experience is
rather smooth. If you navigate using arrows keys, you will notice that
latency can occur now and then: this is due to the viewport switching to
a new `Jpeg2000 <http://en.wikipedia.org/wiki/JPEG_2000>`_ tile to
decode. On can also observe that the latitude and longitude of the pixel
under the mouse pointer is displayed, which means that the sensor
modelling is handled (if you have an internet connection, you may even
see the actual name of the place under mouse pointer). Last, as said in
the foreword of this section,
`Pleiades <http://smsc.cnes.fr/PLEIADES/index.htm>`_ image can be quite
large, so it might be convenient to switch the viewer style from
*Packed* to *Split*, in which case you will be able to maximize the
*Scroll Window* for better localisation of the viewed area. To do so,
one can go to the *Setup* tab of the *Viewer Control Window*.
Handling mega-tiles in Monteverdi
--------------------------------------
If the `Pleiades <http://smsc.cnes.fr/PLEIADES/index.htm>`_ product is
very large, it might happen that the image is actually split into
several `Jpeg2000 <http://en.wikipedia.org/wiki/JPEG_2000>`_ files,
also called mega-tiles. Since the area of interest might span two or
more mega-tiles, it is convenient to stitch together these tiles so as
to get the entire scene into one Monteverdi dataset. To do so, one
must first open all mega-tiles in Monteverdi , as described in :ref:`section1`.
Once all mega-tiles are opened as shown in `Figure 1`
Once this is done, one can use the *Mosaic Images module* from the
*File* menu. Simply append all mega-tiles into the module and run it:
the module will look for the :math:`RiCj` pattern to determine the
mega-tiles layout, and will also check for consistency, e.g. missing
tiles or mega-tiles size mismatch. Upon success, it generates a new
`Pleiades <http://smsc.cnes.fr/PLEIADES/index.htm>`_ image dataset,
which corresponding to the entire scene, as shown in `Figure 4`. One can
then use this dataset as a regular
`Pleiades <http://smsc.cnes.fr/PLEIADES/index.htm>`_ dataset.
.. figure:: ../Art/MonteverdiImages/pleiades_mtiles_open.png
Figure 4: Pleiades mega-tiles and output mosaic in Monteverdi
Partial uncompressing of `Pleiades <http://smsc.cnes.fr/PLEIADES/index.htm>`_ images in Monteverdi
--------------------------------------------------------------------------------------------------------
The next very important thing one can do with Monteverdi is to
select an area of interest in the
`Pleiades <http://smsc.cnes.fr/PLEIADES/index.htm>`_ image so as to
uncompress it to disk. To do so, open the
`Pleiades <http://smsc.cnes.fr/PLEIADES/index.htm>`_ dataset into the
*Uncompress Jpeg2000 image module* from the *File* menu.
.. figure:: ../Art/MonteverdiImages/pleiades_uncom.png
Figure 5: A Pleiades image in Monteverdi Uncompress Jpeg2000 image module. (c) CNES 2012
`Figure 5` shows what this module looks like. On the left, one can find
information about the images dimensions, resolution level, and number of
`Jpeg2000 <http://en.wikipedia.org/wiki/JPEG_2000>`_ tiles in image,
dimension of tiles, and size of tiles in mega-octets. The center part of
the module is the most important one: it displays a quick-look of the
`Pleiades <http://smsc.cnes.fr/PLEIADES/index.htm>`_ image. On this
quick-look, one can select the area to be decoded by drawing a rectangle
with the mouse. The red rectangle shown by the module corresponds to
this user-defined area. On the left, in red, one can find the start
index and size of corresponding region.
The module also displays a green rectangle, which shows the minimum set
of tiles to be decoded to decode the red area: this is the region that
will actually be decoded to disk. On the left, in green, one can find
information about this region: how many tiles it contains, and what will
be the size of the corresponding decoded output file.
Once one chose her area of interest, one can click on the *Save* button,
and select an output file. The module will write a geometry file (with
the *.geom* extension) with all useful metadata in it, so that when
reading back the file in Monteverdi or in OTB Applications ,
geometry and radiometry based functionalities can still be used.
Other processing of `Pleiades <http://smsc.cnes.fr/PLEIADES/index.htm>`_ images with Monteverdi
-----------------------------------------------------------------------------------------------------
For all the reasons exposed in the foreword of this section, we do not
allow to use directly
`Pleiades <http://smsc.cnes.fr/PLEIADES/index.htm>`_ images in the
remaining of Monteverdi modules: the advised way of doing so is to
first uncompress the area of interest to disk.
Processing of `Pleiades <http://smsc.cnes.fr/PLEIADES/index.htm>`_ images with OTB Applications
-----------------------------------------------------------------------------------------------------
The OTB Applications are able to work directly with
`Pleiades <http://smsc.cnes.fr/PLEIADES/index.htm>`_ images. However,
keep in mind that performances may be limited due to the reasons exposed
in the foreword of this section. If you experiment poor performances
with some application, try to uncompress the area of interest from your
image with Monteverdi first. One can also use the *ExtractROI*
application for this purpose.
One thing that is interesting to know is that one can access the coarser
resolution of the `Jpeg2000 <http://en.wikipedia.org/wiki/JPEG_2000>`_
file by appending :math:`:i` to the filename, where :math:`i` is the
resolution level starting at 0. For instance, one can use the following:
::
otbcli_ExtractROI -in IMG_PHR1A_PMS_201201151100183_SEN_IPU_20120222_0901-001_R2C1.JP2:5 -out test.tif uint16
......@@ -22,27 +22,7 @@ together with other GIS data.
This figure illustrates the generic workflow in the case of image series
registration:
+--------------------------+
| InputSeries |
+--------------------------+
| Sensor Model |
+--------------------------+
| DEM |
+--------------------------+
| Geo-referenced Series |
+--------------------------+
| Homologous Points |
+--------------------------+
| Bundle-block Adjustement |
+--------------------------+
| Fine Registration |
+--------------------------+
| Registered Series |
+--------------------------+
| Map Projection |
+--------------------------+
| Cartographic Series |
+--------------------------+
.. image:: ../Art/residual_registration-figure.png
We will now illustrate this process by applying this workflow to
register two images. This process can be easily extended to perform
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment