Influence of wrong angle resampling on water instituence

Introduction

This page shall briefly describe the influence of the wrong resampling of the view azimuth angles in Sentinel-2 data. It shall show the need for a specific Sentinel-2 resampling methodology. The investigation was done initially in the context of the validation of C2RCC processing results. In the chlorophyll output of the C2RCC processor the influence of wrong angular interpolation during the resampling to a common resolution is clearly visible. This results from the coarse grid the angles are provided. By default the angles are resampled (up-sampled) using nearest neighbour method. This results in hard cuts and wrong angles for the pixels close to the CCD edges.

Problem understanding

Sentinel 2 has 12 individual detectors for the VISNIR bands, aligned in two rows, and additional detectors for the SWIR bands on a different focal plane. Due to the high spatial resolution, a certain point on earth is viewed by different detectors at different times, and thus the viewing geometry for the individual bands within the spectrum differs. Consequently, the viewing angles are provided per band in the S2 image file. This means, a spectrum measured by S2 has different view angles per band. This cannot be handled by any processor we are aware of. Further more, the information, which pixel on which CCD measured a certain image pixel, is not available in the L1C product. This would be required to get the image geometry fully correct. As a consequence, Marco and Carsen concluded that it is impossible to work with the precise angles. An approximation has to be used in any case. We now believe that it will not be possible for C-S to provide a perfect reader that gets the exact angles per pixel. And even if so, the C2RCC could not work with per-band-angles. So, we have to find the approximation with the lowest error.

Investigation

1) Among the 4 different angles (sun zenith, sun azimuth, view zenith, view azimuth), the view azimuth has the strongest differences across one granule and the default nearest neighbour resampling caused the image artefacts detected in the C2RCC images. We proposed using a single, mean view azimuth for an image. This is implemented as an option in C2RCC v0.17.1. The maximum difference of the per-pixel view azimuth from the mean angle was found ~20° in the test image of Finnish Coast. This causes error of <30% in  Chlorophyll image. This is much more than what we expected, and too much.

2) A better option is to choose bi-linear interpolation for the angles for up-sampling method in the resampling operator and mean for down-sampling method. These operators are applied to all bands and thus there are pros and cons. The pros predominate. While the angles are always up-scaled, we have to discuss this individually for the different target resolutions for the spectral bands.

a) upscaling the angles

The angles are provided on an 22 x 22 grid and are up-sampled to an x-thousand x y-thousand grid, depending on target resolution. The nearest neighbour method is the worst choice for all angles; it preserves the very coarse resolution and leads to ugly blocks. The values are wrong, because the true angles at any target grid point is not the corresponding coarse angle grid value. A bi-linear interpolation is much closer to the true value, although we still may make an error. This is true for sure for both azimuths and the sun azimuth. You should have a look at the 22x22 grid, and the interpolated values. As an example see the sun azimuth.

Left: original 22x22 grid, middle: nearest neighbour upscaling, right: bi-linear upscaling:

original 22x22 gridnearest neighbour upscalingbi-linear upscaling

The view azimuth is the only angle, where it is a bit more critical. Within a granule, this angle has 4 concrete values depending on which detector has done the measurement. Below find the image and the histogram values in the original 22x22 grid.

A bi-linear interpolation within each detector (i.e. within each of the clusters in the histogram) would be the correct solution). However, as written above, the information, which image pixel belongs to which detector is not available in the L1C product. Using bi-linear interpolation creates intermediate values between the clusters. The image below shows the interpolated image and the histogram:

The intermediate values are wrong, they do not occur in the image. We should remember that the usage of one single mean value is using view_azi = 292°, which is also a value which does not exist in the image at all. I.e., when working with bi-linear we are using for most of image pixels well interpolated angles but not at the border from one detector to the other. In the case of using one single value we are using a wrong value for all pixels. Further, we can assume that the error in chl increases with error in azimuth. In the case of bilinear interpolation the maximum we do is 12°, on the half between the cluster at 280° and 302°. Which is much less than more than 20° for the single value.

The C2RCC output image looks nice when using bilinear for upscaling. The drawback is to loose pixels at the borders of the image (This should be further investigated. Probably better to set no-data here).
Left: nearest neighbour, right: bi-linear.

nearest neighbourbi-linear


In the case of the spectral bands it is also worth thinking about the up- and downscaling methods.

b) spectral bands: target resolution = 60m

This is an easy case, and maybe the recommended one. Not because it is easy, but because it is the most scientifically sound one. The 10m and 20m bands lying within a 60m pixel can be averaged, and this corresponds to what the 60m is actually measuring. I.e. the Resampling Operator the down-sampling method should be set to "mean".

The default of the resampling operator is using nearest neighbour for downscaling. This means, that only the central pixel of the 10m and 20m is used, which is (a) radiometrically wrong when using as component of a measurement spectrum and (b) which throws away the advantage of improving the SNR. Below see difference in noise in the CHL image with nearest (left) and mean (right):

nearestmean

c) spectral bands: target resolution = 20m or 10m

This is tricky because now some bands are measured at a coarser resolution than they are used, i.e. the "upscaling" applies to the 60m bands, and the 20m bands when the target resolution is 10m. The resulting spectrum is a mixture of a real measurement at that resolution and a "best guess" from a coarser resolution. The 60m pixel can be spatial mixture of land and water, or a rock and water, and any interpolation will still result in something wrong. That's why we say that the 60m target resolution should be the best choice. However, if 20m or 10m is choosen, the bi-linear which we favour for the angle bands, applies automatically also here. The SNAP resampling operator does not allow (yet) the selection of method per band. Anyway, bi-linear is not too bad.

So, in summary, with these settings the resampling operator should be run to get a good result for C2RCC, for all target resolutions:

Summary

As long as it's not possible to have the view azimuth angle per pixel (if ever) the best solution is to use a bi-linear interpolation for all angles. For the radiometry bands it would be best to use the mean resampling for the down-sampling. When the radiometry bands need to be up-sampled the same resampling algorithm (bi-linear) as for the angle bands is applied at the moment. Radiometrically the best up-sampling method would be nearest neighbour.