# Optimization of DG-LRG Water Extraction Algorithm Considering Polarization and Texture Information
## 3 Optimized Local Region Growth Algorithm Considering Polarization and Texture Information
### Local Region Growth Criteria Based on Polarization and Texture Information
#### 3.3.2 Determination of Objective Function  
To determine the growth criteria for region growth, it is necessary to select a discrimination threshold. In our experiment, the Euclidean distance of the feature vector was selected as the judgment basis, and the extracted texture features were combined with the image coordinate matrix (x,y) direction to form a texture-space five-dimensional matrix. In order to avoid a certain component in the vector having a significant impact on clustering, before calculating the Euclidean distances between pixels, the distances of each component of the five-dimensional vector were normalized first, following which the normalized distances were combined into a composite distance, which was used as a discriminant criterion. The texture feature distance dp and spatial distance ds of elements m and n in the matrix are calculated as follows:  
\[d_{p}=\sqrt{\left(p_{1m}-p_{1n}\right)^{2}+\left(p_{2m}-p_{2n}\right)^{2}+ \left(p_{3m}-p_{3n}\right)^{2}}, \tag{5}\]  
\[d_{s}=\sqrt{\left(x_{m}-x_{n}\right)^{2}+\left(y_{m}-y_{n}\right)^{2}}, \tag{6}\]  
We compute the Euclidean distance between the first three principal components (PCs) of GLCM features. PCs reduce redundancy while preserving 95% variance, the texture-space feature vector for each pixel is defined as [p1, p2, p3, x, y]where p1, p2, and p3 are the first, second, and third principal components of the texture feature information of the elements in the matrix, respectively, and x and y are the row and column coordinates of an element, respectively. The Euclidean distance between pixel coordinates ensures spatial continuity during region growth. The composite distance D can be expressed as follows:  
\[D=\sqrt{\left(d_{p}/d_{pm}\right)^{2}+\left(d_{s}/d_{sm}\right)^{2}}, \tag{7}\]  
where \(d_{pm}\) and \(d_{sm}\) represent the maximum values of the texture feature distance and spatial distance, respectively, representing the texture and spatial differences between pixels. The composite distance D integrates texture and spatial distances to guide region growth. We normalized dp and ds, divided by their maximum values within each local sub-region. This normalization eliminates dimensional differences between texture features (unitless) and spatial coordinates (pixels), allowing equal contributions from both components. The normalized Euclidean norm ensures that texture and spatial terms contribute equally to the similarity measure. This approach is widely adopted in multi-feature fusion [22]. The composite distances for the two polarization methods are denoted as D\({}_{HH}\) and D\({}_{HV}\), respectively. Due to the uneven degree of back-scatter during SAR imaging, as well as the presence of noise and homo-spectral anomalies in the intensity map, it is difficult to accurately extract water bodies within the study area using the global region growth algorithm. Based on this, we propose a local optimization region growth algorithm, which determines an objective function and divides the study into N \(\times\) N local regions. The value of N can be roughly set according to the size of the influence and terrain; in this experiment, N = 2. The choice of N = 2 aligns with the topographic diversity of Fangshan District. The northwestern mountainous areas and southeastern plains (Figure 1) exhibit distinct backscatter patterns. Dividing the image into 2 \(\times\) 2 sub-regions allows the optimization algorithm to separately optimize thresholds for mountain-shadowed and open-water areas, whereas a global approach (N = 1) would over-smooth these transitions. However, an excessively large value of N may significantly compromise computational efficiency, thereby failing to meet the requirements for emergency flood monitoring. Therefore, the image is divided into 2 \(\times\) 2 sub-regions to balance local adaptation and computational efficiency. The optimalsolution of the objective function is obtained within each local region, which not only ensures the scientific nature of the growth criteria but also helps to highlight local features.