Hyperspectral anomaly detection method based on local weight contrast
By introducing local weight contrast and spectral morphological harmony functions in hyperspectral anomaly detection, the problem of insufficient detection performance of existing methods in complex backgrounds and noise environments is solved, and more efficient and accurate anomaly detection is achieved.
Patent Information
- Application Number
- CN202411199085.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2025-02-11
AI Technical Summary
The existing hyperspectral anomaly detection methods are limited in detection performance under complex background distribution and noise interference, making it difficult to effectively utilize the spectral mixing effect.
Using hyperspectral anomaly detection method based on local weight contrast, the spectral morphological harmony function is obtained through dual envelope spectrum analysis, the hyperspectral feature map is constructed, the local difference measurement value of the background and target area is determined, and the local weight contrast is calculated to obtain abnormal detection results. .
It improves the accuracy and robustness of hyperspectral anomaly detection, effectively reduces the noise impact caused by spectral mixing effects, and improves the quality of detection results.
Smart Images

Figure CN119418184A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of image processing, and in particular relates to a hyperspectral anomaly detection method based on local weight contrast. Background Art
[0002] Hyperspectral images usually contain hundreds of spectral bands and show rich spectral features. Their spectral range covers from ultraviolet to infrared, and the spectral resolution is usually less than 10 nanometers. Due to its extensive spectral and spatial information, hyperspectral images (HSI) have shown unique advantages in scene understanding. Thanks to the unique characteristics of different materials in the spectral dimension, HSI has been widely used in the field of target detection.
[0003] In the past few decades, researchers have proposed many hyperspectral anomaly detection methods. These methods can be roughly divided into two categories: statistics-based methods and representation-based methods. Statistics-based methods usually assume that the background follows a certain distribution, and any pixel that deviates from this distribution is considered an anomaly. However, the actual distribution of the background is often complex and changeable, and simple models cannot accurately distinguish between the background and anomalies, which affects the accuracy of the detection results. The classic statistics-based method is the RX method (RXD) proposed by Reed and Xiaoli, which assumes that the background follows a Gaussian distribution and determines the Mahalanobis distance between the test pixel and the background through the generalized likelihood ratio test (GLRT) to obtain the detection result.
[0004] Representation-based methods represent test pixels by constructing a background dictionary containing HSI background pixels. The representation error is used to determine the anomaly detection results. For example, Chen et al. proposed a hyperspectral anomaly detection method based on low-rank representation with graph and total variation regularization (GTVLRR), which combines graph regularization and total variation (TV) regularization into low-rank representation, and then obtains anomaly detection results through the reconstruction error of the low-rank representation. The collaborative representation detector (CRD) assumes that background pixels can be linearly represented by neighboring pixels in a sliding double window, and uses a distance-weighted regularization matrix to adjust the weight of each neighboring pixel. If a pixel cannot be effectively represented by its neighboring pixels, the pixel is considered to be anomaly. However, the performance of such methods is limited by the quality of the background dictionary. The construction of the background dictionary may be affected by noise interference and anomaly contamination, which in turn affects the detection results. As mentioned above, the detection performance of existing methods is limited by the insufficient utilization of spectral mixing effects. Summary of the invention
[0005] In view of this, the main purpose of the present invention is to provide a hyperspectral anomaly detection method based on local weight contrast.
[0006] To achieve the above object, the technical solution of the present invention is achieved as follows:
[0007] The embodiment of the present invention provides a hyperspectral anomaly detection method based on local weighted contrast, which is:
[0008] The spectral curve S of each pixel of the original hyperspectral image i,j (λ) double envelope spectrum analysis is performed to obtain the spectral morphological harmonic function R i,j (λ), using R i,j (λ) constructing a hyperspectral feature map F;
[0009] Determine the background area block according to the hyperspectral feature map F and background region B;
[0010] Will The characteristic spectrum curve of the φth pixel in is recorded as And determine the average spectral curve of the background area B
[0011] According to the and Determine the local difference measure of the background based on the spectral divergence
[0012] Will The background area block is recorded as the background local difference measurement matrix The characteristic spectral curve of the ξ-th pixel in Block0 is recorded as And determine the target local difference measure based on spectral divergence
[0013] Will The target area block is recorded as the target local difference measurement value matrix Block′0, and the target local difference measurement value corresponding to the centroid position of Block′0 is recorded as Among them, φ represents exist The serial number in ξ represents In Block′0, the serial numbers, φ and ξ, are both integers greater than or equal to 1;
[0014] Determine each middle The average value of The 8 average values of The maximum value among the 8 average values corresponds to Recorded as The local difference measurement value of the φth pixel in is recorded as
[0015] Will Arrange all elements in descending order to get the sorted Use the first h Determine the mean of the background portion Will Arrange all elements in descending order to get the sorted Use the first z Determine the target partial mean M0, where Φ represents The serial number, Ξ represents , h, Φ, z and Ξ are all integers greater than or equal to 1;
[0016] According to the and M0 determine the local weight contrast χ, Multiply χ by χ to obtain the hyperspectral anomaly detection result map.
[0017] In the above scheme, the spectral curve S of each pixel of the original hyperspectral image is i,j (λ) double envelope spectrum analysis is performed to obtain the spectral morphological harmonic function R i,j (λ), using R i,j (λ) Construct the hyperspectral feature map F. The specific steps are:
[0018] (101) Load the original hyperspectral image and calculate the spectral curve S of each pixel of the original hyperspectral image. i,j (λ) Identify the extreme points, S i,j All local maxima of (λ) are denoted by All local minima are denoted by Among them, ν represents the νth The serial number of The serial number of , ν and μ are both integers greater than or equal to 1;
[0019] (102) Using the interpolation function Fitting to construct the upper envelope Using interpolation function Fitting to construct the lower envelope According to the following formula, using and Determine the spectral morphological harmonic function R i,j (λ) is
[0020]
[0021] (103) Using R i,j (λ) Construct a hyperspectral feature map F.
[0022] In the above scheme, the background area block is determined according to the hyperspectral feature map F and background area B, specifically including: setting each pixel point of F to the center of the multi-scale window area A and the target area Block0 in turn, setting the length and width of A to w out , set the length and width of Block0 to w in , with Block0 as the center block, A is divided into 9 3×3 area blocks, and the other area blocks in A except Block0 are recorded as background area blocks Will The set is recorded as the background area B, where i represents the horizontal coordinate of each pixel of the original hyperspectral image, j represents the vertical coordinate of each pixel of the original hyperspectral image, λ represents the wavelength of the spectral curve of each pixel of the original hyperspectral image, and w out ∈[11,21] odd number, w in ∈[1,9] odd number, express The sequence number in B, integer;
[0023] In the above scheme, the The characteristic spectrum curve of the φth pixel in is recorded as And determine the average spectral curve of the background area B Specifically include:
[0024] Will The characteristic spectrum curve of the φth pixel in is recorded as According to the following formula, using w in , w out and Determine the average spectral curve of the background area for
[0025]
[0026] Here, ∑(·) represents a summation operation.
[0027] In the above scheme, according to the and Determine the local difference measure of the background based on the spectral divergence Specifically include: according to the following formula, using and Determine the local difference measure of the background based on the spectral divergence for
[0028]
[0029] Where Λ represents the total wavelength of the characteristic spectral curve.
[0030] In the above scheme, the determination of the target local difference measurement value based on the spectral divergence Specifically include: according to the following formula, using and Determine the target local difference measure based on spectral divergence for
[0031]
[0032] (205) The target area block is recorded as the target local difference measurement value matrix Block′0, and the target local difference measurement value corresponding to the centroid position of Block′0 is recorded as
[0033] In the above scheme, the determination of each middle The average value of The 8 average values of The maximum value among the 8 average values corresponds to Recorded as The local difference measurement value of the φth pixel in is recorded as Specifically include: According to the following formula, determine
[0034]
[0035] Among them, n1 represents middle The number of , an integer greater than or equal to 1;
[0036] The local difference measurement value of the φth pixel in is recorded as
[0037] In the above scheme, the Arrange all elements in descending order to get the sorted Use the first h Determine the mean of the background portion Will Arrange all elements in descending order to get the sorted Use the first z Determine the target partial mean M0, including:
[0038] (401) According to the following formula, Arrange all elements in descending order to get the sorted for
[0039]
[0040] Among them, sort(·) represents the descending sort function;
[0041] (402) According to the following formula, using the first h Determine the mean of the background portion for
[0042]
[0043] Among them, round(·) represents the rounding up function;
[0044] (403) According to the following formula, Arrange all elements in descending order to get the sorted for
[0045]
[0046] Among them, n2 represents the number of The number of
[0047] (404) According to the following formula, using the first z Determine the target part mean M0 as
[0048]
[0049] In the above scheme, according to the and M0 determine the local weight contrast χ, Multiplying by χ, we can get the hyperspectral anomaly detection result graph, which includes:
[0050] (501) According to the following formula, using and M0 determine the local weight contrast χ as
[0051]
[0052] (502) Multiply χ by χ to obtain the hyperspectral anomaly detection result map.
[0053] Compared with the prior art, in order to make full use of the spectral mixing effect, the present invention proposes a hyperspectral anomaly detection method based on local weighted contrast, introduces a spectral morphological harmonic function to reduce the noise generated by the spectral mixing effect, and introduces a local difference measurement value to determine the local weighted contrast; the local weighted contrast and the target local difference measurement value are combined to obtain the final anomaly detection result. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 is a flow chart of the present invention;
[0055] Figure 2 The original hyperspectral image inputted by the present invention;
[0056] Figure 3is the hyperspectral characteristic graph in the present invention;
[0057] Figure 4 This is a diagram of the hyperspectral anomaly detection result in the present invention; Specific implementation plan
[0058] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific implementation described here is only used to solve the present invention and is not used to limit the present invention.
[0059] The embodiment of the present invention provides a hyperspectral anomaly detection method based on local weight contrast, such as Figure 1 As shown, the method is:
[0060] Step 1: Load the original hyperspectral image and calculate the spectral curve S of each pixel in the original hyperspectral image. i,j (λ) double envelope spectrum analysis is performed to obtain the spectral morphological harmonic function R i,j (λ), using R i,j (λ) Construct a hyperspectral feature map F, set each pixel of F as the center of the multi-scale window area A and the target area Block0 in turn, and set the length and width of A to w out , set the length and width of Block0 to w in , with Block0 as the center block, A is divided into 9 3×3 area blocks, and the other area blocks in A except Block0 are recorded as background area blocks Will The set is recorded as the background area B, where i represents the horizontal coordinate of each pixel of the original hyperspectral image, j represents the vertical coordinate of each pixel of the original hyperspectral image, λ represents the wavelength of the spectral curve of each pixel of the original hyperspectral image, and w out ∈[11,21] odd number, w in ∈[1,9] odd number, express The sequence number in B, integer;
[0061] In the above scheme, the step 1 is specifically implemented by the following steps:
[0062] (101) Load the original hyperspectral image and calculate the spectral curve S of each pixel of the original hyperspectral image. i,j (λ) Identify the extreme points, S i,j All local maxima of (λ) are denoted by All local minima are denoted by Among them, ν represents the νth The serial number of The serial number of , ν and μ are both integers greater than or equal to 1;
[0063] Specifically, the original hyperspectral image loaded is the Los Angeles airport. The resolution of the original hyperspectral image is 100×100 pixels. The total wavelength Λ of the hyperspectral image is 205. All bands are used in the experiment. The background includes houses, roads and grass. The abnormal targets are two aircraft. The spectral curve S of the original hyperspectral image loaded is 8,9 (λ) is {2.2382,2.3116,2.0427,1.4770,1.1215,1.0759,1.0290,1.0468,1.0295,1.0430,1.0529,1.0642,1.0736,1.0913,1.1186,1.1484,1.1910,1.2321,1.2512,1.2729,......};
[0064] (102) Using the interpolation function Fitting to construct the upper envelope Using interpolation function Fitting to construct the lower envelope According to the following formula, using and Determine the spectral morphological harmonic function R i,j (λ) is
[0065]
[0066] Specifically, the spectral morphological harmonic function R i,j (λ) is {1.6307, 1.4417, 1.4930, 1.3825, 1.2384, 1.1077, 1.0400, 1.0198, 0.9996, 0.9893, 0.9915, 1.0092, 1.0381, 1.0764, 1.1191, 1.1565, 1.1871, 1.2124, 1.2335, 1.2528, ...}; The interpolation function uses the method in the following reference, "Xu Xiaoyong, Zhong Taiyong. Construction and Matlab implementation of cubic spline interpolation function [J]. Ordnance Automation, 2006, 25 (11): 3.";
[0067] (103) Using R i,j (λ) constructing a hyperspectral feature map F;
[0068] Specifically, Figure 3 It is the hyperspectral feature map F, the resolution of F is 100×100 pixels, and the total wavelength is 205;
[0069] (104) Set each pixel of F as the center of the multi-scale window area A and the target area Block0 in turn, and set the length and width of A to w out , set the length and width of Block0 to w in , with Block0 as the center block, A is divided into 9 3×3 area blocks, and the other area blocks in A except Block0 are recorded as background area blocks Will The set is recorded as background area B;
[0070] Specifically, in the present invention, out =21,w in =5, the experimental results are the best, so the length and width of A are set to w out The length and width of Block0 are both 21 pixels. in All are 5 pixels, the length and width of Block1, Block3, Block6 and Block8 are 8 pixels, and the total wavelength is 205, the length of Block2, Block4, Block5 and Block7 are 8 pixels, the width is 5 pixels, and the total wavelength is 205;
[0071] Step 2: The characteristic spectrum curve of the φth pixel in is recorded as Using w in , w out and Determine the average spectral curve of the background area use and Determine the local difference measure of the background based on the spectral divergence Will The background area block is recorded as the background local difference measurement matrix The characteristic spectral curve of the ξ-th pixel in Block0 is recorded as use and ) Determine the target local difference measure based on spectral divergence Will The target area block is recorded as the target local difference measurement value matrix Block′0, and the target local difference measurement value corresponding to the centroid position of Block′0 is recorded as Among them, φ represents exist The serial number in ξ represents In Block′0, the serial numbers, φ and ξ, are both integers greater than or equal to 1;
[0072] In the above scheme, the step 2 is specifically implemented by the following steps:
[0073] (201) The characteristic spectrum curve of the φth pixel in is recorded as According to the following formula, using w in , w out and Determine the average spectral curve of the background area for
[0074]
[0075] Where ∑(·) represents the summation operation;
[0076] Specifically, w out 2 -w in 2 Indicates that the number of pixels in the background area is 416, It represents the spectral curve corresponding to the 31st pixel in Block3. is {1.4830,1.4297,1.3627,1.2840,1.2066,1.1427,1.0968,1.0671,1.0483,1.0345,1.0237,1.0148,1.0080,1.0031,1.0005,0.9999,1.0012,1.0040,1.0078,1.0121,......};
[0077] (202) According to the following formula, using and Determine the local difference measure of the background based on the spectral divergence for
[0078]
[0079] Wherein, Λ represents the total wavelength of the characteristic spectrum curve;
[0080] Specifically, represents the background local difference measurement value based on spectral divergence corresponding to the 31st pixel in Block3, using and Sure is 0.0038;
[0081] (203) The background area block is recorded as the background local difference measurement matrix The characteristic spectral curve of the ξ-th pixel in Block0 is recorded as
[0082] Specifically, the length and width of Block'1, Block'3, Block'6 and Block'8 are 8 pixels each, the length of Block'2, Block'4, Block'5 and Block'7 are 8 pixels each, and the width of Block'7 are 5 pixels each. Represents the characteristic spectrum curve of the 17th pixel in Block0, is {1.0898,1.0589,1.0195,0.9680,0.9119,0.8597,0.8160,0.7885,0.7818,0.7929,0.8190,0.8472,0.8699,0.8940,0.9237,0.9621,1.0073,1.0552,1.1010,1.1395,......};
[0083] (204) According to the following formula, using and Determine the target local difference measure based on spectral divergence for
[0084]
[0085] Specifically, using and Determine the target local difference measure based on spectral divergence is 0.0006;
[0086] (205) The target area block is recorded as the target local difference measurement value matrix Block′0, and the target local difference measurement value corresponding to the centroid position of Block′0 is recorded as
[0087] Specifically, the length and width of Block′0 are both 5 pixels, and the target local difference measurement value corresponding to the centroid position of Block′0 is It is 0.0038.
[0088] Step 3: Determine each middle The average value of The 8 average values of The maximum value among the 8 average values corresponds to Recorded as The local difference measurement value of the φth pixel in is recorded as
[0089] In the above scheme, the step three is specifically implemented by the following steps:
[0090] (301) Determine each middle The average value of The 8 average values of The maximum value among the 8 average values corresponds to Recorded as for
[0091]
[0092] Among them, n1 represents middle The number of , an integer greater than or equal to 1;
[0093] Specifically, each middle The average values are {0.0009, 0.0017, 0.0004, 0.0008, 0.0007, 0.0005, 0.0011, 0.0005}, The maximum value among the 8 average values corresponds to Block′2 is denoted as
[0094] (302) The local difference measurement value of the φth pixel in is recorded as
[0095] Specifically, The length is 8 pixels and the width is 5 pixels.
[0096] Step 4: Arrange all elements in descending order to get the sorted Use the first h Determine the mean of the background portion Will Arrange all elements in descending order to get the sorted Use the first z Determine the target partial mean M0, where Φ represents The serial number, Ξ represents , h, Φ, z and Ξ are all integers greater than or equal to 1;
[0097] In the above scheme, the step 4 is specifically implemented by the following steps:
[0098] (401) According to the following formula, Arrange all elements in descending order to get the sorted for
[0099]
[0100] Among them, sort(·) represents the descending sort function;
[0101] Specifically, n1 is 40, is {0.0079,0.0079,0.0064,0.0064,0.0046,0.0046,0.0038,0.0038,0.0029,0.0026,0.0026,0.0017,0.0017,0.0014,0.0011,0.0011,0.0010,0.0010,0.0009,0.0009,...};
[0102] (402) According to the following formula, using the first h Determine the mean of the background portion for
[0103]
[0104] Among them, round(·) represents the rounding up function;
[0105] Specifically, in the present invention, α is set to 0.8, h is 32, is 0.002;
[0106] (403) According to the following formula, Arrange all elements in descending order to get the sorted for
[0107]
[0108] Among them, n2 represents the number of The number of
[0109] Specifically, n2 is 25, is {0.0071,0.0041,0.0041,0.0039,0.0038,0.0038,0.0035,0.0035,0.0029,0.0028,0.0026,0.0023,0.0023,0.0017,0.0017,0.0017,0.0016,0.0016,0.0015,0.0015,......};
[0110] (404) According to the following formula, using the first z Determine the target part mean M0 as
[0111]
[0112] Specifically, in the present invention, β is set to 0.1, z is 3, and M0 is 0.0027.
[0113] Step 5: Utilization and M0 determine the local weight contrast χ, Multiply it by χ to obtain the hyperspectral anomaly detection result map;
[0114] In the above scheme, the step 5 is specifically implemented by the following steps:
[0115] (501) According to the following formula, using and M0 determine the local weight contrast χ as
[0116]
[0117] Specifically, χ is 1.3243;
[0118] (502) Multiply it by χ to obtain the hyperspectral anomaly detection result map;
[0119] Specifically, Figure 4 This is the result of hyperspectral anomaly detection. Figure 4 The two highlighted positions are abnormal targets.
Claims
1. A hyperspectral anomaly detection method based on local weighted contrast, characterized in that: The method is: The spectral curve S of each pixel of the original hyperspectral image i,j (λ) double envelope spectrum analysis is performed to obtain the spectral morphological harmonic function R i,j (λ), using R i,j (λ) constructing a hyperspectral feature map F; Determine the background area block according to the hyperspectral feature map F and background region B; Will The characteristic spectrum curve of the φth pixel in is recorded as And determine the average spectral curve of the background area B According to the and Determine the local difference measure of the background based on the spectral divergence Will The background area block is recorded as the background local difference measurement matrix The characteristic spectral curve of the ξ-th pixel in Block0 is recorded as And determine the target local difference measure based on spectral divergence Will The target area block is recorded as the target local difference measurement value matrix Block′0, and the target local difference measurement value corresponding to the centroid position of Block′0 is recorded as Among them, φ represents exist The serial number in ξ represents In Block′0, the serial numbers, φ and ξ, are both integers greater than or equal to 1; Determine each middle The average value of The 8 average values of The maximum value among the 8 average values corresponds to Recorded as The local difference measurement value of the φth pixel in is recorded as Will Arrange all elements in descending order to get the sorted Use the first h Determine the mean of the background portion Will Arrange all elements in descending order to get the sorted Use the first z Determine the target partial mean M0, where Φ represents The serial number of , h, Φ, z and Ξ are all integers greater than or equal to 1; According to the and M0 determine the local weight contrast χ, Multiply χ by χ to obtain the hyperspectral anomaly detection result map.
2. The hyperspectral anomaly detection method based on local weight contrast according to claim 1 is characterized in that: The spectral curve S of each pixel of the original hyperspectral image i,j (λ) double envelope spectrum analysis is performed to obtain the spectral morphological harmonic function R i,j (λ), using R i,j (λ) Construct a hyperspectral feature map F. The specific steps are: (101) Load the original hyperspectral image and calculate the spectral curve S of each pixel of the original hyperspectral image. i,j (λ) Identify the extreme points, S i,j All local maxima of (λ) are denoted by All local minima are denoted by Among them, v represents the νth The serial number of , v and μ are both integers greater than or equal to 1; (102) Using the interpolation function Fitting to construct the upper envelope Using interpolation function Fitting to construct the lower envelope According to the following formula, using and Determine the spectral morphological harmonic function R i,j (λ) is (103) Using R i,j (λ) Construct a hyperspectral feature map F.
3. The hyperspectral anomaly detection method based on local weight contrast according to claim 1 or 2, characterized in that: Determining the background area block according to the hyperspectral feature map F and background area B, specifically including: setting each pixel point of F to the center of the multi-scale window area A and the target area Block0 in turn, setting the length and width of A to w out , set the length and width of Block0 to w in , with Block0 as the center block, A is divided into 9 3×3 area blocks, and the other area blocks in A except Block0 are recorded as background area blocks Will The set is recorded as the background area B, where i represents the horizontal coordinate of each pixel of the original hyperspectral image, j represents the vertical coordinate of each pixel of the original hyperspectral image, λ represents the wavelength of the spectral curve of each pixel of the original hyperspectral image, and w out ∈[11,21] odd number, w in ∈[1,9] odd number, express The sequence number in B, An integer.
4. The hyperspectral anomaly detection method based on local weight contrast according to claim 3 is characterized in that: The The characteristic spectrum curve of the φth pixel in is recorded as And determine the average spectral curve of the background area B Specifically include: Will The characteristic spectrum curve of the φth pixel in is recorded as According to the following formula, using w in , w out and Determine the average spectral curve of the background area for Here, ∑(·) represents a summation operation.
5. The hyperspectral anomaly detection method based on local weight contrast according to claim 4 is characterized in that: According to the and Determine the local difference measure of the background based on the spectral divergence Specifically include: according to the following formula, using and Determine the local difference measure of the background based on the spectral divergence for Where Λ represents the total wavelength of the characteristic spectral curve.
6. The hyperspectral anomaly detection method based on local weight contrast according to claim 5 is characterized in that: The determination is based on the target local difference measurement value of the spectral divergence Specifically include: according to the following formula, using and Determine the target local difference measure based on spectral divergence for (205) The target area block is recorded as the target local difference measurement value matrix Block′0, and the target local difference measurement value corresponding to the centroid position of Block′0 is recorded as 7. The hyperspectral anomaly detection method based on local weight contrast according to claim 6 is characterized in that: Determine each middle The average value of The 8 average values of The maximum value among the 8 average values corresponds to Recorded as The local difference measurement value of the φth pixel in is recorded as Specifically include: According to the following formula, determine Among them, n1 represents middle The number of , an integer greater than or equal to 1; The local difference measurement value of the φth pixel in is recorded as 8. The hyperspectral anomaly detection method based on local weight contrast according to claim 6 is characterized in that: The After all elements in are sorted in descending order Use the first h Determine the mean of the background portion Will Arrange all elements in descending order to get the sorted Use the first z Determine the target partial mean M0, including: (401) According to the following formula, Arrange all elements in descending order to get the sorted for Among them, sort(·) represents the descending sort function; (402) According to the following formula, using the first h Determine the mean of the background portion for Among them, round(·) represents the rounding up function; (403) According to the following formula, Arrange all elements in descending order to get the sorted for Among them, n2 represents the number of The number of (404) According to the following formula, using the first z Determine the target part mean M0 as 9. The hyperspectral anomaly detection method based on local weight contrast according to claim 7, characterized in that: According to the and M0 determine the local weight contrast χ, Multiplying by χ, we can get the hyperspectral anomaly detection result graph, which includes: (501) According to the following formula, using and M0 determine the local weight contrast χ as (502) Multiply χ by χ to obtain the hyperspectral anomaly detection result map.