Download it here:
This plugin increases the resolution of the 20m and 60m bands of a sentinel-2 image down to 10m/pixel. You can view it as a kind of pan-sharp operator, but which extracts details from the 4 existing 10m bands instead of a (non-existent) panchromatic band. Thanks to using these 4 bands, results are improved compared to single-band pansharp, including local consistency between neighbor pixels. See the above page for details.
The plugin works for both SNAP 5.0 and 6.0beta, for both Linux and Windows. In order to install it, select the “tools/plugins” menu, then the “downloaded” tabs and select the .nbm file you just downloaded. Install it, then restart SNAP. A new entry should appear in the “Optical” menu. Hover the mouse on the parameter fields of the new dialog for help, if needed. The graph processing framework is supported. Extra bonus: A batch version using Python and GDAL exists for use on clusters where SNAP cannot be installed, see the web page.
The method is quite computationally intensive. Please use a small test region of interest first, and only then expand according to your needs / available computing power.
Impressive! I will try it out.
Works perfect on my machine (technically), thank you so much.
You need a high-performance system however as it requires quite much computing capacity. But that is not a bad thing, of course.
Thank you very much for the plugin! It works almost fine. Unfortunately, my results are not georeferenced. How can I keep the geoinformation?
Hmm, that is strange, geocoding should be transfered. I just checked, and longitude/latitude are visible in SNAP when you hover over on each pixel of a super-resolved band, so the information is there. Could you please send me a private message (no need to bother others on the forum for debug info) as to how, exactly, you cannot read the geocoding information?
Thank you for your prompt reply!
I tried once more time with other dataset and everything worked perfectly. Afterwards I tried on the first dataset and it worked perfectly as well. I do not know what the reason of my problem was. Sorry!
I’ve downloaded the files from the link above and got a zip file
but i didn’t find the ‘.nbm’ file so could anyone help me isntall the plug ?
A “.nbm” file is also a jar archive, which is also a zip file. It is possible that your download manager recognized it as a zip and messed up the extension. Try the first link above again, and be sure to save the file with the .nbm extension.
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
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 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
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
I see there’s a
$(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?
Edited a clumsy anwser - Now fixed thanks to @Mellon.
All right, I’ll see if I can solve this on my own.
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.
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.