A hyperspectral anomaly detection method based on registration
By using registration technology in hyperspectral images to extract and fuse local and global feature matrices for anomaly detection, the problem of low anomaly detection accuracy and high false alarm rate in hyperspectral images is solved, and more efficient abnormal target recognition is achieved.
Patent Information
- Application Number
- CN202410824230.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-25
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2044-06-25
AI Technical Summary
Anomaly detection in hyperspectral images is difficult to effectively separate anomalies and background, and existing methods ignore the structural relationship between pixels, resulting in low detection accuracy and high false alarm rate.
A registration-based hyperspectral anomaly detection method is used to enhance the data, extract local and global feature matrices, and perform first-order spatial point cloud registration operations to fuse local and global similarity matrices for anomaly detection.
It improves the accuracy of anomaly detection, reduces the false alarm rate, avoids assumptions about hyperspectral data distribution, and considers the spatial connection of data.
Smart Images

Figure CN118379295B
Abstract
Description
Technical Field
[0001] The invention relates to a hyperspectral anomaly detection method based on registration, and belongs to the technical field of hyperspectral image anomaly detection. Background Art
[0002] Unlike traditional remote sensing technology, hyperspectral imaging technology can simultaneously provide radiation, geometry and spectral information of ground objects. Hyperspectral images have almost continuous spectral information and can distinguish the spectral differences of ground objects in detail, so they have been widely used in various fields. As an important research direction in hyperspectral image processing, target detection can be divided into spectral matching detection and anomaly detection according to whether prior information is required. Spectral matching detection relies on prior information of the target spectral signal, while anomaly detection does not require any prior information about the target and finds abnormal targets based on spectral differences. In practical applications, it is often challenging to obtain prior information of the target spectrum. Therefore, anomaly detection has become an important task in hyperspectral image processing due to its practicality.
[0003] Anomalies in hyperspectral images usually refer to small targets with spectral characteristics different from those of the surrounding pixels. A direct way to identify such targets is to calculate the mean of the background and define the pixels farthest from the mean as anomalies. This approach is based on statistics and relies on strict assumptions about the distribution of background data. However, due to the complexity and nonlinearity of hyperspectral images, these assumptions often do not hold. To address this issue, some methods are committed to building background statistical models that are as consistent as possible with the true data distribution, while others use machine learning techniques for anomaly detection without making specific assumptions about the background distribution. However, these methods mainly rely on the feature vectors of pixels and ignore the structural relationship between pixels. In addition, the spectral variability of hyperspectral images makes the feature space unreliable and it is difficult to ensure the effective separation of anomalies from the background. In hyperspectral images, pixels are structurally related to each other, and more effective detection techniques should take this structural information into account. Therefore, it is necessary to propose a new method that considers the structural characteristics of pixels to improve the accuracy of hyperspectral anomaly target detection. Summary of the invention
[0004] The technical problem to be solved by the present invention is to provide a hyperspectral anomaly detection method based on registration, which can improve the anomaly detection accuracy and reduce the corresponding false alarm rate.
[0005] The present invention adopts the following technical solutions to solve the above technical problems:
[0006] A hyperspectral anomaly detection method based on registration includes the following steps:
[0007] Step 1, performing data enhancement on the original hyperspectral image to obtain an enhanced hyperspectral image;
[0008] Step 2, extracting the feature matrix of each pixel in the enhanced hyperspectral image, including the local source matrix, the global source matrix and the target matrix;
[0009] Step 3, the local source matrix and the global source matrix of each pixel are respectively subjected to a first-order spatial point cloud registration operation with the target matrix to obtain a local pixel similarity value and a global pixel similarity value; the local pixel similarity values of all pixels in the enhanced hyperspectral image form a local pixel similarity matrix, and the global pixel similarity values of all pixels form a global pixel similarity matrix;
[0010] Step 4: Use the local pixel similarity matrix and the global pixel similarity matrix to perform anomaly detection on the original hyperspectral image respectively, obtain a local detection result map and a global detection result map, fuse the local detection result map and the global detection result map to obtain the final anomaly detection result.
[0011] As a preferred solution of the present invention, the data enhancement in step 1 is to perform a mirror flip operation on the original hyperspectral image, and the specific process is as follows:
[0012] Step 1.1, set the size of the original hyperspectral image to A×B×C, where A, B and C are the height, width and dimension of the original hyperspectral image respectively, set the zero matrix DATA, the size of DATA is 3A×3B×C, copy the original hyperspectral image to the central area of DATA, that is, copy the original hyperspectral image to the A+1th row to the 2Ath row and the B+1th column to the 2Bth column of DATA;
[0013] Step 1.2, flip the central area data horizontally to the left half of DATA, that is, flip the central area data to the A+1th row to the 2Ath row and the 1st column to the Bth column of DATA;
[0014] Step 1.3, based on step 1.2, flip the central area data horizontally to the right half of DATA, that is, flip the central area data to the A+1th row to the 2Ath row and the 2B+1th column to the 3Bth column of DATA;
[0015] Step 1.4, vertically flip the A+1th row to the 2Ath row of the matrix obtained in step 1.3 upward, that is, copy the A+1th row to the 2Ath row of the matrix obtained in step 1.3 to the row from Ath row to 1st row, and all columns and depth remain unchanged;
[0016] Step 1.5, vertically flip the A+1th row to the 2Ath row of the matrix obtained in step 1.3 downward, that is, copy the A+1th row to the 2Ath row of the matrix obtained in step 1.3 to the 3Ath row to the 2A+1th row, and all columns and depth remain unchanged;
[0017] Step 1.6, for the matrix obtained through steps 1.4 and 1.5, delete the Ath row, the 2A+1th row, the Bth column, and the 2B+1th column to obtain an enhanced hyperspectral image.
[0018] As a preferred solution of the present invention, in step 2, the specific process of extracting the feature matrix of each pixel in the enhanced hyperspectral image is as follows:
[0019] Step 2.1, extract the local source matrix
[0020] Step 2.1.1, taking the pixel point of the feature matrix to be extracted as the center, setting the window size to a, and selecting a multi-channel matrix of size a×a×C;
[0021] Step 2.1.2, rearrange the outer boundary pixel elements of the multi-channel matrix selected in step 2.1.1 into a size of New multi-channel matrix;
[0022] Step 2.1.3, add the pixel points of the feature matrix to be extracted to the last row of the new multi-channel matrix obtained in step 2.1.2 to form A multi-channel matrix of size, i.e., a local source matrix;
[0023] Step 2.2, extract the global source matrix
[0024] Step 2.2.1: Use the RX outlier detection algorithm to select the background of the original hyperspectral image and select the one with the lowest outlier value. pixels as the background, forming Multi-channel matrices of size;
[0025] Step 2.2.2, add the pixel points of the feature matrix to be extracted to the last row of the multi-channel matrix formed in step 2.2.1, forming A multi-channel matrix of size, i.e., the global source matrix;
[0026] Step 2.3, extract the target matrix
[0027] Step 2.3.1, with the pixel point of the feature matrix to be extracted as the center, the window size is a, and a multi-channel matrix of size a×a×C is selected;
[0028] Step 2.3.2, set a window of size w, take each pixel point on the outer boundary of the multi-channel matrix selected in step 2.3.1 as the center, calculate the mean of all pixels in the range of w×w×C around the center, and form Multi-channel matrices of size;
[0029] Step 2.3.3, taking the pixel point of the feature matrix to be extracted as the center, calculate the mean of all the pixels in the range of w×w×C around it, and add the mean to the last row of the multi-channel matrix formed in step 2.3.2 to form A multi-channel matrix of size , i.e., the target matrix.
[0030] As a preferred solution of the present invention, in step 3, the local source matrix and the global source matrix of each pixel are respectively subjected to a first-order spatial point cloud registration operation with the target matrix to obtain a local pixel similarity value and a global pixel similarity value. The specific process is as follows:
[0031] Step 3.1, set the local source matrix or global source matrix to , the target matrix is ;
[0032] Step 3.2, calculate the matrix The Euclidean distance between two channels is a symmetric matrix with zero diagonals. ; Calculate the matrix The Euclidean distance between two channels is a symmetric matrix with zero diagonals. ;
[0033] Step 3.3, calculate the symmetric matrix With symmetric matrix The absolute value of the difference between two elements in the same position in , resulting in a symmetric matrix , that is, the symmetric matrix The elements are:
[0034] ,
[0035] in, Represents a symmetric matrix No. i Line j The elements of the column, Represents the matrix S channel and The Euclidean distance between Represents the channels in matrix T and The Euclidean distance between
[0036] Step 3.4, use the Gaussian function to the symmetric matrix The elements of are weighted to obtain a new matrix , and calculate The sum of all elements in , that is:
[0037] ,
[0038] in,Sum express The sum of all elements in , that is, the local pixel similarity value or the global pixel similarity value; represents a Gaussian function.
[0039] As a preferred solution of the present invention, the specific process of step 4 is as follows:
[0040] Step 4.1, normalizing the local pixel similarity matrix and the global pixel similarity matrix respectively to obtain a normalized local pixel similarity matrix R1 and a normalized global pixel similarity matrix R2;
[0041] Step 4.2, calculate the difference between R1 and R2 to obtain the error matrix R3;
[0042] Step 4.3, remove the elements greater than or equal to zero in the error matrix R3, retain the negative elements, obtain the matrix R4, calculate the sum of R2 and R4, and obtain the corrected matrix R5;
[0043] Step 4.4, calculate the sum of R1 and R5 to obtain the fused result matrix R6;
[0044] In step 4.5, the matrix R6 is normalized, and then the normalized matrix is used for anomaly detection to obtain the final anomaly detection result.
[0045] A computer device comprises a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the processor implements the steps of the registration-based hyperspectral anomaly detection method when executing the computer program.
[0046] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the registration-based hyperspectral anomaly detection method are implemented.
[0047] Compared with the prior art, the present invention adopts the above technical solution and has the following technical effects:
[0048] 1. The present invention applies the idea of image registration to hyperspectral anomaly detection. The main core idea is to regard two pixels as two pictures, perform registration operations on the two pixels, and consider the spatial and spectral structure information of the hyperspectral image at the same time. It also provides a new idea for hyperspectral anomaly detection by fusing the overall information of the image and the local information of the pixel points.
[0049] 2. By combining registration with hyperspectral anomaly detection, the present invention not only avoids the Gaussian assumption about the distribution of hyperspectral data, but also reduces the pollution of background statistics caused by anomalies. At the same time, it also takes into account the spatial connection of hyperspectral data, which can effectively improve the accuracy of anomaly detection and reduce the false alarm rate. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 It is a flow chart of a hyperspectral anomaly detection method based on registration of the present invention;
[0051] Figure 2 is a pseudo-camouflage image of the Pavia City data set used in the detection method of the present invention;
[0052] Figure 3 is the ground truth map of the Pavia City dataset used by the detection method of the present invention;
[0053] Figure 4 is the ROC curve graph of the Pavia City data set used in the detection method of the present invention;
[0054] Figure 5 3 and 4, which are detection result diagrams comparing the Pavia City dataset used in the detection method of the present invention with other methods, wherein (a) is the true value diagram, (b) is the GRX algorithm, (c) is the LRX algorithm, (d) is the LKRX algorithm, (e) is the CRD algorithm, (f) is the LSMAD algorithm, (g) is the LAD algorithm, and (h) is the method proposed in the present invention. DETAILED DESCRIPTION
[0055] The embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be interpreted as limiting the present invention.
[0056] like Figure 1 As shown, the present invention provides a hyperspectral anomaly detection method based on registration, comprising the following steps:
[0057] S1, input hyperspectral image data and perform data enhancement;
[0058] In step S1, data enhancement is performed by mirroring the hyperspectral data, as follows: Assuming that the size of the hyperspectral data is A×B×C, where A is the height of the hyperspectral image, B is the width of the hyperspectral image, and C is the dimension of the hyperspectral image, it is mirrored and flipped into a new data block of size (3A-2) ×(3B-2) ×C, as follows (assuming a new zero matrix DATA, size 3A×3B×C):
[0059] S1.1, copy the input data to the central area of the zero matrix DATA, that is, copy the input data to the A+1th row to the 2Ath row and the B+1th column to the 2Bth column of the zero matrix DATA;
[0060] S1.2, flip the input data horizontally to the left half of the zero matrix, that is, flip the input data to the A+1th row to the 2Ath row and the 1st column to the Bth column of the zero matrix DATA;
[0061] S1.3, flip the input data horizontally to the right half of the zero matrix, that is, flip the input data to the A+1th row to the 2Ath row and the (2B+1)th column to the 3Bth column of the zero matrix DATA;
[0062] S1.4, vertically flip the (A+1)th row to the 2Ath row of the data matrix DATA upward, that is, copy the (A+1)th row to the 2Ath row of the data matrix DATA to the Ath row to the 1st row, and all columns and depths remain unchanged;
[0063] S1.5, vertically flip the A+1th row to the 2Ath row of the data matrix DATA downward, that is, copy the (A+1)th row to the 2Ath row of the data matrix DATA to the 3Ath row to the (2A+1th row), and all columns and depths remain unchanged;
[0064] S1.6. Delete the Ath row, (2A+1)th row, Bth column, and (2B+1)th column of the data matrix DATA; the reason for deleting these rows and columns is that the pixels on these rows and columns are repeated at the boundaries with the original hyperspectral data, and these repetitions will affect the subsequent window selection.
[0065] S2, extracting the feature matrix of the preprocessed hyperspectral data, including a local source matrix, a global source matrix and a target matrix;
[0066] In step S2, the feature matrix of the preprocessed hyperspectral data is extracted, as follows (assuming that the size of the hyperspectral image data is A×B×C, where A is the height of the hyperspectral image, B is the width of the hyperspectral image, and C is the dimension of the hyperspectral image, taking a pixel to be measured as an example):
[0067] S2.1. Extracting the local source matrix
[0068] S2.1.1, with the pixel to be measured as the center and the window size as a, a multi-channel matrix of size a×a×C is selected;
[0069] S2.1.2, rearrange the outer boundary pixel elements of the a×a×C multi-channel matrix into a size of New multi-channel matrix;
[0070] S2.1.3, add the pixel to be tested to the last row of the above multi-channel matrix, forming Multi-channel matrix;
[0071] Because the multi-channel matrix The channel elements are the pixel elements around the pixel, so the multi-channel matrix is called a local source matrix.
[0072] S2.2. Extracting the global source matrix
[0073] S2.2.1. Use the classic RX algorithm in hyperspectral anomaly detection to select the background of the hyperspectral image data and select the one with the lowest outlier value. pixels as background;
[0074] S2.2.2. Add the pixel to be tested to the last row of the above multi-channel matrix to form Multi-channel matrix;
[0075] Because the multi-channel matrix The channel elements can be regarded as selected from the entire image and are not limited to the area around the pixel to be tested, so the multi-channel matrix is called the global source matrix.
[0076] S2.3. Extracting the target matrix
[0077] S2.3.1, with the pixel to be measured as the center and the window size as a, a multi-channel matrix of size a×a×C is selected;
[0078] S2.3.2. Design a window of size w, calculate the mean of w×w×C around the outer boundary pixel point of the multi-channel matrix a×a×C, and form Multi-channel matrix;
[0079] S2.3.3, taking the pixel to be measured as the center, calculate the mean of the surrounding w×w×C, and add it to the last row of the above multi-channel matrix to form a new Multi-channel matrix;
[0080] Because the multi-channel matrix needs to operate with the global and local source matrices, the multi-channel matrix is called the target matrix.
[0081] S3, inputting the global source matrix, the local source matrix and the target matrix into the SC algorithm respectively, that is, performing first-order spatial point cloud registration operation on the global source matrix, the local source matrix and the target matrix respectively, and obtaining two hyperspectral data pixel point measurement values, namely, local pixel point similarity value and global pixel point similarity value;
[0082] In step S3, the global source matrix and the local source matrix are respectively subjected to the first-order spatial point cloud registration operation with the target matrix, namely, the SC algorithm, which is specifically as follows (assuming that the hyperspectral image data is A×B×C, where A is the height of the hyperspectral image, B is the width of the hyperspectral image, and C is the dimension of the hyperspectral image, and the following operation is performed on each pixel):
[0083] S3.1 Input Multi-channel matrix;
[0084] S3.2 Calculation The Euclidean distance between two channels of a multi-channel matrix is used to obtain a symmetric matrix with zero diagonals. ;calculate The Euclidean distance between two channels of a multi-channel matrix is used to obtain a symmetric matrix with zero diagonals. ;
[0085] S3.4. Calculate the symmetric matrix With symmetric matrix The absolute value of the difference between ;
[0086] ,
[0087] S3.3. Using Gaussian function for symmetric matrix weighting;
[0088] ,
[0089] S3.5. Calculate the weighted symmetric matrix The sum of all elements of Sum ;
[0090] ,
[0091] in, express Matching point channels in the matrix; represents a monotonically decreasing kernel function; represents the Euclidean distance; Sum The value is the pixel similarity value.
[0092] The pixel similarity values are local pixel similarity values and global pixel similarity values. The local pixel similarity value is calculated by the local source matrix and target matrix of each pixel through the SC algorithm. The physical meaning of the local pixel similarity value indicates the similarity between the pixel and the pixels around it; the global pixel similarity value is calculated by the global source matrix and target matrix of each pixel through the SC algorithm. The physical meaning of the global pixel similarity value indicates the similarity between the pixel and the background pixels selected by the classical algorithm used, which indicates the similarity between the pixel and the background of the entire hyperspectral image.
[0093] Using the SC algorithm Sum The value weights each pixel. Sum The value represents the sum of the feature differences between all channels in the two matrices of the pixel. A smaller value indicates a higher similarity between the two matrices, that is, the smaller the outlier value of the pixel to be tested is, the higher the possibility that the pixel is an outlier, and vice versa.
[0094] S4, performing anomaly detection on the hyperspectral image by using the obtained pixel similarity values, obtaining a global detection result map and a local detection result map, and fusing the global and local detection result maps to obtain a final anomaly detection result;
[0095] In step S4, anomaly detection is performed on the hyperspectral image by using the obtained pixel similarity value, that is, anomaly detection is performed using the local pixel similarity value and the global pixel similarity value, thereby obtaining a global detection result map and a local detection result map, and then the global and local detection result maps are fused to obtain a final result detection map. The steps are as follows:
[0096] S4.1, normalizing the obtained local pixel similarity matrix R1 and the global pixel similarity matrix R2;
[0097] S4.2, calculating the difference between the normalized R1 and R2, and obtaining the error matrix R3;
[0098] S4.3, remove the part greater than or equal to zero in the error matrix R3, keep the negative part, calculate the sum of R2 and R3, and obtain the corrected R2 matrix;
[0099] S4.4, calculate the sum of the normalized R1 and the corrected R2 to obtain the fused final result matrix R4;
[0100] S4.5. Normalize the result matrix R4, and then use the normalized R4 for anomaly detection, that is, calculate the area under the ROC curve to evaluate the performance of anomaly detection.
[0101] The method to evaluate the anomaly detection performance of the algorithm is to calculate the area under the ROC curve (AUC), which is as follows:
[0102] a. Input two matrices: result and map. Result stores the algorithm result; map is the ground truth mask matrix, which contains the positions of the real abnormal targets and normal background in the image. It has the same size as result and is used to indicate whether each result point is normal, 0 for normal and 1 for abnormal;
[0103] b. Calculate the maximum value in the result matrix and generate 5000 thresholds between 0 and the maximum value, which are stored in the variable taus. These thresholds are used to traverse the detection results to determine the anomaly detection effect under different thresholds.
[0104] c. Get r0 and mask vector by flattening the result and map matrices into one-dimensional vectors, and convert the mask vector to logical type;
[0105] d. Use a loop to traverse each threshold tau in taus:
[0106] 1) According to the current tau value, mark the part of the result vector r0 that is greater than tau as abnormal;
[0107] 2) Calculate the false positive rate (PF) and true positive rate (PD) under the current tau: the false positive rate (PF) is the proportion of normal backgrounds that are misjudged as abnormal; the true positive rate (PD) is the proportion of abnormal targets that are correctly detected;
[0108] e. Use the trapezoidal integration method to calculate the area between PD and PF and obtain the AUC value.
[0109] In one embodiment of the present invention, the hyperspectral image anomaly detection method is specifically as follows:
[0110] In step S1, data enhancement is performed by mirroring the hyperspectral data. The Pavia City hyperspectral data space used is 150×150, the band range is 0.43-0.86μm, and there are 102 bands. It is mirrored into a new data block of size 448×448×102, which is as follows (assuming a new zero matrix DATA, the size is 450×450×102):
[0111] S1.1, copy the input data to the central area of the zero matrix DATA, that is, copy the input data to the 151st row to the 300th row and the 151st column to the 300th column of the zero matrix DATA;
[0112] S1.2, flip the input data horizontally to the left half of the zero matrix, that is, flip the input data to the 151st row to the 300th row and the 1st column to the 150th column of the zero matrix DATA;
[0113] S1.3, flip the input data horizontally to the right half of the zero matrix, that is, flip the input data to the 151st row to the 300th row and the 301st column to the 450th column of the zero matrix DATA;
[0114] S1.4, vertically flip the 151st to 300th rows of the data matrix DATA upward, that is, copy the 151st to 300th rows of the matrix data matrix DATA to the 150th to 1st rows, and all columns and depths remain unchanged;
[0115] S1.5, vertically flip the 151st to 300th rows of the data matrix DATA downward, that is, copy the 151st to 300th rows of the data matrix DATA to the 450th to 301st rows, and all columns and depths remain unchanged;
[0116] S1.6. Delete the 150th row, 301st row, 150th column and 301st column of the data matrix DATA; the reason for deleting these rows and columns is that the pixels on these rows and columns are repeated at the boundaries with the original hyperspectral data, and these repetitions will affect the subsequent window selection.
[0117] In step S2, the feature matrix of the preprocessed hyperspectral data is extracted, as follows (the following operation is performed for each pixel):
[0118] S2.1. Extracting the local source matrix
[0119] S2.1.1, with the pixel to be measured as the center and the window size as 3, a multi-channel matrix of size 3×3×102 is selected;
[0120] S2.1.2, rearrange the outer boundary pixel elements of the 3×3×102 multi-channel matrix into a new multi-channel matrix of size 8×1×102;
[0121] S2.1.3. Add the pixels to be measured to the last row of the above multi-channel matrix to form a 9×1×102 multi-channel matrix.
[0122] S2.2. Extracting the global source matrix
[0123] S2.2.1. Use the classic RX algorithm in hyperspectral anomaly detection to select the background of the hyperspectral image data, and select the 8 pixels with the lowest outlier value as the background;
[0124] S2.2.2. Add the pixels to be measured to the last row of the above multi-channel matrix to form a 9×1×102 multi-channel matrix.
[0125] S2.3. Extracting the target matrix
[0126] S2.3.1, with the pixel to be measured as the center and the window size as 3, a multi-channel matrix of size 3×3×102 is selected;
[0127] S2.3.2. Design a window of size 3, calculate the mean of 3×3×102 pixels around the outer boundary pixel point of the 3×3×102 multi-channel matrix as the center, and form a 9×1×102 multi-channel matrix;
[0128] S2.3.3. Taking the pixel to be measured as the center, calculate the mean of the 3×3×102 surrounding pixels and add it to the last row of the above multi-channel matrix to form a new 9×1×102 multi-channel matrix.
[0129] In order to better demonstrate the advantages of the registration-based hyperspectral anomaly detection method (READ) of the present invention, the detection method of the present invention is compared with several existing advanced detection algorithms.
[0130] The comparison method is: abnormal target detection is performed on the real hyperspectral image Pavia City, and the detection accuracy that can be achieved by each method is compared. The detection accuracy is measured using the receiver operating characteristic (ROC) and the area under the curve (AUC), where the ROC curve represents the corresponding relationship between the false alarm rate and the detection rate of each threshold segmentation result, and the AUC value is obtained by calculating the area under the ROC curve of the anomaly detector. Under the same false alarm rate, the higher the AUC value, the higher the detection performance. The hyperspectral image used includes a spatial pixel number of 150×150, and the background mainly includes beaches, roads, and sea surfaces. The six cars on the road are considered to be abnormal targets. The pseudo-camouflage image of the hyperspectral image used is shown in Figure 2 As shown in the figure, the ground truth image is Figure 3 The detailed information is shown in Table 1.
[0131] Table 1
[0132]
[0133] Table 2 shows the AUC comparison of the anomaly detection results of each method. Figure 4 is the ROC curve of the abnormality detection result of the method of the present invention, Figure 5 The label graphs of the anomaly detection results of each method are compared, where (a) is the true value graph, (b) is the GRX algorithm, (c) is the LRX algorithm, (d) is the LKRX algorithm, (e) is the CRD algorithm, (f) is the LSMAD algorithm, (g) is the LAD algorithm, and (h) is the method of the present invention (READ). It can be seen from the results that the method proposed in the present invention has better detection performance than the other methods.
[0134] Table 2
[0135]
[0136] Based on the same inventive concept, an embodiment of the present application provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the aforementioned registration-based hyperspectral anomaly detection method are implemented.
[0137] Based on the same inventive concept, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of the aforementioned registration-based hyperspectral anomaly detection method are implemented.
[0138] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0139] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0140] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0141] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0142] The above embodiments are only for illustrating the technical idea of the present invention, and cannot be used to limit the protection scope of the present invention. Any changes made on the basis of the technical solution in accordance with the technical idea proposed by the present invention shall fall within the protection scope of the present invention.
Claims
1. A hyperspectral anomaly detection method based on registration, characterized in that: The steps include: Step 1, performing data enhancement on the original hyperspectral image to obtain an enhanced hyperspectral image; Step 2: extract the feature matrix of each pixel in the enhanced hyperspectral image, including the local source matrix, the global source matrix and the target matrix; the specific process is as follows: Step 2.1, extract the local source matrix Step 2.1.1, taking the pixel point of the feature matrix to be extracted as the center, setting the window size to a, and selecting a multi-channel matrix of size a×a×C; Step 2.1.2, rearrange the outer boundary pixel elements of the multi-channel matrix selected in step 2.1.1 into a size of [a 2 -(a-2) 2 ]×1×C new multi-channel matrix; Step 2.1.3, add the pixel points of the feature matrix to be extracted to the last row of the new multi-channel matrix obtained in step 2.1.2 to form [a 2 -(a-2) 2 +1]×1×C size multi-channel matrix, that is, the local source matrix; Step 2.2, extract the global source matrix Step 2.2.1: Use the RX outlier detection algorithm to select the background of the original hyperspectral image and select the one with the lowest outlier value [a 2 -(a-2) 2 ] pixels as the background, forming [a 2 -(a-2) 2 ]×1×C multi-channel matrix; Step 2.2.2, add the pixel points of the feature matrix to be extracted to the last row of the multi-channel matrix formed in step 2.2.1 to form [a 2 -(a-2) 2 +1]×1×C multi-channel matrix, i.e., the global source matrix; Step 2.3, extract the target matrix Step 2.3.1, with the pixel point of the feature matrix to be extracted as the center, the window size is a, and a multi-channel matrix of size a×a×C is selected; Step 2.3.2, set a window of size w, take each pixel point on the outer boundary of the multi-channel matrix selected in step 2.3.1 as the center, calculate the mean of all pixels in the range of w×w×C around the center, and form [a 2 -(a-2) 2 ]×1×C multi-channel matrix; Step 2.3.3, taking the pixel of the feature matrix to be extracted as the center, calculate the mean of all the pixels in the range of w×w×C around it, and add the mean to the last row of the multi-channel matrix formed in step 2.3.2 to form [a 2 -(a-2) 2 +1]×1×C multi-channel matrix, i.e., the target matrix; Step 3, the local source matrix and the global source matrix of each pixel are respectively subjected to a first-order spatial point cloud registration operation with the target matrix to obtain a local pixel similarity value and a global pixel similarity value; the local pixel similarity values of all pixels in the enhanced hyperspectral image form a local pixel similarity matrix, and the global pixel similarity values of all pixels form a global pixel similarity matrix; Step 4: Use the local pixel similarity matrix and the global pixel similarity matrix to perform anomaly detection on the original hyperspectral image, obtain a local detection result map and a global detection result map, fuse the local detection result map and the global detection result map to obtain the final anomaly detection result; the specific process is as follows: Step 4.1, normalizing the local pixel similarity matrix and the global pixel similarity matrix respectively to obtain a normalized local pixel similarity matrix R1 and a normalized global pixel similarity matrix R2; Step 4.2, calculate the difference between R1 and R2 to obtain the error matrix R3; Step 4.3, remove the elements greater than or equal to zero in the error matrix R3, retain the negative elements, obtain the matrix R4, calculate the sum of R2 and R4, and obtain the corrected matrix R5; Step 4.4, calculate the sum of R1 and R5 to obtain the fused result matrix R6; In step 4.5, the matrix R6 is normalized, and then the normalized matrix is used for anomaly detection to obtain the final anomaly detection result.
2. The hyperspectral anomaly detection method based on registration according to claim 1, characterized in that: The data enhancement in step 1 is to perform a mirror flip operation on the original hyperspectral image. The specific process is as follows: Step 1.1, set the size of the original hyperspectral image to A×B×C, where A, B and C are the height, width and dimension of the original hyperspectral image respectively, set the zero matrix DATA, the size of DATA is 3A×3B×C, copy the original hyperspectral image to the central area of DATA, that is, copy the original hyperspectral image to the A+1th row to the 2Ath row and the B+1th column to the 2Bth column of DATA; Step 1.2, flip the central area data horizontally to the left half of DATA, that is, flip the central area data to the A+1th row to the 2Ath row and the 1st column to the Bth column of DATA; Step 1.3, based on step 1.2, flip the central area data horizontally to the right half of DATA, that is, flip the central area data to the A+1th row to the 2Ath row and the 2B+1th column to the 3Bth column of DATA; Step 1.4, vertically flip the A+1th row to the 2Ath row of the matrix obtained in step 1.3 upward, that is, copy the A+1th row to the 2Ath row of the matrix obtained in step 1.3 to the row from Ath row to 1st row, and all columns and depth remain unchanged; Step 1.5, vertically flip the A+1th row to the 2Ath row of the matrix obtained in step 1.3 downward, that is, copy the A+1th row to the 2Ath row of the matrix obtained in step 1.3 to the 3Ath row to the 2A+1th row, and all columns and depth remain unchanged; Step 1.6, for the matrix obtained through steps 1.4 and 1.5, delete the Ath row, the 2A+1th row, the Bth column, and the 2B+1th column to obtain an enhanced hyperspectral image.
3. The hyperspectral anomaly detection method based on registration according to claim 1, characterized in that: In step 3, the local source matrix and the global source matrix of each pixel are respectively subjected to a first-order spatial point cloud registration operation with the target matrix to obtain a local pixel similarity value and a global pixel similarity value. The specific process is as follows: Step 3.1, set the local source matrix or the global source matrix to S and the target matrix to T; Step 3.2, calculate the Euclidean distance between each pair of channels of the matrix S, and obtain a symmetric matrix s with zero diagonals; calculate the Euclidean distance between each pair of channels of the matrix T, and obtain a symmetric matrix t with zero diagonals; Step 3.3, calculate the absolute value of the difference between the two elements in the same position in the symmetric matrix s and the symmetric matrix t, and obtain the symmetric matrix c, that is, the elements of the symmetric matrix c are: c ij =|d(s i ,s j )-d(t i ,t j )| Among them, c ij represents the element in the i-th row and j-th column of the symmetric matrix c, d(s i ,s j ) represents the matrix S channel s i With s j The Euclidean distance between i ,t j ) represents channel t in matrix T i With t j The Euclidean distance between Step 3.4, use the Gaussian function to weight the elements of the symmetric matrix c, obtain the new matrix c*, and calculate the sum of all elements in c*, that is: Where Sum represents the sum of all elements in c*, that is, the local pixel similarity value or the global pixel similarity value; φ(·) represents the Gaussian function.
4. A computer device comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, characterized in that: When the processor executes the computer program, the steps of the registration-based hyperspectral anomaly detection method according to any one of claims 1 to 3 are implemented.
5. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the registration-based hyperspectral anomaly detection method according to any one of claims 1 to 3 are implemented.
Citation Information
Patent Citations
Improved hyperspectral RX abnormal detection method by utilization of complementary information
CN103456011A
A hyperspectral image super-resolution forming method and system based on spectral fidelity
CN108537728A
Hyperspectral image anomaly detection method
CN118135205A
Method and system for detecting an anomaly within a biological tissue
EP3920139A1
Independent covariance estimation and decontamination
US9466122B1
