Monday, 6 June 2016

Atmospheric correction of Sentinel 2 images

I recently downloaded the Sentinel Application Platform including the Sentinel 2 Toolbox.

This looks to be a fairly fully featured image processing program, but what I was most interested in doing is the atmospheric correction for the Sentinel2 images I recently downloaded.

The Sentinel 2 'sen2cor' plugin accomplishes this, which wasn't too difficult to install, making use of anaconda to manage the various dependencies. Once I managed to get the environment variables set, and have it find all of the libraries it pretty much just worked.

After this, I tried using my own script for stacking the bands, which came out with a non-georeferenced image. I then noticed I could save the layerstacked image as a GeoTIFF/BigTIFF from within SNAP. A single 'granule' of Sentinel2 resampled to 10m produced a 9GB GeoTIFF, so I converted to KEA with gdal_translate.

Sentinel 2 image processed to Level2A, with SNAP and sen2cor. Bands B11/B8/B4
Zooming in on the Truro area. Penryn can be seen at the lower-left.

Using my rsgislib-landexplorer program to juxtapose geotagged ground-level images with Sentinel2
The same as above, but the non-atmosphere corrected version of the Sentinel2 image.

2 comments:

  1. Interesting read.
    I am interested though on the scripts/coding used to install Sen2Cor plugin in SNAP. Having a difficult time getting this part done.

    ReplyDelete
  2. Unfortunately I can't remember the whole details of all the issues with getting Sen2Cor installed and working. I was using conda to do so, but there is an issue where I found myself needing to use Python 2.7 for this, whereas RSGISLib which I have also installed with conda uses Python 3. This I dealt with with a separate bashrc file for each case, and loading it with the "source" command. I seem to remember there were certain dependencies/libraries for sen2cor that got a bit fiddly.

    I recommend looking at the installation notes at http://step.esa.int/thirdparties/sen2cor/2.2.1/S2PAD-VEGA-SUM-0001-2.2.pdf and forum at ESA.

    ReplyDelete