Springe direkt zu Inhalt

NBR - Difference Image

Difference Images can be really useful for monitoring sceneries, as they allow us to evaluate the condition of the environment before and after an event.
To create a Difference Image, simply subtract a post-event Image from a pre-event Image. The resulting Image will provide information on how the pixel values changed during the event, allowing further analysis. A NBR-Difference Image, for example, allows us to estimate and analyse the burn severity for pixels after a wildfire.

Calculating the Difference Image

Let us have a look at the difference image of two individual points in time: the median NBR of 2014 and the median NBR of 2020.

var pre_event = ls8_nbr
              .filterDate('2014-01-01', '2014-12-31')
              .select('NBR')
              .median();
Map.addLayer(pre_event.clip(extent_aoi), nbrParams, 'Pre-Event', false);

var post_event = ls8_nbr
              .filterDate('2020-01-01', '2020-12-31')
              .select('NBR')
              .median();
Map.addLayer(post_event.clip(extent_aoi), nbrParams, 'Post-Event', false);

//Adding the pre- and post-event layers to the map might make our project take a bit longer to compute and render, however there is also one decisive advantage; we can later use the maps to extract NBR-values via the Inspector!  
//If this bothers you, simply add false to the command line or untick the layer in the map panel.

var nbr_diff = pre_event.subtract(post_event).clip(extent_aoi);
print(nbr_diff, 'NBR Difference Image 2014 / 2020)');

Visualizing the Difference Image

As the Difference Image stores different information than the NBR, we will want to define new visualization parameters for it.

Recap: High NBR-values indicate healthy vegetation, low NBR-values indicate bare ground and recently burnt areas.

Negative values (minimum = -2) have higher post-event NBR-values than pre-event NBR-values, so we will display them in green as they are now more vegetated / regrowth has happened.

Example: pre-event - post-event = difference image; 0.2 - 0.6 = -0.4

 

~0 values are more or less unchanged, so we will display them in white

 

Positive values (maximum = 2) have lower post-event NBR-values than pre-event NBR-values, so we will display them in brown as they are now less vegetated / burnt.

Example: pre-event - post-event = difference image; 0.6 - 0.2 = 0.4

 

We will still only look at the range of -1 to 1, as most of the values lie within that range. If we would look at the full range of -2 to 2, it would be really hard to extract information just by looking at the map.

var dnbrParams = {min: -1, max: 1, palette: ['DarkGreen', 'green', 'LimeGreen', 'white', 'burlywood', 'brown', 'maroon']};
Map.addLayer(nbr_diff.clip(extent_aoi), dnbrParams, 'NBR Difference Image 2014 / 2020', false);

Use the Inspector to look at NBR-values for specific pixels of the pre-event, post-event and Difference Image-NBR!