Hyperspectral Anomaly Detection Method Based on Spectral Constraints and Inverse Range Co-representation
By using a deep stacked autoencoder network based on spectral constraints and inverse distance collaborative representation, the problem of insufficient feature extraction in hyperspectral anomaly detection is solved, achieving more accurate anomaly detection and background suppression, and improving detection performance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- XIDIAN UNIV
- Filing Date
- 2023-11-09
- Publication Date
- 2026-06-30
AI Technical Summary
Existing hyperspectral anomaly detection methods are insufficient in feature extraction, cannot effectively utilize deep features and spatial information, and are easily affected by noise, resulting in limited detection performance.
A deep stacked autoencoder network based on spectral constraints and inverse distance collaborative representation is adopted. By introducing spectral angular distance as a loss function constraint, the reconstruction similarity is improved by combining inverse distance weights, and the detection results are optimized by using an adaptive anomaly weight matrix.
It significantly improves the accuracy and background suppression of hyperspectral anomaly detection, reduces noise interference, and enhances the ability to identify anomalies.
Smart Images

Figure CN117522815B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of image processing technology, specifically relating to a hyperspectral anomaly detection method based on spectral constraints and inverse distance cooperative representation. Background Technology
[0002] Traditional feature extraction methods such as PCA can only extract shallow features from hyperspectral data, making limited use of spatial structure, which restricts detection performance. However, for hyperspectral anomaly detection, it is essential to extract deep features. To achieve this, deep learning methods have been introduced into the anomaly detection field, with autoencoders, as an unsupervised deep learning method, being widely studied. However, autoencoder methods still have some problems, such as the extracted features containing anomalies and noise interfering with background reconstruction, insufficient utilization of spatial information, and inadequate ability to identify some anomalies. Summary of the Invention
[0003] To address the aforementioned problems in the prior art, this invention provides a hyperspectral anomaly detection method based on spectral constraints and inverse distance cooperative representation, thereby improving the effectiveness of hyperspectral anomaly detection.
[0004] The technical solution adopted in this invention is as follows:
[0005] A hyperspectral anomaly detection method based on spectral constraints and inverse distance cooperative representation includes the following steps:
[0006] Step 1: Obtain the hyperspectral image dataset;
[0007] Step 2: Construct a spectrally constrained deep stacked autoencoder network, inputting the hyperspectral image to be detected. The network model is trained, and the network parameters are iteratively updated to optimize the network model, where d and n are the spectral dimension of the image and the number of pixels in a single spectral dimension, respectively.
[0008] Step 3: After training, input H again into the optimized autoencoder network to obtain the reconstructed hyperspectral image. The norm is used to calculate the reconstruction error R, which serves as the initial anomaly detection result.
[0009] Step 4: Use H as input to the inverse distance collaborative representation module to obtain the anomaly score estimation result Y. out ;
[0010] Step 5, using R as the reference, adjust Y... out Convert to adaptive anomaly weights, and apply an adaptive anomaly score weight matrix W to R. h The final test result Y is obtained. end .
[0011] Compared to existing technologies, this invention redesigns the loss function of the autoencoder, using a more robust approach to noise and anomalies. Using the norm as a basis and introducing SAD as an additional penalty term to constrain the spectral information difference between the reconstructed sample and the input sample, the similarity of the reconstruction is enhanced, which has a significant effect on improving the detection of hyperspectral anomalies. Attached Figure Description
[0012] Figure 1 This is a flowchart of the present invention.
[0013] Figure 2 This is a structural diagram of the stacked self-encoder designed for this invention.
[0014] Figure 3 This is a result diagram of the present invention. Detailed Implementation
[0015] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0016] This invention provides a hyperspectral anomaly detection method based on spectral constraints and inverse distance cooperative representation, such as... Figure 1 As shown, this method is implemented through the following steps:
[0017] Step 1: Determine the hyperspectral image dataset according to the requirements of the anomaly detection method.
[0018] To illustrate the detection effectiveness of this invention, a large hyperspectral dataset containing diverse background information is required. In one embodiment, eight sets of real hyperspectral remote sensing images acquired under different scenarios are selected as the experimental dataset to evaluate the detection performance of the proposed anomaly detection algorithm.
[0019] Step 2: Construct a spectrally constrained deep stacked autoencoder network, inputting the hyperspectral image to be detected. Initial training is performed, network parameters are iteratively updated, and the network model is optimized, where d and n are the spectral dimension of the image and the number of pixels in a single spectral dimension, respectively.
[0020] refer to Figure 2 In embodiments of the present invention, the spectrally constrained stacked autoencoder network is implemented through the following steps:
[0021] Step 201: The first encoder and the last decoder of the stacked autoencoder are combined to form the first shallow autoencoder.
[0022] Step 202: Train the first shallow autoencoder using the hyperspectral image dataset. After training, use the weights and biases obtained from the first shallow autoencoder to encode the entire hyperspectral image dataset.
[0023] Step 203: Form a second shallow autoencoder using the second encoder and the penultimate decoder. Then train the second shallow autoencoder using the dataset obtained from the previous step to obtain the weights and biases of the second shallow autoencoder.
[0024] Step 204: Iterate towards the middle according to the above process until the training reaches the innermost hidden layer, and finally obtain a deep autoencoder network composed of several shallow autoencoders stacked together and its weights and biases.
[0025] In this step, within the spectral-constrained stacked autoencoder network, to better reconstruct the background, the spectrum of the reconstructed data needs to be constrained to make it closer to the spectrum of the original data. Only using... While the norm serves as a loss function, minimizing the error between the reconstructed sample and the input sample does not constrain the spectrum. Therefore, this invention introduces the spectral angular distance (SAD) as a constraint term into the loss function to enhance the spectral similarity between the input and reconstructed samples, better representing the reconstruction differences. This is the spectrally constrained stacked autoencoder network designed in this invention. Taking into account data characteristics and the utilization of spectral information, the final loss function of the spectrally constrained stacked autoencoder network is as follows:
[0026]
[0027] The first term is the reconstruction error of the spectral vector, which can be expressed as... Norm metric; the second term is the spectral angular distance (SAD), used to measure x and The similarity score indicates a higher correlation, with a lower score signifying a higher correlation. λ1 is a parameter that adjusts the spectral angular distance. This is the reconstructed background sample, i.e., the hyperspectral image reconstructed by this invention, where n is the number of pixels in the hyperspectral image H. It reconstructs the spectral vector, x i It is the input spectral vector. This loss function is more robust to anomalies and noisy pixels in the sample, especially since the spectral constraint term also improves the spectral similarity between the reconstructed result and the original input image.
[0028] Hyperspectral images contain hundreds of narrow-bandwidth spectral bands, possessing rich spectral information. When reconstructing the background using an autoencoder network, fully utilizing this spectral information is key to better constraining reconstruction errors and achieving excellent reconstruction results. Treating the spectral curve of each pixel in a hyperspectral image as a high-dimensional vector, the spectral angular distance function is defined as:
[0029]
[0030] Among them, spectral angle Represented as
[0031]
[0032] In the spectral curves of anomalous pixels and background pixels in the original and reconstructed images, the difference between the spectral curves of the original anomalous pixels and the reconstructed anomalous pixels is more significant than the difference between the spectral curves of the original anomalous pixels and the reconstructed background pixels. SAD (Spectral Aspect Ratio) can be used to measure the similarity between the spectral curves of two pixels; the smaller the SAD, the more similar the spectral curves of the two pixels, and the greater the probability that they belong to the same type of object. Therefore, this invention determines the pixel category based on the magnitude of SAD. The autoencoder reconstructs the background by learning the spectral information of the input hyperspectral image. Therefore, when measuring the difference in spectral vectors between the input and the reconstructed result, the spectral angular distance between background pixels is much smaller than the SAD of the anomalous pixels.
[0033] According to the autoencoder network of the present invention, the reconstructed background sample It is obtained through the following method:
[0034] When a hyperspectral image H is input, the output h of any pixel h after passing through m hidden layers is... m for:
[0035] h m =sig(w m (h m-1 ) T +b m ) T
[0036] In the formula, m∈{1,…,M}, M-1 is the number of hidden layers in the autoencoder network, h0=h, w m and b m These represent the weights and biases between the (m-1)th and mth layers, respectively, and sig(·) is the activation function for each layer. In this embodiment, it is the sigmoid function, which can be expressed as:
[0037]
[0038] The output of the middle hidden layer, that is, the M / 2th hidden layer, is the deep feature 'a' extracted by the network, expressed as:
[0039] a = h M / 2
[0040] Pixel h is represented as follows after passing through the autoencoder network:
[0041] EN(h)=sig(w en ·h+b en )
[0042] In the formula, Let represent a weight matrix vector with p features. This represents a bias vector with p features;
[0043] The result is input into the decoder to obtain the final reconstruction result.
[0044]
[0045] In the formula, Let represent a weight matrix vector with q features. Let h represent a bias vector with q features. Repeat the above process until each pixel h is reconstructed, at which point the reconstructed background sample is obtained.
[0046] Step 3: After training, input H again into the optimized autoencoder network to obtain the reconstructed hyperspectral image. The norm is used to calculate the reconstruction error R, which serves as the initial anomaly detection result.
[0047] The reconstructed background sample is obtained in the second step. After that, use Norm calculation of the original hyperspectral image H and the reconstructed background sample Residual image between:
[0048]
[0049] The residual image R represents the reconstruction error, which is also the preliminary anomaly detection result.
[0050] Step 4: Use H as the input to the inverse distance collaborative representation module to obtain the anomaly score estimation result Y. out .
[0051] In embodiments of the present invention, the inverse distance cooperative representation module is implemented through the following steps:
[0052] Step 401: Represent the hyperspectral image as a two-dimensional matrix. The columns of the matrix {x1, x2, ..., x} n} represents the spectral vector of a pixel.
[0053] Step 402: Using a sliding dual window, all pixels in the image are treated one by one as pixels to be tested, constructing a background pixel set, i.e., a two-dimensional matrix. c is the number of background pixels between the inner and outer windows, u i For background pixels.
[0054] Step 403, introduce the inverse distance function and the background pixel Y of the sliding window in the cooperative representation algorithm. c For any pixel in the array, under the constraint that the sum is 1, the final inverse distance weight vector α of each window is obtained. v .
[0055] In the process of collaborative representation, considering the property that the closer the spectral characteristics of the test pixel and the background pixel are, the higher the similarity between the background pixel and the test pixel, this invention introduces Inverse Distance Weight (IDW) to fully utilize spatial variation information. Inverse Distance Weight, also known as inverse distance weighting, is widely used in interpolation. It assumes that measurements closer to the interpolation point have a greater impact on the interpolation point than measurements farther away. Inverse Distance Weight assumes that each interpolation point is affected by a specific factor, and this influence weakens with increasing distance. Therefore, it assigns higher weights to points closer to the interpolation point and lower weights to points farther away.
[0056] Extending to the field of hyperspectral image processing, inverse distance weighting can be interpreted as the pixel being measured being more affected by its neighboring pixels, while being less affected by pixels farther away.
[0057] In an embodiment of the present invention, the inverse distance weight vector α v The specific solution method is as follows:
[0058] By adjusting the window weight vector α in the collaborative representation c By adding the inverse distance weights to the collaborative representation process, we get:
[0059] Γ v =f IV ×Γ u
[0060] Where f IV (·) represents the inverse distance function, u represents the d-dimensional pixel (i,j) to be measured, and α c It is the weight vector in the traditional collaborative representation algorithm, α v Γ is the inverse distance weight vector in the inverse distance collaborative representation of this invention. u It is used in traditional cooperative representation algorithms to adjust α c A diagonal regularized matrix, Γ v The inverse distance cooperative representation of this invention is used to adjust α vA diagonal regularized matrix.
[0061] Let ξ represent the background pixel Y of the sliding window. c For any pixel (k,l) in the array, then f IV (·) is represented as:
[0062]
[0063]
[0064] Among them, e m The Euclidean distance represents the geometric coordinates, and s represents the number of background pixels.
[0065] Under the constraint that the sum is 1, construct the Lagrangian function L(α) v ,λ c ), as shown in the following formula:
[0066]
[0067] In the formula u l =[u;1],Y c ′=[Y c ;1], in vector u l And matrix Y c In λ', 1 is a row vector with all elements equal to 1; c It is the Lagrange multiplier, used to adjust the norm weights.
[0068] Then, by solving the equation L(α) v ,λ c The final inverse distance weight vector α is obtained. v :
[0069] α v =(Y c ′ T Y c +λ c ω v T ω v ) -1 Y c ′ T u l
[0070] Step 404: Calculate the detection results for each window, then statistically analyze the detection results for each window to obtain the anomaly score estimation result Y. out The specific calculation method is as follows:
[0071]
[0072] r represents the reconstructed pixels in the hyperspectral image. The residuals between the pixel u and the pixel being tested are combined to form a residual image. Different preset thresholds are used to determine the pixel type. Pixels with intensity values greater than the maximum threshold or less than the minimum threshold are considered anomalies, while the remaining pixels are considered background. The sum of the final anomaly results is the anomaly detection result Y. out The anomaly detection result Y is usually... out The pixel values in the result Y are considered as scores, therefore the anomaly detection result Y out Also known as outlier score estimation results.
[0073] Step 5: Using R as the reference, adjust Y... out Convert to adaptive anomaly weights, and apply an adaptive anomaly score weight matrix W to R. h The final test result Y is obtained. end The specific method is as follows:
[0074] To improve detection performance, in the previous step, the features of the hidden layer of the stacked autoencoder were calculated using the inverse distance weighted collaborative representation model to obtain the anomaly score estimation result Y. out Y out The values of abnormal pixels in the center are relatively large, while the values of background pixels are small, even close to 0. Based on these reasons, a structure is constructed with Y... out Pixel y in out The weights for outlier scores of the independent variable are as follows:
[0075]
[0076] w h (y out The value of y ranges from 0 to 1; out The larger the value, the higher the calculated w. h (y out The closer the value of y is to 1, the better; out The smaller the value, the better. h (y out The closer the value is to 0, the better; ultimately, we get w. h (y out The abnormal score weight vector matrix W is composed of elements. h To optimize the detection results and improve the algorithm's ability to identify abnormal pixels, W is taken as... h The dot product between pixels corresponding to R is the final detection result, expressed as:
[0077]
[0078] If Y out medium pixel y out If the value is large, then Y end The value of the corresponding pixel in R is almost equal to that in R; conversely, if pixel y outIf the value is small, then it is in Y end The corresponding pixels in the matrix will be suppressed by multiplying them by a value close to 0, through the addition of anomaly score weight vector matrix W. h This can improve the algorithm's ability to identify abnormal pixels.
[0079] The following is combined Figure 3 The anomaly detection effect of the present invention will be further explained.
[0080] 1. Simulation conditions:
[0081] To verify the effectiveness of the hyperspectral anomaly detection algorithm proposed in this invention, four hyperspectral datasets—Sandigeo, Pavia, Airport-2, and Urban-1—were selected for experiments, and the experimental results of the algorithm were evaluated using corresponding evaluation metrics.
[0082] 2. Simulation Results and Analysis:
[0083] Figure 3 The results of this invention are shown in Figure 1 (represented by Prooised 1), along with a comparison figure with other hyperspectral anomaly detection algorithms, to illustrate the advancement of this invention.
[0084] Figure 3 (a) shows the Sandiego dataset, where the anomalies are the three aircraft on the tarmac in the upper right corner. Comparing the detection results, we can see that the GRX algorithm barely detected any aircraft and treated the corner background area as anomalies; while the KRX algorithm detected the aircraft relatively completely, it also treated roads, rooftops, and other background elements as anomalies, interfering with the anomaly judgment; the CRD algorithm had poor noise suppression and insufficient differentiation between anomalies and background; the RCRD algorithm did not preserve the aircraft outline sufficiently and considered the roof outline to be more anomaly; the LSDM-MoG algorithm had similar detection results to the CRD algorithm; the SAE algorithm had similar problems to KRX; while the RGAE algorithm suppressed roads and some rooftop areas, it still preserved a large area of ground and considered the edge of the roof in the upper left corner to be more anomaly. This invention improves upon all of these problems, suppressing most of the background information and detecting aircraft targets with clear outlines, while minimizing other interfering information.
[0085] Figure 3(b) shows the Pavia dataset, where anomalies include cars on bridges and some bridge piers. Comparative analysis reveals that the GRX algorithm only detects some anomalies and has poor suppression of areas such as bridges; the KRX algorithm incorrectly identifies bridge outlines and riverbanks as anomalies; the CRD algorithm only detects some anomalies and fails to suppress noise; the RCRD algorithm also fails to detect all anomalies; the LSDM-MoG algorithm fails to suppress striped noise and does not correctly detect anomalies; the SAE and RGAE algorithms have similar problems to KRX, treating bridges, which are part of the background, as anomalies. This invention improves upon all of these issues, suppressing most of the background and detecting anomalies with clear outlines, while minimizing other interference.
[0086] Figure 3 (c) represents the Airport-2 dataset. The anomalies in the Airport-2 dataset are the two airplanes in the middle region of the image, where the background is more complex than that in the Sandiego dataset. The comparison results show that while the GRX algorithm detects the airplanes, it also considers nearby buildings as anomalies, and its background suppression is poor. KRX detects the airplanes relatively completely, but also considers building outlines and road edges as anomalies, resulting in a significant difference from the anomaly baseline image. The CRD algorithm has weak background suppression, and the presence of numerous background outlines interferes with anomaly identification. The RCRD algorithm has good background suppression, but mistakenly considers rooftops as large-area anomalies. The LSDM-MoG algorithm fails to suppress noise and incorrectly considers the buildings to the lower right of the airplanes as anomalies. The SAE and RGAE algorithms incorrectly identify the rooftops to the lower left as having a higher degree of anomaly. This invention not only suppresses most of the background well but also completely detects anomalies with less other interfering information.
[0087] Figure 3In the image (d), the Urban-1 dataset represents anomalies. The anomalies in the Urban-1 dataset are a group of buildings in the upper half of the image. In this case, the background is cluttered with both large buildings of similar location and color and cloud cover, posing significant challenges to anomaly detection and background suppression. Comparing the detection results, we find that while the GRX algorithm detects the anomaly, it also treats nearby large buildings as anomalous targets; the KRX algorithm detects the anomaly completely, but it treats the buildings above and clouds as anomalies and has insufficient noise suppression, resulting in a significant deviation from the anomaly baseline; the CRD algorithm suffers from missed detections and poor background suppression; the RCRD algorithm treats the edges of the buildings above as anomalies, contradicting reality; the LSDM-MoG algorithm has poor noise suppression and incorrectly treats the edges of the buildings above as anomalies; the SAE and RGAE algorithms consider the larger buildings above the actual anomaly to be more "abnormal" and also treat the clouds as anomalies. This invention not only suppresses background elements such as clouds and nearby large buildings but also effectively detects anomalous buildings, avoiding the introduction of other interfering information, resulting in excellent anomaly detection performance.
[0088] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention.
Claims
1. A hyperspectral anomaly detection method based on spectral constraints and inverse distance collaborative representation, characterized in that, Includes the following steps: Step 1: Obtain the hyperspectral image dataset; Step 2, constructing a deep stacked auto-encoder network based on spectral constraints, inputting the hyperspectral image to be detected Training is performed, network parameters are iteratively updated, and the network model is optimized, wherein d and n are the spectral dimension of the image and the number of pixels in the single spectral dimension, respectively; Step 3: After training is complete, input again. H The reconstructed hyperspectral image is obtained by integrating the optimized autoencoder network, and then... Norm calculation reconstruction error R This serves as a preliminary anomaly detection result; Step 4, H As input to the inverse distance collaborative representation module, the anomaly score estimation result is obtained. Y out ; The inverse distance collaborative representation module is implemented through the following steps: Step 401: Input a hyperspectral image represented by a two-dimensional matrix. ; Step 402: Using a sliding dual window, all pixels in the image are treated one by one as pixels to be tested, constructing a background pixel set, i.e., a two-dimensional matrix. , c This represents the number of background pixels between the inner and outer windows. For background pixels; Step 403: Calculate the inverse distance weight vector for each window. The solution method is as follows: Hyperspectral images represented by two-dimensional matrices H The columns of the matrix { x 1, x 2, …, x n } represents the spectral vector of a pixel, and the weight vector of the window in the collaborative representation is adjusted. By adding the inverse distance weights to the collaborative representation process, we get: in f IV (•) is the inverse distance function. u express d 3D pixels to be measured ( i , j ), It is used for adjustment A diagonal regularized matrix, It is used for adjustment A diagonal regularized matrix; by ξ The background pixels of the sliding window are represented by the collaborative representation. Y c Any pixel in k , l ),but f IV (•) is represented as: in, e m Represents the Euclidean distance in geometric coordinates. s Indicates the number of background pixels; Construct the Lagrangian function under the constraint that the sum is 1. As shown in the following formula: In the formula u l = [ u ;1], = [ Y c ;1], in vector u l sum matrix In this context, 1 is a row vector whose elements are all 1; It is the Lagrange multiplier, used to adjust the norm weights; Then, by solving the formula The final inverse distance weight vector is obtained. : Step 404: Calculate the detection results for each window, then statistically analyze the detection results for each window to obtain the anomaly score estimation results. Y out The calculation formula is as follows: r Reconstructing pixels in hyperspectral images With the pixel to be measured u The residuals between the pixels are combined to form a residual image. Different pre-set thresholds are used to determine the pixel type. Pixels with intensity values greater than the maximum threshold or less than the minimum threshold are considered anomalies, while the remaining pixels are considered background. The sum of the final anomaly results is the anomaly detection result. Y out ; Step 5, with R Based on, Y out Convert to adaptive anomaly weights, for R Apply adaptive anomaly score weight matrix W h To obtain the final test results Y end The method is as follows: Construct with Y out Pixels y out The weights for outlier scores of the independent variable are as follows: The value range is from 0 to 1; y out The larger the value, the better the calculated result. The closer the value is to 1, the better; y out The smaller the value, The closer the value is to 0, the better; the final result is... The anomaly score weight vector matrix composed of elements W h ;Pick W h and R The dot product between each corresponding pixel is the final detection result, expressed as: 。 2. The hyperspectral anomaly detection method based on spectral constraints and inverse distance cooperative representation according to claim 1, characterized in that, Step 2, the spectrally constrained stacked autoencoder network is implemented through the following steps: Step 201: Combine the first encoder and the last decoder of the stacked autoencoders to form a first shallow autoencoder; Step 202: Train the first shallow autoencoder using the hyperspectral image dataset. After training, use the weights and biases obtained from the first shallow autoencoder to encode the hyperspectral image dataset again. Step 203: Form a second shallow autoencoder using the second encoder and the penultimate decoder. Then train the second shallow autoencoder using the dataset obtained from the previous step to obtain the weights and biases of the second shallow autoencoder. Step 204: Iterate towards the middle according to the above process until the training reaches the innermost hidden layer, and finally obtain a deep autoencoder network composed of several shallow autoencoders stacked together and its weights and biases.
3. The hyperspectral anomaly detection method based on spectral constraints and inverse distance cooperative representation according to claim 2, characterized in that, The loss function of the spectrally constrained stacked autoencoder network is: The first term is the reconstruction error of the spectral vector, expressed as... Norm metric; the second term is the spectral angular distance, used to measure x and The similarity score indicates a higher correlation. It is a parameter that adjusts the spectral angular distance (SAD). It is the reconstructed background sample, that is, the reconstructed hyperspectral image. n It is a hyperspectral image H The number of pixels in It is to reconstruct the spectral vector. It is the input spectral vector.
4. The hyperspectral anomaly detection method based on spectral constraints and inverse distance cooperative representation according to claim 3, characterized in that, The reconstructed background sample The calculation method is as follows: Hyperspectral images H any pixel h go through m The output of each hidden layer h m for: in, , M -1 represents the number of hidden layers in the autoencoder network. h 0= h , w m and b m They represent the (th) m -1) and the m Weights and biases between layers sig (•) represents the activation function for each layer; The output of the middle hidden layer, that is, the M / 2th hidden layer, is the depth feature extracted by the network. a , is represented as: Pixels h After passing through an autoencoder network, it is represented as: in, Indicates having p The weight matrix vector of each feature Indicates having p The bias vector of each feature; The result is input into the decoder to obtain the final reconstruction result. in, Indicates having q The weight matrix vector of each feature Indicates having q The bias vector of each feature is used to repeatedly perform the above process until each pixel... h All samples are reconstructed, and the reconstructed background samples are obtained. .
5. The hyperspectral anomaly detection method based on spectral constraints and inverse distance cooperative representation according to claim 3 or 4, characterized in that, In step 3, the reconstruction error is calculated as follows: use Norm calculation of the original hyperspectral image H and reconstructed background samples Residual image between: The residual image is the reconstruction error. R .