Request for Changes-39: SAR support in Monteverdi

From OTBWiki
Revision as of 18:06, 20 June 2016 by Salbert (Talk | contribs) (Limitations)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

[Request for Changes - 39] SAR support in Monteverdi


  • Author: Mickaël Savinaud & Stéphane Albert
  • Additional Contributors: none
  • Submitted on 09/06/2016
  • Voted:
  • Proposed target release: OTB-5.6, Monteverdi-3.4
  • Branches:


The purpose of this RFC is to implement opening and rendering of SAR data in Monteverdi by implementing modulus and phasis calculation in GLSL shader of the OTB-Ice rendering engine.

Interesting wiki page about how OTB supports SAR data:


Monteverdi does not support rendering of complex-data images as modulus/amplitude and phasis. Nonetheless, as OTB supports opening mono- and multi-band complex images as multi-band (real, imaginary), Monteverdi can render them the same way as optical images (i.e. gray level of the real and imaginary components) which is not useful to field engineers.

Supporting modulus/amplitude and phasis of complex number SAR images without OTb-application preprocessing nor disk storage provides a quick & fast mean for users to visualize SAR images.

Implementation details

In OTB, modulus/amplitude and phasis computation is implemented in <code/>otb::StandardShader</code> GLSL code to be processed directly by the GPU. A pixel_type parameter has been added to the otb::ImageSettings and otb::StandardShader classes.

In Monteverdi, the modulus/amplitude and phasis virtual grayscale bands have been added to benefit of existing code and minimize its re-design. A File/Load SAR image(s)... menu item has been added to load complex-data images. Also, the modulus/amplitude and phasis are computed as pre-process of the histogram computation using otb::BandMathXImageFilter.


Because modulus/amplitude and phasis are computed by the GPU via the GLSL shader program in OTB-Ice, rendering of complex-data/SAR image(s) is unavailable in OpenGL compatibility mode (remote-desktop case or insufficient graphical hardware). Moreover, the modulus/amplitude and phasis pixel-values are unavailable to pixel picking because they are calculated real-time in the GPU and not stored in central RAM. So, pixel-picking of the OTB-Ice rendering engine is limited to (real, imaginary) components of complex data.

The modulus/amplitude and phasis calculations done as pre-process of histogram generation are slow because of the interpreted nature of the otb::BandMathXImageFilter on a per-pixel basis.

Classes and files


M Modules/Visualization/Ice/include/otbImageSettings.h
M Modules/Visualization/Ice/src/otbImageSettings.cxx
M Modules/Visualization/Ice/src/otbStandardShader.cxx


M CMakeLists.txt
M Code/Application/Monteverdi/mvdMainWindow.cxx
M Code/Application/Monteverdi/mvdMainWindow.h
M Code/Application/Monteverdi/mvdMainWindow.qrc
M Code/Application/Monteverdi/mvdMainWindow.ui
M Code/Common/Core/mvdAbstractImageModel.cxx
M Code/Common/Core/mvdAbstractImageModel.h
M Code/Common/Core/mvdDatasetModel.cxx
M Code/Common/Core/mvdHistogramModel.h
M Code/Common/Core/mvdI18nCoreApplication.cxx
M Code/Common/Core/mvdI18nCoreApplication.h
M Code/Common/Core/mvdImageImporter.cxx
M Code/Common/Core/mvdImageImporter.h
M Code/Common/Core/mvdQuicklookModel.cxx
M Code/Common/Core/mvdVectorImageModel.cxx
M Code/Common/Core/mvdVectorImageModel.h
M Code/Common/Core/mvdVectorImageSettings.cxx
M Code/Common/Core/mvdVectorImageSettings.h
M Code/Common/Gui/mvdColorSetupController.cxx
M Code/Common/Gui/mvdI18nMainWindow.cxx
M Code/Common/Gui/mvdI18nMainWindow.h
M Code/Common/Gui/mvdImageViewRenderer.cxx
A Data/Icons/document-open_SAR_32x32.png






Additional notes


Implement the OpenGL compatibility mode in OTB-Ice rendering engine by computing a (modulus, phasis) along to image data. This would serve for rendering and also for picking (modulus, phasis) pixel values. This could be done by the below-mentioned OTB filter or, directly, by a texture to texture GLSL shader (benefit of parallel GPU processing while loading tiles).

Implement and OTB filter converting an otb::VectorImage< float, 2 > containing (real, imaginary) data to a otb::VectorImage< float, 2 > containing (modulus, phasis) data and use it in histogram pre-processing state and the in OTB-Ice rendering engine (see above).