Nothing Special   »   [go: up one dir, main page]

Mubarek Dubiso Ofolcha

Download as pdf or txt
Download as pdf or txt
You are on page 1of 77

CAMERA BASED FLOOD DETECTION AND RECOGNITION

WITH WIRELESS SENSOR NETWORK; IN CASE OF AWASH


FLUVIAL

Mubarek Dubiso Ofolcha

A Thesis submitted to the Department of Computer Science and Engineering

School of Electrical Engineering and Computing

Presented in Partial Fulfillment of the Requirement for the Degree of Master’s in


Computer Science and Engineering

Office of Graduate Studies

Adama Science and Technology University

Adama
March, 2019
CAMERA BASED FLOOD DETECTION AND RECOGNITION
WITH WIRELESS SENSOR NETWORK; IN CASE OF AWASH
FLUVIAL

Mubarek Dubiso Ofolcha


Mubarekdubiso2019@gmail.com

Advisor(s) :Dr. Satheesh Kumar

A Thesis submitted to the Department of Computer Science and Engineering


School of Electrical Engineering and Computing
Presented in Partial Fulfillment of the Requirement for the Degree of Master’s in
Computer Science and Engineering
Office of Graduate Studies
Adama Science and Technology University

Adama
March, 2019
Approval of Board of Examiners

We, the undersigned, members of the Board of Examiners of the final open defense by Mubarek
Dubiso Ofolchahave read and evaluated his/her thesis entitled “Camera Based Flood Detection
and Recognition with Wireless Sensor Network; in case of Awash Fluvialandexamined the
candidate. This is, therefore, to certify that the thesis has been accepted in partialfulfillment of the
requirement of the Degree of Master’s in computer science and Engineering.

_________________________________ ________________________ __________________


Supervisor /Advisor Signature Date
_________________________________ ________________________ __________________
Chairperson Signature Date

_________________________________ ________________________ __________________


Internal Examiner Signature Date

_________________________________ ________________________ __________________


External Examiner Signature Date

i
Declaration

I hereby declare that this MSc thesis is my original work and has not been presented for a degree
in any other university, and all sources of material used for this thesis have been duly
acknowledged.
Name: Mubarek Dubiso Ofolcha

Signature: ___________________________________________________________________

This MSc Thesis has been submitted for examination with my approval as thesis advisor.

Name: ____________________________________________________________________

Signature: __________________________________________________________________

ii
Acknowledgement

First and foremost, we would like to thank Almighty Allah for enabling us to initiate the
research, to put our best efforts and successfully conclude.

Secondly, it has been an incredible experience to follow my M.Sc. at the Adama Science
and Technology in Computer Science and Engineering. I learned a lot both from a professional as
well as a personal angle, and I am still learning! I would like to begin by thanking Dr. Shatish
Kumer, who has been my advisor and mentor for the past two years. He has been a wonderful
advisor, providing me encouragement, support, and always valuable advices during my M.Sc.
experience. His enthusiasm for research and his vision for the future have been an inspiration. I
thank him for the time he spent with me, discussing everything from research to career choices,
and led me to this vibrant and challenging research field for wireless sensor networks. While at
ASTU, I had the privilege of interacting with bright, wonderful and talented people.

I want to thank every single member of my advisory committee for taking the time to discuss my
research ideas as well as their effort that was put in to completion of this thesis. I would not be
here without the support of my wonderful family. My father Dubiso Ofolcha and my wonderful
mom Faxuma Musa’sand also all brother and sisters the greatest parents any one would dream of
having.

Last but not the least; I would like to thank my best friends Mekuria Gemechu,Megersa Dereje
and Muhidin Kedir for having encouraged me during the entire Master’s Degree program.

iii
Table of Contents

Approval of Board of Examiners ................................................................................................................... i


Declaration .................................................................................................................................................... ii
Acknowledgement ....................................................................................................................................... iii
Table of Contents ......................................................................................................................................... iv
List of Figures ............................................................................................................................................. vii
List of Table ............................................................................................................................................... viii
List of Abbreviations and Acronyms ........................................................................................................... ix
Abstract ......................................................................................................................................................... x
CHAPTER ONE ........................................................................................................................................... 1
1. INTRODUCTION .................................................................................................................................... 1
1.1 Background ......................................................................................................................................... 1
1.2 Motivation ..................................................................................................................................... 3
1.3 Statement of the Problem .............................................................................................................. 4
1.4 Objectives ..................................................................................................................................... 4
1.4.1 General objective .................................................................................................................. 4
1.4.2 Specific objective .................................................................................................................. 4
1.5 Research Questions ....................................................................................................................... 5
1.6 Scope/Delimitation ....................................................................................................................... 5
1.7 Significance of the study ............................................................................................................... 5
1.8 Research Process Procedures ........................................................................................................ 6
1.9 Organization of Thesis .................................................................................................................. 6
CHAPTER TWO .......................................................................................................................................... 7
2. LITERATURE REVIEW ......................................................................................................................... 7
2.1 Introduction ................................................................................................................................... 7
2.2 Flood ............................................................................................................................................. 7
2.3 Awash River.................................................................................................................................. 9
2.3.1 Summary of Flood History of Awash Fluvial ....................................................................... 9
2.4 Overview of the Network............................................................................................................ 10
2.5 Wireless Sensor Network ............................................................................................................ 10
2.5.1 Structure of a wireless sensor node ..................................................................................... 11
2.5.2 Wireless Sensor Network protocol stack ............................................................................ 12

iv
2.5.3 Design issues of a wireless sensor network ........................................................................ 14
2.5.4 Application of Wireless sensor Network ............................................................................ 16
2.6 Wireless Sensor NetworkMechanism for Flood Detection ......................................................... 16
2.6.1 GPS-based ........................................................................................................................... 17
2.6.2 Radio Frequency (RF) based............................................................................................... 18
2.6.3 Camera based ...................................................................................................................... 18
2.7 Compare of Existing Flood detection Mechanism in WSN ........................................................ 19
2.8 Camera Based Wireless sensor Network .................................................................................... 20
2.8.1 Camera Node System .......................................................................................................... 20
2.8.2 Characteristics of Camera Based Wireless Sensor Network ............................................... 20
2.9 Flood Detection and Recognition ............................................................................................... 21
2.10 Challenge of Camera Based Using Wireless Senor Network ......................................................... 22
2.11 Related Work .............................................................................................................................. 22
CHAPTER THREE .................................................................................................................................... 25
3. RESEARCH METHODOLOGY ........................................................................................................ 25
3.1 Introduction ................................................................................................................................. 25
3.2 Literature Review........................................................................................................................ 26
3.3 Data Collection Method .............................................................................................................. 26
3.4 Design Proposed Prototype ......................................................................................................... 26
3.5 Design Tools ............................................................................................................................... 26
3.6 Development and Implementation Tools .................................................................................... 26
3.7 Evaluation Proposed Solution ..................................................................................................... 27
CHAPTER FOUR....................................................................................................................................... 27
4. DESIGN PROPOSED SOLUTION.................................................................................................... 27
4.1 Introduction ................................................................................................................................. 27
4.2 Pseudo code of proposed solution............................................................................................... 28
4.3 Description of Proposed Solution ............................................................................................... 29
4.3.1 Networking Part .................................................................................................................. 29
4.3.2 Processing Part .................................................................................................................... 30
 Training Phase ................................................................................................................................ 31
1. Image Acquisition ....................................................................................................................... 31
2. Preprocessing .............................................................................................................................. 31
3. Feature Extraction ....................................................................................................................... 32

v
4. Image Classification.................................................................................................................... 33
 Testing Phase .................................................................................................................................. 34
4.4 Proposed Block Diagram of Proposed Solution.......................................................................... 34
CHAPTER FIVE ........................................................................................................................................ 36
5. EXPERIMENTAL SETUP AND IMPLEMENTATION .................................................................. 36
5.1 Introduction ................................................................................................................................. 36
5.2 Software Requirement................................................................................................................. 36
5.3 Hardware Requirement ............................................................................................................... 36
5.4 Selection of Simulation Tools ..................................................................................................... 37
5.4.1 Networking Phase ............................................................................................................... 37
5.4.2 Basic Architecture of NS2 .................................................................................................. 41
5.4.3 Installation........................................................................................................................... 41
5.4.4 NS2 Simulation Steps ......................................................................................................... 42
5.4.5 Visual Processing Tools ...................................................................................................... 43
CHAPTER SIX ........................................................................................................................................... 44
6. RESULT, DISCUSSION AND EVALUATION ............................................................................... 44
6.1 Introduction ................................................................................................................................. 44
6.2 Networking part .......................................................................................................................... 44
6.2.1 Experimental result for Networking Part ............................................................................ 44
6.3 Processing Part ............................................................................................................................ 46
6.3.1 Experimental Results of Flood Detection and Recognition ................................................ 47
6.4 Evaluation ................................................................................................................................... 52
CHAPTER SEVEN .................................................................................................................................... 53
7. CONCLUSION AND RECOMMENDATION .................................................................................. 53
7.1 Conclusion .................................................................................................................................. 53
7.2 Recommendation ........................................................................................................................ 54
7.3 Future work ................................................................................................................................. 54
Reference .................................................................................................................................................... 55
Appendix ..................................................................................................................................................... 59
Appendix 1: source code for camera based wireless Network Communication .................................... 59
Appendix 2: Sample Code train the image ............................................................................................. 63
Appendix 3: sample code for Flood detection and recognition, Image .................................................. 63

vi
List of Figures

Fig,1. 1 :Awash FluvialDisaster Area [5] ....................................................................................... 2


Fig,1. 2:Research Process framework ............................................................................................. 6

Fig 2. 1:Elevation Map ofAwash Basin [11] .................................................................................. 9


Fig 2. 2Wireless sensor networks [20] .......................................................................................... 11
Fig 2. 3The components of a sensor Node [20] ............................................................................ 12
Fig 2. 4Protocol Stack forWSN [18]............................................................................................. 13
Fig 2. 5IEEE 802.15.4 peer-to-peer or star topology [21] ............................................................ 14
Fig 2. 6Application for Wireless sensor Network [9] ................................................................... 16
Fig 2. 7Classification of Flood detection using WSN .................................................................. 17
Fig 2. 8GPS Receiver [22] ............................................................................................................ 17
Fig 2. 9FloodDetection with Radio Frequency approach [23] ..................................................... 18
Fig 2. 10A camera-based wireless sensor device [22] .................................................................. 19
Fig 2. 11Camera Sensor Nodes [24] ............................................................................................. 20

Fig 4. 1Overall Detail Architecture of proposed solution............................................................. 28


Fig 4. 2Sub architecture of Proposed Network ............................................................................. 29
Fig 4. 3Flow chart of Training process ......................................................................................... 31
Fig 4. 4Flow chart image Classification using SVM .................................................................... 33
Fig 4. 5 Testing Phase ................................................................................................................... 34
Fig 4. 6Block Diagram of Proposed Solution ............................................................................... 35

Fig 5. 1 Basic structure of NS2 [36] ............................................................................................ 41

Fig 6. 1Camera Sensor Node Configuration ................................................................................. 45


Fig 6. 2Data Transfer from one node to another ........................................................................... 46
Fig 6. 3Sample Capture Image...................................................................................................... 46
Fig 6. 4Snip Shoot of Sample Dataset for Training Phase of Awash River ................................. 47
Fig 6.5The Processing used in Flood Detection and Recognition. Original image (a), (d), (g) and
(i). Preprocess and Extracted image (b),(e),(h) and (k) Final result (c) ,(f),(i) and (l) Flood
classification (m). .......................................................................................................................... 50
Fig 6. 6Detection Example ........................................................................................................... 51
Fig 6. 7Miss-Detection Examples ................................................................................................. 51
Fig 6. 8Graph of Performance Evaluation .................................................................................... 52

vii
List of Table

Table 2. 1Awashfluvialsources as reported by communities [8] .................................................. 10


Table 2. 2A comparison among the flood detection approach used in WSN ............................... 19
Table 2. 3Related Paper ................................................................................................................ 24

Table 4. 1Feature Extraction steps ................................................................................................ 32

Table 5. 1Comparison Networking Simulation Tools .................................................................. 40

Table 6. 1Simulation Parameter .................................................................................................... 44

viii
List of Abbreviations and Acronyms

ADC Analogue to Digital Converters


BS Base Station
UNICEF United Nation International Child Emergency Fund
GIS Geographical Information System
GPS Geographical ERCS
OGC Open Geospatial Consortium’s

GSM Global System of Mobile Communications


NMA National Meteorological Agency
ERCS Ethiopian Red Cross Society
RGB Red Green Blue
ROI Region of Interest
MAC Media Access Control
IEEE International Electrical Electronic Engineering
NS2 Network Simulation Two
Tcl Tool Command Language
RAM Random Access Memory
UDP User Datagram Protocol
TCP Transport Control Protocol
SENS Sensor Environment and Network Simulator
GUI Graphical User Interface
NDRMC National Disaster Risk Management Commission
FDRDB Flood detection and recognition database

ix
Abstract

Camera based wireless senor Network (WSN) is active and hottest research area of Computer
Science. It is mainly applied by the most of the researchers in the areas of E-health, military,
surveillance, Industrial and Environmental monitoring application. In Flood detection and
recognition, wireless sensor network commonly used for monitoring environment from flood
disaster. Awash fluvial affects communities by damaging property and loss of life. There are no
technologies that applied to detect flood and provide information to save community from flood
disaster.

In this paper, we study how to protect Awash fluvial from community by develop a prototype
camera based flood detection and recognition with wireless sensor network. To achieve the
objective specifically classified into two part such as networking and processing module. First
moduleusedtocollect image using sensor camera and transmitted to base station. Second module
processing, at this stage, pattern matching the unknown imagewhich is given as inputand the
stored reference model are compared using SVM for the purpose of training the model and detect
the image and provide information.

SVM classifier is used to identify either flood is occur or not. The proposed solution have high
rate of accuracy when compared to existing related work research with respect to Position,
Illumination and expression as well as it takes low training and Testing time. By using
YCbCralgorithms with SVM Classifier the accuracy of recognized face is an average rate
of 96.44%.It I also identified that, the image input from real world through sensor camera and
processed through external database are also determine the rate of accuracy.

Keywords: Flood, Camera based, WSN, Detection and recognition

x
CHAPTER ONE

1. INTRODUCTION
1.1 Background
Flood is one of natural disaster. It is an overflow of water that submerges land that is usually dry.
It is occurcondition of fractional or temporary andgeneral or complete effect of normally dry land
areas from overflow of tidal waters from the normal and rapid runoff of surface waters from any
source [1].

The fundamental causes of flood are topographical condition, meteorological condition; planning
problem and natural status to human activities etc. the hydrological condition is specifically and
in winding way related to metrological condition such as storm, devastating precipitation and
violent wind. Hydrological condition emerges due to release of heavy rain drop and huge water.
The geological condition is moreover amount flood condition, for illustration, elevation of the
place. The natural status due to human movement is main factor for flooding situation, distinctive
sort of pollution, deforestation and building development etc.

Flood is one of the major problems in some countries of the world including Ethiopia.In Ethiopia
also flood can influence various zones particularly along Wabishaballe, Ganale, Dire Dawa
somewhere around 210,600 individuals relocated and furthermore Flood that happened in Somali
region Mustahil and East Imayworada of Shebelle zone in excess of 46,500 individuals dislodge,
10,000 domestic animals are killed, it also damaged Health center, water pumps, and Crop[2].

Around the world different types of floods occur in every year. In general, they can be classified
into three commonly categories such as Coastal floods, Fluvial (River Flood) and Pluvial (Surface
Flood) [3].In case of Ethiopia, most of parts are affected by fluvial. Because, geographicallycovers
land area 1,104,300km2 only 104,300 km2water area coved [4].It is not surrounded by ocean or
sea.

In our research study, we examine the problem of flooding on the Awash River in Ethiopia.
According to the national disaster risk management commission (NDRMC) reported flooding in
communities within the Awash River basin and of the potential for additional flooding in areas

1
that lie downstream. As of 14 September 2017, over 20,000 people in Oromia Region are reported
to be affected by floods.in addition On 8 September, the overflow of Awash and Asabera rivers
caused massive flooding in Aysaita woreda (district) in Zone 1 and Buremoditu woreda in Zone 3
of Afar Region affecting over 4,500 people displaced and over 500 hectares of agricultural land
damaged [5]. In fig1.1blue color show the disaster areas affected by Awashfluvial.

Fig,1. 1 :AwashFluvialDisaster Area [5]

Risk management of disasters are divided into three parts: before the event (preparation), during
(crisis management) and after (rehabilitation).These tasks are not easy, especially when affected
area is completely enclosed, or some hardware necessary interventions (such as map) are not
available.

To alleviate these problems, government practices to civil engineering work but, not yet considered
technology based solution. We propose a new approach .As world experience several technologies
used for flood monitor. The technology such as Open Geospatial Consortium’s (OGC), Sensor
Web Enablement (SWE) [5] monitoring using satellite data by GIS [7] so, it is difficult to
implement Ethiopia. Because highly costly, require equipment like satellite and train man power
beyond this area. So, wireless sensor network the most common service utilized in commercial
and Industrial application, because of technical development in processing, communication,
chipper and use of low power computing devices. WSN is important because it uses less energy,
no need of wiring and can transfer over long distance.

2
Using wireless sensor Network they are different mechanism for flood detection such as follows.
Mainly there are three approaches to detect flood using wireless sensor network such as
Geographical information system (GIS), Radio Frequency (RF) and Camera based.
Geographical information system approach needs satellite to receive a data, very cost and need
much train manpower [6].RF approach transmit through radio wave signal propagation, it is
cheap but not provide accurate information. And camera based approach is to transmit the
capture image capture imagethrough WSN.
Generally, in our country flood detection mechanism not yet implements. The community may
not get the prior information when floods happen. After flood happen it noticed by telephone,
television and radio. This notification technique is artificial method and it cannot save life or
properties before flood occur.Therefore, it is prominenttostudy anddevelop prototype for camera
based for flood detection and recognition using wireless sensor Network. Because, compare to
other two techniquesCamera-based systems offer high localization accuracy, High density of
reference nodes in order to cover the tracking area of interest systems track positions and
identities of mobile targets. So we develop a prototype for Awash Fluvial using Camera based
flood detection and recognition with wireless sensor Network.

1.2Motivation

Flood is a natural disaster that results loss of life and property. In Oromia Region every year
fluvial of Awash River disturb massive area of community such as, Botu Kurabo, Awash Melkasa
Bati Germana, Qechachule Guja, Koloba Bli, Bato Degaga and Sodere Resort [8], and in Afar
Region Aysaita and Buremoditu woreda [5]. Due to occurrence of Fluvial,The community may
not get the prior information when floods happen such as Agricultural land, Health center, School,
homes and also their livestock’s such as cattle’s, goats, sheep and poultry. According to NDRMC
[5] reported in two regional community more than forty thousands of people displaced from their
living areas.

Due to these fluvial disasters, Government and Non-governmental Organizations such as UNICEF
and USAID operate to save the lives and properties of the affected communities. These aids require
millions of Birr for disaster management and rehabilitation purposes.

3
Because of the above problems stated and as community live that area, we plan to implement my
thesis work to solve community provide systems which help to minimize the damage through early
flood detection. The major advantage of this research is simple and efficientlyminimized the loss
of life and property. However, in a constrained environment, this thesis has a fast processing time
and reasonable accuracy.

1.3Statement of the Problem

Every year, River flood destroys valuable resources and life’ in Ethiopia. In last year of 2017,
Ethiopian natural disaster risk management commission on flood affected areas shows that, more
floods affected by Awash fluvial. Ten hundreds people are dead, more than four werada agriculture
seeds are lost and more than millions of birr properties are damaged [4]. To handle and monitoring
flood affected areas, community and government are working different activities such as structural
engineering and natural resource management. Those activities basically important however, do
not provide information before flood is happened.

Now a day’s, so many research works on area of flood detection that distinguish the flood by using
deferent parameter model and other tools such as GIS, Open Geospatial consortium (OGC) and
Satellite[6][7]. But those listed approach is very expensive and needs more professional expert.

Lack of efficient device to trigger flood notification, could not detect when will the flood happen,
product are expensive, flimsy and wired, which is not suitable outdoor.

Our model design and implementations based on community level. So, the research is to detect
flood using camera sensors that capture and transmit visual images through wireless sensor
network approach and provide information to base station.

1.4 Objectives
1.4.1 General objective
The general objective of this research is to develop a prototype Camera based flood
detection and recognition with wireless sensor network; in case of Awash fluvial.

1.4.2 Specific objective

 To review a related work in the area flood detection and recognition.

4
 To collect and prepare data set image from Awash fluvial and other area for training and
testing purpose.
 To develop a prototype for Camera based flood detection and recognition with wireless
sensor Network aspect.
 Evaluate the performance of developed system with different datasets.
 To draw for conclusions from experiment results.

1.5 Research Questions


The research is built upon to answer the research question as follows:

I. How to protecting human life and property from awash fluvial disaster areas?
II. How to communicate individual sensor camera through wireless sensor network to base
station?
III. How to develop a training model to detect flood detection and recognition?
IV. Is SVM flood detection model providing information for detect individual inputs?

1.6 Scope/Delimitation
The scope of this study is to develop a prototype camera based flood detection and recognition
using wireless sensor Network in Awash fluvial. Due to time and first try of the study our system
is not detect when the image capture from distance greater than 20 meters because of the system
depend on the quality of the captured image and constraints of the image background. It is difficult
to classify the background which is similar to the flood image. It isdifficult to recognize if images
are nonstandard.

1.7 Significance of the study


Many applications have been considered for wireless sensor network. Today in everywhere
rapidly growing technological wireless sensor technology to used categories in to two such as
monitoring and tracking. Wireless sensor network applicable monitoring purpose mainly use for
military, security, health, environmental, industrial application [9]. Different individuals also take
advantage from this study in order to perform secured environment for flood disaster area such
Ministry of Water, Irrigation, and Electricity, Awash River basin Authorities, National
Meteorological Agency (NMA), Ethiopian Red Cross Society (ERCS) and involved communities.

5
1.8 Research Process Procedures
In order to attain the objective and answer the research questions, the following procedures and
technique is used.

 Identified the area and the problem to be solved.


 Identified the research question to be answered.
 Reviewed different articles, journals, books and sites.
 Identified the required parameters to design and design the proposed solution.
 Experimental environment using Mat lab and network simulation.
 Documented the result.
 Finally, recommend for further studies.

Fig,1. 2:Research Process framework

1.9 Organization of Thesis


This thesis is organized into seven chapters in the following ways.

6
 Chapter one describes about an over view of the study such as, background information,
statements of the problem, motivation, objectives, scope and limitation, and significance
of the study. Chapter two describes about literature review and related works.
 Chapter three describes about research methodology. It includes development tools, Design
tools, data collection method, proposed system design method, proposed system
implementation method, proposed system evaluation and model of pattern matching.
 Chapter four describes the design proposed solution. It is contain the detail description of
proposed solution of thesis, flow chart component diagram, model and etc.
 Chapter five presented the experimental setup and implementation of study. In these
section includes software and hardware requirement and also selection of simulation is
discussed.
 Chapter six describes, the detail description result and evaluation of proposed research and
Chapter seven describes the conclusion and feature work of the study.

CHAPTER TWO

2. LITERATURE REVIEW
2.1Introduction
In this chapter, discussed aboutliterature review related to research areas such as flood, Awash
River, Awash fluvial history, network, wireless sensor network, wsn approach for flood detection
technology and related work.

2.2 Flood
Flood is natural disaster. It has responsible for the loss of valuable lives and damage of large
amounts of property every year, especially in the poor and developing countries, where people are
at the mercy of natural elements. A lot of solutions have been put to minimize the damage through
early flood detection [10].There are several different kinds of flood, and each has a different impact
in terms of how it occurs, how it damage and forecastedit causes. They are three common types
of flood [3].

1. Coastal (Surge Flood)

7
Coastal flood is type flood happen by ocean, sea or other large area of open water. The cause of
such a surge is a severe storm. The storm wind pushes the water up and creates high waves by
dangerous weather condition but the wind can have a larger effect. The most characteristics of a
coastal flood is that the water level drop and increases with the tide. At high drift the water may
flow in and at low drift it may recede again

2. Fluvial (River Flood)


Fluvial or river flooding is one of the most common types of flood. They are several cause of river
flood; the most common cause is when extreme rainfall over an extended period of time exceeds
its capacity and sudden melting of ice and snow. And also by broken dams, rough seas and high
tides floods can occur. From a river flood can be widespread as the overflow affects smaller rivers
downstream. Such type of flooding classified into two. Such as

 Overbank flooding: occurs while water rises overflows over the edges of a river or stream.
This is the most common and can occur in any size channel from small streams to huge rivers.
 Flash flooding: is described by an intense, high velocity torrent of water that occurs in an
existing river channel with little to notice.

3. Pluvial (Surface Flood)


A pluvial, or surface water flood, is caused when heavy rainfall creates a flood event independent
of an overflowing water body. Pluvial flooding can happen in any urban area even higher elevation
areas. It is common types of pluvial flooding.

 Intense rain: saturates an urban drainage.


 Run-off or flowing water: from rain falling on hillsides that are unable to absorb the water.
Hillsides with recent forest fires are notorious sources of pluvial floods, as are suburban
communities on hillsides.

The flood detection mechanism is different from one to another due to the source of flooding,
Couse of flooding and geographical areas that cover the disaster. Therefore, studyareafocused on
fluvial floods.

8
2.3 Awash River
The Awash River basin (Fig 2.1) is one of the dozen river basins of Ethiopia. It drains the central
and eastern highlands of the country. It has a catchment area of about 110,000 km2 .The river
starts from Ginichi town west of the capital Addis Ababa. It is travels along the Rift Valley and
ends in Lake Abe on the border between Ethiopia and Djibouti. Through its journey, the river
flows from an altitude of 3000 m above sea level to 250m als with a total length of about 1200 km.
The Awash basin is divided into three parts upper, middle, and lower basins based on
climatologically, physical, socio-economic, agricultural, and water resources characteristics The
basin hosts an estimated 18.3 million people. The Largepopulationis leads a pastoralist and
smallholder farmer livelihood [11].

Fig 2. 1:Elevation Map of Awash Basin [11]

2.3.1 Summary of Flood History of Awash Fluvial


Table 2.1 summarization of flooding history affect communities coming from Awash fluvial
report by the community. From the table analysis that communities of that list in table every year

9
flood happen by Awash River. According to Awash fluvial mostly affected community each year
frequently.
Table 2. 1Awashfluvialsources as reported by communities [8]

Community/Facility Experience Experience Source of the


regular annual flooding? flooding?
flooding (< 5
years
between floods)?
Botu Kurabo Yes No Awash River

Awash Melkasa Yes Yes Awash River


Bati Germana Yes Yes Awash River
Qechachule Guja Yes Yes Awash River
Koloba Bli Yes Yes Awash River
Bato Degaga Yes No Awash River
Sodere Resort Yes Yes Awash River

2.4 Overview of the Network


A network can be characterized as a group of computers and other devices connected in some
ways so as to be able to share data.[12] Computer or device connected each other basically
classified into two such as wired and wireless Network. The big difference between these two
types of networks is one uses radio frequencies and one usesnetwork cables. Wireless network
advantages’ than wired network because as inexpensive, greater mobility and flexible[13]Depend
on type device connection used different type of wireless network such as wireless sensor network,
Ad hoc mode, Infrared, Bluetooth, RF, Omni, 802.11g,802.11a and etc.

For Flood detection and recognition WSN are becoming increasingly important for monitoring the
environment of flood affected area that provides information. They provide more comfort for
stakeholder, with the absence of wires reducing costs and providing more flexibility [14].WSN are
getting a special place in the development of Flood detection application, due to its characteristics
such as: not intrusive design, low energy consumption, low price and its flexibility to integrate
into health care environments [7].

2.5 Wireless Sensor Network


A wireless sensor network (WSN) is a wireless network consisting of spatially distributed
autonomous devices using sensors to cooperatively monitor[12].These nodes are a tiny device has

10
the capability of sensing, communication and computation. Usually data are transferred to server
to monitor the environment or the required phenomena [15].Wireless networks to monitor
environmental or physical conditions, such as sound, temperature, pressure, vibration motion or
pollutants and to cooperatively pass their data through the network to a sink or main location where
the data can be observed and analyzed. A base station or sink acts like an interface between the
network and users. One can retrieve required information from the network by injecting queries
and gathering results from the sink. Typically a wireless sensor network is contains a sensor nodes.
The sensor nodes can communicate among themselves using radio signals [16].Fig 2. 2 below
show datacollected by sensors is transmitted to a specialnode equipped with higher energy and
processingcapabilities called “sink” or “Base Station” (BS).

Fig 2. 2Wireless sensor networks [20]

2.5.1 Structure of a wireless sensor node


A sensor node is made up of four basic components such as processing unit, transceiver unit,
sensing unit and a power unit which is shown in Fig 2.3. It also has application dependent
additional components such as a location finding system, mobilizeand a power generator. Sensing

11
units are usually composed of two subunits: analogue to digital converters (ADCs) and sensors
[17]. The sensors is generate analogue signals are converted to digital signals using ADC, and then
transmit into the processing unit. The processing unit is generally associated with a storage unit
and it’s managing the procedures that make the sensor node work together with the other nodes to
carry out the assigned sensing tasks. A transceiver unit connects the node to the network. One of
the most key components of a sensor node is the power unit. These units can be supported by a
power scavenging unit such as solar cells. The other subunits, of the node are application
dependent.

Fig 2. 3The components of a sensor Node [20]

2.5.2 Wireless Sensor Network protocol stack


The protocol stack used by the sensor nodes and sink. This is show in(Fig 2.4). This
protocol stack combines integrates data with networking protocols, routing awareness powerand
communicates power efficiently through the wireless medium and promotes cooperative efforts of
sensor nodes. The protocol stack consists of the application layer, transport layer, network layer,
data link layer, physical layer, power management plane, mobility management plane, and task
management plane [15].

12
Fig 2. 4Protocol Stack forWSN[18].

 Physical and Data Link layer


The physical layer highlights on the transmission media between sending and receiving nodes,
the data rate, signal strength, frequency types are also addressed in this layer and Data link layer
does the correction error and detection and encoding of data. WSN is one of the most accepted
protocol for Medium Access Control (MAC) and physical (PHY) is IEEE 802.15.4[19]. The main
characteristics of this protocol are low power, low cost, short distance and low data rates IEEE
802.15.4 defines two types of network nodes, namely full-function device (FFD) and reduced-
function device (RFD).

IEEE 802.15.4 (fig 2.5) WSNs, can be configured as either star or peer-to-peer networks. In star
networks operate in a more structured way, where one of the FFDs acts as a PAN coordinator, and
then other nodes join the network On the other hand, peer-to-peer networks nodes connect with
each other in an arbitrarily manner based on reach ability, whereas nodes are self-managed.

13
Fig 2. 5IEEE 802.15.4 peer-to-peer or star topology [21]

 Network layer
Network layer is responsible for routing of messages from node to cluster, node to node ,cluster
leaders to the base station, leadercluster leaders to cluster leaders and vice versa. Internet Protocol
(IP) is the protocol in computer networks. IP protocol is proven for scalability, and specification
of IP protocols is open and freely accessible for everyone. Therefore, a new standard was
introduced to facilitate IPv6 to WSNs, named “IPv6 overLow Power Wireless Personal Area
Network” or 6LoWPAN.The advantages of 6LoWPANs are their popularity, applicability, bigger
address space, stateless address configuration and IPv6 security.

 Application layer

Data is collected and managed at application layer therefore it is important to ensure the reliability
of data. The constrained application Protocol (CoAP) is application Layer protocol that to assign
for Low resource, low Memory, low computation and low power requirement.

2.5.3 Design issues of a wireless sensor network


There are a lot of challenges placed by the deployment of sensor networks which are a superset of
those found in wireless sensor networks. Sensor nodes communicate over wireless. Let us now
discuss the individual design issues in greater detail [17].

I. Fault tolerance: Each node in the network is prone to unanticipated failure. Sensor nodes
are frequently deployed in dangerous and vulnerable environment. Nodes can fail due to
physical damage or hardware problems or by exhausting their energy supply. We expect

14
the node failures to be much higher than the one normally considered in wired or
infrastructure-based wireless networks.
II. Scalability: Sensor networks vary in scale from several nodes to potentially several
hundred thousand. In addition, the deployment density is also variable. The protocols
deployed in sensor networks need to be scalable to these levels and be able to maintain
adequate performance.
III. ProductionCosts: sensor networks can compete with conventional information gathering
approaches only if the individual sensor nodes can be produced very cheaply.
IV. Hardware Constraints:At least, every sensor node needs to have a power supply, a
transmission unit, processing unit, and a sensing unit. Optionally, the nodes may have
several built-in sensors or additional devices such as a localization system to enable
location-aware routing. However, additional functionality comes increases the power
consumption and additional cost, physical size of the node. Thus, additional functionality
needs to be always balanced against cost and low-power requirements.
V. Sensor Network Topology: WSNs have evolved in many aspects; they continue to be
networks with constrained resources in terms of computing power, energy, memory, and
communications capabilities. Of these constraints, energy consumption is of paramount
importance, which is demonstrated by techniques, algorithms, and protocols that have been
developed to save energy, and thereby extend the lifetime of the network. Topology
Maintenance is one of the important issues researched to reduce energy consumption in
wsn.
VI. Transmission Media:the media communication within the nodes is normally
implemented using radio communication. But, some sensor network use infrared or optical
communication.
VII. Power Consumption: many of the challenges of sensor networks revolve around the
limited power resources. The size of the nodes limits the size of the battery. We have to
carefully consider efficiency of battery when to design the hardware and software. For
instance compression and other police might be acceptable of conserve energy.

15
2.5.4 Application of Wireless sensor Network
WSN applications [9] can be classified into two categories: monitoring and tracking. That see (Fig
2.6) Monitoring applications include indoor/outdoor environmental monitoring, health and
wellness monitoring, power monitoring, inventory location monitoring, factory and process
automation, and seismic and structural monitoring. Tracking applications include tracking objects,
animals, humans, and vehicles. While there are many different applications, below describe a few
example applications that have been deployed and tested in the real environment.

Fig 2. 6Application for Wireless sensor Network [9]

2.6 Wireless Sensor NetworkMechanism for Flood Detection


In this topic to discuss flood detection some of mechanism existed in this world and select best
technique from them. The existing WSN-based Flood detection are discussed in details
[22].Today, there are a wide variety of wireless sensor devices available in market that are
introduced and compared WSN, Flood detection and recognition algorithms usually focus on the
aspect of sensor nodes’ interaction with the target after the target has been detected within the area
of interest. It is focus on flood detection technologies which can be used to detect and recognition
through WSNs. In this paper, we categorize the WSN-based flood systems into three such as GPS
based, RF based and Camera based as shown in Figure 2.7.

16
Fig 2. 7Classification of Flood detection using WSN

2.6.1 GPS-based
The GPS satellites transmit signals to the GPS receiver and compute its current flood location.
GPS operations depend on a very precise time reference, which is provided by atomic clocks on
board of satellites. GPS receivers do not transmit and require a line of sight between the GPS
satellites and receivers, and therefore, GPS-systems work effectively outdoors.

GPS-based flood detection require attaching a GPS receiver and transceiver to each target flood.
The GPS receiver (Fig 2.8) obtains the location information from satellites, while the transceiver
is used information to a base station using Global System of Mobile Communications (GSM)
network.

Fig 2. 8GPS Receiver [22]

17
2.6.2 Radio Frequency (RF) based
Radio Frequency (RF) baseddetection is use of radio waves to determine the flood flow of target’s
location. Radio signal information from a wireless transmitter can be used to estimate the location
of target nodes in two ways: the first uses the signal propagation model to convert signal strength
to a distance measurement, using previous knowledge about reference nodes’ coordinates, and
deploys a geometry method to compute the location for target nodes. Figure 2.9 demonstrates the
high-level system style thought. A transportable transmitter system with star charging feature
wirelessly sends water level knowledge to a motionless receiver system.

Fig 2. 9FloodDetection with Radio Frequency approach [23]

2.6.3 Camera based


Camera -based is localization systems are a natural sensing modality for flood detection
applications, since each target does not require carrying or wearing any special device. These
systems track mobile targets based on their presence or absence. Camera-based systems have been
used for detect and recognition objects through WSN. Fig 2.10shows the camera based wireless
device.

18
Fig 2. 10A camera-based wireless sensor device [22]

2.7 Compare of Existing Flood detection Mechanism in WSN


Table 2. 2A comparison among the flood detection approach used in WSN

Key issue GPS RF Camera based

Accuracy Very High Low localization Moderate depend


accuracy in both camera pixel
(indoors & outdoors

The requirement of Required Simple device is No need to attach any


HW to target node required devices

Cost High Low Depends (Moderate)

Deployment Complex Flexible Easy

Power consumption High Depends Low

Due to above (Table 2.2) comparison of three flood detection wsn mechanism, we have selecting
for thesis camera based is best choice because, Camera-based systems offer efficient localization
accuracy, as these systems track positions and identities of mobile targets, without the need for
attaching any device to suspect object and the cost of camera based is compatible to capacity
community and government.

19
2.8 Camera Based Wireless sensor Network
Camera-based WSN are an emerging research area with many promising applications. Potential
applications include remote video surveillance, monitoring assisting elderly and health patients
and habitat monitoring. The sensor cameras communicate through wireless sensor Network and
transmitted image or video frame depend on application used [24].

2.8.1 Camera Node System


A traditional sensor node is mainly composed of four units, sensor unit, processing unit, wireless
communication unit and power supply unit. But In camera sensor node, the sensor unit is replaced
with an image acquisition system. (Fig.2.11) shows the architectures of camera sensor node. [24]

Fig 2. 11Camera Sensor Nodes [24]

2.8.2 Characteristics of Camera Based Wireless Sensor Network


These unique characteristics of camera based wireless sensor networks are described next [24].

 Resource Requirements
 Local Processing
 Real-time Performance

20
 Precise Location and Orientation Information on Resource Requirements
 Time Synchronization
 Data Storage
 Autonomous Camera Collaboration

2.9 Flood Detection and Recognition


Flood detection and recognitionis accomplished different steps such as Preprocessing, Feature
extraction and classification. However, these techniques are not reliable as they cannot provide
further information. Then, in image processing analysis, the object is detected and recognition by
understanding the color fundamental and model.
There are many types algorithm to Preprocessing and Extraction image of color model such as
RGB, YUV, YCbCr,CMYK, HSL, HSV,CIE and HIS La*b*[36]

 RGB Color Model

RGB Colors are specified in terms of three primary colors such as Red (R), Green (G), and
Blue (B).In RGB color space, a normalized color histogram is used to detect the pixels of flood
color of an image and can be further normalized for changes in intensity on dividing by luminance.
[37]

 YCbCr Color Model

YCbCr Color model is basically in terms of luminance(Y channel) and chrominance (Cb and
Crchannels). It segments the image into a chrominance components and luminous components. In
YCbCr color model, the distribution of the areas is consistent across different r in theCb and Cr
color spaces.YCbCr color model is light sensitive so to improve the performance of image color
clustering. Its chrominance components are almost independent of luminance and there is non-
linear relationship between luminance(Y) andchrominance (Cb, Cr) of image color high and low
luminance region.
Image Classification
In image processing one complex and importantsteps is image classification. Different type of
image classification algorithm, basically classified either unsupervised or category supervised.
Most of classifier such as minimum distance, neural network, support vector machine, and decision
tree are defining decision about requires training sample and class. On other hand clustering based

21
algorithm, example. K-NN, K-Means or ISODTA are fuzzy- set classifier and unsupervised are
classification provide more accurate result and information. In this study we support vector
machine [38].

This is also true of image segmentation systems, including those using a modified version SVM
that uses the privileged approach. SVMs are effective when the number of features is quite large.
It works effectively even if the number of features is greater than the number of samples. Non-
Linear data can also be classified using customized hyper planes built by using kernel trick. It is a
robust model to solve prediction problems since it maximizes margin. The biggest limitation of
Support Vector Machine is the choice of the kernel. The wrong choice of the kernel can lead to an
increase in error percentage. With a greater number of samples, it starts giving poor performances.
SVMs have good generalization performance but they can be extremely slow in the test phase.
SVMs have high algorithmic complexity and extensive memory requirements due to the use of
linear programming.

2.10 Challenge of Camera Based Using Wireless Senor Network


Some of challenge of camera based image detection list as follow.

 Image noise , image formation


 Camera Quality and standard
 Variability transmission Quality
 Mismatched training and test Condition
 Failure of Sensor Network

2.11 Related Work


Many types of research have been done in the area of wireless sensor network. Some paper also
covered some related to my thesis work. The gap of thesis, limitations, Methodology used and
result got in previous work was discussed in next paragraph.
AL-Marakeby [24] the author presented the implementation of WSN in e-health field, this study
aimed WSN is commonly used for monitoring elderly people, babies, and patients. The data
transmission rate of camera sensor nodes can be dramatically reduced by applying image analysis
and processing at the sensor node side. To monitoring and detect application work by camera use
and transport E-health information to stakeholder. In this research study some important events for

22
patient, elderly people and infant monitoring are designed and automatically detected. And also
Automatic detection of events can support the human observer with alerts to attract his attention.
The research processed by motion detection algorithm and advantage reduce response time and
efficiency nurse’s and related for care of elder, baby and patient.

Indira et al [25] design a model for flood prediction and detection using wireless sensor network.
This paper mainly is concerned deploy different type sensor in river by forming wireless sensor
network. The sensor collected two parameters; such as pressure sensor, level sensor to monitoring
the level of barrage. If level water is greater than barrage level water the system alerted information
to work station. The research work important easy computation area barrage or dam.

Shi-Wei Lo, et al [26] focused on the determination of flood monitoring based on image processing
techniques. The experimental results proposed that the visual sensing approach may be a reliable
way for determining the water fluctuation and measuring its elevation and flood affected area with
respect to real world environment. The research detects the water level by monitoring the stage
between the rulers and water body using cameras. This paper is advantage for monitoring flood
and forecast system. A single pre-warning system can accurately monitor and forecast floods under
certain environmental conditions; however, it lacks an intelligent triggering and response function
for field flooding and over flow events. Large amount flood forecast systems can’t provide
sufficient field information to report office.

Jaymala Patil, et al [27] develop wireless sensor network using flood monitoring. The process
monitoring technique using water level sensor around bridge transmitted alert based on
information access from sensor install. The research only discuss flood affect area around bridge
so, it cannot detect a flood rate.

Lívia C. Degrossi, et al [15] develop Brazil flood monitoring in using sensor web in wireless sensor
networks. Our approach collected data based on Open Geospatial Consortium’s (OGC) Sensor
Web Enablement (SWE) standards. This kind of approach has become important owing to the
constant occurrence of floods in Brazil, as well as technological advances in the detection of
flooding in urban rivers, which can help to save many lives and give protection against material
losses. But, the drawback of the thesis is very costly material of Geospatial equipment.

23
In this paper, we design prototypeflood detection and recognition concept of image from sensor
camera different settled place distribution along the road with wireless sensor network. As input
data taken from the set sensor camera then train dataset of from the database detect the input image
by image processing concept then provide information to the stockholder. In (Table 2.3)
summarized related work of thesis such as objective, the pros and limitation with their reference.

Table 2. 3Related Paper

Ref Objective Pros Limitation

24  Developing the  commonly used  The data transmission


implementation of for monitoring rate of camera sensor
Wireless sensor Network in elderly people, nodes can be
E-health babies, and dramatically reduced.
patients  The computation time
depend on size of
image
25  Design a model for flood  Modeling flood  Only using two
prediction and detection using detection with parameter such as
wireless sensor network. wireless senor level sensor and
network pressure sensor
 Applicable in barrage  The design model only
or dam applicable only on
their dam.
27  Monitoring flood based on  Using visual sensor  Only applicable on
image processing technique determine the water bridge area.
fluctuation.
 Measuring the
evaluation of water.

24
15  Develop Brazil flood  important owing to the  Used very cost
monitoring in using sensor constant occurrence of equipment used for

web in wireless sensor floods in Brazil capture from space.


 detection of flooding
networks.
in urban rivers
 help to save lives and
protection against
material

CHAPTER THREE
3. RESEARCH METHODOLOGY
3.1 Introduction
In this chapter, we have discussed the way of the thesis methodology of the camera based flood
detection and recognition with wireless sensor network; inquiring the proposed system
understanding way of development method, deign the proposed solution, describe the testing and
implementation method and tools that used in order to achieve the proposed solution.

25
3.2 Literature Review
The literature review, deals with reviewing the related with current research work. The main source
of literature review includes a book, journal articles, thesis, and resource form website and
conference papers from national and international repositories are deeply reviewed. in order to get
better knowledge or sentiment analysis and polarity classification various techniques will be
reviewed in details.

3.3 Data Collection Method


Data collection is the process of gathering and measuring information on variables of interest, in
an established systematic fashion that enables one to answer stated research questions;
themainobjectiveofthedatacollectionistoprepare appropriatetrainingandtesting dataset for the
desired solution. In our case collect the data set fromAwash River, surrounding areas and also
related image from different website.

3.4 Design Proposed Prototype


Design the proposed is the process of defining the architecture, flowchart; block diagram ad other
diagrams that to satisfy specified research process. Proposeddesign prototypes help to seen as the
application of solution in design aspect. The research design is discussed in chapter four.

3.5 Design Tools


Design tools discuss the tools that provided to develop the proposed approach. They used design
different diagram, architecture, and model. Design tools for research process used depend on thesis
work. So, for thesis work used Edraw Max.

3.6 Development and Implementation Tools


The Development tool is computer software tools that used to achieve objective of the thesis. There
are many different possible platforms for simulation Camera base flood detection and recognition
with wireless sensor network; basically to simulate proposed solution we have to using network
simulation 2(NS2) for wireless communication and visual processing process we select Mat lab.

26
3.7 Evaluation Proposed Solution
Evaluation is a systematic determination of subject merit, significance and worth using criteria or
standard. In our case, evaluation performance is of proposed prototype accuracy based on
parameter. The number of Image testing in percentage for a given data set in classification, with
respect to the whole dataset.

CHAPTER FOUR
4. DESIGN PROPOSED SOLUTION
4.1 Introduction
This chapter, we have discussed the overall proposed solution of camera-based flood detection and
recognition with wireless sensor network isillustratedinfig4.1.it explain whole process of design
Such as the architecture, Process Model, pseudo code solution, algorithms we used, their relation
and interaction, the representation and description of components.

27
Fig 4. 1Overall Detail Architecture of proposed solution.

4.2 Pseudo code of proposed solution


This section describe about the overall algorithm for proposed solution

Input image

Output Information

Begin

Sense_ camera_ capture (image)

While (sensor_ transmitted (image) true)

Process _the_Image_ (visual _processing)

If process_image&& dataset_ image true

28
Flood_occur and Provide_information

Else

Flood _not_ occur

4.3 Description of Proposed Solution


Basically proposed solution architecture classified into phase such as networking part and
processing part. The networking part discussed in subtitle 4.3.1 “proposed camera based
networking”. The processing part discuss on subtitle 4.3.2 deals with image acquisition process
step on base station. This phase is classified into two phase such as training and testing phase.

4.3.1 Networking Part


In this section discuss, the (fig 4.2) shows sub architecture proposed architecture describe above
in (figure 4.1). It is the illustration of image acquisition from sensor camera and transmitted
through wireless sensor Network to base station for further processing.

Fig 4. 2Sub architecture of Proposed Network

Camera Sensor: capture the image and transmit to sink Node.

29
Sink Node: Receive the image capture from camera sensor and transmitted to network for
further processing
Base Station: collected image from base station, detect image using image processing and
provide information.

4.3.2 Processing Part


From figure 4.1 shows the system architecture of Camera based flood detection and recognition in
wireless sensor network. From the architecture, the processing has two main phases: The training
and testing phase. In the training phase includes data preparation, preprocessing, feature extraction,
building a model for flood detection. Whereas, in the testing phase it includes analysis raw image
(preprocessing), detecting flood occur or not from flood model, and finally generating the output
image and information.

Basic of Image Processing

Image Processing is the method to converting an image into digital form and perform operation on
it.in order to enhanced image useful information. The image process include the following three
steps.

1. Importing the image with digital photography


2. Analysis and manipulating image include data compression and enhance and spotting
pattern
3. Output the stage in which result can be altered or report based on image analysis

Raw image: camera raw image file contains minimally processed data from image sensor either
digital camera or motion picture. Raw file are not yet processed and read to preprocess.

Capture Dataset: collection of raw image collect from camera sensor further processed.

Existing Flood image Dataset: collection of Awashfluvial image that used for training model. For
training purpose we collected 60 different images for training and testing propose.

Information: result of flood happen or not base input data.

30
 Training Phase
In training phase, it is process to create model from train dataset. To create a model, flow such
steps such as preprocessing feature extraction and classification. The figs 4.3 describe flow chart
of training phase to provide model.

Fig 4. 3Flow chart of Training process

1. Image Acquisition

In this step, we store or load image capture from camera sensor to database.it is step involved
camera and transfers into computers to receive the image in its digital format. Image format used
is JPG.

2. Preprocessing

It is step deals with an operation done before a key processing steps, such as: filtering color
transforms, sub-sampling/scaling histogram generation. It also refers with enhancement of image
quality by resize image and adjusts the image for further processing. Such as histogram
equalization, filtering and sharpening. In this study, used RGB and YCbCr color space.

In order to detect flood, pixel of flood region in RGB is explored. Then for YCbCr colour space,
the image from RGB format has to be converted to YCbCr format before the image could be
analyze by equation 4.1

31
𝑌 0.299 0.587 0.114 𝑅
𝐶𝑏 = 0.5 −0.1687 ∗
−0.3313 𝐺 …………….…………………………… (4.1)
𝐶𝑟 0.25 0.5 0.312 𝐵

In this step we add smooth code for removal of noise.to doing this using Gaussian algorithm.
(Equation 4.2) is implemented by replacing the value of every pixel in an image by the average
value of the gray levels in the neighborhood. Where, S is the M - pixel neighborhood of points,
surrounding the point (x, y).

1
g(𝑥, 𝑦)=𝑀 ∑𝑠 𝑠(𝑥, 𝑦)……………………………………..……………………………(4.2)

3. Feature Extraction
Feature extraction is where all the data pixels that represent and describe the desired pixels is been
grouped. The set of features will extract relevant information accordingly to the desired task. For
this research, flood pixel had been extracted by using two color spaces and six rules that were
applied for each of image tested.

Table 4. 1Feature Extraction steps

Color space Rules

RGB 1: R>G>B

2:if R>Rmean ∩ G>Gmean∩ B>Bmean

YCbCr 3:Y(x,y)>=Cb(x,y)

4: Y(x,y)≥Ymean ∩ Cb(x,y)≤ Cbmean∩


Cr(x,y)≤Crmean

5: Cb(x,y)- Cr(x,y)≥Th

6: Cb(x,y)≤120∩ Cr(x,y)≥150

32
4. Image Classification
In this study uses supervised classification using SVM to classify the flood images because of
dynamic in nature and high accuracy of images, it tries to find the separating hyper-plane with
maximum margin to separate positive and negative samples from the training set.

Fig 4. 4Flow chart image Classification using SVM

In above,(Fig, 4. 1)show image classification techniques steps

i. First input data called capture image's dataset. This input dataset is continuous data
stream to the flood detection process.
ii. Second steps require preprocessing stage method to define the proper input to the image
classifier.
iii. Third steps is the classification process which involves trained dataset to classify the
image under SVM classification.
iv. Finally, Graphical User Interface creates the reports in required format for flood occurs
or not.

 Mathematical Expression of SVM Algorithm


This study uses the SVM to classify flood images.SVMclassifies objects into two classes by
calculating the maximum margin hyper-plane between the training imagesof both given classes.

Let training data set{(xi,yi)}i=1….n, yi€ {-1,1} by separated by hyper-plane with margin ρ.

33
WTXi+b ≤ρ/2 if yi=-1………………….……………………….………. (4.3)

WTXi+b ≥ ρ/2 if yi=1………………………….………………….……. (4.4)

2
ρ= ||w||………………………….…..……………….…….…………… (4.5)

 Testing Phase
In this testing phase, initially the image is given as input to this system and initially the image is
applied with the preprocessing mechanisms such as extraction and demonstration for detection.
After completing this, the image is provided to the first SVM in order to observe image status and
then these regions are utilized to identify the flood occur or not. Thus this system identifies the
stage of the flood with the aid of a raw camera image.

Fig 4. 5 Testing Phase

4.4 Proposed Block Diagram of Proposed Solution


In this section, discuss about description of block diagram figure 4.6 of process model of diagram.
The process model is based on the research design which is the research activities from the initial
problem specification through design, implementation, and evaluation of solutions. The process
involves dataset preparation, design and implementation of a prototype and evaluation of the
prototype to measure its performance. The processes of the prototype model as a summary
procedure and over all of the steps for identification.

34
I. The camera collect image from distribute camera
II. Transmit the image throw wireless sensor communication
III. The collect data goes to image processing way then compare the image with train
dataset.
IV. Final provide information based on input data

Fig 4. 6Block Diagram of Proposed Solution

Block diagram of the proposed solution classified into three sub block such as data collection,
transmission and Processing sub block.

The data collection using camera sensor collect image from the environmental install and
wireless communication is using wireless media transmitted the data from one sensor to another
and base station. Lastly, after the image reach to database processing and compared to dataset
exit and provide information.

35
CHAPTER FIVE
5. EXPERIMENTAL SETUP AND IMPLEMENTATION
5.1 Introduction
In this chapter discuss the experimental environment that used to implement this thesis.
Conducting experimental thesis work proposed solution for camera base Flood detection and
recognition with wireless sensor Network in case of Awash fluvial. It is difficult implement in real
world. So, reduce the cost of research using best and computable simulation tools for research
work. In section discuss the software and Hardware requirement used and also compare the
simulations.

5.2 Software Requirement


The software requirements conduct this thesis as follow:

 Operating system: window-7, Linux


 Programming Language: Tcl
 Virtual Box: VMware Workstation

5.3 Hardware Requirement


The Hardware requirements used to conduct to this thesis as follow;
 Processor: Intel(R) Core(TM)i7-4510UCPU@2.00GHz 2.60GHz
 Installation Memory(RAM): 4:00GB
 System Type : 64-bit Operating System
 Hard Disk :1TB

36
5.4 Selection of Simulation Tools
Basically, there are a lot of tools available for simulator. This research common need tools the
network phase and image processing phase. In this section simulation to achieve thesis work and
also compare and contrast tools used justify simulation to this thesis.

5.4.1 Networking Phase


For wireless senor network different type of simulator available simulating and routing protocol.
Below is list famous simulator used to simulate WSNs. Select NS2 simulator based there aspects
like resources, fault tolerance, global behavior good performance compare with reject other
tools.

Comparison Simulation
a) NS2

Network Simulator (Version 2) [28], widely known as NS2, is simply an event-driven simulation
tool that has proved useful in studying the dynamic nature of communication networks. Simulation
of wired as well as wireless network functions and protocols (e.g., routing algorithms, TCP, UDP)
can be done using NS2. In general, NS2 provides users with a way of specifying such network
protocols and simulating their corresponding behaviors. NS2 start alternative of Real network
simulation in1989. The key role of Ns2 is as follow visual the network connection, data
transferring and related stuff.

Some drawback of Ns2 simulation as follow stated such it require advance skill effectively use
simulation, difficult to customized available, it contradiction between application and network
level in sensor network.

b) TOSSIM

TinyOS wireless sensor networks [29], used to simulate a discrete event developed by UC
Berkeley. TOSSIM specifically designed for application of TinyOS execute on MICA Motes.
TOSSIM simulates entire TinyOS applications. The simulation language is written in nesC. The
simulation simulated in bit format.

c) GloMoSim

37
Global Mobile Information System Simulator (GloMoSim) [30] is a scalable of environment
simulation for wired communication and wireless network. In GloMoSim node repented
geographical area of simulator. The network nodes which particular entities represent are
determined by the physical position of the nodes. it also use for mobile wireless routing protocol
and good for Mobile IP.

d) UWSim

S. Dhurandher and Misra [31] stated thatUWSim is type of simulation used for underwater sensor
Network (UWSN) a simulator used for Underwater Sensor Networks (UWSN). The simulator
focus on ad hoc network and ground based do understand factor that effect underwater
communication. it process the network based on component based rather than protocol based
approach.

e) Avrora

Avrora [31] is simulator an open sources for emended a sensing program. It simulator a network
of motes, execute in microcontroller program and run accurate simulation device and radio
communication. Avrora provide analysis framework program, checking static of embedded
software, and analysis an infrastructure for future program. It can emulate two typical platforms,
MicaZ, and Mica2 and run AVR elf-binary or assembly codes for both platforms.

f) SENS: A Sensor Environment and Network Simulator

SENS is type of network simulation that simulator wireless sensor network with model,
architecture layered with customize component model of application layer.it enable realistic
simulation by using real sensor to represent component implementation.it is advance sensor
network for WSN. SENS used for deploy for actual sensor node. It programmed by C++

g) COOJA (COntiki Os Java)

COOJA is simulation type used simulator for the Contiki sensor node operating system. It allows
simultaneous cross-level simulation at application for machine code instruction and operating
system and set level [33]. COOJA combines low level simulation of sensor node hardware and
simulation of high-level behavior in a single simulation. It can simulate sensor networks

38
simultaneously at different levels, including the operating system level and network. The scripting
language of COOJA is java.

h) Castalia

Castalia is developed in C++ by Australia National ICT. It is application level simulator for
Wireless Sensor Network based on OMNeT++.It can be used evaluate platform specific
applications, the sensor node are implement modules, sub module represent instance network stack
layer and application. Module Node is interconnected to physical process module and wireless
channel. Node modules are connected to wireless channel and physical process modules.

i) Shawn

It is open source that used to design help to advance scale network simulation. Shawn is design
the estimate phenomena of network simulation. It support large network and provide highest
abstract level compare to other simulation tools such as SENSE, ns2, OmNeT++, TOSSIM and
GloMoSim.But, only concern on wireless sensor Network [32].

j) EmStar

Simulation is type that provides flexible environment bridge between simulation and deployment
for iPAQ-class sensor running Linux. Stakeholders have three options such as execute many
virtual nodes on single host with single simulation network, running many virtual nodes on single
host with individual virtual node bridge to real world network and execute a single node on host
with network interface. [33]

k) JSim

J-Sim is a general purpose simulator modeled after Ns-2, developed at the University of
Washington by the National Simulation Resource. Unlike Ns-2, however, J-Sim uses the concept
of components, replacing the notion that each node should be represented as an object. J-Sim uses
three top level components: the target node (which produces stimuli), the sensor node (that reacts
to the stimuli), and the sink node (the ultimate destination for stimuli reporting).J-Sim provides
support for sensors and physical phenomena. Energy modeling, with theexception of radio energy
consumption, is also appropriately provided for sensor networks [34].

39
l) SENSE

SENSE was a sensor network simulator developed in 2004.SENSE supports an energy model that
is sufficient for wireless sensor networks. It is similar to J-Sim in that it is component based, but
is written in C++ in order to avoid the perceived inefficiency of Java. SENSE runs on top of COST,
a component based discrete event simulator that is written in C++, A comparison between different
NS2 simulators are shown table below [35].

Table 5. 1Comparison Networking Simulation Tools

Network script Key feature Draw back


Simulator
Name
NS2 C++  A large number of protocols  Supports only two wireless
available publicly. MAC protocols, 802.11,
 Availability of a visualization and a single-hop TDMA
tool. protocol.
TOSSIM nesC  High degree of accuracy or  Compilation steps lose the
running the application source fine grained timing and
code unchanged. interrupt properties of the
 Availability of a visualization tool code.
GloMoSim Parsec  Parallel simulation capability.  Effectively limited to IP
networks because of low
level design assumptions.
UWSim Java  Handle large networks.  Fails to model clock drift.
 Enables validation of time- 50% slower than TOSSIM.
dependent properties of large-
scale network  Cannot model mobility.
SENS C++  Platform-independent  Not accurately simulate a
 Users can assemble application- MAC protocol.
specific environments
COOJA Java  Concerning both simulated  Not extremely efficient.
hardware and software. Supports a limited number
of simultaneous node types.

Castalia C++  Physical process modeling,  Not a sensor specific


sensing device bias and noise, platform.
node clock drift
Shawn Java  Not limited to the implementation  Detailed simulations of
of distributed protocols issues such as radio
Can simulate vast networks propagation properties or
low-layer issues are not
well considered.

40
EmStar Linux  May be run on a diverse set of  Only run code for the types
execution platforms. of nodes
 Combination of simulator and  Does not support parallel
emulator. simulations.
J-Sim Java  Provides support for energy  Low efficiency of
modeling, with the exception of simulation
radio energy consumption

SENSE C++  Balanced consideration of  Not accurate evaluation of


modeling methodology WSN
research.

Based on above (Table 5.1) description and comparison, NS2 is the more appropriate with our
requirement.

5.4.2 Basic Architecture of NS2


NS2 provides users with run command “ns” which takes one an input argument, the name of a Tcl
simulation scripting file. In most cases, a simulation trace file is created and is used to
createanimation and/or a plot graph. NS2 consists of two key languages++ and Object-oriented
Command Language (OTcl) [36].

Fig 5. 1Basic structure of NS2 [36]

5.4.3 Installation
NS2is a free available simulation tool. It runs on different operating system such as Linux, Mac
and Windows. In Linux operating is installation byonline package. But, whenwe used window
environment two options popular available the first case install virtual box then install Linux and
NS2 package. The second option install Cygwin (UNIX emulator) activate on windows system.

41
NS2 source codes are distributed in two forms: the component-wise and the all-in-one suite. With
the all-in-one package, users get all the required components along with some optional
components.

NS2 Installation on linux operating system

Install Ns2 on theLinux operating machines by simply running the “install” script and following
the step of instructions therein. The only requirement is a computer with a CCC compiler
installed. The following two commands validated, respectively:
>>./install
>>./validate
Validating NS2 involves simply running a number of working scripts that verify the essential
functionalities of the installed components.

The current all-in-one suite contains the following main components:

 NS release 2.35,
 Tcl/Tk release 8.5.8,
 OTcl release 1.14, and Tcl release 1.20 and
The following are the optional components:

 NAM release 1.15: NAM is an animation tool for viewing network simulation traces and
packet traces.
 Zlib version 1.2.3: This is the required library for NAM.
 Xgraph version 12.2: This is a data plotter with interactive buttons for panning,
zooming, printing, and selecting display options.

5.4.4 NS2 Simulation Steps


In this section present they steps for general simulation. The key NS2 simulation steps include
the following:

Step 1: Simulation Design

Design the simulation is the first step of simulating a network. In this stage user must define
simulation purpose, assumption, work configuration, performance measures and expect output.

Step 2: Configuring and Running Simulation


42
In this phase implement the design of the first step. It contains two phases:

Phase 1: Network Configuration: in this phase conjuring network component (TCP, UDP)
according to simulation design and scheduling events.

Phase 2: Simulation Phase: in this phase maintain simulation clock and execute chorological
events.it also define simulation scenario in Tcl script and feed file as input argument of NS2.

Step 3: Post simulation processing


mainly concern on verifying integrity of program and evaluate the performance of simulate
network. Debugging and compiling the main task of simulation stage.

5.4.5 Visual Processing Tools


Mat lab
The programming language used to develop camera based flood detection and recognition with
wireless sensor network; in case of awash fluvial were done the processing part by matrix
laboratory (in abbreviation MATLAB) version 9.0.0.341360 (R2015a). MATLAB is a fourth-
generation high-level programming language and interactive environment for numerical
computation, visualization, and programming. MATLAB is developed by Math Works. MATLAB
is rich in built-in image processing toolbox that provides functions and apps to generate, measure,
transform, filter, and visualize image. The image processing toolbox to analyze and compare image
in time, frequencies, and time-frequency domains, identify patterns and trends, extract features,
and develop and validate custom algorithms to gain insight into your data. Image processing
provides algorithms, functions, and apps to create, train, visualize and simulate. It helps to perform
preprocessing, extraction, classification, regression, clustering modeling and control.

The main reason researcher selected based on the two necessities and basic feature of MATLAB
for developing are toolbox of image processing and it has a vast library, interactive environment,
built-in graphics for visualizing data and tools for design, ability to access the direct camera and
detect the from input image are with graphical user interfaces. MATLAB image processing
Toolbox provides tools for designing, implementing, visualizing, and simulating flood image. The
code for the project was written in MATLAB script m-files and for the image Database it has saved
and stored in the format of MAT with an extension .jpg file format. Training and testing were done
in MATLAB with the association of the provided Graphical User Interface (GUI).

43
CHAPTER SIX
6. RESULT, DISCUSSION AND EVALUATION
6.1 Introduction
In this chapter, we detail discuss the result, and evaluation of the proposed solution camera flood
detection and recognition method simulated on two part; such the networking part and Processing
part. Next topic detail discuss about the simulation result proposed solution.

6.2 Networking part


The simulation of proposed solution is used camera sensor node on Ns2 tool. So, figures 6.1
below show the scenarios how camera sensor nodes communication between wireless sensor
networks. We have assumed that the network contain 10nodes. Table 6.1 show the simulation
parameter of wireless sensor Network.

6.2.1 Experimental result for Networking Part


In this topic discuss, the experimental result to simulate camera sensor in Network simulator.
Table 6. 1Simulation Parameter

Parameters Value

Simulator AODV

Simulation Time 60 sec

Simulation Area 1000 m X 1000 m

Transmission range 250 m

Node movement Random waypoint

Traffic type CBR(UDP) /FTP (TCP)

Data payload Bytes/packets

44
Bandwidth 2 mbps

Number of involved Nodes 10

Number of source 1

Data rate 1000.0 kbps

Fig 6. 1Camera Sensor Node Configuration

The above (figure 6.1) demonstrate the camera sensor node configuration using network
simulation. The constellation of camera sensor between 250 meter distances with 10,000 meter
square land. Camera sensor node 0 to 9 and sink node is 10. Data rate transmission at time 1000kps
and simulation time to execute is 60s.

45
Fig 6. 2Data Transfer from one node to another

In the above (Fig6.2) simulation scenario using AODV protocol to show the how to simulate
camera sensornode communicate from one node to

6.3 Processing Part

Fig 6. 3Sample Capture Image

46
Fig 6. 4Snip Shoot of Sample Dataset for Training Phase of Awash River

6.3.1 Experimental Results of Flood Detection and Recognition


The procedure is results and revisited are demonstrated with four complete examples. Training set
with 60 images from FDRDB for system design. A test set from TDS data set with 25 images for
independent evaluation of performance the system. MatlabR2015a software was used for the
experiments. All the images are normalized into 640×480 pixels using bilinear interpolation from
both data sets.

The methodology used in detection module is shown in Fig5.1. First of all the initial image is
preprocessed and extracted feature based on color information. This process are accelerates the
detection and reduce the color space as the number of region of interest to be reduced. The stage
successfully detects the flood shown in Fig 6.5(b), 6.5(e), 6.5(h) and 6.5(k).

47
48
49
(m)
Fig 6.5The Processing used in Flood Detection and Recognition. Original image (a), (d), (g) and
(i). Preprocess and Extracted image (b),(e),(h) and (k) Final result (c) ,(f),(i) and (l) Flood
classification (m).

The flood detection and recognition processing is applied on different weather including low light
condition. Some examples of successful outputs of given results are demonstrated in Fig
6.6.However, the image could not be detected are shown in Fig 6.6 The image were low light
condition, background similar and blur for their motion failure results are shown in Fig 6.7.

50
Fig 6. 6Detection Example

Fig 6. 7Miss-Detection Examples

51
6.4 Evaluation
Evaluate efficiency and performance of proposed solution using confusion matrix (See Table).
There are use 60 images out this 58 are correctly classified into flood occur and the rest are
persistence not classified. On the other hand, 96.66% images are properly classified and 3.33%
only are misclassified in correct categories.

Training Number Detected Misclassified

60 58 2

Number of Correctly classified image


Accuracy Rate = *100…………………………… (6.1)
Total Number of Images

Number of inclassified images


Error Rate = *100…………………………………… (6.2)
Total Number of Images

PERFORMANCE EVALUATION

Error

Accurancy

0 20 40 60 80 100 120

Fig 6. 8Graph of Performance Evaluation

The graph chart above (Fig.6.8) depicts the accuracy rate and error rate obtained by the model after
testing with the available dataset. The high accuracy rate compared to the low error rate throws
light on the accuracy of the algorithm devised for flood detection and recognition.

52
CHAPTER SEVEN
7. CONCLUSION AND RECOMMENDATION
In this chapter we described the summary of the proposed solution and future research directions.

7.1Conclusion
The main objective of this research work is to develop a prototype camera based flood detection
and recognition with wireless sensor network for Awash Fluvial selected area of disaster. The
proposed solution employs the use of advanced sensing technology in performing real-time camera
sensor offlood information. The developed prototype solution is composed of two major phase:
First sensor camera and transmitting modules, second Processing Module.

The camera based flood detection and recognition is implemented at remote sites, where network
infrastructure is available. The connectivity is done through the wireless sensor network. The
camera sensor captures image data. While the processing and transmission module is used to
processing modulecapture data to the base station.

The base station is processing phase implemented as processing application to allow users to view
real-time camera image-related data as well as historical data. It is also able to send warning
information to the responsible authorities in case of emergency.

For sustainable social development of community, this study has successfully demonstrated a
regional flood monitoring for final verification of flooding situations. Previously, there was no yet
flood detection equipment’sinstalled in the area. The Local authoritiesmeasure Awash River water
level and report the information to local stakeholders via telephone, television and FM
communication channel. Often the reports are too late and are not very useful for them in
responding to flood events.

The developed proposed solution have provides up-to-date flood-status informationfrom remote
camera sensor sites. Users (expert’s, stakeholders and authorities,) can now obtain information
from base station office. This allows the local authorities, to obtained actual information about
flood status. In addition, experts can exploit this accumulated information to better understand the
behavior of floods.

53
Our proposed solution, therefore, allows a much greater degree of continuity and availability than
those conventional approaches. In particular, our flood detection and recognition with wireless
sensor network allows the authority to know the floodoccurrence and then provide more effective
and timely information to stakeholder.

7.2Recommendation
I will recommended to further study for the researcher in flood detection and recognition area by
using other parameter and approach such as satellite image, Geographical information system
(GIS) that to help increase performance of flood detection and high accuracy flood detection
information. It also we recommended to future to design another architecture and algorithm or
enhance the performance of the proposed prototype.

7.3Future work
Future work involves performing real world field tests. Here we will observe the reading process
communication process between the nodes and the real-time implementation.

54
Reference
[1] [Online]. Available: http://en.m.wikipedia.org/wiki/Flood

[2][Online]Available:https://reliefweb.int/report/ethiopia/unicef-ethiopia-humanitarian-situation-
report-6-reporting-period-october-2015.

[3]Onlinehttps://weather.com/safety/floods/news/flood-safety-20120423.

[4] [Online]. Available:https://www.worldatlas.com/webimage/countrys/africa/ethiopia/etlatlog.htm

[5]Online].Aailable:https://www.humanitarianresponse.info/sites/www.humanitarianresponse.inf
o/files/documents/files/ethiopia_flash_update_on_floods_14sept2017.pdf.

[6] J. Sunkpho, "Real-time flood monitoring and warning system.," Vols. Vol.33 (2), 227-
235,Mar. - Apr. 2011.

[7] Naveed Ahmad, MureedHussain and FahadShinwari., "Flood Prediction and Disaster Risk
Analysis using GIS based Wireless Sensor Networks," A ReviewJournal of Basic and Applied
Scientific Research, no. ISSN 2090-4304, 2013.

[8] K. Chambers, "Flood Modeling and Assessments for Downstream Communities of Koki
Dam, Ethiopia," Cooperative Institute for Research in Environmental Studies, 2017.

[9] J. Patil, "wireless sensor network using flood monitoring," International Journal of Computer
Science and Mobile Computing, vol. 2, no. 11, pp. 297-302 , 2017.

[10] Victor Seal and ArnabRaha, "A simple flood forecasting scheme using wireless sensor
networks," I international Journal of Ad hoc, Sensor &UbiquitousComputing (IJASUC), vol. 3,
2012.

[11] Kai Sonder and GirmaTaddese, "www.researchgate.net/publication/265483628.the water of


the awash river basin a future challenge to Ethiopia.pdf," 29 January 2015

[12][online]https://fcit.usf.edu/network/chap1/chap1.htm: network

[13][Online]http://www.rfwireless-world.com/Terminology/wired-network-vs-wireless-
network.html: wired and wireless

55
[14] Basha, D. and Rus, D. “Design of Early Warning Flood Detection System for developing
countries. Proceeding of the conference on Information andCommunication Technologies and
Development, Bonsalove, India.Pp 1-10, 2017.

[15] Lívia C. Degrossi and Guilherme G., "Using Wireless Sensor Networks in the Sensor Web
for Flood Monitoring in Brazil," in Proceedings of the 10thInternational ISCRAM Conference,
2013.

[16]Akkaya, and M. Younis, “A survey on routing protocols for wireless sensor networks”,
“Elsevier Journal of Ad Hoc Networks “ 3 (3325–349)2015

[17]F. Akyildiz, W. Su, and E. Cayirci. “Wireless sensor networks: A survey”. Computer
Networks, 38(4):393–422, 2002

[18] Ankita,”A Survey on Wireless Sensor Network based Approaches “International Journal of
Advanced Research in Computer Science and Software Engineering, Volume 4, Issue 4, April
2014.

[19]C. karlof, N. Shastry and D. Wagner, TinySec: “A link layer security architecture for
wireless sensor networks”, SenSys’04, Baltimore, Maryland, November 3-5USA, 2004.

[20]ArputhaManesha.R and Velladurai . M "Efficient Image transmission in Wireless Sensor


Networks using Wavelet coded Preprocessing technique","IRACST –International Journal of
Computer Networks and Wireless Communications (IJCNWC)", ISSN: 2250-3501Vol.2, No.2,
April 2012

[21] R. U. Islam, "Wireless Sensor Network Based Flood Prediction Using Belief Rule," in Luleå
University of Technology, 2017.

[22]Tareq Alhmiedat and Anas Abu Taleb, "a study on threats detection and tracking systems for
military applications using wsn," international journal of computerapplications (0975 – 8887),
vol. 40, p. 15, 2012.

[23] D. J. Venkateswara, "wireless flood detectionsystem," International Journal of electrical and


Electronic Engineering, vol. 09, no. 01, 2017.

56
[24] A. AL-Marakey, “Camera-Based Wireless Sensor Networks forE-Health” International
Journal of Advanced Research in Computer and CommunicationEngineeringVol. 2, Issue 12,
December 2013.

[25] Indira P et al, “Flood Prediction and Prevention through Wireless Sensor Networking
(WSN): A Survey” International Journal of Computer Applications (0975 – 8887) Volume 113 –
No. 9, 2015.

[26] Shi-Wei Lo,”Visual Sensing for Urban Flood Monitoring”/journal/sensors Sensor, 2015

[27]Jaymala Patil, “wireless sensor network using flood monitoring “International Journal of
Computer Science and Mobile Computing Vol.2 pg. 297-302 , 2013

[28]Ns-2 [Online]. Available: http://www.isi.edu/nsnam/ns/. Retrieved: 02/04/2017

[29]P. Levis, N. Lee, M. Welsh, and D. Culler, “TOSSIM: Accurate and scalable simulation of
entire TinyOS applications,” 1st ACM Conference on EmbeddedNetworked Sensor Systems,
Los Angeles, CA, Nov. 2013

[30] X. Zeng, R. Bagrodia, and M. Gerla, “GloMoSim: A library for parallel simulation of large-
scale wireless networks,” SIGSIM Simulation Digest, vol. 28, no. 1, pp. 154-161, 1998.

[31] “UWSim: A simulator for underwater sensor networks,” Simulation, vol. 84, no. 7, pp. 327-
338, 2008precise timing,” 4th Int. Conf. on Information Processing in Sensor Networks, 2005.

[32] S. Park, A. Savvides, and M. B. Srivastava, “Simulating networks of wireless sensors,”


Winter Simulation Conference, Arlington, Virginia, Dec. 2001.

[33] L. Girod, et. al., “EmStar: An environment for developing wireless embedded systems
software,” Technical report, Center for Embedded NetworkedSensing, University of California,
Los Angeles, CENS Technical Report 009, 2003.

[34] J-Sim [Online]. Available: http://nsr.bioeng.washington.edu/jsim/. Retrieved: 02/04/2010.

[35]SENSE [Online]. Available: http://www.ita.cs.rpi.edu/sense/index.html. Retrieved:


02/04/2010.

[36]Teerawat Issariyakul and Ekram Hossain,” Introduction to


NetworkSimulator[NS2]",Springer Science ISBN 978-1-4614-1405-6,2012
57
[37][Online]Available:http://www.techopea.com/555/rgb-color-model-rgb

[38]Gidudu Anthony, Hulley Greg and MarwalaTshilidzi, “Classification of Images Using


Support Vector Machines”, Department of Electrical and Information Engineering, University of
Witwatersrand, south Africa ,2017

58
Appendix

Appendix 1: source code for camera based wireless Network Communication


#===================================
# Simulation parameters setup
#===================================
setval(chan) Channel/WirelessChannel ;# channel type
setval(prop) Propagation/TwoRayGround ;# radio-propagation model
setval(netif) Phy/WirelessPhy ;# network interface type
setval(mac) Mac/802_11 ;# MAC type
setval(ifq) Queue/DropTail/PriQueue ;# interface queue type
setval(ll) LL ;# link layer type
setval(ant) Antenna/OmniAntenna ;# antenna model
setval(ifqlen) 100 ;# max packet in ifq
setval(nn) 11 ;# number of mobilenodes
setval(rp) AODV ;# routing protocol
setval(x) 2621 ;# X dimension of topography
setval(y) 100 ;# Y dimension of topography
setval(stop) 6.0 ;# time of simulation end

#===================================
# Initialization
#===================================
#Create a ns simulator
set ns [new Simulator]

#Setup topography object


settopo [new Topography]
$topoload_flatgrid $val(x) $val(y)
create-god $val(nn)

#Open the NS trace file


settracefile [open project.tr w]
$ns trace-all $tracefile

#Open the NAM trace file


setnamfile [open project.nam w]
$ns namtrace-all $namfile
$ns namtrace-all-wireless $namfile $val(x) $val(y)
setchan [new $val(chan)];#Create wireless channel

#===================================
# Mobile node parameter setup
#===================================
$ns node-config -adhocRouting $val(rp) \
-llType $val(ll) \
-macType $val(mac) \
-ifqType $val(ifq) \
-ifqLen $val(ifqlen) \
-antType $val(ant) \

59
-propType $val(prop) \
-phyType $val(netif) \
-channel $chan \
-topoInstance $topo \
-agentTrace ON \
-routerTrace ON \
-macTrace ON \
-movementTrace ON

#===================================
# Nodes Definition
#===================================
#Create 11 nodes
set n0 [$ns node]
$n0 set X_ 253
$n0 set Y_ 345
$n0 set Z_ 0.0
$ns initial_node_pos $n0 20
$ns at 0.0 "$n0 label Camera_sensor0"
$n0 color "blue"
set n1 [$ns node]
$n1 set X_ 450
$n1 set Y_ 462
$n1 set Z_ 0.0
$ns initial_node_pos $n1 20
$ns at 0.0 "$n1 label Camera_sensor1"
$n1 color "blue"
set n2 [$ns node]
$n2 set X_ 624
$n2 set Y_ 332
$n2 set Z_ 0.0
$ns initial_node_pos $n2 20
$ns at 0.0 "$n2 label Camera_sensor2"
$n2 color "blue"
set n3 [$ns node]
$n3 set X_ 434
$n3 set Y_ 184
$n3 set Z_ 0.0
$ns initial_node_pos $n3 20
$ns at 0.0 "$n3 label Camera_sensor3"
$n3 color "blue"
set n4 [$ns node]
$n4 set X_ 846
$n4 set Y_ 374
$n4 set Z_ 0.0
$ns initial_node_pos $n4 20
$ns at 0.0 "$n4 label Camera_sensor4"
$n4 color "blue"
set n5 [$ns node]
$n5 set X_ 982
$n5 set Y_ 195
$n5 set Z_ 0.0

60
$ns initial_node_pos $n5 20
$ns at 0.0 "$n5 label Camera_sensor5"
$n5 color "blue"
set n6 [$ns node]
$n6 set X_ 1055
$n6 set Y_ 476
$n6 set Z_ 0.0
$ns initial_node_pos $n6 20
$ns at 0.0 "$n6 label Camera_sensor6"
$n6 color "blue"
set n7 [$ns node]
$n7 set X_ 1179
$n7 set Y_ 292
$n7 set Z_ 0.0
$ns initial_node_pos $n7 20
$ns at 0.0 "$n7 label Camera_sensor7"
$n7 color "blue"
set n8 [$ns node]
$n8 set X_ 1409
$n8 set Y_ 273
$n8 set Z_ 0.0
$ns initial_node_pos $n8 20
$ns at 0.0 "$n8 label Camera_sensor8"
$n8 color "blue"
set n9 [$ns node]
$n9 set X_ 1513
$n9 set Y_ 430
$n9 set Z_ 0.0
$ns initial_node_pos $n9 20
$ns at 0.0 "$n9 label Sink_Node"
$n9 color "blue"
set n10 [$ns node]
$n10 set X_ 1284
$n10 set Y_ 475
$n10 set Z_ 0.0
$ns initial_node_pos $n10 20
$ns at 0.0 "$n10 label Camera_sensor10"
$n10 color "blue"

#===================================
# Agents Definition
#===================================
#Setup a TCP connection
set tcp0 [new Agent/TCP]
$ns attach-agent $n0 $tcp0
set sink1 [new Agent/TCPSink]
$ns attach-agent $n9 $sink1
$ns connect $tcp0 $sink1
$tcp0 set packetSize_ 1500

#===================================

61
# Applications Definition
#===================================
#Setup a CBR Application over TCP connection
set cbr0 [new Application/Traffic/CBR]
$cbr0 attach-agent $tcp0
$cbr0 set packetSize_ 1000
$cbr0 set rate_ 1.0Mb
$cbr0 set random_ null
$ns at 1.0 "$cbr0 start"
$ns at 2.0 "$cbr0 stop"

#===================================
# Termination
#===================================
#Define a 'finish' procedure
proc finish {} {
global ns tracefilenamfile
$ns flush-trace
close $tracefile
close $namfile
execnamproject.nam&
exit 0
}
for {set i 0} {$i< $val(nn) } { incri } {
$ns at $val(stop) "\$n$i reset"
}
$ns at $val(stop) "$ns nam-end-wireless $val(stop)"
$ns at $val(stop) "finish"
$ns at $val(stop) "puts \"done\" ; $ns halt"
$ns run

62
Appendix 2: Sample Code train the image

function [red, green, blue] = meansOfFlood()


Dir = 'training\';
Imgs = dir(fullfile(Dir, '*.jpg'));
fori=1:length(Imgs)
Img = imread(fullfile(Dir, Imgs(i).name)); % Read image
Img = double(Img);
redMeans(i) = mean( reshape( Img(:,:,1), [], 1 ));
greenMeans(i) = mean( reshape( Img(:,:,2), [], 1 ));
blueMeans(i) = mean( reshape( Img(:,:,3), [], 1 ));
end
red = mean(redMeans);
green = mean(greenMeans);
blue = mean(blueMeans);
end

Appendix 3: sample code for Flood detection and recognition, Image


clc;
clearall;
closeall;
[redMean, greenMean, blueMean] = meansOfFlood();
img = imread('111.jpg');
[row col dim] = size(img);
im = double(img);
red = im(:, :, 1);
green = im(:, :, 2);
blue = im(:, :, 3);
for x=1:1:row
for y=1:1:col
redVal = abs(red(x,y) - redMean);
greenVal = abs(green(x,y) - greenMean);

63
blueVal = abs(blue(x,y) - blueMean);
sd = 48;
if((redVal<= sd) && (greenVal<= sd) && (blueVal<= sd))
biIm(x,y) = 1;
else
biIm(x,y) = 0;
end
end
end

sedisk = strel('disk',2);
openedIm = imopen(biIm, sedisk);
closedIm = imclose(openedIm, sedisk);
numberOfPixels = numel(biIm);
removeTh = round(numberOfPixels - numberOfPixels * 90 / 100);
filteredIm = bwareaopen(closedIm, removeTh);
numberOfTruePixels = sum(filteredIm(:));
if(numberOfTruePixels> 0)
disp('Flood is occur!! ');
for x=1:1:row
for y=1:1:col
if(filteredIm(x,y) > 0)
red(x,y) = 255;
green(x,y) = 0;
blue(x,y) = 0;
else
red(x,y) = red(x,y);
green(x,y) = green(x,y);
blue(x,y) = blue(x,y);
end
end

64
end
newIm = cat(3, red, green, blue);
else
disp(‘Flood is not occur!!’);
newIm = img;
end
subplot(1,2,1);
imshow(uint8(img));
title('Input');
subplot(1,2,2);
imshow(uint8(newIm));
title('Output');

65

You might also like