# A Segmentation-Based Optimal Seamline Generation Method for SAR Image Mosaic
## 2 Materials and Methods
### Segmentation-Based Optimal Seamline Generation Model
#### 2.3.2 Homogeneous Area Screening  
After generating parcels by joint segmentation, statistical analysis can be conducted to identify and extract consistency-stable parcels, that is, homogeneous areas. The extraction of these consistency-stable parcels is crucial in narrowing the scope of the seamline search, as it effectively eliminates areas with significant projection differences and notable radiometric disparity. Through this method, the most optimal seamline can be precisely searched within the filtered, consistency-stable candidate areas and the effectiveness can be greatly improved. Mean and standard deviations are used to describe the stability degree of the parcels. This is because mean and standard deviation can reveal the microwave scattering mechanism on the surface as well as the scattering characteristics of ground objects to a certain extent. For example, specular areas typically exhibit low mean and standard deviation, while double-bounce areas show high mean and standard deviation. Double-bounce mainly occurs in urban or built-up areas, which have significant geometric distortion. To reduce geometric misalignments during the mosaicking, seamline should ideally avoid double-bounce areas. Specular areas usually occur on smooth water surfaces, and mosaicking along these smooth surfaces does not introduce significant geometric and radiometric differences. It makes a great contribution to improving the overall mosaic quality. The insights derived from these observations motivate the extraction of consistency-stable parcels from overlapping images. Assuming \(N\) parcels are extracted by joint segmentation, denoted as \(\mathbf{p}=\{p_{1},p_{2},\ldots,p_{N}\}\). For each parcel, \(p_{i}\), its mean (\(\mathbf{\mu_{A}}\) and \(\mathbf{\mu_{B}}\)) and standard deviation (\(\mathbf{\sigma_{A}}\) and \(\mathbf{\sigma_{B}}\)) in the overlap areas \(I_{A}\) and \(I_{B}\) are calculated, represented as \(\mathbf{\mu_{A}}=\{\mu_{1}^{A},\mu_{2}^{A},\ldots,\mu_{N}^{A}\}\) and \(\mathbf{\sigma_{A}}=\{\sigma_{1}^{A},\sigma_{2}^{A},\ldots,\sigma_{N}^{A}\}\) for image \(I_{A}\) and \(\mathbf{\mu_{B}}=\{\mu_{1}^{B},\mu_{2}^{B},\ldots,\mu_{N}^{B}\}\) and \(\mathbf{\sigma_{B}}=\{\sigma_{1}^{B},\sigma_{2}^{B},\ldots,\sigma_{N}^{B}\}\) for image \(I_{B}\). These statistics describe the homogeneity and stability of parcels in the overlap areas. Next, \(\mathbf{\mu_{A}}\), \(\mathbf{\mu_{B}}\), \(\mathbf{\sigma_{A}}\), and \(\mathbf{\sigma_{B}}\) are classified into \(k\) classes. In this paper, the larger the value of \(k\), the better the constraint on the direction of the final seamline. However, in order to balance classification accuracy and efficiency, \(k\) is set to 3 based on experience. By applying \(k\)-means [36], three class sets can be obtained, \(\omega_{\mu}^{A}\), \(\omega_{\sigma}^{A}\), \(\omega_{\mu}^{B}\) and \(\omega_{\sigma}^{B}\), each taking values \(\{0,1,2\}\), where a small class value indicates better stability of parcels. Then, the \(\omega_{\mu}^{A}\) and \(\omega_{\sigma}^{A}\) can be added to create a new classification result, \(\mathbf{\omega_{A}}\), which ranges from 0 to 4. Similarly, \(\mathbf{\omega_{B}}\) is constructed in the same manner. The \(\mathbf{\omega_{A}}\) and \(\mathbf{\omega_{B}}\) are used to represent the stability of parcels in \(I_{A}\) and \(I_{B}\), respectively. Due to factors such as the acquisition time, observation angles, polarization mode, and random errors, the stability of parcels \(p_{i}\) in \(I_{A}\) and \(I_{B}\) may vary, resulting in a different stability level. Therefore, an integration strategy is employed to take into account \(\mathbf{\omega_{A}}\) and \(\mathbf{\omega_{B}}\), to derive a unified classification, \(\mathbf{\omega}\in\{1,2,\ldots,8\}\). For parcels \(p_{i}^{A}\) and \(p_{i}^{B}\), their stability level in \(\mathbf{\omega_{A}}\) and \(\mathbf{\omega_{B}}\) can be represented as \(\omega_{A}(p_{i})\) and \(\omega_{B}(p_{i})\), respectively. Then, the integration rule is described as follows:  
\[\omega(p_{i})=