SRA–CEM: An Improved CEM Target Detection Algorithm for Hyperspectral Images Based on Subregion Analysis

Due to the limitations of spatial resolution and detector level, traditional hyperspectral image (HSI) target detection focuses more on spectral analysis, and spatial morphology information is not fully utilized in HSI target detection. The constrained energy minimization (CEM) method is a classic HSI target detection algorithm that can highlight the information of the target, suppress background information, and achieve the effect of separating the target from the image. However, the CEM method is a supervised algorithm that requires obtaining spectral information of the target in advance. Due to various factors, such as material composition, object shape, and imaging conditions, the spectral reflectance of targets usually exhibits strong uncertainty, which is the main reason why the detection performance of traditional target detection algorithms is not ideal. To address the above issues, an improved CEM target detection algorithm for HSIs based on subregion analysis (SRA–CEM) was proposed. The SRA–CEM method first obtains the subregion where the target is located based on its external features and then uses background detection to infer the specific location of the target. SRA–CEM uses prior background spectral reflectance to replace the spectral reflectance of unknown and variable targets and can avoid the impact of the target signal as a background signal in the traditional CEM algorithm on the detection results. Experiments were conducted using publicly available and self-test hyperspectral data, respectively. The results showed that compared to other target detection algorithms, the SRA—CEM method could effectively improve the accuracy of hyperspectral target detection. Especially in HSIs under land-based imaging conditions, the area under the curve value of the SRA–CEM method has increased by about 0.11.


I. INTRODUCTION
H YPERSPECTRAL imaging technology is a multidimensional information acquisition technology that combines imaging technology with spectral detection technology, which can obtain precise spectral information while obtaining target spatial image information [1], [2], [3]. Compared with traditional imaging methods, the advantage of hyperspectral images (HSIs) is that they break through the limitation of twodimensional (2-D) space, and the spectral resolution has reached the nanometer level [4]. Due to its ability to accurately obtain diagnostic spectral features of targets, hyperspectral imaging technology is widely used in various fields, such as agriculture [5], [6], medicine [7], [8], and military [9]. Since the 1980s, various classic target detection algorithms have emerged for different scenarios and types of HSIs [10]. For situations where the target spectrum and background spectrum are known, the basic idea of target detection is to highlight the target and suppress the background. There are orthogonal subspace projection (OSP) [11], signature subspace projection [12], generalized likelihood ratio test (GLRT) [13], adaptive subspace matching detector (AMSD) [14], and so on. Simple matching methods and the properties of the sample correlation matrix can be utilized for target detection when only the spectrum of the target object is known. Spectral matched filter (SMF) algorithm is a detection algorithm based on the segment normal distribution model, which has a good detection effect in a simple background [15]. In case of unknown targets and backgrounds, anomaly detection algorithms based on probability statistical models are widely used, such as the Reed Xiaoli algorithm [16]. The constrained energy minimization (CEM) algorithm is a target detection algorithm based on a linear discriminant criterion, which is suitable for situations where the target spectrum is known but the background spectrum is unknown [17]. Due to the assumption that the CEM algorithm is based on a small number of target pixels and a sufficiently large background range, its performance in dealing with larger targets is poor. To improve this issue, researchers have successively proposed the adaptive matched filter algorithm [18] and the adaptive cosine/cosine estimator (ACE) [1]. These two algorithms use both probability and statistical models and subspace projection models, effectively improving the performance of the CEM algorithm. The S-ACE algorithm is a signed ACE method that enhances the robustness of the ACE algorithm in certain applications [19]. The target constrained interference minimized filter (TCIMF) algorithm achieves better performance than CEM by designing a detection operator that detects expected target features while eliminating unexpected target features [20]. The kernel-based object detection algorithm combines the ideas of kernel functions in machine learning with hyperspectral object detection algorithms, better utilizing the hidden nonlinear features in hyperspectral data. At present, many effective methods have been developed, such as KMF, KMSD, KASD, KCEM [21], [22], [23], [24], [25], etc. However, due to the lack of specific rules for selecting kernel functions, there are also certain limitations in some applications. In recent years, many researchers have been committed to improving classic hyperspectral object detection algorithms for different applications. Regarding the issue of pixel selection in multipixel target detectors, Chen et al. [26] proposed a GLRT-based multipixel target detector for HSIs. To better address the complex background issues in HSIs, Chen and Chang [20] integrated CEM and OSP methods and proposed a BKG-annualized TCIMF method. Among them, the hierarchical CEM (hCEM) proposed by Zou and Shi [27] is an improved method based on CEM, which is a hierarchical structure containing different layers of CEM detectors. The hCEM increases detection performance layer by layer through a hierarchical suppression process. Zhao et al. [28] proposed an ensemble-based CEM (E-CEM) detector for HSI target detection. The proposed E-CEM is designed based on the classical CEM detection algorithm to improve both the detection nonlinearity and generalization ability. Recently, more and more researchers have recognized the important role of spatial information, and the utilization rate of spatial information in HSIs is constantly improving [29], [30]. With the development of statistical pattern recognition and deep learning under Big Data, new data-driven object detection algorithms have emerged [31], [32]. However, data-driven object detection methods require a large number of labeled samples and are costly, even though their effectiveness is much higher than traditional methods.
The CEM method must have prior knowledge of the spectral information of the target. However, obtaining spectral information of unknown targets is relatively difficult. In addition, with the improvement of spatial resolution, there is also some uncertainty in the spectral reflectance of the same target due to the diversity of constituent materials and spatial structures [33]. A framework based on subregion analysis (SRA) is proposed to improve the CEM algorithm based on the characteristics of HSIs and the current status of object detection algorithms. The key of the SRA-CEM method is to fully utilize the advantages of high spatial resolution of HSIs and obvious target shape features, changing the preprocessing method of HSIs from traditional spectral dimensions to 2-D geometric spaces. In summary, the main contributions of this article can be described as follows.
This article introduces subregion spatial information into hyperspectral object detection, and a target detection method SRA-CEM based on SRA is proposed. This method improves the CEM method by utilizing background spectra as prior information, which can overcome the spectral uncertainty of the target.
In SRA-CEM, the main contributions are as follows: first, the establishment of 2-D spatial data samples for land-based HSIs and the use of a deep-learning-based 2-D image object detection algorithm to obtain subregions of the target. The second is to use "pseudo spectral filling" to solve the problem of suppressing the target when calculating the autocorrelation matrix using the CEM method. The third is to use the method of detecting background in subregions to infer the detection results of the target, avoiding the impact of spectral changes of the target.
In this article, we also innovatively conducted experiments on our HSI data to verify the feasibility of the proposed method and achieved some encouraging results.
The rest of the article is organized as follows. In Section II, we first briefly introduce the CEM method and object detection methods in the field of computer vision (CV), and then provide a detailed introduction to our proposed SRA-CEM method. In Section III, evaluation experiments were conducted on two common datasets and one self-test data to verify the effectiveness of the proposed method. In addition, the experimental results were also discussed in the Section III. Finally, Section VI concludes this article.

A. CEM Algorithm
The CEM algorithm is a supervised algorithm that completes target detection tasks without knowing the background spectrum, even though the target spectrum is known [34]. The main idea of this algorithm is to design a linear filter through which the image can obtain detection results. The function of the filter is to suppress and filter out the background and filter out the interested targets [27]. Assuming the hyperspectral data is X(L × N ), the number of bands in the data is L, the total number of pixels is N , and the target spectral vector is d. The purpose of CEM is to design a linear filtering vector w = [w 1 , w 2 , . . . , w L ] T , which minimizes the average output energy of the image after being filtered by the filtering algorithm. The condition that w = [w 1 , w 2 , . . . , w L ] T needs to meet is as follows: By solving the conditional extremum problem, the filtering vector w CEM that satisfies the conditions is obtained as follows: Among them, R is the autocorrelation matrix of the sample set, and this linear filtering vector is applied to each pixel in the HSI to obtain the distribution of the target vector in the image, achieving target detection. The filtered result is represented by y, as follows:

B. Two-Dimensional Spatial Target Detection Method
Target detection for 2-D images can achieve precise positioning and classification of targets. It is an important content in the field of CV and has significant research value in video tracking, unmanned driving, and other fields [35], [36], [37]. Target detection algorithms based on spatial information can be divided into two categories: traditional target detection algorithms and deep-learning-based target detection algorithms [38]. Traditional target detection methods generally involve three steps: first, selecting candidate regions on a given image, then extracting features from these regions, and finally using a classifier for classification [39]. Deep-learning-based target detection algorithms also include two-stage target detection algorithms and single-stage target detection algorithms. The two-stage target detection algorithm extracts candidate boxes from the image and then performs classification and regression based on the candidate regions to obtain detection results. The detection accuracy is high, but the detection speed is slow. The single-stage target detection algorithm utilizes deep neural networks to directly calculate the image and generate detection results, which have fast detection speed but low detection accuracy. Therefore, in target detection, it is necessary to continuously improve and optimize mainstream target detection algorithms to achieve the optimal balance between detection accuracy and detection speed. Typical target detection algorithms include SIFT feature extraction method [40], faster R-CNN [41], YOLO series algorithm [42], [43], SSD [44], and other algorithms, as shown in Fig. 1. Traditional target detection algorithms rely on manual experience for feature extraction, algorithm, and parameter solidification, and have good processing effects for specific targets and backgrounds. However, traditional methods have significant limitations and weak universality. When the target shape changes or the background changes, their processing effectiveness significantly decreases. Compared with traditional object detection algorithms, deep-learning-based object detection algorithms rely on training network structure parameters on a large number of data samples, and have better stability against changes in targets and backgrounds.
In order to verify the effectiveness of the SRA-CEM method, this article uses annotated image data to train the YOLOV5 target detection model in experiments on actual datasets. Use single band HSIs from different directions, wavelengths, and backgrounds as training samples. Some sample images are shown in Fig. 2.

C. SRA-CEM Method
With the improvement of spatial resolution in HSIs, the role of spatial information in target detection tasks in HSIs is becoming increasingly prominent. In order to fully utilize spatial information and solve the problem of difficulty in obtaining target spectra, a target detection algorithm based on SRA is proposed. This method mainly includes the following steps: principle component analysis (PCA), determination of subregions to be tested, selection of background spectra, filling of pseudo target spectra, and CEM algorithm detection and result inversion. The overall process of this method is shown in Fig. 3.
PCA: PCA is a commonly used unsupervised dimensionality reduction method for HSIs. Under the processing of PCA, HSIs cannot only achieve the goal of data dimensionality reduction but also extract features. Extracting the first principle component image using the PCA method preserves most of the information of the original HSI, making the spatial features of the target more prominent.
There are two main ways to determine the subregion of the target using the first principle component image: one is to manually determine the subregion of the target, and the other is to use spatial target detection algorithms. For targets with obvious appearance features, priority should be given to selecting highly intelligent spatial target detection algorithms. For targets with unclear appearance features, the subregion to be tested can be manually determined based on other prior information. Choosing a background spectrum: In practical applications, compared to complex and variable target spectra, the background spectrum is easier to obtain and relatively stable. Select the corresponding background spectrum as the test spectrum in the spectral library, and infer the target by detecting the background of the subregion.
Pseudo target spectral filling: Due to the need to obtain the autocorrelation matrix of the image before using the CEM algorithm, other parts of the image that are not in the subregion to be tested will affect the detection results. In order to reduce adverse effects, the filling operation of "pseudo target spectra" is carried out in these nontest areas, which are determined by the pixel spectra with the lowest similarity to the background spectrum in the test subregions.
CEM algorithm detection and result inversion: After completing the above steps, the CEM target detection algorithm can be used to detect targets. Reverse the detection results within the subregion to obtain the detection results of the target, and then use the receiver operating characteristic (ROC) curve for evaluation.
The specific steps of SRA-CEM are shown in Algorithm 1.

III. EXPERIMENTS
In order to verify the detection effect of SRA-CEM, experiments were conducted using both public and actual captured datasets. First, two publicly available hyperspectral datasets were used for experiments to verify the detection performance of SRA-CEM in different complexity scenarios. Subsequently, experiments were conducted using land-based HSIs captured by field imaging spectrometers, further confirming the stability of the SRA-CEM method in hyperspectral target detection applications. In the experiment aimed at the public dataset, because the shape characteristics of the target are not obvious Input: Hyperspectral image data H, prior knowledge background spectrum d, parameter ȵ; Step: 1: Obtain the position coordinates of the subregion of the target (Spatial object detection algorithm or Manual selection) 2: Obtain autocorrelation matrix R for each spectral vector in subregion pixels M = 1:n do similarity S between R and M if S<ȵ random pseudo target filling end return H * finding the autocorrelation matrix R of H * 3: Place R and d into CEM to detect background in subregions 4: Using the detection results of background in subregions to infer target probability Output: Detection results of the target in H enough, this part of the experiment uses artificial selection of the subregion to be measured. A target detection algorithm based on the YOLOV5 model determines the subregions for the measured land-based HSI target detection dataset.

A. Experimental Data and Evaluation Indicators 1) Publicly Available Hyperspectral Image Dataset:
The first publicly available dataset used in the experiment was the SanDiego dataset. The SanDiego dataset is hyperspectral data obtained by using the hyperspectral imaging spectrometer AVIRIS to capture the San Diego airport in the USA. There are  a total of 400 × 400 pixels, each with 224 bands of information, with a spatial resolution of 3.5 m and spectral coverage between 0.4 and 1.8 nm. This dataset is widely used in target detection tasks, and only the pixels in the upper left corner 100 × 100 are used in this experiment, as shown in Fig. 4.
The other publicly available dataset used in the experiment is captured in Los Angeles on November 9, 2011, which was collected by the airborne visible/infrared imaging spectrometer AVIRIS. AVIRIS is a typical swing scan imager. The HSI of noise removal band captured includes 205 bands, the wavelength range is 0.4-2.5 µm, the spectral resolution is 10 nm, and the spatial resolution is 7.1 m. The original image and its annotation of this dataset are shown in Fig. 5.
2) Measured Dataset: The traditional hyperspectral imaging target detection technology is mainly applied in the field of remote sensing. The spatial resolution of remote sensing HSIs is low and the target shape features are not clear enough [45]. However, the HSIs obtained using field imaging spectrometers have the characteristics of high spatial resolution, significant geometric features, and prominent target shape contours, which effectively improve the efficiency of comprehensively utilizing spatial-spectral information to complete target detection tasks. The imaging spectrometer in visible light band used in the experiment is an HIS-300 imaging spectrometer based on acousto-optic tunable filer. By setting the wavelength interval to 4 nm, 89 images of different wavelengths can be obtained within the spectral range of 449-801 nm. Each image records the radiance values of ground objects at different wavelengths. The experimental location is Shijiazhuang City, Hebei Province, China, and the subject of the shooting is a model airplane. The shooting time was October 19, 2022, and the imaging conditions are shown in Fig. 6. The aircraft model was annotated at the pixel level based on the target distribution, as shown in Fig. 7.

3) Evaluating Indicator:
In addition to evaluating the deviation between the detection result map and the actual reference data through direct visual perception, the test results can also be objectively expressed in data form. ROC and area under the curve (AUC) are commonly used evaluation indicators for target detection. The ROC curve describes the relationship between detection accuracy and error rate. Based on the actual annotated image and prediction results of the target, a series of detection and false alarm rates are calculated by dynamically adjusting the size of the threshold, and then the ROC curve is drawn. The closer the ROC curve is to the upper left, the better the detection performance. When the ROC curves of different detection algorithms are too close, it is impossible to make accurate judgments about the performance of the detection algorithm. At this point, the area under the ROC curve, i.e., the AUC value, can provide a more intuitive conclusion. The value of AUC is between [0,1], and a larger value indicates a higher accuracy of the detection algorithm.

B. Experimental Results
In order to highlight the advantages of the SRA-CEM algorithm, this article selects CEM, OSP, SMF, TCIMF, ACE, S-ACE, GLRT, and AMSD as comparative algorithms for research. Select ROC and AUC as evaluation indicators for target detection results. Verify the stability of the SRA-CEM detection method by utilizing the spectra of backgrounds and targets in different subregions. Verify the applicability of SRA-CEM detection method to land-based HSIs through self-test dataset experiments.
1) Experimental Results on Publicly Available Hyperspectral Data: First, perform PCA on HSIs, and the results of PCA are shown in Fig. 8. The first principle component obtained through dimensionality reduction processing contains 95.18% information of the original image, making it easier to analyze its spatial structure. The experiment was completed by artificial selection of the target area. As shown in Fig. 8, the experimental area can be divided into three areas, labeled with A, B, and C. Select different target detection algorithms to detect the target. The average spectrum of the target or background in Region A is used as the detection result of the tested spectrum, as shown in Fig. 9. The average spectrum of the target or background in Region B is used as the detection result of the tested spectrum, as shown in Fig. 10. The average spectrum of the target or background in Region C is used as the detection result of the tested spectrum, as shown in Fig. 11. From Figs. 9-11, it can be roughly seen that various target detection algorithms have good results in detecting target objects. In order to quantify and compare the detection capabilities of different algorithms, Fig. 12 plots the ROC curves of different algorithms, and Table I lists the AUC values of different  algorithms. For the second publicly available datasets, mark the target subregions as D and E, and use the same method for validation. The first principle component obtained through dimensionality   reduction processing contains 95.51% of the information content of the image. The first five principle component images and subregion annotations of the HSI are shown in Fig. 13.
Figs. 14 and 15 show the detection results using the average spectra of the target or background in the D and E regions as the test spectra. In order to quantitatively compare the detection capabilities of different algorithms, Fig. 16  2) Experimental Results of Measured Hyperspectral Data: The measured hyperspectral data is a land-based HSI obtained using a field imaging spectrometer. Land-based HSIs can simultaneously obtain spectral and spatial information of ground objects, and for targets with obvious appearance features, their     spatial information can be more fully utilized. Fig. 17 shows the results of PCA and spatial target detection of measured hyperspectral data. The first principle component obtained from hyperspectral data through dimensionality reduction processing contains 95.10% information of the original image. By inputting the first principle component image into the trained spatial target detection model, the coordinate information of the target can be obtained.
The experimental background is a common cement road surface, and the prior spectral information of the background is used as the input spectrum of the SRA-CEM method. For other supervised target detection algorithms used for comparison, the spectral average of the aircraft model is used as the target spectrum to be tested. Select different target detection algorithms to detect targets in two sets of measured hyperspectral data, and the detection results are shown in Fig. 18. Fig. 19 shows the ROC curves under different detection algorithms, and Table III lists the corresponding AUC values.

C. Discussions
The above experiment can be divided into two parts: one is based on two sets of publicly available hyperspectral datasets, and the other is based on measured hyperspectral datasets. In order to demonstrate the stability of the proposed method in the public dataset, comparative experiments were conducted using different subregions where the target is located. Compared to other hyperspectral target detection algorithms in the actual dataset, the SRA-CEM method still exhibits outstanding detection performance. In summary, the experimental results can validate the following viewpoints: 1) The SRA-CEM method is a relatively stable target detection method, which is not only suitable for remote sensing HSIs, but also for land-based HSIs. In the three datasets mentioned above, the SRA-CEM method has the best detection performance. Although the advantages in the first publicly available hyperspectral datasets were not obvious, the SRA-CEM method demonstrated its excellent target detection ability in both the second publicly available hyperspectral datasets and the actual hyperspectral datasets.
2) The SRA-CEM method is basically unaffected by the uncertainty of the target spectrum, and compared to other supervised target detection algorithms, the detection results of the SRA-CEM method have strong stability.
In the experiment targeting, the first publicly available hyperspectral data, various object detection algorithms performed well due to the small intraclass spectral differences of target pixels and significant interclass differences between the target and background. The second publicly available hyperspectral data has strong uncertainty in the target spectrum, resulting in poor stability of the detection method based on the target spectrum, highlighting the superiority of the method proposed in this article.
3) The SRA-CEM detection method still has significant limitations and many urgent problems for target detection in land-based HSIs. The overall target detection performance of different algorithm types in hyperspectral remote sensing images is better than that of land-based HSIs. Compared to hyperspectral remote sensing images, land-based HSIs can obtain more detailed spatial structure information of targets. However, influenced by the imaging environment and imaging conditions, land-based HSIs further increase the differences between target pixels, which poses greater challenges to target detection and recognition in land-based HSIs. For the measured hyperspectral data, the AUC value of the SRA-CEM detection method is only 0.8855. This is because the details of the measured dataset are more abundant, and the shaded parts are more prominent. Due to the influence of target shadows, some algorithms have a high false detection rate. 4) The proposed SRA-CEM is a method that balances computational speed and accuracy. The computing time of  different methods is presented in Table IV. All the experiments are carried out on an Inter (R) Xeon (R) E5-2630 CPU machine with 32 GB of RAM. All methods are executed on MATLAB R2014a. From the table, it can be seen that SRA-CEM has achieved excellent detection performance at the cost of tolerable time. In contrast, SRA-CEM consumes the same amount of time as CEM and SMF methods, and does not achieve better performance than CEM at the cost of time.

IV. CONCLUSION
This article proposes an algorithm SRA-CEM based on SRA and proves its detection effectiveness and robustness through experiments. The important premise of SRA-CEM is to accurately obtain the spatial location information of the target. In algorithm design, the background spectrum replaces the complex and variable target spectrum to improve detection performance. Although the experiment has confirmed that the SRA-CEM target detection algorithm has strong robustness for different types of HSIs, there are still some aspects that can be further studied. One is the role of data dimensionality reduction methods in hyperspectral target detection tasks. This article verifies that the SRA-CEM algorithm uses hyperspectral raw data and does not perform dimensionality reduction preprocessing on the data, which may be one of the reasons for the low detection accuracy. Second, the SRA-CEM method proposed in this article completes target location by artificial selection or spatial target detection model, but it has certain limitations for the shape features that are not obvious and camouflage targets. Therefore, it is crucial to quickly and accurately obtain the location of the target through various prior information. In addition, the SRA-CEM method generally requires the target in the subregion to occupy the majority of pixels. It is not suitable for targets with hollow structures. SRA-CEM method introduces 2-D spatial positioning methods into hyperspectral object detection algorithms. Compared to traditional object detection methods, the proposed SRA-CEM has strong robustness and has achieved excellent results in target detection tasks for different types of HSIs, providing a new approach for future article on HSI object detection algorithms.