Hyperspectral anomaly detection method based on adaptive superpixel and spatial spectrum constraint
Patent Information
- Application Number
- CN202511037702.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-28
- Publication Date
- 2025-11-14
AI Technical Summary
Existing hyperspectral anomaly detection methods are easily affected by neighborhood selection and anomalous pixel interference in complex background scenes. Parameter estimation methods are limited by the complexity of background characteristics, while non-parametric estimation methods have high requirements for model construction and parameter setting and lack prior information on background distribution.
A method based on adaptive superpixels and spatial spectral constraints is adopted to construct a background dictionary to achieve hyperspectral anomaly detection by optimizing superpixel segmentation by entropy rate, superpixel block change measurement, adjacent region filling and cooperative representation coefficient optimization.
It significantly improves the ability to separate anomalies from the background, reduces dependence on parameter settings, enhances the ability to resist noise interference, and improves detection accuracy.
Smart Images

Figure CN120953191A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of image processing, specifically relating to a hyperspectral anomaly detection method based on adaptive superpixels and spatial spectral constraints. Background Technology
[0002] Hyperspectral imaging (HSI) is an advanced technology that combines imaging and spectral analysis. By covering a broad spectral range from ultraviolet to short-wave infrared, it captures the unique spectral signature of each pixel, enabling accurate object identification and classification. HSI systems not only possess rich spectral and spatial information but also reveal target characteristics with higher spectral resolution. They are widely used in fields such as anomaly detection, providing strong technical support for anomaly detection in complex scenarios.
[0003] Over the past few decades, researchers have developed numerous hyperspectral anomaly detection methods to address various problems. Existing anomaly detection algorithms can be broadly categorized into two types: parametric estimation methods and non-parametric estimation methods. Molero et al. studied the Local Reed-Xiaoli (LRX) method, a parametric estimation approach. LRX constructs a local background model and analyzes the Mahalanobis distance between the target pixel and its surrounding background to identify anomalous targets. However, due to the highly complex background characteristics in hyperspectral data, the selection and construction of the local background model is challenging and easily affected by neighborhood selection and interference from anomalous pixels.
[0004] Nonparametric estimation methods assume that anomalous pixels cannot be modeled using the distribution of background pixels. For example, the Collaborative Representation-based Detector (CRD) proposed by Li et al. is a nonparametric estimation method. CRD uses the collaborative representation of background pixels to reconstruct the pixel to be tested and determines whether the pixel is an anomalous by calculating the reconstruction error. However, in complex background scenes, the spectral characteristics of background pixels may be difficult to model accurately, leading to a decrease in the effectiveness of the collaborative representation and thus affecting the accuracy of anomaly detection. The Relaxed Collaborative Representation Detection (RCRD) proposed by Wu et al. is an improvement on the CRD algorithm. By introducing relaxation variables or regularization terms in the collaborative representation process, it enhances the model's adaptability to complex backgrounds, thus more effectively dealing with background diversity and interference between anomalous pixels. However, its performance may still be affected by parameter settings and changes in background complexity.
[0005] As mentioned above, parametric estimation methods are limited by complex scenarios and background assumptions, while nonparametric estimation methods have high requirements for model construction and parameter settings and lack prior information on background distribution. Summary of the Invention
[0006] In view of this, the main objective of the present invention is to provide a hyperspectral anomaly detection method based on adaptive superpixels and spatial spectral constraints.
[0007] To achieve the above objectives, the technical solution of the present invention is implemented as follows:
[0008] This invention provides a hyperspectral anomaly detection method based on adaptive superpixels and spatial spectral constraints. The method is as follows:
[0009] Step 1: Input the hyperspectral image Y into entropy rate optimized superpixel segmentation to obtain the k-th superpixel image P. k Determine P k The superpixel block change metric is obtained as ψ(P) k Then, by calculating about ψ(P) k The optimal superpixel image P is obtained by comparing the change weight criterion with the scale selection threshold ρ. opt ;
[0010] Step 2: Using P opt Construct a superpixel block subset S with quantile α α Using S α Generate a superpixel mask M, using P opt The i-th superpixel block q in i With S α Construct superpixel adjacency region f Nbr (q i );
[0011] Step 3: Utilize f in Y Nbr (q i The neighborhood average spectral vector μ is calculated from the pixel spectral vector. * By combining M and μ * Fill the background of Y to obtain the background-filled image Y. * ;
[0012] Step 4, in Y * Set an outer window region A, and denote the pixel at the center of region A as the center pixel z. Set an inner window region B with z as the center, and construct a background dictionary D using the pixels in A excluding the pixels in other regions of B.
[0013] Step 5: Using q i The number of n opt (q i) Calculate the superpixel difference score γ, use the spatial coordinates and spectral vectors of atoms in z and D and γ to obtain the weight matrix Ω, and obtain the optimal representation coefficient β through Ω and D;
[0014] Step 6: Finally, use D and β to calculate and obtain the hyperspectral anomaly detection result image R.
[0015] In the above scheme, step one is specifically implemented through the following steps:
[0016] (101) The hyperspectral image Y is input into the entropy rate optimized superpixel segmentation according to the following formula to obtain the k-th superpixel image P. k for
[0017] P k =f EROSS (Y;k) (1)
[0018] Where k represents the index of multiple scales in the superpixel segmentation map, f EROSS (·) represents the entropy rate optimized superpixel segmentation function;
[0019] (102) Calculate P according to the following formula. k Superpixel block variation metric ψ(P) k )for
[0020]
[0021] Where E represents the number of superpixel blocks in the current segmentation map, q a P represents k The a-th superpixel block in n(q) a ) represents q a The number of pixels in the medium, P k The superpixel average spectrum of all pixels in the a-th superpixel block is represented as μ(q a ), P k The global average spectrum is expressed as N represents the number of pixels in the entire image, and P k The pixel spectrum of the j-th pixel in the array is represented as x. j (P k );
[0022] (103) According to the following formula, by calculating about ψ(P) k The optimal superpixel image P is selected by comparing the change weight criterion with the scale selection threshold ρ. opt for
[0023]
[0024] Where ε is set to 0.001, and ρ represents the change weight criterion when it is greater than ρ, the current P kLet it be P opt .
[0025] In the above scheme, step two is specifically implemented through the following steps:
[0026] (201) According to the following formula, using quantile α and P opt The i-th superpixel block q in i Constructing a superpixel block subset S α for
[0027]
[0028] Where, θ α Q represents the threshold number of pixels in all superpixel regions under α. α (·) is the quantile function, n(q) i ) represents q i The number of pixels in the middle, where I represents P. opt The number of pixel blocks in the Chinese Super League; the quantile α indicates that in a set of data, the proportion of data with a value of α is less than or equal to that value.
[0029] (202) According to the following formula, using S α To construct the superpixel mask M is
[0030]
[0031] Where M(u,v) defines the value of the superpixel mask at pixel coordinates (u,v). Indicates belonging to S α The union of superpixel blocks;
[0032] (203) According to the following formula, through the superpixel adjacency region f Nbr (q i ) indicates the relationship with q i Shared boundary but not in S α The superpixel blocks in the middle are
[0033]
[0034] in, Represents superpixel block q i The neighborhood boundary, ζ represents the index of the adjacent superpixel block, q ζ q i Adjacent superpixel blocks.
[0035] In the above scheme, step three is specifically implemented through the following steps:
[0036] (301) According to the following formula, through f Nbr (q iThe pixel spectral vector in the calculation of its neighborhood average spectral vector μ * for
[0037]
[0038] Where, n(q) ζ ) represents q ζ The number of pixels in the array, Y(u,v) defines the pixel spectral vector at pixel coordinates (u,v); q ζ q i Adjacent superpixel blocks;
[0039] (302) According to the following formula, by combining M and μ * Fill the background of Y to obtain the background-filled image Y. * for
[0040]
[0041] In the above scheme, step four is specifically implemented through the following steps:
[0042] (401) In Y * Set an outer window region A, and denote the pixel at the center of region A as the center pixel z. Set an inner window region B with z as the center.
[0043] (402) Construct a background dictionary D = {d1,...,d2} using the spectral vector d of pixels in A after removing other regions of B. m}, where m represents the number of atoms in D.
[0044] In the above scheme, step five is specifically implemented through the following steps:
[0045] (501) According to the following formula, using q i The number of pixels n opt (q i )Calculate the superpixel difference score γ as
[0046]
[0047] in, P represents opt The average number of pixels in a pixel block in the Chinese Super League, where K represents P. opt The number of superpixel blocks in the image. P represents opt The maximum number of pixels in a pixel block in the Chinese Super League. P represents opt The minimum number of pixels in a Chinese Super League pixel block, q ω For P opt The ω-th superpixel block in;
[0048] (502) According to the following formula, using the spatial coordinates r of z and the spatial coordinates t of the atoms in D... l The spectral vector y of z and the spectral vector d of the atoms in D l And γ yields the weight matrix Ω y for
[0049]
[0050] Where, σ p The standard deviation of spatial coordinates The standard deviation of the spectral vector is represented by... This represents the L2 norm calculation operation, where y is the spectral vector of the pixel at the center of region A;
[0051] (503) According to the following formula, through Ω y The optimal representation coefficient β obtained from D is
[0052]
[0053] Where λ is the regularization parameter, This indicates that we are solving for β, which minimizes the objective function.
[0054] In the above scheme, step six is specifically implemented through the following steps:
[0055] (601) The hyperspectral anomaly detection result R is obtained by calculating D and β according to the following formula.
[0056]
[0057] Compared with existing technologies, this invention proposes a hyperspectral anomaly detection method based on adaptive superpixels and spatial spectral constraints to fully utilize local detail features. It introduces an adaptive superpixel segmentation selection module, achieving accurate superpixel segmentation while significantly reducing dependence on parameter settings. A collaborative representation module based on a spatial spectral constraint weight matrix is introduced, enhancing the expressive power of spatial and spectral features, more effectively separating anomalies from the background, and significantly improving noise immunity. The final anomaly detection result is obtained by fusing the adaptive superpixel segmentation selection module and the collaborative representation module based on the spatial spectral constraint weight matrix. Attached Figure Description
[0058] Figure 1 This is a flowchart of the present invention;
[0059] Figure 2 The original hyperspectral image input for this invention;
[0060] Figure 3 This is the optimal superpixel image in this invention;
[0061] Figure 4 The image after background filling in this invention;
[0062] Figure 5 This is a graph showing the hyperspectral anomaly detection results in this invention; Detailed Implementation Plan
[0063] 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 of the invention and are not intended to limit the invention.
[0064] This invention provides a hyperspectral anomaly detection method based on adaptive superpixels and spatial spectral constraints, such as... Figure 1 As shown, the method is as follows:
[0065] Step 1: First, input the hyperspectral image Y into the entropy rate optimized superpixel segmentation to obtain the k-th superpixel image P. k , for P k ψ(P) is obtained by calculating its superpixel block change metric. k Then, by calculating about ψ(P) k The optimal superpixel image P is obtained by comparing the change weight criterion with the scale selection threshold ρ. opt ;
[0066] Step one is specifically implemented through the following steps:
[0067] (101) The hyperspectral image Y is input into the entropy rate optimized superpixel segmentation according to the following formula to obtain the k-th superpixel image P. k for
[0068] P k =f EROSS (Y;k) (1)
[0069] Where k represents the index of multiple scales in the superpixel segmentation map, f EROSS (·) represents the entropy rate optimized superpixel segmentation function;
[0070] Specifically, the loaded original hyperspectral image was of Los Angeles, USA, with a resolution of 100×100 pixels and a total of 205 bands. All bands were used in the experiment. The background included the ground and shadows, and the anomalous targets were two aircraft, k ∈ [1, 21]. The entropy rate optimized superpixel segmentation method was cited from the following reference: “M.-Y. Liu, O. Tuzel, S. Ramalingam and R. Chellappa, Entropy rate superpixelsegmentation [C] / / Proceedings of CVPR, 2011: 2097-2104.”
[0071] (102) Calculate P according to the following formula. k Superpixel block variation metric ψ(P) k )for
[0072]
[0073] Where E represents the number of superpixel blocks in the current segmentation map, q a P represents k The a-th superpixel block in n(q) a ) represents q a The number of pixels in the medium, P k The superpixel average spectrum of all pixels in the a-th superpixel block is represented as μ(q a ), P k The global average spectrum is expressed as N represents the number of pixels in the entire image, and P k The pixel spectrum of the j-th pixel in the array is represented as x. j (P k );
[0074] Specifically, the number of superpixel blocks E in the segmentation image is 69, and the number of pixels n(q) in the 27th superpixel block of P6 is... 27 The superpixel average spectrum μ(q) of all pixels in the 27th superpixel block of P6 is 43. 27 The global average spectrum in P6 is 0.3901. The value is 0.1170, the number of pixels N in the entire image is 10000, and the pixel spectrum x of the 5062nd pixel in P6 is... 5062 (P6) is 0.0623;
[0075] (103) According to the following formula, by calculating about ψ(P) k The optimal superpixel image P is selected by comparing the change weight criterion with the scale selection threshold ρ. opt for
[0076]
[0077] Here, ε is set to 0.001 to avoid the denominator being 0, and ρ indicates that when the change weight criterion is greater than ρ, the current P will be adjusted. k Let it be P opt ;
[0078] For example, when k is 6, P6 is the optimal superpixel image P. opt , Figure 3 For the optimal superpixel image P opt The superpixel block change metric ψ(P6) of P6 is 0.7242, the scale selection threshold ρ is 0.8750, and ε can be ignored, its function is to prevent the denominator from being 0;
[0079] Step 2: Using P opt Construct a superpixel block subset S with quantile α α Using S α Generate a superpixel mask M, using P opt The i-th superpixel block q in i With S α Construct superpixel adjacency region f Nbr (q i );
[0080] Step two is specifically implemented through the following steps:
[0081] (201) According to the following formula, using quantile α and P opt The i-th superpixel block q in i Constructing a superpixel block subset S α for
[0082]
[0083] Where, θ α Q represents the threshold number of pixels in all superpixel regions under α. α (·) is the quantile function, n(q) i ) represents q i The number of pixels in the middle, where I represents P. opt The number of pixel blocks in the Chinese Super League; the quantile α indicates that in a set of data, the proportion of data with a value of α is less than or equal to that value.
[0084] For example, the quantile α is 0.2, and the threshold θ for the number of pixels in all superpixel regions under α is... α It is 60.3;
[0085] (202) According to the following formula, using S α To construct the superpixel mask M is
[0086]
[0087] Where M(u,v) defines the value of the superpixel mask at pixel coordinates (u,v). Indicates belonging to S α The union of superpixel blocks;
[0088] The superpixel mask value M(62,38) at pixel coordinates (62,38) is 1, and the superpixel mask value M(38,58) at pixel coordinates (38,58) is 0;
[0089] Step 3: Utilize f in Y Nbr (q i The average spectral vector μ is calculated from the pixel spectral vector. * Using M and μ * Fill the background of Y to obtain the background-filled image Y. * ;
[0090] Step three is specifically implemented through the following steps:
[0091] (301) According to the following formula, the superpixel adjacency region f Nbr (q i ) indicates the relationship with q i Shared boundary but not in S α The superpixel blocks in the middle are
[0092]
[0093] in, Represents superpixel block q i The neighborhood boundary, ζ represents the index of the adjacent superpixel block, q ζ q i Adjacent superpixel blocks;
[0094] Superpixel block q 27 The index ζ of the adjacent superpixel block is {21,29,36};
[0095] (302) According to the following formula, through f Nbr (q i The pixel spectral vector in the calculation of its neighborhood average spectral vector μ * for
[0096]
[0097] Where, n(q) ζ ) represents q ζ The number of pixels in the array, Y(u,v) defines the pixel spectral vector at pixel coordinates (u,v);
[0098] fNbr (q 27 The neighborhood average spectral vector μ * Given the expression {0.5258, 0.5420, 0.4557, 0.3266, 0.2610, 0.2456, 0.2414, 0.2467, 0.2491, 0.2519, 0.2535, 0.2568, 0.2591, 0.2621, 0.2658, 0.2685, 0.2714, 0.2741, 0.2772, 0.2785, ...}, q 21 The number of pixels n(q) 21 The value is 190;
[0099] (303) According to the following formula, by combining M and μ * Fill the background of Y to obtain the background-filled image Y. * for
[0100]
[0101] Figure 4 Image Y after filling the background * Y * Abnormal pixels are removed, reducing their impact on the background dictionary;
[0102] Step 4, in Y * Set an outer window region A, and denote the pixel at the center of region A as the center pixel z. Set an inner window region B with z as the center, and construct a background dictionary D using the pixels in A excluding the pixels in other regions of B.
[0103] Step four is specifically implemented through the following steps:
[0104] (401) In Y * Set an outer window region A, and denote the pixel at the center of region A as the center pixel z. Set an inner window region B with z as the center.
[0105] Specifically, in this experiment, the best results were obtained when the outer window area A was set to 11×11 and the inner window area B was set to 3×3.
[0106] (402) Construct a background dictionary D = {d1,...,d2} using the spectral vector d of pixels in A after removing other regions of B. m}, where m represents the number of atoms in D;
[0107] Using the spectral vector d of pixels in A after removing other regions of B 101Given the expression {0.3249, 0.3362, 0.2759, 0.2030, 0.1577, 0.1517, 0.1490, 0.1587, 0.1641, 0.1698, 0.1715, 0.1728, 0.1776, 0.1812, 0.1843, 0.1857, 0.1884, 0.1907, 0.1981, 0.2003, ...}, the number of atoms m in D is 112.
[0108] Step 5: Using q i The number of n opt (q i ) Calculate the superpixel difference score γ, use the spatial coordinates and spectral vectors of atoms in z and D and γ to obtain the weight matrix Ω, and use Ω and D to obtain the optimal representation coefficient β;
[0109] Step five is specifically implemented through the following steps:
[0110] (501) According to the following formula, using q i The number of pixels n opt (q i )Calculate the superpixel difference score γ as
[0111]
[0112] in, P represents opt The average number of pixels in a pixel block in the Chinese Super League, where K represents P. opt The number of superpixel blocks in the image. P represents opt The maximum number of pixels in a pixel block in the Chinese Super League. P represents opt The minimum number of pixels in a Chinese Super League pixel block, q ω For P opt The ω-th superpixel block in;
[0113] P opt The number of pixels n in the 27th superpixel block opt (q 27 ) is 43, P opt Average number of pixels per pixel block in the Chinese Super League For 207, P opt Maximum number of pixels in Chinese Super League pixel block For 216, P opt Minimum number of pixels in a Chinese Super League pixel block The value is 190, and the superpixel difference score γ is 39.7870;
[0114] (502) According to the following formula, using the spatial coordinates r of z and the spatial coordinates t of the atoms in D... lThe spectral vector y of z and the spectral vector d of the atoms in D l And γ yields the weight matrix Ω y for
[0115]
[0116] Where, σ p The standard deviation of spatial coordinates The standard deviation of the spectral vector is represented by... This represents the L2 norm calculation operation, where y is the spectral vector of the pixel at the center of region A;
[0117] The spatial coordinates r of z are (62, 38), the spatial coordinates t2 of the atom in D are (53, 28), and the spectral vector y of z is {0.4786, 0.4612, 0.3713, 0.2940, 0.2411, 0.2266, 0.2103, 0.1909, 0.1795, 0.1737, 0.1656, 0.1632, 0.1579, 0.1526, 0.1515, 0.1483, 0.1473, 0.1465, 0.1421}. The spectral vector d2 of atoms in D is {0.5129, 0.5022, 0.5172, 0.4461, 0.3534, 0.3966, 0.5216, 0.4741, 0.5517, 0.5603, 0.5022, 0.5711, 0.5409, 0.5172, 0.4246, 0.5420, 0.5420, 0.5420, 0.5420, ...}, and the standard deviation σ of the spatial coordinates is... p The standard deviation of the spectral vector is 1.5448. It is 1.5478;
[0118] (503) According to the following formula, using Ω y The optimal representation coefficient β obtained from D is
[0119]
[0120] Where λ is the regularization parameter, This indicates solving for the minimum objective function β;
[0121] The regularization parameter λ is 1×10 -6The optimal representation coefficient β is {0.0640, 0.1371, 0.0270, 0.0459, 0.0228, 0.2330, 0.3549, 0.2476, -0.0237, -0.0565, -0.0684, -0.0951, -0.0104, 0.0270, 0.0012, -0.0226, -0.0226, -0.0226, -0.0226, -0.0226, 0.2896, 0.1666, -0.1451, -0.1036, ...};
[0122] Step 6: Finally, use D and β to calculate and obtain the hyperspectral anomaly detection result image R;
[0123] Step six is specifically implemented through the following steps:
[0124] (601) The hyperspectral anomaly detection result R is obtained by calculating D and β according to the following formula.
[0125]
[0126] Figure 5 Figure R shows the results of the hyperspectral anomaly detection. Figure 5 The two highlighted positions are the abnormal targets.
[0127] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0128] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A hyperspectral anomaly detection method based on adaptive superpixels and spatial spectral constraints, characterized in that, The method is as follows: Step 1: Input the hyperspectral image Y into entropy rate optimized superpixel segmentation to obtain the k-th superpixel image P. k Determine P k Superpixel block variation metric ψ(P) k Then, by calculating about ψ(P) k The optimal superpixel image P is obtained by comparing the change weight criterion with the scale selection threshold ρ. opt ; Step 2: Using P opt Construct a superpixel block subset S with quantile α α Using S α Generate a superpixel mask M, using P opt The i-th superpixel block q in i With S α Construct superpixel adjacency region f Nbr (q i ); Step 3: Using f Nbr (q i The neighborhood average spectral vector μ is calculated from the pixel spectral vector. * By combining M and μ * Fill the background of Y to obtain the background-filled image Y. * ; Step 4, in Y * Set an outer window region A, and denote the pixel at the center of region A as the center pixel z. Set an inner window region B with z as the center, and construct a background dictionary D using the pixels in A excluding the pixels in other regions of B. Step 5: Using q i The number of n opt (q i ) Calculate the superpixel difference score γ, use the spatial coordinates and spectral vectors of atoms in z and D and γ to obtain the weight matrix Ω, and obtain the optimal representation coefficient β through Ω and D; Step 6: Finally, use D and β to calculate and obtain the hyperspectral anomaly detection result image R.
2. The hyperspectral anomaly detection method based on adaptive superpixels and spatial spectral constraints according to claim 1, characterized in that, Step one, specifically, involves the following steps: (101) The hyperspectral image Y is input into the entropy rate optimized superpixel segmentation according to the following formula to obtain the k-th superpixel image P. k for P k =f EROSS (Y;k) (1) Where k represents the index of multiple scales in the superpixel segmentation map, f EROSS (·) represents the entropy rate optimized superpixel segmentation function; (102) Calculate P according to the following formula. k Superpixel block variation metric ψ(P) k )for Where E represents the number of superpixel blocks in the current segmentation map, q a P represents k The a-th superpixel block in n(q) a ) represents q a The number of pixels in the medium, P k The superpixel average spectrum of all pixels in the a-th superpixel block is represented as μ(q a ), P k The global average spectrum is expressed as N represents the number of pixels in the entire image, and P k The pixel spectrum of the j-th pixel in the array is represented as x. j (P k ); (103) According to the following formula, by calculating about ψ(P) k The optimal superpixel image P is selected by comparing the change weight criterion with the scale selection threshold ρ. opt for Where ε is set to 0.001, and ρ represents the change weight criterion when it is greater than ρ, the current P k Let it be P opt .
3. The hyperspectral anomaly detection method based on adaptive superpixels and spatial spectral constraints according to claim 1 or 2, characterized in that, Step two, specifically, involves the following steps: (201) According to the following formula, using quantile α and P opt The i-th superpixel block q in i Constructing a superpixel block subset S α for Where, θ α Q represents the threshold number of pixels in all superpixel regions under α. α (·) is the quantile function, n(q) i ) represents q i The number of pixels in the middle, where I represents P. opt The number of pixel blocks in the Chinese Super League; the quantile α indicates that in a set of data, the proportion of data with a value of α is less than or equal to that value. (202) According to the following formula, using S α To construct the superpixel mask M is Where M(u,v) defines the value of the superpixel mask at pixel coordinates (u,v). Indicates belonging to S α The union of superpixel blocks; (203) According to the following formula, through the superpixel adjacency region f Nbr (q i ) indicates the relationship with q i Shared boundary but not in S α The superpixel blocks in the middle are in, Represents superpixel block q i The neighborhood boundary, ζ represents the index of the adjacent superpixel block, q ζ q i Adjacent superpixel blocks.
4. The hyperspectral anomaly detection method based on adaptive superpixels and spatial spectral constraints according to claim 3, characterized in that, Step three, specifically, involves the following steps: (301) According to the following formula, through f Nbr (q i The pixel spectral vector in the calculation of its neighborhood average spectral vector μ * for Where, n(q) ζ ) represents q ζ The number of pixels in the array, Y(u,v) defines the pixel spectral vector at pixel coordinates (u,v); q ζ q i Adjacent superpixel blocks; (302) According to the following formula, by combining M and μ * Fill the background of Y to obtain the background-filled image Y. * for 5. The hyperspectral anomaly detection method based on adaptive superpixels and spatial spectral constraints according to claim 4, characterized in that, Step four is implemented through the following steps: (401) In Y * Set an outer window region A, and denote the pixel at the center of region A as the center pixel z. Set an inner window region B with z as the center. (402) Construct a background dictionary D = {d1,...,d2} using the spectral vector d of pixels in A after removing other regions of B. m }, where m represents the number of atoms in D.
6. The hyperspectral anomaly detection method based on adaptive superpixels and spatial spectral constraints according to claim 5, characterized in that, Step five is implemented through the following steps: (501) According to the following formula, using q i The number of pixels n opt (q i )Calculate the superpixel difference score γ as in, P represents opt The average number of pixels in a pixel block in the Chinese Super League, where K represents P. opt The number of superpixel blocks in the image. P represents opt The maximum number of pixels in a pixel block in the Chinese Super League. P represents opt The minimum number of pixels in a Chinese Super League pixel block, q ω For P opt The ω-th superpixel block in; (502) According to the following formula, using the spatial coordinates r of z and the spatial coordinates t of the atoms in D... l The spectral vector y of z and the spectral vector d of the atoms in D l And γ yields the weight matrix Ω y for Where, σ p The standard deviation of spatial coordinates The standard deviation of the spectral vector is represented. This represents the L2 norm calculation operation, where y is the spectral vector of the pixel at the center of region A; (503) According to the following formula, through Ω y The optimal representation coefficient β obtained from D is Where λ is the regularization parameter, This indicates that we are solving for β, which minimizes the objective function.
7. The hyperspectral anomaly detection method based on adaptive superpixels and spatial spectral constraints according to claim 6, characterized in that, Step six is implemented through the following steps: (601) The hyperspectral anomaly detection result R is obtained by calculating D and β according to the following formula.