# A Full-Spectrum Registration Method for Zhuhai-1 Satellite Hyperspectral Imagery
## 3 Methods
### Relative Registration  
#### 3.1.1 Feature Matching of Adjacent Bands  
The scale-invariant feature transform (SIFT) feature operator is a local image feature description operator that maintains invariance to image scaling, rotation, and affine transformation [32]. In this study, the feature points were extracted and matched based on SIFT features. The flow of the algorithm is described below.  
1. Keypoint detection The image scale-space L(\(x,y,\sigma\)) was produced from the convolution of a variable-scale Gaussian function (G(\(x,y,\sigma\))) with an input image (I(\(x,y\))), as shown in the following equation: \[\text{L}(x,y,\sigma)=\text{G}(x,y,\sigma)\otimes\text{I}(x,y),\] (1) where \(\otimes\) is the convolution operation in \(x\) and \(y\); G(\(x,y,\sigma\)) is a Gaussian function with a variable scale and \((x,y)\) are pixel coordinates; and \(\sigma\) is the scale space factor, and its size determines the smoothness scale of the image. A large scale corresponds to general features in the image, while a small scale corresponds to detailed features.  
Different scale space factors were used to construct a difference of Gaussian (DoG) pyramid based on the original image. A point was selected as the key point if it is the largest or smallest point within 26 neighborhoods of the same layer and the upper and lower layers in DoG scale space.  
2. Keypoint direction matching An orientation histogram was formed from the gradient orientations of sample points within a region around the keypoint. The orientation histogram ranged from 0\({}^{\circ}\) to 360\({}^{\circ}\), and each 10\({}^{\circ}\) represented a direction. A total of 36 directions were derived in this study. The peaks in the orientation histogram correspond to the dominant directions of local gradients at the keypoint.  
3. Keypoint descriptor The local area around the feature point was rotated clockwise by \(\theta\) (e.g., adjusted to 0\({}^{\circ}\)) when constructing the feature descriptor to ensure its rotation invariance. In the rotated region, the surrounding pixel region was partitioned with the keypoint as the center. The gradient accumulation value is calculated for eight directions on each sub-block, and a gradient direction histogram was then drawn. Finally, the feature vector representing local keypoint information could be obtained. Through the above steps, the influence of geometric factors such as scale change and rotation on the SIFT feature vector could be removed. Moreover, the influence of illumination change could be reduced if the SIFT feature vector is further normalized [33].  
4. Feature matching The similarity of keypoints was measured based on Euclidean distance after the feature vectors are generated for the two images. The keypoint \(p\) can be taken from the reference image and used to search for the two keypoints \(n\) and \(m\) that have the closest Euclidean distance from \(p\) in the matched image. The Euclidean distance can then be calculated between \(p\) and \(n\) and \(p\) and \(m\), respectively. The matching process is successful if the ratio of the closest distance to the next closest distance is less than a certain threshold.  
5. Elimination of mismatched points The RANdom SAmple Consensus (RANSAC) algorithm was used to find the optimal mathematical model, where the number of matching point pairs is the maximum value. Hence, mismatched point pairs were eliminated. The basic steps of the algorithm are described as follows: Step 1: Randomly select the minimum number of points required to determine the model parameters.  
Step 2: Calculate the model parameters.  
Step 3: Find how many points from the entire point set fit the model within a user defined tolerance of \(\lambda\).  
Step 4: Re-estimate the model parameters using identified inliers and terminate the process if the fraction of inlier points over the entire point set exceeds a predefined threshold \(\psi\).  
Step 5: Otherwise, repeat steps 1 through 4 for a prescribed number of iterations.