A hyperspectral image registration method, device, equipment and medium
By using spectral adaptive embedding and multi-layer feature aggregation of the Dinov3 VIT encoder, the problems of dimensionality difference and robustness in hyperspectral image registration are solved, achieving high-precision image registration that is suitable for remote sensing and precision agriculture.
Patent Information
- Application Number
- CN202610655256.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-13
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2046-05-13
AI Technical Summary
Existing hyperspectral image registration methods suffer from insufficient feature representation, loss of spectral information, insufficient robustness, and cross-modal input adaptation issues in high-dimensional data processing, resulting in insufficient registration accuracy and robustness. Furthermore, methods that rely on large amounts of labeled data are costly.
A spectral adaptive embedding module is used to compress high-dimensional hyperspectral data into a three-dimensional RGB compatible representation. Multi-layer token features are extracted by combining the Dinov3 VIT encoder, and weighted fusion is performed by a multi-layer feature aggregation module. Corresponding point pairs are found by a dense feature matching module, and spatial transformation is performed based on the optimal affine transformation matrix to achieve end-to-end registration.
It effectively preserves discriminative spectral information, improves registration accuracy and robustness, reduces data annotation costs, and is suitable for practical engineering scenarios such as remote sensing monitoring and precision agriculture.
Smart Images

Figure CN122176025B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of hyperspectral image registration technology, and in particular to a hyperspectral image registration method, apparatus, device, and medium. Background Technology
[0002] With the rapid development of remote sensing technology, hyperspectral images (HSI) have been widely used in multi-temporal monitoring, environmental change detection, precision agriculture, and urban mapping. Compared to traditional RGB images, hyperspectral images provide detailed spectral information across hundreds of continuous spectral bands, enabling precise differentiation of ground features and providing crucial support for tasks such as spectral unmixing, target detection, and land cover classification. However, in actual acquisition, due to factors such as sensor motion, platform vibration, terrain undulation, and atmospheric effects, hyperspectral images acquired at different times, from different perspectives, or from different sensors often exhibit varying degrees of geometric misalignment. Especially in pushbroom imaging systems, platform instability and terrain changes can introduce local stretching, compression, and other nonlinear distortions, severely affecting the accuracy of subsequent analysis. Therefore, achieving high-precision image registration, i.e., geometric alignment of multi-source hyperspectral images, has become a key prerequisite for conducting multi-temporal and multi-sensor analysis.
[0003] Existing image registration methods mainly include those based on handcrafted features and those based on deep learning, but they still have the following problems in hyperspectral scenes:
[0004] 1) Insufficient feature representation capability: Traditional methods such as Scale Invariant Feature Transform (SIFT) and Accelerated Robust Feature Transform (SURF) are mainly designed for RGB or grayscale images. Their feature descriptors are only applicable to low-dimensional channel data and are difficult to effectively characterize the spectral features across hundreds of bands in hyperspectral images, resulting in unstable key point detection and decreased matching accuracy.
[0005] 2) Spectral information loss problem: Some methods reduce the dimensionality of hyperspectral data to three channels through principal component analysis (PCA) before feature extraction. Although this alleviates the dimensionality problem, discriminative spectral information that is crucial for accurate matching is inevitably lost during the dimensionality reduction process, affecting the registration accuracy.
[0006] 3) Insufficient robustness to complex spectral changes: Multi-temporal hyperspectral images generally suffer from nonlinear spectral distortion caused by factors such as illumination changes, atmospheric disturbances, and sensor differences. Traditional manual features and some depth features are difficult to maintain a stable match.
[0007] 4) Strong dependence on labeled data: Although methods based on convolutional neural networks (CNN) or Transformers (such as LoFTR) can improve matching performance, they usually depend on a large amount of labeled corresponding point data. However, the high cost and difficulty in obtaining hyperspectral image annotations limit their practical application.
[0008] 5) Cross-modal input adaptation problem: In recent years, self-supervised methods (such as the DINO series) have shown excellent performance in visual representation learning. In particular, Dinov3 has significantly improved feature generalization ability through pre-training on large-scale remote sensing data. However, these models are mainly oriented towards three-channel RGB input and cannot directly process high-dimensional hyperspectral data, resulting in obvious input dimension mismatch problems. Summary of the Invention
[0009] The technical problem to be solved by the present invention is to provide a hyperspectral image registration method, apparatus, device and medium that can effectively bridge the dimensionality difference between high-dimensional hyperspectral data and RGB pre-trained models, fully retain key spectral information, and improve registration accuracy and robustness under complex imaging conditions.
[0010] The technical solution adopted by this invention to solve its technical problem is: to provide a hyperspectral image registration method, comprising the following steps:
[0011] Acquire the hyperspectral image to be registered and the reference image;
[0012] The hyperspectral image to be registered and the reference image are input into the registration model to obtain the registered image; wherein, the registration model includes:
[0013] A spectral adaptive embedding module is used to transfer the hyperspectral image to be registered and the reference image from a learnable spectral projection layer, respectively. The spectral channels are compressed into a three-dimensional RGB-compatible characterization to obtain the image to be registered after projection and the reference image after projection.
[0014] The Dinov3 VIT encoder is used to extract features from the projected image to be registered and the reference projected image respectively, to obtain multi-layered Token features to be registered and Token features to be referenced.
[0015] The multi-layer feature aggregation module is used to perform weighted fusion on the multi-layer Token features to be registered and the reference Token features respectively to obtain the fused feature map to be registered and the reference fused feature map.
[0016] The dense feature matching module is used to find the corresponding point pairs between the feature map to be registered and the reference fused feature map, and to obtain the optimal affine transformation matrix based on the corresponding point pairs. The hyperspectral image to be registered is then spatially transformed according to the optimal affine transformation matrix to obtain the registered image.
[0017] The learnable spectral projection layer performs channel-level linear mapping on the input hyperspectral image through a learnable spectral projection matrix and bias terms to obtain a three-channel embedded representation; wherein, the spectral projection matrix is initialized through principal component analysis, and the first three principal components are selected as the initial projection directions.
[0018] The Dinov3 VIT encoder includes:
[0019] The partitioning unit is used to divide the image to be registered and the reference image into non-overlapping image blocks of fixed size, respectively.
[0020] The conversion unit is used to perform image block embedding and tokenization processing on the segmented image blocks to obtain the token sequence to be registered and the reference token sequence.
[0021] Multi-layer coding units are used to extract features from the token sequence to be registered and the reference token sequence, resulting in multi-layer token features to be registered and reference token features.
[0022] The multi-layer feature aggregation module includes:
[0023] The selection unit is used to select a preset number of token features from the multi-layered token features to be registered and the reference token features, respectively.
[0024] The fusion unit is used to perform weighted fusion of the selected Token features at a preset number of layers using learnable weights to obtain a fusion feature map to be registered and a reference fusion feature map.
[0025] The dense feature matching module includes:
[0026] The similarity calculation unit is used to flatten the fusion feature map to be registered and the reference fusion feature map into sequence representations respectively, and calculate the similarity matrix between the fusion feature map to be registered and the reference fusion feature map based on cosine similarity.
[0027] The candidate matching point selection unit is used to select the matching position with the highest similarity from the fusion feature map to be registered as a candidate matching point for each position in the reference fusion feature map.
[0028] The filtering unit is used to filter the candidate matching points using a mutual nearest neighbor strategy, retaining only the matching point pairs that satisfy the bidirectional nearest neighbor condition, and obtaining the corresponding point pairs of the fusion feature map to be registered and the reference fusion feature map.
[0029] The estimation unit is used to perform affine transformation estimation based on the corresponding point pairs of the feature map to be registered and the reference fused feature map using the random sampling consensus algorithm to obtain the optimal affine transformation matrix;
[0030] The spatial transformation unit is used to perform spatial transformation on the hyperspectral image to be registered according to the optimal affine transformation matrix to obtain the registered image.
[0031] In each iteration, the estimation unit randomly selects corresponding point pairs of the feature map to be registered and the reference fused feature map to solve the affine model parameters; the matching points are screened for interior points based on the reprojection error, and when the reprojection error is less than the threshold, they are determined to be interior points; finally, the affine model with the most interior points is selected, and the parameters are optimized by the least squares method to obtain the optimal affine transformation matrix.
[0032] The loss function of the registration model is a bi-complementary loss function, expressed as: ,in, The loss function for the registration model, To compare the learning InfoNCE loss, it is represented as: , For the reference image, the first 1 eigenvector To match the feature vectors of the real positive samples corresponding to the features of the reference image, The first in the candidate matching feature set The candidate matching feature set includes 1 feature vector, comprising true matching features and non-matching features. For temperature coefficient, For similarity calculation, Number of candidate matching points; The regularization term is represented as: , is the Frobenius norm of the spectral projection matrix; is the regularization coefficient.
[0033] The technical solution adopted by this invention to solve its technical problem is: to provide a hyperspectral image registration device, comprising:
[0034] The acquisition module is used to acquire the hyperspectral image to be registered and the reference image;
[0035] A registration module is used to input the hyperspectral image to be registered and the reference image pair into a registration model to obtain a registered image; wherein, the registration model includes:
[0036] A spectral adaptive embedding module is used to transfer the hyperspectral image to be registered and the reference image from a learnable spectral projection layer, respectively. The spectral channels are compressed into a three-dimensional RGB-compatible characterization to obtain the image to be registered after projection and the reference image after projection.
[0037] The Dinov3 VIT encoder is used to extract features from the projected image to be registered and the reference projected image respectively, to obtain multi-layered Token features to be registered and Token features to be referenced.
[0038] The multi-layer feature aggregation module is used to perform weighted fusion on the multi-layer Token features to be registered and the reference Token features respectively to obtain the fused feature map to be registered and the reference fused feature map.
[0039] The dense feature matching module is used to find the corresponding point pairs between the feature map to be registered and the reference fused feature map, and to obtain the optimal affine transformation matrix based on the corresponding point pairs. The hyperspectral image to be registered is then spatially transformed according to the optimal affine transformation matrix to obtain the registered image.
[0040] The technical solution adopted by the present invention to solve its technical problem is: to provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-mentioned hyperspectral image registration method.
[0041] The technical solution adopted by the present invention to solve its technical problem is: to provide a computer-readable storage medium on which a computer program is stored, wherein the computer program, when executed by a processor, implements the steps of the above-mentioned hyperspectral image registration method.
[0042] Beneficial effects
[0043] By employing the aforementioned technical solutions, this invention offers the following advantages and positive effects compared to existing technologies: Firstly, it adaptively compresses high-dimensional hyperspectral data into a three-dimensional RGB-compatible representation using a spectral adaptive embedding module. This directly adapts to the Dino v3 architecture, effectively preserving discriminative spectral information and resolving the issues of spectral feature loss and incompatibility with RGB models caused by traditional dimensionality reduction methods. Secondly, it extracts multi-layer token features using a Dinov3 VIT encoder, combining this with weighted fusion via a multi-layer feature aggregation module. This simultaneously integrates low-level geometric details and high-level semantic information, significantly improving the robustness and consistency of features under spectral distortion and complex scenarios. Thirdly, it utilizes a dense feature matching module to accurately locate corresponding point pairs and robustly solve for the optimal affine transformation matrix, eliminating the need for manually labeled matching tags and achieving end-to-end registration in a fully self-supervised manner. Finally, this invention significantly outperforms traditional methods and existing deep learning methods in terms of registration accuracy, inlier rate, and generalization ability. It effectively addresses the geometric misalignment problem of multi-temporal and cross-sensor hyperspectral images, reduces data labeling costs, and is suitable for practical engineering scenarios such as remote sensing monitoring and precision agriculture. Attached Figure Description
[0044] Figure 1 This is a flowchart of the hyperspectral image registration method according to the first embodiment of the present invention;
[0045] Figure 2 This is a schematic diagram of the registration model in the first embodiment of the present invention;
[0046] Figure 3 This is a comparison chart of the registration effect of the present invention on different datasets;
[0047] Figure 4 This is a comparison of the registration results of the present invention on three real multi-temporal datasets in HPC4RS. Detailed Implementation
[0048] The present invention will be further illustrated below with reference to specific embodiments. It should be understood that these embodiments are for illustrative purposes only and are not intended to limit the scope of the invention. Furthermore, it should be understood that after reading the teachings of this invention, those skilled in the art can make various alterations or modifications to the invention, and these equivalent forms also fall within the scope defined by the appended claims.
[0049] The first embodiment of the present invention relates to a hyperspectral image registration method, such as... Figure 1 As shown, it includes the following steps:
[0050] Step 1: Obtain the hyperspectral image to be registered. and reference image ,in, Indicates spatial dimensions. Indicates the number of spectral bands;
[0051] Step 2, the hyperspectral image to be registered and reference image The input is fed into the registration model to obtain the registered image. .
[0052] like Figure 2 As shown, the registration model includes:
[0053] A spectral adaptive embedding module is used to transfer the hyperspectral image to be registered and the reference image from a learnable spectral projection layer, respectively. The spectral channels are compressed into a three-dimensional RGB-compatible representation, resulting in the image to be registered after projection and the reference image after projection.
[0054] In this embodiment, the spectral adaptive embedding module respectively selects the hyperspectral images to be registered. and reference image Channel-level linear mapping is performed on the hyperspectral data, utilizing a learnable spectral projection matrix. and bias terms High-dimensional spectral data is mapped to a three-channel latent space to obtain the image to be registered and projected. Image embedded in reference projection image The operation of this spectral projection layer performs differentiable spectral compression, transforming the original... The spectral information is compressed into three dimensions while retaining the most discriminative spectral information, making it fully compatible with the RGB pre-trained Dinov3 VIT encoder.
[0055] To ensure the optimization process has good initial conditions, the spectral projection matrix in this embodiment... Initialization was performed using Principal Component Analysis (PCA). Specifically, a set of pixel spectral vectors was sampled from the hyperspectral images in the training set. Eigenvalue decomposition is performed on the covariance matrix, and the first three eigenvectors are selected. As the principal component direction, the initial projection matrix is: This initialization strategy ensures that the initial projection captures the main spectral variance in the training data, allowing the network to start optimization from a good starting point, thereby significantly accelerating training convergence and improving training stability. Unlike traditional PCA dimensionality reduction, the learnable projection matrix in this implementation allows the network to adaptively adjust the projection direction during training, making it specifically optimized for image registration tasks, rather than simply preserving the direction of maximum variance.
[0056] The Dinov3 VIT encoder is used to extract features from the projected image to be registered and the reference projected image respectively, to obtain multi-layered Token features to be registered and Token features to be referenced.
[0057] The Dinov3 VIT encoder in this embodiment includes:
[0058] The division unit is used to divide the projected image to be registered into separate units. and reference projection diagram The image is divided into non-overlapping, fixed-size image blocks. In this embodiment, the image to be registered and projected is... and reference projection diagram The image is divided into non-overlapping patches according to the standard Vision Transformer architecture. In this implementation, the patch size is [missing information]. Each image patch can be represented as .
[0059] The transformation unit performs image block embedding and tokenization on the segmented image blocks to obtain a token sequence to be registered and a reference token sequence. This unit processes each image block... Flattened into a one-dimensional vector and projected through a linear projection matrix Mapped to The dimensional token embedding space, namely: In the formula, It is a learnable image patch embedding matrix. This is a location encoding used to preserve the spatial location information of each block. The generated token sequence is denoted as: In the formula, This represents the total number of tokens. This implementation uses the ViT-Base / 14 configuration of the Dinov3 VIT encoder, where... .
[0060] Multi-layer coding unit, used for the token sequence to be registered and reference token sequence Feature extraction is performed to obtain multi-layered features for the token to be registered and reference token features. In this embodiment, a 12-layer Dinov3 ViT-Base / 14 encoding layer is used to encode the token sequence to be registered. and reference token sequence The input consists of multiple coding layer units, each of which employs a self-attention mechanism and a feedforward network, and includes residual connections and layer normalization. ,in, Representation layer normalization, For the first Layer output token embedding, As an intermediate quantity, This is a multi-head self-attention mechanism. It is a feedforward network.
[0061] The multi-layer feature aggregation module is used to perform weighted fusion on the multi-layer Token features to be registered and the reference Token features respectively to obtain the fused feature map to be registered and the reference fused feature map.
[0062] To simultaneously utilize shallow geometric details and deep semantic information, the multi-layer feature aggregation module in this embodiment performs weighted fusion of features from multiple selected encoder depths. The resulting fused feature map can be represented as follows: In the formula, For the selected set of layer indices, For the first Token embedding in layer encoder The learnable aggregate weights are normalized using the Softmax function, i.e.: In the formula, These are unconstrained scalar parameters. Select layer. Capture approximately network depths respectively , This, along with the features of the final layer, enables the complementary fusion of low-level texture, mid-level semantics, and high-level abstract features. The fused token sequence is then reshaped into a spatial feature map, thus yielding the fused feature map to be registered. and reference fused feature map This multi-layer aggregation strategy can significantly improve the stability and geometric consistency of features, effectively addressing spectral variations and illumination changes.
[0063] The dense feature matching module is used to find the feature map to be registered and fused. and reference fused feature map The corresponding point pairs are obtained, and the optimal affine transformation matrix is obtained based on the corresponding point pairs. The hyperspectral image to be registered is then spatially transformed according to the optimal affine transformation matrix to obtain the registered image.
[0064] The dense feature matching module in this embodiment includes:
[0065] The similarity calculation unit is used to merge the feature maps to be registered. and reference fused feature map The features are flattened into sequence representations, and the similarity matrix between the feature map to be registered and fused and the reference fused feature map is calculated based on cosine similarity. ,in, These represent the spatial locations in the two images. The similarity matrix is calculated as follows: , and These represent the reference fusion feature maps. and the feature map to be registered In position and place 3D eigenvectors.
[0066] Candidate matching point selection unit, used for the reference fused feature map Each position in the fusion feature map to be registered The matching position with the highest similarity is selected as the candidate matching point, that is: .
[0067] The filtering unit is used to filter the candidate matching points using a mutual nearest neighbor strategy, retaining only matching point pairs that satisfy the bidirectional nearest neighbor condition, thus obtaining the corresponding point pairs of the feature map to be registered and fused and the reference fused feature map. Specifically, to eliminate the problems of ambiguous matching and one-to-many matching, this embodiment uses a mutual nearest neighbor strategy for matching screening, retaining a match as a reliable match only when the matching satisfies the bidirectional nearest neighbor constraint, that is: In the formula, and They represent and The nearest neighbor operator in the feature space. This will produce a reliable set of corresponding point pairs. ,in, and These are the homogeneous coordinates of the matching points in the two images, i.e., the corresponding point pairs in the feature map to be registered and fused and the reference fused feature map. The mutual nearest neighbor strategy in this implementation effectively eliminates false matches caused by repetitive textures and spectral ambiguity, increasing the inlier rate from 34.2% to 67.8%.
[0068] This implementation uses cosine similarity matching combined with nearest neighbor filtering, which can effectively establish dense corresponding point pairs between two hyperspectral images, eliminate erroneous matching caused by repeated textures and spectral ambiguity, and provide a high-quality correspondence basis for subsequent geometric transformation estimation.
[0069] An estimation unit is used to perform affine transformation estimation based on the corresponding point pairs of the feature map to be registered and the reference fused feature map using a random sampling consensus algorithm to obtain the optimal affine transformation matrix. In each iteration, the estimation unit randomly selects the corresponding point pairs of the feature map to be registered and the reference fused feature map to solve for the affine model parameters; it filters the matching points for interior points based on the reprojection error, determining that an interior point is a point with a reprojection error less than a threshold; finally, it selects the affine model with the most interior points and optimizes the parameters using the least squares method to obtain the optimal affine transformation matrix. Specifically, the affine transformation in this embodiment includes 6 parameters, described as follows: ,in, For rotation and scaling components, and For the translation component, the Random Sample Consensus Algorithm (RANSAC) is used to robustly estimate the affine transformation parameters. In each RANSAC iteration, three pairs of minimum sample points are randomly selected from the set of matching points. The candidate affine matrix is calculated using the least squares method, and the reprojection error is calculated for all matching points, i.e.: In this embodiment, The threshold for determining interior points is set; points meeting this threshold are considered interior points. The maximum number of iterations is preset to 5000. The number of interior points is counted; if the current model's interior point count exceeds the historical best, the optimal model is updated. After completing the RANSAC iterations, the model with the largest number of interior points is selected as the initial estimate, and least-squares refinement is performed based on all interior points, i.e.: ,in, For the set of interior point indices, This is the optimal affine transformation matrix.
[0070] Spatial transformation unit, used to perform the optimal affine transformation matrix. The hyperspectral image to be registered Perform spatial transformation to obtain the registered image. ,Right now: .
[0071] The registration model in this embodiment is trained on a single hyperspectral image. Apply randomized affine transformation Generate registered images ,Right now: hyperspectral images and registered images This creates pseudo-registered image pairs. The loss function of the registration model during training... Using a two-term complementary loss function, it can be expressed as: .
[0072] in, To learn the InfoNCE loss through contrast, it encourages each feature to be most similar to its true corresponding feature, expressed as: , For the reference image, the first 1 eigenvector To match the feature vectors of the real positive samples corresponding to the features of the reference image, The first in the candidate matching feature set The candidate matching feature set includes 1 feature vector, comprising true matching features and non-matching features. For temperature coefficient, For similarity calculation, Number of candidate matching points. This is a regularization term used for the spectral projection matrix. To constrain it, the Frobenius norm is used to limit its size and prevent overfitting, expressed as: ,in, Spectral projection matrix The Frobenius norm, This is the regularization coefficient, typically... .
[0073] This implementation method was experimentally verified on six publicly available hyperspectral image datasets, divided into two scenarios: synthetic affine registration and real multi-temporal registration. The synthetic affine registration datasets include: (1) the Indian Pines dataset, acquired by the AVIRIS sensor, with image size of (1) Pixels, containing 200 spectral bands; (2) University of Pavia dataset, acquired by ROSIS-3 sensor, image size Pixels, containing 103 spectral bands; (3) Salinas Valley dataset, acquired by AVIRIS sensor, image size The dataset contains 204 spectral bands. Real-world multi-temporal registration datasets include: Santa Barbara dataset (AVIRIS, 224 bands), Bay Area dataset (AVIRIS, 224 bands), and Hermiston dataset (HYPERION, 242 bands).
[0074] This implementation method is based on the PyTorch framework. The Dinov3 ViT-Base / 14 backbone network loads publicly available pre-trained weights, and all learnable parameters are optimized using the AdamW optimizer with an initial learning rate of [value missing]. The weight decays to Cosine annealing learning rate scheduling, training for 100 epochs, batch size 8, temperature parameter The regularization coefficient is RANSAC reprojection error threshold The maximum number of iterations is 5000.
[0075] The following uses Indian Pines as an example to further illustrate this implementation method. The specific calculation steps of the embodiment are as follows:
[0076] Step 1: Organize the hyperspectral images of Indian Pines according to... The dataset is divided into training and testing sets, with 70% used for self-supervised training, 10% for validation, and 20% for testing. Images in the training set are randomly cropped to... Pixels are then randomly discarded (10% discard rate) and additive Gaussian noise (standard deviation) is applied sequentially. ) and random brightness scaling (factor) Data augmentation operations such as data augmentation; during testing, keep the original image size unchanged or uniformly crop it to [size missing]. Pixel;
[0077] Step 2: Obtain the hyperspectral image pair to be registered. The data is then processed through a spectral adaptive embedding module for channel-level linear mapping. First, a set of pixel spectral vectors is sampled from the training set. Calculate the covariance matrix and perform eigenvalue decomposition, then select the first three eigenvectors. As the spectral projection matrix The initial values, where , This represents the number of spectral bands in the Indian Pines dataset. (Using the formula...) Map the original 200-band hyperspectral image to a three-channel embedding space. ;
[0078] Step 3: Embed the image According to patch size The image is divided into non-overlapping patches, and each patch is flattened and then embedded using a learnable embedding matrix. Mapped to a 768-dimensional token, with added learnable positional encoding. Generate a token sequence ;
[0079] Step 4: Input the token sequence into the Dinov3 ViT-Base / 14 encoder, and obtain multi-layer token embeddings after 12 layers of Transformer encoding. Select layer set Token embedding, through learnable weights Calculate aggregate weights , fusion And reshaped into a fused feature map ;
[0080] Step 5: Process the fused feature map Calculate the cosine similarity matrix For reference image Each position Search for the optimal match The system employs a mutual nearest neighbor strategy to filter reliable matching pairs, retaining only those that meet the criteria. and Matching pairs;
[0081] Step 6: Based on the filtered set of matching points, estimate the affine transformation parameters using the RANSAC algorithm. Set the maximum number of iterations to 5000 and the interior point determination threshold... In each iteration, three pairs of matching points are randomly selected, and candidate affine matrices are calculated using the least squares method, with the number of interior points counted. After all iterations are complete, the model with the most interior points is selected, and all interior points are refined using the least squares method to obtain the optimal affine transformation matrix. Ultimately, through the formula Output the registered image;
[0082] Step 7: Perform end-to-end optimization of the entire registration network using a self-supervised training strategy. During training, a randomized affine transformation is applied to each batch of input images. The parameter settings are as follows: rotation angle Scaling ratio Translation amount Pixels, generating pseudo-registration image pairs The AdamW optimizer is used to provide... The weight decays to Cosine annealing learning rate scheduling, training for 100 epochs, batch size 8. Loss function is... ,in, To compare the learning of InfoNCE loss (temperature coefficient) ), For regularization terms ( );
[0083] Step 8: Perform registration evaluation on the test set images. Input the image pairs to be registered into the trained network model, and obtain the affine transformation matrix through spectral embedding, token encoding, multi-layer aggregation, dense matching, and RANSAC estimation. Output registered image The registration accuracy was quantitatively evaluated using mean corner error (MCE), root mean square error (RMSE), success rate (SR@3, SR@5), structural similarity index (SSIM), and peak signal-to-noise ratio (PSNR).
[0084] To verify the superiority of the proposed method over existing technologies, comparative experiments were conducted with representative baseline methods in two scenarios: synthetic affine registration and real multi-temporal registration. Table 1 presents the quantitative results of each method on three synthetic datasets; Table 2 presents the quantitative results of each method on three real multi-temporal datasets. In the tables, smaller MCE and RMSE values indicate smaller registration errors, while larger SR@3 and SR@5, SSIM and PSNR values indicate better registration quality; underlined values indicate suboptimal results for each metric (except for the proposed method).
[0085] Figure 3 The registration results of the method of this embodiment on a synthetic dataset are visualized:
[0086] On the Indian Pine (IP) dataset, the gray reference image and the gray image to be registered are connected by red matching lines, demonstrating the dense correspondence established by the method of this embodiment. It can be seen that the red matching lines accurately connect the pixels in the reference image with the corresponding pixels in the image to be registered. The lines are evenly distributed and accurately pass through the boundaries of ground features, indicating that the method of this embodiment can effectively capture geometric transformation relationships and achieve accurate registration.
[0087] On the University of Pavia (UP) dataset, registration is challenging due to its complex urban scenes and diverse land cover categories. The red matching lines in the figure accurately connect corresponding points at land cover boundaries, demonstrating that the method in this implementation effectively fuses low-level geometric details and high-level semantic information through a multi-layer feature aggregation module, maintaining high registration accuracy even in complex scenes.
[0088] The Salinas Valley (SS) dataset, with its repetitive agricultural texture features, presents a challenge for feature matching algorithms. The red matching lines in the figure are evenly distributed with no obvious false matches, indicating that the method in this implementation preserves discriminative spectral information through a learnable spectral projection module and, combined with a nearest neighbor filtering strategy, effectively distinguishes ambiguous matches caused by repetitive textures.
[0089] Table 1. Quantitative results of the experiment on synthetic datasets
[0090]
[0091] As shown in Table 1, the method proposed in this embodiment achieves optimal results on all three synthetic datasets and four metrics, with each value indicated in bold. The suboptimal method is Global-Local (underlined in the table), and RAMMR is also competitive in some scenarios. A detailed analysis follows:
[0092] Compared to classical feature methods, the Scale Invariant Feature Transform (SIFT) algorithm relies on the first principal component for dimensionality reduction, resulting in significant loss of spectral discrimination information. On the University of Pavia (UP) dataset, the SR@3 is only 58.0%. The SuperPoint feature point detection and SuperGlue graph matching algorithm (SuperPoint+SuperGlue) is reduced to three channels by PCA before input. On the Indian Pine (IP) dataset, the MCE reaches 3.12 pixels, and the SR@3 is only 51.0%, indicating that the general keypoint-descriptor method is prone to mismatches when the hyperspectral domain is not fully modeled. Compared to dedicated hyperspectral methods, the Robust Adaptive Multimodal Registration (RAMMR) method achieves an SR@5 score of 81.5% on the Salinas Valley (SS) dataset, but its MCE and RMSE are still higher than the method described in this invention, indicating that relying solely on geometric consistency cannot compensate for insufficient spectral domain representation. The registration method based on Dinov2 feature extraction and nearest neighbor matching (Dinov2+MNN) has an MCE of 2.61 pixels and an SR@3 score of 60.5% on the Indian Pine (IP) dataset, also showing lower performance than the method described in this invention. Compared to the Global-Local joint feature registration method, which has an MCE of 1.95 pixels and an SR@3 score of 77.5% on the Indian Pine (IP) dataset, the method described in this invention reduces the MCE to 1.52 pixels and improves the SR@3 score to 90.0%, demonstrating a significant advantage in the stringent SR@3 metric. Furthermore, in cross-dataset testing, the proposed method achieved an MCE of 1.23 pixels and an SR@5 of 93.0% on the Salinas Valley (SS) dataset, and an SR@3 of 92.5% on the University of Pavia (UP) dataset, representing a 17.5 percentage point improvement over the Global-Local 75.0%. This demonstrates that the proposed method exhibits good robustness and consistency under complex scenes and spectral variations.
[0093] Furthermore, Figure 4 The registration results of the method of this embodiment on a real multi-temporal dataset are visualized.
[0094] On the Santa Barbara (BB) dataset, dense red matching lines connect the gray reference image and the image to be registered. These red lines accurately cross the boundaries of ground features, demonstrating that the method of this embodiment can effectively handle spectral differences and geometric shifts across time periods. This dataset exhibits seasonal vegetation changes and illumination variations; the spectral adaptive embedding module of this invention preserves feature representations robust to spectral variations through learnable projections.
[0095] On the Bay Area (BA) dataset, the red matching lines cover the coastal urban area and the boundary between water bodies, with a uniform and accurate distribution. This dataset contains the boundary between water bodies and buildings, which is prone to geometric distortion and radiation differences. The multi-layer feature aggregation strategy of the method in this implementation integrates edge details and semantic information, and performs stably at the water-land boundary.
[0096] On the Hermiston (HM) dataset, the red matching lines span image pairs acquired in different years. This dataset was acquired using the HYPERION sensor, and the cross-sensor differences with the AVIRIS sensor used for training present the greatest challenge. The fact that the red matching lines in the figure still accurately establish correspondences indicates that the method of this implementation has strong cross-sensor generalization ability.
[0097] Table 2. Quantitative results of the experiment on real datasets
[0098]
[0099] Since real data lacks true values for registration, SSIM and PSNR are used as surrogate indicators for registration quality. The larger the value, the closer the image to be registered and the reference image are in terms of structural similarity and signal-to-noise ratio after registration.
[0100] As shown in Table 2, the methods in this implementation are all optimal. A detailed analysis follows:
[0101] Experimental results on real-world multi-temporal datasets demonstrate that the proposed method achieves optimal performance across various scenarios. In both BA and BB scenarios, the proposed method achieves an SSIM of 0.8956 and a PSNR of 29.34 dB on BA, significantly improving upon the second-best Global-Local method (SSIM 0.8312, PSNR 25.78 dB), with a PSNR improvement of approximately 3.56 dB. On BB, the proposed method achieves an SSIM of 0.9123 and a PSNR of 30.56 dB, with an SSIM exceeding 0.91, indicating excellent structural consistency in the registered images. In the HM cross-sensor scenario, due to resolution and sensor differences between HYPERION and AVIRIS data, the overall performance of all methods declines. However, the proposed method still achieves the highest SSIM (0.7478) and PSNR (23.45 dB) among all methods, demonstrating its cross-sensor generalization capability. Compared to baseline deep learning methods, SuperPoint+SuperGlue achieved the lowest SSIM and PSNR in all three scenarios (e.g., BA at only 0.7212). While Dinov2+MNN showed some improvement, it still lagged behind the method described in this invention, demonstrating the advantages of learnable spectral projection and Dinov3 features. Further comparison with RAMMR and Global-Local methods revealed that RAMMR achieved an SSIM of 0.8264 in the BB scenario, while Global-Local performed second best in multiple metrics including BA and HM. This indicates that under realistic multi-temporal conditions without ground truth evaluation, the method described in this invention can consistently improve the quality of registered images.
[0102] To further verify the effectiveness of the improvements in each part of this embodiment, an ablation test was conducted on DINO (reference model), and the results are shown in Table 3.
[0103] Table 3. Evaluation metrics results of ablation experiments registered on the Indian Pine (IP) and University of Pavia (UP) datasets.
[0104]
[0105] The complete model proposed in this implementation achieves state-of-the-art performance on the Indian Pines dataset. Compared to the baseline configuration (PCA projection + Dinov3 single layer), the complete model reduces MCE by 0.86 pixels (from 2.38 to 1.52) and improves SR@3 by 13.8 percentage points (from 76.2% to 90.0%). This demonstrates that the synergistic effect of learnable spectral projection and multi-layer feature aggregation can significantly improve registration performance. On the University of Pavia dataset, the complete model also achieves state-of-the-art performance, with an MCE of 1.47 pixels and an SR@3 of 92.5%. Compared to the baseline configuration, the MCE is reduced by 0.77 pixels, and the SR@3 is improved by 11.5 percentage points. Ablation experiments validate the contributions of each module: learnable spectral projection significantly improves performance compared to fixed PCA projection, multi-layer feature aggregation outperforms single-layer features, and end-to-end fine-tuning further optimizes the registration effect.
[0106] A second embodiment of the present invention relates to a hyperspectral image registration apparatus, comprising:
[0107] The acquisition module is used to acquire the hyperspectral image to be registered and the reference image;
[0108] A registration module is used to input the hyperspectral image to be registered and the reference image pair into a registration model to obtain a registered image; wherein, the registration model includes:
[0109] A spectral adaptive embedding module is used to transfer the hyperspectral image to be registered and the reference image from a learnable spectral projection layer, respectively. The spectral channels are compressed into a three-dimensional RGB-compatible characterization to obtain the image to be registered after projection and the reference image after projection.
[0110] The Dinov3 VIT encoder is used to extract features from the projected image to be registered and the reference projected image respectively, to obtain multi-layered Token features to be registered and Token features to be referenced.
[0111] The multi-layer feature aggregation module is used to perform weighted fusion on the multi-layer Token features to be registered and the reference Token features respectively to obtain the fused feature map to be registered and the reference fused feature map.
[0112] The dense feature matching module is used to find the corresponding point pairs between the feature map to be registered and the reference fused feature map, and to obtain the optimal affine transformation matrix based on the corresponding point pairs. The hyperspectral image to be registered is then spatially transformed according to the optimal affine transformation matrix to obtain the registered image.
[0113] The learnable spectral projection layer performs channel-level linear mapping on the input hyperspectral image through a learnable spectral projection matrix and bias terms to obtain a three-channel embedded representation; wherein, the spectral projection matrix is initialized through principal component analysis, and the first three principal components are selected as the initial projection directions.
[0114] The Dinov3 VIT encoder includes:
[0115] The partitioning unit is used to divide the image to be registered and the reference image into non-overlapping image blocks of fixed size, respectively.
[0116] The conversion unit is used to perform image block embedding and tokenization processing on the segmented image blocks to obtain the token sequence to be registered and the reference token sequence.
[0117] Multi-layer coding units are used to extract features from the token sequence to be registered and the reference token sequence, resulting in multi-layer token features to be registered and reference token features.
[0118] The multi-layer feature aggregation module includes:
[0119] The selection unit is used to select a preset number of token features from the multi-layered token features to be registered and the reference token features, respectively.
[0120] The fusion unit is used to perform weighted fusion of the selected Token features at a preset number of layers using learnable weights to obtain a fusion feature map to be registered and a reference fusion feature map.
[0121] The dense feature matching module includes:
[0122] The similarity calculation unit is used to flatten the fusion feature map to be registered and the reference fusion feature map into sequence representations respectively, and calculate the similarity matrix between the fusion feature map to be registered and the reference fusion feature map based on cosine similarity.
[0123] The candidate matching point selection unit is used to select the matching position with the highest similarity from the fusion feature map to be registered as a candidate matching point for each position in the reference fusion feature map.
[0124] The filtering unit is used to filter the candidate matching points using a mutual nearest neighbor strategy, retaining only the matching point pairs that satisfy the bidirectional nearest neighbor condition, and obtaining the corresponding point pairs of the fusion feature map to be registered and the reference fusion feature map.
[0125] The estimation unit is used to perform affine transformation estimation based on the corresponding point pairs of the feature map to be registered and the reference fused feature map using the random sampling consensus algorithm to obtain the optimal affine transformation matrix;
[0126] The spatial transformation unit is used to perform spatial transformation on the hyperspectral image to be registered according to the optimal affine transformation matrix to obtain the registered image.
[0127] In each iteration, the estimation unit randomly selects corresponding point pairs of the feature map to be registered and the reference fused feature map to solve the affine model parameters; the matching points are screened for interior points based on the reprojection error, and when the reprojection error is less than the threshold, they are determined to be interior points; finally, the affine model with the most interior points is selected, and the parameters are optimized by the least squares method to obtain the optimal affine transformation matrix.
[0128] The loss function of the registration model is a bi-complementary loss function, expressed as: ,in, The loss function for the registration model, To compare the learning InfoNCE loss, it is represented as: , For the reference image, the first 1 eigenvector To match the feature vectors of the real positive samples corresponding to the features of the reference image, The first in the candidate matching feature set The candidate matching feature set includes 1 feature vector, comprising true matching features and non-matching features. For temperature coefficient, For similarity calculation, Number of candidate matching points; The regularization term is represented as: , is the Frobenius norm of the spectral projection matrix; is the regularization coefficient.
[0129] The third embodiment of the present invention relates to an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the hyperspectral image registration method of the first embodiment.
[0130] The fourth embodiment of the present invention relates to a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the hyperspectral image registration method of the first embodiment.
[0131] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.
[0132] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0133] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction methods implemented in a process. Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0134] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0135] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A hyperspectral image registration method, characterized in that, Includes the following steps: Acquire the hyperspectral image to be registered and the reference image; The hyperspectral image to be registered and the reference image are input into the registration model to obtain the registered image; wherein, the registration model includes: A spectral adaptive embedding module is used to transfer the hyperspectral image to be registered and the reference image from a learnable spectral projection layer, respectively. The spectral channels are compressed into a three-dimensional RGB-compatible characterization to obtain the image to be registered after projection and the reference image after projection. The Dinov3 VIT encoder is used to extract features from the projected image to be registered and the reference projected image respectively, to obtain multi-layered Token features to be registered and Token features to be referenced. The multi-layer feature aggregation module is used to perform weighted fusion on the multi-layer Token features to be registered and the reference Token features respectively to obtain the fused feature map to be registered and the reference fused feature map. A dense feature matching module is used to find corresponding point pairs between the feature map to be registered and the reference fused feature map, obtain the optimal affine transformation matrix based on the corresponding point pairs, and perform spatial transformation on the hyperspectral image to be registered according to the optimal affine transformation matrix to obtain the registered image; the dense feature matching module includes: The similarity calculation unit is used to flatten the fusion feature map to be registered and the reference fusion feature map into sequence representations respectively, and calculate the similarity matrix between the fusion feature map to be registered and the reference fusion feature map based on cosine similarity. The candidate matching point selection unit is used to select the matching position with the highest similarity from the fusion feature map to be registered as a candidate matching point for each position in the reference fusion feature map. The filtering unit is used to filter the candidate matching points using a mutual nearest neighbor strategy, retaining only the matching point pairs that satisfy the bidirectional nearest neighbor condition, and obtaining the corresponding point pairs of the fusion feature map to be registered and the reference fusion feature map. The estimation unit is used to perform affine transformation estimation based on the corresponding point pairs of the feature map to be registered and the reference fused feature map using the random sampling consensus algorithm to obtain the optimal affine transformation matrix; The spatial transformation unit is used to perform spatial transformation on the hyperspectral image to be registered according to the optimal affine transformation matrix to obtain the registered image.
2. The hyperspectral image registration method according to claim 1, characterized in that, The learnable spectral projection layer performs channel-level linear mapping on the input hyperspectral image through a learnable spectral projection matrix and bias terms to obtain a three-channel embedded representation; wherein, the spectral projection matrix is initialized through principal component analysis, and the first three principal components are selected as the initial projection directions.
3. The hyperspectral image registration method according to claim 1, characterized in that, The Dinov3 VIT encoder includes: The partitioning unit is used to divide the image to be registered and the reference image into non-overlapping image blocks of fixed size, respectively. The conversion unit is used to perform image block embedding and tokenization processing on the segmented image blocks to obtain the token sequence to be registered and the reference token sequence. Multi-layer coding units are used to extract features from the token sequence to be registered and the reference token sequence, resulting in multi-layer token features to be registered and reference token features.
4. The hyperspectral image registration method according to claim 1, characterized in that, The multi-layer feature aggregation module includes: The selection unit is used to select a preset number of token features from the multi-layered token features to be registered and the reference token features, respectively. The fusion unit is used to perform weighted fusion of the selected Token features at a preset number of layers using learnable weights to obtain a fusion feature map to be registered and a reference fusion feature map.
5. The hyperspectral image registration method according to claim 1, characterized in that, The estimation unit randomly selects corresponding point pairs of the feature map to be registered and the reference fused feature map during the iteration to solve for the affine model parameters; The matching points are screened for interior points based on the reprojection error. When the reprojection error is less than the threshold, it is determined to be an interior point. Finally, the affine model with the most interior points is selected, and the parameters are optimized by the least squares method to obtain the optimal affine transformation matrix.
6. The hyperspectral image registration method according to claim 1, characterized in that, The loss function of the registration model is a bi-complementary loss function, expressed as: ,in, The loss function for the registration model, To compare the learning InfoNCE loss, it is represented as: , For the reference image, the first 1 eigenvector To match the feature vectors of the real positive samples corresponding to the features of the reference image, The first in the candidate matching feature set The candidate matching feature set includes 1 feature vector, comprising true matching features and non-matching features. For temperature coefficient, For similarity calculation, Number of candidate matching points; The regularization term is represented as: , is the Frobenius norm of the spectral projection matrix; is the regularization coefficient.
7. A hyperspectral image registration device, characterized in that, include: The acquisition module is used to acquire the hyperspectral image to be registered and the reference image; A registration module is used to input the hyperspectral image to be registered and the reference image pair into a registration model to obtain a registered image; wherein, the registration model includes: A spectral adaptive embedding module is used to transfer the hyperspectral image to be registered and the reference image from a learnable spectral projection layer, respectively. The spectral channels are compressed into a three-dimensional RGB-compatible characterization to obtain the image to be registered after projection and the reference image after projection. The Dinov3 VIT encoder is used to extract features from the projected image to be registered and the reference projected image respectively, to obtain multi-layered Token features to be registered and Token features to be referenced. The multi-layer feature aggregation module is used to perform weighted fusion on the multi-layer Token features to be registered and the reference Token features respectively to obtain the fused feature map to be registered and the reference fused feature map. A dense feature matching module is used to find corresponding point pairs between the feature map to be registered and the reference fused feature map, obtain the optimal affine transformation matrix based on the corresponding point pairs, and perform spatial transformation on the hyperspectral image to be registered according to the optimal affine transformation matrix to obtain the registered image; the dense feature matching module includes: The similarity calculation unit is used to flatten the fusion feature map to be registered and the reference fusion feature map into sequence representations respectively, and calculate the similarity matrix between the fusion feature map to be registered and the reference fusion feature map based on cosine similarity. The candidate matching point selection unit is used to select the matching position with the highest similarity from the fusion feature map to be registered as a candidate matching point for each position in the reference fusion feature map. The filtering unit is used to filter the candidate matching points using a mutual nearest neighbor strategy, retaining only the matching point pairs that satisfy the bidirectional nearest neighbor condition, and obtaining the corresponding point pairs of the fusion feature map to be registered and the reference fusion feature map. The estimation unit is used to perform affine transformation estimation based on the corresponding point pairs of the feature map to be registered and the reference fused feature map using the random sampling consensus algorithm to obtain the optimal affine transformation matrix; The spatial transformation unit is used to perform spatial transformation on the hyperspectral image to be registered according to the optimal affine transformation matrix to obtain the registered image.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the hyperspectral image registration method as described in any one of claims 1-6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the hyperspectral image registration method as described in any one of claims 1-6.
Citation Information
Patent Citations
Hyperspectral image classification model
CN120580509A
Multi-modal image registration method and fusion method
CN121746744A
