Hyperspectral Anomaly Detection via Spatial Density Background Puriﬁcation

: In the research of anomaly detection methods, obtaining a pure background without abnormal pixels can effectively improve the detection performance and reduce the false-alarm rate. Therefore, this paper proposes a spatial density background puriﬁcation (SDBP) method for hyperspectral anomaly detection. First, a density peak clustering (DP) algorithm is used to calculate the local density of pixels within a single window. Then, the local densities are sorted into descending order and the m pixels that have the highest local density are selected from high to low. Therefore, the potential abnormal pixels in the background can be effectively removed, and a purer background set can be obtained. Finally, the collaborative representation detector (CRD) is employed for anomaly detection. Considering that the neighboring area of each pixel will have homogeneous material pixels, we adopt the double window strategy to improve the above method. The local densities of the pixels between the large window and the small window are calculated, while all pixels are removed from the small window. This makes the background estimation more accurate, reduces the false-alarm rate, and improves the detection performance. Experimental results on three real hyperspectral datasets such as Airport, Beach, and Urban scenes indicate that the detection accuracy of this method outperforms other commonly used anomaly detection methods.


Introduction
Hyperspectral remote sensing images have high spectral resolution and play an increasingly important role in earth observation system. The spectral resolution of hyperspectral remote sensing images can reach the nanometer level, and there are dozens or even hundreds of spectral channels. The spectral range of ground object imaging is also extended to the near-infrared, middle-infrared and even far-infrared spectrum [1][2][3]. Hyperspectral image (HSI) is widely used due to its high dimensionality and obvious spectral characteristics [4,5]. With its rich spectral information [6], it can reflect subtle differences between targets, thus enabling people to discover many ground targets that are impossible or difficult to detect in conventional remote sensing. Compared with traditional visible or multi-spectral remote sensing data, hyperspectral remote sensing has higher spectral resolution and wider spectral range, which enhances the spectral information detection capability for ground objects. Therefore, HSI is a tool that is well suited for a variety of remote sensing applications, such as spectral unmixing [7], classification [8], and target detection [9,10]. Anomaly detection is an important branch of HSI processing and subpixel domain; it can detect targets with spectral differences from the surrounding environment without prior spectral information, it has important applications in military defense [11,12], agriculture [13,14], mineral reconnaissance [15,16], public safety [17], and environmental monitoring [18][19][20], and has become a research hotspot in the field of hyperspectral target detection.
Anomaly detection technology is widely studied because it does not need any prior information about the target pixel and background [21][22][23]. The most typical anomaly detection algorithm is the Reed-Xiaoli (RX) [24] anomaly detection algorithm proposed by Reed for multi-spectral target detection. The algorithm is a local anomaly detection algorithm that is used to detect objects whose spatial patterns are known but whose spectral characteristics are unknown under the condition of Gaussian background statistical properties and spatial whitening. However, directly processing the HSI using the RX algorithm will result in a higher false-alarm rate. Therefore, a global and local RX (LRX) [25] analysis and optimization algorithm was proposed for hyperspectral data anomaly detection that uses the optimization technique based on the effective use of linear algebra library and the properties of a specific matrix to improve the computational efficiency of the correlation matrix and its inverse. Meanwhile, the algorithm was optimized for multi-core platforms. The LRX algorithm can adaptively construct a background normal model based on the surrounding pixels of a target pixel, thereby significantly improving the detection effect. Nevertheless, the RX algorithm and its improved algorithm [26][27][28] only use the low-order information of HSIs and there are linear models based on the Mahalanobis distance. To make full use of hyperspectral information, Kwon et al. proposed a nonlinear kernel RX (KRX) [29] method that mapped the spectral signals of the original space to high-dimensional feature spaces using nonlinear kernel functions. This effectively solved the spectral indivisibility problem of linear space and greatly reduced the false-alarm rate. Furthermore, a modified KRX [30] algorithm was proposed for anomaly detection in HSIs. The algorithm assumed that the background class is a spherical covariance matrix and compares it with the traditional KRX algorithm. Compared to the traditional KRX algorithm [31], the detection and calculation efficiency of anomaly detection was improved.
Although the previous work has improved the anomaly detection performance to a certain extent [32][33][34], the detection accuracy and detection efficiency still warrant further improvement. Therefore, to avoid this problem, an anomaly detection algorithm supporting vector data description (SVDD) [35] was proposed. SVDD required no assumptions about the distribution of targets and backgrounds. The data distribution was mainly described by calculating the minimum hypersphere boundary that contained a set of data and any outer points beyond the boundary were regarded as abnormal. In addition, Zhang et al. proposed a low-rank and sparse matrix decomposition-based Mahalanobis distance method for hyperspectral anomaly detection [36] that explores the low-rank prior features of the background and the sparse nature of the anomaly to obtain the background and sparse components. This takes advantage of the low-rank prior knowledge of the background to calculate the background statistics and develop an anomaly detector based on the Mahalanobis distance. Thus, this method can simultaneously reduce the problem of abnormal contamination and inverse covariance matrix, thereby improving the detection performance. However, the traditional Mahalanobis-distance-based anomaly detection method relies on background data to construct anomaly detection indicators [37][38][39]. Moreover, these methods were contaminated by anomalous pixels in a conventional background covariance matrix. Du et al. proposed an anomaly detection method based on discriminant metric learning [40] that increases the separability between anomalous pixels and other background pixels using the discriminant information to effectively use robust anomaly degree metrics. Although the aforementioned methods avoid the inversion operation, it was often difficult to solve the Lagrangian operator that represents the sparse weight, and the time complexity is proportional to the number of background pixels.
In recent years, collaborative representation detection (CRD) [41][42][43] was used to detect abnormal targets. Target pixels can often be represented as a linear combination of background pixels. By judging the result of the collaborative representation and the actual result as a basis for judging abnormal targets, a good detection effect is obtained, and the real-time performance is significantly enhanced. For instance, Li et al. [44] proposed a cooperative representation method for the hyperspectral abnormal detection. The algorithm is directly based on the fact that each pixel in the background can be approximated by its spatial neighborhood, while abnormal pixels cannot. Considering the spatial information in adjacent pixels, Tan et al. proposes two improved methods based on local summation anomaly detection (LSAD) [45]. Firstly, a partial summation unsupervised recently regularized subspace with outlier anomaly detector is proposed. Then, a method of linearly representing the test pixels using pixels between the inner and outer windows and introducing an inverse distance weight is proposed, which further improves the calculation speed and the detection accuracy. Moreover, Su et al. found that the least squares solution in the original CRD algorithm would become more unstable when more categories were involved. When multiple samples in the background are similarly abnormal and the test pixels are abnormal pixels, it may cause a detection error. Therefore, Su et al. used PCA in the spatial domain to extract the main pixel information of the background as a sample for collaborative presentation, and meanwhile removed the abnormal pixel information in the background [46].
In many studies, rectangular windows are generally used to extract background pixels; however, there may still be fewer related pixels in the selected background pixels, which creates errors in the results of the collaborative representation. To solve this problem, many researchers use correlation metrics to select the most similar pixels, such as Euclidean distance [47], cosine distance [48,49], correlation coefficient [50], etc. Although the similarity measure is used to extract the most similar pixels for the characterization, the influence of the phenomenon that the same objects can have different spectral information and different objects can have the same spectral information will affect the extraction of pure background pixels to some extent. Therefore, this paper proposes a hyperspectral anomaly detection method via spatial density background purification (SDBP). We have carried out extensive experiments on three commonly used real HSIs to prove the effectiveness of the method. First, the local density value of each pixel is calculated within a single rectangular window. Then, the m highest density values are selected as pure background pixels. Finally, the collaborative representation method is used to calculate the similarity between pure background pixels and the central pixel, thereby detecting abnormalities. Subsequently, we improved the single window to a double window through further research to obtain the density value. The reason is that there may be a homogeneous region around the center pixel, so the double window operation can remove pixels in the small window that are homogeneous with the center pixel. The main contributions of the proposed SDBP method are as follows: (1) The DP clustering algorithm is employed to obtain density information by calculating the correlation between pixels. It not only avoids the influence of "the same object has different spectral information, different objects have the same spectral information" on the detection accuracy, but also deeply explores the spatial context information between pixels.
(2) With the operation of parameter P, a more pure background pixel is selected. Therefore, the interference of abnormal pixels between the inner and outer Windows to the detection accuracy is excluded.
(3) The detection performance of the proposed method is higher than other comparison methods. The proposed method is far superior to other comparison methods in terms of robustness.
The remainder of this paper is structured as follows: Section 2 introduces the material and method, including the datasets description, related work, and the proposed methods. Section 3 discusses the experimental results of the proposed method and the comparison method. Section 4 discusses and analyzes the execution time of different methods. Section 5 concludes the paper.

Datasets Description
The proposed method is tested with the Airport-Beach-Urban (ABU) dataset, which is widely used in related publications. This dataset is available on Kang's homepage [51]. http://xudongkang. weebly.com/ Some features of these images are listed in Table 1. There are different scenes in the data set described as follows. The Airport scene contains four images with an image size of 100 × 100 that were captured by the Airborne Visible/Infrared Imaging Spectrometer (AVIRIS) sensor [51]. The AVIRIS sensor has a spectral range of 400-2500 nm, contains up to 224 bands, and a spatial resolution of 20 m. In this data set, the bands that are more severely affected by moisture and noise were removed. Therefore, the bands of Airport 1-4 are 204, 205, 205, and 191, respectively. In addition, the Airport 1-3 images and the Airport-4 images in the image were captured in two scenes, Los Angeles and Gulfport, respectively.
The image captured in Los Angeles has a spatial resolution of 7.1 m, while the image captured in Gulfport is 3.4 m.
In the Beach scene, except for Beach-4 captured by the Reflective Optical System Imaging Spectrometer (ROSIS-03) sensor, most of the other images were captured by the AVIRIS sensor. The spectral range that ROSIS-03 can capture is 430-860 nm. The number of bands after noise removal in this scenes is 188, 193, 188, and 102, respectively. The four image capture positions in the Beach scene were Cat Island, San Diego, Bay Champagne, and Pavia, and the corresponding spatial resolutions are 17.2 m, 17.2 m, 4.4 m, and 1.3 m, respectively.
The images in the Urban scene were captured by the AVIRI sensor. In this scene, the bands after urban 1-5 remove noise are 204, 207, 191, 205, 205, respectively. The Urban scene includes five different images from three different locations and the spatial resolutions of the images at the same capture location are consistent. Urban-1 and 2 were captured on the Texas Coast with a spatial resolution of 17.2 m. Urban-3 was captured in Gainesville with a spatial resolution of 3.5 m. Urban-4 and 5 were captured in Los Angeles with a spatial resolution of 7.1 m.

The First Reviews of Related Work: Density Peak Clustering
The purpose of clustering integration is to improve the accuracy, stability, and robustness of clustering results. Integrating multiple base clustering results allows the production of better results. The DP algorithm is a clustering algorithm proposed by Rodriguez [52]. The algorithm has good robustness and can achieve good clustering effect for various data sets. The DP algorithm is based on the following two assumptions: the class cluster center is surrounded by neighbor points with lower local density, and has a relatively large distance from any point with higher density. The algorithm calculates the nearest neighbor distance to get the clustering center, and then sorts the remaining points into their categories according to the density. Assume a data set X = (x 1 , x 2 , · · · , x i , · · · , x n ) in which n denotes the number of data points. The local density ρ i is defined as the number of data points in a circle with radius d c . The local density ρ i can be calculated as follows: where . In other words, ρ i is equal to the number of points where the distance from point x i is less than d c . d j is the distance from x i to other data points, and d c is the cut-off distance.
The algorithm is only sensitive to the relative size of ρ i at different points. This means that for large data sets, the analysis results are robust to d c selection.
δ i is the minimum distance from data point x i to any point greater than its density; its calculation formula is: Only the point with high δ and relatively high ρ is the cluster center; those with high δ values and low ρ values are often abnormal points. After the cluster center is identified, each of the remaining points is attributed to the cluster with the highest density of the nearest neighbor. Unlike other iterative algorithms that optimize the objective function, the allocation of clusters can be done in one step.

The Second Reviews of Related Work: Collaborative-Representation-Based Detector
Collaborative representation is based on the central idea that each pixel in the background of a HSI can be represented by its spatial neighborhood, while anomalous pixels cannot. The measured pixel Y can approximate the linear combination of the surrounding pixels X s = {x i } s i=1 , which greatly improves the accuracy of anomaly detection. s is the total number of the surrounding pixels. Thus, the estimated value of the pixel to be detected can be obtained as: Meanwhile, to improve the stability of the solution and give the algorithm better discriminative power, the constraint condition of the sum-to-one is added to α. AssumeỸ = [Y;1] andX m = [X m ;1] where 1 is a row vector with 1 × m elements all 1. The solution of new optimization problem can be obtained as follows:α Since some of the atoms in the background dictionary are very similar to the central pixels, let these atoms have a larger weight. Atoms that are less similar to the central pixel have smaller weights. To adjust the weight of the background dictionary atom, use the following diagonal matrix: where x 1 , x 2 , · · · , x m are the column vectors of X m . The elements on the diagonal are the Euclidean distance between the central pixel and each of the background dictionary atoms in X m . Finally, the residual of the collaborative representation is expressed as Therefore, background pixels and abnormal pixels can be detected according to the threshold.

The Proposed Approach: Spatial Density Background Purification
To extract purer background pixels and improve the detection performance of hyperspectral anomaly detection, we proposes a SDBP method for hyperspectral anomaly detection. The main contribution of this method is to use the DP clustering algorithm to calculate the density information of pixels, so as to avoid the interference of spectral information. Furthermore, through the setting of parameter P, m pixels with the highest density value are selected. At last, this method improves the detection performance of anomaly detection and has better robustness. Figure 1 shows the schematic diagram of the proposed hyperspectral remote sensing image anomaly detection method., which consists of the following major steps. First, the method selects a double window centered on the center pixel. Then, the DP clustering method is used to calculate the local density of each pixel within the double window. The pure background pixel vector X consists of m pixels with the highest density value. Finally, the cooperative representation algorithm is employed to detect anomalies.

The First
Step: Extraction of Pure Background Set In hyperspectral remote sensing image processing, the most common way to extend spatial information is to use a fixed-size square window. However, there will be some pixels with lower spectral correlation in the square window. To solve this problem, we used the local density calculated by the DP method to extract similar pixels, thus removing dissimilar pixels from the subspace. Here, we propose two approaches to get a pure background pixel set. The first is the SDBP-S method that calculates the local density in a single window to extract a clean pixel set. The second uses a two-window strategy to calculate the local density of pixels between the outer window and inner window, which is represented as SDBP-D in the following content.
Therefore, the Euclidean distance vector between the nth pixel and the other pixels can be obtained as d The Euclidean distance matrix of W 2 pixels in the window can be expressed as After calculating the Euclidean distance matrix, the cut-off distance d j c can be calculated according to the following formula: where S j is a matrix in which the non-zero elements in the upper triangular matrix of the matrix D j are arranged in ascending order. q is a free parameter, the percentage of the cut-off distance d j c , which is 20% as default and < · > represents round operation.
When the cutoff distance is obtained, the local densities ρ j = ρ j 1 , ρ j 2 , ..., ρ j W 2 of the pixels in the window can be calculated as follows: In the above formula, a soft Gaussian kernel function is substituted for linear function formula (1) to define the local density of each pixel. This can reduce the negative impact of statistical errors caused by fewer pixels.
SDBP-D: It should be mentioned that the neighborhood around the central pixel may be a homogeneous region, so there may still be some pixels with lower spectral correlation in the window. If you use a single window to extract feature pixels directly, it may cause misidentification of the center pixel, which will affect the final detection accuracy. Therefore, we have improved the previous method of extracting feature pixels using a single window through further research and proposed a method for extracting feature pixels by a dual-window method. Specifically, as shown in Figure 1, centering on the center pixel Y j 1 , an outer window of size w out × w out and an inner window of size w in × w in are selected. Then the pixels in the middle of the inner and outer windows are selected and defined where F is the total number of pixels between the inner and outer windows. Subsequently, the Euclidean distance matrix D j = d j 1 , d j 2 , · · · , d j F of F pixels between the inner and outer windows can be calculated and the local densities ρ j = ρ j 1 , ρ j 2 , ..., ρ j F of the pixels in the dual window can be obtained.
Through the above steps, the local density value of each pixel in the window can be obtained.
The density vector ρ j = ρ j 1 , ρ j 2 , ..., ρ j F is arranged in descending order and m density values are selected from high to low. m is obtained by the following formula: where p is a free parameter, which represents a percentage of the number of density values we choose relative to the total number of densities in the double window. It will be analyzed in 2.3. Therefore, m pixels with the highest density values constitute a pure background set.

The Second
Step: Collaborative-Representation-Based Detector Next, the collaborative representation algorithm is used to detect anomalies in the HSI. The cooperative representation algorithm produces an approximation of the central pixel through a linear combination of the background dictionary. Through the above research, we can get a pure background set as X m = {x i } m i=1 in R s where m is the total number of background pixels. Therefore, for each center pixel Y on its own local window, the matrix X m is obtained. The goal of cooperative representation is to find the weight vector α such that α is smallest while Y -X m α 2 2 is smallest. Therefore, the objective function is expressed as: where λ denotes a Lagrange multiplier. Deriving α and letting the derivative equal zero, the resultant equation isα Finally, the Euclidean distance between the central pixel Y and its approximationỸ is calculated as follows: If r 1 is greater than the threshold then Y is the abnormal pixel; otherwise, Y is the background pixel. A detailed description of the SDBP method is shown in Algorithm 1.

Statistical Evaluation Procedure
The influence of parameters on the detection performance for the proposed method is analyzed according to the area under curves (AUCs) [53] under different parameter settings. In the proposed method, there are three parameters, w out , w in , and P, respectively. The effect of parameter w out and w in on the AUC of different images is shown in Table 2-4. According to the size of the abnormal target in different images, the optimal inner window size is selected so that the homogeneous region around the central pixel can be removed more effectively. The outer windows need to be sufficiently large to include enough pure background pixels. The optimal window sizes for different images are displayed in Table 2-4, and it is evident that when the Parameter window sizes (w out , w in ) are set to (19,23), (11,5), etc. for the Airport-4 and Beach-1, the highest values can be obtained. Moreover, these values are set as the default parameters for the experiment.

Algorithm 1 SDBP-D Algorithm
Inputs: Three-dimensional hyperspectral cube Y ∈ R d , window size (w out , w in ), and parameter P; for all pixels do (1) For each pixel, centering on the center pixel Y j i , an outer window of size w out × w out and an inner window of size w in × w in are selected; (2) Remove all pixels except the center pixel in the inner window; (3) Calculate the density value of all pixels between the inner and outer windows by Equation (9); (4) Selected m pixels with highest local density from high to low; (5) Calculate the weight vector α by Equation (12) (6) Calculate the final detection result by Equation (13).

end for
Outputs: The anomaly detection map. Table 2. AUC performance of the proposed SDBP-D with varying window size (w out , w in ) for the Airport data.

Airport-1
Airport-2 Airport-3 Airport-4  Table 4. AUC performance of the proposed SDBP-D with varying window size (w out , w in ) for the Urban data.

Urban-1 Urban-2 Urban-3 Urban-4 Urban-5
w out w in AUC w out w in AUC w out w in AUC w out w in AUC w out w in AUC However, there may sometimes be edges of other targets in the outer window, so we only select the m pixels with the highest density in the inner and outer windows. Figure 2 shows the effect of parameter P on the AUC of different images. Due to the difference in the distribution of abnormal points, the values selected for P in different experiments are different. In the airport and urban data, the value of P is mostly around 0.8. In particular, the value of P is set to 1 in the Beach-3 data because the distribution of the anomaly points is concentrated so almost all pixels in the required double window are pure background pixels.

Results
The size of the inner window is determined by the size of the homogeneous region of the center pixel. The size of the outer window is determined by the amount of information used to represent the center pixel. In other words, the size of the windows varies according to the size of the abnormal target in different scenes. The size of the inner window is set to satisfy the condition that the homogeneous region around the center pixel can be appropriately removed. When the outer window is large enough, the background pixels used to represent the center pixel are sufficient, and the information expressed is more accurate. Therefore, the algorithm will get a higher AUC value when the window is large. It can be seen from Table 5 that in the different scenarios of the Airport, the size of the inner window in the experiment is also large due to the relatively large size of the abnormal target airplane to be detected relative to the entire scene. The operation of parameter P further ensures the purity of the selected background pixels, and removes impure pixels between the inner and outer windows. The reason that the value of the parameter P is close to 1 is that the abnormal target distribution is concentrated. In the proposed method, the ultimate goal of the parameter and DP clustering algorithm is to extract the purest background pixels. The spectral information of these pure background pixels is the most representative, and can more accurately represent the central pixel. Table 5. Parameters of Airport-Beach-urban (ABU) datasets in SDBP-D anomaly detection method.

Airport Scene
Beach Scene Urban Scene Images w out w in P Images w out w in P Images w out w in P We evaluated the detection performance of the proposed SDBP detector and compared it to the traditional RX [24], LRX [25], and CRD [44] comparison methods. The receiver operating characteristic (ROC) curves [53] and the ROC area under the curve (AUC) are used as evaluation indexes for the detection performance of different methods. These are the two most commonly used evaluation indexes in anomaly detection.
We experimented with the proposed SDBP-D method using the optimal parameter settings selected in previous experiments. The experiments of other comparison methods are carried out by default parameters given by the author. Table 6 shows the relationship between the corresponding AUC score and the detection performance for each comparison method in different images. The best detection performance in each image is highlighted in bold. The SDBP-D method proposed in this paper is clearly superior to the other methods. The average AUCs obtained in the Airport, Beach, and Urban scenarios are 0.9762, 0.9899, and 0.9954, respectively. In the Airport and Beach scenarios, the average AUCs of LRX are higher than RX and CRD, while the average AUCs of RX in urban scenes are higher than LRX and CRD. However, no matter how, the AUCs of our proposed method are higher than the comparison methods RX, LRX, and CRD. In addition, the AUCs value in the tables intuitively demonstrate that the improved SDBP-D method is superior to the SDBP-S method, particularly for beach scenes where the average AUC is increased from 0.9788 to 0.9899. This further demonstrates that the proposed improved SDBP-D method is more sensitive to hyperspectral anomaly detection than SDBP-S. For example, the SDUC-D method has an average AUC of 0.9953 in the Urban scenario while the SDBP-S method has an average AUC of 0.9920. This clearly shows that the dual window operation can more effectively purify the background pixels and remove interference information. Moreover, the SDBP-D method clearly has better stability. Table 6. AUC scores on the Airport-Beach-Urban (ABU) dataset in the SDBP-D, SDBP-S, RX, LRX, and CRD anomaly detection methods.  Figure 3-5 show the anomaly detection result maps obtained by different methods for three scenarios. As can be seen from Figure 3, the proposed method can detect more pixels in the detection resule. In addition, the SDBP-D and SDBP-S methods can effectively detect most abnormal objects and retain abnormal shapes. Conversely, in the detection result maps obtained by the RX, LRX, and CRD methods, it is difficult to find an abnormal object visually or even detect other objects as abnormal. As shown in Figure 4c, there are many false alarms in the detection results with the RX method. This can indicate that local density information enables further purification of background pixels compared to spectral information. Compared to the SDBP-S method, the SDBP-D improved method usually produces fewer false positives. Taking the Airport scene as an example, the detection result maps obtained by SDBP-D method are obviously clearer than those obtained by the SDBP-S method.   . The X and Y axes represent the size of the image. The Z-axis represents the Euclidean distance between the center pixel and its approximation. The larger the R value, the more likely the pixel is to be an abnormal pixel. In other words, the pixel with the higher bulge in the 3D detection result is more likely to be an abnormal pixel. For instance, as can be clearly seen in Figure 7, the proposed method can better separate the background and the abnormal target, so that the abnormality is more clear in the detection map.  Figure 9 illustrates the ROC curves obtained for all methods with the Airport-2, Airport-4, Beach-2, and Urban-3 images. As can be seen from the four small figures, the proposed method is superior to the other detection methods. When the false-alarm rate changes from 0.0001 to 1, the detection probabilities of the SDBP-D method are always higher than for other methods. The reason is that the SDBP-D algorithm has a more pure background pixel, which improves detection accuracy. As can be seen from Figure 9a-c, the detection probability curve of the SDBP-D method rises relatively sharply. Figure 9a,b, are the same type of scenes, and their ROC curves change more similarly. In Figure 9d, when the false-alarm rate is low, the detection probability for the SDBP-D method is much higher than for other methods.

Discussions
The execute times of SDBP-D anomaly detection method in different scenes are shown in Table 7. From Table 7, we can find that the experiment takes a long time to execute. We can analyze from the following two aspects: On the one hand, the proposed algorithm is based on CRD that is a pixel-level detector and requires a long execution time. on the other hand, the density values in this paper are obtained by calculating the density between pixels and all pixels. On the other hand, the density values calculated in this paper are to calculate all the density between pixels and pixels, which requires calculating the correlation between each pixel and all other pixels in the window. Then, when the density values are cycled in the pixel level detector, the disadvantage of long execution time of the experiment is greatly enlarged. Although the time complexity of this method is a bit high, the method can extract the spatial spectral structure information of HSI and explore the deep spatial relationship between pixels. Experiments on multiple scenes prove that this method effectively improves the detection accuracy.

Conclusions
This paper proposes an SDBP method for hyperspectral anomaly detection. The SDBP method uses the local density of pixels instead of directly using spectral information to extract pure background pixels, thus effectively exploring the spatial information of HSI. In addition, it effectively removes most of the abnormal pixels in the background, which makes the background pixels purer, which is more conducive to reducing the false-alarm rate of the detection results. Experiments with several real hyperspectral datasets captured from different scenes demonstrate that the proposed SDBP method is superior to other methods at measuring the quantity and visual quality of detection maps. However, the proposed method may detect two targets as one during the detection process and is not computationally efficient compared with other latest methods. Therefore, multi-task learning should be integrated into the SDBP method in future work to further improve the detection performance. Moreover, designing a more effective technique for SDBP of hyperspectral anomaly detection will be the research in the future.