Urban Flood Mapping Based on Unmanned Aerial Vehicle Remote Sensing and Random Forest Classifier—a Case of Yuyao, China

Flooding is a severe natural hazard, which poses a great threat to human life and property, especially in densely-populated urban areas. As one of the fastest developing fields in remote sensing applications, an unmanned aerial vehicle (UAV) can provide high-resolution data with a great potential for fast and accurate detection of inundated areas under complex urban landscapes. In this research, optical imagery was acquired by a mini-UAV to monitor the serious urban waterlogging in Yuyao, China. Texture features derived from gray-level co-occurrence matrix were included to increase the separability of different ground objects. A Random Forest classifier, consisting of 200 decision trees, was used to extract flooded areas in the spectral-textural feature space. Confusion matrix was used to assess the accuracy of the proposed method. Results indicated the following: (1) Random Forest showed good performance in urban flood mapping with an overall accuracy of 87.3% and a Kappa coefficient of 0.746; (2) the inclusion of texture features improved classification accuracy significantly; (3) Random Forest outperformed maximum likelihood and artificial neural network, and showed a similar performance to support vector machine. The results demonstrate that UAV can provide an ideal platform for urban flood monitoring and the proposed method shows great capability for the accurate extraction of inundated areas.


Introduction
Flooding is among one of the most widespread and destructive natural disasters, which exerts a heavy toll on human life and property [1][2][3][4][5].According to the United Nations, more people lose their lives due to floods than other natural hazards [1].In addition, the damage caused by floods is much greater in highly-developed and densely-populated urban areas than in rural countrysides.Therefore, it is of vital significance to map flood extent areas rapidly and accurately to provide an overall view of the flood event in order to plan relief work efficiently, especially in urban districts.
Remote sensing has been recognized as a powerful tool to provide inundation maps in near real time according to a great deal of researches [1,[3][4][5][6][7][8][9][10][11][12][13].Compared with in situ measurement, remote sensing can provide synoptic and continuous coverage of flood events, which aids flood monitoring and damage assessment [5][6][7][8][9].In general, remote sensing data used for flood mapping consists of space-borne and airborne imageries.As for the former, optical and radar data have been widely adopted to extract inundation areas with high accuracy [5][6][7][8][9][10][11][12][13].The advantage of optical satellite remote sensing [5,6] is that it provides true color images through which visual interpretation and automatic classification can be done to provide first-hand information of flooded areas.Wang [8] used moderate resolution (30 m) Landsat 7 Thematic Mapper (TM) imagery to delineate the maximum flood event caused by Hurricane Floyd in North Carolina.Animi [5] proposed a model to generate a floodplain map based on high-resolution (1 m) Ikonos imagery and digital elevation model (DEM).Artificial neural network (ANN) was utilized in Animi's research [5] to classify the Ikonos imagery and the classification accuracy was improved by 15% compared to maximum likelihood (ML).However, the presence of extensive clouds during flood events often limits the feasibility of optical satellite imagery.
Space-borne radar enables data acquisition regardless of weather conditions because microwaves have the capability to penetrate clouds, which makes it an effective alternative for optical sensors in the differentiation of flooded from non-flooded areas [7,8,11].Kuenzer et al. [1] employed the longest time series thus far of Environmental Satellite-Advanced Synthetic Aperture Radar (ENVISAT-ASAR) data to derive flood and inundation information for the Mekong Delta region, which contributes to a comprehensive understanding of Mekong Delta flood dynamics.Gstaiger et al. [7] used multi-sensoral data from Terra Synthetic Aperture Radar-X (TerraSAR-X) and ENVISAT-ASAR to automatically derive inundated areas also in the Mekong Delta.Although both optical and radar satellite remote sensing have been proven to extract flooded areas effectively, their disadvantages in urban flood mapping cannot be covered up due to the following reasons.First, satellite remote sensing imageries of the flooded areas are not always available because of revisit limitations.Second, the common used data (e.g., TM and ENVISAT-ASAR) are unable to capture the details of complex urban landscapes due to a relatively lower spatial resolution.High-resolution images, such as Ikonos and QuickBird, can provide richer information than TM and ENVISAT, yet the long revisit circle and exorbitant prices still limit their application in urban flood monitoring.
Compared with space-borne observations, aerial remote sensing is immune to extensive clouds and revisit limitations, which manifests itself as an ideal tool for flood monitoring [14][15][16][17].In addition to this, aerial images are acquired at decimeter and sub-decimeter levels, representing much more abundant details than satellite data.In particular, piloted aircraft and unmanned aerial vehicle (UAV) are two main platforms for aerial remote sensing.The onboard sensors vary from off-the-shelf digital cameras and multispectral cameras to hyperspectral imager to Light Detection and Ranging equipment (LiDAR) [14,15].The main drawback of piloted aircrafts in urban flood mapping is that it is always difficult to find ideal taking-off and landing places for the aircrafts, especially for fixed-wing airplanes.However, mini-UAVs provide a much safer and more convenient way to acquire data in disaster areas because they can be launched by hand and landed on a small piece of flat ground [15,16].In addition, UAV can be deployed easily and frequently to satisfy the requirements of rapid monitoring and mapping in flooded areas at a user-defined spatio-temporal scale.However, research regarding the use of UAVs for urban flood mapping is still rare.Under this context, we are motivated to justify the performance of UAV remote sensing in extracting inundated areas under complex urban landscapes.
The overall objective of this study is to develop a rapid and accurate method for urban flood mapping utilizing Random Forest and texture analysis of high-resolution UAV imagery (0.2 m).More specifically, this study's hypotheses are (i) to justify the feasibility of UAV remote sensing in urban flood mapping; (ii) to determine if Random Forest classifier shows good performance; and (iii) to justify whether the inclusion of texture features significantly improves classification accuracy in highly heterogeneous urban landscapes.

Study Area
The study area is Yuyao City of Zhejiang Province in Eastern China (Figure 1).Yuyao City is located on the south shore of Hangzhou Bay.The downtown area is located in a relatively open and flat floodplain.The Yuyao River and its tributary, the Zuiliang River, flow through the whole city from west to east.Influenced by Typhoon Fitow, Yuyao experienced extreme precipitation on 7 October 2013, which led to the most serious floods in the last 60 years.Most downtown areas were inundated for more than five days and the direct economic losses were more than 69.61 billion RMB (about 11.33 billion USD). Figure 1b

Workflow
The overall workflow of the proposed method for urban flood mapping is depicted in Figure 2.There are four major steps in the workflow: (i) UAV data acquisition and preprocessing (Section 3.2); (ii) feature selection and texture analysis (Section 3.3); (iii) image classification (Section 3.4); and (iv) accuracy assessment (Section 3.5).Data preprocessing was a prerequisite for urban flood mapping, which involved downloading data from UAV digital camera, image registration, orthorectification, and automatic mosaicking.Feature selection was based on gray-level co-occurrence matrix (GLCM).The extracted texture features were combined with raw RGB images to construct a multi-dimensional feature space.Training samples were randomly picked to train Random Forest, and the trained classifier was then utilized to extract the inundated areas.Accuracy assessment was done based on a confusion matrix derived from validation samples to test the performance of the proposed method.

Data Acquisition and Preprocessing
In order to monitor the floods and provide the inundation map for emergency relief workers, a mini-UAV called River-Map was deployed twice on 10 October 2013.A small, wide-field camera, GoPro, was onboard during the first flight to provide real time surveillance and an RGB digital camera was used in the second flight to acquire images for further mapping of the inundated areas.The video images are shown in Figure 3, from which we can see clearly that Yuyao City had experienced serious and extensive flooding.Most roads and bottomlands were submerged, which caused great difficulty for relief work.
The River-Map UAV (Figure 4) belongs to small electric UAVs.It has good flexibility and mobility, which facilitates its application in urban cartography, precision agriculture, and water pollution surveys [15].River-Map UAV can be launched by hand and landed on a small piece of flat ground, which makes it particularly suitable in monitoring urban flooding.It has a wingspan of 2.5 m and a length of 1.58 m.The payload capacity of River-Map is 4.5 kg and its endurance is about 1.5 h.It has an auto pilot for the control of the entire craft, a GPS for navigation, and an IMU (Inertial Measurement Unit) for inertia measurements.Additionally, mission planning and information interaction are done through the ground control station.The flight altitude was set to be 350 m, resulting in a high resolution of 0.2 m per pixel.To satisfy the requirements of aerial photography, the forward lap was set to be 60% and the side lap 30% during mission planning.During the fight, it took about one hour for the UAV to fly over an area of 10 km 2 in this study.Because the River-Map UAV is battery-powered and has an endurance of 1.5 h, it has a maximum mapping area of 15 km 2 during one flight.Raw data acquired by River-Map UAV were a series of RGB images with a central projection, which needed orthorectification to generate orthophotos.We chose Pix4D software [15] as the preprocessing tool due to its high efficiency and good accuracy.Raw images were then orthorectified and mosaicked into a single image using Pix4D with a root mean square error of 0.2 pixels.

Texture Analysis
Feature selection is of great importance in image classification [25].Good features can increase the between-class separability while they decrease the within-class variance.Due to the limitation of payload capacity, an off-the-shelf digital camera was on board the River-Map UAV.Raw images acquired had only three bands (RGB), which resulted in a lack of spectral features.It was difficult to yield a high classification accuracy using only the RGB features because different ground objects may have similar colors.The details of submerged roads, bare soil, inundated grasslands, and vegetation are shown in Figure 5.Because of the high levels of muds and sediments, the submerged roads have the similar color as the yellow bare soil.In addition, the inundated grasslands are rather green, which are difficult to separate from non-flooded vegetation.However, the flooded areas (both submerged roads and grasslands) are much more homogenous than the fragmented bare soil and vegetation, which demonstrates that the inclusion of texture features may increase the between-class separability.Texture refers to the visual effect caused by spatial variation in tonal quantity over relatively small areas [24].Texture analysis has been widely used in remote sensing applications, and the inclusion of texture features can improve classification accuracy according to a great deal of research [15,[24][25][26][27][28][29].The texture measures used in this literature were derived from the second-order statistics of gray-level co-occurrence matrix (GLCM), which indicates the probability that values of each pair of pixels co-occur in a given direction and at certain lag distance in the image [26].As many of the fourteen texture features, defined by Haralick [26], were correlated, the six least correlated texture measures [25] were used in this study, mean (MEA), standard deviation (STD), homogeneity (HOM), dissimilarity (DIS), entropy (ENT), and angular second moment (ASM).The statistics used were calculated as follows: where N is the number of grey levels; P is the normalized symmetric GLCM of dimension N × N; P (i, j) is the normalized grey level value in the cell i, j of the co-occurrence matrix, such that the sum of P (i, j) equals to 1 [15].The calculations of texture statistics were based on a moving window around each pixel and the statistics were then attributed the pixel itself [24].In general, the bigger the window size, the coarser the information that can be provided by texture features.The contribution of texture features to classification accuracy depends on both the texture scale and the ground objects scale.Experiments were done to find that textures calculated at a 5 × 5 moving window yielded the highest accuracy.Hence, the six texture features derived at a 5 × 5 window were added as additional ancillary bands to the RGB images, which were ready for Random Forest classification.

Random Forest Classifier
After feature selection, a classifier should be utilized to classify different ground objects in order to extract flooded areas.A robust and high-performance classifier has always been the key issue to yield a high precision in image classification.As a relatively novel machine learning based classifier, Random Forest has rarely been used in urban flood mapping [18][19][20][21][22][23] and its performance needs to be studied and justified.
Random Forest is an ensemble learning method proposed by Breiman in 2001 [18], which is a collection of independent individual classification and regression tree (CART) classifiers, and can be defined as Equation (7): where h represents Random Forest classifier, x stands for input variable, and {θk} are independently identically distributed (i.i.d.) random predictor variables, which are used for generating each CART tree.The final response of Radom Forest is calculated based on the output of all the decision trees involved [18].Compared with other machine learning methods, such as support vector machine and artificial neural network, Random Forest has a relatively lower computational burden, and it is insensitive to multivariate linear variables and outliers [19].In addition, Random Forest shows outstanding performance in high dimensional feature space, which provides great potential for classifying complex and texture-abundant UAV images.Another important advantage of Random Forest is that it can measure the importance of input variables, which enables researchers to better understand the contribution of each variable to the overall classification accuracy.The schematic diagram of classification using Random Forest is illustrated in Figure 6.
As depicted in Figure 6, training samples were firstly selected using a stratified sampling method.Bootstrap strategy was then adopted to draw about 2/3 of the total training samples with replacement to reduce generalization error.The remaining 1/3 of the samples are called out-of-bag (OOB) data, which are used for cross-validation to evaluate the performance of Random Forest.Gini index [18] was used as a measure of heterogeneity to split each individual CART tree.Only two parameters are utilized to construct a Random Forest classifier: ntree, the number of trees to grow into a whole forest, and mty, the number of randomly selected predictor variables [20].With the increment of ntree, OOB error decreases gradually.In addition, according to the Law of Large Numbers, OOB error is convergent when ntree is bigger than a certain threshold.A smaller mty indicates a weaker prediction ability of each individual tree, but also a smaller correlation between different trees, which contributes to reduce the generalization error.There are two methods to calculate mty, i.e., 1/3 or square root of the number of input variables.
Because Random Forest belongs to supervised classification method, training samples for each ground object should be selected separately.According to field survey and visual interpretation, four classes were initially chosen as follows: water, impervious surface, vegetation, and bare soil, and the number of training sample for each class was set to be 500.Training samples were then randomly chosen in a small polygon block, and it was assumed that all pixels within each polygon belonged to the same category [15].After the classification, impervious surface, vegetation, and bare soil were merged into the non-flooded class.Since the classified water consisted of both flooded areas and persistent water (rivers, lakes, etc.), the latter were then eliminated according to the city map of Yuyao given by the official authority.

Accuracy Assessment
In the accuracy assessment of the proposed urban flood mapping method, a confusion matrix was calculated based on the validation samples derived from visual interpretation of the high resolution UAV orthophotos.These additional samples were selected independently from the training samples, and the number of the validation samples was 5000.Overall accuracy and Kappa index can be derived from the confusion matrix to quantify the performance of Random Forest.
However, the field measurements of acquiring validation data were not performed in this study.Validation samples were selected from the UAV images by visual inspection.Two reasons accounting for this are as follows.Firstly, the image acquired by the UAV has a very high resolution of 0.2 m, which implies that we can see clearly whether certain areas had been inundated or not.Secondly, most roads were severely submerged after the urban water logging of Yuyao City, and the actual traffic conditions made it difficult to carry out the field measurements.Some errors in selecting validation samples due to the blocking effect of dense vegetation and tall buildings may exist.Additionally, the shadows caused by tall buildings may also degrade the accuracy.The lack of actual field measurements was a defect of this paper and may cause errors in accuracy assessment.

Parameterization of Random Forest
As mentioned above, two important parameters ntree (the number of individual trees) and mty (the number of randomly selected predictor variables) should be tuned to improve the performance of the Random Forest classifier.The input image consisted of three spectral bands (e.g., RGB) and six texture bands, i.e., the number of input variables was 9, thus mty was set to be 3 (the square root of 9).As for ntree, an optimal value can be achieved when the OOB error began to converge.To obtain the best estimation of ntree, a relatively large value of 600 was chosen to construct the Random Forest model and the relationship between ntree and OOB error is shown in Figure .7.It can be seen from Figure 7 that OOB error decreases sharply from 13.7% to 7.2% as ntree increases from 1 to 35.Additionally, OOB error continues to decrease with minor fluctuations at a much slower speed until ntree reaches 200.OOB error stays rather stable at 6.4% when ntree is after 200.Therefore, ntree was set to be 200, which has a relatively higher accuracy and reduces calculation amounts at the same time.

Classification Results of UAV Imagery
A Random Forest with 200 decision trees was utilized to classify the original UAV RGB image (RGB-only) and image added with texture features (RGB + texture).The classification results for RGB-only and RGB + texture are depicted in Figure 8. Figure 8 illustrates that significant differences of classification results, before and after the inclusion of texture features, exist.When classifying using the RGB-only image, large amounts of flooded areas were misclassified into non-flooded areas.The area statistics of RGB-only and RGB + texture are shown in Table 1.  1 indicates that classification using the RGB-only image greatly underestimated the flooded areas.The extracted flooded areas only account for 18.4%, which is less than that of RGB + texture (33.58%).This is mainly due to the spectral similarity between flooded areas and other ground objects.The submerged roads show in yellow because the flood water consists of a large amount of mud and sediments.In addition, the flooded grasslands are in green due to the grass beneath the water.All these factors lead to the difficulty in separating flooded areas from bare soil and vegetation, which, in turn, results in the underestimation of inundated areas.However, the inclusion of texture features can improve this situation.This is mainly because flooded waters show rather homogeneous textures compared to those of bare soil and grassland.The inclusion of texture features can increase the between-class separability, hence to improve the urban flood mapping results.
In order to demonstrate the inundation map in detail, two typical regions, together with digitized results and the extracted flooded areas of RGB-only and RGB + texture, are shown in Figure 9. Figure 9 clearly depicts that the proposed method (RGB + texture) outperforms "RGB-only" and can extract more inundated areas.However, the former still underestimates some inundated areas, including areas under the trees and areas in shadows, when compared to UAV orthophotos and the digitized flooded areas.This underestimation is caused by the following reasons: First, the fact that visible light can hardly penetrate the dense tree-crowns makes it difficult to detect the flooded areas under trees.Second, the shadows of tall buildings can change the spectral signature of the flooded areas, which in turn accounts for the underestimation.

Results of Accuracy Assessment
To quantitatively assess the classification accuracy before and after the inclusion of texture features, confusion matrix derived from validation samples was calculated for RGB-only and RGB + texture images, the results are shown in Tables 2 and 3. Overall Accuracy and Kappa index for RGB-only and RGB + texture increased from 76.1% to 87.3% and 0.552 to 0.746, respectively.The significant increments of 11.2% and 0.194 were observed to verify that the inclusion of texture features can greatly improve classification accuracy.

Variable Importance
The importance of input variables given by Random Forest can be used to measure their contribution to classification accuracy [15].The importance of the nine input variables is depicted in Figure 10.It can be seen that spectral features are more important than texture features from an overall perspective.Red band is the most important variable with a value of 5.56 followed by Blue band (5.15).The third most important variable is MEA, which exceeds Green band.The remaining variables all belong to texture features with relatively lower importance values.MEA indicates that, although the inclusion of texture features can improve the classification accuracy of Random Forest classifier, spectral features still remain the most important variables in urban flood mapping.

Comparison with Other Classifiers
To further verify the performance of the proposed method, other classifiers including maximum likelihood (ML), artificial neural network (ANN), and support vector machine (SVM) were adopted to classify the RGB + texture image.The comparison results are described in Table 4.  4 indicates that Random Forest shows an outstanding performance when compared to other classifiers.Specifically, the overall accuracy of RF (87.3%) is higher than ML (81.2%) and ANN (83.6%), but slightly lower than SVM (87.8%).However, SVM needs many experiments to search for the optimal combination of kernel function type, punishment coefficient, and kernel parameter Gamma.The complicated parameterization process of SVM cannot match that of RF, which needs only two parameters to be tuned.Based on this fact, RF shows great potential for urban flood mapping due to its high accuracy and simplicity.

Discussion
The results of urban flood mapping indicate that UAVs can be an ideal platform for data acquisition during a flood event.UAVs have low dependence on launching and landing conditions, which makes them safer and more applicable than piloted aircrafts in urban flood monitoring.Additionally, a UAV is immune to extensive clouds due to its low-flight altitude, which makes it a feasible alternative of optical satellite remote sensing.The high-resolution images acquired by UAV can provide abundant details of ground objects, which show great potential for the precise mapping of inundated areas in heterogeneous urban landscapes.In addition, legal requirements when deploying UAV in China must be obeyed.According to Civil UAV Air Traffic Management Measures, enacted by the Civil Aviation Administration of China (CAAC), one should apply to the local air traffic control department for airspace and flight plans before the implementation of UAV flying activities.
Whether or not UAVs can provide real-time information mainly depends on the sensor used on board.When a digital video camera, such as GoPro, is on board the UAV, real-time images can be transferred back to the ground control station and be shown on the screen, which can provide first hand data for decision makers.When an off-the-shelf camera is on board, the RGB images acquired by a UAV can only be accessible to decision-makers after the landing of the UAV.In this case, UAV can still provide near real-time information, which is also very valuable for rescue operations after the urban flooding event.
Experimental results indicate that the inclusion of texture features can improve the classification accuracy, which verify the conclusion in many previous studies [24][25][26][27][28][29].Since shape and contextual relationship are into consideration in texture analysis, between-class separability can be increased in the spectral-textural feature space, which contributes to the improvement of classification accuracy.
Random Forest shows high performance for urban flood mapping.The value of ntree should be optimized to decrease OOB error and the computational burden at the same time.Random Forest outperformed ML and ANN in the comparison experiments.Since ML assumes that all training samples are normally distributed [5], and it is difficult to meet this assumption in reality this results in a limitation of ML.Unlike ML, Random Forest does not need this assumption.The ensemble learning mechanism of Random Forest guarantees the good performance, regardless of the distribution pattern [18].As for ANN, the main drawback is its low generalization capability due to over-fitting of the training data [29].In contrast, Random Forest uses a bootstrap method to generate independent training samples to tackle the issue of over-fitting.In the end, Random Forest is slightly inferior to SVM in terms of classification accuracy.This is not surprising since SVM has been proven to be the best statistic learning theory, which is based on Vapnik-Chervonenkis (VC) dimension theory and structural risk minimization [30].However, it is time consuming to test the optimal parameters of SVM, such as kernel function type, punishment coefficient, and so on [30].Taking this into consideration, it can be inferred that a simpler classifier with a low computation burden and satisfactory accuracy will be the best choice for urban flood mapping.Random Forest is such a classifier for which performance has already been verified in this study.
However, the approach used in this paper can only extract the submerged areas based on two-dimensional UAV orthophotos and cannot provide depth information at the same time.This may be a demerit of the presented method.In order to get accurate vertical depth information, a Digital Elevation Model (DEM), before and after the flood event, is always necessary.Light Detection and Ranging equipment (LiDAR) could be used onboard the UAV to obtain those DEMs, and the submerged depth could be calculated by subtracting the DEM after the flood from the DEM before the flood invent.
In terms of the processing time of the presented approach, it took Pix4D about eight hours to process about 400 raw images to generate the final orthorectified image, covering an area of 10 km 2 .Inundated area extraction consumed about one hour in this study, including texture calculation, training sample selection, and Random Forest classification.Therefore, the whole process of extracting the inundated areas from UAV images took about nine hours.From the experience, a period of nine hours to interpret the UAV remotely-sensed data can be acceptable, although not perfect, for decision makers.

Conclusions
This paper proposed a hybrid method for urban flood mapping by combining Random Forest and texture analysis based on high-resolution UAV imagery.Six least correlated GLCM texture features were calculated and combined with the original RGB image to construct a multi-dimensional spectral-textural feature space.A Random Forest consisting of 200 decision trees was utilized to extract the inundated areas.Experimental results indicated that Random Forest showed good performance in urban flood mapping with an overall accuracy of 87.3% and a Kappa index of 0.746.The inclusion of texture features can significantly improve classification accuracy with an increase of 11.2%.The comparison with other classifiers indicated that Random Forest outperformed maximum likelihood and artificial neural network, while showed similar performance to support vector machine.
Above all, the results demonstrate that a UAV is an outstanding platform for urban flood monitoring, and that the hybrid method proposed in this paper can provide accurate extraction results under complex urban landscapes.As Object Based Information Analysis (OBIA) is widely used in classifying high-resolution remote sensing images, future studies should be focused on incorporating OBIA into Random Forest to further increase the accuracy of urban flood mapping.

Figure 3 .
Figure 3.Typical flood depictions acquired by wide field camera on board the UAV: (a) flooded residential areas; (b) flooded commercial areas.

Figure 6 .
Figure 6.Schematic diagram of Random Forest for image classification.

Table 1 .
Class statistics for RGB-only and RGB + texture.

Table 2 .
Confusion matrix for RGB-only.

Table 4 .
Accuracy comparison results of RF and other classifiers.