Hyperspectral Anomaly Detection Method Combining Sparse Representation and Collaborative Representation
By fusing sparse representation and collaborative representation methods, the background dictionary is automatically constructed and non-linear fusion combined with residual features is solved, which solves the performance problems caused by manual setting of dual-window sizes and single representation methods in the prior art, and achieves a more efficient hyperspectral anomaly detection effect.
Patent Information
- Application Number
- CN202211584933.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-09
- Publication Date
- 2025-07-01
- Estimated Expiration
- 2042-12-09
AI Technical Summary
Existing hyperspectral anomaly detection methods require manual setting of dual-window sizes when building background dictionaries, resulting in poor detection performance, and usually only consider sparse representations or collaborative representations alone, which makes performance improvements unsatisfactory.
Using the method of fusion sparse representation and collaborative representation, atoms are automatically selected from the sparse representation model as background dictionary, and non-linear fusion is performed by combining sparse residual features and collaborative residual features, and the final detection result is obtained after guiding filtering.
The performance of hyperspectral anomaly detection is improved, the unreasonable impact of manual setting of dual-window size is avoided, and the purity and accuracy of the detection effect is enhanced.
Smart Images

Figure CN115731472B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of hyperspectral remote sensing image processing, and further relates to hyperspectral anomaly detection. Specifically, it is a hyperspectral anomaly detection method that combines sparse representation and collaborative representation, and can be used for rare mineral exploration, camouflaged target recognition, forest fire detection, etc. Background Technique
[0002] The purpose of hyperspectral anomaly detection is to separate abnormal targets from the surrounding background without prior knowledge. Due to the lack of prior information, there are usually two assumptions in hyperspectral anomaly detection tasks: 1) Abnormalities are different from surrounding background pixels in space or spectrum; 2) Abnormalities only account for a very small proportion of all pixels in the hyperspectral image.
[0003] Currently, in the field of hyperspectral anomaly detection, methods based on sparse representation and collaborative representation have developed rapidly and have attracted extensive attention from researchers. For example, Ling Qiang et al. proposed a sparse representation model based on constraints in the literature "A Constrained Sparse Representation Model for Hyperspectral Anomaly Detection" to achieve hyperspectral anomaly detection. Li Wei and Du Qian proposed a hyperspectral anomaly detection method based on collaborative representation in the literature "Collaborative Representation for Hyperspectral Anomaly Detection". However, there are two problems in the process of constructing the background dictionary: 1) It is necessary to manually set the double window size. Once the double window size is set unreasonably, the detection performance is not good; 2) The constructed background dictionary may contain abnormalities, resulting in a deterioration of the representation effect. In addition, in existing hyperspectral anomaly detection tasks, sparse representation or collaborative representation is usually only considered separately, making the performance of hyperspectral anomaly detection improved but not ideal. Summary of the Invention
[0004] The object of the present invention is to propose a hyperspectral anomaly detection method that combines sparse representation and collaborative representation in view of the deficiencies of the above-mentioned existing technologies, for automatically constructing a background dictionary and effectively combining sparse representation and collaborative representation. First, an over-complete dictionary is constructed, a sparse representation model is established, optimized and solved, and sparse residual features are calculated; secondly, a background dictionary is constructed, a collaborative representation model is established, optimized and solved, and collaborative residual features are calculated; then, the sparse residual features and the collaborative residual features are non-linearly fused to obtain an initial detection result; finally, the initial detection result is post-processed by guided filtering to obtain a final detection result. The present invention abandons the method of constructing a background dictionary in a double-window manner, automatically selects the atoms used from the sparse representation model as the background dictionary, and combines the sparse residual features and the collaborative residual features. The combination of the two can further improve the performance of hyperspectral anomaly detection, thereby effectively improving the detection effect.
[0005] The specific steps for the present invention to achieve the above object include the following:
[0006] (1) Construct an over-complete dictionary:
[0007] (1.1) Input the hyperspectral image X, perform superpixel segmentation and clustering on it respectively to obtain superpixel blocks and clustering results;
[0008] (1.2) Regard the category with the largest number of pixels in the clustering result as the background, find out the superpixel blocks included in the area corresponding to this category, and select the central pixel of each superpixel block as an atom respectively;
[0009] (1.3) Use all the atoms to construct an over-complete dictionary D SR :
[0010]
[0011] where represents the t-th atom, t = 1, 2,..., m, b represents the number of bands of the hyperspectral image, and m represents the number of atoms in the over-complete dictionary;
[0012] (2) Establish a sparse representation model:
[0013] (2.1) According to the over-complete dictionary D SR establish a sparse representation model x i :
[0014] x i = D SR α i SR + e i SR ,
[0015] where α iSR and e i SR respectively represent the sparse representation vector and the sparse residual vector of the i-th pixel;
[0016] (2.2) Express the objective function of the sparse representation model as follows:
[0017]
[0018] where ||*||2 represents the l2 norm, ||*||0 represents the l0 norm, s.t. represents the constraint condition, and K represents the upper limit of the sparsity level;
[0019] (2.3) Use the orthogonal matching pursuit method to optimize and solve the objective function of the sparse representation model to obtain the estimated sparse representation vector
[0020] (2.4) Calculate the sparse residual response r of the i-th pixel i SR :
[0021]
[0022] Calculate the sparse residual response for all pixels in the hyperspectral image X to obtain the sparse residual feature where N represents the number of pixels in the hyperspectral image, and i = [1, 2,..., N];
[0023] (3) Construct the background dictionary:
[0024] For any pixel in the hyperspectral image, select the atoms in the overcomplete dictionary D SR that participate in its sparse representation, and combine these atoms to form the background dictionary where p = 1, 2,..., n, and n represents the number of atoms in the background dictionary;
[0025] (4) Establish the collaborative representation model:
[0026] (4.1) Based on the background dictionary establish the collaborative representation model x i ' for any pixel in the hyperspectral image:
[0027]
[0028] where α i CR and respectively represent the collaborative representation vector and the collaborative residual vector of the i-th pixel;
[0029] (4.2) Express the objective function of the collaborative representation model as follows:
[0030]
[0031] where λ represents the trade-off coefficient, represents the diagonal regular matrix, and diag(·) represents constructing a diagonal matrix;
[0032] (4.3) Optimize and solve the objective function of the collaborative representation model, that is, calculate the partial derivative of the objective function with respect to α i CR and set it to zero to obtain the estimated collaborative representation vector Then, according to calculate the collaborative residual response r of the i-th pixel i CR ;
[0033] (4.4) Calculate the collaborative residual response for all pixels in the hyperspectral image X to obtain the collaborative residual feature
[0034] (5) According to perform feature fusion on the sparse residual feature F SR and the collaborative residual feature F CR to obtain the initial detection result
[0035] (6) Use the guided filtering method to post-process the initial detection result D init to obtain the final detection result where the input image for filtering is the initial detection result D init , and the guidance image is the first principal component G = [g1, g2,..., g N obtained by processing the hyperspectral image X by the principal component analysis method.
[0036] Compared with the prior art, the present invention has the following advantages:
[0037] First, since the present invention selects the atoms used in the sparse representation model automatically as the background dictionary when constructing the background dictionary, and abandons the traditional method that requires manual setting of the double window size. Compared with constructing the background dictionary in the double window manner, the background dictionary constructed by the present invention has higher purity, and there is no problem that the detection performance is affected by the unreasonable setting of the double window size;
[0038] Second, the present invention effectively combines sparse representation and collaborative representation. The initial detection result is obtained by non-linearly fusing the sparse residual feature and the collaborative residual feature, and then the guided filtering is used to process the result to obtain the final detection result, effectively improving the hyperspectral anomaly detection effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 It is the implementation flowchart of the method of the present invention;
[0040] Figure 2 It is the application schematic diagram of the method of the present invention in a specific example;
[0041] Figure 3 It is the schematic diagram of the construction process of the over-complete dictionary in the method of the present invention;
[0042] Figure 4 It is the schematic diagram of different data sets used in the present invention; among them, (a) represents the false color map and its label of the San Diego data set; (b) represents the false color map and its label of the Pavia data set; (c) represents the false color map and its label of the Texas Coast data set;
[0043] Figure 5 It is the comparison chart of the detection results of the method of the present invention and mainstream methods on 3 data sets; among them, (I-a) to (I-h) respectively represent the detection results of RX, CRD, LSMAD, LRASR, PAB-DC, LSDM-MoG, TPCA and the method of the present invention on the San Diego data set, (I-i) represents the label of the San Diego data set; (II-a) to (II-h) respectively represent the detection results of RX, CRD, LSMAD, LRASR, PAB-DC, LSDM-MoG, TPCA and the method of the present invention on the Pavia data set, (II-i) represents the label of the Pavia data set; (III-a) to (III-h) respectively represent the detection results of RX, CRD, LSMAD, LRASR, PAB-DC, LSDM-MoG, TPCA and the method of the present invention on the Texas Coast data set, (III-i) represents the label of the Texas Coast data set;
[0044] Figure 6 It is the ROC_(P D ,P F ) curve graph of the method of the present invention and mainstream methods on 3 data sets; among them, (a), (b), (c) respectively represent the ROC curves of the method of the present invention and mainstream methods on the San Diego, Pavia and Texas Coast data sets, where P D represents the true positive rate, and P F represents the false positive rate;
[0045] Figure 7 It is the ROC_(P F, τ) curve; where (a), (b), and (c) respectively represent the ROC curves of the method of the present invention and the mainstream methods on the San Diego, Pavia, and Texas Coast datasets, where P F represents the false positive rate, and τ represents the threshold; Specific Embodiments
[0046] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0047] Embodiment 1:
[0048] Referring to Figure 1 , Figure 2 and Figure 3 , a hyperspectral anomaly detection method that combines sparse representation and collaborative representation proposed by the present invention is specifically implemented according to the following steps:
[0049] Step 1: Referring to Figure 3 the schematic diagram of the construction process of the overcomplete dictionary in the method of the present invention, construct the overcomplete dictionary: input the hyperspectral image X, perform superpixel segmentation and clustering on it respectively to obtain superpixel blocks and clustering results; regard the category with the largest number of pixels in the clustering result as the background, and find the superpixel blocks included in the area corresponding to this category (for the superpixel blocks including pixels of other categories, they do not participate in the subsequent process), select the central pixel of each superpixel block as an atom respectively, and construct the overcomplete dictionary D using all atoms SR :
[0050]
[0051] where represents the t-th atom, t = 1, 2,..., m, b represents the number of bands of the hyperspectral image, and m represents the number of atoms of the overcomplete dictionary.
[0052] The above superpixel blocks can be specifically obtained through the following method: First, use the principal component analysis method to process the hyperspectral image, then extract the first three principal components, and finally perform superpixel segmentation on the first three principal components using the simple linear iterative clustering method. For the above clustering, the density-based spatial clustering of applications with noise method is used.
[0053] Step 2: Establish a sparse representation model:
[0054] (2.1) According to the overcomplete dictionary D SR establish the sparse representation model x of any pixel in the hyperspectral image i :
[0055]
[0056] where α iSR and represent the sparse representation vector and the sparse residual vector of the i-th pixel, respectively;
[0057] (2.2) Express the objective function of the sparse representation model as follows:
[0058]
[0059] where ||*||2 represents the l2 norm, ||*||0 represents the l0 norm, s.t. represents the constraint condition, and K represents the upper limit of the sparsity level;
[0060] (2.3) Use the orthogonal matching pursuit method to optimize and solve the objective function of the sparse representation model, and obtain the estimated sparse representation vector
[0061] (2.4) Calculate the sparse residual response r of the i-th pixel i SR :
[0062]
[0063] Calculate the sparse residual response for all pixels in the hyperspectral image X to obtain the sparse residual feature where N represents the number of pixels in the hyperspectral image, and i = [1, 2,..., N];
[0064] Step 3: Construct the background dictionary: For any pixel in the hyperspectral image, select the atoms in the overcomplete dictionary D SR that participate in its sparse representation, and combine these atoms to form the background dictionary where p = 1, 2,..., n, and n represents the number of atoms in the background dictionary. Only a part of the overcomplete dictionary is selected here; in step 2, the coefficients corresponding to the atoms in D SR that participate in the representation (where α i SR is a vector composed of m coefficients) are relatively large. In this embodiment, the atoms corresponding to the n coefficients with the largest coefficients are selected.
[0065] Step 4: Establish the collaborative representation model:
[0066] (4.1) Establish the collaborative representation model x ' for any pixel in the hyperspectral image according to the background dictionary i ':
[0067]
[0068] where α i CR and respectively represent the collaborative representation vector and the collaborative residual vector of the \(i\)-th pixel;
[0069] (4.2) Express the objective function of the collaborative representation model as follows:
[0070]
[0071] where \(\lambda\) represents the trade-off coefficient, represents the diagonal regularization matrix, and \(diag(\cdot)\) represents constructing a diagonal matrix;
[0072] (4.3) Optimize and solve the objective function of the collaborative representation model, that is, calculate the partial derivative of the objective function with respect to \(\alpha\) i CR and set it to zero to obtain the estimated collaborative representation vector Then, according to calculate the collaborative residual response \(r\) of the \(i\)-th pixel i CR ;
[0073] (4.4) Calculate the collaborative residual response for all pixels in the hyperspectral image \(X\) to obtain the collaborative residual feature
[0074] Step 5: According to perform feature fusion on the sparse residual feature \(F\) SR and the collaborative residual feature \(F\) CR to obtain the initial detection result
[0075] Step 6: Use the guided filtering method to post-process the initial detection result \(D\) init to obtain the final detection result where the input image for filtering is the initial detection result \(D\) init , and the guidance image is the first principal component \(G = [g_1, g_2, \ldots, g\) N obtained by processing the hyperspectral image \(X\) using the principal component analysis method.
[0076] The guided filtering method is implemented as follows:
[0077] (6.1) Calculate the first coefficient \(a\) according to the following formula k :
[0078]
[0079] where \(\beta\) represents the regularization parameter, \(k\) represents any pixel point in the window centered on pixel \(i\); \(\omega\) k represents the window centered on pixel \(k\), \(\mu\) k and respectively represent the guidance image \(G\) in the window \(\omega\) kThe mean and variance of the inner elements, and |ω| represents the number of pixels in the window; represents the filtered input image D init within the window ω k the mean of the inner elements;
[0080] (6.2) Calculate the second coefficient b k :
[0081]
[0082] (6.3) Calculate the first average coefficient and the second average coefficient
[0083]
[0084]
[0085] where ω i represents the window centered on pixel i;
[0086] (6.4) Obtain the final detection result d of the i-th pixel according to the following formula i fin :
[0087]
[0088] where g i represents the i-th pixel in the guidance image G.
[0089] The following further illustrates the effect of the present invention in combination with experiments.
[0090] 1. Experimental conditions:
[0091] The experiment of the present invention is carried out in a hardware environment with a CPU main frequency of 2.00 GHz and a memory of 16 GB and a software environment of Windows 10 operating system and Python 3.6.13.
[0092] 2. Experimental content:
[0093] This experiment evaluates the performance of the method of the present invention on the San Diego, Pavia, and Texas Coast datasets. On each dataset, the detection effects of the method of the present invention and seven mainstream methods are compared from two perspectives: qualitative (including detection maps and two ROC curves) and quantitative (including two AUC values).
[0094] Among them, the mainstream methods mainly include RX [Paper: Adaptive multiple-band CFAR detection of an optical pattern with unknown spectral distribution], CRD [Paper: Collaborative representation for hyperspectral anomaly detection], LSMAD [Paper: A low-rank and sparse matrix decomposition-based mahalanobis distance method for hyperspectral anomaly detection], LRASR [Paper: Anomaly detection in hyperspectral images based on low-rank and sparse representation], PAB-DC [Paper: Hyperspectral anomaly detection via background and potential anomaly dictionaries construction], LSDM-MoG [Paper: Low-rank and sparse decomposition with mixture of Gaussian for hyperspectral anomaly detection], and TPCA [Paper: A preprocessing method for hyperspectral target detection based on tensor principal component analysis].
[0095] 3. Simulation results and analysis:
[0096] Figure 5 This is a comparison chart of the detection results of the method of the present invention and the mainstream methods on 3 datasets; among them, (I)-(III) correspond to the San Diego, Pavia, and Texas Coast datasets respectively, (a)-(g) correspond to 7 existing methods including RX, CRD, LSMAD, LRASR, PAB-DC, LSDM-MoG, and TPCA respectively, (h) corresponds to the method of the present invention, and (i) corresponds to the label; specifically: Figure 5(I-a) to (I-h) respectively represent the detection results of RX, CRD, LSMAD, LRASR, PAB-DC, LSDM-MoG, TPCA and the method of the present invention on the San Diego dataset, and (I-i) represents the label of the San Diego dataset; (II-a) to (II-h) respectively represent the detection results of RX, CRD, LSMAD, LRASR, PAB-DC, LSDM-MoG, TPCA and the method of the present invention on the Pavia dataset, and (II-i) represents the label of the Pavia dataset; (III-a) to (III-h) respectively represent the detection results of RX, CRD, LSMAD, LRASR, PAB-DC, LSDM-MoG, TPCA and the method of the present invention on the Texas Coast dataset, and (III-i) represents the label of the Texas Coast dataset.
[0097] By comparing the existing methods, the method of the present invention with the labels, it can be seen that the method of the present invention has the best effect and is significantly better than the mainstream methods in the existing 7 kinds of existing technologies.
[0098] Figure 6 and Figure 7 are respectively the ROC_(P D ,P F ) curve and the ROC_(P F ,τ) curve of the method of the present invention and the mainstream methods on 3 datasets; among them, (a) represents the San Diego dataset, (b) represents the Pavia dataset, and (c) represents the Texas Coast dataset.
[0099] ROC_(P D ,P F ) The larger the area under the curve, the better the detection performance. It can be seen from Figure 6 that the detection effect of the method of the present invention is the best; ROC_(P F ,τ) The smaller the area under the curve, the lower the false alarm rate. It can be seen from Figure 7 that the method of the present invention has the lowest false alarm rate and the best performance.
[0100] The following table (Table 1) lists the AUC values (i.e., AUC_(P D ,P F ) and AUC_(P F ,τ)) of the method of the present invention and 7 mainstream methods on 3 datasets. The AUC value is between 0 and 1. For AUC_(P D ,P F ), the closer its value is to 1, the better the detection effect; for AUC_(P F, τ), the closer its value is to 0, the lower the false alarm rate, that is, the better the performance.
[0101] Table 1 Comparison of AUC values of the method of the present invention and seven mainstream methods on 3 datasets
[0102]
[0103] As can be seen from the above table, on 3 different datasets (San Diego, Pavia, and Texas Coast), the method of the present invention has the largest AUC_(P D , P F ) and the smallest AUC_(P F , τ), further indicating that the method of the present invention has the highest detection accuracy and the lowest false alarm rate compared with the existing methods, that is, the best performance.
[0104] The above experimental results prove the correctness and effectiveness of the method proposed by the present invention.
[0105] The parts not detailed in the present invention belong to the common general knowledge of those skilled in the art.
[0106] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Obviously, for professionals in the field, after understanding the content and principle of the present invention, various modifications and changes in form and details may be made without departing from the principle and structure of the present invention. However, these modifications and changes based on the idea of the present invention are still within the scope of protection of the claims of the present invention.
Claims
1. A hyperspectral anomaly detection method integrating sparse representation and collaborative representation, characterized in that, The steps are as follows: (1) Construct an overcomplete dictionary: (1.1) Input the hyperspectral image X, perform superpixel segmentation and clustering on it respectively to obtain superpixel blocks and clustering results; (1.2) Consider the category with the largest number of pixels in the clustering result as the background, find the superpixel blocks included in the area corresponding to this category, and select the central pixel of each superpixel block as an atom respectively; (1.3) Construct an overcomplete dictionary D using all atoms SR : Among them represents the t-th atom, where t = 1, 2, …, m, b represents the number of bands of the hyperspectral image, and m represents the number of atoms in the overcomplete dictionary; (2) Establish a sparse representation model: (2.1) Based on the overcomplete dictionary D SR Establish a sparse representation model x for any pixel in the hyperspectral image i : wherein and respectively represent the sparse representation vector and the sparse residual vector of the i-th pixel; (2.2) Express the objective function of the sparse representation model as follows: where ||*||2 represents the l2 norm, ||*||0 represents the l0 norm, s.t. represents the constraint condition, and K represents the upper limit of the sparse level; (2.3) The orthogonal matching pursuit method is used to optimize and solve the objective function of the sparse representation model, and the estimated sparse representation vector is obtained. (2.4) Calculate the sparse residual response r of the i-th pixel i SR : Calculate the sparse residual response for all pixels in the hyperspectral image X to obtain the sparse residual features where N represents the number of pixels in the hyperspectral image, and i = [1, 2, …, N]; (3) Construct a background dictionary: For any pixel in the hyperspectral image, select the atoms in the overcomplete dictionary D SR that participate in its sparse representation, and merge these atoms to form a background dictionary where p = 1, 2, …, n, and n represents the number of atoms in the background dictionary; (4) Establish a collaborative representation model: (4.1) Based on the background dictionary Establish a collaborative representation model x for any pixel in the hyperspectral image i ': Among them and respectively represent the collaborative representation vector and the collaborative residual vector of the i-th pixel; (4.2) Express the objective function of the collaborative representation model as follows: where λ represents the trade-off coefficient, represents the diagonal regularization matrix, and diag(·) represents constructing a diagonal matrix; (4.3) Optimize and solve the objective function of the collaborative representation model, that is, calculate the partial derivative of the objective function with respect to and set it to zero to obtain the estimated collaborative representation vector Then, according to calculate the collaborative residual response of the i-th pixel (4.4) Calculate the collaborative residual response for all pixels in the hyperspectral image X to obtain the collaborative residual feature (5) According to perform feature fusion on the sparse residual feature F SR and the collaborative residual feature F CR to obtain the initial detection result (6) The initial detection result D is post - processed using the guided filter method to obtain the final detection result init where the input image for filtering is the initial detection result D and the guidance image is the first principal component G = [g1, g2, …, g init obtained by processing the hyperspectral image X using the principal component analysis method N .
2. The method according to claim 1, wherein: The superpixel blocks in step (1.1) are obtained by first processing the hyperspectral image using the principal component analysis method before performing superpixel segmentation, then extracting the first three principal components, and finally performing superpixel segmentation on the first three principal components using the simple linear iterative clustering method.
3. The method according to claim 1, characterized in that: The clustering in step (1.1) uses the density-based spatial clustering of applications with noise method.
4. The method according to claim 1, wherein: The guided filtering method in step (6) is implemented as follows: (6.1) Calculate the first coefficient a according to the following formula k :[[]]END]] Among them, β represents the regularization parameter, and k represents any pixel point in the window centered on pixel i; ω k represents the window centered on pixel k, and μ k and respectively represent the mean and variance of the elements of the guidance image G in the window ω k ; ω| represents the number of pixels in the window; represents the filtered input image D init in the window ω k ; the mean of the elements in it; (6.2) Calculate the second coefficient b k : (6.3) Calculate the first average coefficient and the second average coefficient of all windows containing pixel i respectively and the second average coefficient where ω i represents the window centered on pixel i; (6.4) Obtain the final detection result of the i-th pixel according to the following formula where g i represents the i-th pixel in the guiding image G.
Citation Information
Patent Citations
Hyperspectral abnormal target detection method based on self-weight collaborative representation
CN111160310A
Hyperspectral anomaly detection method fusing robust dictionary and double-cooperative constraint regular term
CN115239694A