Hyperspectral positioning denoising method and device based on spectral angle and morphological optimization
Through the combination of BP neural network and morphological optimization, the noise anti-interference ability of hyperspectral images is improved, the balance problem between computational efficiency and detection accuracy in hyperspectral image processing is solved, and efficient target positioning is achieved under medium and low cost conditions.
Patent Information
- Application Number
- CN202510700950.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-28
- Publication Date
- 2025-09-12
Smart Images

Figure CN120635472A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of hyperspectral image processing, and in particular to a hyperspectral positioning denoising method and device based on spectral angle and morphological optimization. Background Art
[0002] Hyperspectral imaging technology combines the advantages of imaging and spectral analysis, offering extremely high spectral and spatial resolution, capable of capturing detailed spectral information about an object across dozens to hundreds of wavelengths. It has broad applications in target positioning, environmental monitoring, agriculture, and medicine. However, due to the high dimensionality of hyperspectral data and the noise associated with long-distance acquisition, hyperspectral image processing faces numerous challenges. This is particularly true for large-field-of-view target localization tasks, where the impact of noise is particularly significant.
[0003] At present, the denoising methods in hyperspectral long-range target positioning are mainly divided into the following three types:
[0004] First, traditional filtering denoising methods use preprocessing and spatial filtering (such as mean filtering and median filtering) to eliminate noise. While this approach offers advantages in terms of low algorithm complexity and ease of implementation, it also suffers from significant information loss, particularly when processing high-frequency details, which can blur target edges and reduce the spatial resolution of the positioning system.
[0005] The second type of denoising method is based on statistical models. This method constructs a mathematical model based on the noise distribution characteristics (typically, principal component analysis (PCA)) and uses statistical inference to separate the noise. This method is stable in eliminating Gaussian noise, but it is inadequate for dealing with non-uniform noise (such as Poisson noise and banding noise) and complex correlations between multidimensional data, limiting its applicability in dynamic scenarios.
[0006] The third type is the denoising method based on machine learning. Deep learning methods are gradually being applied to the denoising and positioning tasks of hyperspectral images. However, the deployment of machine learning itself applied in this field requires the construction of a large-scale labeled sample library and relies on high-performance computing equipment.
[0007] In summary, for the problem of denoising in medium- and low-cost hyperspectral image processing, existing technologies are difficult to strike a balance between computational efficiency and detection accuracy. There is an urgent need for a new denoising solution that provides a lower cost, easy-to-deploy and popularized solution for hyperspectral remote sensing target recognition. Summary of the Invention
[0008] Purpose of the invention: To solve the problems mentioned in the background technology, the present invention discloses a hyperspectral positioning denoising method and device based on spectral angle and morphological optimization. The method uses a BP neural network to train a spectral angle feature enhancement model (SABP), and combines morphological processing methods to achieve regional adaptive processing by fusing spectral angle information and perform secondary optimization based on intelligent screening of multidimensional shape-spectral features. The present invention improves the model's anti-noise ability through spectral angle features, uses morphological operations to eliminate discrete false detection areas, effectively balances computational efficiency and detection accuracy under medium computing power conditions, and significantly improves the positioning reliability of small targets with large fields of view in complex backgrounds.
[0009] Technical solution:
[0010] The present invention discloses a hyperspectral positioning denoising method based on spectral angle and morphological optimization, the method comprising the following steps:
[0011] S1 collects hyperspectral data of distant targets;
[0012] S2 enhances the features of hyperspectral data through spectral angle matching (SAM) and splices the original data to obtain an enhanced dataset;
[0013] S3 uses the enhanced data set to train the BP neural network and construct a feature-enhanced SABP model;
[0014] S4 performs spectral angle matching on the hyperspectral data and the target average spectral vector, and obtains a binary prediction matrix by combining the SABP model;
[0015] S5 performs morphological post-processing on the binarized prediction matrix, fuses spectral angle information to achieve regional adaptive processing and intelligent screening based on multidimensional shape-spectral features, and realizes target positioning and denoising.
[0016] Furthermore, the enhancement of hyperspectral data features described in S2 specifically includes: constructing a two-classification data set, calculating the target average spectral vector and performing normalization processing, normalizing the spectral vector of each pixel of the hyperspectral image, calculating the cosine similarity between each pixel spectrum and the target spectrum through spectral angle matching (SAM) and converting it into spectral angles, and splicing the spectral angles with the original data to obtain an enhanced data set.
[0017] Furthermore, the number of input layer nodes of the SABP model described in S3 is the sum of the number of spectral bands and the spectral angle features, the hidden layer contains 150 neurons and uses the ReLU activation function, and the output layer outputs the classification probability through the Sigmoid function.
[0018] Furthermore, the morphological post-processing described in S5, which integrates spectral angle information to achieve regional adaptive processing and intelligent screening based on multidimensional shape-spectral features, includes: performing opening operation preprocessing on the binary image, dividing the high and low confidence regions based on the spectral angle and performing morphological processing on the regions, performing boundary repair and confidence optimization after merging, combining shape features and spectral features to screen connected regions, using disk-shaped structuring elements to smooth the boundaries of the regions, and finally merging all retained connected regions to form an optimized target detection result.
[0019] Furthermore, in the regional morphological processing, a disk-shaped structuring element with a radius of 1 pixel is used to perform opening and closing operations on the high confidence region, and a disk-shaped structuring element with a radius of 3 pixels is used to perform opening and closing operations on the low confidence region, and the processing results of the two regions are merged.
[0020] Furthermore, the boundary restoration and confidence optimization uses a 2×2 structural element to perform a closing operation on the merged image to restore the boundary, uses a confidence map to weight the result, and applies a threshold of 0.3 to obtain an optimized binary image.
[0021] Furthermore, the screening of connected areas specifically includes:
[0022] Connected region marking and preliminary screening: Mark the optimized binary image and preliminarily screen connected regions with an area ranging from 10 to 500 pixels;
[0023] Multidimensional feature calculation: Shape features and spectral features are calculated for each connected region after screening. Shape features include aspect ratio, compactness, and circularity; spectral features include the average spectral angle and standard deviation within the region.
[0024] Comprehensive scoring screening: A comprehensive scoring mechanism is established based on shape features and spectral features, and connected regions with a score greater than 0.5 and an average spectral angle lower than the 75th percentile of the image are retained.
[0025] Furthermore, the present invention discloses a hyperspectral positioning denoising device based on spectral angle and morphological optimization, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is loaded into the processor, it implements any step of the above-mentioned hyperspectral positioning denoising method based on spectral angle and morphological optimization.
[0026] Beneficial effects:
[0027] 1. This invention effectively addresses the shortcomings of existing hyperspectral target detection methods in denoising and target localization accuracy by combining spectral angle feature enhancement with morphological optimization. By introducing spectral angle features, sensitivity to subtle spectral differences is enhanced, enabling better target identification, particularly in noisy backgrounds.
[0028] 2. This invention achieves regional adaptive processing and intelligent screening based on multidimensional shape-spectral features through morphological optimization and fusion of spectral angle information, effectively addressing the noise interference and false target problems in hyperspectral image target recognition. Ultimately, regions that match the actual target characteristics are retained, noise points are removed, and misidentified regions are effectively filtered out, ensuring the accuracy of the final target region. The dual spectral and spatial processing makes it more clearly distinguishable from the background, enabling efficient processing of hyperspectral data.
[0029] 3. While better preserving the effective information in hyperspectral data, avoiding detail loss, and improving denoising accuracy, the present invention avoids dependence on large amounts of training data and high-performance computing resources, enabling the present invention to be deployed in low- to medium-power scenarios, reducing costs while broadening its scope of application. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 Specific flow chart of the method of the present invention;
[0031] Figure 2 This is a specific flow chart of the morphological fusion processing of the present invention;
[0032] Figure 3 This is an enlarged view of the target area of the original image according to an embodiment of the present invention;
[0033] Figure 4 This is a visual comparison diagram of the original image and the model prediction result of an embodiment of the present invention. DETAILED DESCRIPTION
[0034] The present invention will be further described below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are intended only to illustrate the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
[0035] like Figure 1 As shown, this embodiment discloses a hyperspectral positioning denoising method or device based on spectral angle and morphological optimization, and the method steps are as follows:
[0036] S1 collects hyperspectral data of distant targets;
[0037] In this embodiment, 38 pieces of hyperspectral data of large-field-of-view vehicles were obtained in Hongze Lake, Huai'an, and the data were first collected using a push-broom hyperspectral imaging device covering the 400-1000nm spectral band. The instrument has a dispersion width of 6.9mm on the detector target surface and a detector width of 7.03mm. Hyperspectral data of long-range vehicle targets were obtained in Huai'an. These images cover 300 spectral bands and capture detailed information of the target under different spectra. The size of the collected hyperspectral image is 1920*1920*300 and is saved as an ENVI format file (including .hdr and .spe files) for subsequent data loading and processing.
[0038] Pixels corresponding to vehicle data were extracted and labeled as 1 (target class), while background data was labeled as 0 (non-target class) to construct a binary classification dataset for training and testing. The Spectral library was then used to load hyperspectral image files and obtain image data containing multi-band information for later verification.
[0039] Preprocessing of hyperspectral images pixel by pixel
[0040] Calculate the target average spectral vector and perform normalization on each pixel spectrum to ensure that its spectral values are on the same scale.
[0041] S2 enhances the features of hyperspectral data through spectral angle matching (SAM) and splices the original data to obtain an enhanced dataset;
[0042] The cosine similarity between each pixel and the target spectrum is calculated by spectral angle matching (SAM), and the spectral angle (i.e., the reverse calculation result of cosine similarity) is spliced into the original data to form an enhanced dataset.
[0043] S2.1 calculates the average spectral vector of the target vehicle sample and performs normalization processing;
[0044] S2.2 normalizes the spectral vector of each pixel of the hyperspectral image, that is, divides the spectral value of each pixel by its L2 norm to ensure that all pixel spectra have the same scale;
[0045] S2.3 calculates the cosine similarity between the pixel spectrum and the target spectrum using the SAM algorithm and converts it into a spectral angle;
[0046] S2.4 concatenates the spectral angle (i.e., the reverse calculation result of cosine similarity) with the original data to form a binary classification data set with sensitive information, providing enhanced data for subsequent model training.
[0047] The spectral angle of each sample is calculated from the average of the target reference spectrum. Therefore, the feature vector of each sample is expressed as:
[0048] δ i =[δ1,δ2,…,δ D ,θ i ]
[0049] Among them, δ1, δ2,…, δ D is the spectral intensity characteristic of sample i, θ i It is the spectral angle characteristic between the sample and the target reference spectrum (i.e. the average value of the target spectrum).
[0050] The sample feature vector of the training set can be expressed as:
[0051]
[0052] Where F0 corresponds to the background sample (labeled 0), and F1 corresponds to the target sample (labeled 1). The spectral angle features θ0 and θ1 of each sample are obtained by calculating the spectral angle between the sample and the target reference spectrum. k0 and k1 represent the number of camouflaged and non-camouflaged targets, respectively.
[0053] In this example, SAM is used to extract similarity features between each pixel to be classified and the target spectrum, providing a foundation for subsequent feature fusion and BP neural network modeling. This approach preserves the rich information of spectral intensity while enhancing the ability to distinguish spectral shapes, thereby improving the model's recognition and location accuracy for small targets.
[0054] S3 uses the enhanced data set to train the BP neural network and construct a feature-enhanced SABP model;
[0055] The BP neural network is used to extract features from the enhanced data set. The specific steps are as follows:
[0056] Network structure: BP neural network consists of an input layer, a hidden layer and an output layer. The number of nodes in the input layer is equal to the spectral intensity feature δ in the hyperspectral data. (x,y) and spectral angle characteristics θ (x,y) The number of bands after splicing is: the hidden layer contains 150 neurons and uses the ReLU activation function; the output layer contains 1 node and uses the Sigmoid activation function to achieve the binary classification task.
[0057] Forward propagation:
[0058] Calculation from input layer to hidden layer:
[0059] h=ReLU(W1x+b1)
[0060] Among them, x is the input feature, W1 is the weight matrix, b1 is the bias vector, and ReLU(z)=max(0,z) is the activation function.
[0061] Output layer calculation:
[0062]
[0063] Among them, W2 is the weight matrix, b2 is the bias vector, is the Sigmoid activation function, is the final output.
[0064] Loss function:
[0065] The binary cross entropy loss function is used to measure the error between the predicted value and the true label:
[0066]
[0067] In the above formula, m is the number of samples, y (i) is the true label of the i-th sample, is the predicted output of the model.
[0068] Back propagation and weight update:
[0069] During backpropagation, the gradient of the loss function with respect to the weights of each layer needs to be calculated using the chain rule:
[0070] Output layer error term:
[0071]
[0072] Hidden layer error term:
[0073] δ h idden =(δ output W2)⊙ReLU′(W1x+b1)
[0074] Where ⊙ represents element-wise multiplication, and ReLU'(z)=1 when z>0, otherwise it is 0.
[0075] Weight update:
[0076] Using the gradient descent method for updating, the weight update formula is as follows:
[0077]
[0078] Where η is the learning rate, and are the gradients of the loss function with respect to weights W1 and W2, respectively.
[0079] In the verification phase, in order to achieve pixel-by-pixel binary classification of the entire hyperspectral image, the spectral intensity feature of each pixel is first extracted, and the spectral angle feature between it and the target reference spectrum is calculated. The two are then concatenated into a comprehensive feature vector. That is, the spectrum of each pixel is reconstructed as follows:
[0080] F (x,y) =[δ1,δ2,…,δ i ,θ (x,y) ].
[0081] Then, this feature vector is input into the BP model obtained in the training phase for classification prediction, thereby achieving pixel-by-pixel distinction between the target area and the background.
[0082] S4 performs spectral angle matching on the hyperspectral data and the target average spectral vector, and obtains a binary prediction matrix by combining the SABP model;
[0083] S5 Figure 2 As shown, the binarized prediction matrix is subjected to morphological post-processing, and spectral angle information is integrated to realize regional adaptive processing and intelligent screening based on multidimensional shape-spectral features to achieve target positioning and denoising. The specific steps are as follows:
[0084] S5.1 Preprocessing: For the binary image obtained by classification prediction, perform a basic binary opening operation using a 2×2 structuring element to remove initial noise points while retaining the main structure. The process is as follows:
[0085] Erosion: The erosion operation eliminates small areas in the image and removes isolated noise points, making the boundaries of the background area clearer. The erosion operation can be expressed as:
[0086]
[0087] Where A is the image, B is the structural element, represents the corrosion operation, B Z is the local movement of the structural element B on image A.
[0088] Dilation: The dilation operation restores the shape of the target area and expands the target area to ensure that the target is completely restored. The dilation operation can be expressed as:
[0089]
[0090] Among them, the dilation operation will restore the target area to a larger shape, especially after corrosion, it can eliminate cracks or gaps in the target area.
[0091] S5.2 Spectral Angle Analysis and Region Segmentation: Based on the spectral angle image, the 70th percentile is calculated as the threshold, and a confidence map (confidence = 1 - normalized spectral angle) is created. Based on this confidence map, the image is divided into high-confidence regions (spectral angle less than the threshold) and low-confidence regions (spectral angle greater than the threshold).
[0092] S5.3 Regional morphological processing: A disk-shaped structuring element with a radius of 1 pixel is used to perform opening and closing operations on the high-confidence region, and a disk-shaped structuring element with a radius of 3 pixels is used to perform opening and closing operations on the low-confidence region. The processing results of the two regions are then merged.
[0093] S5.4 Boundary restoration and confidence optimization: Use a 2×2 structure element to perform a closing operation on the merged image to restore the boundary. Then use the confidence map to weight the result and apply a threshold of 0.3 to obtain the optimized binary image.
[0094] S5.5 Connected Region Marking and Preliminary Screening: Mark the connected regions of the optimized binary image and preliminarily screen the connected regions with an area between 10 and 500 pixels. The process is as follows:
[0095] Perform connected region analysis. Connected region analysis is used to identify independent target regions in an image, mark each connected region, and perform statistics. The results of connected region analysis can be expressed through the marking operation as:
[0096] L=label(A)
[0097] Where L is the label matrix, A is a binary image, label(A) is the operation of labeling the connected regions of image A, and outputs the label of each region.
[0098] After connected component analysis, we use area filtering to remove false positives. First, we count the area of each connected component (i.e., the number of pixels within the component), then set the minimum object size threshold (set to 10) and the maximum object size threshold (set to 500) to filter out areas that do not meet the area requirements. The area filtering process can be implemented as follows:
[0099]
[0100] Among them, Area is the area of the connected area, Pixel i is the contribution of each pixel in the region, and N is the number of pixels in the region. Filter according to the set area threshold and retain the regions that meet the area requirements.
[0101] S5.6 Multidimensional feature calculation: Calculate shape features (including aspect ratio, compactness, and circularity) and spectral features (including the average spectral angle and standard deviation within the region) for each connected region after screening;
[0102] S5.7 Comprehensive scoring screening and boundary optimization: Establish a comprehensive scoring mechanism based on shape features and spectral features:
[0103] Connected regions with a score greater than 0.5 and an average spectral angle below the 75th percentile of the image are retained, and the boundaries of the connected regions are smoothed using a disk-shaped structuring element. Finally, all retained regions are merged to form an optimized target detection result. Through connected region analysis and multi-dimensional feature filtering, small misidentified regions and regions that do not meet target characteristics can be effectively removed. The combination of innovative morphological operations and connected region analysis can significantly reduce the interference of small noise regions and effectively avoid the misidentification of large target regions, thereby improving the accuracy of target positioning. This measure ensures that the final target region is more precise, removes irrelevant noise, and provides higher-quality target detection results.
[0104] This embodiment also discloses a hyperspectral positioning denoising device based on spectral angle and morphological optimization, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that when the computer program is loaded into the processor, the steps of the hyperspectral positioning denoising method based on spectral angle and morphological optimization are implemented.
[0105] In order to further demonstrate the effects of the present invention, the following model evaluation is performed on the present invention:
[0106] In order to evaluate the performance of the model in hyperspectral large field of view vehicle target positioning, this embodiment conducts a comparative analysis of two models: Model 1 (hyperspectral target detection method combining BP and SAM) and Model 2 (SABP model based on spectral angle data enhancement and morphological optimization). By comparing the performance of the two methods in terms of accuracy and confusion matrix, their classification performance can be comprehensively evaluated, and the advantages of Model 2 in processing hyperspectral data can be highlighted, especially in the combination of spectral angle data enhancement and morphological optimization. The experimental results are shown in Table 1, which demonstrates the advantages and disadvantages of the two models in different aspects and verifies the effectiveness of Model 2 of the patent of this invention.
[0107] Compared to Model 1 (a hyperspectral target detection method combining BP and SAM), Model 2 achieved significantly improved accuracy on the validation set, reaching 99.9998%. Model 2 significantly reduced false positives (Precision 0.9, Recall 0.75) when processing hyperspectral data, demonstrating its higher reliability and accuracy in real-world target detection. By combining spectral angle data enhancement with morphological optimization, this method not only improves target detection accuracy but also reduces noise interference.
[0108] Model 2 effectively removes isolated noise points through morphological optimization, particularly the opening operation (a combination of erosion and dilation). Furthermore, spectral-angle adaptive morphology further enhances the accuracy of morphological operations, implementing differentiated processing strategies for high-confidence and low-confidence regions. After morphological optimization, connected region analysis based on shape feature perception further filters out irrelevant small regions. By comprehensively evaluating multidimensional shape features such as area, aspect ratio, compactness, and circularity, it significantly reduces misidentified noise regions. During the verification of Model 2, this multi-level morphological processing strategy effectively suppressed the impact of noise on target detection, ensuring the robustness and accuracy of the model in high-noise environments.
[0109] Furthermore, the performance in the confusion matrix further validates the advantages of Model 2. Model 2 achieved a True Negative (TN) rate of 3,686,374 and a False Positive (FP) rate of only 2, significantly reducing the number of mislabeled non-target areas. In comparison, Model 1 achieved a False Positive rate of 149, indicating that Model 2 achieved a significantly lower misidentification rate than Model 1. Model 2 also demonstrated a higher accuracy in True Positive (TP) and False Negative (FN) (18 TP vs. 15 TP, 6 FN vs. 9 FN), further demonstrating its combined advantages in both precision and recall.
[0110] Compared to Model 1 (F1 score of 0.16), Model 2's F1 score significantly improved to 0.82, further demonstrating the advantages of morphological optimization and spectral angle feature enhancement. Model 2 improves the accuracy and robustness of target positioning by accurately capturing subtle target spectral differences and removing noise through morphological post-processing, especially in long-range target detection. By combining spectral angle data enhancement with morphological optimization, this model achieves more balanced and accurate performance, especially in noise point removal, making it suitable for hyperspectral image analysis in complex environments. The specific data comparison is shown in Table 1:
[0111] Table 1
[0112]
[0113] In summary, Model 2 (SABP model based on spectral angle data enhancement and morphological optimization) shows significant improvements in several key indicators compared to Model 1 (hyperspectral target detection method combining BP and SAM), especially in terms of precision, recall, and F1-score. Therefore, in the hyperspectral data processing task of long-range target positioning, the dual-model combination is an efficient and reliable solution.
[0114] In order to more intuitively verify the denoising and target positioning effects of the model of the present invention, this embodiment visualizes the prediction results of the single-band grayscale image and the SABP model based on spectral angle data enhancement and morphological optimization. The original image is presented in grayscale form, with the enlarged target area in the lower left corner and the target vehicle framed by a blue solid line, as shown in the figure below. Figure 3 In the visualization of the model prediction results, the left side shows the entire hyperspectral image, and the red box marks the target area; the right side is the predicted image, which is presented in the form of a binary classification map, where the pixels in the target area are marked in white and framed in green, and the pixels in the non-target area are marked in black, as shown in the figure. Figure 4 These visualizations effectively demonstrate the high accuracy and denoising effect of the model in object detection.
[0115] The beneficial effects produced by the present invention are as follows:
[0116] First, the denoising capability is further enhanced. Traditional methods often rely on simple filtering and noise removal methods, which have limited effectiveness. However, the SABP model based on spectral angle data enhancement can effectively extract target signals and eliminate background noise by enhancing the sensitivity of spectral angle features. Combined with innovative two-layer morphological optimization post-processing steps, such as spectral angle adaptive morphological processing and shape-aware connected component refinement, differentiated processing of regions with different confidence levels is achieved, further reducing noise points and irrelevant areas, and ensuring the accurate retention of target information in hyperspectral data. This morphological processing strategy with comprehensive evaluation of multi-dimensional features significantly improves the model's target recognition ability in complex backgrounds.
[0117] Secondly, the algorithm's reliability has been significantly improved. Through a combination of data augmentation and morphological optimization, the model is able to more accurately identify targets, especially in complex backgrounds and noisy environments. Traditional methods are often susceptible to noise, leading to erroneous target recognition. However, this method, through multi-layer processing, provides more reliable classification results, especially in long-range target detection, demonstrating improved stability.
[0118] In terms of computing resource requirements, despite the introduction of data augmentation and morphological optimization, the model's requirements are more reasonable than those of deep learning methods. By utilizing spectral angle feature enhancement, the model reduces the reliance on large amounts of training data and high-performance computing resources. Furthermore, the combination of BP neural networks and morphological optimization enables the model to run efficiently on moderately configured computers, making it suitable for practical applications with limited resources.
[0119] In terms of interpretability, the model offers greater transparency than many deep learning models. The introduction of spectral angle features and morphological optimization processing provide intuitive insights into how the model makes decisions. This is particularly true for hyperspectral image classification and object localization, allowing users to clearly see how each step affects the final result. Deep learning models, on the other hand, are often viewed as "black boxes," making their internal decision-making processes difficult to interpret.
[0120] Finally, in terms of robustness, the model demonstrates excellent interference resistance. Combining spectral angle enhancement and morphological optimization, the model maintains high performance in a variety of complex scenarios, particularly in environments with strong noise interference, accurately identifying targets and suppressing background noise. In contrast, traditional methods often exhibit weaker robustness and higher false positive rates when faced with complex backgrounds and high noise levels.
[0121] In summary, the SABP model and morphological optimization method based on spectral angle data enhancement surpass traditional methods in terms of denoising ability, algorithm reliability, computing resource requirements, interpretability and robustness, providing a more superior and practical solution for hyperspectral target detection.
[0122] The above embodiments are intended only to illustrate the technical concepts and features of the present invention. Their purpose is to enable those skilled in the art to understand the contents of the present invention and implement them accordingly. They are not intended to limit the scope of protection of the present invention. Any equivalent changes or modifications made in accordance with the spirit of the present invention shall be included in the scope of protection of the present invention.
Claims
1. A hyperspectral positioning denoising method based on spectral angle and morphological optimization, characterized in that: The method comprises the following steps: S1 collects hyperspectral data of distant targets; S2 enhances the features of hyperspectral data through spectral angle matching (SAM) and splices the original data to obtain an enhanced dataset; S3 uses the enhanced data set to train the BP neural network and construct a feature-enhanced SABP model; S4 performs spectral angle matching on the hyperspectral data and the target average spectral vector, and obtains a binary prediction matrix by combining the SABP model; S5 performs morphological post-processing on the binarized prediction matrix, fuses spectral angle information to achieve regional adaptive processing and intelligent screening based on multidimensional shape-spectral features, and realizes target positioning and denoising.
2. The hyperspectral positioning denoising method based on spectral angle and morphological optimization according to claim 1 is characterized in that: The enhancement of hyperspectral data features described in S2 specifically includes: constructing a two-classification data set, calculating the target average spectral vector and performing normalization processing, normalizing the spectral vector of each pixel in the hyperspectral image, calculating the cosine similarity between each pixel spectrum and the target spectrum through spectral angle matching (SAM) and converting it into spectral angles, and splicing the spectral angles with the original data to obtain an enhanced data set.
3. The hyperspectral positioning denoising method based on spectral angle and morphological optimization according to claim 1 is characterized in that: The number of input layer nodes of the SABP model described in S3 is the sum of the number of spectral bands and the spectral angle features. The hidden layer contains 150 neurons and uses the ReLU activation function. The output layer outputs the classification probability through the Sigmoid function.
4. The hyperspectral positioning denoising method based on spectral angle and morphological optimization according to claim 3 is characterized in that: The morphological post-processing described in S5, which integrates spectral angle information to achieve regional adaptive processing and intelligent screening based on multidimensional shape-spectral features, includes: performing opening operation preprocessing on the binary image, dividing the high and low confidence regions based on the spectral angle and performing morphological processing on the regions, performing boundary repair and confidence optimization after merging, combining shape features and spectral features to screen connected regions, using disk-shaped structural elements to smooth the boundaries of the regions, and finally merging all retained connected regions to form an optimized target detection result.
5. The hyperspectral positioning denoising method based on spectral angle and morphological optimization according to claim 4 is characterized in that: In the regional morphological processing, a disk-shaped structuring element with a radius of 1 pixel is used to perform opening and closing operations on the high confidence region, and a disk-shaped structuring element with a radius of 3 pixels is used to perform opening and closing operations on the low confidence region, and the processing results of the two regions are merged.
6. The hyperspectral positioning denoising method based on spectral angle and morphological optimization according to claim 5 is characterized in that: The boundary restoration and confidence optimization uses a 2×2 structural element to perform a closing operation on the merged image to restore the boundary, uses a confidence map to weight the result, and applies a threshold of 0.3 to obtain an optimized binary image.
7. The hyperspectral positioning denoising method based on spectral angle and morphological optimization according to claim 6 is characterized in that: The screening of connected areas specifically includes: Connected region marking and preliminary screening: Mark the optimized binary image and preliminarily screen connected regions with an area ranging from 10 to 500 pixels; Multidimensional feature calculation: Shape features and spectral features are calculated for each connected region after screening. Shape features include aspect ratio, compactness, and circularity; spectral features include the average spectral angle and standard deviation within the region. Comprehensive scoring screening: A comprehensive scoring mechanism is established based on shape features and spectral features, and connected regions with a score greater than 0.5 and an average spectral angle lower than the 75th percentile of the image are retained.
8. A hyperspectral positioning denoising device based on spectral angle and morphological optimization, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the computer program is loaded into a processor, the steps of the method according to any one of claims 1 to 7 are implemented.