Real-time feature extraction method for hyperspectral imaging and related equipment
By performing line sweep and trajectory matrix embedding on hyperspectral images, the problem of excessive trajectory matrix dimensions is solved, the calculation complexity and storage requirements are reduced, and feature extraction efficiency and accuracy are improved.
Patent Information
- Application Number
- CN202510004764.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-02
- Publication Date
- 2025-05-16
AI Technical Summary
In the existing hyperspectral image feature extraction methods, the trajectory matrix dimension is too high, resulting in increased computing complexity and storage space requirements.
By performing line sweeps on the hyperspectral image in the preset direction, using the preset window to embed pixels into the track matrix, and perform singular values decomposition, grouping, reconstruction and superposition to reduce the dimension of the track matrix.
It reduces the computational complexity and storage space requirements, improves data processing efficiency, and effectively improves the feature extraction accuracy of hyperspectral images.
Smart Images

Figure CN120014294A_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to the technical field of image feature extraction, and in particular to a real-time feature extraction method for hyperspectral imaging and related equipment. [Background technology]
[0002] As a statistical tool for time series analysis, singular spectrum analysis (SSA) has been successfully applied to feature extraction of hyperspectral images (HSI). It treats pixel-based spectral profiles as pseudo-time series signals, thereby effectively extracting the main spectral features in pixels. However, there are some defects, such as embedding each pixel independently into the trajectory matrix, which will cause the trajectory matrix dimension to be too high, increasing the computational complexity and storage space requirements. [Summary of the invention]
[0003] In view of this, the present invention provides a real-time feature extraction method for hyperspectral imaging and related equipment.
[0004] The specific technical scheme of the first embodiment of the present invention is: a real-time feature extraction method for hyperspectral imaging, the method comprising: performing line scanning on a hyperspectral image in a preset first direction to obtain a plurality of hyperspectral line scan images; using a preset window to embed each pixel in a hyperspectral line scan image into a picture to obtain a trajectory matrix of the hyperspectral line scan image; performing singular value decomposition and grouping on the trajectory matrix to obtain a plurality of grouping matrices; reconstructing each grouping matrix to obtain a two-dimensional signal of the hyperspectral line scan image; superimposing the two-dimensional signals of all the hyperspectral line scan images to obtain the features of the hyperspectral image.
[0005] Preferably, the reconstructing each grouping matrix to obtain the two-dimensional signal of the hyperspectral line scan image includes: dividing each grouping matrix according to the pixels of the hyperspectral image in a preset second direction to obtain a subset set of each grouping matrix; the subset set includes a plurality of non-overlapping subsets; the elements in all the subsets constitute the elements in the grouping matrix; performing element shifting and position filling on the elements in the subset set to obtain a shifted matrix; the number of columns of the shifted matrix is the same as the number of columns of the elements of the hyperspectral image in the preset first direction; obtaining a one-dimensional signal of each grouping matrix according to the shifted matrix and a preset binary vector; transposing the one-dimensional signals corresponding to all the grouping matrices to obtain the two-dimensional signal.
[0006] Preferably, the preset binary vector is obtained by the following method: if the element set in the target row of the moved matrix is greater than 0, the preset binary vector is 1, otherwise the preset binary vector is 0; the target row is any row in the moved matrix.
[0007] Preferably, the one-dimensional signal of each grouping matrix is obtained using the following formula:
[0008]
[0009] Among them, Y r is the one-dimensional signal, A k is the set of elements in the target row of the moved matrix, the target row is any row of the moved matrix, M k is the preset binary vector, and L is the size of the preset window.
[0010] Preferably, the moving and filling of elements in the subset set to obtain the moved matrix includes: moving all elements in the i-th subset set to the right by i-1 positions, and filling Li 0 elements after the last element in the i-th subset set after the move, and filling i-1 0 elements before the first element, to obtain the moved matrix; wherein L is the size of the preset window.
[0011] Preferably, the trajectory matrix is obtained using the following formula:
[0012]
[0013] Where X is the trajectory matrix, is a matrix, N x is the pixel of the hyperspectral image in the x direction, N λ is the number of spectral bands of the hyperspectral image, L is the size of the preset window, H r is the Hankel matrix corresponding to the rth pixel.
[0014] Preferably, the hyperspectral image is a radiation spectrum that has been calibrated with illumination.
[0015] The specific technical scheme of the second embodiment of the present invention is: a real-time feature extraction system for hyperspectral imaging, the system comprising: a line scan module, a data embedding module, a grouping module, a reconstruction module and an overlay module; the line scan module is used to perform line scans on the hyperspectral image in a preset first direction to obtain multiple hyperspectral line scan graphs; the data embedding module is used to use a preset window to embed each pixel in a hyperspectral line scan graph into a picture to obtain a trajectory matrix of the hyperspectral line scan graph; the grouping module is used to perform singular value decomposition and grouping on the trajectory matrix to obtain multiple grouping matrices; the reconstruction module is used to reconstruct each grouping matrix to obtain a two-dimensional signal of the hyperspectral line scan graph; the overlay module is used to overlay the two-dimensional signals of all hyperspectral line scan graphs to obtain the features of the hyperspectral image.
[0016] The specific technical solution of the third embodiment of the present invention is: a real-time feature extraction device for hyperspectral imaging, comprising a memory and a processor, the memory storing a computer program, and when the computer program is executed by the processor, the processor executes the steps of the method described in any one of the first embodiments of the present application.
[0017] The specific technical solution of the fourth embodiment of the present invention is: a computer-readable storage medium storing a computer program, which, when executed by a processor, enables the processor to perform the steps of the method described in any one of the first embodiments of the present application.
[0018] Implementing the embodiments of the present invention will have the following beneficial effects:
[0019] The present invention performs line scanning on a hyperspectral image in a preset first direction, and embeds all pixels in the hyperspectral line scan image after line scanning into a trajectory matrix. The trajectory matrix obtained in this way omits the dimension in the preset second direction compared to embedding each pixel in the hyperspectral image into a trajectory matrix respectively, thereby reducing the dimension of the trajectory matrix; the trajectory matrix is used to perform singular value decomposition, grouping, reconstruction and superposition to obtain a two-dimensional signal of the hyperspectral image, thereby reducing the computational complexity and storage space requirements.
Brief Description of the Drawings
[0020] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0021] Figure 1 A flowchart of the steps of a real-time feature extraction method for hyperspectral imaging;
[0022] Figure 2 Flowchart of steps for constructing trajectory matrix and feature extraction;
[0023] Figure 3 A flow chart of the steps for reconstructing the grouping matrix to obtain a two-dimensional signal;
[0024] Figure 4 It is a structural schematic diagram of a real-time feature extraction system for hyperspectral imaging;
[0025] Figure 5 It is a diagram of the internal structure of a computer device;
[0026] Among them, 201 is a line scanning module; 202 is a data embedding module; 203 is a grouping module; 204 is a reconstruction module; 205 is a superposition module. [Specific implementation method]
[0027] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0028] The terms "first", "second", etc. in the specification, claims and drawings of this application are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or modules is not limited to the listed steps or modules, but optionally includes steps or modules that are not listed, or optionally includes other steps or modules that are inherent to these processes, methods, products or devices.
[0029] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0030] See also Figure 1 , is a flowchart of the steps of a real-time feature extraction method for hyperspectral imaging in the first embodiment of the present application, thereby reducing the dimension of the trajectory matrix, the method comprising:
[0031] Step 101, performing line scanning on a hyperspectral image in a preset first direction to obtain a plurality of hyperspectral line scan images;
[0032] Step 102: embed each pixel in a hyperspectral line scan image into a picture using a preset window to obtain a trajectory matrix of the hyperspectral line scan image;
[0033] Step 103, performing singular value decomposition and grouping on one of the trajectory matrices to obtain a plurality of grouping matrices;
[0034] Step 104, reconstructing each grouping matrix to obtain a two-dimensional signal of the hyperspectral line scan image;
[0035] Step 105: superimpose the two-dimensional signals of all the hyperspectral line scan images to obtain the characteristics of the hyperspectral image.
[0036] Specifically, the preset first direction may be the y direction. For a hyperspectral image Each line scan can obtain a hyperspectral line scan image Among them, N x 、N y and N λ are the number of pixels and spectral bands of the hyperspectral image in the x and y directions of space, respectively. The number of hyperspectral line scans after line scanning is related to the interval of line scanning in the y direction. The larger the interval, the fewer the number of hyperspectral line scans. x is 100, N y When it is 50, the traditional SSA will obtain 100*50 trajectory matrices, while the present application will obtain 50 trajectory matrices after line scanning based on the y-direction line scanning, which is equivalent to omitting the dimension in the x-direction.
[0037] Before line scanning, a scanning direction, i.e., the first direction, needs to be preset. This direction is usually determined according to the shape of the object to be measured and the imaging requirements. The spectral camera or imaging spectral system scans along the preset first direction. During the scanning process, the imaging spectral system obtains the spectral information of all points on a line on the object each time. This information includes light intensity and reflectivity at different wavelengths, which are used for subsequent spectral analysis and image processing. After obtaining the spectral information on a line, the imaging spectral system moves in a direction perpendicular to the first direction (usually achieved by moving the object or the camera), and then scans again to obtain the spectral information on the next line. This is done line by line until the entire object to be measured is covered. The spectral information obtained during the scanning process will be stored to form multiple hyperspectral line scans. These images contain the spectral characteristics and spatial information of the object at different wavelengths, which can be used for subsequent spectral analysis, image processing, target recognition and other tasks. The line scanning method can efficiently obtain the spectral information of the object. Compared with the point scanning method, the line scanning method can generate hyperspectral images faster and improve the detection efficiency.
[0038] For a hyperspectral line scan image I, its matrix expression is:
[0039]
[0040] in, The Nth x Row, Nth λ Elements of a column.
[0041] During data embedding, see Figure 2 , use a one-dimensional window to construct the trajectory matrix. The window size K satisfies L∈[1,N λ]. In order to construct the trajectory matrix, a window of size L needs to be placed horizontally at all possible positions on I, where the moving path of the window is to scan pixel by pixel from the upper left corner to the lower right corner. In I, there are N x (N λ -L+1) possible window positions. The trajectory matrix X is defined by these windows.
[0042] In a specific embodiment, performing singular value decomposition and grouping on a trajectory matrix to obtain multiple grouping matrices includes: calculating XX T The eigenvalues of (T represents transposition) are arranged in descending order. The eigenvalues are expressed as e1≥e2≥…≥e L ≥0, the corresponding eigenvectors are denoted as U1, U2…U L The result of singular value decomposition is expressed as: X = X1 + X2 + ... + X L Based on the above singular value decomposition results, we can know that the trajectory matrix X is actually composed of multiple matrices added together. X l is called a grouping matrix of rank 1, These are usually called the principal components of the trajectory matrix X. The next step is grouping, where the index set [1,…,L] is divided into m disjoint subsets [t1,…,t m ], let t=[l1,…,l p ], satisfying 1≤l1≤l2≤…≤l p ≤L, the group t corresponding to the trajectory matrix (i.e., the group matrix) is defined as Similarly, all grouping matrices constitute the trajectory matrix X, which is:
[0043] To simplify the process, the typical grouping case is m = L, that is, p = 1, which means that each set consists of only one component. Generally speaking, the grouping matrix X t The contribution to the trajectory matrix X depends on the ratio of each eigenvalue to the sum of these eigenvalues as follows:
[0044]
[0045] Among them, η t is the grouping matrix X tContribution to the trajectory matrix X. The first n grouping matrices whose contribution rate reaches a preset value (the preset value is 95%) are extracted and retained, and the grouping matrices with a contribution rate less than 5% are treated as noise and removed. The remaining grouping matrices are reconstructed to obtain the two-dimensional signal of the hyperspectral line scan image; the two-dimensional signals of all the hyperspectral line scan images are superimposed to obtain the features of the hyperspectral image, and the above operations are performed on all the hyperspectral line scan images to finally obtain the real-time hyperspectral image features. The method in this embodiment can extract features in real time, rather than extracting features after acquiring data, thereby improving the efficiency of data processing, and also saving storage memory, and can directly store features.
[0046] The method in this embodiment scans the hyperspectral image in a preset first direction, and embeds all pixels in the hyperspectral line scan image after line scanning into the trajectory matrix. Compared with embedding all pixels in the hyperspectral image into a trajectory matrix, the trajectory matrix obtained in this way saves the dimension in the preset second direction. , thereby reducing the dimension of the trajectory matrix; singular value decomposition, grouping, reconstruction and superposition are performed using the trajectory matrix to obtain a two-dimensional signal of the hyperspectral image, thereby reducing the computational complexity and storage space requirements.
[0047] In a specific embodiment, the trajectory matrix is obtained using the following formula:
[0048]
[0049] Where X is the trajectory matrix, is a matrix, N x is the pixel of the hyperspectral image in the x direction (preset second direction), N λ is the number of spectral bands of the hyperspectral image, L is the size of the preset window, H r is the Hankel matrix corresponding to the rth pixel, i r ,N λ is an element in the rth pixel, 1 <L<<K<N(lambda)。
[0050] Specifically, given a hyperspectral image data of x=145, y=100, lambda=200. Each line scan obtains a 145*200 image data. Let L=5, K=200-5+1=196. So the trajectory matrix X is a 5*(145*196) matrix. The size of each H is 5*196. For any H, the first row of data is the first to Kth elements of the corresponding pixel, the second row of data is the second to K+1th elements, and the Lth row is the Lth element to the lambdath element. In a specific embodiment, the first row of the trajectory matrix is the 1st-196th elements, the second row is the 2nd-197th elements, and the last row is the 5th-200th elements.
[0051] In the specific embodiments, see Figure 3 In step 104, each grouping matrix is reconstructed to obtain a two-dimensional signal of the hyperspectral line scan image, including:
[0052] Step 201, dividing each grouping matrix according to the pixels of the hyperspectral image in a preset second direction to obtain a subset set of each grouping matrix; the subset set includes a plurality of non-overlapping subsets; the elements in all the subsets constitute the elements in the grouping matrix;
[0053] Step 202: Move and fill the elements in the subset set to obtain a matrix after movement; the number of columns of the matrix after movement is the same as the number of columns of the elements of the hyperspectral image in a preset first direction;
[0054] Step 203: Obtain a one-dimensional signal of each grouping matrix according to the moved matrix and the preset binary vector; transpose the one-dimensional signals corresponding to all the grouping matrices to obtain the two-dimensional signal.
[0055] Specifically, let X t Divided into N x disjoint subsets X t,r ,r∈[1,N x ], when dividing, the subsets are sorted according to the order of the divided subsets, such as X t Get X in the order of division t,1 (a 1,1 、a 1,2 …a 1,K ),X t,2 (a 2,1 、a 2,2 …a 2,K )…X t,L (a L,1 、a L,2 …a L,K ), then the sorting order of the subset is also X t,1 , X t,2 …X t,L . Move and fill the elements in the subset set to obtain the moved matrix Z r According to the moved matrix Z r and the preset binary vector M k Get the one-dimensional signal of each group matrix Transpose the one-dimensional signals corresponding to all grouping matrices to obtain the two-dimensional signal Y t The above operations are performed on all hyperspectral line scans to finally obtain real-time hyperspectral image features. Right now
[0056] In a specific embodiment, the preset binary vector is obtained by the following method: if the element set in the target row of the moved matrix is greater than 0, the preset binary vector is 1, otherwise the preset binary vector is 0; the target row is any row in the moved matrix.
[0057] Specifically, the preset binary vector M k Use the following formula to obtain: Binary vectors, with their concise representation of 0s and 1s, make data more efficient when stored and transmitted. This compact data structure helps reduce the need for storage space and transmission bandwidth. Binary vectors have the characteristic of strong anti-interference ability. During data transmission or processing, even if some bits are flipped or lost, the original data can still be restored through error correction algorithms. One-dimensional signals are usually easier for humans to understand and interpret. By converting a multi-dimensional matrix into a one-dimensional signal, the characteristics and trends of the data can be more intuitively displayed.
[0058] In a specific embodiment, the one-dimensional signal of each grouping matrix is obtained using the following formula:
[0059]
[0060] Among them, Y r is the one-dimensional signal, A k is the set of elements in the target row of the moved matrix, the target row is any row of the moved matrix, M k is the preset binary vector, L is the size of the preset window, where r∈[1,N x ], for each X t,r Repeat this step to obtain the reconstructed two-dimensional signal
[0061] In a specific embodiment, the elements in the subset set are moved and filled in positions to obtain the moved matrix, which includes: moving all the elements in the i-th subset set to the right by i-1 positions, and filling Li 0 elements after the last element in the i-th subset set after the move, and filling i-1 0 elements before the first element, to obtain the moved matrix; wherein L is the size of the preset window.
[0062] Specifically, when the subset set is a 5*196 matrix, and the number of columns of the elements of the hyperspectral image in the preset first direction is 200, the elements are moved and the positions are filled for each subset in the subset set, that is, the matrix is Converted to the moved matrix Among them, Z r Each row of A k ,k∈[1,L] contains K non-zero values and L-1 zero values.
[0063] In a specific embodiment, the hyperspectral image is a radiation spectrum that has been calibrated by illumination. Specifically, in the hyperspectral data processing, in order to reduce the influence of changes in illumination conditions on the results, the original radiation spectrum s is firstly subjected to illumination calibration and converted into a reflected hyperspectral image r, and the formula is as follows: The original radiation spectrum data may be affected by various factors such as sunlight and atmospheric conditions, resulting in inaccurate data. Through illumination calibration, the influence of these external factors on the spectrum data can be eliminated, making the data more accurate and reliable. The data after illumination calibration and reflectance conversion has better stability and can reduce data fluctuations caused by changes in lighting conditions. This helps to improve the quality and reliability of the data and provide a more stable data foundation for subsequent analysis and modeling.
[0064] The traditional singular spectrum analysis method (SSA) embeds each pixel into a trajectory matrix, while the method in this embodiment embeds a line scan image into a trajectory matrix. This method greatly reduces the complexity of the algorithm, especially in processing high-resolution hyperspectral data. In terms of the algorithm calculation efficiency of singular value decomposition and grouping, L 3 N y (N x -1) and L 2 pN y (N x -1) computational complexity. In terms of reconstruction, the space complexity of the method in this embodiment is O(LN λ ), while the reconstruction space complexity of the original SSA algorithm is O(L 2 +(KL)L+(N λ -K) 2). The method in this embodiment uses vectorized operations to avoid element-level loops, and the memory access efficiency is higher. At the same time, the code implementation is very simple, easy to maintain and expand. However, SSA needs to calculate each element separately, and each loop needs to calculate complex indexes, which increases the computational burden of the CPU. In the classification task, taking Indian Pines as an example, see Table 1, the traditional feature extraction calibrated reflectance spectrum (RAW), principal component analysis (PCA), folded-PCA (FPCA), singular spectrum analysis (SSA) plus SVM method and deep learning algorithm (deep1DCNN, stacked autoencoder (SAE), vision transformer (ViT)) and the classification accuracy comparison table of this application show that the method in this application can effectively improve the classification accuracy.
[0065]
[0066] Table 1: Classification accuracy of each algorithm on Indian Pines with 10% training rate
[0067] In the specific embodiments, see Figure 4 , is a structural schematic diagram of a real-time feature extraction system for hyperspectral imaging in the second embodiment of the present application, the system comprising: a line scan module 201, a data embedding module 202, a grouping module 203, a reconstruction module 204 and an overlay module 205; the line scan module 201 is used to perform line scans on the hyperspectral image in a preset first direction to obtain a plurality of hyperspectral line scan images; the data embedding module 202 is used to embed each pixel in a hyperspectral line scan image into an image using a preset window to obtain a trajectory matrix of the hyperspectral line scan image; the grouping module 203 is used to perform singular value decomposition and grouping on the trajectory matrix to obtain a plurality of grouping matrices; the reconstruction module 204 is used to reconstruct each grouping matrix to obtain a two-dimensional signal of the hyperspectral line scan image; the overlay module 205 is used to overlay the two-dimensional signals of all the hyperspectral line scan images to obtain the features of the hyperspectral image. The system in this embodiment performs line scanning on the hyperspectral image in a preset first direction, and embeds all pixels in the hyperspectral line scan image after line scanning into a trajectory matrix. The trajectory matrix obtained in this way omits the dimension in the preset second direction compared to embedding all pixels in the hyperspectral image into one trajectory matrix, thereby reducing the dimension of the trajectory matrix; the trajectory matrix is used to perform singular value decomposition, grouping, reconstruction and superposition to obtain a two-dimensional signal of the hyperspectral image, thereby reducing the computational complexity and storage space requirements.
[0068] In a specific embodiment, the third embodiment of the present application provides a real-time feature extraction device for hyperspectral imaging, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the method described in any one of the first embodiments of the present application. The trajectory matrix obtained by using the device in this embodiment omits the dimension in the preset second direction relative to embedding all pixels in the hyperspectral image into a trajectory matrix, thereby reducing the dimension of the trajectory matrix; singular value decomposition, grouping, reconstruction and superposition are performed using the trajectory matrix to obtain a two-dimensional signal of the hyperspectral image, thereby reducing the computational complexity and storage space requirements.
[0069] In a specific embodiment, the fourth embodiment of the present application provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the processor executes the steps of the method described in any one of the first embodiments of the present application. The trajectory matrix obtained by using the storage medium in this embodiment omits the dimension in the preset second direction relative to embedding all pixels in the hyperspectral image into a trajectory matrix, thereby reducing the dimension of the trajectory matrix; singular value decomposition, grouping, reconstruction and superposition are performed using the trajectory matrix to obtain a two-dimensional signal of the hyperspectral image, thereby reducing the computational complexity and storage space requirements.
[0070] Figure 5 The internal structure of a computer device in one embodiment is shown. The computer device can be a terminal or a server. Figure 5 The computer device includes a processor, a memory, etc. connected via a system bus. The memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program. When the computer program is executed by the processor, the processor can implement the method in this embodiment. The internal memory may also store a computer program. When the computer program is executed by the processor, the processor can implement the method in this embodiment. Those skilled in the art can understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0071] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
[0072] The above description is only a preferred embodiment of the present invention and does not limit the present invention in other forms. Any technician familiar with the profession may use the technical content disclosed above to change or modify it into an equivalent embodiment with equivalent changes and apply it to other fields. However, any simple modification, equivalent change and modification made to the above embodiment based on the technical essence of the present invention without departing from the content of the technical solution of the present invention still falls within the protection scope of the technical solution of the present invention.
Claims
1. A real-time feature extraction method for hyperspectral imaging, characterized in that: The method comprises: Performing line scanning on the hyperspectral image in a preset first direction to obtain a plurality of hyperspectral line scan images; Using a preset window, each pixel in a hyperspectral line scan image is embedded into a picture to obtain a trajectory matrix of the hyperspectral line scan image; Performing singular value decomposition and grouping on one of the trajectory matrices to obtain a plurality of grouping matrices; Reconstructing each grouping matrix to obtain a two-dimensional signal of the hyperspectral line scan image; The two-dimensional signals of all the hyperspectral line scan images are superimposed to obtain the characteristics of the hyperspectral image.
2. The real-time feature extraction method for hyperspectral imaging according to claim 1, characterized in that: The step of reconstructing each grouping matrix to obtain a two-dimensional signal of the hyperspectral line scan image includes: Dividing each grouping matrix according to the pixels of the hyperspectral image in a preset second direction to obtain a subset set of each grouping matrix; the subset set includes a plurality of non-overlapping subsets; the elements in all the subsets constitute the elements in the grouping matrix; Performing element shifting and position filling on the elements in the subset set to obtain a shifted matrix; the number of columns of the shifted matrix is the same as the number of columns of the elements of the hyperspectral image in a preset first direction; Obtaining a one-dimensional signal of each grouping matrix according to the moved matrix and a preset binary vector; The one-dimensional signals corresponding to all the grouping matrices are transposed to obtain the two-dimensional signals.
3. The real-time feature extraction method for hyperspectral imaging according to claim 2, characterized in that: The preset binary vector is obtained by the following method: If the element set in the target row of the moved matrix is greater than 0, the preset binary vector is 1, otherwise the preset binary vector is 0; the target row is any row in the moved matrix.
4. The real-time feature extraction method for hyperspectral imaging according to claim 2, characterized in that: The one-dimensional signal of each grouping matrix is obtained by the following formula: Among them, Y r is the one-dimensional signal, A k is the set of elements in the target row of the moved matrix, the target row is any row of the moved matrix, M k is the preset binary vector, and L is the size of the preset window.
5. The real-time feature extraction method for hyperspectral imaging according to claim 2, characterized in that: The performing element shifting and position filling on the elements in the subset set to obtain a matrix after the shifting comprises: All elements in the i-th subset set are shifted right by i-1 positions, and Li 0 elements are filled after the last element in the i-th subset set after the shift, and i-1 0 elements are filled before the first element to obtain the shifted matrix; wherein L is the size of the preset window.
6. The real-time feature extraction method for hyperspectral imaging according to claim 1, characterized in that: The trajectory matrix is obtained using the following formula: Where X is the trajectory matrix, is a matrix, N x is the pixel of the hyperspectral image in the x direction, N λ is the number of spectral bands of the hyperspectral image, L is the size of the preset window, H r is the Hankel matrix corresponding to the rth pixel.
7. The real-time feature extraction method for hyperspectral imaging according to claim 1, characterized in that: The hyperspectral image is a radiation spectrum that has been calibrated with illumination.
8. A real-time feature extraction system for hyperspectral imaging, characterized in that: The system comprises: a line scanning module, a data embedding module, a grouping module, a reconstruction module and a superposition module; The line scan module is used to perform line scan on the hyperspectral image in a preset first direction to obtain a plurality of hyperspectral line scan images; The data embedding module is used to embed each pixel in a hyperspectral line scan image into a picture using a preset window to obtain a trajectory matrix of the hyperspectral line scan image; The grouping module is used to perform singular value decomposition and grouping on one of the trajectory matrices to obtain multiple grouping matrices; The reconstruction module is used to reconstruct each grouping matrix to obtain a two-dimensional signal of the hyperspectral line scan image; The superposition module is used to superimpose the two-dimensional signals of all the hyperspectral line scan images to obtain the characteristics of the hyperspectral image.
9. A real-time feature extraction device for hyperspectral imaging, comprising a memory and a processor, characterized in that: The memory stores a computer program, and when the computer program is executed by the processor, the processor is caused to perform the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the processor is caused to perform the steps of the method according to any one of claims 1 to 7.