Giter VIP home page Giter VIP logo

flood-monitoring-sentinel2's Introduction

Flood-Monitoring-Sentinel2

A flood monitoring system which processes sentinel-2 images

Abstract

The Sangam region in Prayagraj(U.P) has been prone to floods occurring in rainy season almost every year, causing substantial damage to the people in the region.

In this project we will be monitoring the sangam region which is the confluence of the Ganges and Yamuna rivers using multispectral images from the Sentinel-2 data, this can be useful in predicting the areas which are prone to floods.

Data

Sentinel-2 is an Earth observation mission from the Copernicus Programme that systematically acquires optical imagery at high spatial resolution over land and coastal waters.

It has optical instrument samples in 13 spectral bands: four bands at 10 metres, six bands at 20 metres and three bands at 60 metres spatial resolution.

The data captured by the Sentinel-2 is available in the form of Level-1B, Level-1C and Level-2A data products. Each dataset of Level-2A is in the form of tiles of area 100km x 100km. These datasets are available for free at Copernicus Open Access Hub or can be downloaded using the Sentinel-2 Toolbox.

https://scihub.copernicus.eu/dhus/#/home

Methodology

Firstly, we process the sentinel-2 images using SNAP Tools. We take into account several bands and their corresponding spectral images. The sentinel-2 images are processed and converted to png format before further processing using python libraries such as PILLOW and imageio. Our unsupervised method for change detection involves the automatic analysis of the change data, i.e. the difference image, constructed using the multi temporal images. A difference image is the pixel-by-pixel subtraction of the 2 images..

diff_image = abs(image1 - image2)

After cropping the images we get the final shape of the difference image as (1647x1647).

Next is the task of building the Eigen vector space.

PCA (Principal Component Analysis) takes a data set and determines its co-variance matrix after performing mean normalisation on it. The Eigen vectors and Eigen values of the co-variance matrix are computed (giving us the EVS) and then the Eigen vectors are sorted in the descending order of Eigen values.

The Eigen vectors have been sorted in the decreasing order of the Eigen values because the Eigen vector with the highest Eigen value is the principal component of the data set. That vector shows along which direction the majority of the data is inclined. Thus by PCA, we have been able to extract the lines that characterise the data.

We take non-overlapping blocks of size 5 x 5 from the difference image and flatten them into row vectors. PCA is then applied on this vector set to get the Eigen vector space. The Eigen vector space will be a 25 x 25 matrix.

Now finally we move towards building the feature vector space. Building the FVS involves again taking 5 x 5 blocks from the difference image, flattening them, and lastly projecting them onto the EVS, only this time, the blocks will be overlapping.

The feature vectors for the pixels carry information whether the pixels have characteristics of a changed pixel or an unchanged one. Having constructed the feature vector space, we now need to cluster it so that the pixels can be grouped into two disjoint classes. We will be using the K-means algorithm to do that.

Results

We can clearly see the difference between the images of before and after the rainy season. After the rainy season the water bodies have got thicker. We will monitor this change in water area.

s3

The change map denotes the change in water area. We have used 2 types of pixel values for our K-Means clustering that are 0 and 255 respectively. 0 represents black while 255 represents white.

s1

s2

Run

python main.py

Concluding Remark

One of the most fundamental requirements of change detection is the registration between the two input images.It implies that the images should have perfect alignment between them, otherwise change detection would give many false alarms.

Water level monitoring helps to provide an early warning system of any likely flooding situation, providing valuable time to protect assets, move valuables and protect property.

flood-monitoring-sentinel2's People

Contributors

rahul171201 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.