True color product

//VERSION=3
function setup(){
  return{
    input: ["B02", "B03", "B04", "dataMask"],
    output: {bands: 4}
  }
}

function evaluatePixel(sample){
  // Set gain for visualisation
  let gain = 2.5;
  // Return RGB
  return [sample.B04 * gain, sample.B03 * gain, sample.B02 * gain, sample.dataMask];
}
//VERSION=3
let minVal = 0.0;
let maxVal = 0.4;

let viz = new HighlightCompressVisualizer(minVal, maxVal);

function setup() {
   return {
    input: ["B04", "B03", "B02", "dataMask"],
    output: { bands: 4 }
  };
}

function evaluatePixel(samples) {
    let val = [samples.B04, samples.B03, samples.B02, samples.dataMask];
    return viz.processList(val);
}

Evaluate and Visualize

General description

The true color product maps Sentinel-2 band values B04, B03, and B02 which roughly correspond to red, green, and blue part of the spectrum, respectively, to R, G, and B components of the image shown.

But what color is true color? Various additional processing steps can be applied to scale the image values in a range that is well perceived and pleasing to the eye (Sovdat et al, 2019).

  • For the default script here, we apply simple gain correction, multiplying the pixel values of each image band with a single constant value. This is the gain parameter which can be adjusted in the script window.

  • For Copernicus Browser, we chose to apply default a true color script which adds Highlight Compression and also saturation and contrast adjustment. In this context, saturation is the brightness of colours in the image and contrast is the difference between the bright and dark areas. The current True Color algorithm for Copernicus Browser can be accessed as Sentinel-2 L2A optimized True Color and is also compatible with EO Browser.

  • The default True Color script in EO Browser is more simple, with Highlight Compression between specific min and max values. The min and max values are user-adjustable, and of course, this script also works in Copernicus Browser

The bands to use for True Color are

For Sentinel-2: BO4, B03, B02

For Landsat 4-5 TM: B03, B02, B01

For Landsat 7 ETM: B03, B02, B01

For Landsat 8: B04, B03, B02

For MODIS: B01, B04, B03

Description of representative images

True color visualization of islands in the Korea Strait

  • With basic True Color Product (this script)

True color visualization of islands in the Korea Strait, on 16.05.2024.

  • With EO Browser default True Color

True color visualization of islands in the Korea Strait, on 16.05.2024.

True color visualization of islands in the Korea Strait, on 16.05.2024.

References

  • Sovdat, Blaž, Miha Kadunc, Matej Batič, and Grega Milčinski. “Natural color representation of Sentinel-2 data.” Remote sensing of environment 225 (2019): 392-402. Full Text

  • Wikipedia, True color. Accessed October 10th 2017.