# Research on Two-Dimensional Digital Map Modeling Method Based on UAV Aerial Images
## 2 Feature Extraction and Registration Based on the C-SURF Algorithm
### Improved SURF Feature Extraction in the C-SURF Algorithm  
The traditional SURF algorithm frequently employs the concept of integral images and applies appropriate simplifications and approximations to the integrals within the Hessian matrix [13]. However, the traditional SURF algorithm constructs descriptors by statistically extracting histograms and determining the principal orientation of features in the neighboring region. It then sums the responses in two directions along the principal orientation and the absolute sum of the responses within a 4 \(\times\) 4 sub-region, ultimately describing the corresponding feature points with a 64-dimensional feature vector. Consequently, compared to the SIFT feature extraction algorithm, although the reduction in dimensionality of the SURF algorithm's feature descriptors alleviates data redundancy, it also results in a loss of accuracy in feature registration.  
In the C-SURF algorithm, the improved SURF algorithm primarily focuses on optimizing the descriptor. The descriptor in this method is designed to extract logarithmic polar coordinates from the neighborhoods of key points obtained at different scales, thereby enhancing the accuracy of image registration. More specifically, the newly obtained neighborhoods in logarithmic polar coordinates are first divided into regions, segmenting the neighborhood into three blocks based on radial distances of 6, 9, and 15, while excluding the coordinates of the central pixel. Additionally, the area is divided into eight regions, resulting in a total of 17 sub-regions. Each sub-region calculates the gradient histogram in eight directions, ultimately yielding a 136-dimensional feature description. The specific construction process is illustrated in Figure 1.  
To achieve rotation invariance, the logarithmic polar coordinates must capture the direction of the keypoints. After rotation, the new coordinates of the sampling points in the neighborhood of the central pixel point are as shown in Equation (4):  
\[\left\{\begin{array}{l}x^{\prime}=x\cos(\alpha)-y\sin(\alpha)\\ y^{\prime}=y\sin(\alpha)+y\cos(\alpha)\end{array}\right. \tag{4}\]  
In terms of assigning pixel weights around keypoints, both the SIFT feature extraction algorithm and the traditional SURF feature extraction algorithm employ a Gaussian weighting function. The Gaussian weighting function assigns larger weights to pixels closer to the center pixel and smaller weights to those farther away, thereby reducing the influence of distant pixels on the central pixel. However, during nearest-neighbor matching, Gaussian weighting tends to blur the distinction between the nearest and the second-nearest neighbors, which can easily lead to mismatches and significantly increase the computational burden for improving registration accuracy. In contrast, distance-based weighting amplifies the difference between the nearest and the second-nearest neighbors during nearest neighbor matching, which is beneficial for enhancing the registration accuracy of feature points. To address the deficiencies associated with both Gaussian and distance-based weighting schemes in registration, this paper adopts a method that combines Gaussian and distance  
Figure 1: Construction of feature descriptor vector in the C-SURF algorithm.  
weights to improve the accuracy of subsequent feature point registration. The new weight calculation formula is presented in Equation (5):  
\[w=m(x,y)e^{-\frac{(x^{\prime})^{2}+(y^{\prime})^{2}}{2x^{2}}}d \tag{5}\]  
where \(d=\sqrt{(x-a)^{2}+(x-b)^{2}}\) represents the Euclidean distance between a neighboring pixel and the central pixel, \((x,y)\) denotes the coordinates of the neighboring pixel, and \((a,b)\) signifies the coordinates of the central pixel.