Hyperspectral anomaly detection method, device and equipment and readable storage medium
This hyperspectral anomaly detection method, which combines matrix factorization and wavelet tight frame transform, solves the problems of high computational complexity and poor visual effects in hyperspectral anomaly detection, achieving efficient anomaly detection and detail preservation.
Patent Information
- Application Number
- CN202310015909.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-05
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2043-01-05
AI Technical Summary
Existing hyperspectral anomaly detection methods have shortcomings in terms of computational cost and visual effect, especially due to the high complexity caused by computational singular value decomposition and the staircase artifact problem caused by total variation regularization.
We employ a combination of matrix decomposition and wavelet compact frame transform, using the alternating direction multiplier method for optimization to avoid direct calculation of singular value decomposition, and using wavelet compact frame constraints to preserve image details and geometric features.
It reduces computational complexity, improves the efficiency and effectiveness of anomaly detection, eliminates staircase artifacts, and preserves the details and geometric features of hyperspectral images.
Smart Images

Figure CN116071646B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image processing, and in particular to a hyperspectral anomaly detection method, device and equipment and a readable storage medium. BACKGROUND
[0002] As a three-dimensional image data, the hyperspectral remote sensing image is applied in many important fields, such as city detection, military reconnaissance, mineral exploration, etc. In these applications, the research on the hyperspectral anomaly detection algorithm has always occupied an important position. The traditional hyperspectral anomaly detection method mainly models the background part based on the statistical theory, but in the actual situation, due to the large gap between the distribution of the real hyperspectral image data and the background model assumption and the noise mixed in, it is difficult to accurately model the background part. In addition, since the minimization of the matrix rank has a global constraint, it can well represent the low rank of the background part of the hyperspectral image, so the matrix low rank sparse model is often used as the hyperspectral anomaly detection, and the abnormal pixels in the image often only account for a small part of the whole image, and have a certain sparsity. How to fully utilize the properties of the hyperspectral image and improve the constraint on the background is an important research direction to improve the model effect.
[0003] At present, most of the hyperspectral anomaly detection methods describe the low rank characteristics of the background part by using the nuclear norm, the weighted nuclear norm or the nonconvex matrix rank approximation. These methods need to calculate the singular value decomposition (SVD) in the optimization process, resulting in high cost. In addition to the above-mentioned background constraint methods, the total variation regularization model is a commonly used model in image processing, which can smooth the image while protecting the edge information. However, it will cause the appearance of staircase artifacts in the image, which cannot well preserve the details and geometric features of the background part, and seriously affects the visual effect of the image. SUMMARY
[0004] Therefore, it is necessary to propose a hyperspectral anomaly detection method, device and equipment and a readable storage medium in view of the above problems.
[0005] In a first aspect, the present application provides a hyperspectral anomaly detection method, which comprises:
[0006] acquiring an input image, the input image being a three-dimensional hyperspectral image;
[0007] The three-dimensional hyperspectral image is matrixed to obtain a two-dimensional hyperspectral image;
[0008] The two-dimensional hyperspectral image is decomposed into a background part and an anomaly part, a target function is constructed based on low-rank matrix decomposition and wavelet tight frame constraint on the background part;
[0009] The target function is solved based on an alternating direction multiplier method to obtain the anomaly part.
[0010] In some embodiments, the expression of the three-dimensional hyperspectral image is:
[0011]
[0012] wherein, is the three-dimensional hyperspectral image, m and n are spatial dimensions of the three-dimensional hyperspectral image, p is a spectral dimension of the three-dimensional hyperspectral image, and R is a real number set;
[0013] The three-dimensional hyperspectral image is matrixed to obtain a two-dimensional hyperspectral image, including:
[0014] The three-dimensional hyperspectral image is unfolded according to the spectral dimension to obtain the two-dimensional hyperspectral image;
[0015] The expression of the two-dimensional hyperspectral image is:
[0016] Y∈R p×mn
[0017] wherein Y is the two-dimensional hyperspectral image.
[0018] In some embodiments, after the two-dimensional hyperspectral image is decomposed into a background part and an anomaly part, the expression of the two-dimensional hyperspectral image is:
[0019] Y=L+S
[0020] wherein L∈R p×mn is the background part, S∈R p×mn is the anomaly part;
[0021] The target function is constructed based on low-rank matrix decomposition and wavelet tight frame constraint on the background part, including:
[0022] The background part is subjected to low-rank matrix decomposition to obtain:
[0023] L=AX
[0024] wherein A∈R p×r is a randomly generated matrix, r is a preset value satisfying r<<min(p, mn), and X∈R r×mnto represent the coefficients;
[0025] constructing an objective function, an expression of the objective function being:
[0026]
[0027] where s.t. represents a constraint condition, W is a wavelet tight frame transformation matrix, a value of W is a fixed value, WX is a representation coefficient of an image in a wavelet tight frame transformation domain, ||WX||1 represents a regular term of WX, ||S||1 represents an L1 norm of S, and ||Y||1 represents an L1 norm of Y. 2,1 represents an L21 norm of S, min A,X,S ||WX||1+λ||S|| 2,1 represents that, under the condition that the constraint condition Y = AX + S is met, ||WX||1+λ||S|| 2,1 is minimized, A, X, and S.
[0028] In some embodiments, the solving the objective function based on the alternating direction method of multipliers obtains an abnormal part, including:
[0029] introducing an additional variable, an expression of the additional variable being:
[0030] U = WX
[0031] where U is the additional variable;
[0032] based on the additional variable, the expression of the objective function can be transformed into:
[0033]
[0034] based on an augmented Lagrangian function, the above formula is transformed into an unconstrained optimization function:
[0035]
[0036] where Q1 and Q2 are Lagrange multipliers, μ is a penalty parameter, <Q1, U-WX> and <Q2, Y-AX-S> represent inner products of Q1 and U-WX and Q2 and Y-AX-S, respectively, represents a sum of absolute value squares of elements, and λ is a regularization parameter;
[0037] variables A, S, U, and X are iteratively updated by the alternating direction method of multipliers until a convergence condition is met, and the abnormal part is obtained.
[0038] In some embodiments, the iteratively updating variables A, S, U, and X by the alternating direction method of multipliers until the abnormal part is obtained after an algorithm termination condition is met, including:
[0039] Updating variable A, fixing S, U and X, extracting the terms containing variable A in the unconstrained optimization function and extracting common terms, we get:
[0040]
[0041] Solving the derivative of A and setting the derivative of A to zero, we get the closed solution of variable A:
[0042]
[0043] Updating variable S, fixing A, U and X, extracting the terms containing variable S in the unconstrained optimization function and extracting common terms, we get:
[0044]
[0045] By l 2,1 The minimization operator solves the above formula to get the closed solution of variable S:
[0046]
[0047] Where, Ω represents l 2,1 Minimization operator;
[0048] Updating variable U, fixing A, S and X, extracting the terms containing variable U in the unconstrained optimization function and extracting common terms, we get:
[0049]
[0050] By soft threshold shrinkage operator, we get the closed solution of variable U:
[0051]
[0052] Where, soft is the soft threshold shrinkage operator;
[0053] Updating variable X, fixing A, S and U, extracting the terms containing variable X in the unconstrained optimization function and extracting common terms, we get:
[0054]
[0055] Solving the derivative of X and setting the derivative of X to zero, we get the closed solution of variable X:
[0056]
[0057] Updating the Lagrange multiplier and the penalty parameter, repeating the above steps until the convergence condition is met, and terminating the calculation, we get and output the abnormal part that meets the convergence condition.
[0058] In some embodiments, the updated Lagrange multipliers are Q1+μ(U-WX) and Q2+μ(Y-AX-S), and the updated penalty parameter is min(ρμ,μ max ); wherein ρ and μ max are preset parameter values, ρ is used to accelerate convergence, and μ max is the maximum value of the penalty parameter.
[0059] In some embodiments, the convergence condition is:
[0060] ||U-WX|| ∞ <∈
[0061] ||Y-AX-S|| ∞ <∈
[0062] Wherein ∈ is a preset value.
[0063] In a second aspect, the present application further provides a hyperspectral anomaly detection device, which comprises:
[0064] An acquisition module, configured to acquire an input image, wherein the input image is a three-dimensional hyperspectral image;
[0065] A matrixing module, configured to matrix the three-dimensional hyperspectral image to obtain a two-dimensional hyperspectral image;
[0066] A decomposition module, configured to decompose the two-dimensional hyperspectral image into a background part and an anomaly part, and construct a target function based on low-rank matrix decomposition and wavelet tight frame constraint on the background part;
[0067] A solving module, configured to solve the target function based on an alternating direction multiplier method to obtain the anomaly part.
[0068] In a third aspect, the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer program is executed by the processor to make the processor execute the steps of the hyperspectral anomaly detection method according to any one of the first aspect.
[0069] In a fourth aspect, the present application further provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to make the processor execute the steps of the hyperspectral anomaly detection method according to any one of the first aspect.
[0070] By using the embodiments of the present application, the following beneficial effects can be achieved:
[0071] The hyperspectral anomaly detection method provided in the embodiments of the present application, on the one hand, for the problem of high complexity and high cost in calculating SVD, the embodiments of the present application use the matrix decomposition method to replace the direct use of the hyperspectral image itself for the background part of the hyperspectral image, and in the calculation process, the SVD calculation is avoided, the complexity caused by the SVD calculation is reduced, and the calculation efficiency in the low-dimensional space is higher than that in the original hyperspectral image. On the other hand, the hyperspectral anomaly detection method provided in the present application uses the wavelet tight frame transformation as a regular term in the case of matrix decomposition, better preserves the details and geometric features of the hyperspectral image, and at the same time eliminates the stair-step artifacts caused by the total variation regular term, and improves the effect of anomaly detection. BRIEF DESCRIPTION OF DRAWINGS
[0072] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0073] Among them:
[0074] Figure 1 The flowchart of the hyperspectral anomaly detection method in one embodiment of the present application.
[0075] Figure 2 The flowchart of the hyperspectral anomaly detection method in another embodiment of the present application;
[0076] Figure 3 The structural diagram of the hyperspectral anomaly detection device in one embodiment of the present application.
[0077] Figure 4 The internal structure diagram of the computer device in one embodiment of the present application. DETAILED DESCRIPTION
[0078] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0079] In a first aspect, the embodiments of the present application provide a hyperspectral anomaly detection method. Figure 1 The flowchart of the hyperspectral anomaly detection method in one embodiment of the present application. Please refer to Figure 1 The hyperspectral anomaly detection method can include:
[0080] S110: Acquire the input image, which is a three-dimensional hyperspectral image.
[0081] In some embodiments, the input image can be a hyperspectral remote sensing image. As a type of three-dimensional image data, a hyperspectral remote sensing image contains spatial information about ground features, as well as their spectral features.
[0082] The methods for acquiring three-dimensional hyperspectral images may include, but are not limited to: (1) receiving three-dimensional hyperspectral images sent by an image acquisition device (e.g., a hyperspectral camera) or an imaging device (e.g., a hyperspectral imager); (2) sending an acquisition request to other devices (e.g., a server) to acquire three-dimensional hyperspectral images from other devices.
[0083] In some embodiments, a three-dimensional hyperspectral image has three dimensions, including two spatial dimensions and one spectral dimension. Therefore, the expression for a three-dimensional hyperspectral image can be:
[0084]
[0085] in, Let m and n be the spatial dimensions of the 3D hyperspectral image, p be the spectral dimension of the 3D hyperspectral image, and R be the set of real numbers. It can be viewed as a tensor of size m×n×p composed of real numbers.
[0086] S120: Matrix the three-dimensional hyperspectral image to obtain a two-dimensional hyperspectral image.
[0087] In some embodiments, matrixing a three-dimensional hyperspectral image can transform it into a two-dimensional hyperspectral image.
[0088] Specifically, the three-dimensional hyperspectral image is matrixed to obtain a two-dimensional hyperspectral image, including:
[0089] The three-dimensional hyperspectral image is unfolded along the spectral dimensions to obtain a two-dimensional hyperspectral image.
[0090] Therefore, the expression for a two-dimensional hyperspectral image can be:
[0091] Y∈R p×mn (2)
[0092] Where Y is a two-dimensional hyperspectral image, and mn represents m*n.
[0093] Figure 2 This is a flowchart illustrating a hyperspectral anomaly detection method in another embodiment of this application. Please refer to... Figure 2The three-dimensional hyperspectral image is matrixed, that is, the three-dimensional hyperspectral image is unfolded according to the spectral dimension p to obtain a two-dimensional hyperspectral image Y of size p x mn.
[0094] In S130, the two-dimensional hyperspectral image is decomposed into a background part and an anomaly part, and a target function is constructed based on low-rank matrix decomposition and wavelet tight frame constraint on the background part.
[0095] It should be noted that the background part of the hyperspectral image has strong low-rank characteristics in the spectral dimension, and the anomaly part of the hyperspectral image often only accounts for a small part of the entire image and has certain sparsity. Therefore, the two-dimensional hyperspectral image can be decomposed into a background part and an anomaly part for processing.
[0096] Specifically, please continue to refer to Figure 2 After the two-dimensional hyperspectral image is decomposed into a background part and an anomaly part, the expression of the two-dimensional hyperspectral image is:
[0097] Y = L + S (3)
[0098] Wherein, L ∈ R p×mn is the background part, and S ∈ R p×mn is the anomaly part.
[0099] In the prior art, the background part L and the anomaly part S of the hyperspectral image are processed according to their different characteristics. The background part of the hyperspectral image has strong low-rank characteristics in the spectral dimension, so the regularization term of the background part L can be represented as rank(L). The anomaly part S often only accounts for a small part of the entire image and has certain sparsity, so the regularization term of S is represented by ||S||1, and ||·||1 represents the sum of absolute values of matrix elements. Thus, the hyperspectral anomaly detection model proposed by the conventional method is:
[0100]
[0101] Wherein, s.t. represents a constraint condition, and the above formula (1-1) represents that under the constraint condition Y = L + S, L and S are solved to minimize rank(L) + ||S||1.
[0102] However, since the above formula (1-1) cannot determine whether a solution can be found within a polynomial time, the nuclear norm is often used instead of the 1-norm of the matrix in the prior art to improve the above formula (1-1), and the improved hyperspectral anomaly detection model is:
[0103]
[0104] Wherein, ||·|| represents the nuclear norm, which is used to approximate the rank of the matrix. *
[0105] In the prior art, singular value decomposition (SVD) needs to be calculated in the optimization process of the hyperspectral anomaly detection model (1-2), which leads to higher and higher complexity and cost as the spatial and spectral dimensions increase.
[0106] The present application provides a corresponding solution to the above problem. On the one hand, to solve the problem of high complexity and high cost of calculating SVD, the present application uses matrix decomposition instead of directly using the hyperspectral image itself for the background part of the hyperspectral image, avoids calculating SVD in the calculation process, reduces the complexity brought by calculating SVD, and has higher calculation efficiency in a low-dimensional space than in the original hyperspectral image. On the other hand, the hyperspectral anomaly detection method provided by the present application uses wavelet tight frame transformation as a regular term in the case of matrix decomposition, better preserves the details and geometric features of the hyperspectral image, eliminates the stair-step artifacts brought by the total variation regular term, and improves the anomaly detection effect.
[0107] S140: solving the target function based on the alternating direction multiplier method to obtain the abnormal part.
[0108] The alternating direction multiplier method (ADMM) is a computational framework for solving convex optimization problems with separability. Since it is a combination of dual decomposition method and augmented Lagrange multiplier method, the algorithm has decomposition while ensuring good convergence and fast processing speed. The target function is solved based on the alternating direction multiplier method to obtain the abnormal part S. The specific process will be described in detail in the following embodiments.
[0109] In some embodiments, please continue to refer to Figure 2 In step S130, based on the low-rank matrix decomposition and wavelet tight frame constraint on the background part, a target function is constructed, including:
[0110] The background part L is decomposed into a low-rank matrix to obtain:
[0111] L=AX (4)
[0112] Wherein, A∈R p×r is a randomly generated matrix, r is a preset value satisfying r r×mn is a representation coefficient.
[0113] The Framelet regular term is used to effectively describe the prior knowledge of the representation coefficient X, which can be expressed as follows:
[0114] R(X) = ||WX||1 (5)
[0115] wherein, W is a wavelet tight frame transformation matrix, the value of which is a fixed value, WX is the representation coefficient of the image in the wavelet tight frame transformation domain, and ||WX||1 represents the regular term of WX.
[0116] In combination with the above, the present application constructs a new hyperspectral anomaly detection model (hereinafter referred to as the objective function). The expression of the constructed objective function is:
[0117]
[0118] wherein, s.t. represents a constraint condition, ||S||1 represents the L21 norm of S, and min 2,1 A,X,S ||WX||1+λ||S|| 2,1 represents the minimum A, X and S under the condition that the constraint condition Y = AX + S is met. 2,1
[0119] In the prior art, the total variation regularization model is a commonly used model in image processing, which can smooth the image while protecting the edge information. However, it will cause the appearance of staircase artifacts in the image, and cannot well preserve the details and geometric features of the background part, seriously affecting the visual effect of the image. In view of the problems existing in the total variation regularization model, the embodiments of the present application constrain the representation coefficient by referring to the wavelet tight frame regularization term, instead of directly regularizing the background part of the hyperspectral image, which can effectively preserve the details and geometric features of the hyperspectral image in the spatial domain, and also reduce the amount of calculation.
[0120] In some embodiments, in step S140, the objective function is solved based on the alternating direction multiplier method to obtain the abnormal part, including:
[0121] An additional variable is introduced, and the expression of the additional variable is:
[0122] U = WX (7)
[0123] wherein, U is the additional variable. Since formula (6) is coupled, direct solving cannot guarantee convergence and is not convenient to solve, therefore, by introducing the additional variable U = WX, the objective function can be separated, which is convenient to fix some variables while solving other variables.
[0124] Based on the additional variable U, the expression of the objective function can be converted from formula (6) to:
[0125]
[0126] Based on the augmented Lagrange function, the above formula (8) is converted into an unconstrained optimization function:
[0127]
[0128] Wherein, Q1 and Q2 are Lagrange multipliers, μ is a penalty parameter, which is initialized before the algorithm starts, (Q1, U-WX> and <Q2, Y-AX-S> respectively represent the inner product of Q1 and U-WX and Q2 and Y-AX-S, Indicates the sum of the absolute value square of each element, and λ is a regularization parameter.
[0129] For formula (9), the variables A, S, U, X are iteratively updated by the alternating direction multiplier method until the convergence condition is met, and the abnormal part S is obtained.
[0130] In some embodiments, the variables A, S, U, X are iteratively updated by the alternating direction multiplier method until the algorithm termination condition is met to obtain the abnormal part, including:
[0131] (1) Update the variable A, fix S, U and X, extract the term containing variable A in the above unconstrained optimization function (9), and obtain:
[0132]
[0133] By extracting the common term Y-AX-S from the inner product part of formula (10), we get:
[0134]
[0135] For formula (11), the derivative of A is solved, and the derivative of A is set to zero to obtain the closed solution of variable A:
[0136]
[0137] (2) Similarly, update the variable S, fix A, U and X, extract the term containing variable S in the unconstrained optimization function, and extract the common term, to obtain:
[0138]
[0139] By l 2,1 The minimum operator solves the above formula (13) to obtain the closed solution of variable S:
[0140]
[0141] Wherein, Ω represents l 2,1 The minimum operator.
[0142] (3) Similarly, update the variable U, fix A, S and X, extract the terms containing the variable U in the unconstrained optimization function, and extract the common terms to obtain:
[0143]
[0144] Solve the above equation (15) by the soft threshold shrinkage operator to obtain the closed solution of the variable U:
[0145]
[0146] Where soft is the soft threshold shrinkage operator.
[0147] (4) Similarly, update the variable X, fix A, S and U, extract the terms containing the variable X in the unconstrained optimization function, and extract the common terms to obtain:
[0148]
[0149] For equation (17), solve the derivative of X and set the derivative of X to zero to obtain the closed solution of the variable X:
[0150]
[0151] Update the Lagrange multipliers Q1, Q2 and the penalty parameter μ, repeat steps (1) to (4) above, and terminate the calculation when the convergence condition is met to obtain and output the abnormal part S that meets the convergence condition.
[0152] In some embodiments, the updated Lagrange multipliers are Q1+μ(U-WX) and Q2+μ(Y-AX-S), and the updated penalty parameter is min(ρμ, μ max ). That is, replace Q1 with Q1+μ(U-WX), replace Q2 with Q2+μ(Y-AX-S), replace μ with min(ρμ, μ max ), and repeat steps (1) to (4) above for iterative updating. Wherein, ρ and μ max are pre-set parameter values, ρ is used to accelerate convergence, and μ max is the maximum value of the penalty parameter.
[0153] In some embodiments, the convergence condition is:
[0154] ||U-WX|| ∞ <∈ (19)
[0155] ||Y-AX-S|| ∞ <∈ (20)
[0156] Where ∈ is a pre-set value.
[0157] That is, in each iteration update, steps (1) to (4) above will yield new A, S, U, and X. Substitute the new A, S, U, and X obtained in each iteration update into the left side of equations (19) and (20) respectively, and determine whether the values on the left side of equations (19) and (20) are less than ∈. If the values on the left side of equations (19) and (20) are still greater than or equal to ∈, then update the Lagrange multipliers and penalty parameters, and continue to the next iteration update; if the values on the left side of equations (19) and (20) are less than ∈, then the convergence condition is met, the calculation is terminated, and S obtained by equation (14) in this iteration update is the abnormal part, and the abnormal part S obtained in this iteration update is output. Please refer to the output abnormal part S. Figure 2 .
[0158] Secondly, embodiments of this application also provide a hyperspectral anomaly detection device. The device includes:
[0159] The acquisition module is used to acquire the input image, which is a three-dimensional hyperspectral image;
[0160] The matrixing module is used to matrixify a three-dimensional hyperspectral image to obtain a two-dimensional hyperspectral image;
[0161] The decomposition module is used to decompose a two-dimensional hyperspectral image into a background part and anomaly part. Based on low-rank matrix decomposition of the background part and wavelet tight frame constraint, the objective function is constructed.
[0162] The solver module is used to solve the objective function based on the alternating direction multiplier method to obtain the anomaly part.
[0163] Figure 3 This is a schematic diagram of the hyperspectral anomaly detection device in one embodiment of this application. Please refer to... Figure 3 The hyperspectral anomaly detection device includes an acquisition module 310, a matrix conversion module 320, a decomposition module 330, and a solution module 340. The acquisition module 310 acquires an input image, which is a three-dimensional hyperspectral image, and sends it to the matrix conversion module 320. The matrix conversion module 320 converts the three-dimensional hyperspectral image into a two-dimensional hyperspectral image, and sends the two-dimensional hyperspectral image to the decomposition module 330. The decomposition module 330 decomposes the two-dimensional hyperspectral image into a background part and an anomaly part. Based on low-rank matrix decomposition and wavelet tight frame constraints on the background part, an objective function is constructed. The solution module 340 solves the objective function based on the alternating direction multiplier method to obtain the anomaly part. The specific implementation process is detailed in the above embodiment and will not be repeated here.
[0164] Thirdly, embodiments of this application also provide a computer device, including a memory and a processor. The memory stores a computer program, and when the computer program is executed by the processor, the processor performs at least the following steps: acquiring an input image, wherein the input image is a three-dimensional hyperspectral image; matrixing the three-dimensional hyperspectral image to obtain a two-dimensional hyperspectral image; decomposing the two-dimensional hyperspectral image into a background part and an anomaly part; constructing an objective function based on low-rank matrix decomposition and wavelet tight frame constraints on the background part; and solving the objective function based on the alternating direction multiplier method to obtain the anomaly part.
[0165] Figure 4 This is an internal structural diagram of a computer device according to one embodiment of this application. Please refer to... Figure 4 The computer device includes a processor, memory, and a network interface connected via a system bus. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and may also store a computer program that, when executed by the processor, causes the processor to perform the steps of any of the hyperspectral anomaly detection methods described above. The internal memory may also store a computer program that, when executed by the processor, causes the processor to perform the steps of any of the hyperspectral anomaly detection methods described above. Those skilled in the art will understand that... Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0166] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the processor performs at least the following steps: acquiring an input image, wherein the input image is a three-dimensional hyperspectral image; matrixing the three-dimensional hyperspectral image to obtain a two-dimensional hyperspectral image; decomposing the two-dimensional hyperspectral image into a background part and an anomaly part; constructing an objective function based on low-rank matrix decomposition and wavelet tight frame constraints on the background part; and solving the objective function based on the alternating direction multiplier method to obtain the anomaly part.
[0167] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and the program can include the processes of the above-mentioned embodiment methods when executed. Any reference to memory, storage, database or other medium used in the embodiments provided by the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0168] Any combination of the technical features of the above embodiments can be made. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described, however, as long as the combination of the technical features does not exist, it should be considered as the scope of the present application.
[0169] The above embodiments only express several implementation manners of the present application, and the description is specific and detailed, but it should not be understood as a limitation on the scope of the patent of the present application. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are all within the protection scope of the present application. Therefore, the protection scope of the patent of the present application should be subject to the appended claims.
Claims
1. A method for detecting hyperspectral anomalies, characterized in that, The method includes: Acquire an input image, wherein the input image is a three-dimensional hyperspectral image; The three-dimensional hyperspectral image is matrixed to obtain a two-dimensional hyperspectral image; The two-dimensional hyperspectral image is decomposed into a background part and an anomaly part. Based on low-rank matrix decomposition and wavelet tight frame constraint on the background part, an objective function is constructed. The objective function is solved using the alternating direction multiplier method to obtain the abnormal part; The expression for the three-dimensional hyperspectral image is: ; in, Let m and n be the spatial dimensions of the three-dimensional hyperspectral image, p be the spectral dimension of the three-dimensional hyperspectral image, and R be the set of real numbers. The step of matrixing the three-dimensional hyperspectral image to obtain a two-dimensional hyperspectral image includes: The three-dimensional hyperspectral image is unfolded according to the spectral dimensions to obtain the two-dimensional hyperspectral image; The expression for the two-dimensional hyperspectral image is: ; in, The two-dimensional hyperspectral image; After decomposing the two-dimensional hyperspectral image into a background portion and anomaly portions, the expression of the two-dimensional hyperspectral image is: ; in, The background portion, The abnormal part; The objective function is constructed based on low-rank matrix decomposition and wavelet tight frame constraints on the background portion, including: Performing low-rank matrix decomposition on the background portion yields: ; in, A randomly generated matrix, To meet The default value, To represent coefficients; Construct the objective function, the expression of which is: ; in, Represents constraints. This is the wavelet compact frame transformation matrix, whose values are fixed. The coefficients represent the image in the wavelet compact frame transform domain. express regular terms, express The L21 norm, The representative is that the constraints are met. In this case, The smallest A, X, and S.
2. The hyperspectral anomaly detection method according to claim 1, characterized in that, The method of solving the objective function based on alternating direction multipliers yields the anomaly, including: An additional variable is introduced, and the expression for the additional variable is: ; Wherein, U is the additional variable; Based on the aforementioned additional variables, the expression for the objective function can be transformed into: ; Based on the augmented Lagrangian function, the above equation is transformed into an unconstrained optimization function: ; in, and For Lagrange multipliers, For penalty parameters, and They represent respectively to and and and Find the inner product. This represents the sum of the squares of the absolute values of each element. For regularization parameters; The variables A, S, U, and X are iteratively updated using the alternating direction multiplier method until the convergence condition is met, at which point the calculation is terminated, and the abnormal part is obtained.
3. The hyperspectral anomaly detection method according to claim 2, characterized in that, The iterative update of variables A, S, U, and X using the alternating direction multiplier method until the algorithm termination condition is met yields the abnormal part, including: Update variable A, fix S, U, and X, extract the terms containing variable A from the unconstrained optimization function, and extract the common terms to obtain: ; Find the derivative of A, and set the derivative of A to zero to obtain a closed-form solution for variable A: ; Update variable S, fix A, U, and X, extract the terms containing variable S from the unconstrained optimization function, and extract the common terms to obtain: ; pass Solving the above equation by minimizing the operator yields a closed-form solution for the variable S: ; in, express Minimize operator; Update variable U, fix A, S, and X, extract the terms containing variable U from the unconstrained optimization function, and extract the common terms to obtain: ; Solving the above equation using the soft threshold shrinkage operator yields the closed-form solution for variable U: ; Where soft is the soft threshold shrinkage operator; Update variable X, fix A, S, and U, extract the terms containing variable X from the unconstrained optimization function, and extract the common terms to obtain: ; Find the derivative of X, and set the derivative of X to zero to obtain a closed-form solution for the variable X: ; Update the Lagrange multipliers and the penalty parameters, repeat the above steps until the convergence condition is met, then terminate the calculation and obtain and output the abnormal part when the convergence condition is met.
4. The hyperspectral anomaly detection method according to claim 3, characterized in that, The updated Lagrange multipliers are and The updated penalty parameters are ;in, and For pre-set parameter values, Used to accelerate convergence, This represents the maximum value of the penalty parameter.
5. The hyperspectral anomaly detection method according to claim 3 or 4, characterized in that, The convergence condition is: ; ; in, This is the default value.
6. A hyperspectral anomaly detection device, characterized in that, The device includes: The acquisition module is used to acquire an input image, wherein the input image is a three-dimensional hyperspectral image; The matrixing module is used to matrixify the three-dimensional hyperspectral image to obtain a two-dimensional hyperspectral image; The decomposition module is used to decompose the two-dimensional hyperspectral image into a background part and an anomaly part, and to construct an objective function based on low-rank matrix decomposition and wavelet tight frame constraint on the background part. The solution module is used to solve the objective function based on the alternating direction multiplier method to obtain the abnormal part; The expression for the three-dimensional hyperspectral image is: ; in, Let m and n be the spatial dimensions of the three-dimensional hyperspectral image, p be the spectral dimension of the three-dimensional hyperspectral image, and R be the set of real numbers. The step of matrixing the three-dimensional hyperspectral image to obtain a two-dimensional hyperspectral image includes: The three-dimensional hyperspectral image is unfolded according to the spectral dimensions to obtain the two-dimensional hyperspectral image; The expression for the two-dimensional hyperspectral image is: ; in, The two-dimensional hyperspectral image; After decomposing the two-dimensional hyperspectral image into a background portion and anomaly portions, the expression of the two-dimensional hyperspectral image is: ; in, The background portion, The abnormal part; The objective function is constructed based on low-rank matrix decomposition and wavelet tight frame constraints on the background portion, including: Performing low-rank matrix decomposition on the background portion yields: ; in, A randomly generated matrix, To meet The default value, To represent coefficients; Construct the objective function, the expression of which is: ; in, Represents constraints. This is the wavelet compact frame transformation matrix, whose values are fixed. The coefficients represent the image in the wavelet compact frame transform domain. express regular terms, express The L21 norm, The representative is that the constraints are met. In this case, The smallest A, X, and S.
7. A computer device, characterized in that, It includes a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the hyperspectral anomaly detection method as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, The device contains a computer program that, when executed by a processor, causes the processor to perform the steps of the hyperspectral anomaly detection method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Low-rank sparse decomposition hyperspectral anomaly detection method based on local features
CN111583230A
Magnetic resonance interventional imaging method and system based on low rank and sparse decomposition, and medium
CN112881958A