# Unsupervised Color-Based Flood Segmentation in UAV Imagery
## 3 Methodology
### LAB Components Masks
This means that the \(M_{L}\), \(M_{A}\), and \(M_{B}\) masks have a very low number of wrong-classified flood pixels, providing a robust initial segmentation for our method. Figure 5: Blue and red curves correspond on the average value of (a) L, (b) A, and (c) B color components computed on flood and background pixels, respectively, for each image of the Flood Area dataset, sorted in ascending order. The yellow curves show the corresponding \(\Delta_{C}\) threshold. Edges often correspond to significant changes in intensity or color in an image. Detecting these edges allows for the extraction of important features, such as object boundaries, contours, and shapes, which are essential for further analysis and interpretation of image content. Identifying edges helps in highlighting important structures and details and serves as a fundamental step in image segmentation, which involves partitioning an image into regions with similar characteristics. Edges act as boundaries between different regions, which makes them essential for accurate segmentation and analysis of image content [44]. It is clear that edges can be useful to locate borders between flooded and non-flooded areas and should, therefore, be excluded from the flood water class. To acquire the fifth mask, \(M_{Edge}\), the L component is initially smoothed using a 2-D Gaussian kernel with a standard deviation of 4. Subsequently, the Canny edge detection algorithm is applied to the blurred L component, resulting in dilated edges. These edge pixels are then designated as non-flood areas. The \(M_{Edge}\) mask is also useful, because by detecting the borders of small objects (e.g., buildings, cars, trees, etc. ), then the weights of their nearby pixels are reduced in the flood-dominant color estimation, increasing the robustness of the estimation (see Section 3.4). Examples from the Flood Area dataset of the four LAB component masks \(M_{L}\), \(M_{A}\), \(M_{B}\), and \(M_{Edge}\) are depicted in Figure 6. We observe that each color component and the detected edges contribute to further classifying image pixels as background (with dim gray color), thus excluding them from potential flood areas (cyan color). Non-flood areas are strengthened, when so classified by multiple components, but also complemented by being detected by one component when others failed to do so. For the whole Flood Area dataset, on average 25.43%, 27.75%, 29.82%, and 7.45% of pixels, respectively, for the L, A, and B component, and the edge image, are classified as non-flood. Notice the sky in the first image of Figure 6, detected only by the B component as non-flood, and the hillside in the second image, which as a non-flood area is strengthened by all components. In any case, the borders of small objects are well detected by the \(M_{Edge}\) mask, increasing the robustness of the flood-dominant color estimation, which is described in the next subsection. Figure 6: Original images from the Flood Area dataset and their corresponding LAB components masks \(M_{L},M_{A},M_{B}\), and \(M_{Edge}\) from left to right. Note that the edges in \(M_{Edge}\) are dilated for illustration purposes. Non-flood areas are depicted with dim gray color, whereas remaining potential flood areas are shown in cyan.