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


#1

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?


#2

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


#3

Thanks. Any idea how to normalize the values?


#4

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


#5

Ok, let me try that.

Thanks a lot


#6

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?


#7

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.


#8

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


#9

This is the histogram for Band 2.

and for Band 11.


#10

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.


#11

Thanks. Let me try the peak clipped histogram.