I saw that Sen2cor resampled at the 60m resolution. So, I would like to ask about which resample algorithm(for ex: nearest (default),bilinear,cubic,cubicspline,lanczos,average,mode) Sen2cor use to resample 10m,20m resolution to 60m resolution?
Please note that in the next versions of Sen2Cor, i.e. >= v2.2 the internal resampling strategy will evolve as follow:
Downsampling (10m -> 20m, 10m > 60m, 20m -> 60m): uses a block_reduce algorithm
E.g. for 10m to 20m downsampling, four 10m-pixels are averaged into a single 20m-pixel for each
20m-pixels of the images as shown in the figure above.
(block_reduce from skimage.measure module)
Upsampling (60m -> 20m, 20m -> 10m): cubic spline is used. (resize from skimage.transform module)
The reason for change was to better preserve the geolocation accuracy between bands of different native resolutions, (e.g. band B8A and B09 used in the water vapour retrieval algorithm), complying with the L1C geolocation convention expressed here as follow:
The geographic coordinates (Geoposition “ULX” and “ULY”) given in the granule metadata correspond to the coordinates of the upper-left corner (vs the middle) of the upper-left pixel of the image. These geographic coordinates are the same for each band for all resolutions (10m, 20m, 60m).
For the upsampling using resize from skimake.transform, assuming correctly that the (default) mode constant is used? I just want to make sure, since the default is apparently set to change to reflect in skimage 0.15.
Yes the (default) mode “constant” is used.
If I understand well your comment, there is a plan to change the default mode to “reflect” in a future version 0.15 of scikit-image? In this case we will need to explicitly specify mode=‘constant’ to keep this mode for the upscaling. http://scikit-image.org/docs/dev/api/skimage.transform.html#skimage.transform.resize
I’m currently using skimage version 0.13.0 on Python 3.5.3 - when executing resize from skimage.transform, I’m getting the following warning:
/opt/conda/envs/python35/lib/python3.5/site-packages/skimage/transform/_warps.py:84: UserWarning: The default mode, ‘constant’, will be changed to ‘reflect’ in skimage 0.15.
warn("The default mode, ‘constant’, will be changed to ‘reflect’ in "