Hyperspectral data dimension reduction method and device capable of reserving spatial information, terminal and medium
By adding the degree of spatial structure preservation as an optimization item in the dimensionality reduction of hyperspectral images, and performing minimum noise separation transformation and spectral structure similarity to select bands, the problem of spatial information loss in existing methods is solved, and better dimensionality reduction effect and ground object detection accuracy are achieved.
Patent Information
- Application Number
- CN202510631275.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-16
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2045-05-16
AI Technical Summary
Existing hyperspectral image data dimensionality reduction methods ignore spatial structure information during the dimensionality reduction process, resulting in information redundancy, dimensionality disaster and difficulty in object detection, especially when the object boundaries are unclear or the object types are complex, which affects the classification accuracy.
By adding the degree of spatial structure preservation as an optimization item, a minimum noise separation transformation is performed, and bands are selected based on the spectral structure similarity. A band selection strategy is designed to ensure that the bands retain spatial information after dimensionality reduction.
The spatial information is effectively retained during the dimensionality reduction process, which improves the efficiency and accuracy of data processing, reduces the computational burden, and enhances the accuracy of object classification and detection effects.
Smart Images

Figure CN120656011A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to a method, device, terminal and medium for reducing the dimension of hyperspectral data by retaining spatial information. Background Art
[0002] Hyperspectral images, acquired at close range by satellite / aircraft-based equipment or handheld ground-based devices, combine one-dimensional spectral information reflecting the essential characteristics of various ground objects in the target area with two-dimensional spatial structure information of the entire area, providing support for application tasks such as fine-grained ground object classification, specific / anomalous target detection, and composition inversion. With the development of spectroscopic detector technology, the spatial resolution and number of spectral bands of hyperspectral images have also increased. While this provides rich spatial-spectral information, it also brings some challenges, including increased data storage and transmission costs, the significant consumption of computing resources in data processing and analysis, and the more significant impact of noise.
[0003] To address these issues, dimensionality reduction has become a research focus in hyperspectral image processing. Dimensionality reduction aims to reduce the dimensionality of the data while preserving as much important information as possible. This not only reduces the computational burden but also improves the efficiency and accuracy of data processing.
[0004] However, many traditional techniques for dimensionality reduction of hyperspectral image data focus primarily on extracting and compressing spectral information, without fully considering the changes in spatial structure before and after the transformation. While these methods, such as principal component analysis (PCA), projection pursuit (SPA), adaptive band selection (ABS), and clustering, are effective in reducing data dimensionality and extracting key information, they often overlook the spatial continuity and structural characteristics of the image. PCA reduces data variance through orthogonal transformations but can lose spatial structural information; SPA and ABS reduce dimensionality by selecting characteristic bands but can overlook the importance of spatial information; and clustering methods, while able to group similar pixels, may not effectively preserve the spatial continuity of objects. The drawbacks of these methods include 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 drawbacks not only affect classification accuracy, making it difficult for classifiers to accurately classify hyperspectral image pixels, but also make object detection difficult, especially when object boundaries are unclear or object types are complex. Summary of the Invention
[0005] The embodiments of the present invention provide a method, device, terminal and medium for reducing the dimension of hyperspectral data while preserving spatial information, so as to solve the problem of spatial information loss after the dimension of hyperspectral image data is reduced.
[0006] In a first aspect, an embodiment of the present invention provides a method for reducing the dimensionality of hyperspectral data while preserving spatial information, comprising:
[0007] Acquire an initial hyperspectral image;
[0008] The degree of spatial structure preservation is added as an optimization item, and the initial hyperspectral image is subjected to minimum noise separation transformation to obtain a preliminary dimensionality reduction image.
[0009] Based on the spectral structure similarity between the preliminary dimension-reduced image and the initial hyperspectral image, the bands in the preliminary dimension-reduced image are selected to obtain the final dimension-reduced image.
[0010] In one possible implementation, the degree of spatial structure preservation is added as an optimization item, and the initial hyperspectral image is subjected to a minimum noise separation transformation to obtain a preliminary dimensionality reduction image, including:
[0011] Matrixing the initial hyperspectral image according to the wavelength band to obtain a first initial matrix;
[0012] Taking the maximum signal-to-noise ratio and spatial structure information retention as the optimization goal, the first initial matrix is transformed into a principal component based on the orthogonal constraint to obtain a dimension reduction transformation matrix;
[0013] Based on the effect of the dimensionality reduction transformation matrix on the first initial matrix, a preliminary dimensionality reduction image is obtained.
[0014] In one possible implementation, the objective function of performing principal component transformation on the first initial matrix is:
[0015]
[0016] Among them, f is the signal-to-noise ratio, g is the structural similarity index, z i is the element of the i-th band in the initial dimensionality reduction image, n i is the noise of the i-th band in the initial dimensionality reduction image, is the transpose of the i-th element in the dimensionality reduction transformation matrix, N is the noise covariance matrix, n is the number of pixels in each band, X is the first initial matrix, is the average value of all pixels in the first initial matrix, is the average value of all bands of the first initial matrix.
[0017] In a possible implementation, before matrixing the initial hyperspectral image according to wavelength bands to obtain a first initial matrix, the method further includes:
[0018] The initial hyperspectral image is denoised by the noise covariance matrix to obtain a noise-free hyperspectral image;
[0019] Accordingly, the initial hyperspectral image is matrixed according to the band to obtain a first initial matrix, including:
[0020] The noise-free hyperspectral image is matrixed according to the wavelength bands to obtain a first initial matrix.
[0021] In one possible implementation, based on the spectral structure similarity between the preliminary dimensionality reduction image and the initial hyperspectral image, bands in the preliminary dimensionality reduction image are selected to obtain a final dimensionality reduction image, including:
[0022] The initial hyperspectral image is matrixed according to the spectral dimension to obtain a second original matrix, and the preliminary dimension-reduced image is matrixed to obtain a preliminary dimension-reduced image matrix; wherein each element in the second original matrix and the preliminary dimension-reduced image matrix is a spectral curve of a band;
[0023] For the spectral curve of each band, the spectral angle, Euclidean distance and Mahalanobis distance between the spectral curve and the mean spectral curve in the second original matrix are calculated as the spectral structure of the spectral curve in the second original matrix;
[0024] For the spectral curve of each band, the spectral angle, Euclidean distance and Mahalanobis distance between the spectral curve and the mean spectral curve in the preliminary dimensionality reduction image matrix are calculated as the spectral structure of the spectral curve in the preliminary dimensionality reduction image matrix;
[0025] For the spectral curve of each band, calculating the spectral structure similarity between the spectral curve in the preliminary dimension-reduced image matrix and the spectral curve in the second original matrix;
[0026] 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 preliminary dimensionality reduction image matrix to form the final dimensionality reduction image.
[0027] In one possible implementation, the calculation formula for spectral structure similarity is:
[0028]
[0029] Among them, Δ k is the spectral structure similarity between the spectral curves of the first k bands in the initial dimension-reduced image matrix and the spectral curves of the first k bands in the second original matrix, Δθ k is the difference in spectral angle between the spectral curves of the first k bands in the initial dimension-reduced image matrix and the spectral curves of the first k bands in the second original matrix, ΔD k is the difference in Euclidean distance between the spectral curves of the first k bands in the initial dimension-reduced image matrix and the spectral curves of the first k bands in the second original matrix, ΔM k It is the difference between the Mahalanobis distances of the spectral curves of the first k bands in the initial dimension-reduced image matrix and the spectral curves of the first k bands in the second original matrix.
[0030] In one possible implementation, the calculation formula for determining the optimal number of dimensionality reduction bands t based on the similarity of each spectral structure is:
[0031] t=argminΔ k
[0032] Among them, t is the number of optimal dimensionality reduction bands, Δ k It is the spectral structure similarity between the spectral curves of the first k bands in the initial dimension-reduced image matrix and the spectral curves of the first k bands in the second original matrix.
[0033] In a second aspect, an embodiment of the present invention provides a hyperspectral data dimensionality reduction device that retains spatial information, comprising:
[0034] An acquisition module, used to acquire an initial hyperspectral image;
[0035] The transformation module is used to add the degree of spatial structure preservation as an optimization item, perform minimum noise separation transformation on the initial hyperspectral image, and obtain a preliminary dimensionality reduction image;
[0036] The selection module is used to select the bands in the preliminary dimension reduction spectrum image based on the spectral structure similarity between the preliminary dimension reduction image and the initial hyperspectral image to obtain the final dimension reduction image.
[0037] In a third aspect, an embodiment of the present invention provides a terminal comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the first aspect or any possible implementation method of the first aspect are implemented.
[0038] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps of the first aspect or any possible implementation method of the first aspect.
[0039] The embodiments of the present invention provide a method, device, terminal and medium for dimensionality reduction of hyperspectral data that retains spatial information. By adding the degree of spatial structure preservation as an optimization item and performing a minimum noise separation transformation, the spatial information can be retained as much as possible when the transformed bands are sorted according to the signal-to-noise ratio; the bands in the preliminary dimensionality reduction spectrum image are selected based on the spectral structure similarity, and the band group closest to the spectral data structure of the hyperspectral image before the transformation is used as the final dimensionality reduction result, thereby achieving a better dimensionality reduction effect while retaining the spatial information. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0041] Figure 1 This is a flowchart of an implementation method for reducing the dimension of hyperspectral data while retaining spatial information provided by an embodiment of the present invention;
[0042] Figure 2 is a schematic structural diagram of a first original matrix provided by an embodiment of the present invention;
[0043] Figure 3 is a schematic structural diagram of a second original matrix provided by an embodiment of the present invention;
[0044] Figure 4 Schematic diagram of the calculation process of the spectral structure provided by one embodiment of the present invention;
[0045] Figure 5 is a flowchart of an implementation method of a hyperspectral data dimensionality reduction method that retains spatial information provided by another embodiment of the present invention;
[0046] Figure 6A This is a pseudo-color image of Gulfport provided by one embodiment of the present invention;
[0047] Figure 6B This is a real feature map of Gulfport provided by one embodiment of the present invention;
[0048] Figure 6C is a pseudo-color map of the Texas Coast provided by one embodiment of the present invention;
[0049] Figure 6D This is a real feature map of the Texas Coast provided by one embodiment of the present invention;
[0050] Figure 6E is a pseudo-color image of San Diego-II provided by one embodiment of the present invention;
[0051] Figure 6F This is a real feature map of San Diego-II provided by an embodiment of the present invention;
[0052] Figure 6G is a pseudo-color image of HYDICE provided by one embodiment of the present invention;
[0053] Figure 6H is a real feature map of HYDICE provided by an embodiment of the present invention;
[0054] Figure 6I is a pseudo-color image of San Diego-I provided by one embodiment of the present invention;
[0055] Figure 6J This is a real feature map of San Diego-I provided by an embodiment of the present invention;
[0056] Figure 6K is a pseudo-color image of Cement Street provided by one embodiment of the present invention;
[0057] Figure 6L This is a real feature map of Cement Street provided by an embodiment of the present invention;
[0058] Figure 6M is a pseudo-color image of Holly provided by one embodiment of the present invention;
[0059] Figure 6N is a real feature map of Holly provided by an embodiment of the present invention;
[0060] Figure 6O is a pseudo-color image of Jungle provided by an embodiment of the present invention;
[0061] Figure 6P It is a real feature map of Jungle provided by an embodiment of the present invention;
[0062] Figure 7A : is a ROC curve diagram of the detection result of the image before dimensionality reduction using the MF method provided by one embodiment of the present invention;
[0063] Figure 7B : This is a ROC curve diagram of the detection results of the image after dimensionality reduction using the MF method provided by one embodiment of the present invention;
[0064] Figure 7C 1 is a ROC curve diagram of the detection results of the image before dimensionality reduction using the ACE method provided by one embodiment of the present invention;
[0065] Figure 7D 1 is a ROC curve diagram of the detection results of the image after dimensionality reduction using the ACE method provided by one embodiment of the present invention;
[0066] Figure 7E 1 is a ROC curve diagram of the detection results of the image before dimensionality reduction using the HUD method provided by one embodiment of the present invention;
[0067] Figure 7F 1 is a ROC curve diagram of the detection results of the image after dimensionality reduction using the HUD method provided by one embodiment of the present invention;
[0068] Figure 7G1 is a ROC curve diagram of the detection results of the image before dimensionality reduction using the RGAE method provided by one embodiment of the present invention;
[0069] Figure 7H 1 is a ROC curve diagram of the detection results of the image after dimensionality reduction using the RGAE method provided by one embodiment of the present invention;
[0070] Figure 7I 1 is a ROC curve diagram of the detection results of the image before dimensionality reduction using the Auto-AD method provided by one embodiment of the present invention;
[0071] Figure 7J 1 is a ROC curve diagram of the detection results of the image after dimensionality reduction using the Auto-AD method provided by one embodiment of the present invention;
[0072] Figure 8 2 is a schematic structural diagram of a hyperspectral data dimensionality reduction device that retains spatial information provided by an embodiment of the present invention;
[0073] Figure 9 FIG. 4 is a schematic diagram of a terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0074] In the following description, specific details such as particular system structures and techniques are provided for purposes of illustration, not limitation, to facilitate a thorough understanding of the embodiments of the present invention. However, it will be apparent to those skilled in the art that the present invention may be practiced in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
[0075] In order to make the purpose, technical solutions and advantages of the present invention more clear, specific embodiments will be described below with reference to the accompanying drawings.
[0076] See also Figure 1 , which shows a flowchart of the implementation of the hyperspectral data dimensionality reduction method for retaining spatial information provided by an embodiment of the present invention, and is described in detail as follows:
[0077] Step 101: Acquire an initial hyperspectral image.
[0078] In this embodiment, hyperspectral images are collected at close range by satellite / airborne equipment or ground-based handheld equipment, combining one-dimensional spectral information reflecting the essential characteristics of various types of objects in the target area with two-dimensional spatial structure information of the entire area, providing support for application tasks such as fine object classification, specific / abnormal target detection, and composition inversion.
[0079] In step 102 , the degree of spatial structure preservation is added as an optimization item, and a minimum noise separation transformation is performed on the initial hyperspectral image to obtain a preliminary dimensionality reduction image.
[0080] In this embodiment, the signal-to-noise ratio of the hyperspectral image greatly affects the processing and analysis results. In order to retain important information and reduce the impact of noise, it is necessary to ensure that the data after dimensionality reduction has a high signal-to-noise ratio. Transformation-based dimensionality reduction methods only consider reducing spectral dimensions and retaining spectral information, without considering that the spatial structure may change during the transformation process. As current hyperspectral image processing-related algorithm models are increasingly mining two-dimensional spatial features and information utilization is increasing, dimensionality reduction technologies at the upstream end of the task should consider retaining spatial information.
[0081] Minimum Noise Fraction Rotation (MNF Rotation) is a technique used in remote sensing image processing. Its core purpose is to maximize noise separation while reducing data dimensionality, thereby reducing the computational requirements of subsequent processing. MNF essentially consists of two stacked principal component transformations: the first transformation is based on the estimated noise covariance matrix, which is used to separate and readjust the noise in the data so that the transformed noise data has only the minimum variance and no correlation between bands; the second is a standard principal component transformation of the noise-whitened data. After the MNF transformation, the components are independent of each other and are arranged from large to small according to the signal-to-noise ratio, which makes it superior to the traditional PCA transformation in processing noise. Through the MNF transformation, the main information of a multi-band image can be concentrated in the first few bands, thereby achieving data dimensionality reduction and denoising.
[0082] However, the hyperspectral image dimensionality reduction method based on the minimum noise separation transform only considers the signal-to-noise ratio sorting of the transformed bands, but does not take into account the preservation of spatial structural information. Based on the minimum noise separation transform, this embodiment addresses the issue of spatial information preservation by adding a spatial information term to the minimum noise separation transform formula, maximizing the signal-to-noise ratio (SNR) and structural similarity (SSIM). The dimensionality reduction transform matrix is solved with maximizing the signal-to-noise ratio and image structural similarity as the optimization terms, so that the spatial information is retained as much as possible when the transformed bands are sorted by signal-to-noise ratio.
[0083] Step 103 : Based on the spectral structure similarity between the preliminary dimensionality reduction image and the initial hyperspectral image, the bands in the preliminary dimensionality reduction image are selected to obtain a final dimensionality reduction image.
[0084] In this embodiment, the transformation-based hyperspectral image data dimensionality reduction method only realizes the sorting of the transformed bands from large to small according to the signal-to-noise ratio. Although the functions of noise reduction and sorting are completed, it does not clarify which bands are used, and the dimensionality reduction without band selection is performed. As a result, the image after dimensionality reduction still has a large amount of data, which brings a large computational burden to subsequent processing.
[0085] To address this issue, this embodiment designs a band selection strategy to select the optimal bands after transformation. The strategy calculates the average change in the position of all hyperspectral image pixels relative to the center pixel in the feature space. This average change represents the spectral data structure, and the band group that most closely matches the spectral data structure of the hyperspectral image before transformation is used as the final dimensionality reduction result. This approach effectively solves the problem of determining the number of bands after hyperspectral image dimensionality reduction.
[0086] The embodiment of the present invention adds the degree of spatial structure preservation as an optimization item and performs minimum noise separation transformation, so that the spatial information can be retained as much as possible when the transformed bands are sorted according to the signal-to-noise ratio; the bands in the preliminary dimensionality reduction spectrum image are selected based on the spectral structure similarity, and the band group closest to the spectral data structure of the hyperspectral image before transformation is used as the final dimensionality reduction result, thereby achieving a better dimensionality reduction effect while retaining the spatial information.
[0087] In one possible implementation, the degree of spatial structure preservation is added as an optimization item, and the initial hyperspectral image is subjected to a minimum noise separation transformation to obtain a preliminary dimensionality reduction image, including:
[0088] Matrixing the initial hyperspectral image according to the wavelength band to obtain a first initial matrix;
[0089] Taking the maximum signal-to-noise ratio and spatial structure information retention as the optimization goal, the first initial matrix is transformed into a principal component based on the orthogonal constraint to obtain a dimension reduction transformation matrix;
[0090] Based on the effect of the dimensionality reduction transformation matrix on the first initial matrix, a preliminary dimensionality reduction image is obtained.
[0091] In this embodiment, the spatial dimension is considered when solving the transformation formula. In order to facilitate the linear combination of bands and the calculation of spatial structure similarity, as shown in FIG. Figure 3 As shown, the observed hyperspectral image is described as the first initial matrix according to the band Among them, S is the noise-free hyperspectral image, p is the number of bands, and n is the number of pixels in each band.
[0092] The core purpose of the dimensionality reduction method based on linear transformation is to find a transformation matrix A to transform the hyperspectral image X into a preliminary dimensionality reduction image Z. In fact, the first band z1 after transformation is composed of x1, x2, ..., x p The linear combination of is obtained, with coefficient a1. Similarly, zi The corresponding coefficient is a i x1,x2,…,x p Perform linear combination to get X. X is transformed by the matrix A to get:
[0093]
[0094] Considering the situation of z1, the present invention hopes that the first band z1 has a high signal-to-noise ratio after linear transformation and can retain more spatial structure information in the original hyperspectral image. i The signal-to-noise ratio and spatial information of z1 decrease in turn. First, we need to measure the signal-to-noise ratio and spatial structure information retention of z1.
[0095] ①Define the signal-to-noise ratio of z1 as the mean of the squares of all pixel values in z1 divided by the variance of the noise in z1, that is, the signal-to-noise ratio
[0096] ② Define the degree of preservation of the spatial structural information of z1 after transformation as the structural similarity index (SSIM) between z1 and X. SSIM(x,y)=l(x,y) α c(x,y) β s(x,y) γ ,in is the brightness comparison function, is the contrast comparison function, is the structure comparison function, μ is the mean, and σ is the variance. Substituting α=β=γ=1, C1=C2=C3=0, z1,X into the formula, we get the degree of preservation of the spatial structure information of z1:
[0097]
[0098] in, is the average value of all bands of X, is the average value of all pixels in X, x ij is the value of the jth pixel in the i-th band.
[0099] In one possible implementation, the objective function of performing principal component transformation on the first initial matrix is:
[0100]
[0101] Among them, f is the signal-to-noise ratio, g is the structural similarity index, z i is the element of the i-th band in the initial dimensionality reduction image, n i is the noise of the i-th band in the initial dimensionality reduction image, is the transpose of the i-th element in the dimensionality reduction transformation matrix, N is the noise covariance matrix, n is the number of pixels in each band, X is the first initial matrix, is the average value of all pixels in the first initial matrix, is the average value of all bands of the first initial matrix.
[0102] In this embodiment, it is expected that the signal-to-noise ratio f and the spatial structure information retention degree g of z1 are as large as possible. For the convenience of calculation, the problem can be described as follows: The solution of a1 when it is minimum. At the same time, according to z i The signal-to-noise ratio should be at all points orthogonal to z j (j=1,…,i-1) is the smallest, then a i The standardization should meet a i T C X a i =1, this condition ensures that the transformed vector a i It can correctly 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 a i The consistency of its direction and size is still maintained. This ensures that important signal information will not be weakened or lost during data dimensionality reduction and noise separation, while effectively reducing the impact of noise. The problem is expressed as:
[0103]
[0104] Among them, C X is the covariance matrix of X. The traditional minimum noise separation transform only expects that the noise ratio of z1 is small, that is, the ratio of the noise variance to the total variance is obtained. The solution with the minimum a1 is chosen, while the present invention chooses to maximize both the signal-to-noise ratio and the degree of spatial structure information preservation, so that the spatial information can be preserved.
[0105] In the process of solving the formula to obtain the dimension reduction transformation matrix A, the minimization problem can be transformed into a conditional extreme value problem and solved using the Lagrange multiplier method. Let h is under the constraint a1 T C X When a1=1, the value of the inverse of the signal-to-noise ratio minus the degree of preservation of spatial structure information. f is the signal-to-noise ratio of z1, g is the degree of preservation of spatial structure information after z1 transformation, is an orthogonal constraint. When the derivative of h is 0, h reaches its extreme value. h can be simplified as follows:
[0106]
[0107] in,
[0108] Taking partial derivative of h we get:
[0109] By analogy, a i This formula is also applied to the solution of , that is, the unit eigenvector a1 corresponding to the largest eigenvalue is obtained, and the eigenvector a corresponding to the subsequent i-th largest eigenvalue is obtained. i From this, solving for its generalized eigenvector yields the transformation matrix A, and the transformed image is Z = AX. This transformation separates the noise and signal components of the original image. The resulting component bands are uncorrelated and are sorted from highest to lowest based on signal-to-noise ratio and spatial information preservation.
[0110] During the solution process, is the signal value defined in this article, so it should be as large as possible, then And satisfy the orthogonal constraints above The solution process is similar to the above solution process. Let Find the partial derivative Get The solution of γ can be transformed into a generalized eigenvalue problem: XX T a1=γC X a1
[0111] Taking the average we get:
[0112] In a possible implementation, before matrixing the initial hyperspectral image according to wavelength bands to obtain a first initial matrix, the method further includes:
[0113] The initial hyperspectral image is denoised by the noise covariance matrix to obtain a noise-free hyperspectral image;
[0114] Accordingly, the initial hyperspectral image is matrixed according to the band to obtain a first initial matrix, including:
[0115] The noise-free hyperspectral image is matrixed according to the wavelength bands to obtain a first initial matrix.
[0116] 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, thereby obtaining a reduced-dimensionality image with a higher signal-to-noise ratio.
[0117] In one possible implementation, based on the spectral structure similarity between the preliminary dimensionality reduction image and the initial hyperspectral image, bands in the preliminary dimensionality reduction image are selected to obtain a final dimensionality reduction image, including:
[0118] The initial hyperspectral image is matrixed according to the spectral dimension to obtain a second original matrix, and the preliminary dimension-reduced image is matrixed to obtain a preliminary dimension-reduced image matrix; wherein each element in the second original matrix and the preliminary dimension-reduced image matrix is a spectral curve of a band;
[0119] For the spectral curve of each band, the spectral angle, Euclidean distance and Mahalanobis distance between the spectral curve and the mean spectral curve in the second original matrix are calculated as the spectral structure of the spectral curve in the second original matrix;
[0120] For the spectral curve of each band, the spectral angle, Euclidean distance and Mahalanobis distance between the spectral curve and the mean spectral curve in the preliminary dimensionality reduction image matrix are calculated as the spectral structure of the spectral curve in the preliminary dimensionality reduction image matrix;
[0121] For the spectral curve of each band, calculating the spectral structure similarity between the spectral curve in the preliminary dimension-reduced image matrix and the spectral curve in the second original matrix;
[0122] 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 preliminary dimensionality reduction image matrix to form the final dimensionality reduction image.
[0123] In this embodiment, the bands in Z after transformation are sorted from large to small according to the signal-to-noise ratio and the degree of spatial information retention. In order to quickly eliminate the low signal-to-noise ratio bands and improve the calculation efficiency, the first 10% of the bands in Z can be selected as the band group for subsequent processing, and the band strategy screening is performed on this basis. Construct a preliminary dimensionality reduction image, where Z l For the first 10% bands of Z, l = [p / 10] is the original number of bands p multiplied by 10% and then rounded down.
[0124] Focus on its spectral dimension when performing strategy screening and redescribe the hyperspectral image where x i , z i is the spectral curve. The structure of the second original matrix is as follows Figure 3 shown.
[0125] In order to screen out Z l On the basis of , we further reduce the number of bands and design the selection strategy as follows:
[0126] ①Select Z l The first k bands Calculate k from 1 to l in sequence, The spectral structure similarity with the original hyperspectral image X.
[0127] ② 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 As shown in the figure, the spectral angle, Euclidean distance and Mahalanobis distance of the i-th spectral curve and the mean spectral curve are obtained. The calculation is the same as Figure 5 .
[0128] ③Measure the spectral structure of X and The similarity between the spectral structures is measured by the mean square error, that is, the difference between the values in the two spectral structures is taken, and then the square is calculated and the average value is obtained.
[0129] ④ Get X and The spectral structure similarity of l similarity values in total is used to find the k value corresponding to the minimum similarity, which is recorded as t, and finally the screening result is obtained.
[0130] In one possible implementation, the calculation formula for spectral structure similarity is:
[0131]
[0132] Among them, Δ k is the spectral structure similarity between the spectral curves of the first k bands in the initial dimension-reduced image matrix and the spectral curves of the first k bands in the second original matrix, Δθ k is the difference in spectral angle between the spectral curves of the first k bands in the initial dimension-reduced image matrix and the spectral curves of the first k bands in the second original matrix, ΔD k is the difference in Euclidean distance between the spectral curves of the first k bands in the initial dimension-reduced image matrix and the spectral curves of the first k bands in the second original matrix, ΔM k It is the difference between the Mahalanobis distances of the spectral curves of the first k bands in the initial dimension-reduced image matrix and the spectral curves of the first k bands in the second original matrix.
[0133] In this embodiment, the specific calculation process of the spectral structure similarity is as follows:
[0134]
[0135] in, C1 is the covariance matrix of X, for The covariance matrix of .
[0136] In one possible implementation, the calculation formula for determining the optimal number of dimensionality reduction bands t based on the similarity of each spectral structure is:
[0137] t=argminΔ k
[0138] Among them, t is the number of optimal dimensionality reduction bands, Δ k It is the spectral structure similarity between the spectral curves of the first k bands in the initial dimension-reduced image matrix and the spectral curves of the first k bands in the second original matrix.
[0139] In this embodiment, the following are calculated: Spectral structure similarity Δ with X k , when Δ k When the minimum value is reached, the t value is obtained, that is, t = argminΔ k .at this time, For the final screening results, they are combined into the final dimensionality reduction image.
[0140] In a specific embodiment, the verification process of the method provided by the present invention Figure 5 As shown, including:
[0141] ① Solve the minimum noise separation transformation formula with added spatial information term
[0142] ② Use the transformation matrix to transform the hyperspectral image and sort the signal-to-noise ratio of the bands
[0143] ③Calculate the average change of all pixels in the original hyperspectral image relative to the central pixel
[0144] ④ Calculate the average change of all pixels in the first t bands of the transformed hyperspectral image relative to the central pixel
[0145] ⑤Enter all values of t and repeat step ④
[0146] ⑥ Compare the values of ③ and ④. When the two are closest, the optimal t value is obtained, and the final dimensionality reduction band can be determined, and then the final dimensionality reduction image can be obtained.
[0147] The validation data includes public hyperspectral images and private near-surface hyperspectral images. Near-surface hyperspectral images were captured using an imaging spectrometer. The image spatial dimension is 1002×1002 pixels, the spectral dimension is 89, and the band spacing is 4nm. Images are taken within the range of 449nm-801nm. The pseudo-color images of the validation data are similar to the target distribution map. Figure 6A-6P shown.
[0148] The effectiveness of the proposed method was verified using target detection for typical downstream tasks. RX, CEM, 2S-GLRT, MF, ACE, HUD, RGAE, and Auto-AD were selected as test methods and tested on hyperspectral images before and after dimensionality reduction. The effectiveness of the detection methods was measured using the receiver operating characteristic (ROC) and the area under the curve (AUC). Figures 7A-7J The detection effect of the target detection algorithm before and after dimensionality reduction is demonstrated. Table 1 shows the average AUC values of different detection methods under all data. To ensure the rationality of the input parameters, median filtering (Median filtering), spectral and spatial de-correlation method (SSDC method), modified residual method (MRmethod) and hyperspectral restoration (HyRes) are selected to obtain the noise covariance matrix respectively. It has been verified that the present invention can retain spatial spectral information as a whole, ensuring the effective implementation of downstream tasks.
[0149] Table 1
[0150]
[0151]
[0152] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean 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.
[0153] The following are device embodiments of the present invention. For details not fully described therein, reference may be made to the corresponding method embodiments described above.
[0154] Figure 8 The following is a schematic diagram showing the structure of a hyperspectral data dimensionality reduction device that retains spatial information according to an embodiment of the present invention. For ease of explanation, only the parts related to the embodiment of the present invention are shown, which are described in detail as follows:
[0155] like Figure 8 As shown, the hyperspectral data dimensionality reduction device 8 retaining spatial information includes:
[0156] An acquisition module 81 is used to acquire an initial hyperspectral image;
[0157] A transformation module 82 is used to add the degree of spatial structure preservation as an optimization item, perform minimum noise separation transformation on the initial hyperspectral image, and obtain a preliminary dimensionality reduction image;
[0158] The selection module 83 is used to select the bands in the preliminary dimension-reduced spectrum image based on the spectral structure similarity between the preliminary dimension-reduced spectrum image and the initial hyperspectral image to obtain a final dimension-reduced image.
[0159] In a possible implementation, the transformation module 82 is specifically configured to:
[0160] Matrixing the initial hyperspectral image according to the wavelength band to obtain a first initial matrix;
[0161] Taking the maximum signal-to-noise ratio and spatial structure information retention as the optimization goal, the first initial matrix is transformed into a principal component based on the orthogonal constraint to obtain a dimension reduction transformation matrix;
[0162] Based on the effect of the dimensionality reduction transformation matrix on the first initial matrix, a preliminary dimensionality reduction image is obtained.
[0163] In one possible implementation, the objective function of performing principal component transformation on the first initial matrix is:
[0164]
[0165]
[0166] Among them, f is the signal-to-noise ratio, g is the structural similarity index, z i is the element of the i-th band in the initial dimensionality reduction image, n i is the noise of the i-th band in the initial dimensionality reduction image, is the transpose of the i-th element in the dimensionality reduction transformation matrix, N is the noise covariance matrix, n is the number of pixels in each band, X is the first initial matrix, is the average value of all pixels in the first initial matrix, is the average value of all bands of the first initial matrix.
[0167] In a possible implementation, the transformation module 82 is further configured to:
[0168] Before matrixing the initial hyperspectral image according to the wavelength band to obtain a first initial matrix, the initial hyperspectral image is denoised by using a noise covariance matrix to obtain a noise-free hyperspectral image;
[0169] Accordingly, the initial hyperspectral image is matrixed according to the band to obtain a first initial matrix, including:
[0170] The noise-free hyperspectral image is matrixed according to the wavelength bands to obtain a first initial matrix.
[0171] In a possible implementation, the selection module 83 is specifically configured to:
[0172] The initial hyperspectral image is matrixed according to the spectral dimension to obtain a second original matrix, and the preliminary dimension-reduced image is matrixed to obtain a preliminary dimension-reduced image matrix; wherein each element in the second original matrix and the preliminary dimension-reduced image matrix is a spectral curve of a band;
[0173] For the spectral curve of each band, the spectral angle, Euclidean distance and Mahalanobis distance between the spectral curve and the mean spectral curve in the second original matrix are calculated as the spectral structure of the spectral curve in the second original matrix;
[0174] For the spectral curve of each band, the spectral angle, Euclidean distance and Mahalanobis distance between the spectral curve and the mean spectral curve in the preliminary dimensionality reduction image matrix are calculated as the spectral structure of the spectral curve in the preliminary dimensionality reduction image matrix;
[0175] For the spectral curve of each band, calculating the spectral structure similarity between the spectral curve in the preliminary dimension-reduced image matrix and the spectral curve in the second original matrix;
[0176] 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 preliminary dimensionality reduction image matrix to form the final dimensionality reduction image.
[0177] In one possible implementation, the calculation formula for spectral structure similarity is:
[0178]
[0179] Among them, Δ k is the spectral structure similarity between the spectral curves of the first k bands in the initial dimension-reduced image matrix and the spectral curves of the first k bands in the second original matrix, Δθ k is the difference in spectral angle between the spectral curves of the first k bands in the initial dimension-reduced image matrix and the spectral curves of the first k bands in the second original matrix, ΔD k is the difference in Euclidean distance between the spectral curves of the first k bands in the initial dimension-reduced image matrix and the spectral curves of the first k bands in the second original matrix, ΔM k It is the difference between the Mahalanobis distances of the spectral curves of the first k bands in the initial dimension-reduced image matrix and the spectral curves of the first k bands in the second original matrix.
[0180] In one possible implementation, the calculation formula for determining the optimal number of dimensionality reduction bands t based on the similarity of each spectral structure is:
[0181] t=argminΔ k
[0182] Among them, t is the number of optimal dimensionality reduction bands, Δ k It is the spectral structure similarity between the spectral curves of the first k bands in the initial dimension-reduced image matrix and the spectral curves of the first k bands in the second original matrix.
[0183] The embodiment of the present invention adds the degree of spatial structure preservation as an optimization item and performs minimum noise separation transformation, so that the spatial information can be retained as much as possible when the transformed bands are sorted according to the signal-to-noise ratio; the bands in the preliminary dimensionality reduction spectrum image are selected based on the spectral structure similarity, and the band group closest to the spectral data structure of the hyperspectral image before transformation is used as the final dimensionality reduction result, thereby achieving a better dimensionality reduction effect while retaining the spatial information.
[0184] Figure 9 Schematic diagram of a terminal provided by an embodiment of the present invention. Figure 9 As shown, the terminal 9 of 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, the steps in the above-mentioned embodiments of the hyperspectral data dimensionality reduction method retaining spatial information are implemented, such as Figure 1 Alternatively, when the processor 90 executes the computer program 92, the functions of the modules / units in the above-mentioned device embodiments are realized, for example, Figure 8 Functions of the modules / units 81 to 83 shown.
[0185] Exemplarily, the computer program 92 may be divided into one or more modules / units, which are stored in the memory 91 and executed by the processor 90 to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program 92 in the terminal 9. For example, the computer program 92 may be divided into Figure 8 Modules / units 81 to 83 are shown.
[0186] The terminal 9 can be a computing device such as a desktop computer, a notebook, a palmtop computer, a cloud server, etc. The terminal 9 can include, but is not limited to, a processor 90 and a memory 91. It can be understood by those skilled in the art that Figure 9 It is only an example of terminal 9 and does not constitute a limitation on terminal 9. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal may also include input and output devices, network access devices, buses, etc.
[0187] The processor 90 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0188] 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, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal 9. Furthermore, the memory 91 can also include both the internal storage unit of the terminal 9 and an external storage device. 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 is about to be output.
[0189] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by 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 embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0190] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.
[0191] Those skilled in the art will appreciate that the units and algorithm steps of each example 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 performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.
[0192] In the embodiments provided by the present 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 example, the division of the modules or units is merely a logical functional division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interface, indirect coupling or communication connection of devices or units, and can be electrical, mechanical, or other forms.
[0193] The units described as separate components may or may not be physically separate, and 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 these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0194] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0195] 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, the present invention can also implement all or part of the processes in the above-mentioned embodiment method by instructing the relevant hardware through a computer program. 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 each embodiment of the hyperspectral data dimensionality reduction method that retains spatial information. The computer program includes computer program code, which can be in source code form, object code form, executable file, or some intermediate form. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practices in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practices, computer-readable media does not include electrical carrier signals and telecommunication signals.
[0196] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention, and should all be included in the scope of protection of the present invention.
Claims
1. A method for reducing the dimensionality of hyperspectral data while preserving spatial information, characterized in that: include: Acquire an initial hyperspectral image; The degree of spatial structure preservation is added as an optimization item, and the initial hyperspectral image is subjected to minimum noise separation transformation to obtain a preliminary dimensionality reduction image. Based on the spectral structure similarity between the preliminary dimensionality reduction image and the initial hyperspectral image, the bands in the preliminary dimensionality reduction image are selected to obtain a final dimensionality reduction image.
2. The method for reducing the dimension of hyperspectral data while preserving spatial information according to claim 1, characterized in that: The degree of spatial structure preservation is added as an optimization item to perform minimum noise separation transformation on the initial hyperspectral image to obtain a preliminary dimensionality reduction image, including: Matrixing the initial hyperspectral image according to the wavelength band to obtain a first initial matrix; Taking the maximum signal-to-noise ratio and spatial structure information retention as the optimization goal, based on the orthogonal constraint, the first initial matrix is transformed into a principal component to obtain a dimension reduction transformation matrix; Based on the effect of the dimensionality reduction transformation matrix on the first initial matrix, a preliminary dimensionality reduction image is obtained.
3. The method for reducing the dimension of hyperspectral data while preserving spatial information according to claim 2, characterized in that: The objective function of principal component transformation of the first initial matrix is: Among them, f is the signal-to-noise ratio, g is the structural similarity index, z i is the element of the i-th band in the preliminary dimensionality reduction image, n i is the noise of the i-th band in the preliminary dimensionality reduction image, is the transpose of the i-th element in the dimensionality reduction transformation matrix, N is the noise covariance matrix, n is the number of pixels in each band, X is the first initial matrix, is the average value of all pixels in the first initial matrix, is the average value of all bands of the first initial matrix.
4. The method for reducing the dimension of hyperspectral data while preserving spatial information according to claim 3, characterized in that: Before matrixing the initial hyperspectral image according to the wavelength bands to obtain the first initial matrix, the method further includes: The initial hyperspectral image is denoised by the noise covariance matrix to obtain a noise-free hyperspectral image; Accordingly, the initial hyperspectral image is matrixed according to the wavelength bands to obtain a first initial matrix, including: The noise-free hyperspectral image is matrixed according to wavelength bands to obtain a first initial matrix.
5. The method for reducing the dimension of hyperspectral data while preserving spatial information according to claim 1, wherein: The step of selecting a band in the preliminary dimensionality reduction image based on the spectral structure similarity between the preliminary dimensionality reduction image and the initial hyperspectral image to obtain a final dimensionality reduction image includes: Matrixing the initial hyperspectral image according to the spectral dimension to obtain a second original matrix, and matrixing the preliminary reduced-dimensionality image to obtain a preliminary reduced-dimensionality image matrix; wherein each element in the second original matrix and the preliminary reduced-dimensionality image matrix is a spectral curve of a band; For the spectral curve of each wavelength band, calculating the spectral angle, Euclidean distance, and Mahalanobis distance between the spectral curve and the mean spectral curve in the second original matrix as the spectral structure of the spectral curve in the second original matrix; For the spectral curve of each band, calculating the spectral angle, Euclidean distance and Mahalanobis distance between the spectral curve and the mean spectral curve in the preliminary dimensionality reduction image matrix as the spectral structure of the spectral curve in the preliminary dimensionality reduction image matrix; For the spectral curve of each band, calculating the spectral structure similarity between the spectral curve in the preliminary dimensionality reduction image matrix and the spectral curve in the second original matrix; The optimal number t of dimension reduction bands is determined based on the minimum value of the similarity of each spectral structure, and the first t bands are selected from the preliminary dimension reduction image matrix to form a final dimension reduction image.
6. The method for reducing the dimension of hyperspectral data while preserving spatial information according to claim 5, characterized in that: The calculation formula for spectral structure similarity is: Among them, Δ k is the spectral structure similarity between the spectral curves of the first k bands in the preliminary dimension-reduced image matrix and the spectral curves of the first k bands in the second original matrix, Δθ k The difference in spectral angle between the spectral curves of the first k bands in the initial dimension-reduced image matrix and the spectral curves of the first k bands in the second original matrix, ΔD k is the difference in Euclidean distance between the spectral curves of the first k bands in the initial dimension-reduced image matrix and the spectral curves of the first k bands in the second original matrix, ΔM k It is the difference between the Mahalanobis distances of the spectral curves of the first k bands in the preliminary dimension-reduced image matrix and the spectral curves of the first k bands in the second original matrix.
7. The method for reducing the dimension of hyperspectral data while preserving spatial information according to claim 5, characterized in that: The calculation formula for determining the optimal number of dimensionality reduction bands t based on the similarity of each spectral structure is: t=argminΔ k Among them, t is the number of optimal dimensionality reduction bands, Δ k It is the spectral structure similarity between the spectral curves of the first k bands in the preliminary dimension-reduced image matrix and the spectral curves of the first k bands in the second original matrix.
8. A hyperspectral data dimensionality reduction device that retains spatial information, characterized in that: include: An acquisition module, used to acquire an initial hyperspectral image; The transformation module is used to add the degree of spatial structure preservation as an optimization item, perform minimum noise separation transformation on the initial hyperspectral image, and obtain a preliminary dimensionality reduction image; The selection module is used to select the bands in the preliminary dimensionality reduction spectrum image based on the spectral structure similarity between the preliminary dimensionality reduction image and the initial hyperspectral image to obtain a final dimensionality reduction image.
9. A terminal comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
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
Method for reducing dimensions of hyper-spectral data on basis of pairwise constraint discriminate analysis and non-negative sparse divergence
CN103544507A
Maximum signal-to-noise ratio hyperspectral data dimension reduction method for multi-scale superpixel segmentation
CN111563544A
Hyperspectral image dimension reduction method based on tensor graph embedding
CN118097324A