Reflectance values of Sentinel-2 as a Table


I’ve got an atmospherically corrected Sentinel-2 image and wondering if its possible to obtain the reflectance values of the entire pixels of the entire image as a table or a csv so that I can export it to Excel and perform some statistics.

it is possible?

Thank you.

Yes, this is possible. You need to resample the S2 product to a common resolution and the you can export it to a CSV file.
But I don’t recommend doing it for the whole image. The file will be huge.
Just do it for a small area.
You can also draw rectangle and the chose from the context menu in the image view Export mask pixels.

Thank you very much for the reply! Yes I made a subset of my image and only need the pixel values of this subset. I resampled it as you advised. However, I’m trying to find exactly where is the “context menu in the image view Export mask pixels.” Do you mean in the Product Explorer? for some reason the “Export Transect Pixels” is not activated here. (see attached image)

Use the Help menu and search on CSV, then select the entry for “Export CSV”.

It worked! thank you!

Apparently my subset includes > 8 million pixels. The CSV file was only able to include data from a little more than 1 million pixels. I’m wondering if I can include data of all > 8 million pixels?

Many thanks again

It is common to do statistics on images with a large number of pixels using random samples. In most cases there is no benefit to using complete images over much smaller samples. SNAP/GPT StatisticsOp does the sampling for you. Is there a reason you can’t use StatisticsOp? Excel may not be the best tool for working with images. Third party packages (R, Python, Matlab) can import images directly and do statistics using sampling without the need to make an intermediate ASCII file.

The context menu I was referring to is shown when you right-click on the image.

The select the geometry mask:

For the transect export you need to draw a geometry upfront.