An error occurred while loading the file. Please try again.
-
Narcon Nicolas authored77974dc6
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<title>pyotb: A pythonic extension of Orfeo Toolbox</title>
<link rel="stylesheet" href="./revealjs/dist/reset.css">
<link rel="stylesheet" href="./revealjs/dist/reveal.css">
<link rel="stylesheet" href="./revealjs/dist/theme/white.css">
<link rel="stylesheet" href="otb.css" id="theme">
<!-- Theme used for syntax highlighted code -->
<link rel="stylesheet" href="a11y-light.css">
</head>
<body>
<div class="reveal">
<div class="slides">
<!-- I/ PREMIERE PAGE -->
<section style="vertical-align: sub;" data-background-image='illustrations/background.png'>
</br>
<h1>pyotb</h1>
<h1small>A pythonic extension of Orfeo Toolbox</h1small>
</br>
<figure>
<img src="illustrations/otb_logo.png" width=10%/>
</figure>
<p>Nicolas Narçon<sup>1</sup>, Rémi Cresson<sup>1</sup>, Vincent Delbar<sup>2</sup></p>
<p>(1) INRAE, (2) La TeleScop</p>
<br>
<p> Firenze, FOSS4G - 25 Aug. 2022</p>
</section>
<section data-background-image='illustrations/background.png'>
<h3>Satellite image processing in Python</h3>
<h4>A basic example: Pansharpening</h4>
<figure>
<img src="illustrations/pansharpening_schema.png" width=60%/>
</figure>
</section>
<!-- II/ PANSHARPENING WITH PYTHON rasterio -->
<section data-background-image='illustrations/background.png'>
<h1>Challenges of remote sensing </h1></br><h1>in Python</h1>
</section>
<section data-background-image='illustrations/background.png'>
<h3>What a Python developer goes trough</h3>
<h4>Searching for pansharpening</h4>
<video data-autoplay width=70% data-src="illustrations/pansharpening_google_search_final_speedup.mp4"></video>
</section>
<section data-background-image='illustrations/background.png'>
<h3>What a Python developer goes trough</h3>
<h4>Trying the pansharpening</h4>
<video data-autoplay width=70% data-src="illustrations/pansharpening_memory_error_rasterio_speedup.mp4"></video>
</section>
<section data-background-image='illustrations/background.png'>
<h3>What a Python developer goes trough</h3>
<figure>
7172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
<img data-src="illustrations/memory_error.png" width=75%/>
</figure>
<figure>
<img data-src="illustrations/michael_meme.png" width=40%/>
</figure>
</section>
<section data-background-image='illustrations/background.png'>
<h3>What a Python developer goes trough</h3>
</br>
<img style='vertical-align:middle' data-src="illustrations/cons.png" width=3%/>
<span>Satellite image processing does not fit in RAM</span>
<br>
<img style='vertical-align:middle' data-src="illustrations/cons.png" width=3%/>
<span>Hard to find high-level Python Open Source remote sensing solutions</span>
</section>
<!-- III/ PANSHARPENING WITH PYOTB -->
<section>
<h1>Pansharpening using pyotb </h1>
</section>
<section data-background-image='illustrations/background.png'>
<h3>pyotb: remote sensing made easy</h3>
<video data-autoplay width=70% data-src="illustrations/pansharpening_pyotb_laptop_speedup.mp4"></video>
</section>
<section data-background-image='illustrations/background.png'>
<h3>pyotb: remote sensing made easy</h3>
<img style='vertical-align:middle' data-src="illustrations/pros.png" width=3%/>
<span>Fits in RAM</span>
<br>
<img style='vertical-align:middle' data-src="illustrations/pros.png" width=3%/>
<span>Many already implemented remote sensing solutions in Orfeo Toolbox</span>
<br>
<img style='vertical-align:middle' data-src="illustrations/pros.png" width=3%/>
<span>Easy to write</span>
<figure>
<img data-src="illustrations/thumbs_up.gif" width=40%/>
</figure>
</section>
</section>
<!-- IV/ USECASE: EXAMPLE FROM THE DOC AVEC EXPORT RASTERIO -->
<section>
<h1>pyotb usecase </h1>
</section>
<section data-background-image='illustrations/background.png'>
<h3>An usecase of pyotb</h3>
<p>Goal: labeling the bare soils<p>
<figure>
<img src="illustrations/pyotb_usecase_labelling.png" width=60%/>
</figure>
</section>
<section data-background-image='illustrations/background.png'>
<h3>An usecase of pyotb</h3>
<p>Goal: labeling the bare soils<p>
<video data-autoplay width=70% data-src="illustrations/pyotb_usecase_speedup.mp4"></video>
</section>
141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
<section>
<h1>Conclusion</h1>
<h1small>An easier way to use Orfeo Toolbox in Python</h1small>
</br>
<img style='vertical-align:middle' data-src="illustrations/pros.png" width=3%/>
<span>Takes advantage of the algorithms and efficiency of Orfeo Toolbox</span>
<br>
<img style='vertical-align:middle' data-src="illustrations/pros.png" width=3%/>
<span>Easy pythonic syntax</span>
<br>
<img style='vertical-align:middle' data-src="illustrations/pros.png" width=3%/>
<span>Easy to interact with Python processing libraries </span>
</br></br>
<span class="fragment">
<pre><code data-trim class="python">
import pyotb
# Pansharpening
pxs = pyotb.BundleToPerfectSensor(inp='pan.vrt', inxs='xs.tif')
# Computing NDVI
ndvi = (pxs[:, :, -1] - pxs[:, :, 0]) / (pxs[:, :, -1] + pxs[:, :, 0])
# Computing a boolean raster to identify pixels without vegetation
bare_soils = (ndvi < 0.3)
# Creating a boolean cloud mask from the GML vector
cloud_mask = pyotb.Rasterization('cloud_mask.GML', im=bare_soils)
# Masking clouds (i.e. assigning to 0) on the result
bare_soils_masked = pyotb.where(cloud_mask == 1, 0, bare_soils)
bare_soils_masked.write('bare_soils.tif', pixel_type='uint8')
</code></pre>
<p style='font-style:italic'>Code sample</p>
</span>
</section>
</div>
</div>
<script src="./revealjs/dist/reveal.js"></script>
<script src="./revealjs/plugin/notes/notes.js"></script>
<script src="./revealjs/plugin/markdown/markdown.js"></script>
<script src="./revealjs/plugin/highlight/highlight.js"></script>
<script>
// More info about initialization & config:
// - https://revealjs.com/initialization/
// - https://revealjs.com/config/
Reveal.initialize({
hash: true,
controlsLayout: 'edges',
// Visibility rule for backwards navigation arrows; "faded", "hidden"
// or "visible"
controlsBackArrows: 'visible',
slideNumber: true,
// Learn about plugins: https://revealjs.com/plugins/
plugins: [ RevealMarkdown, RevealHighlight, RevealNotes ],
// The "normal" size of the presentation, aspect ratio will
// be preserved when the presentation is scaled to fit different
211212213214215216217218219220221222223224225226227228229230231232
// resolutions. Can be specified using percentage units.
width: 1920,
height: 1080,
// Factor of the display size that should remain empty around
// the content
margin: 0.01,
// Bounds for smallest/largest possible scale to apply to content
minScale: 0.2,
maxScale: 2.0,
drawer: {
colors: ["#fa1e0e", "#8ac926", "#1982c4", "#ffca3a"], // (optional) list of colors avaiable (hex color codes)
color: "#FF0000", // (optional) color of a cursor, first color from `codes` is a default
pathSize: 2, // (optional) path size in px, default 4
}
});
</script>
</body>
</html>