Satellite Image to a Tree and Ground Mask using Image Processing

Madara Premawardhana
2 min readSep 12, 2021

--

Started off as a lazy-Sunday project, the extraction of trees and other features from a satellite image with simplest techniques made me to create a program as following.

The basics to this project includes a simple input of a satellite image containing general RGB information. The satellite images can be used in various tasks in game engine’s level design, for extracting agricultural cover area data etc. But here what I focused on is to extract general areas that cover gravel ground, man made structures such as buildings, roads and another one containing natural dark green areas such as fields, forests and grasslands into one Binary image which could be used as landscape masks input for Unreal Engine.

Photo by USGS on Unsplash

The basic process of this program is converting the Image’s RGB data into GRAY and Applying COM &Otsu’s threshold into the grayscale image. The threshold will be set to 0 and maximum value will be set to 255, creating a Binary image of the Ground.

For extracting Trees, the greens must be filtered. Hence the saturation of greens will first be increased and then RGB will be converted to HSV. Then after the Grayscale of HSV image will be extracted. This will again be applied with COM &Otsu’s threshold. The threshold will be set to 0 and maximum value will be set to 255, creating a Binary image of the Trees and greener areas.

Below is an example of the masks generated

Input image example
Extracted Greener areas
Extracted Ground areas

This can also be advanced using the following flow of processes.

From https://www.researchgate.net/publication/304407468_Plant_cover_detection_from_visible_satellite_imagery

The program for this simple project can be found in my github : https://github.com/MadaraPremawardhana/SatelliteImageProcessing

--

--

Madara Premawardhana

PhD Student at the University of Buckingham, School of Computing