Methods and apparatus for detecting surface anomalies based on spatial frequency features and map features

By combining spatial frequency features and spectral features, the anomaly detection method solves the problems of discreteness, uncertainty and low computational efficiency in surface anomaly detection, and achieves efficient and accurate anomaly detection, meeting the needs of real-time monitoring.

CN119919710BActive Publication Date: 2025-10-31WUHAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411820878.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-11
Publication Date
2025-10-31
Estimated Expiration
2044-12-11

AI Technical Summary

Technical Problem

Existing technologies for detecting surface anomalies suffer from discreteness, uncertainty, and time-varying nature of surface features, and have low computational efficiency, making it difficult to meet the needs of real-time detection.

Method used

By combining spatial-frequency features and spectral features, and by acquiring a knowledge graph of surface anomalies and single-scene hyperspectral images, a spatial-frequency domain anomaly feature index is constructed using comprehensive spatial and frequency domain feature information. Furthermore, a channel attention mechanism is used for in-depth mining to construct a comprehensive spectral feature index for anomaly detection.

Benefits of technology

It improves the efficiency and accuracy of anomaly feature extraction, reduces feature redundancy, enhances the comprehensiveness and accuracy of anomaly detection, meets the needs of real-time monitoring, and provides strong technical support.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119919710B_ABST
    Figure CN119919710B_ABST
Patent Text Reader

Abstract

This application relates to the field of remote sensing image anomaly technology, and particularly to a method and apparatus for detecting surface anomalies based on spatial-frequency features and spectral features. The method includes: acquiring a single-scene hyperspectral image and determining at least one image scene within the single-scene hyperspectral image; decomposing the single-scene hyperspectral image into spatial and frequency domain integrated feature information to construct a spatial-frequency domain anomaly feature index using the spatial-frequency domain integrated feature information; based on a surface anomaly knowledge graph, using a channel attention mechanism to deeply mine multiple features to select high-attention features that meet preset conditions for different scenes of at least one image scene; constructing a spectral feature comprehensive index for surface anomaly detection; and using the spatial-frequency domain anomaly feature index and the spectral feature comprehensive index to obtain anomaly detection results. This solves the limitations of related technologies in surface anomaly detection, such as the discreteness, uncertainty, and time-varying nature of surface features, as well as low computational efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of remote sensing image anomaly technology, and in particular to a method and apparatus for detecting surface anomalies based on spatial frequency features and spectral features. Background Technology

[0002] Due to human activities and climate change, surface anomalies are becoming more frequent and their harms are intensifying. Satellite remote sensing, with its inherent advantages, has become a key means of monitoring surface anomalies, creating an urgent need for early detection and timely diagnosis. Among related technologies, anomaly detection methods primarily extract background information from images, using the differences between the background and the anomaly to distinguish them. Based on different background information extraction methods, they can be mainly divided into anomaly detection algorithms based on statistical models, anomaly detection algorithms based on geometric models, and anomaly detection algorithms based on deep learning.

[0003] However, in related technologies, statistical models assume that the background follows a specific distribution, and while the RX algorithm has good performance, it has a high false alarm rate; geometric modeling methods use feature vectors to represent the background, which is not good at anomaly representation; sparse representation methods do not fully incorporate spatial spectral characteristics, and their accuracy and effectiveness need to be optimized; deep learning methods have high accuracy but large computational cost and slow convergence, making it difficult to meet the needs of real-time on-orbit detection. In summary, current surface anomaly detection suffers from limitations such as the discreteness, uncertainty, and time-varying nature of surface features, as well as low computational efficiency, and urgently needs improvement. Summary of the Invention

[0004] This application provides a method and apparatus for detecting surface anomalies based on spatial frequency features and spectral features, in order to solve the limitations of related technologies, such as the discreteness, uncertainty, and time-varying nature of surface features, as well as low computational efficiency.

[0005] The first aspect of this application provides a method for detecting surface anomalies based on spatial-frequency features and spectral features, comprising the following steps: acquiring a surface anomaly knowledge graph; acquiring a single-scene hyperspectral image and determining at least one image scene of the single-scene hyperspectral image, and decomposing the single-scene hyperspectral image into spatial and frequency domain integrated feature information, so as to construct a spatial-frequency domain anomaly feature index using the spatial and frequency domain integrated feature information; based on the surface anomaly knowledge graph, using a channel attention mechanism to perform in-depth mining of multiple features, so as to select high-attention features that meet preset conditions for different scenes of the at least one image scene, constructing a spectral feature comprehensive index for surface anomaly detection, so as to obtain anomaly detection results using the spatial-frequency domain anomaly feature index and the spectral feature comprehensive index.

[0006] Through the above technical solutions, the embodiments of this application can effectively improve the extraction efficiency and accuracy of anomalous features by acquiring a knowledge graph of surface anomalies and single-scene hyperspectral imagery, combined with spatial and frequency domain integrated feature information. Secondly, by employing a channel attention mechanism for in-depth feature mining, high-attention features can be selected for different image scenes, thereby reducing feature redundancy and improving the accuracy and reliability of anomaly detection. Finally, by comprehensively utilizing spatial and frequency domain anomaly feature indices and a comprehensive map feature index, the comprehensiveness and accuracy of anomaly detection are enhanced, providing strong technical support for the timely detection and response to surface anomaly events.

[0007] Optionally, in one embodiment of this application, the step of acquiring a single-scene hyperspectral image, determining at least one image scene of the single-scene hyperspectral image, and decomposing the single-scene hyperspectral image into spatial and frequency domain integrated feature information to construct a spatial and frequency domain anomaly feature index using the spatial and frequency domain integrated feature information includes: reading the single-scene hyperspectral image; converting the single-scene hyperspectral image into a double-precision format image; iterating over each pixel of the image to calculate the outer product and average value of each band value of each pixel, and calculating a covariance matrix based on the outer product and average value of each band value of each pixel; calculating at least one eigenvalue and eigenvector of the covariance matrix to sort at least one eigenvalue, determine multiple principal components, calculate the contribution rate of each eigenvalue, and find the principal component whose cumulative contribution rate is greater than a preset threshold; determining the eigenvector corresponding to the principal component, reading the band values ​​of each pixel position and performing principal component transformation to obtain a matrix after principal component transformation.

[0008] Through the above technical solution, the embodiments of this application can effectively extract the covariance matrix, eigenvalues, and eigenvectors of a single hyperspectral image by performing double-precision format conversion and pixel-by-pixel iterative calculation, thereby achieving principal component analysis. This process not only improves the processing efficiency of image data but also accurately identifies and filters out the main components, ensuring that the extracted information has a high contribution rate, thus optimizing subsequent anomaly detection and analysis. This method improves data processing accuracy while reducing computational complexity.

[0009] Optionally, in one embodiment of this application, the step of acquiring a single-scene hyperspectral image, determining at least one image scene of the single-scene hyperspectral image, and decomposing the single-scene hyperspectral image into spatial and frequency domain integrated feature information to construct a spatial-frequency domain anomaly feature index using the spatial and frequency domain integrated feature information further includes: normalizing the matrix after the principal component transformation, calling the discrete fractional Fourier transform function for each pixel of the matrix after the principal component transformation, calculating the entropy of each band, and assigning the maximum value to FrFE to obtain the corresponding order; cyclically processing the pixels, calling the function to perform discrete Fourier transform, calculating the feature vector matrix of DFRFT, using the feature vector matrix and the input vector to calculate the DFRFT result data, and standardizing the result data.

[0010] Through the above technical solution, this embodiment of the application can extract the features with the maximum information content by normalizing the matrix after principal component transformation and calculating the entropy value of each band using discrete fractional Fourier transform, thus providing an effective feature basis for subsequent anomaly detection. Iteratively processing each pixel and calculating the feature vector matrix of DFRFT allows the algorithm to fully utilize spatial-frequency information, improving the ability to distinguish abnormal signals. Simultaneously, standardizing the resulting data further enhances the stability and accuracy of the algorithm. This process not only improves the accuracy of anomaly detection but also effectively reduces noise interference, optimizes computational efficiency, and meets the needs of real-time monitoring.

[0011] Optionally, in one embodiment of this application, the method further includes: generating feedback data using the spatial frequency domain anomaly feature index and the spectral feature comprehensive index; and using the feedback data to perform image cropping to mark anomaly regions.

[0012] Through the above technical solution, the embodiments of this application can generate feedback data by combining the spatial frequency domain anomaly feature index and the spectral feature comprehensive index, thereby achieving accurate identification and annotation of anomaly regions in remote sensing images. Using the feedback data for image cropping not only improves the visualization of anomaly regions but also enhances the accuracy and real-time performance of anomaly detection, thus providing effective technical support for responding to emergencies such as natural disasters and environmental pollution.

[0013] A second aspect of this application provides a surface anomaly detection device based on spatial-frequency features and spectral features, comprising: an acquisition module for acquiring a surface anomaly knowledge graph; a construction module for acquiring a single-scene hyperspectral image, determining at least one image scene of the single-scene hyperspectral image, and decomposing the single-scene hyperspectral image into spatial and frequency domain integrated feature information, so as to construct a spatial-frequency domain anomaly feature index using the spatial-frequency domain integrated feature information; and a detection module for performing in-depth mining of multiple features based on the surface anomaly knowledge graph using a channel attention mechanism, selecting high-attention features that meet preset conditions for different scenes of the at least one image scene, constructing a spectral feature comprehensive index for surface anomaly detection, and obtaining anomaly detection results using the spatial-frequency domain anomaly feature index and the spectral feature comprehensive index.

[0014] Through the above technical solutions, the embodiments of this application can effectively improve the extraction efficiency and accuracy of anomalous features by acquiring a knowledge graph of surface anomalies and single-scene hyperspectral imagery, combined with spatial and frequency domain integrated feature information. Secondly, by employing a channel attention mechanism for in-depth feature mining, high-attention features can be selected for different image scenes, thereby reducing feature redundancy and improving the accuracy and reliability of anomaly detection. Finally, by comprehensively utilizing spatial and frequency domain anomaly feature indices and a comprehensive map feature index, the comprehensiveness and accuracy of anomaly detection are enhanced, providing strong technical support for the timely detection and response to surface anomaly events.

[0015] Optionally, in one embodiment of this application, the construction module includes: a reading unit for reading the single-scene hyperspectral image; a conversion unit for converting the single-scene hyperspectral image into a double-precision format image; a first calculation unit for iterating over each pixel of the image to calculate the outer product and average value of each band value of each pixel, and calculating a covariance matrix based on the outer product and average value of each band value of each pixel; a second calculation unit for calculating at least one eigenvalue and eigenvector of the covariance matrix to sort the at least one eigenvalue, determine multiple principal components, calculate the contribution rate of each eigenvalue, and find the principal component whose cumulative contribution rate is greater than a preset threshold; and a principal component transformation unit for determining the eigenvector corresponding to the principal component, reading the band values ​​of each pixel position and performing principal component transformation to obtain a matrix after principal component transformation.

[0016] Through the above technical solution, the embodiments of this application can effectively extract the covariance matrix, eigenvalues, and eigenvectors of a single hyperspectral image by performing double-precision format conversion and pixel-by-pixel iterative calculation, thereby achieving principal component analysis. This process not only improves the processing efficiency of image data but also accurately identifies and filters out the main components, ensuring that the extracted information has a high contribution rate, thus optimizing subsequent anomaly detection and analysis. This method improves data processing accuracy while reducing computational complexity.

[0017] Optionally, in one embodiment of this application, the construction module includes: a normalization unit, used to normalize the matrix after the principal component transformation, to call the discrete fractional Fourier transform function for each pixel of the matrix after the principal component transformation, calculate the entropy of each band, and assign the maximum value to FrFE to obtain the corresponding order; and a standardization unit, used to iteratively process the pixels, call the function to perform discrete Fourier transform, calculate the feature vector matrix of DFRFT, use the feature vector matrix and the input vector to calculate the DFRFT to obtain the result data, and perform standardization processing on the result data.

[0018] Through the above technical solution, this embodiment of the application can extract the features with the maximum information content by normalizing the matrix after principal component transformation and calculating the entropy value of each band using discrete fractional Fourier transform, thus providing an effective feature basis for subsequent anomaly detection. Iteratively processing each pixel and calculating the feature vector matrix of DFRFT allows the algorithm to fully utilize spatial-frequency information, improving the ability to distinguish abnormal signals. Simultaneously, standardizing the resulting data further enhances the stability and accuracy of the algorithm. This process not only improves the accuracy of anomaly detection but also effectively reduces noise interference, optimizes computational efficiency, and meets the needs of real-time monitoring.

[0019] Optionally, in one embodiment of this application, it further includes: a feedback module, used to generate feedback data through the spatial frequency domain anomaly feature index and the spectral feature comprehensive index; and a cropping module, used to crop the image using the feedback data to mark the anomaly region.

[0020] Through the above technical solution, the embodiments of this application can generate feedback data by combining the spatial frequency domain anomaly feature index and the spectral feature comprehensive index, thereby achieving accurate identification and annotation of anomaly regions in remote sensing images. Using the feedback data for image cropping not only improves the visualization of anomaly regions but also enhances the accuracy and real-time performance of anomaly detection, thus providing effective technical support for responding to emergencies such as natural disasters and environmental pollution.

[0021] A third aspect of this application provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the surface anomaly detection method based on spatial frequency features and spectral features as described in the above embodiments.

[0022] A fourth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method for detecting surface anomalies based on spatial frequency features and map features.

[0023] A fifth aspect of this application provides a computer program, which, when executed, implements the above-described method for detecting surface anomalies based on spatial frequency features and spectral features.

[0024] This application's embodiments combine surface anomaly knowledge graphs with single-scene hyperspectral imagery, utilizing spatial and frequency domain integrated feature information to significantly improve the efficiency and accuracy of anomaly feature extraction. Simultaneously, the application of channel attention mechanisms enables the selection of highly attention-grabbing features in different image scenes, thereby reducing feature redundancy and further improving the accuracy and reliability of anomaly detection. Furthermore, the implementation of principal component analysis, through double-precision format conversion and pixel-by-pixel iterative calculation, effectively identifies and filters out major components, optimizing the subsequent anomaly detection and analysis process. The introduction of discrete fractional Fourier transform provides a rich feature base for anomaly detection, enhancing the ability to distinguish anomaly signals and reducing noise interference, thus meeting the needs of real-time monitoring. Finally, by comprehensively utilizing spatial and frequency domain anomaly feature indices and spectral feature comprehensive indices to generate feedback data, accurate identification and labeling of anomaly regions in remote sensing images are achieved, providing strong technical support for responding to natural disasters, environmental pollution, and other emergencies.

[0025] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description

[0026] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:

[0027] Figure 1 This is a schematic diagram of the overall network framework for surface anomaly detection based on spatial frequency features and map features;

[0028] Figure 2 The flowchart is a method for detecting surface anomalies based on spatial frequency features and spectral features according to an embodiment of this application;

[0029] Figure 3 This is a flowchart of a single-scene hyperspectral (multi-spectral) surface anomaly detection method based on spatial frequency anomaly index combined with feature knowledge according to an embodiment of this application;

[0030] Figure 4 This is a flowchart of a method for detecting surface anomalies in single-scene hyperspectral (multispectral) images based on a knowledge graph feature comprehensive index according to an embodiment of this application;

[0031] Figure 5 This is a schematic diagram of the surface anomaly detection results of a California wildfire according to a specific embodiment of this application;

[0032] Figure 6 This is a schematic diagram of the surface anomaly detection results of an oil spill in the Gulf of Mexico according to a specific embodiment of this application;

[0033] Figure 7 This is a schematic diagram illustrating the results of fire surface anomaly detection according to a specific embodiment of this application;

[0034] Figure 8 This is a schematic diagram illustrating the results of detecting surface anomalies in marine oil spills according to a specific embodiment of this application;

[0035] Figure 9 This is a schematic diagram illustrating the feature extraction of flood surface anomaly type according to a specific embodiment of this application;

[0036] Figure 10 This is a schematic diagram illustrating the feature extraction of landslide surface anomaly types according to a specific embodiment of this application;

[0037] Figure 11 This is a schematic diagram of anomaly detection results in landslide and flood areas according to a specific embodiment of this application;

[0038] Figure 12 A schematic diagram of the structure of a surface anomaly detection device based on spatial frequency features and spectral features provided in an embodiment of this application;

[0039] Figure 13 This is a structural example diagram of an electronic device provided according to an embodiment of this application. Detailed Implementation

[0040] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.

[0041] The following description, with reference to the accompanying drawings, describes a method and apparatus for detecting surface anomalies based on spatial-frequency features and spectral features according to embodiments of this application. Addressing the limitations of related technologies mentioned in the background section, such as the discreteness, uncertainty, and time-varying nature of surface features, as well as low computational efficiency, this application provides a method for detecting surface anomalies based on spatial-frequency features and spectral features. This method effectively improves the extraction efficiency and accuracy of anomaly features by acquiring a surface anomaly knowledge graph and single-scene hyperspectral imagery, combined with comprehensive spatial and frequency domain feature information. Secondly, by employing a channel attention mechanism for in-depth feature mining, high-attention features can be selected for different image scenes, thereby reducing feature redundancy and improving the accuracy and reliability of anomaly detection. Finally, by comprehensively utilizing the spatial-frequency domain anomaly feature index and the comprehensive spectral feature index, the comprehensiveness and accuracy of anomaly detection are enhanced, providing strong technical support for the timely detection and response to surface anomaly events. Thus, the limitations of related technologies, such as the discreteness, uncertainty, and time-varying nature of surface features, and low computational efficiency, are solved.

[0042] To more clearly demonstrate the overall structure and workflow of this invention, Figure 1 A network framework for surface anomaly detection and diagnosis based on spatial frequency anomaly indices and comprehensive map feature indices is presented. This framework provides the foundation for detailed explanations of subsequent steps.

[0043] Specifically, Figure 2 This is a schematic flowchart illustrating a surface anomaly detection method based on spatial frequency features and spectral features provided in an embodiment of this application.

[0044] like Figure 2 As shown, the surface anomaly detection method based on spatial frequency features and spectral features includes the following steps:

[0045] In step S201, a knowledge graph of surface anomalies is obtained.

[0046] It is understood that surface anomalies refer to sudden changes in typical surface types or states, such as vegetation, water bodies, bare land, and artificial surfaces, under the influence of natural or human factors. These changes threaten the natural environment and human security to varying degrees, and typically cause fluctuations in remote sensing response characteristics such as spectral, spatial, scattering, and radiation values ​​in remote sensing images to exceed the thresholds for normal surface changes. The surface anomaly knowledge graph input in this application embodiment includes, but is not limited to, anomaly detection methods, surface anomaly types, and typical anomaly characteristics.

[0047] In some embodiments, the surface anomaly knowledge graph is an application of knowledge graphs in the field of surface anomaly detection and diagnosis. It is a structured knowledge base that formally describes the concepts, entities, attributes, and their interrelationships applied in the field of surface anomalies, enabling interconnections between concepts and entities to form a network knowledge structure. The input graph contains knowledge such as surface anomaly detection methods, surface anomaly types, and typical anomaly characteristics. In remote sensing imagery, surface anomalies can be categorized into intrusive and characteristic types. The locations where they occur are classified into four categories: vegetation, water bodies, artificial surfaces, and bare land. Anomalies can be detected and diagnosed through response features such as spectral and textural characteristics. Relevant feature indicators include VASTI (Vegetation Adjusted Soil Temperature Index), STD (Standard Deviation), 3DC (Three-Dimensional Color Index), NIR (Near Infrared), SWIR (Short-Wave Infrared), BVDI (Bare Soil Vegetation Difference Index), HRI (Hotness Ratio Index), and SVI (Spectral Vegetation Index).

[0048] The embodiments of this application can integrate relevant methods, types and features for surface anomaly detection through a structured knowledge base, which can systematically improve the accuracy and efficiency of surface anomaly detection.

[0049] In step S202, a single-scene hyperspectral image is acquired, and at least one image scene of the single-scene hyperspectral image is determined. The single-scene hyperspectral image is decomposed into spatial and frequency domain integrated feature information, so as to construct a spatial and frequency domain anomaly feature index using the spatial and frequency domain integrated feature information.

[0050] As can be understood, single-scene hyperspectral imagery refers to image data of a single scene acquired through hyperspectral remote sensing technology. Hyperspectral imagery has dozens to hundreds of consecutive spectral bands, providing rich information about the Earth's surface and capturing the spectral characteristics of different objects for the identification and analysis of surface features.

[0051] In actual implementation, the workflow of the single-scene hyperspectral (multi-spectral) surface anomaly detection method based on spatial frequency anomaly index combined with feature knowledge is as follows: Figure 3As shown, the obtained single-scene hyperspectral image data is input and processed by a convolutional neural network (CNN) to perform scene understanding. The CNN utilizes linear algebra principles (especially matrix multiplication) to identify patterns within the image, thereby performing image classification and object recognition tasks. In the application of surface anomaly detection, the CNN performs scene understanding and classification on the input hyperspectral image data, determining the scene to which the input image belongs. Based on the surface anomaly event classification system, the input image is understood and classified into water scenes, vegetation scenes, artificial surface scenes, or bare land scenes, laying the scene foundation for further determination of the type of surface anomaly in the image.

[0052] Furthermore, a single hyperspectral image is decomposed into spatial and frequency domain integrated feature information. A global anomaly detection algorithm with feature optimization is used to improve efficiency, and a spatial-frequency domain anomaly feature index is constructed. Anomalies are then detected by combining this with anomaly response feature knowledge. The improved algorithm achieves high anomaly detection accuracy while reducing computation time by more than 80%.

[0053] Among these methods, the Principal Component Analysis (PCA) algorithm is used to reduce the dimensionality of image data, improving computational efficiency. Principal component transformation involves rotating the coordinate axes to maximize the variance of the original multi-band data, resulting in uncorrelated bands, thus eliminating noise and reducing data dimensionality. Generally, each band has the highest correlation with PC1 (First Principal Component), with correlations gradually decreasing with subsequent principal components. In practical applications, only the first few principal components can be used for processing. For example, after performing PCA on a TM (Thematic Map), its PC1, PC2 (Second Principal Component), and PC3 (Third Principal Component) contain more than 95% of the information, while the first 20 components of hyperspectral imagery contain all the information. Therefore, selecting a subset (PC1) as a remote sensing index reduces the correlation between the original data, which is crucial for the rapid extraction of hazard bodies. It also reduces the time required to detect surface anomalies, facilitating their immediate discovery.

[0054] The specific implementation process includes:

[0055] 1) First, read the image data and convert it to double-precision format. Iterate through each pixel of the image, then calculate the outer product and average of the band values ​​for each pixel to obtain the covariance matrix C, which is defined as C = rv ′ *v.

[0056] 2) Use the eig function to calculate the eigenvalues ​​and eigenvectors of the covariance matrix C.

[0057] 3) Extract the feature vector newlamda, sort the feature values ​​from smallest to largest to get newy, calculate the proportion of each feature value to the total feature values, and obtain the contribution rate.

[0058] 4) Calculate the cumulative contribution rate. When the cumulative contribution rate is greater than 0.99, record the current index and exit the loop. Based on the index of the principal component, find the corresponding eigenvector from the eigenvector matrix T and record it in NT.

[0059] 5) For each pixel in the image, read its band values, and then perform a dot product with the eigenvectors of the principal components to obtain the result after principal component transformation.

[0060] Furthermore, the Fractional Fourier Entropy (FrFE) is calculated to enrich the information content. Specifically, the optimal fractional transform coefficients ρ are solved using spectral feature extraction based on the Fractional Fourier Transform (FRFT) and the Shannon entropy maximization method to extract suspected anomalies from the image. The fractional Fourier transform can utilize the signal's representation in the intermediate domain, including reflectance spectrum information and Fourier domain information, to more clearly distinguish between background and anomalous features.

[0061] Specifically, the fractional Fourier transform (FrFT) is a representation of a signal in the fractional Fourier domain formed by rotating the coordinate axes counterclockwise around the origin in the time-frequency plane by any angle; it is a generalized Fourier transform. The FrFT-based hyperspectral anomaly detection method uses FrFT as preprocessing, obtaining intermediate domain features between the original reflectance spectrum and the Fourier transform with complementary intensities through a spatial-frequency representation. This is beneficial for noise removal, improving the ability to distinguish anomalies and background, and enriching image information. The specific implementation process includes:

[0062] 1) Data Reshaping: Normalize the matrix DataTest after principal component transformation, calculate the number of rows, columns and bands of DataTest, and change its shape from three-dimensional (rows, columns, bands) to two-dimensional (number of pixels, bands).

[0063] 2) Calculate FrFE and optimal order: Call the FrFEorder function to process DataTest.

[0064] The calculation process of the FrFEorder function is as follows:

[0065] First, obtain the dimensions of DataTest and initialize a zero matrix E. Loop through p from 0 to 1 with a step size of 0.1. In each loop, initialize a zero-based 3D matrix im1 with the same dimensions as DataTest. For each pixel in DataTest, perform a Discrete Fractional Fourier Transform (FFT) using the Disfrft function and store the result in im1. Perform center normalization on the data in im1. Calculate the entropy of each band in im1 and store the result in the corresponding column of E. Increment the index by 1. After exiting the loop, find the maximum value in each row of E, then find the largest of these maximum values ​​and assign it to FrFE. Simultaneously, find the row number containing this maximum value, divide it by 10, and assign it to the order to obtain the optimal order of the fractional Fourier entropy.

[0066] The calculation process of the Disfrft function is as follows:

[0067] Calculate the length N of the input vector and determine if N is even. Calculate an offset vector shft for subsequent data rearrangement. Ensure the input vector is a column vector. If no parameter p is provided, set it to N / 2. Then, constrain p to between 2 and N-1. Call the dFRFT function to compute the eigenvector matrix E of the DFRFT. Use E and the input vector to compute the result of the DFRFT.

[0068] The dFRFT function is used to calculate the eigenvector matrix of the DFRFT function. The calculation process of the dFRFT function is as follows:

[0069] Global variables `E_saved` and `p_saved` are defined to store previously calculated eigenvector matrices and their corresponding approximate orders for reuse, reducing computational complexity. The length of the global variable `E_saved` is checked to ensure it matches the current `N`, and `p_saved` matches the current `p`. This determines if the previously stored eigenvector matrix can be reused. If `E_saved` and `p_saved` do not match the current `N` and `p`, or if they have not been calculated previously, the `make_E` function is called to calculate a new eigenvector matrix `E`. After calculation, `E_saved` and `p_saved` are updated to store the newly calculated matrix and its approximate order. If `E_saved` and `p_saved` match the current `N` and `p`, the stored eigenvector matrix `E_saved` is used directly as the result. The function aims to return an NxN matrix `E` containing the eigenvectors of the discrete Fourier transform matrix.

[0070] The `make_E` function is used to calculate the feature vectors and feature values ​​of a specific order of DFRFT. The calculation process of the `make_E` function is as follows:

[0071] Initialize a series of variables, including the difference matrix d2, the polynomial d_p, and the zero vector st. Construct the polynomial through convolution and accumulate it into s to construct the first column of matrix H. Construct matrix H by adding a cyclic matrix composed of the values ​​of s to a diagonal matrix composed of the real parts of the Fourier transform of s. Construct a transformation matrix V based on the identity matrix for subsequent eigenvector calculation. Calculate VHV using the transformation matrix V and matrix H. Then, calculate the eigenvectors for the first and second halves of VHV respectively. To ensure the order of the eigenvectors matches the requirements of DFT, rearrange the eigenvectors. The purpose of the make_E function is to construct an eigenvector matrix E of a DFRFT of a specific order p. This matrix is ​​obtained by constructing and diagonalizing a special matrix H, which is a combination of a cyclic matrix and a diagonal matrix. Then, calculate and rearrange the eigenvectors using the transformation matrix V.

[0072] Furthermore, global RX (Reed-Xiaoli, an algorithm) anomaly detection is performed. This method performs global RX detection on the input data cube and returns the detection results, obtaining the outliers. The specific implementation process includes: reshaping the input data into a two-dimensional matrix X of size (number of rows and columns) * number of bands; calculating the mean X_mean and covariance matrix cov_X for each band of X; calculating the transpose of X minus the repeating matrix of X_mean to obtain Y; initializing the global RX detection result GRX_Detect as a zero matrix with a size of 1 * (number of rows and columns); calculating the pseudo-inverse cov_inv of cov_X; for each column of Y, calculating its product with cov_inv, and storing the result in GRX_Detect; finally, reshaping GRX_Detect to size (number of rows * number of columns) and returning it to obtain the global RX detection result.

[0073] Specifically, the global anomaly detection algorithm is used to detect outliers in data, identify abnormal pixels in an image, and find abnormal features in the image. The specific steps include:

[0074] 1) Define the function GRX (Global RX, Global RX Anomaly Detection Algorithm), with the input parameter being hyperspectral (multispectral) imagery.

[0075] 2) Use the size function to get the size of the input data, which is the number of rows, columns and bands.

[0076] 3) Use the reshape function to convert the 3D data cube into a 2D matrix X, where each row represents a pixel and each column represents a band.

[0077] 4) Calculate the mean X_mean of X to obtain the average value of each band. The result is a column vector.

[0078] 5) Calculate the covariance matrix cov_X of X.

[0079] 6) Calculate matrix Y, which is each column of data matrix X minus the mean X_mean.

[0080] 7) Initialize the result matrix GRX_Detect as a zero matrix with a size of 1 row, which is the number of rows multiplied by the number of columns.

[0081] 8) Calculate the pseudo-inverse of the covariance matrix, cov_inv.

[0082] 9) Use a for loop to calculate the outlier in the transform space for each pixel, which is the product of each column of Y with the pseudo-inverse of the covariance matrix, and then multiply it with the transpose of Y.

[0083] 10) Finally, the one-dimensional detection result GRX_Detect is reshaped into a two-dimensional matrix with the same number of rows and columns as the input data to obtain the anomaly detection result.

[0084] This application embodiment can effectively identify and extract key information from single-scene hyperspectral images by acquiring them and classifying the scenes. After decomposing the images into spatial and frequency domain comprehensive feature information, these feature information can be fully utilized to construct a spatial-frequency domain anomaly feature index, thereby improving the accuracy and efficiency of anomaly detection. This method not only enhances the ability to identify surface anomalies but also significantly shortens the computation time, meeting the needs of real-time monitoring and helping to promptly detect and respond to surface anomaly events.

[0085] In step S203, based on the surface anomaly knowledge graph, a channel attention mechanism is used to deeply mine multiple features to select high attention features that meet preset conditions for different scenes of at least one image scene, and construct a comprehensive index of map features for surface anomaly detection, so as to obtain anomaly detection results by using the spatial frequency domain anomaly feature index and the comprehensive index of map features.

[0086] Understandably, combining knowledge graph feature comprehensive indices can be used to detect surface anomalies in single-scene hyperspectral (multi-spectral) imagery. A channel attention mechanism is employed to deeply mine massive amounts of features, selecting high-attention features for different scenarios to reduce feature redundancy, and constructing a comprehensive feature index for anomaly detection. By integrating anomaly map feature knowledge systems, the accuracy of anomaly detection is improved, and the false alarm rate is reduced.

[0087] In actual implementation, the workflow of the single-scene hyperspectral (multispectral) image surface anomaly detection method based on knowledge graph feature comprehensive index is as follows: Figure 4As shown, initial features are obtained from the image after scene understanding, including texture features, spectral feature systems, and spectral features. Specific indices include 3DC, SVI, NIR, HRI, VASTI, STD, BVDI, and entropy. These initial features provide an important information foundation for subsequent anomaly detection.

[0088] Furthermore, SENet (Squeeze-and-Excitation Networks) is used to deeply mine these initial features. SENet automatically learns the importance of each feature channel and assigns different weight values ​​to each feature. In this way, the neural network can focus on feature channels that are useful for surface anomaly detection, while suppressing feature channels that contribute less to anomaly detection. In this way, the importance of different feature channels is dynamically adjusted, so that the attention ranking of features varies in different scenarios, thereby constructing a comprehensive feature index for specific scenarios.

[0089] Specifically, numerous features exist in imagery, many of which are strongly correlated with the detection of surface anomalies. By selecting features relevant to anomaly detection, an anomaly map feature knowledge system is constructed, encompassing texture features, spectral features, and other important indices related to anomaly detection. For example, the BVDI index is an important feature in water scenes, while the VASTI index is more important in artificial surface scenes. A channel attention mechanism is used to weight features for different scenes, reducing feature redundancy and thus improving the accuracy of anomaly detection. The core principle of the attention mechanism is to weight input features, ensuring that features the network focuses on receive greater weight, while irrelevant features are assigned smaller weights. This method not only reduces feature redundancy but also effectively improves the accuracy of anomaly detection and reduces the false alarm rate.

[0090] In this embodiment, a channel attention mechanism is employed to optimize features for different scenarios. Specifically, the SENet model is used, which consists of two parts: compression and activation. Global spatial information is compressed, then features are learned along the channel dimension to determine the importance of each channel. Finally, different weights are assigned to each channel through the activation part. For any given transformation: Ftr: X→U, where X∈R H′×W′×C′ ,U∈R H×W×C Ftr is used as a convolution operator. The specific steps include:

[0091] 1) Squeeze(Fsq): Compresses the two-dimensional features (H×W) of each channel into a single real number using global average pooling, thus reducing the feature map size from...

[0092] Feature U is compressed using a squeeze operation, aggregating feature maps across spatial dimensions H×W to generate a channel descriptor, as shown below:

[0093] H×W×C→1×1×C,

[0094] Global spatial information is compressed into the aforementioned channel descriptors, enabling these channel descriptors to be utilized by their input layers. Global average pooling is used here, as shown in the following formula:

[0095]

[0096] 2) Excitation (Fex): Generates a weight value for each feature channel, constructing the correlation between channels through two fully connected layers. The number of output weight values ​​is the same as the number of channels in the input feature map. Feature map

[0097] Each channel learns the activation of a specific sample through a channel-dependent self-selecting gate mechanism, enabling it to use global information, selectively emphasizing informative features and suppressing less useful ones. Here, a sigmoid function is used, with a ReLU function embedded in the middle to limit model complexity and aid training. The gating mechanism is parameterized through a bottleneck consisting of two fully connected layers (FC), with W1 used to reduce dimensionality and W2 used to increase dimensionality, as shown in the following formula:

[0098] s = F ex (z,W)=σ(g(z,W))=σ(W2δ(W1z)).

[0099] 3) Scale (Fscale): The normalized weights obtained earlier are applied to the features of each channel. This invention uses multiplication, multiplying each channel by the weight coefficient. Feature Map Each feature is multiplied by its weight and then summed to obtain a feature composite index. The feature composite index is used to detect surface anomalies in the image.

[0100] After anomalies are detected in hyperspectral (multispectral) images using spatial frequency anomaly indices and spectral feature composite indices, data feedback on the anomalous scenes is obtained. The images are then cropped using this feedback data to identify and label the anomalous regions.

[0101] The present application will be described in detail below with reference to several specific embodiments.

[0102] The experiment on surface anomaly detection based on fractional Fourier transform employed four comparative methods: global and local anomaly detection using fractional Fourier transform under principal component analysis; and global and local anomaly detection using fractional Fourier transform of the original imagery. The experiment selected the California wildfires and the Gulf of Mexico oil spill as examples. The surface anomaly detection results are as follows: Figure 5 and Figure 6 As shown.

[0103] Under two typical surface anomaly images, global RX detection showed better anomaly detection performance, while local RX detection resulted in false detections in marine oil spill detection. Global anomaly detection based on fractional Fourier transform (PCA) under principal component analysis (PCA) also demonstrated promising results. Considering the timeliness and speed requirements for on-orbit detection of surface anomalies, PCA was performed on the multispectral data to preserve key information while improving computational efficiency. Anomaly detection algorithm time calculations were conducted on four sets of surface anomaly data, revealing that PCA effectively reduced the detection time. Therefore, from both a timeliness and accuracy perspective, PCA post-processing is more efficient and effectively detects surface anomaly information.

[0104] A typical surface anomaly detection experiment was conducted on the surface anomaly detection model. Surface anomalies were detected and detected for two different types of surface anomalies: fire and marine oil spill. Thresholds were set to ultimately output the surface anomaly detection results, such as... Figure 7 , Figure 8 As shown.

[0105] To detect surface anomalies related to fires, surface anomalies were detected in remote sensing imagery of six different spatial regions. The results consistently demonstrated good detection and feedback capabilities for surface anomalies. After setting thresholds, the system effectively outputs anomaly areas, fulfilling its surface anomaly detection function. Furthermore, due to the superiority of its algorithm, interference from clouds and smoke can be effectively avoided during the surface anomaly detection phase, resulting in relatively accurate output of fire location.

[0106] To detect surface anomalies related to marine oil spills, we conducted surface anomaly detection for four different spatial regions, covering open-source marine oil spill datasets and hyperspectral images related to the Gulf of Mexico oil spill event. The results are as follows: Figure 8 As shown in the image, an experiment was conducted to detect surface anomalies in marine oil spills based on the above images. The experimental results show that this method can also effectively detect and identify surface anomalies in marine oil spills. Furthermore, by setting a threshold, it can effectively output anomaly results and anomaly areas.

[0107] This application identifies surface anomalies in two different land surface types—landslides and floods—using a comprehensive index of map features. The high-attention feature results are as follows: Figure 9 and Figure 10 As shown in the figure. Using the constructed comprehensive index I, surface anomalies were detected and identified in two types of surface anomaly images: landslides and floods. Specifically, six flood event anomaly images from different spatial regions, including India, Pakistan, and Central and Western Europe, were detected. Threshold segmentation using the inter-class maximum variance method effectively identified surface anomaly areas and output surface anomaly events. Eight landslide anomaly images from different spatial regions were detected. Threshold segmentation using the inter-class maximum variance method also effectively identified surface anomaly areas and output surface anomaly events. The results are shown in the figure. Figure 11 .

[0108] This application's embodiments utilize a channel attention mechanism based on a surface anomaly knowledge graph to deeply mine multiple features, effectively selecting high-attention features for different image scenarios to construct a comprehensive map feature index for surface anomaly detection. This method not only improves the accuracy of anomaly detection and reduces the false alarm rate but also fully leverages the combination of the spatial frequency domain anomaly feature index and the comprehensive map feature index, enhancing the reliability and real-time performance of anomaly detection results and meeting the practical needs of surface anomaly monitoring.

[0109] The surface anomaly detection method based on spatial-frequency features and spectral features proposed in this application can effectively improve the extraction efficiency and accuracy of anomaly features by acquiring a surface anomaly knowledge graph and single-scene hyperspectral imagery, combined with comprehensive spatial and frequency domain feature information. Secondly, by employing a channel attention mechanism for in-depth feature mining, high-attention features can be selected for different image scenes, thereby reducing feature redundancy and improving the accuracy and reliability of anomaly detection. Finally, by comprehensively utilizing spatial-frequency domain anomaly feature indices and comprehensive spectral feature indices, the comprehensiveness and accuracy of anomaly detection are enhanced, providing strong technical support for the timely detection and response to surface anomaly events.

[0110] Next, referring to the accompanying drawings, a surface anomaly detection device based on spatial frequency characteristics and spectral characteristics is described according to an embodiment of this application.

[0111] Figure 12 This is a block diagram of a surface anomaly detection device based on spatial frequency features and map features according to an embodiment of this application. Figure 12 As shown, the surface anomaly detection device 10 based on spatial frequency features and map features includes: an acquisition module 100, a construction module 200, and a detection module 300.

[0112] Specifically, module 100 is used to acquire a knowledge graph of surface anomalies.

[0113] The construction module 200 is used to acquire a single-scene hyperspectral image, determine at least one image scene of the single-scene hyperspectral image, and decompose the single-scene hyperspectral image into spatial and frequency domain integrated feature information, so as to construct a spatial and frequency domain anomaly feature index using the spatial and frequency domain integrated feature information.

[0114] The detection module 300 is used to perform in-depth mining of multiple features based on the knowledge graph of surface anomalies and the channel attention mechanism. It selects high attention features that meet preset conditions for different scenes of at least one image scene, constructs a comprehensive index of map features for surface anomaly detection, and obtains anomaly detection results by using the spatial frequency domain anomaly feature index and the comprehensive index of map features.

[0115] Optionally, in one embodiment of this application, the construction module 200 includes: a reading unit, a first calculation unit, a second calculation unit, and a principal component transformation unit.

[0116] The reading unit is used to read a single hyperspectral image; the conversion unit is used to convert the single hyperspectral image into a double-precision format image.

[0117] The first computational unit is used to iterate over each pixel of the image to calculate the outer product and average value of each pixel's band values, and to calculate the covariance matrix based on the outer product and average value of each pixel's band values.

[0118] The second calculation unit is used to calculate at least one eigenvalue and eigenvector of the covariance matrix, to sort at least one eigenvalue, determine multiple principal components, calculate the contribution rate of each eigenvalue, and find the principal components whose cumulative contribution rate is greater than a preset threshold.

[0119] The principal component transformation unit is used to determine the eigenvectors corresponding to the principal components, so as to read the band values ​​of each pixel position and perform principal component transformation to obtain the matrix after principal component transformation.

[0120] Optionally, in one embodiment of this application, the construction module 200 includes: a normalization unit and a standardization unit.

[0121] The normalization unit is used to normalize the matrix after principal component transformation. It calls the discrete fractional Fourier transform function on each pixel of the matrix after principal component transformation to calculate the entropy of each band and assigns the maximum value to FrFE to obtain the corresponding order.

[0122] The normalization unit is used to process pixels in a loop, call functions to perform Discrete Fourier Transform (DFRFT), calculate the feature vector matrix of DFRFT, use the feature vector matrix and input vector to calculate the DFRFT result data, and perform normalization processing on the result data.

[0123] Optionally, in one embodiment of this application, it further includes a feedback module 400 and a trimming module 500.

[0124] Specifically, the feedback module 400 is used to generate feedback data through the spatial frequency domain anomaly characteristic index and the comprehensive index of spectral characteristics.

[0125] The cropping module 500 is used to crop images using feedback data to mark abnormal areas.

[0126] It should be noted that the foregoing explanation of the embodiment of the surface anomaly detection method based on spatial frequency features and map features also applies to the surface anomaly detection device based on spatial frequency features and map features in this embodiment, and will not be repeated here.

[0127] The surface anomaly detection device based on spatial-frequency features and spectral features proposed in this application can effectively improve the efficiency and accuracy of anomaly feature extraction by acquiring a surface anomaly knowledge graph and single-scene hyperspectral imagery, combined with comprehensive spatial and frequency domain feature information. Secondly, by employing a channel attention mechanism for in-depth feature mining, high-attention features can be selected for different image scenes, thereby reducing feature redundancy and improving the accuracy and reliability of anomaly detection. Finally, by comprehensively utilizing the spatial-frequency domain anomaly feature index and the comprehensive spectral feature index, the comprehensiveness and accuracy of anomaly detection are enhanced, providing strong technical support for the timely detection and response to surface anomaly events.

[0128] Figure 13 A schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device may include:

[0129] The memory 1301, the processor 1302, and the computer program stored on the memory 1301 and executable on the processor 1302.

[0130] When the processor 1302 executes the program, it implements the surface anomaly detection method based on space frequency features and map features provided in the above embodiments.

[0131] Furthermore, electronic devices also include:

[0132] Communication interface 1303 is used for communication between memory 1301 and processor 1302.

[0133] The memory 1301 is used to store computer programs that can run on the processor 1302.

[0134] The memory 1301 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.

[0135] If the memory 1301, processor 1302, and communication interface 1303 are implemented independently, then the communication interface 1303, memory 1301, and processor 1302 can be interconnected via a bus to complete communication between them. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 13 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0136] Optionally, in a specific implementation, if the memory 1301, processor 1302, and communication interface 1303 are integrated on a single chip, then the memory 1301, processor 1302, and communication interface 1303 can communicate with each other through an internal interface.

[0137] The processor 1302 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application.

[0138] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the above-described method for detecting surface anomalies based on spatial frequency features and map features.

[0139] This application also provides a computer program, which, when executed, is used to implement the above-described surface anomaly detection method based on spatial frequency features and spectral features.

[0140] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0141] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0142] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or N executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.

[0143] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.

[0144] It should be understood that the various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, it can be implemented using any one or more of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0145] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.

[0146] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.

[0147] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of this application.

Claims

1. A method for detecting surface anomalies based on spatial frequency features and spectral features, characterized in that, Includes the following steps: Obtain a knowledge graph of surface anomalies; Acquire a single-scene hyperspectral image and determine at least one image scene of the single-scene hyperspectral image, and decompose the single-scene hyperspectral image into spatial and frequency domain integrated feature information, so as to construct a spatial and frequency domain anomaly feature index using the spatial and frequency domain integrated feature information; Based on the surface anomaly knowledge graph, a channel attention mechanism is used to deeply mine multiple features to select high attention features that meet preset conditions for different scenes of the at least one image scene, and construct a comprehensive index of map features for surface anomaly detection, so as to obtain anomaly detection results by using the spatial frequency domain anomaly feature index and the comprehensive index of map features. The step of acquiring a single-scene hyperspectral image, determining at least one image scene of the single-scene hyperspectral image, and decomposing the single-scene hyperspectral image into spatial and frequency domain integrated feature information to construct a spatial-frequency domain anomaly feature index using the spatial and frequency domain integrated feature information includes: reading the single-scene hyperspectral image; converting the single-scene hyperspectral image into a double-precision format image; iterating over each pixel of the image to calculate the outer product and average value of each band value of each pixel, and calculating the covariance matrix based on the outer product and average value of each band value of each pixel; calculating at least one eigenvalue and eigenvector of the covariance matrix, sorting at least one eigenvalue, determining multiple principal components, calculating the contribution rate of each eigenvalue, and finding the principal component whose cumulative contribution rate is greater than a preset threshold; determining the eigenvector corresponding to the principal component, reading the band values ​​of each pixel position and performing principal component transformation to obtain the matrix after principal component transformation; The process of acquiring a single-scene hyperspectral image, determining at least one image scene of the single-scene hyperspectral image, and decomposing the single-scene hyperspectral image into spatial and frequency domain integrated feature information to construct a spatial-frequency domain anomaly feature index using the spatial and frequency domain integrated feature information, further includes: normalizing the matrix after the principal component transformation, calling the discrete fractional Fourier transform function for each pixel of the matrix after the principal component transformation to calculate the entropy of each band, and assigning the maximum value to FrFE to obtain the corresponding order; iteratively processing the pixels, calling the function to perform discrete Fourier transform, calculating the feature vector matrix of DFRFT, using the feature vector matrix and the input vector to calculate the DFRFT to obtain the result data, and standardizing the result data.

2. The method according to claim 1, characterized in that, Also includes: Feedback data is generated using the spatial frequency domain anomaly characteristic index and the spectral characteristic comprehensive index; The feedback data is used to crop the image to mark abnormal areas.

3. A surface anomaly detection device based on spatial frequency characteristics and spectral characteristics, characterized in that, include: The acquisition module is used to acquire a knowledge graph of surface anomalies. A construction module is used to acquire a single-scene hyperspectral image, determine at least one image scene of the single-scene hyperspectral image, and decompose the single-scene hyperspectral image into spatial and frequency domain integrated feature information, so as to construct a spatial and frequency domain anomaly feature index using the spatial and frequency domain integrated feature information. The detection module is used to perform in-depth mining of multiple features based on the surface anomaly knowledge graph and using a channel attention mechanism to select high attention features that meet preset conditions for different scenes of the at least one image scene, and construct a comprehensive index of map features for surface anomaly detection, so as to obtain anomaly detection results by using the spatial frequency domain anomaly feature index and the comprehensive index of map features. The construction module includes: a reading unit for reading the single-scene hyperspectral image; a conversion unit for converting the single-scene hyperspectral image into a double-precision format image; a first calculation unit for iterating over each pixel of the image to calculate the outer product and average value of each pixel's band values, and calculating the covariance matrix based on the outer product and average value of each pixel's band values; a second calculation unit for calculating at least one eigenvalue and eigenvector of the covariance matrix, sorting the at least one eigenvalue to determine multiple principal components, calculating the contribution rate of each eigenvalue, and identifying the principal components whose cumulative contribution rate is greater than a preset threshold; and a principal component transformation unit for determining the eigenvector corresponding to the principal components, reading the band values ​​of each pixel position and performing principal component transformation to obtain the transformed matrix. The construction module includes: a normalization unit, used to normalize the matrix after principal component transformation, by calling the Discrete Fractional Fourier Transform (DFRFT) function on each pixel of the matrix after principal component transformation, calculating the entropy of each band, and assigning the maximum value to FrFE to obtain the corresponding order; and a standardization unit, used to iteratively process the pixels, call functions to perform Discrete Fourier Transform (DFRFT), calculate the feature vector matrix of DFRFT, use the feature vector matrix and the input vector to calculate the DFRFT result data, and standardize the result data.

4. An electronic device, characterized in that, include: The memory, the processor, and the computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the surface anomaly detection method based on spatial frequency features and map features as described in any one of claims 1-2.

5. A computer-readable storage medium having a computer program stored thereon, characterized in that, The program is executed by the processor to implement the surface anomaly detection method based on spatial frequency features and spectral features as described in any one of claims 1-2.

6. A computer program product, comprising a computer program, characterized in that, The computer program is executed to implement the surface anomaly detection method based on spatial frequency features and map features as described in any one of claims 1-2.

Citation Information

Patent Citations

  • Anomaly detection method based on FrFT and total variation regularization

    CN113537062A

  • Weighted sparse-based hyperspectral abnormal target detection method and system

    CN117333681A