SlideShare une entreprise Scribd logo
1  sur  19
Rémi Cresson
Développement des
chaînes de traitement
d'images GEOSUD
Écriture parallèle de fichiers GeoTiff
Rémi Cresson
● Pipeline = graphe composé de :
– Data objects
● Image (rasters, ...)
● Mesh (shape, ...)
– Process
● Source (readers, ...)
● Filter
● Mapper (writers, ... )
Terminologie d'un pipeline
Rémi Cresson
Composant clef : Writer
otb::ImageFileWriter<TImage>
● Écrit un fichier unique
● Streaming paramétrable (taille/forme
des dalles)
● Supporte des noms de fichiers
étendus. Exemple : Path/Image.ext?
&key1=<value1>&key2=<value2>
– Box
– Compression JPEG2000
– ...
Rémi Cresson
Parallélisation d'un
pipeline streamable
● Avant :
Reader WriterBandMath Threshold
Reader MPIWriterBandMath Threshold
● Après :
Rémi Cresson
Writer séquentiel avec
passage de message
Reader MPIWriterBandMath Threshold
Reader MPIWriterBandMath Threshold
Reader MPIWriterBandMath Threshold
Reader MPIWriterBandMath Threshold
Process1
Process2
Process3
Process4
MPI_SEND
tif
Rémi Cresson
tif
Process1
Process2
Process3
Process4
t
read
processing
write
com
MPI_RECV() MPI_SEND()
Légende
Rémi Cresson
MPIWriter
MPIWriter
MPIWriter
Writer simultané avec
passage de message
Reader MPIWriterBandMath Threshold
Reader BandMath Threshold
Reader BandMath Threshold
Reader BandMath Threshold
Process1
Process2
Process3
Process4
tif1
tif2
tif3
tif4
Rémi Cresson
tif1
Process1
Process2
Process3
Process4
t
read
processing
write
Légende
tif2
tif3
tif4
Rémi Cresson
MPIWriter
MPIWriter
MPIWriter
Writer simultané avec
écriture parallèle
Reader MPIWriterBandMath Threshold
Reader BandMath Threshold
Reader BandMath Threshold
Reader BandMath Threshold
Process1
Process2
Process3
Process4
tif
MPI_FILE_
WRITE_AT
Rémi Cresson
tif
Process1
Process2
Process3
Process4
t
read
processing
write
Légende
Uniquement GeoTiff
non compressé
Rémi Cresson
Exemple du pipeline précédent : détection de l'eau sur une image SPOT5
//     Déclaration des types des data objects
typedef OTBVectorImage<unsigned int> SPOTImageType ;
typedef OTBImage<double> NDVIImageType ;
typedef OTBImage<bool> MaskImageType ;
//     Déclaration des process objects
OTBImageReader<SPOTImageType> reader
OTBBandMathFilter<SPOTImageType, NDVIImageType > bandMathFilter
ITKBinaryThresholdFilter<NDVIImageType , MaskImageType > thresholdFilter
OTBImageWriter<MaskImageType> writer
//     Paramétrage des process objects
reader­>SetFileName('image_spot_ms.tif') ;
bandMathFilter­>SetExpression('(b1­b2)/(b1+b2)') ;
thresholdFilter­>SetLowerThreshold(­1) ;
thresholdFilter­>SetUpperThreshold(0) ;
thresholdFilter­>SetInsideValue(true) ;
thresholdFilter­>SetOutsideValue(false) ;
writer­>SetFileName('detection_eau.tif') ;
//     Chainage des process objects
writer­>SetInput(thresholdFilter­>GetOutput()) ;
thresholdFilter­>SetInput(bandMathFilter­>GetOutput()) ;
bandmathFilter­>SetInput(reader­>GetInput()) ;
//     Déclenchement du pipeline
writer­>Update() ;
Pour le développeur : avant
Rémi Cresson
Exemple du pipeline précédent : détection de l'eau sur une image SPOT5
//     Déclaration des types des data objects
typedef OTBVectorImage<unsigned int> SPOTImageType ;
typedef OTBImage<double> NDVIImageType ;
typedef OTBImage<bool> MaskImageType ;
//     Déclaration des process objects
OTBImageReader<SPOTImageType> reader
OTBBandMathFilter<SPOTImageType, NDVIImageType > bandMathFilter
ITKBinaryThresholdFilter<NDVIImageType , MaskImageType > thresholdFilter
OTBWithMPIImageWriter<MaskImageType> writer
//     Paramétrage des process objects
reader­>SetFileName('image_spot_ms.tif') ;
bandMathFilter­>SetExpression('(b1­b2)/(b1+b2)') ;
thresholdFilter­>SetLowerThreshold(­1) ;
thresholdFilter­>SetUpperThreshold(0) ;
thresholdFilter­>SetInsideValue(true) ;
thresholdFilter­>SetOutsideValue(false) ;
writer­>SetFileName('detection_eau.tif') ;
//     Chainage des process objects
writer­>SetInput(thresholdFilter­>GetOutput()) ;
thresholdFilter­>SetInput(bandMathFilter­>GetOutput()) ;
bandmathFilter­>SetInput(reader­>GetInput()) ;
//     Déclenchement du pipeline
writer­>SetNumberOfMPIProcesses(MPI_NPROC) ;
writer­>SetCurrentMPIProcessId(MPI_RANK) ;
writer­>Update() ;
Pour le développeur : après*
Rémi Cresson
Autres composants à
« paralléliser »
● Utilisés actuellement : Composants de calcul de
statistiques (moy, std, min, max) sur une image:
communication des sommes, des sommes des
carrés, min, max de chaque instance
– gtb::StatisticsImageFilter
– gtb::StatisticalRegressionImageFilter
– gtb::StreamingStatisticsMosaicFilter - Fait
● Autres composants utilisés dans le futur ? (e.g.
chaînes de traitement pas encore développées :
segmentation, ...)
Rémi Cresson
Parallélisation d'un
pipeline
● Avant :
Reader WriterBandMath SSMF
Reader MPIWriterBandMath SSMFMPI
● Après :
Rémi Cresson
MPIWriter
MPIWriter
Reader MPIWriterBandMath SSMFMPI
Reader BandMath
Reader BandMath
Process1
Process2
Process3
gtb::StreamingStatistics
MosaicFilterMPI
SSMFMPI
SSMFMPI
MPI_ALLGATHER
Rémi Cresson
Pour le développeur : avant
...
mosaicImageStatisticsFilter­>SetInput(bandMathFilter­>GetOutput()) ;
writer­>SetInput(mosaicImageStatisticsFilter­>GetOutput()) ;
writer­>Update() ;
Rémi Cresson
...
mosaicImageStatisticsFilter­>SetInput(bandMathFilter­>GetOutput()) ;
mosaicImageStatisticsFilter­>SetNumberOfMPIProcesses(MPI_NPROC) ;
mosaicImageStatisticsFilter­>SetCurrentMPIProcessId(MPI_RANK) ;
writer­>SetInput(mosaicImageStatisticsFilter­>GetOutput()) ;
writer­>SetNumberOfMPIProcesses(MPI_NPROC) ;
writer­>SetCurrentMPIProcessId(MPI_RANK) ;
writer­>Update() ;
Pour le développeur : après
Rémi Cresson
Performances
Rémi Cresson
Inter-opérabilité
Serveur de calcul,
architecture HPC
hébergeant les
chaînes de
traitements
(exécutables)
Serveur
WPS
Client WPS
Utilisateur

Contenu connexe

En vedette

Build OTB with the SuperBuild
Build OTB with the SuperBuildBuild OTB with the SuperBuild
Build OTB with the SuperBuildotb
 
Orfeo ToolBox workshop at FOSS4G Europe 2015
Orfeo ToolBox workshop at FOSS4G Europe 2015Orfeo ToolBox workshop at FOSS4G Europe 2015
Orfeo ToolBox workshop at FOSS4G Europe 2015otb
 
OTB: logiciel libre de traitement d'images satellites
OTB: logiciel libre de traitement d'images satellitesOTB: logiciel libre de traitement d'images satellites
OTB: logiciel libre de traitement d'images satellitesotb
 
Pragmatic Remote Sensing - IGARSS 2010
Pragmatic Remote Sensing - IGARSS 2010Pragmatic Remote Sensing - IGARSS 2010
Pragmatic Remote Sensing - IGARSS 2010otb
 
Madagascar2011 - 09 OTB Change detection framework
Madagascar2011 - 09 OTB Change detection frameworkMadagascar2011 - 09 OTB Change detection framework
Madagascar2011 - 09 OTB Change detection frameworkotb
 
Madagascar2011 - 02 - Présentation OTB
Madagascar2011 - 02 - Présentation OTBMadagascar2011 - 02 - Présentation OTB
Madagascar2011 - 02 - Présentation OTBotb
 
Ice: lightweight, efficient rendering for remote sensing images
Ice: lightweight, efficient rendering for remote sensing imagesIce: lightweight, efficient rendering for remote sensing images
Ice: lightweight, efficient rendering for remote sensing imagesotb
 
Presentation of the Monteverdi application
Presentation of the Monteverdi applicationPresentation of the Monteverdi application
Presentation of the Monteverdi applicationotb
 
0 intro
0 intro0 intro
0 introotb
 
OTB modular architecture
OTB modular architectureOTB modular architecture
OTB modular architectureotb
 
Monteverdi 2.0 - Remote sensing software for Pleiades images analysis
Monteverdi 2.0 - Remote sensing software for Pleiades images analysisMonteverdi 2.0 - Remote sensing software for Pleiades images analysis
Monteverdi 2.0 - Remote sensing software for Pleiades images analysisotb
 
Pragmatic remote sensing handout
Pragmatic remote sensing handoutPragmatic remote sensing handout
Pragmatic remote sensing handoutotb
 
ORFEO ToolBox Project Steering committee
ORFEO ToolBox Project Steering committeeORFEO ToolBox Project Steering committee
ORFEO ToolBox Project Steering committeeotb
 
Présentation générale de l'Orfeo ToolBox (12.2014)
Présentation générale de l'Orfeo ToolBox (12.2014)Présentation générale de l'Orfeo ToolBox (12.2014)
Présentation générale de l'Orfeo ToolBox (12.2014)otb
 

En vedette (14)

Build OTB with the SuperBuild
Build OTB with the SuperBuildBuild OTB with the SuperBuild
Build OTB with the SuperBuild
 
Orfeo ToolBox workshop at FOSS4G Europe 2015
Orfeo ToolBox workshop at FOSS4G Europe 2015Orfeo ToolBox workshop at FOSS4G Europe 2015
Orfeo ToolBox workshop at FOSS4G Europe 2015
 
OTB: logiciel libre de traitement d'images satellites
OTB: logiciel libre de traitement d'images satellitesOTB: logiciel libre de traitement d'images satellites
OTB: logiciel libre de traitement d'images satellites
 
Pragmatic Remote Sensing - IGARSS 2010
Pragmatic Remote Sensing - IGARSS 2010Pragmatic Remote Sensing - IGARSS 2010
Pragmatic Remote Sensing - IGARSS 2010
 
Madagascar2011 - 09 OTB Change detection framework
Madagascar2011 - 09 OTB Change detection frameworkMadagascar2011 - 09 OTB Change detection framework
Madagascar2011 - 09 OTB Change detection framework
 
Madagascar2011 - 02 - Présentation OTB
Madagascar2011 - 02 - Présentation OTBMadagascar2011 - 02 - Présentation OTB
Madagascar2011 - 02 - Présentation OTB
 
Ice: lightweight, efficient rendering for remote sensing images
Ice: lightweight, efficient rendering for remote sensing imagesIce: lightweight, efficient rendering for remote sensing images
Ice: lightweight, efficient rendering for remote sensing images
 
Presentation of the Monteverdi application
Presentation of the Monteverdi applicationPresentation of the Monteverdi application
Presentation of the Monteverdi application
 
0 intro
0 intro0 intro
0 intro
 
OTB modular architecture
OTB modular architectureOTB modular architecture
OTB modular architecture
 
Monteverdi 2.0 - Remote sensing software for Pleiades images analysis
Monteverdi 2.0 - Remote sensing software for Pleiades images analysisMonteverdi 2.0 - Remote sensing software for Pleiades images analysis
Monteverdi 2.0 - Remote sensing software for Pleiades images analysis
 
Pragmatic remote sensing handout
Pragmatic remote sensing handoutPragmatic remote sensing handout
Pragmatic remote sensing handout
 
ORFEO ToolBox Project Steering committee
ORFEO ToolBox Project Steering committeeORFEO ToolBox Project Steering committee
ORFEO ToolBox Project Steering committee
 
Présentation générale de l'Orfeo ToolBox (12.2014)
Présentation générale de l'Orfeo ToolBox (12.2014)Présentation générale de l'Orfeo ToolBox (12.2014)
Présentation générale de l'Orfeo ToolBox (12.2014)
 

Plus de otb

Présentation de l'ORFEO ToolBox au FROG2013
Présentation de l'ORFEO ToolBox au FROG2013Présentation de l'ORFEO ToolBox au FROG2013
Présentation de l'ORFEO ToolBox au FROG2013otb
 
Madagascar2011 - 08 - OTB segmentation and classification
Madagascar2011 - 08 - OTB segmentation and classificationMadagascar2011 - 08 - OTB segmentation and classification
Madagascar2011 - 08 - OTB segmentation and classificationotb
 
Madagascar2011 - 07 - OTB radiometry processing
Madagascar2011 - 07 -  OTB radiometry processingMadagascar2011 - 07 -  OTB radiometry processing
Madagascar2011 - 07 - OTB radiometry processingotb
 
Madagascar2011 - 06 - OTB geometry processing
Madagascar2011 - 06 - OTB geometry processingMadagascar2011 - 06 - OTB geometry processing
Madagascar2011 - 06 - OTB geometry processingotb
 
Madagascar2011 - 05 - Monteverdi first steps
Madagascar2011 - 05 - Monteverdi first stepsMadagascar2011 - 05 - Monteverdi first steps
Madagascar2011 - 05 - Monteverdi first stepsotb
 
Madagascar2011 - 04 - Présentation configuration pratical work
Madagascar2011 - 04 - Présentation configuration pratical workMadagascar2011 - 04 - Présentation configuration pratical work
Madagascar2011 - 04 - Présentation configuration pratical workotb
 
Madagascar2011 - 03 - Présentation Monteverdi
Madagascar2011 - 03 - Présentation MonteverdiMadagascar2011 - 03 - Présentation Monteverdi
Madagascar2011 - 03 - Présentation Monteverdiotb
 
Madagascar2011 - 10 - OTB Object Based Image Analysis
Madagascar2011 - 10 -  OTB Object Based Image AnalysisMadagascar2011 - 10 -  OTB Object Based Image Analysis
Madagascar2011 - 10 - OTB Object Based Image Analysisotb
 
AUF 11 - 02 Geometrie
AUF 11 - 02 GeometrieAUF 11 - 02 Geometrie
AUF 11 - 02 Geometrieotb
 
AUF 11 - 03 Radiometrie
AUF 11 - 03 RadiometrieAUF 11 - 03 Radiometrie
AUF 11 - 03 Radiometrieotb
 
AUF 11 - 04 Primitives
AUF 11 - 04 PrimitivesAUF 11 - 04 Primitives
AUF 11 - 04 Primitivesotb
 

Plus de otb (11)

Présentation de l'ORFEO ToolBox au FROG2013
Présentation de l'ORFEO ToolBox au FROG2013Présentation de l'ORFEO ToolBox au FROG2013
Présentation de l'ORFEO ToolBox au FROG2013
 
Madagascar2011 - 08 - OTB segmentation and classification
Madagascar2011 - 08 - OTB segmentation and classificationMadagascar2011 - 08 - OTB segmentation and classification
Madagascar2011 - 08 - OTB segmentation and classification
 
Madagascar2011 - 07 - OTB radiometry processing
Madagascar2011 - 07 -  OTB radiometry processingMadagascar2011 - 07 -  OTB radiometry processing
Madagascar2011 - 07 - OTB radiometry processing
 
Madagascar2011 - 06 - OTB geometry processing
Madagascar2011 - 06 - OTB geometry processingMadagascar2011 - 06 - OTB geometry processing
Madagascar2011 - 06 - OTB geometry processing
 
Madagascar2011 - 05 - Monteverdi first steps
Madagascar2011 - 05 - Monteverdi first stepsMadagascar2011 - 05 - Monteverdi first steps
Madagascar2011 - 05 - Monteverdi first steps
 
Madagascar2011 - 04 - Présentation configuration pratical work
Madagascar2011 - 04 - Présentation configuration pratical workMadagascar2011 - 04 - Présentation configuration pratical work
Madagascar2011 - 04 - Présentation configuration pratical work
 
Madagascar2011 - 03 - Présentation Monteverdi
Madagascar2011 - 03 - Présentation MonteverdiMadagascar2011 - 03 - Présentation Monteverdi
Madagascar2011 - 03 - Présentation Monteverdi
 
Madagascar2011 - 10 - OTB Object Based Image Analysis
Madagascar2011 - 10 -  OTB Object Based Image AnalysisMadagascar2011 - 10 -  OTB Object Based Image Analysis
Madagascar2011 - 10 - OTB Object Based Image Analysis
 
AUF 11 - 02 Geometrie
AUF 11 - 02 GeometrieAUF 11 - 02 Geometrie
AUF 11 - 02 Geometrie
 
AUF 11 - 03 Radiometrie
AUF 11 - 03 RadiometrieAUF 11 - 03 Radiometrie
AUF 11 - 03 Radiometrie
 
AUF 11 - 04 Primitives
AUF 11 - 04 PrimitivesAUF 11 - 04 Primitives
AUF 11 - 04 Primitives
 

Développement des chaînes de traitement d'images GEOSUD