1

I am using Sentinel-2 images for a given region. I have all the separate bands and a merged RGB file, which comes standard with a download from ESA's API.

Now I'm running some code where I separate data into two folders. This means tiny cutouts of the satellite image, which are distributed into either folder 1 or folder 2.

Now I can construct a histogram of f.x. Sentinel-2 Band 04(Red Channel), where two curves illustrate the mean values of the small images in folder 1 and 2. This is presented as such:

S2-Band 4 - Red

I've done this across all single channel bands (Except 02, which for some yet unknown reason wont work)

Then I've also run the entirety of the merged RGB file which looks as this: S2-RGB Composite - Channel 4,3,2

So here is my question! Why does the single channel 04 band look so different, in comparison to the merged second picture, where the bands are separated in the code. FYI: Band 3 is also off.

Side info: The data I'm using is from 2016, which is before ESA included a standard merge. So the merged RGB file I'm using have been created through the Gdal script of merging exactly channel 4,3,2 together, which looks like this:

gdalbuildvrt -separate stack.vrt B04.jp2 BO3.jp2 BO2.jp2
gdal_translate stack.vrt merged.tif
  • 2
    If you don't find an adequate answer here, consider cross-posting this question to earthscience.stackexchange.com – Trevor J. Smith Dec 11 '18 at 15:08
  • 1
    I wasn't aware of that site. Thanks @TrevorJ.Smith – Kongie Dec 11 '18 at 15:20
  • 1
    Is the output RGB uint8 for display, while the input data is uint16? – Marc Pfister Dec 11 '18 at 17:17
  • @MarcPfister Good question, they have both been made to be "Byte" in Gdal (uint8) – Kongie Dec 12 '18 at 17:45
  • What does gdalinfo -mm B04.jp2 report for min/max? – Marc Pfister Dec 12 '18 at 18:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.