Sentinel-2 Super-Resolution (all bands at 10m): Snap plugin now available!

Thank you for help!
I saved the file in ‘zip’ format, so it couldn’t be recognized. Then I changed the extension. It works now.

This is beautiful!
Effectively computationally intense… But you need to make use of your cores. Seems very well coded, well done for exploiting the resources properly (all my 24 virtual cores went 100%, it is quite rare).
Thanks for sharing it and well done.


Removed a question which was irrelevant… Display problem

1 Like

Shall this plug-in be included in the v6.0 of SNAP?

Hi @nicolas.brodu, does it work as well from command line? Or with gpt?

The plugin should work with GPT. A command-line version using GDAL instead of SNAP is available on my web page. It only works for Linux, and you are on your own for setting up the necessary packages (python, etc) in your own environment.

I am not sure the 6.0 build process allows for late additions. This plugin might be useful for many people and it was well tested but, at this stage of the release cycle, I suspect the main developpers are more concerned with fixing the last remaining bugs than with adding new features. I am all for it, or for listing it in the third party plugins page as fallback, but that choice belongs to the people preparing v6.0. @Fabrizio_Ramoino, what do you think ?

Cool! I re-read carefully your first post and I saw the information was there :sweat_smile: Thanks for the reply anyway.

I’m trying to compile it and I’m getting the following error:

$ ./setup.py install --user
( ... many compilation outputs later ... )
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/home/emendes/devel/src/SNAP/superres/src -I/home/emendes/devel/src/SNAP/superres/src/boost -I/usr/include/python2.7 -c src/sresjni.cpp -o build/temp.linux-x86_64-2.7/src/sresjni.o -fPIC -std=c++11 -fopenmp -O3 -DNDEBUG -DEIGEN_UNROLLING_LIMIT=0 -DEIGEN_DONT_PARALLELIZE
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
src/sresjni.cpp:34:17: fatal error: jni.h: No such file or directory
 #include <jni.h>
                 ^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

I see there’s a jni.h inside $(src)/jni/ but I’m not sure which recipe to edit in the Makefile to make the compiler find it. Would I be on my own here or could you give me a hint? :slight_smile:

Edited a clumsy anwser - Now fixed thanks to @Mellon.

All right, I’ll see if I can solve this on my own.

Dear Nicolas,

In my opinion for the time being I would suggest to add your useful contribution in the ‘third party plugins’ that will give more visibility to you as developer.
With regard to your plug in name, if you are agree, in order to avoid misunderstanding I would suggest to change it in “Sentinel-2 Bands Fusion”, because it needs a reference band to resample all the others at the same resolution.

Best Regards,
Fabrizio

As far as I understood the plugin is not limited to Sentinel-2 data. At least the algorithm can also be applied to Landsat 8 and others.
In the current version, the plugin is written for S2, but maybe it can be easily generalised?

The method is not limited to Sentinel-2, it is suited for satellites with several high-resolution bands. Landsat 8 has a panchromatic band, which you can use with usual pansharp operations, so there is no need for this plugin.

Hi,

I’m trying to find some more information on the methodology of the plugin.
Unfortunately I cannot get either of your links to work, nor can I get the one on the Sen2Res
webpage to work either: http://nicolas.brodu.net/recherche/sen2res/

Do you have any suggestions?

Thanks,
Kat

Hi all,

This can also be achieved with sen2cor correct?
When we use sen2cor, if we choose a resolution (ie. 10m), the bands for the final product will be re-sampled to 10m correct?

Regards

Paulo

Sen2cor will resample, but not super-resolve. Sen2Res is similar to pansharpening for the 20m and 60m bands, but using the 4 bands at 10m to get the details instead of a (non-existent) panchromatic one.
You can use both plugins : first apply Sen2Cor without the resampling option, keeping the original band resolutions. Then, apply Sen2res in order to get all bands at 10m, with more details than just resampling.

3 Likes

Great Nicolas,

Thanks you.

Regards

Hello,

I downloaded the plugin but I don’t know how to make it work. I keep receiving the “No high-resolution band could be found”. Since I’m a new user on SNAP probably I’m doing something wrong, I usually work with other image processing software as ENVI or SPRING. I’m opening all the images in the product explorer but I don’t know what else to do. Can anyone point me a direction?

Thank you

Leonardo

Open a Sentinel-2 image, either the original downloaded from the hub or one preprocessed by Sen2Cor. Select that image as the active one then launch the plugin interface via the menu. The plugin should find the bands. There is the possibility to specify a subset of the bands you need with the plugin interface. If this does not work, then you are doing something else wrong…
Best,
Nicolas

very good idea ,Nicolas
But I am on Mac OS 10 : no way to use it
Second , Snap tool "spatial subset from view " requires bands of same resolution
So how to reduce the Sentinel2 images with Snap6.0.1
many thanks
bruno

about the resolution, please have a look here: Resample processing time