Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Aesthetic Neon Script

//Aesthetic Neon - Aesthetic script for urban and dry areas 
//Author: Monja Šebela

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

function evaluatePixel(sample) {
  
  let val = sample.B12 - sample.B04
  let gain = 2.3
  let gamma = - 0.95 // recommended gamma: -0.55 to -0.95
  return [(gain * 3 * val) + gamma,
          (gain * 2.5 * sample.B03) + gamma,
          (gain * 4.2 * sample.B02) + gamma,
          sample.dataMask];
}

Evaluate and visualize

Author of the script

Monja Šebela

General description of the script

This Sentinel-2 aesthetic script can be used to produce beautiful, neon looking results over urban and dry areas. The script is especially useful to highlight value differences in deserts. It’s essentially an RGB composite, with a B12 and B04 difference (which does a good job at displaying certain desert features, like dunes) in the red, B03 in the green, and B02 in the blue channel. Gain and gamma in the script can be modified to fit the location best; for gamma, -0.55 to -0.95 is recommended, while for gain, 2.3 fits most locations.

Compare the amount of information the script provides in dry areas compared to the true color composite.

Neon Script Comparison

Description of representative images

Neon imagery of Beijing, China. Acquired on 2020-01-23.

Beijing Neon

Australian Landscape. Acquired on 2021-01-18.

Australian Neon

Desert Landscape of Eastern Algeria. Acquired on 2020-09-22.

Algeria Neon

Saudi Arabia Dunes. Acquired on 2020-09-27.

Algeria Neon

North-eastern Mali Landscape. Acquired on 2020-09-22.

Mali Neon

On Sentinel Hub Flickr, there’s an album with images created using Aesthetic Neon Script.