Airborne hyperspectral image multi-scale relative total variation collaborative representation anomaly detection method
Technical Field
The invention relates to an airborne hyperspectral image multi-scale relative total variation joint collaborative representation anomaly detection method in the field of airborne hyperspectral image processing.
Background
The airborne hyperspectral image anomaly detection is crucial to the unmanned aerial vehicle when performing a reconnaissance task, the unmanned aerial vehicle acquires hyperspectral images and then directly carries out anomaly detection to quickly identify enemy equipment in a radiated area and transmits anomaly detection results to the My command center through a wireless link, and compared with the situation that the unmanned aerial vehicle directly transmits the hyperspectral images to the ground for image analysis, the My command center has greatly shortened time for acquiring information, and can greatly improve My response time when emergency demands exist. The multi-scale relative total variation compensates the probability of being misjudged as a background pixel when the pixel to be detected is an abnormal pixel, greatly improves the abnormal detection probability of the airborne hyperspectral image from the detection result, and has great significance for realizing accurate striking fast.
Disclosure of Invention
The invention mainly solves the problem that the probability that the pixel to be detected is the abnormal pixel and is misjudged as the abnormal pixel in the hyperspectral collaborative representation abnormal detection algorithm is high, and provides a method for providing different scale texture information of the spatial neighborhood pixel of the pixel to be detected by using a multiscale relative total variation model and only retaining structural information.
The technical scheme adopted by the invention is as follows:
an airborne hyperspectral image multi-scale relative total variation collaborative representation anomaly detection method comprises the following steps:
s1, setting the sizes of an inner window and an outer window, taking a pixel to be detected in a hyperspectral image as a central pixel, and acquiring a surrounding space neighborhood pixel set through double windows;
s2, processing the spatial neighborhood pixel set by using a multi-scale relative total variation model, and solving partial derivatives of the spatial neighborhood set in the x direction and the y direction, the weighted sum of gradient absolute values of pixels in the spatial neighborhood set at all pixels and the absolute value of the weighted sum of gradients of the pixels in the spatial neighborhood set at all pixels;
s3, obtaining structural information and texture information of different scales of the spatial neighborhood according to the solving value of the step 2;
S4, changing different inner and outer window sizes, returning to the step S1, and entering the step S5 after the times are set;
S5, fusing the obtained structural information with different scales to obtain structural information of the relative total variation under multiple scales;
S6, calculating to obtain a Tikhonov regularization matrix by adopting a distance weighted Tikhonov regularization mode according to the spatial relationship between each pixel in the spatial neighborhood pixel set and the pixel to be detected;
S7, applying constraint that the sum of the weight vectors is 1 and two norms of the weight vectors are minimized;
S8, deriving a weight vector in the anomaly detection objective function according to the constraint of the step S7 and the Tikhonov regularization matrix obtained in the step S6, and enabling the derivative to be equal to zero to obtain the weight vector;
s9, multiplying the weight vector of the pixel to be detected by the structural information obtained in the step S5 to obtain a result of representing the pixel to be detected by a space neighborhood set;
s10, the result of the step S9 and the original image are subjected to difference to obtain a residual image, namely, abnormal pixels in the image are judged.
Further, the multi-scale relative total variation model in step S2 is as follows:
Wherein Φ x(i)、Φy(i)、Θx (i) and Θ y (i) are represented as:
g i,j is expressed as:
wherein Ω is a fusion parameter, N is the number of pixels in the spatial neighborhood set, S i is a structure information result image, I i is the spatial neighborhood set, λ is a weight parameter, ζ is a positive number, AndRepresenting the partial derivatives in two directions respectively, Φ x (i) and Φ y (i) are the weighted sum of the absolute values of the gradients of pixel i at all pixels in the neighborhood, Θ x (i) and Θ y (i) are the absolute values of the weighted sum of the gradients of pixel i at all pixels in the neighborhood, j is the pixel of pixel i in the neighborhood R (i), x i and y i represent the x-direction and y-direction of pixel i respectively, x j and y j represent the x-direction and y-direction of pixel j, g i,j represents the gaussian weighting function operation of pixel i and pixel j, and δ is the scale of the spatial window.
Compared with the prior art, the invention has the following advantages:
1. The existing hyperspectral image cooperatively shows that when the pixel to be detected is an abnormal pixel and the adjacent space set of the hyperspectral image cooperatively shows that the abnormal pixel is the same as the pixel to be detected, the actual pixel to be detected is often misjudged as a background pixel, so that the aim of detecting the abnormal pixel can not be fulfilled, according to the invention, before the collaborative representation algorithm detects the abnormal pixel, the multi-scale relative total variation processing is firstly carried out on the spatial neighbor set, the texture information in the spatial neighbor set is removed, only the structural information in the spatial neighbor set is reserved, and the situation that the pixel to be detected is misjudged as the background pixel when the pixel to be detected is the abnormal pixel can be avoided to the greatest extent.
2. The method improves the relative total variation model due to different scales of the ground object types in different images, and adopts the multi-scale relative total variation model, so that the method has the advantages of being better suitable for the ground object types with different scales, being better suitable for various different scenes in practical application, and being capable of detecting abnormal pixels in the images more accurately.
Drawings
FIG. 1 is a schematic diagram of a collaborative presentation method of the present invention;
FIG. 2 is a schematic diagram of the results of the application of the multi-scale relative total variation model of the present invention;
fig. 3 is a graph of the anomaly detection result when the present invention is applied to an onboard hyperspectral image.
Detailed Description
The invention is further explained below with reference to the drawings.
The invention discloses a method for detecting anomaly through multi-scale relative total variation collaborative representation of an airborne hyperspectral image, which adopts a multi-scale relative total variation model to process a space neighborhood set so as to obtain structural information of the space neighborhood set, and specifically comprises the following steps:
S1, setting the sizes of an inner window and an outer window, taking a pixel to be detected in a hyperspectral image as a central pixel, and acquiring a surrounding space neighborhood pixel set through double windows, wherein the surrounding space neighborhood pixel set is shown in figure 1;
s2, processing the spatial neighborhood pixel set by using a multi-scale relative total variation model, and solving partial derivatives of the spatial neighborhood set in the x direction and the y direction, the weighted sum of gradient absolute values of pixels in the spatial neighborhood set at all pixels and the absolute value of the weighted sum of gradients of the pixels in the spatial neighborhood set at all pixels;
s3, obtaining structural information and texture information of different scales of the spatial neighborhood according to the solving value of the step 2;
S4, changing different inner and outer window sizes, returning to the step S1, and entering the step S5 after the times are set;
S5, fusing the obtained structural information with different scales to obtain structural information of the relative total variation under multiple scales;
S6, calculating to obtain a Tikhonov regularization matrix by adopting a distance weighted Tikhonov regularization mode according to the spatial relationship between each pixel in the spatial neighborhood pixel set and the pixel to be detected;
S7, applying constraint that the sum of the weight vectors is 1 and two norms of the weight vectors are minimized;
S8, deriving a weight vector in the anomaly detection objective function according to the constraint of the step S7 and the Tikhonov regularization matrix obtained in the step S6, and enabling the derivative to be equal to zero to obtain the weight vector;
s9, multiplying the weight vector of the pixel to be detected by the structural information obtained in the step S5 to obtain a result of representing the pixel to be detected by a space neighborhood set;
s10, the result of the step S9 and the original image are subjected to difference to obtain a residual image, namely, abnormal pixels in the image are judged.
The multi-scale relative total variation model is as follows:
Wherein Φ x(i)、Φy(i)、Θx (i) and Θ y (i) are represented as:
g i,j is expressed as:
wherein Ω is a fusion parameter, N is the number of pixels in the spatial neighborhood set, S i is a structure information result image, I i is the spatial neighborhood set, λ is a weight parameter, ζ is a positive number, AndRepresenting the partial derivatives in two directions respectively, Φ x (i) and Φ y (i) are the weighted sum of the absolute values of the gradients of pixel i at all pixels in the neighborhood, Θ x (i) and Θ y (i) are the absolute values of the weighted sum of the gradients of pixel i at all pixels in the neighborhood, j is the pixel of pixel i in the spatial neighborhood R (i), x i and y i represent the x-direction and y-direction of pixel i respectively, x j and y j represent the x-direction and y-direction of pixel j, g i,j represents the gaussian weighting function operation of pixel i and pixel j, and δ is the scale of the spatial window.
After the structural information of the spatial neighborhood is obtained, the structural information can be used for carrying out collaborative representation on the pixels to be detected, and a mathematical model for collaborative representation of anomaly detection is as follows:
the mentioned weight vector is the solution of the above formula, which is expressed as follows:
α=(Xlb TXlb+λΓy TΓy)-1Xlb Ty
The processed image is shown in fig. 2, and the final residual image is shown in fig. 3, i.e. the difference between the co-representation image and the original image is given by:
r1=||y-Xlbα||2
In the above, y is a pixel to be detected, X lb is a spatial neighborhood set after multi-scale relative total variation transformation, α is a weight vector, λ is a lagrangian multiplier, X lb T is a transpose of the spatial neighborhood set after multi-scale relative total variation transformation, Γ y is a regularization matrix, Γ y T is a transpose of the regularization matrix, and r 1 is a residual matrix.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
While the principles and embodiments of the present invention have been described in detail in the foregoing application of the principles and embodiments of the present invention, the above examples are provided for the purpose of aiding in the understanding of the principles and concepts of the present invention and may be varied in many ways by those of ordinary skill in the art in light of the teachings of the present invention, and the above descriptions should not be construed as limiting the invention.