Hyperspectral image anomaly detection method and system based on spectral cubic features and gradient contrast

Through a method based on spectral cubic features and gradient contrast, the problem of hyperspectral image anomaly detection is solved to the data distribution assumption and noise sensitivity, achieving higher detection accuracy and sensitivity.

CN119991575APending Publication Date: 2025-05-13WUXI UNIV
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411991906.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

The existing hyperspectral image abnormality detection methods are sensitive to data distribution assumptions and noise, reducing the accuracy of hyperspectral image abnormality detection.

Method used

A hyperspectral image anomaly detection method based on spectral cubic features and gradient contrast is proposed. By extracting spectral cubic features, constructing spectral gradient curves, using internal and external dual-window structures and calculating gradient contrast, a hyperspectral anomaly detection image is generated.

Benefits of technology

The accuracy of abnormal detection of hyperspectral images is improved, and the differences in spectral characteristics of the internal and external windows are reflected through gradient contrast, and it is more accurate to judge whether the pixel points belong to the abnormal area.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119991575A_ABST
    Figure CN119991575A_ABST
Patent Text Reader

Abstract

The invention provides a hyperspectral image anomaly detection method based on spectral cubic features and gradient contrast, and relates to the technical field of image processing. Firstly, spectral cubic features of a hyperspectral image are extracted, a spectral gradient curve is calculated, and a spectral cubic feature map is constructed. For an inner and outer double-window structure, setting each pixel point as the center of the outer window and the center of the inner window, enabling the inner window to be a center block of the outer window, and determining the remaining outer window blocks without the center block. And according to the spectral gradient curve, calculating spectral gradient measurement values of the external window and the internal window, calculating a gradient contrast by using the spectral gradient measurement value of the external window, the spectral gradient measurement value of the internal window and the spectral gradient measurement value c, and obtaining a hyperspectral anomaly detection image based on the gradient contrast. According to the method, whether the pixel point belongs to the abnormal region or not is judged more accurately, and the accuracy of hyperspectral image anomaly detection is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and more specifically, to a method and system for detecting anomalies in hyperspectral images based on spectral cubic features and gradient contrast. Background Art

[0002] Hyperspectral image (HSI) is a three-dimensional data cube that contains continuous narrow-band spectral information of the surface of an object in the visible and infrared spectrum. Unlike ordinary color images, hyperspectral images have dozens or even hundreds of continuous spectral bands, which can perform more detailed spectral analysis of objects. Due to its fine spectral information, hyperspectral imaging has been widely used in the field of background anomaly feature detection. In hyperspectral images, pixels with large spectral differences from the surrounding background are defined as anomalies.

[0003] At present, scholars have conducted research on various aspects of anomaly detection in hyperspectral images. For example, the hyperspectral anomaly detection method based on low-rank representation compresses hyperspectral data through low-rank constraints to promote the reconstruction of global structural information. Some scholars have proposed a method based on the robust principal component analysis (RPCA) model to solve the matrix recovery problem by using the low-rank characteristics of the data, but the model ignores the complexity of real hyperspectral data. Therefore, a background dictionary construction model with local sparse constraints is further designed, which takes into account both global and local structural information to achieve better detection results. However, this method requires multiple singular value decompositions (SVD) and takes a long time to calculate. Therefore, a method based on spectral unmixing and sparse representation is proposed to achieve accurate background endmembers. However, this method is sensitive to data distribution assumptions and noise in complex scenarios, which reduces the accuracy of anomaly detection in hyperspectral images. Summary of the invention

[0004] In order to solve the problem that the current hyperspectral image anomaly detection method is sensitive to data distribution assumptions and noise, which reduces the accuracy of hyperspectral image anomaly detection, the present invention proposes a hyperspectral image anomaly detection method based on spectral cube features and gradient contrast to improve the accuracy of hyperspectral image anomaly detection.

[0005] In order to achieve the above technical effects, the technical solution of the present invention is as follows:

[0006] S1: extracting spectral cubic features from the spectral curve of each pixel point of the acquired hyperspectral image, calculating the spectral gradient curve based on the spectral cubic features, and constructing a spectral cubic feature map using the spectral gradient curve;

[0007] S2: adopt an inner and outer double window structure, set each pixel point of the spectral cube feature map as the center of the outer window and the inner window, make the inner window the center block of the outer window, and determine the remaining outer window blocks after removing the center block;

[0008] S3: determining a first spectral gradient curve of the a-th pixel point of the remaining external window block, calculating an average spectral gradient curve based on the first spectral gradient curve, and calculating a spectral gradient measurement value of the external window using the first spectral gradient curve and the average spectral gradient curve;

[0009] S4: determining a second spectral gradient curve of the b-th pixel point in the internal window, and calculating a spectral gradient measurement value of the internal window using the second spectral gradient curve and the average spectral gradient curve;

[0010] S5: Determine the spectral gradient measurement value c corresponding to the pixel point at the centroid position of the internal window, calculate the gradient contrast using the spectral gradient measurement value of the external window, the spectral gradient measurement value of the internal window and the spectral gradient measurement value c, and obtain a hyperspectral anomaly detection image based on the gradient contrast.

[0011] Furthermore, the spectral cube features in step S1 include spatial direction features:

[0012] The extraction process of the spatial direction feature satisfies:

[0013] The horizontal gradient is calculated using the spectral curve of each pixel of the hyperspectral image. The calculation expression of the horizontal gradient is:

[0014]

[0015] In the formula, c i,j (γ) represents the spectral curve, represents the horizontal gradient, i represents the abscissa of each pixel in the hyperspectral image, j represents the ordinate of each pixel in the hyperspectral image, γ represents the wavelength of the spectral curve of each pixel in the hyperspectral image, and I represents the maximum value of i;

[0016] The vertical gradient is calculated using the spectral curve of each pixel of the hyperspectral image. The vertical gradient calculation expression is:

[0017]

[0018] In the formula, represents the vertical gradient, J represents the maximum value of j;

[0019] The spectral gradient is calculated using the spectral curve of each pixel point of the hyperspectral image. The spectral gradient calculation expression is:

[0020]

[0021] In the formula, represents the spectral gradient, Γ represents the maximum value of γ;

[0022] According to the horizontal gradient, the vertical gradient and the spectral gradient, the multi-dimensional gradient amplitude is calculated. The multi-dimensional gradient amplitude calculation expression is:

[0023]

[0024] In the formula, α i,j (γ) represents the multi-dimensional gradient amplitude;

[0025] The spatial direction gradient angle is calculated according to the horizontal gradient and the vertical gradient. The spatial direction gradient angle calculation expression is:

[0026]

[0027] In the formula, β i,j (γ) represents the spatial direction gradient angle;

[0028] Setting β Space direction area K β , the index calculation expression of the spatial direction gradient angle in the corresponding spatial direction area is:

[0029]

[0030] In the formula, Represents the index of the spatial direction gradient angle in the corresponding spatial direction area, n β Represents the spatial direction area K β The number must be an integer;

[0031] According to the index of the multi-dimensional gradient amplitude and the spatial direction gradient angle in the corresponding spatial direction area, the spatial direction feature calculation expression is:

[0032]

[0033] In the formula, p represents K β Serial number, represents the p-th spatial direction feature, represents the cubic parameter 9, and δ(·) represents the indicator function, which is 1 when the condition is true and 0 otherwise.

[0034] Furthermore, the spectral cube feature in step S1 also includes a spectral direction feature;

[0035] The extraction process of the spectral direction feature satisfies:

[0036] The spectral directional gradient angle is calculated according to the horizontal gradient, the vertical gradient and the spectral gradient. The spectral directional gradient angle calculation expression is:

[0037]

[0038] In the formula, θi,j (γ) represents the spectral gradient angle;

[0039] Setting θ Spectral direction area K θ , the index calculation expression of the spectral direction gradient angle in the corresponding spectral direction area is:

[0040]

[0041] in, Represents the index of the spectral direction gradient angle in the corresponding spectral direction area, n θ Indicates the spectral direction area K θ and is an integer;

[0042] According to the index of the multi-dimensional gradient amplitude and the spectral direction gradient angle in the corresponding spectral direction area, the spectral direction feature is calculated as follows:

[0043]

[0044] In the formula, represents the spectral directional characteristics, q represents K θ Serial number.

[0045] Furthermore, the spectral gradient curve is calculated using the spatial direction characteristics and the spectral direction characteristics. The calculation process is:

[0046]

[0047] In the formula, g i,j (μ) represents the spectral gradient curve.

[0048] According to the above technical means, the spectral cube features can reflect the characteristics of pixel points and provide rich feature information for hyperspectral image anomaly detection. The calculated spectral gradient curve can capture abnormal changes in the spectrum and provide rich information for subsequent hyperspectral image anomaly detection.

[0049] Furthermore, step S2 also includes: determining a corresponding dividing line in the external window according to the boundary position of the internal window, dividing the external window into 8 remaining external window blocks after removing the center block which are completely aligned with the edge of the internal window, and numbering and recording the remaining external window blocks after removing the center block.

[0050] Furthermore, the process of calculating the average spectral gradient curve based on the first spectral gradient curve satisfies:

[0051]

[0052] In the formula, represents the average spectral gradient curve, represents the first spectral gradient curve of the ath pixel in the remaining external window block, w o Indicates the side length of the external window, w i represents the side length of the internal window, and σ represents the sequence number of the remaining external window blocks after removing the central block.

[0053] Furthermore, the calculation expression for calculating the spectral gradient measurement value of the external window using the first spectral gradient curve and the average spectral gradient curve is:

[0054]

[0055] In the formula, represents the spectral gradient measurement of the external window, It means to calculate the inner product of two vectors, ||·|| 2 It means calculating the square root of the sum of the squares of the components of a vector.

[0056] The calculation expression for calculating the spectral gradient measurement value of the internal window using the second spectral gradient curve and the average spectral gradient curve is:

[0057]

[0058] In the formula, χ b represents the spectral gradient measurement of the internal window, g b (μ) represents the second spectral gradient curve of the b-th pixel point in the internal window.

[0059] Further, the process of calculating the gradient contrast using the spectral gradient measurement value of the external window, the spectral gradient measurement value of the internal window and the spectral gradient measurement value c satisfies:

[0060] First, the spectral gradient measurement value of the outer window, the spectral gradient measurement value of the inner window, and the spectral gradient measurement value c are used to calculate the sequence number of the remaining outer window blocks that best remove the center block:

[0061]

[0062] In the formula, represents the sequence number of the remaining external window blocks after the optimal removal of the central block, χ t represents the spectral gradient measurement value c corresponding to the pixel point at the centroid position of the internal window;

[0063] The corresponding spectral gradient measurement value is determined by using the sequence number of the remaining external window block after optimally removing the central block. The calculation expression of the gradient contrast is:

[0064]

[0065] Where Φ represents the gradient contrast.

[0066] According to the above technical means, the gradient contrast reflects the difference between the spectral characteristics of the internal window and the external window. It can intuitively see the degree of pixel abnormality and more accurately judge whether the pixel belongs to the abnormal area, thereby improving the sensitivity and accuracy of detection.

[0067] Furthermore, the process of obtaining a hyperspectral anomaly detection image based on gradient contrast is as follows: multiplying the spectral gradient measurement value c of the pixel point at the centroid position of the internal window by the gradient contrast to obtain a detection value, converting the detection value into a grayscale value, and generating a grayscale image based on the grayscale value. The grayscale image is the hyperspectral anomaly detection image.

[0068] The present invention also includes a hyperspectral image anomaly detection system based on spectral cube features and gradient contrast, comprising:

[0069] A spectral cube feature map construction module is used to extract spectral cube features from the spectral curve of each pixel point of the acquired hyperspectral image, calculate the spectral gradient curve based on the spectral cube features, and construct a spectral cube feature map using the spectral gradient curve;

[0070] A structural design module is used to adopt an inner and outer double window structure, set each pixel point of the spectral cube feature map as the center of the outer window and the inner window, make the inner window the central block of the outer window, and determine the remaining outer window blocks after removing the central block;

[0071] An external window spectral gradient measurement value calculation module is used to determine a first spectral gradient curve of the a-th pixel point of the remaining external window block, calculate an average spectral gradient curve based on the first spectral gradient curve, and calculate a spectral gradient measurement value of the external window using the first spectral gradient curve and the average spectral gradient curve;

[0072] The internal window spectral gradient measurement value calculation module is used to determine the second spectral gradient curve of the b-th pixel point in the internal window, and calculate the spectral gradient measurement value of the internal window using the second spectral gradient curve and the average spectral gradient curve.

[0073] The detection image generation module is used to determine the spectral gradient measurement value c corresponding to the pixel point at the centroid position of the internal window, calculate the gradient contrast using the spectral gradient measurement value of the external window, the spectral gradient measurement value of the internal window and the spectral gradient measurement value c, and obtain a hyperspectral anomaly detection image based on the gradient contrast.

[0074] Compared with the prior art, the beneficial effects of this method are:

[0075] The present invention proposes a method and system for detecting abnormality in hyperspectral images based on spectral cube features and gradient contrast, which realizes abnormal area detection in hyperspectral images and generates hyperspectral abnormality detection images through spectral cube feature extraction, internal and external double window structure analysis, spectral gradient curve comparison, and gradient contrast calculation. Among them, the gradient contrast reflects the degree of difference between the spectral characteristics of the internal window and the external window, which can intuitively see the degree of abnormality of the pixel point, more accurately judge whether the pixel point belongs to the abnormal area, and improve the accuracy of detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0076] Figure 1 A flowchart showing a method for detecting anomalies in a hyperspectral image based on spectral cube features and gradient contrast proposed in an embodiment of the present invention;

[0077] Figure 2 An example diagram showing a hyperspectral image proposed in an embodiment of the present invention;

[0078] Figure 3 It represents the spectral cube characteristic diagram proposed in the embodiment of the present invention;

[0079] Figure 4 A diagram showing anomaly detection results of a hyperspectral image proposed in an embodiment of the present invention;

[0080] Figure 5 A structural diagram of a hyperspectral image anomaly detection system based on spectral cube features and gradient contrast proposed in an embodiment of the present invention. DETAILED DESCRIPTION

[0081] The drawings are for illustrative purposes only and should not be construed as limiting the present patent;

[0082] In order to better illustrate the present embodiment, some parts of the drawings may be omitted, enlarged or reduced, and do not represent the actual size;

[0083] It is understandable to those skilled in the art that descriptions of certain well-known contents in the drawings may be omitted.

[0084] The technical solution of the present invention is further described below in conjunction with the accompanying drawings and embodiments.

[0085] The positional relationships described in the drawings are only for illustrative purposes and should not be construed as limiting the present patent;

[0086] Example 1

[0087] This embodiment proposes a hyperspectral image anomaly detection method based on spectral cube features and gradient contrast. Figure 1 The method proposed in this embodiment generally includes the following steps:

[0088] S1: extracting spectral cubic features from the spectral curve of each pixel point of the acquired hyperspectral image, calculating the spectral gradient curve based on the spectral cubic features, and constructing a spectral cubic feature map using the spectral gradient curve;

[0089] S2: adopt an inner and outer double window structure, set each pixel point of the spectral cube feature map as the center of the outer window and the inner window, make the inner window the center block of the outer window, and determine the remaining outer window blocks after removing the center block;

[0090] S3: determining a first spectral gradient curve of the a-th pixel point of the remaining external window block, calculating an average spectral gradient curve based on the first spectral gradient curve, and calculating a spectral gradient measurement value of the external window using the first spectral gradient curve and the average spectral gradient curve;

[0091] S4: determining a second spectral gradient curve of the b-th pixel point in the internal window, and calculating a spectral gradient measurement value of the internal window using the second spectral gradient curve and the average spectral gradient curve;

[0092] S5: Determine the spectral gradient measurement value c corresponding to the pixel point at the centroid position of the internal window, calculate the gradient contrast using the spectral gradient measurement value of the external window, the spectral gradient measurement value of the internal window and the spectral gradient measurement value c, and obtain a hyperspectral anomaly detection image based on the gradient contrast.

[0093] In this embodiment, the hyperspectral image can capture the spectral information of the object in multiple continuous bands, providing detailed data support for subsequent spectral analysis and anomaly detection. This image not only contains the spatial information of the object, but also contains rich spectral features, which is an important basis for anomaly detection.

[0094] In this embodiment, the detailed process of step S1: extracting spectral cube features from the spectral curve of each pixel point of the acquired hyperspectral image, calculating the spectral gradient curve according to the spectral cube features, and constructing the spectral cube feature map using the spectral gradient curve is described.

[0095] Spectral cubic features include spatial directional features and spectral directional features. The extraction process of spatial directional features satisfies:

[0096] The horizontal gradient is calculated using the spectral curve of each pixel of the hyperspectral image. The calculation expression of the horizontal gradient is:

[0097]

[0098] In the formula, c i,j (γ) represents the spectral curve, represents the horizontal gradient, i represents the abscissa of each pixel in the hyperspectral image, j represents the ordinate of each pixel in the hyperspectral image, γ represents the wavelength of the spectral curve of each pixel in the hyperspectral image, and I represents the maximum value of i;

[0099] The vertical gradient is calculated using the spectral curve of each pixel of the hyperspectral image. The vertical gradient calculation expression is:

[0100]

[0101] In the formula, represents the vertical gradient, J represents the maximum value of j;

[0102] The spectral gradient is calculated using the spectral curve of each pixel point of the hyperspectral image. The spectral gradient calculation expression is:

[0103]

[0104] In the formula, represents the spectral gradient, Γ represents the maximum value of γ;

[0105] According to the horizontal gradient, the vertical gradient and the spectral gradient, the multi-dimensional gradient amplitude is calculated. The multi-dimensional gradient amplitude calculation expression is:

[0106]

[0107] In the formula, α i,j (γ) represents the multi-dimensional gradient amplitude;

[0108] The spatial direction gradient angle is calculated according to the horizontal gradient and the vertical gradient. The spatial direction gradient angle calculation expression is:

[0109]

[0110] In the formula, β i,j (γ) represents the spatial direction gradient angle;

[0111] Setting β Space direction area K β , the index calculation expression of the spatial direction gradient angle in the corresponding spatial direction area is:

[0112]

[0113] In the formula, Represents the index of the spatial direction gradient angle in the corresponding spatial direction area, n β Represents the spatial direction area K β The number must be an integer;

[0114] According to the index of the multi-dimensional gradient amplitude and the spatial direction gradient angle in the corresponding spatial direction area, the spatial direction feature calculation expression is:

[0115]

[0116] In the formula, p represents K β Serial number, represents the p-th spatial direction feature, represents the cubic parameter 9, and δ(·) represents the indicator function, which is 1 when the condition is true and 0 otherwise.

[0117] In step S1, the spectral cubic features also include spectral directional features, and the extraction process of spectral directional features satisfies:

[0118] The spectral directional gradient angle is calculated according to the horizontal gradient, the vertical gradient and the spectral gradient. The spectral directional gradient angle calculation expression is:

[0119]

[0120] In the formula, θ i,j (γ) represents the spectral gradient angle;

[0121] Setting θ Spectral direction area K θ , the index calculation expression of the spectral direction gradient angle in the corresponding spectral direction area is:

[0122]

[0123] in, Represents the index of the spectral direction gradient angle in the corresponding spectral direction area, n θ Indicates the spectral direction area K θ and is an integer;

[0124] According to the index of the multi-dimensional gradient amplitude and the spectral direction gradient angle in the corresponding spectral direction area, the spectral direction feature is calculated as follows:

[0125]

[0126] In the formula, represents the spectral directional characteristics, q represents K θ Serial number.

[0127] The spectral gradient curve is calculated using the spatial direction characteristics and spectral direction characteristics. The calculation process is:

[0128]

[0129] In the formula, g i,j(μ) represents the spectral gradient curve.

[0130] In this embodiment, an inner and outer double window structure is adopted, each pixel point of the spectral cube feature map is set as the center of the outer window and the inner window, and the inner window is made to be the center block of the outer window. According to the boundary position of the inner window, the corresponding dividing line is determined in the outer window, and the outer window is divided into 8 remaining outer window blocks that are completely aligned with the edge of the inner window and the center block is removed, and the remaining outer window blocks that are removed from the center block are numbered and recorded. The design of the inner and outer double window structure can simultaneously consider the local and global spectral characteristics of the pixel points, thereby improving the accuracy and robustness of anomaly detection. By dividing the remaining outer window blocks, a clear spatial layout is provided for subsequent spectral gradient measurement and contrast calculation, which helps to locate the abnormal area more accurately.

[0131] In this embodiment, the spectral cube feature map is represented as G, and the external window is represented as W 0 , set the outer window to have a side length of w 0 The inner window is denoted by W I , set the inner window to have a side length of w i The remaining outer window blocks after removing the center block are expressed as

[0132] In this embodiment, according to the detailed steps of step S1, the first spectral gradient curve of the a-th pixel point in the remaining external window block and the second spectral gradient curve of the b-th pixel point in the internal window can be calculated.

[0133] In this embodiment, the detailed process of calculating the spectral gradient measurement value of the outer window using the first spectral gradient curve and the average spectral gradient curve and calculating the spectral gradient measurement value of the inner window using the second spectral gradient curve and the average spectral gradient curve is described.

[0134] First, the process of calculating the average spectral gradient curve based on the first spectral gradient curve satisfies:

[0135]

[0136] In the formula, represents the average spectral gradient curve, represents the first spectral gradient curve of the ath pixel in the remaining external window block, w o Indicates the side length of the external window, w i represents the side length of the internal window, and σ represents the sequence number of the remaining external window blocks after removing the central block.

[0137] Next, the spectral gradient measurement value of the external window is calculated using the first spectral gradient curve and the average spectral gradient curve. The calculation expression of the spectral gradient measurement value of the external window is:

[0138]

[0139] In the formula, represents the spectral gradient measurement of the external window, It means to calculate the inner product of two vectors, ||·|| 2 It means calculating the square root of the sum of the squares of the components of a vector.

[0140] The spectral gradient measurement value of the internal window is calculated using the second spectral gradient curve and the average spectral gradient curve. The calculation expression of the spectral gradient measurement value of the internal window is:

[0141]

[0142] In the formula, χ b represents the spectral gradient measurement of the internal window, g b (μ) represents the second spectral gradient curve of the b-th pixel point in the internal window.

[0143] In this implementation, first, the spectral gradient measurement value of the external window, the spectral gradient measurement value of the internal window, and the spectral gradient measurement value c are used to calculate the sequence number of the remaining external window blocks after the optimal removal of the central block:

[0144]

[0145] In the formula, represents the sequence number of the remaining external window blocks after the optimal removal of the central block, χ t represents the spectral gradient measurement value c corresponding to the pixel point at the centroid position of the internal window;

[0146] Then, the corresponding spectral gradient measurement value is determined by using the sequence number of the remaining external window block after the optimal removal of the central block. The calculation expression of the gradient contrast is:

[0147]

[0148] Where Φ represents the gradient contrast.

[0149] In this embodiment, the process of obtaining a hyperspectral anomaly detection image based on gradient contrast is: multiplying the spectral gradient measurement value c of the pixel point at the centroid position of the internal window by the gradient contrast to obtain a detection value, converting the detection value into a grayscale value, and generating a grayscale image based on the grayscale value. The grayscale image is the hyperspectral anomaly detection image.

[0150] Example 2

[0151] In this implementation, the selected hyperspectral image is the San Diego Airport image, such as Figure 2 An example of a spectral image is shown. The resolution of the spectral image is 100×100 pixels and the total wavelength of the hyperspectral image is 205. This dataset was collected by the AVIRIS sensor in the area near San Diego Airport in California, USA. It has high spatial and spectral resolution. The aircraft is regarded as an abnormal target, while the background is mainly composed of runways, grass and houses.

[0152] The spectral curve of the original spectral image loaded, for example, the spectral curve c with the horizontal axis of 51 and the vertical axis of 60 51,60 (γ) is {0.2398,0.2583,0.2705,0.2836,0.2988,0.3080,0.3120,0.3209,0.3279,0.3306,0.3263,0.3311,0.3337,0.3439,0.3516,0.3559,0.3656,0.3687,0.3704,0.3742,…}.

[0153] According to the calculation formula of horizontal gradient, the horizontal gradient is calculated It is {0.0054, 0.0031, 0.0014, 0.0038, 0.0058, 0.0067, 0.0072, 0.0080, 0.0123, 0.0119, 0.0091, 0.0122, 0.0111, 0.0115, 0.0134, 0.0121, 0.0144, 0.0165, 0.0122, 0.0157, …}. According to the calculation formula of vertical gradient, the vertical gradient is calculated. It is {0.0760, 0.0866, 0.0923, 0.0959, 0.1012, 0.1040, 0.1096, 0.1110, 0.1157, 0.1181, 0.1167, 0.1176, 0.1215, 0.1216, 0.1226, 0.1234, 0.1228, 0.1242, 0.1211, 0.1200, …}. According to the calculation formula of spectral gradient, the spectral gradient is calculated. is {0.0155,0.0215,0.0280,0.0213,0.0193,0.0219,0.0155,0.0130,0.0070,0.0060,0.0075,0.0043,0.0074,0.0108,0.0072,0.0046,0.0053,0.0052,0.0042,0.0011,…}. In the calculation process, I is 100, J is 100, and Γ is 205.

[0154] Exemplarily, according to the multi-dimensional gradient amplitude calculation expression, the multi-dimensional gradient amplitude α is calculated 51,60 (γ) is {0.0776, 0.0893, 0.0966, 0.0983, 0.1031, 0.1063, 0.1108, 0.1120, 0.1161, 0.1186, 0.1176, 0.1183, 0.1221, 0.1227, 0.1233, 0.1240, 0.1236, 0.1249, 0.1220, 0.1211, …}. According to the spatial direction gradient angle calculation expression, calculate the spatial direction gradient angle β 51,60 (γ) is {1.5708,1.5708,1.6287,1.6029,1.5845,1.6071,1.6239,1.6312,1.6333,1.6384,1.6755,1.6714,1.6457,1.6710,1.6615,1.6637,1.6792,1.6682,1.6891,1.7078,…}. According to the expression for calculating the spectral direction gradient angle, calculate the spectral direction gradient angle θ 51,60 (γ) is {1.7724,1.8145,1.8648,1.7898,1.7591,1.7783,1.7109,1.6871,1.6312,1.6215,1.6347,1.6074,1.6315,1.6593,1.6292,1.6076,1.6140,1.6122,1.6052,1.5802,…}.

[0155] Specifically, in this embodiment, when the number of spectral direction intervals is set to 7, the best effect is achieved, so 7 spatial direction zones are set. 51,60 (γ) Index of the corresponding spatial direction region is {3,3,3,3,2,3,3,2,2,2,2,2,2,2,2,2,2,1,2,…}.

[0156] Specifically, in this embodiment, when calculating the spatial directional features, when the cubic parameter is set to 9, the experimental effect is best, so the cubic parameter is set to 9.

[0157] Calculate the spatial directional characteristics based on the spatial directional characteristics calculation expression is {0.3219,0.4724,0.5755,0.5755,0.0246,0.0084,0.1005,0.2847,0.4259,0.6049,0.6049,0.0047,0.0162,0.0743,0.2240,0.3956,0.6272,0.6272,0.0064,0.0097,…}.

[0158] Specifically, in this embodiment, when calculating the index of the spectral direction gradient angle corresponding to the spectral direction zone, 7 spectral direction zones are set. 51,60 (γ) Index of the corresponding spatial direction region is {2,2,2,2,2,2,2,2,2,2,2,2,2,3,2,1,2,2,2,…}.

[0159] Calculate the spectral directional characteristics according to the spectral directional characteristics calculation expression is {0.0096,0.0077,0.0081,0.2253,0.7591,0.6038,0.0906,0.0052,0.0010,0.0045,0.2614,0.9627,0.0676,0.0144,0.0005,0.0004,0.0023,0.6201,0.7840,0.0283,…}.

[0160] In this implementation, the spatial directional features and the spectral directional features are normalized into a row vector and then spliced ​​horizontally by columns into a new row vector to obtain a spectral gradient curve.

[0161] For example, the spectral gradient curve g i,j (γ) is an integer from {0.4628, 0.5033, 0.5033, 0.5033, 0.0265, 0.0093, 0.1581, 0.4614, 0.4579, 0.5328, 0.5328, 0.0043, 0.0183, 0.0961, 0.4259, 0.4132, 0.5642, 0.5642, 0.0066, 0.0109, …}, μ∈[1,294].

[0162] In this embodiment, w o =17,w i =9, the experimental results are the best, so W O Set it to a square with a side length of 17 pixels and set W I Set to a square with a side length of 9 pixels. and They are all squares with a side length of 8 pixels. and They are all rectangles with a length of 9 pixels and a width of 8 pixels, such as Figure 3 Spectral cube feature diagram shown.

[0163] Calculate the average spectral gradient curve based on the first spectral gradient curve, exemplarily, Spectral gradient curve of the 7th pixel in {0.7044,0.4052,0.4777,0.6685,0.5229,0.2204,0.0950,0.7066,0.2380,0.4788,0.6745,0.4947,0.3455,0.0402,0.7088,0.2242,0.4720,0.6657,0.4840,0.3793,…}. Average spectral gradient curve is {0.5004,0.4539,0.3906,0.4671,0.3850,0.5355,0.3989,0.4861,0.3818,0.3838,0.4604,0.3434,0.5239,0.3804,0.4891,0.3712,0.3828,0.4558,0.3358,0.5261,…}. o 2 -w i 2 The difference between the number of pixels in the outer window and the number of pixels in the inner window is 208.

[0164] Calculate the spectral gradient measurement value of the external window using the first spectral gradient curve and the average spectral gradient curve It is 0.6345.

[0165] W I The spectral gradient curve g of the 8th pixel in 8 (μ) is {0.4700,0.5288,0.3945,0.5521,0.4314,0.5619,0.4358,0.4510,0.4657,0.3991,0.5623,0.3723,0.5643,0.4220,0.5751,0.4523,0.3949,0.4733,0.3760,0.5577,…}.

[0166] The spectral gradient measurement value χ of the internal window is calculated using the second spectral gradient curve and the average spectral gradient curve 8 It is 0.4951.

[0167] The spectral gradient measurement value c corresponding to the pixel point at the centroid position of the internal window is expressed as χ t, the specific value is 0.4590.

[0168] Determine the spectral gradient measurement value c corresponding to the pixel point at the centroid position of the internal window, and calculate the gradient contrast using the spectral gradient measurement value of the external window, the spectral gradient measurement value of the internal window, and the spectral gradient measurement value c. Exemplarily, is 2, and Φ is 0.7843.

[0169] Finally, the spectral gradient measurement value c of the pixel at the centroid position of the internal window is multiplied by the gradient contrast to obtain the detection value, which is mapped to the grayscale value range (usually 0 to 255) through linear mapping and normalization methods. According to the grayscale value of each pixel, a grayscale image is generated. In this grayscale image, brighter pixels indicate a higher degree of abnormality, while darker pixels indicate a lower degree of abnormality.

[0170] In this embodiment, if Figure 4 The hyperspectral image anomaly detection result diagram is shown. The three white locations in the diagram are abnormal targets.

[0171] Example 3

[0172] This embodiment also provides a hyperspectral image anomaly detection system based on spectral cube features and gradient contrast, such as Figure 5 A structural diagram showing the system includes:

[0173] A spectral cube feature map construction module is used to extract spectral cube features from the spectral curve of each pixel point of the acquired hyperspectral image, calculate the spectral gradient curve based on the spectral cube features, and construct a spectral cube feature map using the spectral gradient curve;

[0174] A structural design module is used to adopt an inner and outer double window structure, set each pixel point of the spectral cube feature map as the center of the outer window and the inner window, make the inner window the central block of the outer window, and determine the remaining outer window blocks after removing the central block;

[0175] An external window spectral gradient measurement value calculation module is used to determine a first spectral gradient curve of the a-th pixel point of the remaining external window block, calculate an average spectral gradient curve based on the first spectral gradient curve, and calculate a spectral gradient measurement value of the external window using the first spectral gradient curve and the average spectral gradient curve;

[0176] An internal window spectral gradient measurement value calculation module is used to determine a second spectral gradient curve of the b-th pixel point in the internal window, and calculate the spectral gradient measurement value of the internal window using the second spectral gradient curve and the average spectral gradient curve;

[0177] The detection image generation module is used to determine the spectral gradient measurement value c corresponding to the pixel point at the centroid position of the internal window, calculate the gradient contrast using the spectral gradient measurement value of the external window, the spectral gradient measurement value of the internal window and the spectral gradient measurement value c, and obtain a hyperspectral anomaly detection image based on the gradient contrast.

[0178] The embodiments are merely examples for clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the embodiments here. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the claims of the present invention.

Claims

1. A hyperspectral image anomaly detection method based on spectral cube features and gradient contrast, characterized in that: The detection method comprises the following steps: S1: extracting spectral cubic features from the spectral curve of each pixel point of the acquired hyperspectral image, calculating the spectral gradient curve based on the spectral cubic features, and constructing a spectral cubic feature map using the spectral gradient curve; S2: adopt an inner and outer double window structure, set each pixel point of the spectral cube feature map as the center of the outer window and the inner window, make the inner window the center block of the outer window, and determine the remaining outer window blocks after removing the center block; S3: determining a first spectral gradient curve of the a-th pixel point of the remaining external window block, calculating an average spectral gradient curve based on the first spectral gradient curve, and calculating a spectral gradient measurement value of the external window using the first spectral gradient curve and the average spectral gradient curve; S4: determining a second spectral gradient curve of the b-th pixel point in the internal window, and calculating a spectral gradient measurement value of the internal window using the second spectral gradient curve and the average spectral gradient curve; S5: Determine the spectral gradient measurement value c corresponding to the pixel point at the centroid position of the internal window, calculate the gradient contrast using the spectral gradient measurement value of the external window, the spectral gradient measurement value of the internal window and the spectral gradient measurement value c, and obtain a hyperspectral anomaly detection image based on the gradient contrast.

2. The method for detecting anomalies in hyperspectral images based on spectral cube features and gradient contrast according to claim 1, characterized in that: The spectral cube features in step S1 include spatial direction features: The extraction process of the spatial direction feature satisfies: The horizontal gradient is calculated using the spectral curve of each pixel of the hyperspectral image. The calculation expression of the horizontal gradient is: In the formula, c i,j (γ) represents the spectral curve, represents the horizontal gradient, i represents the abscissa of each pixel in the hyperspectral image, j represents the ordinate of each pixel in the hyperspectral image, γ represents the wavelength of the spectral curve of each pixel in the hyperspectral image, and I represents the maximum value of i; The vertical gradient is calculated using the spectral curve of each pixel of the hyperspectral image. The vertical gradient calculation expression is: In the formula, represents the vertical gradient, J represents the maximum value of j; The spectral gradient is calculated using the spectral curve of each pixel point of the hyperspectral image. The spectral gradient calculation expression is: In the formula, represents the spectral gradient, Γ represents the maximum value of γ; According to the horizontal gradient, the vertical gradient and the spectral gradient, the multi-dimensional gradient amplitude is calculated. The multi-dimensional gradient amplitude calculation expression is: In the formula, α i,j (γ) represents the multi-dimensional gradient amplitude; The spatial direction gradient angle is calculated according to the horizontal gradient and the vertical gradient. The spatial direction gradient angle calculation expression is: In the formula, β i,j (γ) represents the spatial direction gradient angle; Setting β Space direction area K β , the index calculation expression of the spatial direction gradient angle in the corresponding spatial direction area is: In the formula, Represents the index of the spatial direction gradient angle in the corresponding spatial direction area, n β Represents the spatial direction area K β The number must be an integer; According to the index of the multi-dimensional gradient amplitude and the spatial direction gradient angle in the corresponding spatial direction area, the spatial direction feature calculation expression is: In the formula, p represents K β Serial number, represents the p-th spatial direction feature, represents the cubic parameter, and δ(·) represents the indicator function, which is 1 when the condition is true and 0 otherwise.

3. The method for detecting anomalies in hyperspectral images based on spectral cube features and gradient contrast according to claim 2, characterized in that: The spectral cube feature in step S1 also includes a spectral direction feature; The extraction process of the spectral direction feature satisfies: The spectral directional gradient angle is calculated according to the horizontal gradient, the vertical gradient and the spectral gradient. The spectral directional gradient angle calculation expression is: In the formula, θ i,j (γ) represents the spectral gradient angle; Setting θ Spectral direction area K θ , the index calculation expression of the spectral direction gradient angle in the corresponding spectral direction area is: in, Represents the index of the spectral direction gradient angle in the corresponding spectral direction area, n θ Indicates the spectral direction area K θ and is an integer; According to the index of the multi-dimensional gradient amplitude and the spectral direction gradient angle in the corresponding spectral direction area, the spectral direction feature is calculated as follows: In the formula, represents the spectral directional characteristics, q represents K θ Serial number.

4. The method for detecting anomalies in hyperspectral images based on spectral cube features and gradient contrast according to claim 3, characterized in that: The spectral gradient curve is calculated using the spatial direction characteristics and spectral direction characteristics. The calculation process is: In the formula, g i,j (μ) represents the spectral gradient curve.

5. The method for detecting anomalies in hyperspectral images based on spectral cube features and gradient contrast according to claim 1, characterized in that: Step S2 also includes: determining a corresponding segmentation line in the external window according to the boundary position of the internal window, dividing the external window into 8 remaining external window blocks after removing the center block which are completely aligned with the edge of the internal window, and numbering and recording the remaining external window blocks after removing the center block.

6. The method for detecting anomalies in hyperspectral images based on spectral cube features and gradient contrast according to claim 5, characterized in that: The process of calculating the average spectral gradient curve based on the first spectral gradient curve satisfies: In the formula, represents the average spectral gradient curve, represents the first spectral gradient curve of the ath pixel in the remaining external window block, w o Indicates the side length of the external window, w i represents the side length of the internal window, and σ represents the sequence number of the remaining external window blocks after removing the central block.

7. The method for detecting anomalies in hyperspectral images based on spectral cube features and gradient contrast according to claim 6, characterized in that: The calculation expression for calculating the spectral gradient measurement value of the external window using the first spectral gradient curve and the average spectral gradient curve is: In the formula, represents the spectral gradient measurement of the external window, represents the calculation of the inner product of two vectors, and ||·||2 represents the calculation of the square root of the sum of the squares of the components of the vectors; The calculation expression for calculating the spectral gradient measurement value of the internal window using the second spectral gradient curve and the average spectral gradient curve is: In the formula, χ b represents the spectral gradient measurement of the internal window, g b (μ) represents the second spectral gradient curve of the b-th pixel point in the internal window.

8. The method for detecting anomalies in hyperspectral images based on spectral cube features and gradient contrast according to claim 7, characterized in that: The process of calculating the gradient contrast using the spectral gradient measurement value of the external window, the spectral gradient measurement value of the internal window and the spectral gradient measurement value c satisfies: First, the spectral gradient measurement value of the outer window, the spectral gradient measurement value of the inner window, and the spectral gradient measurement value c are used to calculate the sequence number of the remaining outer window blocks that best remove the center block: In the formula, represents the sequence number of the remaining external window blocks after the optimal removal of the central block, χ t represents the spectral gradient measurement value c corresponding to the pixel point at the centroid position of the internal window; The corresponding spectral gradient measurement value is determined by using the sequence number of the remaining external window block after optimally removing the central block. The calculation expression of the gradient contrast is: Where Φ represents the gradient contrast.

9. The method for detecting anomalies in hyperspectral images based on spectral cube features and gradient contrast according to claim 1, characterized in that: The process of obtaining a hyperspectral anomaly detection image based on gradient contrast is as follows: multiplying the spectral gradient measurement value c of the pixel point at the centroid position of the internal window by the gradient contrast to obtain a detection value, converting the detection value into a grayscale value, and generating a grayscale image based on the grayscale value. The grayscale image is the hyperspectral anomaly detection image.

10. A hyperspectral image anomaly detection system based on spectral cube features and gradient contrast, comprising: A spectral cube feature map construction module is used to extract spectral cube features from the spectral curve of each pixel point of the acquired hyperspectral image, calculate the spectral gradient curve based on the spectral cube features, and construct a spectral cube feature map using the spectral gradient curve; A structural design module is used to adopt an inner and outer double window structure, set each pixel point of the spectral cube feature map as the center of the outer window and the inner window, make the inner window the central block of the outer window, and determine the remaining outer window blocks after removing the central block; An external window spectral gradient measurement value calculation module is used to determine a first spectral gradient curve of the a-th pixel point of the remaining external window block, calculate an average spectral gradient curve based on the first spectral gradient curve, and calculate a spectral gradient measurement value of the external window using the first spectral gradient curve and the average spectral gradient curve; The internal window spectral gradient measurement value calculation module is used to determine the second spectral gradient curve of the b-th pixel point in the internal window, and calculate the spectral gradient measurement value of the internal window using the second spectral gradient curve and the average spectral gradient curve. The detection image generation module is used to determine the spectral gradient measurement value c corresponding to the pixel point at the centroid position of the internal window, calculate the gradient contrast using the spectral gradient measurement value of the external window, the spectral gradient measurement value of the internal window and the spectral gradient measurement value c, and obtain a hyperspectral anomaly detection image based on the gradient contrast.

Citation Information

Cited By

  • Spectral information correction method and system for spectrum abnormal region

    CN120217270A

  • Method and system for correcting spectral information in spectral abnormality areas

    CN120217270B