Can PCA be used on a Sentinel-2A product?

Hi. I have carried out PCA on Sentinel-1A successfully. Just wondering whether the same can be done on Sentinel-2A, given the variability of the bands?

you can technically apply a PCA to any raster stack. However, the range of the values should be normalized somehow.

Thanks. Any idea how to normalize the values?

conversion to Integer, for example. That will scale your data between 0-255 (8bit) or 0-32767 (16bit) respectively.

1 Like

Ok, let me try that.

Thanks a lot

I tried the conversion with default settings for the Target data type (uint8) and Scaling (linear between 95% clipped histogram). It didn’t work well.
Could those settings be the issue here? would ‘logarithmic’ be more appropriate as a scaling method?

this is how the values from the old raster are distributed over the new one. Have a look at the histogram of your image before. If they show a good (gaussian) distribution, you can use linear. If they are somehow tilted you can try logarithmic or the peak clipped histogram.

1 Like

Thanks. Would that be normal distribution for all 10 S2 bands?

This is the histogram for Band 2.

and for Band 11.

yes, this is a normal distribution but if the maximum value is too distant from the mean peak, the peak clipped histogram method could work better.

Thanks. Let me try the peak clipped histogram.