# Unsupervised Color-Based Flood Segmentation in UAV Imagery
## 3 Methodology
### RGB Vegetation Index Mask  
In both urban and rural areas, the landscape is lush with greenery, largely attributed to the abundant presence of trees and vegetation. Since trees are unlikely to be fully covered by flood events, our first concern is to rule out the greenery, noticing also in our experiments that, using only a flood color approach, vegetation is more likely to be misclassified as flood water. Therefore, we use the RGB Vegetation Index (RGBVI), introduced in [37]. This index was successfully applied in [38] as a first step in detecting and counting trees using region-based circle fitting. RGBVI particularly improves sensitivity to vegetation characteristics while mitigating the impact of interfering factors, such as reflection of the background soil and directional effects. However, as shown in Equation (1), it can be influenced by the color quality of the image, e.g., due to bad atmospheric conditions by the time of the image acquisition. It is defined as the normalized difference between the squared green reflectance and the product of blue and red reflectance:  
\[RGBVI=\frac{(R_{G})^{2}-(R_{B}\times R_{R})}{(R_{G})^{2}+(R_{B}\times R_{R})} \tag{1}\]  
where \(R_{R}\), \(R_{B}\), and \(R_{G}\) denote the red, blue, and green reflectance, respectively. In Ref. [39], the authors, after extensive experimentation, concluded that an RGBVI value of 0.15 is optimal for greenery detection. In this work, we preferred to set a stricter value, e.g., 0.2, so that any value exceeding this threshold is characterized as greenery and, therefore, is not flooded, resulting from the \(M_{RGBVI}\) mask. The threshold is essentially a constant applicable to any color image input. A stricter value ensures the detection of only confident green  
Figure 3: Overview of the proposed approach.  
areas. Consequently, if the floodwaters also exhibit green hues, they will not be selected, as the mixture of vegetation and water results in a lighter color compared to the actual vegetation. With this mask, we are able to rule out a large number of image pixels, since visible vegetation cannot be flooded. Particularly in the Flood Area dataset in some images depicting rural areas, up to 92.8% of pixels can be characterized as greenery, and thus non-flood, while, on average, over the whole dataset, 17.94% of pixels are ruled out this way (median value is 14.16%). The binary image produced from this process results in a set of pixels definitively classified as non-flood, leaving the remaining pixels as ambiguous. This ambiguous region is referred to as the potential flood area (PFA). Within this area, using the modules described below, certain pixels will be classified and segmented as flood, while the others will be excluded.  
In Figure 4, examples of RGBVI masks are shown for (a) urban and (b) rural areas from the Flood Area dataset, where the dim gray color corresponds to the detected greenery. We can clearly notice that, especially in rural areas, a substantial number of image pixels are rightly characterized as trees and vegetation, and, therefore, these areas cannot be flooded. This technique also works in urban areas where vegetation is present. But there are also cases where the RGB Vegetation Index is not quite efficient, especially when the image color quality is poor due to the camera rotation angle and/or weather conditions (Figure 4c).