# Unsupervised Color-Based Flood Segmentation in UAV Imagery
## 3 Methodology
### LAB Components Masks  
The LAB color space offers several advantages over the RGB color space, such as perceptual uniformity, wide color gamut, separation of color and lightness, and robustness to illumination [40]. The LAB color space is designed to be perceptually uniform, which means that a small change in the LAB values corresponds to a similar perceptual change in color across the entire color space, making it more suitable for color-based applications where accurate perception of color differences is important. It encompasses a wider range of colors compared to the RGB color space, particularly in terms of the human perceptual color  
Figure 4: The original images (from the Flood Area dataset) and the corresponding RGBVI masks on their right side. The masks show detected greenery with dim gray color. Examples are presented for (**a**) urban areas, (**b**) rural areas, and (**c**) poor or failed greenery detection. The remaining potential flood areas are shown in cyan. space. This allows for a more accurate representation of colors that fall outside the RGB gamut. The LAB color space is less affected by changes in illumination compared to the RGB color space, since lightness is a separate component. This separation is advantageous when independent control over lightness and color is desired, making it more suitable for applications where lighting conditions vary significantly [41]. Considering that the LAB color space offers greater flexibility and accuracy in color representation and manipulation compared to the RGB color space, and since, in our application, precise color information is critical, we selected the CIE 1976 L*a*b*c color space, commonly known as CIELAB [42]. Subsequently, we convert the image to the CIELAB color space for further processing, following the methodology described in [43]. Using the L, A, and B components, we derive three more masks, where areas can potentially be characterized as non-flood, exploiting the standard deviation values of the data relative to their central tendency for each color component. In flooded areas, the value of each color component in the LAB color space is usually higher than the corresponding values of the background. So, we select a lower threshold \(\Delta_{C}\), \(C\in\{L,A,B\}\) to create binary masks that detect regions probably belonging to non-flood areas. \(\Delta_{C}\) is calculated by subtracting the standard deviation (\(\sigma_{C}\)) from the mean value (\(\mu_{C}\)) over each color component (\(C\)) of the LAB color space:  
\[\Delta_{C}=\mu_{C}-\sigma_{C},\ \ \ C\in\{L,A,B\} \tag{2}\]  
Figure 5 shows the average value of (a) L, (b) A, and (c) B color components computed on flood (blue curve) and background (red curve) pixels for each image of the Flood Area dataset, sorted in ascending order. The yellow curves represent the corresponding threshold \(\Delta_{C}\) used to create the three masks. Since flooded areas have elevated values observed in each component of the LAB color space, each mask \(M_{L}\), \(M_{A}\), and \(M_{B}\) is labeled as non-flood, when the component's pixel value is smaller than \(\Delta_{C}\). Because the two classes (flood and non-flood) have very similar characteristics, setting a threshold between them makes distinguishing the classes challenging. The proposed equation for \(\Delta_{C}\) is designed to produce a threshold that classifies pixels with values significantly below the flood, so that non-flood pixels can be excluded with high confidence. The objective is not to distinguish between the two classes, but rather to provide an initial segmentation by excluding pixels that do not belong to the flood class. In the Flood Area dataset, we observed that the median value, computed over all images in the dataset, of the percentage of pixels that belong to the non-flood class according to the mask \(M_{L}\), \(M_{A}\) and \(M_{B}\) is only 2.3%, 1.3%, and 2.0%, respectively.