Wolfram Language

Image and Signal Processing

Dynamic Comparison of Two Images

Compare two satellite images of Venice, Italy, using an interactive graphical user interface based on two coupled DynamicImage objects. The left display shows a radar image taken by the ESA satellite Sentinel-1 on May 10, 2016; the right is an optical photograph taken by Sentinel-2 on April 29, 2016.

In[1]:=
Click for copyable input
{img1, img2} = { Import[ "https://earth.esa.int/documents/257246/2546936/Venice-Sentinel-1-\ 10052016.jpg"], Import[ "https://earth.esa.int/documents/257246/2546936/Venice-Sentinel-2-\ 29042016.jpg"] };

Use click+drag on one of the images to pan, and Shift+click+drag vertically to zoom in or out. Move the scrollbar ends to change the cropping.

show complete Wolfram Language input
In[2]:=
Click for copyable input
DynamicModule[ {x, y, s}, Row[{ DynamicImage[ img1, ZoomCenter -> Dynamic[Scaled[{x, y}]], ZoomFactor -> Dynamic[s], AppearanceElements -> {"Pan", "Scrollbars", "ZoomButtons", "Zoom"}, ImageSize -> {240, 360} ], DynamicImage[ img2, ZoomCenter -> Dynamic[Scaled[{x, y}]], ZoomFactor -> Dynamic[s], AppearanceElements -> {"Pan", "Scrollbars", "ZoomButtons", "Zoom"}, ImageSize -> {240, 360} ] }] ]
Play Animation
Stop Animation

Related Examples

de es fr ja ko pt-br ru zh