## 2 Construction of the Contact Group Contact Model
### Morphological Feature Extraction of Contact Groups
#### 2.2.3 Morphological Adaptive Feature Extraction  
Morphological reconstruction can effectively remove noise and preserve object contours when the type of noise is unknown. Using the LOG operator, which has high boundary localization accuracy, strong anti-interference capability, and good continuity, for preprocessing [19], followed by grayscale transformation to obtain seed points [21; 22], morphological corrosion reconstruction \(R_{f}^{e}\) and morphological dilation reconstruction \(R_{f}^{\delta}\) are then performed, as shown in Equation (11).  
\[\begin{split} R_{f}^{e}(g)&=\varepsilon_{f}^{(i)}( g),g\leq f\\ R_{f}^{\delta}(g)&=\delta_{f}^{(i)}(g),g\geq f\end{split} \tag{11}\]  
The Multi-scale Combinatorial Grouping (MCG) proposed by [PERSON] et al. is an excellent hierarchical segmentation method that employs a fast normalized cut algorithm and an effective hierarchical region merging algorithm. Based on the hierarchical segmentation results provided by MCG, some improved methods have also been proposed [21; 22].  
Let be an adaptive morphological reconstruction operator, which is convergent when the scale parameter m is increased, that is, for any gradient images \(f\) and \(g\), it satisfies Equation (12).  
\[\vartheta(g,m,j)=\bigvee\Big{\{}R_{f}^{\Delta}(g),\vartheta(g,m,j)\Big{\}} \tag{12}\]  
As m increases, the gradient amplitude of the reconstructed gradient image by AMR eventually converges to the minimum value of the original gradient image, meaning AMR only filters out the useless regional minima and preserves the significant minima when \(m\) approaches infinity; whereas MR filters out all regional minima. Therefore, AMR can effectively avoid over-segmentation and also adaptively filter out useless seed points while preserving meaningful seed points. This paper proposes an objective function to prove the convergence of AMR.  
\[K(g,s)=max(|\vartheta(g,m,j)-\vartheta(g,m,j-1)|) \tag{13}\]  
To achieve unsupervised learning, this paper proposes a method of morphological reconstruction and clustering validity index to determine the optimal number of clusters. As shown in Figure 4, the grayscale values of the image gradually decrease from the center to the edges. Therefore, LOG can extract the extremum points in the central area of the image from this distribution feature, and then achieve AMR adaptive seed point segmentation, finally completing the superpixel segmentation. The results of AMR segmentation are shown in Figure 5. ARM feature recognition flowchart based on LOG features is shown in Figure 6.  
Algorithm steps:  
1. Process the image \(P\) based on LOG, mark the contour feature points, and use the connected domain extremum point module to process;
2. Apply AMR to image \(P\) to generate the morphological gradient reconstruction \(\vartheta\);
3. The entropy rate superpixel segmentation method divides the image \(P\) into \(N\) regions, each representing the growth range of pixel points;
4. Extract gradient features from each region, integrate all feature vectors into a feature vector matrix, initialize the membership matrix, update the clustering centers, and use Equation (10) to update the weight matrix;
5. If \(t>max\_iter\) (maximum number of iterations), proceed to step 6, otherwise return to step 4;
6. Obtain the final segmentation result based on the membership matrix.  
Figure 4: Segmentation of contact group morphological images using superpixel entropy rate with different clustering numbers: (**a**) clustering number is 500; (**b**) pseudo color effect, where clustering number is 500; (**c**) clustering number is 100; (**d**) pseudo color effect, where clustering number is 100.