I've just read the new post at Medium about Sentinel-2 color correction with Sentinel Playground. It says that

The default gain factor is set to 2.5, which corresponds to white-point reflectance of 40% (a pixel with 40% or more reflectance in all three bands will appear white in the resulting image).

I get very similar visual result by stretching contrast in QGIS [0, 4095] --> [0, 255] for each band. I've chosen these ranges based on histogram and radiometric resolution of 12 bits. Please, help me understand what operations are performed with the image when setting gain factor at Sentinel Playground?

gain 2.5 image from sentinel playground

stretched [0,4095] in QGIS

histogram of the image in QGIS


If you check Sentinel-2 technical specifications, etc. S2 MPC Data Quality Report, you will find:

The L1C product quantization value has been set to 10 000: a Digital Number (DN) of 10 000 corresponds to a reflectance of 1, while a Digital Number of 1 represents a minimal value of the reflectance (0.001). The Digital Number 0 is a fill value (No Data), used for L1C pixels outside of the instrument observation swath.

Without any "gain factor" this would mean that reflectance 0 (DN=0) would be black and reflectance 1 (DN=10.000) would be white. Gain factor of 2.5 stretches the reflectance range so that 0 (DN=0) -> 0 , 0.2 (DN=2.000) -> 0.5, 0.4 (DN=4.000) -> 1.0, eveything above 0.4 is 1.0 as well.

So... long story short, your stretching contrast [0,4095] is almost the same as Sentinel Hub's [0,4000].


Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.