## 2 Materials and Methods
### Descriptor Extraction  
Unlike local feature descriptors, global features have a simpler computation process with lower time complexity. Additionally, since they do not require storing many feature points, the required storage space is minimal. Grayscale and gradient features are typical examples of global features. Grayscale features effectively represent the overall brightness of an image and are insensitive to global changes, such as illumination. Gradient features, on the other hand, capture the texture information of an image, making them sensitive to shape and texture while being robust to changes in viewpoint. This allows them to complement grayscale features in describing local characteristics. We construct a feature matrix descriptor by combining grayscale and gradient information. This method combines grayscale and gradient information to construct a feature matrix descriptor. We reduce feature dimensionality by aggregating the feature matrix to obtain two aggregation feature descriptors in the column and row directions.  
During the feature-extraction process, the image is vertically segmented into multiple small regions \(R_{i}\) to ensure that the extracted features capture more detailed information. Grayscale features are firstly extracted from each region, with the grayscale range redivided into intervals--we used 64 intervals. Assuming the grayscale value of the image is \(I(x,y)\), the grayscale feature can be represented as follows:  
\[\mathbf{h}_{g}(g)=\sum\
olimits_{(x,y)}\delta(I(x,y)-g) \tag{12}\]  
where \(\delta\) is the Dirac function and \(g\) represents the grayscale index. The subscript \(g\) represents that the \(\mathbf{h}\) vector is a grayscale feature vector.  
Next, convolution kernels are applied to compute the gradient information of the image region \(R_{i}\) in both the \(X\) and \(Y\) directions. The gradient, including magnitude and direction, is then calculated based on the results from these two directions. The gradient direction intervals are redefined, and the gradient magnitude is used for weighting. Assuming the gradient direction of the image is \(D(x,y)\) and the gradient magnitude is \(G(x,y)\), the gradient feature can be expressed as  
\[\mathbf{h}_{s}(\theta)=\sum\
olimits_{(x,y)}\delta(D(x,y)-\theta)G(x,y) \tag{13}\]  
where \(\theta\) represents the directional index and the subscript \(s\) represents that the \(\mathbf{h}\) vector is a gradient feature vector.  
The grayscale and gradient features are combined to obtain a 2D feature matrix \(\mathbf{H}_{gs}(\theta,g)\).  
\[\mathbf{H}_{gs}(\theta,g)=\sum\
olimits_{(x,y)}\delta(D(x,y)-\theta)\delta(I (x,y)-g)G(x,y) \tag{14}\]  
Directly using the feature descriptor matrix for similarity computation can result in a high computational cost, especially as the number of features accumulates, making the cost prohibitive. We employ aggregation-based dimensionality reduction to reduce the feature matrix into feature vectors along the column and row directions to address this. Aggregative dimensionality reduction methods are essentially a form of information quantization. They offer fast computation speeds and achieve data volume reduction by sacrificing some detail resolution. After dimensionality reduction, the aggregation feature descriptor is expressed as  
\[\mathbf{v}_{r}=\sum\
olimits_{g}\mathbf{H}_{gs}(\theta,g) \tag{15}\]  
\[\mathbf{v}_{c}=\sum\
olimits_{\theta}\mathbf{H}_{gs}(\theta,g) \tag{16}\]  
Figure 5 displays the process of generating the aggregation feature descriptor, which primarily includes image segmentation, feature matrix construction, and aggregation-based dimensionality reduction. The length of the feature vectors is related to the quantization indexes of the grayscale and gradient direction, with longer vectors providing higher-detail resolution. It is important to note that the two vectors have different units.