Hyperspectral data dimension reduction method and device reserving spatial information, terminal and medium
By incorporating spatial structure preservation and spectral structure similarity optimization into hyperspectral image dimensionality reduction, the problem of spatial information loss in existing methods is solved, achieving better dimensionality reduction results and ground feature detection accuracy.
Patent Information
- Application Number
- CN202510631275.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-16
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2045-05-16
AI Technical Summary
Existing dimensionality reduction methods for hyperspectral image data neglect spatial structure information during the dimensionality reduction process, leading to information redundancy, the curse of dimensionality, and difficulties in ground feature detection, especially when ground feature boundaries are unclear or types are complex, which affects classification accuracy.
By incorporating the degree of spatial structure preservation as an optimization term, performing minimum noise separation transformation, and selecting bands based on spectral structure similarity, a hyperspectral data dimensionality reduction method that preserves spatial information is designed. This method includes using signal-to-noise ratio and structural similarity index as optimization objectives, performing principal component transformation and band selection.
Spatial information is effectively preserved during dimensionality reduction, improving data processing efficiency and accuracy, and ensuring the precision of ground feature detection and the effectiveness of the classifier.
Smart Images

Figure CN120656011B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and in particular to a method, apparatus, terminal, and medium for dimensionality reduction of hyperspectral data while preserving spatial information. Background Technology
[0002] Hyperspectral images are acquired at close range by satellite / airborne equipment or ground-based handheld devices. They combine one-dimensional spectral information reflecting the essential characteristics of various land features in a target area with two-dimensional spatial structure information of the entire region, providing support for applications such as fine-grained land feature classification, detection of specific / abnormal targets, and composition inversion. With the development of spectrophotometer technology, the spatial resolution and number of spectral bands of hyperspectral images have also increased. While bringing richer spatial-spectral information, this has also brought some challenges, including increased data storage and transmission costs, significant computational resource consumption in data processing and analysis, and more pronounced noise effects.
[0003] To address these issues, dimensionality reduction techniques have become a key research focus in hyperspectral image processing. Dimensionality reduction aims to reduce the dimensionality of data while preserving as much important information as possible. This not only reduces computational burden but also improves the efficiency and accuracy of data processing.
[0004] However, many traditional techniques in current hyperspectral image data dimensionality reduction methods primarily focus on the extraction and compression of spectral information, without fully considering the changes in spatial structure information before and after the transformation. These methods, such as Principal Component Analysis (PCA), Projective Pursuit (SPA), Adaptive Band Selection (ABS), and clustering methods, while effective in reducing data dimensionality and extracting key information, often neglect the spatial continuity and structural features of the image. PCA reduces data variance through orthogonal transformation but may lose spatial structure information; SPA and ABS reduce dimensionality by selecting feature bands but may ignore the importance of spatial information; clustering methods, while able to group similar pixels, may not effectively maintain the spatial continuity of ground features. The shortcomings of these methods lie in the potential for information redundancy, the curse of dimensionality, parameter estimation problems in high-dimensional spaces, and the loss of higher-order statistical properties. These deficiencies not only affect classification accuracy, making it difficult for classifiers to accurately classify hyperspectral image pixels, but may also lead to difficulties in ground feature detection, especially when ground feature boundaries are unclear or ground feature types are complex. Summary of the Invention
[0005] This invention provides a method, apparatus, terminal, and medium for dimensionality reduction of hyperspectral data while preserving spatial information, in order to solve the problem of spatial information loss after dimensionality reduction of hyperspectral image data.
[0006] In a first aspect, embodiments of the present invention provide a method for dimensionality reduction of hyperspectral data while preserving spatial information, comprising:
[0007] Acquire the initial hyperspectral image;
[0008] By incorporating the degree of spatial structure preservation as an optimization term, a minimum noise separation transformation is performed on the initial hyperspectral image to obtain a preliminary dimensionality-reduced image.
[0009] Based on the spectral structure similarity between the preliminary dimensionality-reduced image and the initial hyperspectral image, bands in the preliminary dimensionality-reduced spectral image are selected to obtain the final dimensionality-reduced image.
[0010] In one possible implementation, the degree of spatial structure preservation is incorporated as an optimization term, and a minimum noise separation transformation is performed on the initial hyperspectral image to obtain a preliminary dimensionality-reduced image, including:
[0011] The initial hyperspectral image is matrixed according to the spectral bands to obtain the first initial matrix;
[0012] Taking the maximization of signal-to-noise ratio and the degree of preservation of spatial structure information as the optimization objectives, and based on orthogonal constraints, principal component transformation is performed on the first initial matrix to obtain the dimension reduction transformation matrix;
[0013] A preliminary dimensionality-reduced image is obtained by applying the dimensionality-reduction transformation matrix to the first initial matrix.
[0014] In one possible implementation, the objective function for performing principal component transformation on the first initial matrix is:
[0015]
[0016]
[0017]
[0018] in, For signal-to-noise ratio, It is a structural similarity index. For the initial dimensionality reduction image, the first Elements of each band, For the initial dimensionality reduction image, the first Noise in each band, The dimensionality reduction transformation matrix is the first... Transpose of an element The noise covariance matrix is... The number of pixels for each band. Let be the first initial matrix. The average value of all pixels in the first initial matrix. This is the average value of all bands in the first initial matrix.
[0019] In one possible implementation, before matrixing the initial hyperspectral image according to bands to obtain the first initial matrix, the following steps are included:
[0020] The initial hyperspectral image is denoised by the noise covariance matrix to obtain a noise-free hyperspectral image.
[0021] Accordingly, the initial hyperspectral image is matrixed according to the spectral bands to obtain the first initial matrix, which includes:
[0022] The noise-free hyperspectral image is matrixed according to the spectral bands to obtain the first initial matrix.
[0023] In one possible implementation, based on the spectral structure similarity between the preliminary dimensionality-reduced image and the initial hyperspectral image, bands in the preliminary dimensionality-reduced image are selected to obtain the final dimensionality-reduced image, including:
[0024] The initial hyperspectral image is matrixed according to the spectral dimension to obtain the second original matrix. The image is then matrixed to obtain the preliminary dimensionality-reduced image matrix. Each element in the second original matrix and the preliminary dimensionality-reduced image matrix is a spectral curve of a band.
[0025] For each band of spectral curve, the spectral angle, Euclidean distance, and Mahalanobis distance between the spectral curve and the mean spectral curve in the second original matrix are calculated, which serve as the spectral structure of the spectral curve in the second original matrix.
[0026] For each band of spectral curve, the spectral angle, Euclidean distance, and Mahalanobis distance between the spectral curve and the mean spectral curve in the preliminary dimensionality-reduced image matrix are calculated, which serve as the spectral structure of the spectral curve in the preliminary dimensionality-reduced image matrix.
[0027] For each band of spectral curve, calculate the spectral structure similarity between the spectral curve in the initial dimensionality-reduced image matrix and the spectral curve in the second original matrix;
[0028] The optimal number of dimensionality reduction bands t is determined based on the minimum value of the similarity of each spectral structure, and the first t bands are selected from the initial dimensionality reduction image matrix to form the final dimensionality reduction image.
[0029] In one possible implementation, the formula for calculating spectral structure similarity is:
[0030]
[0031] in, For the initial dimensionality reduction of the image matrix, the front The spectral curves of each band and the first band in the second original matrix Spectral structure similarity of spectral curves in each band For the initial dimensionality reduction of the image matrix, the front The spectral curves of each band and the first band in the second original matrix The difference in spectral angles of the spectral curves for each band. For the initial dimensionality reduction of the image matrix, the front The spectral curves of each band and the first band in the second original matrix The difference in Euclidean distance between the spectral curves of each band. For the initial dimensionality reduction of the image matrix, the front The spectral curves of each band and the first band in the second original matrix The difference in Mahalanobis distance between the spectral curves of each band.
[0032] In one possible implementation, the formula for determining the optimal number of dimensionality-reduced bands t based on the similarity of each spectral structure is as follows:
[0033]
[0034] in, To achieve the optimal number of dimensionality reduction bands, For the initial dimensionality reduction of the image matrix, the front The spectral curves of each band and the first band in the second original matrix Spectral structure similarity of spectral curves in each band.
[0035] Secondly, embodiments of the present invention provide a hyperspectral data dimensionality reduction device that preserves spatial information, comprising:
[0036] The acquisition module is used to acquire the initial hyperspectral image;
[0037] The transformation module incorporates the degree of spatial structure preservation as an optimization term to perform a minimum noise separation transformation on the initial hyperspectral image, resulting in a preliminary dimensionality-reduced image.
[0038] The selection module is used to select bands in the initial dimensionality-reduced spectral image based on the spectral structure similarity between the initial dimensionality-reduced image and the initial hyperspectral image, so as to obtain the final dimensionality-reduced image.
[0039] Thirdly, embodiments of the present invention provide a terminal, 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 first aspect or any possible implementation of the first aspect.
[0040] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the first aspect or any possible implementation of the first aspect.
[0041] This invention provides a method, apparatus, terminal, and medium for dimensionality reduction of hyperspectral data while preserving spatial information. By incorporating the degree of spatial structure preservation as an optimization term and performing minimum noise separation transformation, the method can preserve spatial information as much as possible when sorting the transformed bands according to the signal-to-noise ratio. Based on the similarity of spectral structure, the method selects bands in the preliminary dimensionality-reduced spectral image and uses the band group with the spectral data structure closest to the original hyperspectral image as the final dimensionality reduction result, achieving better dimensionality reduction effect while preserving spatial information. Attached Figure Description
[0042] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0043] Figure 1 This is a flowchart illustrating the implementation of a hyperspectral data dimensionality reduction method that preserves spatial information, according to an embodiment of the present invention.
[0044] Figure 2 This is a schematic diagram of the structure of the first original matrix provided in an embodiment of the present invention;
[0045] Figure 3 This is a schematic diagram of the structure of the second original matrix provided in an embodiment of the present invention;
[0046] Figure 4 This is a schematic diagram of the calculation process of the spectral structure provided in an embodiment of the present invention;
[0047] Figure 5 This is a flowchart illustrating the implementation of a hyperspectral data dimensionality reduction method that preserves spatial information, provided in another embodiment of the present invention.
[0048] Figure 6A This is a pseudo-color image of Gulfport provided in an embodiment of the present invention;
[0049] Figure 6B This is a real-world map of Gulfport provided in an embodiment of the present invention;
[0050] Figure 6C This is a pseudo-color image of the Texas Coast provided in an embodiment of the present invention;
[0051] Figure 6D This is a real terrain map of the Texas Coast provided in an embodiment of the present invention;
[0052] Figure 6EThis is a pseudo-color image of San Diego-II provided in an embodiment of the present invention;
[0053] Figure 6F This is a real-world map of San Diego-II provided in one embodiment of the present invention;
[0054] Figure 6G This is a pseudo-color image of a HYDICE provided in an embodiment of the present invention;
[0055] Figure 6H This is a real-world map of HYDICE provided in an embodiment of the present invention;
[0056] Figure 6I This is a pseudo-color image of San Diego-I provided in an embodiment of the present invention;
[0057] Figure 6J This is a real terrain map of San Diego I provided in an embodiment of the present invention;
[0058] Figure 6K This is a pseudo-color image of Cement Street provided in an embodiment of the present invention;
[0059] Figure 6L This is a real-world map of Cement Street provided in an embodiment of the present invention;
[0060] Figure 6M This is a pseudo-color image of Holly provided in an embodiment of the present invention;
[0061] Figure 6N This is a real-world map of Holly provided in an embodiment of the present invention;
[0062] Figure 6O This is a pseudo-color image of a Jungle provided in an embodiment of the present invention;
[0063] Figure 6P This is a real terrain map of Jungle provided in an embodiment of the present invention;
[0064] Figure 7A This is an ROC curve of the image detection results before dimensionality reduction using the MF method provided in an embodiment of the present invention;
[0065] Figure 7B This is an ROC curve of the detection results of the dimension-reduced image using the MF method provided in an embodiment of the present invention;
[0066] Figure 7C This is an ROC curve of the image detection results before dimensionality reduction using the ACE method provided in an embodiment of the present invention;
[0067] Figure 7D This is an ROC curve of the detection results of the dimension-reduced image using the ACE method provided in an embodiment of the present invention;
[0068] Figure 7E This is an ROC curve of the image detection results before dimensionality reduction using the HUD method provided in an embodiment of the present invention;
[0069] Figure 7F This is an ROC curve of the detection results of the dimension-reduced image using the HUD method provided in an embodiment of the present invention;
[0070] Figure 7G This is an ROC curve of the image detection results before dimensionality reduction using the RGAE method provided in an embodiment of the present invention;
[0071] Figure 7H This is an ROC curve of the detection results of the dimension-reduced image using the RGAE method provided in an embodiment of the present invention;
[0072] Figure 7I This is an ROC curve of the image detection results before dimensionality reduction using the Auto-AD method provided in an embodiment of the present invention;
[0073] Figure 7J This is an ROC curve of the detection results of the dimension-reduced image using the Auto-AD method provided in an embodiment of the present invention;
[0074] Figure 8 This is a schematic diagram of the structure of a hyperspectral data dimensionality reduction device that preserves spatial information according to an embodiment of the present invention;
[0075] Figure 9 This is a schematic diagram of a terminal provided in an embodiment of the present invention. Detailed Implementation
[0076] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of the invention. However, those skilled in the art will understand that the invention can be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods are omitted so as not to obscure the description of the invention with unnecessary detail.
[0077] To make the objectives, technical solutions, and advantages of the present invention clearer, specific embodiments will be described below in conjunction with the accompanying drawings.
[0078] See Figure 1 The flowchart illustrating the implementation of the hyperspectral data dimensionality reduction method for preserving spatial information provided in this embodiment of the invention is described in detail below:
[0079] Step 101: Obtain the initial hyperspectral image.
[0080] In this embodiment, hyperspectral images are acquired at close range by satellite / airborne equipment or ground-based handheld devices. This combines one-dimensional spectral information reflecting the essential characteristics of various land features in the target area with two-dimensional spatial structure information of the entire area, providing support for application tasks such as fine classification of land features, detection of specific / abnormal targets, and component inversion.
[0081] Step 102: Incorporate the degree of spatial structure preservation as an optimization term, and perform minimum noise separation transformation on the initial hyperspectral image to obtain a preliminary dimensionality reduction image.
[0082] In this embodiment, the signal-to-noise ratio (SNR) of hyperspectral images significantly impacts the processing and analysis results. To preserve important information and reduce the impact of noise, it is essential to ensure a high SNR in the dimensionality-reduced data. Transform-based dimensionality reduction methods only consider reducing spectral dimensions and preserving spectral information, without considering the potential changes in spatial structure during the transformation process. As current hyperspectral image processing algorithms increasingly delve into the mining of two-dimensional spatial features and achieve higher information utilization rates, dimensionality reduction techniques, being upstream in the task, should consider preserving spatial information.
[0083] Minimum Noise Fraction Rotation (MNF Rotation) is a technique for remote sensing image processing. Its core objective is to maximize noise separation while reducing data dimensionality, thereby reducing the computational requirements of subsequent processing. MNF essentially involves two cascaded principal component transformations: the first transformation, based on the estimated noise covariance matrix, separates and readjusts noise in the data, ensuring the transformed noisy data has minimal variance and no inter-band correlation; the second is a standard principal component transformation of the noise-whitened data. After the MNF transformation, the components are uncorrelated and arranged in descending order of signal-to-noise ratio, making it superior to traditional PCA transformation in noise handling. Through MNF transformation, the main information of a multi-band image can be concentrated in the first few bands, thus achieving data dimensionality reduction and noise reduction.
[0084] However, hyperspectral image dimensionality reduction methods based on minimum noise separation transform only consider the signal-to-noise ratio (SNR) ranking of the transformed bands, without considering the preservation of spatial structure information. Building upon the minimum noise separation transform, this embodiment addresses the spatial information preservation problem by adding a spatial information term to the minimum noise separation transform formula. This maximizes the signal-to-noise ratio (SNR) and structural similarity (SSIM), using the maximization of SNR and image structural similarity as optimization terms to solve the dimensionality reduction transform matrix. This allows for the preservation of spatial information as much as possible when the transformed bands are ranked according to their SNR.
[0085] Step 103: Based on the spectral structure similarity between the preliminary dimensionality-reduced image and the initial hyperspectral image, bands in the preliminary dimensionality-reduced spectral image are selected to obtain the final dimensionality-reduced image.
[0086] In this embodiment, the transformation-based hyperspectral image data dimensionality reduction method only sorts the transformed bands according to the signal-to-noise ratio from largest to smallest. Although it completes the functions of noise reduction and sorting, it does not specify which bands to use and does not perform dimensionality reduction by selecting bands. As a result, the dimensionality-reduced image still has a large amount of data, which brings a large computational burden to subsequent processing.
[0087] To address this, this embodiment employs a band selection strategy to choose the optimal bands after transformation. It calculates the average change of all hyperspectral image pixels in the feature space relative to the center pixel position. This average change represents the spectral data structure, and the band group closest to the spectral data structure of the hyperspectral image before transformation is used as the final dimensionality reduction result. This method effectively solves the problem of determining the number of bands after dimensionality reduction of the hyperspectral image.
[0088] This invention incorporates spatial structure preservation as an optimization term and performs minimum noise separation transformation, enabling the transformed bands to retain spatial information as much as possible when sorted by signal-to-noise ratio. Based on spectral structure similarity, bands in the initial dimensionality-reduced spectral image are selected, and the band group with the spectral data structure closest to the original hyperspectral image is taken as the final dimensionality reduction result, achieving better dimensionality reduction effect while preserving spatial information.
[0089] In one possible implementation, the degree of spatial structure preservation is incorporated as an optimization term, and a minimum noise separation transformation is performed on the initial hyperspectral image to obtain a preliminary dimensionality-reduced image, including:
[0090] The initial hyperspectral image is matrixed according to the spectral bands to obtain the first initial matrix;
[0091] Taking the maximization of signal-to-noise ratio and the degree of preservation of spatial structure information as the optimization objectives, and based on orthogonal constraints, principal component transformation is performed on the first initial matrix to obtain the dimension reduction transformation matrix;
[0092] A preliminary dimensionality-reduced image is obtained by applying the dimensionality-reduction transformation matrix to the first initial matrix.
[0093] In this embodiment, the spatial dimension is considered when solving the transformation formula. To facilitate the linear combination of bands and the calculation of spatial structure similarity, such as... Figure 3 As shown, the observed hyperspectral image is described as a first initial matrix according to the spectral bands. Where S is a noise-free hyperspectral image, p For the number of bands, n Number of pixels per band.
[0094] The core objective of dimensionality reduction methods based on linear transformations is to find a transformation matrix A that transforms the hyperspectral image X into a preliminary dimensionality-reduced image Z. Essentially, the first band after the transformation... It is by The linear combination of the coefficients is obtained as follows: And so on. The corresponding coefficient is of The linear combination of X yields the following result: X is transformed by matrix A.
[0095]
[0096] test In this case, the present invention aims to achieve the following for the first band after linear transformation. It has a high signal-to-noise ratio and can retain more spatial structure information from the original hyperspectral image, which is beneficial for subsequent processing. The signal-to-noise ratio and spatial information decrease sequentially. First, we need to... The signal-to-noise ratio and the degree of preservation of spatial structure information are measured.
[0097] ① Definition The signal-to-noise ratio is equal to The mean of the squares of all cell values divided by The variance of the noise, i.e., the signal-to-noise ratio. .
[0098] ② Define the transformation The degree of preservation of spatial structural information is and The Structural Similarity Index (SSIM). ,in This is a brightness comparison function. This is a contrast comparison function. For structural comparison functions, The mean, Let the variance be... , , , Substituting into the formula, we get The degree of spatial structure information retention is as follows:
[0099]
[0100] in, for The average value across all bands, for The average value of all pixels, For the first i Low Band j The value of each pixel.
[0101] In one possible implementation, the objective function for performing principal component transformation on the first initial matrix is:
[0102]
[0103]
[0104]
[0105] in, For signal-to-noise ratio, It is a structural similarity index. For the initial dimensionality reduction image, the first Elements of each band, For the initial dimensionality reduction image, the first Noise in each band, The dimensionality reduction transformation matrix is the first... Transpose of an element The noise covariance matrix is... The number of pixels for each band. Let be the first initial matrix. The average value of all pixels in the first initial matrix. This is the average value of all bands in the first initial matrix.
[0106] In this embodiment, it is expected that signal-to-noise ratio f And the degree of preservation of spatial structure information g To make it as large as possible, for ease of calculation, the problem can be described as: when Minimum The solution. At the same time, according to... The signal-to-noise ratio should be in all orthogonal directions. The smallest of the components, then The standardization should meet This condition guarantees the transformed vector It can accurately represent the signal and noise components in the original data while maintaining the unit length of the vector; that is, in the transformed space, the vector... It maintains consistency in its direction and magnitude. This ensures that important signal information is not weakened or lost during data dimensionality reduction and noise separation, while effectively reducing the impact of noise. The problem can be expressed by the formula:
[0107] st
[0108] in, yes The covariance matrix. Traditional minimum noise separation transform only expects... To obtain a small noise ratio, we need to find the ratio of noise variance to total variance. Minimum The solution is to simultaneously maximize the signal-to-noise ratio and the degree of spatial structure information retention, so as to preserve spatial information.
[0109] In the process of solving the formula to obtain the dimension reduction transformation matrix A, the minimization problem can be transformed into a conditional extremum problem, which can be solved using the Lagrange multiplier method, letting... . h Under constraints In this case, it is the reciprocal of the signal-to-noise ratio minus the degree of spatial structure information retention. for The signal-to-noise ratio, g for The degree to which spatial structure information is preserved after transformation This is an orthogonal constraint condition. When h When the derivative is 0 h The extreme value is obtained. h The following simplification can be made:
[0110]
[0111] in, , , , .
[0112] right h Taking the partial derivative, we get:
[0113]
[0114] And so on, The solution also applies this formula, which yields the unit eigenvector corresponding to the largest eigenvalue. and subsequent i Large eigenvalues correspond to eigenvectors Therefore, solving for its generalized eigenvectors yields the transformation matrix A, and the transformed image is... The transformation separates the noise and signal components of the original image. The transformed components are uncorrelated across bands and are sorted from highest to lowest according to their signal-to-noise ratio and spatial information retention.
[0115] During the solution process, Since it is the signal value defined in this article, it should be as large as possible, then we have And it satisfies the orthogonal constraint conditions mentioned above. The solution process is similar to the one described above. Let... Find the partial derivative when When The maximum value. The solution can be transformed into the problem of finding generalized eigenvalues:
[0116] Taking the average yields:
[0117] In one possible implementation, before matrixing the initial hyperspectral image according to bands to obtain the first initial matrix, the following steps are included:
[0118] The initial hyperspectral image is denoised by the noise covariance matrix to obtain a noise-free hyperspectral image.
[0119] Accordingly, the initial hyperspectral image is matrixed according to the spectral bands to obtain the first initial matrix, which includes:
[0120] The noise-free hyperspectral image is matrixed according to the spectral bands to obtain the first initial matrix.
[0121] In this embodiment, most transformation-based hyperspectral image data dimensionality reduction methods do not consider noise removal. This embodiment performs denoising before transformation and performs transformation based on the denoised noise-free hyperspectral image, which can obtain a dimensionality-reduced image with a higher signal-to-noise ratio.
[0122] In one possible implementation, based on the spectral structure similarity between the preliminary dimensionality-reduced image and the initial hyperspectral image, bands in the preliminary dimensionality-reduced image are selected to obtain the final dimensionality-reduced image, including:
[0123] The initial hyperspectral image is matrixed according to the spectral dimension to obtain the second original matrix. The image is then matrixed to obtain the preliminary dimensionality-reduced image matrix. Each element in the second original matrix and the preliminary dimensionality-reduced image matrix is a spectral curve of a band.
[0124] For each band of spectral curve, the spectral angle, Euclidean distance, and Mahalanobis distance between the spectral curve and the mean spectral curve in the second original matrix are calculated, which serve as the spectral structure of the spectral curve in the second original matrix.
[0125] For each band of spectral curve, the spectral angle, Euclidean distance, and Mahalanobis distance between the spectral curve and the mean spectral curve in the preliminary dimensionality-reduced image matrix are calculated, which serve as the spectral structure of the spectral curve in the preliminary dimensionality-reduced image matrix.
[0126] For each band of spectral curve, calculate the spectral structure similarity between the spectral curve in the initial dimensionality-reduced image matrix and the spectral curve in the second original matrix;
[0127] The optimal number of dimensionality reduction bands t is determined based on the minimum value of the similarity of each spectral structure, and the first t bands are selected from the initial dimensionality reduction image matrix to form the final dimensionality reduction image.
[0128] In this embodiment, after transformation The bands in the spectrum are sorted from highest to lowest based on their signal-to-noise ratio (SNR) and spatial information retention. To quickly eliminate low SNR bands and improve computational efficiency, we can select... The top 10% of bands are selected as the band group for subsequent processing, and band selection strategies are then applied based on this group. This is known as the band group. , This constitutes a preliminary dimensionality reduction image, in which for The first 10% of the bands, Original band number p Multiply by 10% and then round down.
[0129] When selecting strategies, focus on their spectral dimensions and re-describe the hyperspectral image. , ,in , The spectral curve is shown. The structure of the second original matrix is as follows: Figure 3 As shown.
[0130] In order to select based on experience Based on this, to further reduce the number of bands, the selection strategy is designed as follows:
[0131] ①Select The first k bands Calculate the values of k from 1 to l sequentially. Spectral structure similarity with the original hyperspectral image X.
[0132] ②The spectral structure of X is measured by the spectral angle, Euclidean distance, and Mahalanobis distance between each spectral curve and the mean spectral curve, such as... Figure 5 The given example shows how to find the spectral angle, Euclidean distance, and Mahalanobis distance between the i-th spectral curve and the mean spectral curve. The calculation is the same Figure 5 .
[0133] ③Measure the spectral structure of X and The similarity between spectral structures is measured by mean square error, which is the difference between the values in the two spectral structures, the square of the difference, and the average of the squares.
[0134] ④ Obtain X and The total spectral structural similarity l Find the minimum similarity among the given similarity values. k Value, denoted as t The final screening results were obtained. .
[0135] In one possible implementation, the formula for calculating spectral structure similarity is:
[0136]
[0137] in, For the initial dimensionality reduction of the image matrix, the front The spectral curves of each band and the first band in the second original matrix Spectral structure similarity of spectral curves in each band For the initial dimensionality reduction of the image matrix, the front The spectral curves of each band and the first band in the second original matrix The difference in spectral angles of the spectral curves for each band. For the initial dimensionality reduction of the image matrix, the front The spectral curves of each band and the first band in the second original matrix The difference in Euclidean distance between the spectral curves of each band. For the initial dimensionality reduction of the image matrix, the front The spectral curves of each band and the first band in the second original matrix The difference in Mahalanobis distance between the spectral curves of each band.
[0138] In this embodiment, the specific calculation process for spectral structure similarity is as follows:
[0139]
[0140]
[0141]
[0142]
[0143] in, , , for The covariance matrix, for The covariance matrix.
[0144] In one possible implementation, the formula for determining the optimal number of dimensionality-reduced bands t based on the similarity of each spectral structure is as follows:
[0145]
[0146] in, To achieve the optimal number of dimensionality reduction bands, For the initial dimensionality reduction of the image matrix, the front The spectral curves of each band and the first band in the second original matrix Spectral structure similarity of spectral curves in each band.
[0147] In this embodiment, calculations are performed sequentially. and Spectral structural similarity ,when The value of t is obtained when the minimum value is reached, that is... .at this time, The final filtered results are then combined to form the final dimensionality-reduced image.
[0148] In a specific embodiment, the verification process of the method provided by the present invention is described. Figure 5 As shown, it includes:
[0149] ① Solve the minimum noise separation transformation formula with added spatial information terms.
[0150] ② After transforming the hyperspectral image using a transformation matrix, the signal-to-noise ratios of the bands are ranked.
[0151] ③ Calculate the average degree of change of all pixels in the original hyperspectral image relative to the central pixel.
[0152] ④ Calculate the average change of all pixels in the first t bands of the transformed hyperspectral image relative to the central pixel.
[0153] ⑤ Input all possible values for t, and repeat step ④.
[0154] ⑥ Compare the values of ③ and ④. The optimal t value is obtained when the two are closest. The final dimensionality reduction band can then be determined, and the final dimensionality reduction image can be obtained.
[0155] The validation data includes publicly available hyperspectral images and non-public near-ground hyperspectral images. Near-ground hyperspectral images were captured using an imaging spectrometer; the spatial dimensions of the images are 1002×1002 pixels, the spectral dimensions are 89, the band spacing is 4 nm, and the imaging range is 449 nm–801 nm. The pseudo-color images and target distribution maps within the validation data are shown below. Figures 6A-6P As shown.
[0156] The effectiveness of this invention was verified using typical downstream target detection tasks. RX, CEM, 2S-GLRT, MF, ACE, HUD, RGAE, and Auto-AD methods were selected as verification methods, and detection was performed on hyperspectral images before and after dimensionality reduction, respectively. The detection performance of the methods was measured using the receiver operating characteristic (ROC) and the area under the curve (AUC). Figures 7A-7J The detection performance of the target detection algorithm before and after dimensionality reduction is demonstrated. Table 1 shows the average AUC values of different detection methods on all data. To ensure the rationality of the input parameters, median filtering, the spatial and spatial decorrelation method (SSDC method), the modified residual method (MR method), and hyperspectral restoration (HyRes) were selected to obtain the noise covariance matrix, respectively. Verification showed that this invention can preserve spatial spectral information overall, ensuring the effective execution of downstream tasks.
[0157] Table 1
[0158]
[0159] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0160] The following are device embodiments of the present invention. For details not described in detail, please refer to the corresponding method embodiments described above.
[0161] Figure 8 A schematic diagram of the hyperspectral data dimensionality reduction device for preserving spatial information provided in an embodiment of the present invention is shown. For ease of explanation, only the parts relevant to the embodiment of the present invention are shown, and are described in detail below:
[0162] like Figure 8 As shown, the hyperspectral data dimensionality reduction device 8 that preserves spatial information includes:
[0163] Acquisition module 81 is used to acquire the initial hyperspectral image;
[0164] Transformation module 82 is used to incorporate the degree of spatial structure preservation as an optimization term to perform minimum noise separation transformation on the initial hyperspectral image to obtain a preliminary dimensionality reduction image.
[0165] The selection module 83 is used to select bands in the preliminary dimensionality-reduced spectral image based on the spectral structure similarity between the preliminary dimensionality-reduced image and the initial hyperspectral image, so as to obtain the final dimensionality-reduced image.
[0166] In one possible implementation, the transformation module 82 is specifically used for:
[0167] The initial hyperspectral image is matrixed according to the spectral bands to obtain the first initial matrix;
[0168] Taking the maximization of signal-to-noise ratio and the degree of preservation of spatial structure information as the optimization objectives, and based on orthogonal constraints, principal component transformation is performed on the first initial matrix to obtain the dimension reduction transformation matrix;
[0169] A preliminary dimensionality-reduced image is obtained by applying the dimensionality-reduction transformation matrix to the first initial matrix.
[0170] In one possible implementation, the objective function for performing principal component transformation on the first initial matrix is:
[0171]
[0172]
[0173]
[0174] in, For signal-to-noise ratio, It is a structural similarity index. For the initial dimensionality reduction image, the first Elements of each band, For the initial dimensionality reduction image, the first Noise in each band, The dimensionality reduction transformation matrix is the first... Transpose of an element The noise covariance matrix is... The number of pixels for each band. Let be the first initial matrix. The average value of all pixels in the first initial matrix. This is the average value of all bands in the first initial matrix.
[0175] In one possible implementation, the transformation module 82 is further configured to:
[0176] Before matrixing the initial hyperspectral image according to the band to obtain the first initial matrix, the initial hyperspectral image is denoised by the noise covariance matrix to obtain a noise-free hyperspectral image.
[0177] Accordingly, the initial hyperspectral image is matrixed according to the spectral bands to obtain the first initial matrix, which includes:
[0178] The noise-free hyperspectral image is matrixed according to the spectral bands to obtain the first initial matrix.
[0179] In one possible implementation, module 83 is specifically used for:
[0180] The initial hyperspectral image is matrixed according to the spectral dimension to obtain the second original matrix. The image is then matrixed to obtain the preliminary dimensionality-reduced image matrix. Each element in the second original matrix and the preliminary dimensionality-reduced image matrix is a spectral curve of a band.
[0181] For each band of spectral curve, the spectral angle, Euclidean distance, and Mahalanobis distance between the spectral curve and the mean spectral curve in the second original matrix are calculated, which serve as the spectral structure of the spectral curve in the second original matrix.
[0182] For each band of spectral curve, the spectral angle, Euclidean distance, and Mahalanobis distance between the spectral curve and the mean spectral curve in the preliminary dimensionality-reduced image matrix are calculated, which serve as the spectral structure of the spectral curve in the preliminary dimensionality-reduced image matrix.
[0183] For each band of spectral curve, calculate the spectral structure similarity between the spectral curve in the initial dimensionality-reduced image matrix and the spectral curve in the second original matrix;
[0184] The optimal number of dimensionality reduction bands t is determined based on the minimum value of the similarity of each spectral structure, and the first t bands are selected from the initial dimensionality reduction image matrix to form the final dimensionality reduction image.
[0185] In one possible implementation, the formula for calculating spectral structure similarity is:
[0186]
[0187] in, For the initial dimensionality reduction of the image matrix, the front The spectral curves of each band and the first band in the second original matrix Spectral structure similarity of spectral curves in each band For the initial dimensionality reduction of the image matrix, the front The spectral curves of each band and the first band in the second original matrix The difference in spectral angles of the spectral curves for each band. For the initial dimensionality reduction of the image matrix, the front The spectral curves of each band and the first band in the second original matrix The difference in Euclidean distance between the spectral curves of each band. For the initial dimensionality reduction of the image matrix, the front The spectral curves of each band and the first band in the second original matrix The difference in Mahalanobis distance between the spectral curves of each band.
[0188] In one possible implementation, the formula for determining the optimal number of dimensionality-reduced bands t based on the similarity of each spectral structure is as follows:
[0189]
[0190] in, To achieve the optimal number of dimensionality reduction bands, For the initial dimensionality reduction of the image matrix, the front The spectral curves of each band and the first band in the second original matrix Spectral structure similarity of spectral curves in each band.
[0191] This invention incorporates spatial structure preservation as an optimization term and performs minimum noise separation transformation, enabling the transformed bands to retain spatial information as much as possible when sorted by signal-to-noise ratio. Based on spectral structure similarity, bands in the initial dimensionality-reduced spectral image are selected, and the band group with the spectral data structure closest to the original hyperspectral image is taken as the final dimensionality reduction result, achieving better dimensionality reduction effect while preserving spatial information.
[0192] Figure 9 This is a schematic diagram of a terminal provided in an embodiment of the present invention. Figure 9 As shown, the terminal 9 in this embodiment includes: a processor 90, a memory 91, and a computer program 92 stored in the memory 91 and executable on the processor 90. When the processor 90 executes the computer program 92, it implements the steps in the various embodiments of the hyperspectral data dimensionality reduction method for preserving spatial information described above, for example... Figure 1 Steps 101 to 103 are shown. Alternatively, when the processor 90 executes the computer program 92, it implements the functions of each module / unit in the above-described device embodiments, for example... Figure 8 The functions of modules / units 81 to 83 shown.
[0193] For example, the computer program 92 can be divided into one or more modules / units, which are stored in the memory 91 and executed by the processor 90 to complete the present invention. The one or more modules / units can be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program 92 in the terminal 9. For example, the computer program 92 can be divided into... Figure 8 Modules / units 81 to 83 are shown.
[0194] The terminal 9 can be a computing device such as a desktop computer, laptop, handheld computer, or cloud server. The terminal 9 may include, but is not limited to, a processor 90 and a memory 91. Those skilled in the art will understand that... Figure 9 This is merely an example of terminal 9 and does not constitute a limitation on terminal 9. It may include more or fewer components than shown, or combine certain components, or different components. For example, the terminal may also include input / output devices, network access devices, buses, etc.
[0195] The processor 90 may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0196] The memory 91 can be an internal storage unit of the terminal 9, such as a hard disk or memory of the terminal 9. The memory 91 can also be an external storage device of the terminal 9, such as a plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card equipped on the terminal 9. Furthermore, the memory 91 can include both internal storage units and external storage devices of the terminal 9. The memory 91 is used to store the computer program and other programs and data required by the terminal. The memory 91 can also be used to temporarily store data that has been output or will be output.
[0197] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0198] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0199] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0200] In the embodiments provided by this invention, it should be understood that the disclosed devices / terminals and methods can be implemented in other ways. For example, the device / terminal embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0201] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0202] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0203] If the integrated module / unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium. When executed by a processor, the computer program can implement the steps of the above embodiments of the hyperspectral data dimensionality reduction method for preserving spatial information. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content contained in the computer-readable medium may be appropriately added to or subtracted from the content as required by the legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium may not include electrical carrier signals and telecommunication signals.
[0204] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A method for dimension reduction of hyperspectral data preserving spatial information, characterized in that, The method comprises the following steps: obtaining an initial hyperspectral image; adding a spatial structure preservation degree as an optimization item to perform minimum noise separation transformation on the initial hyperspectral image to obtain a preliminary reduced dimension image; selecting a wave band in the preliminary reduced dimension image based on a spectral structure similarity between the preliminary reduced dimension image and the initial hyperspectral image to obtain a final reduced dimension image; the adding of the spatial structure preservation degree as the optimization item to perform the minimum noise separation transformation on the initial hyperspectral image to obtain the preliminary reduced dimension image comprises: matrixing the initial hyperspectral image according to a wave band to obtain a first initial matrix; performing principal component transformation on the first initial matrix based on an orthogonal constraint to obtain a reduced dimension transformation matrix, with a signal-to-noise ratio and a spatial structure information preservation degree maximization being taken as an optimization target; performing action on the first initial matrix based on the reduced dimension transformation matrix to obtain the preliminary reduced dimension image; the selecting of the wave band in the preliminary reduced dimension image based on the spectral structure similarity between the preliminary reduced dimension image and the initial hyperspectral image to obtain the final reduced dimension image comprises: matrixing the initial hyperspectral image according to a spectral dimension to obtain a second original matrix, and matrixing the preliminary reduced dimension image to obtain a preliminary reduced dimension image matrix; wherein each element in the second original matrix and the preliminary reduced dimension image matrix is a spectral curve of a wave band; for each spectral curve of a wave band, calculating a spectral angle, an Euclidean distance and a Mahalanobis distance between the spectral curve and a mean spectral curve in the second original matrix as a spectral structure of the spectral curve in the second original matrix; for each spectral curve of a wave band, calculating a spectral angle, an Euclidean distance and a Mahalanobis distance between the spectral curve and a mean spectral curve in the preliminary reduced dimension image matrix as a spectral structure of the spectral curve in the preliminary reduced dimension image matrix; for each spectral curve of a wave band, calculating a spectral structure similarity between the spectral curve in the preliminary reduced dimension image matrix and the spectral curve in the second original matrix; determining a best reduced dimension wave band number t based on a minimum value of each spectral structure similarity, and selecting a first t wave bands in the preliminary reduced dimension image matrix to form a final reduced dimension image.
2. The method of claim 1, wherein, a target function of the principal component transformation on the first initial matrix is: wherein, is a signal-to-noise ratio, is a structural similarity index, is an element of the preliminary reduced dimensionality image, is a noise of the element of the preliminary reduced dimensionality image, is an element of the preliminary reduced dimensionality image, is a noise of the element of the preliminary reduced dimensionality image, is a transpose of the element of the reduced dimensionality transformation matrix, is a transpose of the element of the reduced dimensionality transformation matrix, is a noise covariance matrix, is a number of pixels per band, is the first initial matrix, is an average of all pixels of the first initial matrix, is an average of all bands of the first initial matrix. 3.The method of claim 2, wherein, before the matrixing of the initial hyperspectral image according to the wave band to obtain the first initial matrix, the method further comprises the following steps: performing denoising on the initial hyperspectral image through a noise covariance matrix to obtain a noise-free hyperspectral image; correspondingly, the matrixing of the initial hyperspectral image according to the wave band to obtain the first initial matrix comprises: matrixing the noise-free hyperspectral image according to the wave band to obtain the first initial matrix. 4.The method of claim 1, wherein, a calculation formula of the spectral structure similarity is: wherein, is a spectral structure similarity of the spectral curve of the first waveband in the preliminary reduced dimension image matrix and the spectral curve of the first waveband in the second original matrix, is a spectral angle difference of the spectral curve of the first waveband in the preliminary reduced dimension image matrix and the spectral curve of the first waveband in the second original matrix, is a Euclidean distance difference of the spectral curve of the first waveband in the preliminary reduced dimension image matrix and the spectral curve of the first waveband in the second original matrix, is a Mahalanobis distance difference of the spectral curve of the first waveband in the preliminary reduced dimension image matrix and the spectral curve of the first waveband in the second original matrix.
5. The method of claim 1, wherein, a calculation formula of the determination of the best reduced dimension wave band number t based on each spectral structure similarity is: wherein, is the optimal number of reduced dimensions, is the spectral structure similarity between the spectral curve of the first bands in the preliminary reduced dimension image matrix and the spectral curve of the first bands in the second original matrix.
6. A hyperspectral data dimension reduction device reserving space information, characterized in that, The method comprises the following steps: an obtaining module, configured to obtain an initial hyperspectral image; a transformation module, configured to add a spatial structure preservation degree as an optimization item to perform minimum noise separation transformation on the initial hyperspectral image to obtain a preliminary reduced dimension image; The selecting module is configured to select bands in the preliminary reduced-dimension image based on spectral structure similarity between the preliminary reduced-dimension image and the initial hyperspectral image, and obtain a final reduced-dimension image. The transformation module is specifically configured to: matrix the initial hyperspectral image according to bands to obtain a first initial matrix; retain a signal-to-noise ratio and a maximum spatial structure information retention degree as an optimization target, perform principal component transformation on the first initial matrix based on an orthogonal constraint to obtain a reduced-dimension transformation matrix; perform operation on the first initial matrix based on the reduced-dimension transformation matrix to obtain a preliminary reduced-dimension image. The selecting module is specifically configured to: matrix the initial hyperspectral image according to a spectral dimension to obtain a second original matrix, and matrix the preliminary reduced-dimension image to obtain a preliminary reduced-dimension image matrix; each element in the second original matrix and the preliminary reduced-dimension image matrix is a spectral curve of a band; for each spectral curve of a band, calculate a spectral angle, an Euclidean distance, and a Mahalanobis distance between the spectral curve and a mean spectral curve in the second original matrix as a spectral structure of the spectral curve in the second original matrix; for each spectral curve of a band, calculate a spectral angle, an Euclidean distance, and a Mahalanobis distance between the spectral curve and a mean spectral curve in the preliminary reduced-dimension image matrix as a spectral structure of the spectral curve in the preliminary reduced-dimension image matrix; for each spectral curve of a band, calculate a spectral structure similarity between the spectral curve in the preliminary reduced-dimension image matrix and the spectral curve in the second original matrix; determine a best reduced-dimension band number t based on a minimum value of each spectral structure similarity, and select the first t bands in the preliminary reduced-dimension image matrix to form a final reduced-dimension image.
7. A terminal comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the steps of the method of any one of claims 1 to 5.
8. A computer-readable storage medium storing a computer program, the computer-readable storage medium comprising: The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 5.
Citation Information
Patent Citations
Manifold dimension reduction method of hyperspectral images based on image block distance
CN102903116A
Hyperspectral data dimensionality reduction method based on tensor distance patch alignment
CN103336968A