Hyperspectral image feature extraction method based on spectral angular distance and MRPE algorithm
By using spectral angular distance and MRPE algorithms in hyperspectral images, the problem of large Euclidean distance error in hyperspectral images is solved, and the accuracy of low-dimensional feature extraction and object detection is improved.
Patent Information
- Application Number
- CN202410988823.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-23
- Publication Date
- 2024-11-12
AI Technical Summary
In hyperspectral images, due to noise and other factors, the spectral curves of similar objects vary greatly. Euclidean distance will produce large errors when used as a similarity measurement function, affecting low-dimensional feature extraction and target detection performance.
The spectral angular distance is used instead of the Euclidean distance as a similarity measurement function between cells, and the feature extraction of hyperspectral images is combined with the MRPE algorithm. The pre-processing of weighted mean filtering and neighborhood selection of spectral angular distance is reduced. error.
It improves the accuracy of low-dimensional feature data extraction and subsequent object detection performance, and reduces the error caused by spectral uncertainty.
Smart Images

Figure CN118941802A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of remote sensing image processing, and in particular relates to a hyperspectral image feature extraction method based on spectral angular distance and MRPE algorithm. Background Art
[0002] Hyperspectral images have a spectral resolution of 10 -2 Spectral images within the range of λ. In the imaging process of hyperspectral images, due to the influence of factors such as noise, the spectral curves of the same type of objects often show differences, that is, the "same object, different spectrum" phenomenon. When the image dimension is high, this difference will have a serious impact on the similarity measurement between pixels, and thus bring great difficulties to subsequent use such as target detection or classification.
[0003] In hyperspectral images, pixels at adjacent positions are more likely to be composed of similar objects, and the closer the spatial distance, the greater the probability. The MRPE algorithm proposed based on this characteristic can utilize the spatial neighbor information of hyperspectral images. However, manifold learning methods, including the MRPE algorithm, all use Euclidean distance as the similarity measurement function between samples to select neighborhood pixels. However, due to the widespread existence of spectral uncertainty, the amplitude of the spectral curve of pixels of the same type of object often changes greatly. When selecting neighborhood pixels, if the Euclidean distance is used as the similarity measurement function between pixel points, a large error will be generated, affecting the subsequent low-dimensional feature extraction and detection.
[0004] Therefore, a hyperspectral image feature extraction method based on spectral angular distance and MRPE algorithm is needed, which uses spectral angular distance instead of Euclidean distance as the similarity measurement function between pixels for neighborhood selection, reduces the error caused by spectral uncertainty, and thus improves the accuracy of low-dimensional feature data extraction, thereby improving the subsequent target detection performance. Summary of the invention
[0005] The technical problem to be solved by the present invention is to provide a hyperspectral image feature extraction method based on spectral angular distance and MRPE algorithm in view of the deficiencies in the above-mentioned prior art. The method has simple steps and reasonable design. The spectral angular distance is used instead of the Euclidean distance as the similarity measurement function between pixels for neighborhood selection, which reduces the error caused by spectral uncertainty, thereby improving the accuracy of low-dimensional feature data extraction and further improving the subsequent target detection performance.
[0006] In order to solve the above technical problems, the technical solution adopted by the present invention is: a method for extracting features of a hyperspectral image based on spectral angular distance and MRPE algorithm, characterized in that the method comprises the following steps:
[0007] Step 1: Use a computer to perform weighted mean filtering preprocessing on the original hyperspectral image using the WMF algorithm to obtain a denoised hyperspectral image;
[0008] Step 2: Matrix representation of the denoised hyperspectral image:
[0009] The denoised hyperspectral image is recorded as I by computer, and the matrix of the denoised hyperspectral image I is expressed as X, and X = [x1…x j …x n ], x j represents the jth pixel in the denoised hyperspectral image I, j and n are both positive integers, and 1≤j≤n, and n represents the total number of pixels in the denoised hyperspectral image I; represents the data of the i-th band corresponding to the j-th pixel, d is the number of bands of the denoised hyperspectral image I, i and d are both positive integers, and 1≤i≤d; T represents transposition;
[0010] Step 3: Use spectral angle distance to select neighbors;
[0011] Step 4: Use the MRPE algorithm to extract hyperspectral image features based on the selected neighborhood.
[0012] The above-mentioned method for extracting features of hyperspectral images based on spectral angular distance and MRPE algorithm is characterized in that: Step three, the specific process is as follows:
[0013] Step 301: Use a computer to convert the pixel x in the denoised hyperspectral image I into j The R×R square neighborhood around the center is recorded as the neighbor space Ω(x j ), where R is a positive integer;
[0014] Step 302: Use a computer to calculate pixel x j And other pixels in the denoised hyperspectral image I are processed to obtain pixel x j The spatial-spectral joint distance to other different pixels;
[0015] Step 303: Use a computer to calculate pixel x j And other pixels in the denoised hyperspectral image I are processed to obtain pixel x j Spectral angle distance from other different pixels;
[0016] Step 304: Using a computer to calculate the pixel x j The spatial-spectral joint distance to other different pixels and pixel x j The spectral angle distance from other different pixels is obtained as pixel x j The nearest neighbor set k(x j ).
[0017] The above-mentioned method for extracting features of a hyperspectral image based on spectral angle distance and MRPE algorithm is characterized in that: step 303, the specific process is as follows:
[0018] Step 3031: Use a computer to record the other qth pixel of the denoised hyperspectral image I as x q , then according to the formula Get pixel x j and other q-th pixel x q The spectral angular distance d(x j ,x q );in, Represents the data of the i-th band corresponding to the q-th pixel, q is a positive integer, and 1≤q≤n, q≠j;
[0019] Step 3032: Repeat step 3031 multiple times to obtain pixel x j The spectral angle distance from other different pixels.
[0020] The above-mentioned method for extracting features of a hyperspectral image based on spectral angle distance and MRPE algorithm is characterized in that: step 304, the specific process is as follows:
[0021] Set pixel x j The spectral angle distances with other different pixels are sorted from small to large, and the pixel x j The space-spectrum joint distances with other different pixels are sorted from small to large, and the k pixels that satisfy both the small spectral angle distance and the small space-spectrum joint distance are recorded as pixel x j The neighbor set K(x j ), where k is a positive integer.
[0022] The above-mentioned method for extracting features of a hyperspectral image based on spectral angular distance and MRPE algorithm is characterized in that: Step 4, the specific process is as follows:
[0023] Step 401: Use a computer to use the MRPE algorithm to find the spectral neighbor set K(x j ) by minimizing the reconstruction error, obtaining the initial reconstruction weights, and comparing the jth pixel with the spectral neighbor set K(x j ) is denoted as w je ;in, e is a positive integer, and 1≤e≤E, E represents the spectral neighbor set K(x j )
[0024] Step 402: Use a computer to calculate the spectral neighbor set K(x j ) is judged by the e-th pixel. If the e-th pixel belongs to K(xj ) and belongs to the neighbor space Ω(x j ), then the reconstruction weight W is modified je =βw je ; If the e-th pixel belongs to K(x j ) but does not belong to the neighbor space Ω(x j ), the modified reconstruction weight remains unchanged W je =w je ; Where β represents the correction parameter, and β≥1;
[0025] Step 403, repeating steps 401 to 402 multiple times to obtain a corrected reconstruction weight of each pixel;
[0026] Step 404: Using a computer and using the MRPE algorithm, input the corrected reconstruction weight of each pixel to obtain a projection matrix A;
[0027] Step 405: Use a computer to calculate the value of Y=A T X, and obtain the low-dimensional feature matrix Y of the hyperspectral image.
[0028] Compared with the prior art, the present invention has the following advantages:
[0029] 1. The method of the present invention has simple steps and reasonable design, and solves the problem of using Euclidean distance as a similarity measurement function between samples to select neighborhood pixels.
[0030] 2. The present invention uses spectral angular distance instead of Euclidean distance as the similarity measurement function between pixels for neighborhood selection, reducing the error caused by spectral uncertainty, thereby improving the accuracy of low-dimensional feature data extraction and further improving subsequent target detection performance.
[0031] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 The figure is a flowchart of the method of the present invention. DETAILED DESCRIPTION
[0033] like Figure 1 As shown, the hyperspectral image feature extraction method based on spectral angular distance and MRPE algorithm of the present invention comprises the following steps:
[0034] Step 1: Use a computer to perform weighted mean filtering preprocessing on the original hyperspectral image using the WMF algorithm to obtain a denoised hyperspectral image;
[0035] Step 2: Matrix representation of the denoised hyperspectral image:
[0036] The denoised hyperspectral image is recorded as I by computer, and the matrix of the denoised hyperspectral image I is expressed as X, and X = [x1…x j …x n ], x j represents the jth pixel in the denoised hyperspectral image I, j and n are both positive integers, and 1≤j≤n, and n represents the total number of pixels in the denoised hyperspectral image I; represents the data of the i-th band corresponding to the j-th pixel, d is the number of bands of the denoised hyperspectral image I, i and d are both positive integers, and 1≤i≤d; T represents transposition;
[0037] Step 3: Use spectral angle distance to select neighbors;
[0038] Step 4: Use the MRPE algorithm to extract hyperspectral image features based on the selected neighborhood.
[0039] In this embodiment, step three, the specific process is as follows:
[0040] Step 301: Use a computer to convert the pixel x in the denoised hyperspectral image I into j The R×R square neighborhood around the center is recorded as the neighbor space Ω(x j ), where R is a positive integer;
[0041] Step 302: Use a computer to calculate pixel x j And other pixels in the denoised hyperspectral image I are processed to obtain pixel x j The spatial-spectral joint distance to other different pixels;
[0042] Step 303: Use a computer to calculate pixel x j And other pixels in the denoised hyperspectral image I are processed to obtain pixel x j Spectral angle distance from other different pixels;
[0043] Step 304: Using a computer to calculate the pixel x j The spatial-spectral joint distance to other different pixels and pixel x j The spectral angle distance from other different pixels is obtained as pixel x j The nearest neighbor set k(x j ).
[0044] In this embodiment, step 303, the specific process is as follows:
[0045] Step 3031: Use a computer to record the other qth pixel of the denoised hyperspectral image I as x q , then according to the formula Get pixel x j and other q-th pixel xq The spectral angular distance d(x j ,x q );in, Represents the data of the i-th band corresponding to the q-th pixel, q is a positive integer, and 1≤q≤n, q≠j;
[0046] Step 3032: Repeat step 3031 multiple times to obtain pixel x j The spectral angle distance from other different pixels.
[0047] In this embodiment, step 304, the specific process is as follows:
[0048] Set pixel x j The spectral angle distances with other different pixels are sorted from small to large, and the pixel x j The space-spectrum joint distances with other different pixels are sorted from small to large, and the k pixels that satisfy both the small spectral angle distance and the small space-spectrum joint distance are recorded as pixel x j The neighbor set K(x j ), where k is a positive integer.
[0049] In this embodiment, step 4, the specific process is as follows:
[0050] Step 401: Use a computer to use the MRPE algorithm to find the spectral neighbor set K(x j ) by minimizing the reconstruction error, obtaining the initial reconstruction weights, and comparing the jth pixel with the spectral neighbor set K(x j ) is denoted as w je ;in, e is a positive integer, and 1≤e≤E, E represents the spectral neighbor set K(x j )
[0051] Step 402: Use a computer to calculate the spectral neighbor set K(x j ) is judged by the e-th pixel. If the e-th pixel belongs to K(x j ) and belongs to the neighbor space Ω(x j ), then the reconstruction weight W is modified je =βw je ; If the e-th pixel belongs to K(x j ) but does not belong to the neighbor space Ω(x j ), the modified reconstruction weight remains unchanged W je =w je ; Where β represents the correction parameter, and β≥1;
[0052] Step 403, repeating steps 401 to 402 multiple times to obtain a corrected reconstruction weight of each pixel;
[0053] Step 404: Using a computer and using the MRPE algorithm, input the corrected reconstruction weight of each pixel to obtain a projection matrix A;
[0054] Step 405: Use a computer to calculate the value of Y=A T X, and obtain the low-dimensional feature matrix Y of the hyperspectral image.
[0055] In this embodiment, R is a positive integer, and the value of R is 3;
[0056] In this embodiment, the WMF algorithm (weighted mean filter) is a weighted mean filter algorithm.
[0057] In this embodiment, weighted mean filtering is performed on the original hyperspectral image to eliminate the influence of noise points and reduce the spectral differences between similar ground objects.
[0058] In this embodiment, the MRPE algorithm, namely the Manifold Reconstruction Preserving Embedding algorithm, is a manifold reconstruction preserving embedding algorithm.
[0059] In this embodiment, the value of k is 10-100, the size of the matrix X is d×n, the size of the projection matrix A is d×l, and the dimension l is 2-10.
[0060] In this embodiment, the acquisition of the spatial-spectral joint distance can refer to the acquisition of the spatial-spectral joint distance in the paper on spatial-spectral separable convolutional neural network for blood cell classification in hyperspectral microscopy images.
[0061] In this embodiment, the AVIRIS data set is used for experiments, which has the best overall performance and can suppress the background while highlighting the target pixels.
[0062] In this embodiment, the AVIRIS data set, i.e., the hyperspectral data set, is used, the total number of bands d is selected to be 196, and the total number of pixels n is 432. If the CEM target detection operator, ACE or GLRT target detection operator is used, the effect is better when β is 1 or 2.
[0063] In summary, the method of the present invention has simple steps and reasonable design. It uses spectral angular distance instead of Euclidean distance as the similarity measurement function between pixels for neighborhood selection, reduces the error caused by spectral uncertainty, thereby improving the accuracy of low-dimensional feature data extraction, and further improving the subsequent target detection performance.
[0064] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any way. Any simple modification, change and equivalent structural change made to the above embodiment based on the technical essence of the present invention still falls within the protection scope of the technical solution of the present invention.
Claims
1. A hyperspectral image feature extraction method based on spectral angular distance and MRPE algorithm, characterized in that: The method comprises the following steps: Step 1: Use a computer to perform weighted mean filtering preprocessing on the original hyperspectral image using the WMF algorithm to obtain a denoised hyperspectral image; Step 2: Matrix representation of the denoised hyperspectral image: The denoised hyperspectral image is denoted as I by a computer, and the matrix of the denoised hyperspectral image I is represented as X, and X = [x1…x j …x n ], x j represents the jth pixel in the denoised hyperspectral image I, j and n are both positive integers, and 1≤j≤n, and n represents the total number of pixels in the denoised hyperspectral image I; represents the data of the i-th band corresponding to the j-th pixel, d is the number of bands of the denoised hyperspectral image I, i and d are both positive integers, and 1≤i≤d; T represents transposition; Step 3: Use spectral angle distance to select neighbors; Step 4: Use the MRPE algorithm to extract hyperspectral image features based on the selected neighborhood.
2. A method for extracting hyperspectral image features based on spectral angular distance and MRPE algorithm according to claim 1, characterized in that: Step 3: The specific process is as follows: Step 301: Use a computer to convert the pixel x in the denoised hyperspectral image I into j The R×R square neighborhood around the center is recorded as the neighbor space Ω(x j ), where R is a positive integer; Step 302: Use a computer to calculate pixel x j And other pixels in the denoised hyperspectral image I are processed to obtain pixel x j The spatial-spectral joint distance to other different pixels; Step 303: Use a computer to calculate pixel x j And other pixels in the denoised hyperspectral image I are processed to obtain pixel x j Spectral angle distance from other different pixels; Step 304: Using a computer to calculate the pixel x j The spatial-spectral joint distance to other different pixels and pixel x j The spectral angle distance from other different pixels is obtained as pixel x j The nearest neighbor set k(x j ).
3. A method for extracting features from a hyperspectral image based on spectral angular distance and MRPE algorithm according to claim 2, characterized in that: Step 303, the specific process is as follows: Step 3031: Use a computer to record the other qth pixel of the denoised hyperspectral image I as x q , then according to the formula Get pixel x j and other q-th pixel x q The spectral angular distance d(x j ,x q );in, Represents the data of the i-th band corresponding to the q-th pixel, q is a positive integer, and 1≤q≤n, q≠j; Step 3032: Repeat step 3031 multiple times to obtain pixel x j The spectral angle distance from other different pixels.
4. A method for extracting features from a hyperspectral image based on spectral angular distance and MRPE algorithm according to claim 3, characterized in that: Step 304, the specific process is as follows: Set pixel x j The spectral angle distances with other different pixels are sorted from small to large, and the pixel x j The space-spectrum joint distances with other different pixels are sorted from small to large, and the k pixels that satisfy both the small spectral angle distance and the small space-spectrum joint distance are recorded as pixel x j The neighbor set K(x j ), where k is a positive integer.
5. The method for extracting features from a hyperspectral image based on spectral angular distance and MRPE algorithm according to claim 1, characterized in that: Step 4: The specific process is as follows: Step 401: Use a computer to use the MRPE algorithm to find the spectral neighbor set K(x j ) by minimizing the reconstruction error, obtaining the initial reconstruction weights, and comparing the jth pixel with the spectral neighbor set K(x j ) is denoted as w je ;in, e is a positive integer, and 1≤e≤E, E represents the spectral neighbor set K(x j ) Step 402: Use a computer to calculate the spectral neighbor set K(x j ) is judged by the e-th pixel. If the e-th pixel belongs to K(x j ) and belongs to the neighbor space Ω(x j ), then the reconstruction weight W is modified je =βw je ; If the e-th pixel belongs to K(x j ) but does not belong to the neighbor space Ω(x j ), the modified reconstruction weight remains unchanged W je =w je ; Where β represents the correction parameter, and β≥1; Step 403, repeating steps 401 to 402 multiple times to obtain a corrected reconstruction weight of each pixel; Step 404: Using a computer and using the MRPE algorithm, input the corrected reconstruction weight of each pixel to obtain a projection matrix A; Step 405: Use a computer to calculate the value of Y=A T X, and obtain the low-dimensional feature matrix Y of the hyperspectral image.
Citation Information
Patent Citations
Small sample remote sensing image classification method based on self-supervised contrast learning
CN114299398A
Abnormal target detection method and device for hyperspectral image
CN116797924A
AU2012100257A4
Cited By
Water area monitoring method based on image processing and related device
CN120219696A
