rescaling Sentinel-2L2a rgb values to 0-255

33 Views Asked by At

Im using digital earth africa's load() to get sentinel images with RGB bands. The values (in a very large dataset) have a max of 17500, but a mean and median of 550. The values are float64 and can be displayed easily using xarray. however, I need the values to be 0-255 to store them in a jpeg and for simplicity later on. I can safely assume it's non-linear (the extreme distribution).

I've looked on sentinel 2's website and i couldn't find any explanation for the values.

0

There are 0 best solutions below