Identifying Vegetation From A Satellite Image

Mehtab
4 min readFeb 7, 2022

--

This article showcases a basic approach to identifying vegetation anywhere on earth using satellite images and Google Earth Engine(GEE).

Satellite Image: The Basics

A satellite image is not very different from an image captured through our phone cameras. Except that a phone camera usually has only 3 sensors capable of capturing light in the visible electromagnetic spectrum(Red, Blue, Green). Whereas, satellites are equipped with numerous sensors to capture light reflections at a wider range of the electromagnetic spectrum. Also, as the satellite camera has to capture a large surface area from a distance, the pixel resolution tends to be in the range of meters/pixel(some satellites capture images at centimeters/pixel resolution). Additionally, satellite image has metadata like orientation, geocoordinates, format, etc

Image 1: Electromagnetic Spectrum

Every object on earth absorbs, reflects, and emits light differently based on its physical properties. For example, plant leaves (Chlorophyll) absorb visible light and reflect Near-infrared light. Satellites capture this reflected light, convert it to a digital number(DN), and finally store it as a file (GeoTIFF) also known as a band. These bands can then be combined and processed to identify and visualize patterns.

Sentinel-2: The Source

Today there are many satellites operated by various space agencies (NASA, ESA, ISRO) that are revolving around the earth and continuously capturing the changes on our planet (Land change, Night lights, surface temperature, and so on). Modis, Landsat, and Sentinel-2 are a few satellites that are specially purposed to capture the land and vegetation change. Among these three, Sentinel-2 has the highest pixel resolution(10m-60m) and we would be using Sentinel-2 for our use case. All three satellite data is made available for free and can be used for both research and commercial purpose.

Image 2: A sample Sentinel-2 True Color Image(RBG)

The Sentinel-2 satellites have a Multi-Spectral Instrument (MSI) with 13 spectral bands ( for simplicity, consider the Band as a layer of the image captured by the particular sensor) that range from the visible range to the shortwave infrared (SWIR). Bands come in variable resolutions from 10 to 60 meters and their wavelength is determined based on specific purposes. For our use case, we only require Band4- RED and Band-8(NIR).

Table 1: Sentinel-2 Bands

NDVI: The Formula

Put simply, NDVI is a measure of the state of plant health based on how the plant reflects light at certain frequencies (some waves are absorbed and others are reflected). Chlorophyll (a health indicator) strongly absorbs visible light, and the cellular structure of the leaves strongly reflects near-infrared light.

Mathematically, the normalized difference vegetation index abbreviated NDVI, is defined as

For Sentinel-2, the index looks like this(Refer Table 1):

The results of the NDVI calculation range from -1 to 1. Negative values correspond to areas with water surfaces, manmade structures, rocks, clouds, snow; bare soil usually falls within the 0.1- 0.2 range, and plants will always have positive values between 0.2 and 1. Healthy, dense vegetation canopy should be above 0.5, and sparse vegetation will most likely fall within 0.2 to 0.5.

Image 3: Indication of NDVI value and plant health

ref: More FAQ’s on NDVI here

Google Earth Engine: The Platform

Now that we understand the basics of Sentinel-2, satellite images, and NDVI, we need a computing platform for processing the satellite images. As satellite images tend to be large in size and require a lot of computing resources, processing on a desktop/laptop is often not feasible. Fortunately, we have Google Earth Engine which is available free of cost for personal use.

Google Earth Engine(GEE) is a computing platform that allows users to run geospatial analysis on Google’s infrastructure. There are several ways to interact with the platform. The Code Editor is a web-based IDE for writing and running scripts. The Explorer is a lightweight web app for exploring our data catalog and running simple analyses. The client libraries provide Python and JavaScript wrappers around our web API.

GEE provides both satellite images(data) and compute resources. One needs to only write the code using their python/Javascript libraries to perform any computations.

Image 4: GEE code editor

The Code

Finally, here are the 13 lines of code which will do the magic and identify vegetation anywhere on the planet. You would have to register on the Google Earth Engine platform to use the code. Upon registration, you can paste the below code snippet in the code editor and see the results.

Please follow this link to visualize the output of the above code sample.

--

--