## 2 Materials and Methods
### Automated Satellite-Based Surface Water Mapping
#### 2.3.2 Mapping Algorithm  
There are multiple surface water mapping algorithms provided in the HYDRAFFloods toolsets. Many algorithms are developed as variations of [PERSON]'s method [59], a classical method that uses the maximum between-class histogram variance as the criterion to determine the threshold value for segmentation. However, this [PERSON]'s method only performs well when the image is characterized by a bimodal histogram, but it is not applicable to images with a unimodal histogram. In this study, we apply three [PERSON]'s variation algorithms and compare the results: (1) Edge Otsu [31; 48], (2) Bmax Otsu [30; 48], and (3) Fuzzy Otsu [60]. These algorithms provide generic and sensor-agnostic water mapping, given some customization of parameters. More detailed information is introduced in the following sections. * Bmax Otsu  
The Bmax Otsu algorithm was developed by [PERSON] et al. [30] to extract a near-bimodal histogram from the optical or SAR imagery. The major steps are presented in Figure 4. Firstly, the algorithm uses chessboard segmentation to subset the image into grids. Secondly, the maximum value of normalized between-class variance (BCV), or Bmax value, is calculated. The initial threshold value needed to start Bmax calculation is set to \(-16\) dB for Sentinel-1 and 0 for mNDWI of optical imagery (Sentinel-2 and Landsat-7/8/9). Thirdly, the Bmax value is used to select the region of the bimodal feature for histogram sampling. Fourthly, histogram sampling is conducted to generate the distribution of frequency of occurrence of mNDWI or VV backscatter within a specified range. Finally, the segmentation threshold value is computed using [PERSON]'s method. The final surface water map is created where areas with dB values less than the threshold are identified as water for SAR data, and values greater than the threshold are nonwater. In contrast, the threshold value is used inversely, where mNDWI values greater than the threshold value are classified as water for optical data, and those that are smaller than the threshold are nonwater. * Edge Otsu  
The Edge Otsu algorithm was initially introduced by [PERSON] et al. [31]. The first step is to generate a binary image from an initial segmentation threshold in order to alleviate anyedges being defined from other classes in the later step. The second step is to use the Canny edge filter [61] to extract the edges of features in the satellite imagery with the assumption that the edges are water. Some defined edges are filtered by length to remove the impacts of small edges that skew the histogram sampling. The algorithm then buffers the delineated edges and generates the image for histogram sampling. The following steps are the same as the Bmax Otsu, which uses [PERSON]'s method to compute the threshold value applied to the entire image to differentiate water and nonwater surfaces. The initial threshold value is also needed and set to \(-16\) dB for SAR and \(0\) for mNDWI, respectively. * Fuzzy Otsu  
The Fuzzy Otsu method [60] modified the Otsu method based on the mathematics of fuzzy sets by using both the between-class variance and the membership grade from the Fuzzy Gaussian function to improve the segmentation performance. The Fuzzy Gaussian function transforms the pixel values into a normal distribution, where the midpoint of the normal distribution defines the ideal definition for the set, assigning the membership grade to \(1\), with the remaining input values decreasing as they move away from the midpoint in both the positive and negative directions until the values move too far to remain in the fuzzy set and are therefore assigned zeros [62].