Infrared weak and small target detection method and system based on nearest neighbor set isolation

By constructing features at the grayscale and gradient levels of infrared images, and using nearest neighbor ensemble isolation and three-neighbor differential operator technology, the missed detection and false alarm problems of existing infrared weak target detection methods in complex backgrounds are solved, and the precise detection and performance improvement of weak targets is achieved.

CN119693812APending Publication Date: 2025-03-25SOUTHWEST UNIV
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411630311.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-15
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

Existing infrared weak target detection methods are difficult to accurately detect weak targets in complex backgrounds, and are prone to missed detection or false alarms.

Method used

By performing attribute analysis at the grayscale and gradient levels, multi-scale grayscale differential characteristics and multi-directional gradient characteristics are constructed, the target is isolated from the background by using nearest neighbor ensemble isolation technology, and a three-neighborhood differential operator based on a double cross structure is designed to enhance the target signal and eliminate clutter.

Benefits of technology

Accurate detection of weak infrared targets is achieved, detection performance is improved, false alarm rate is reduced, and target signal is effectively enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119693812A_ABST
    Figure CN119693812A_ABST
Patent Text Reader

Abstract

The invention discloses an infrared weak and small target detection method and system based on nearest neighbor set isolation, and the method comprises the steps: extracting a multi-scale gray difference feature, a multi-direction gradient feature and a local minimum gradient feature from an original image, and aims at emphasizing an abnormal sample, especially a small target; next, the nearest neighbor sets are isolated and applied to the multi-scale gray difference feature set and the multi-direction gradient feature set, abnormal samples are separated from the data space through the nearest neighbor sets based on isolation, and a gray abnormal graph and a gradient abnormal graph are generated; then, fusing the gray anomaly graph, the gradient anomaly graph and the local minimum gradient graph to obtain a fused graph; then, designing a three-neighborhood difference operator based on a double-cross structure to further enhance the target and eliminate residual clutters; and finally, extracting a target by utilizing adaptive threshold segmentation to obtain a final detection result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of image processing and target detection, and in particular to a method and system for detecting infrared dim small targets based on nearest neighbor set isolation. Background Art

[0002] Infrared (IR) small target detection is crucial in remote sensing and has a wide range of applications in coastal defense, homeland security, aerospace, etc. However, in remote sensing thermal imaging, the target signal is often very small and weak, which poses a major challenge to the detection system. In addition, the variable background clutter in complex scenes seriously interferes with the accuracy and stability of small target extraction. Therefore, how to achieve accurate infrared small target detection remains a difficult problem. Current infrared small target detection methods are divided into three categories: background estimation filter-based methods, local feature-based methods, and low-rank sparse-based methods. Among them, low-rank sparse-based methods are easily interfered by sparse corners and strong edges and cannot suppress bright patches. Background estimation filter-based methods and local feature-based methods assume that small targets have a strong signal-to-noise ratio and are committed to suppressing sparse clutter and high-contrast clutter in discontinuous backgrounds. But at the same time, they will inadvertently amplify clutter interference similar to small targets, making it easy to miss targets with weak local signals. Moreover, these algorithms are difficult to deal with infrared small targets in complex backgrounds, which can easily lead to false alarms.

[0003] The above methods have conducted in-depth exploration of the local features of small targets, but have not utilized the abnormal characteristics of small targets in the entire image. Therefore, the characteristic differences between the target and the background have not been fully analyzed, which makes it easy to miss small and weak targets and reduce the detection performance. Summary of the invention

[0004] In view of this, the purpose of the present invention is to provide an infrared weak small target detection method and system based on nearest neighbor set isolation, perform attribute analysis at the grayscale and gradient levels, fully explore the local and global information of the data, expand the feature difference between the target and the background, isolate the target from the background through the nearest neighbor set, and construct a three-neighborhood differential operator based on a double cross structure to further enhance the target and eliminate clutter. By constructing the nearest neighbor set at different feature levels, the present invention can identify weak small targets belonging to abnormal samples from multiple angles, thereby realizing accurate detection of weak small targets, overcoming the shortcomings of existing methods, and effectively improving the infrared weak small target detection performance.

[0005] The present invention solves the technical problem by adopting the following technical scheme: extracting multi-scale grayscale differential features, multi-directional gradient features and local minimum gradient features from the original image, aiming to emphasize abnormal samples, especially small targets; then, applying the nearest neighbor set isolation to the multi-scale grayscale differential features and the multi-directional gradient feature set respectively, separating the abnormal samples from the data space by using the nearest neighbor set based on isolation, generating a grayscale abnormal map and a gradient abnormal map; then, fusing the grayscale abnormal map, the gradient abnormal map and the local minimum gradient map to obtain a fused map; then, designing a three-neighborhood differential operator based on a double cross structure to further enhance the target and eliminate residual clutter; finally, extracting the target by using adaptive threshold segmentation, and obtaining the final detection result.

[0006] The infrared dim small target detection method based on nearest neighbor set isolation provided by the present invention comprises the following steps:

[0007] Step 1, obtaining a single frame original infrared image to be detected;

[0008] Step 2, obtaining multi-scale grayscale difference features;

[0009] Step 3, obtaining a multi-directional gradient feature set;

[0010] Step 4, calculate the minimum gradient map;

[0011] Step 5, performing nearest neighbor set isolation on the multi-scale grayscale difference feature and the multi-directional gradient feature set, respectively, to obtain a grayscale anomaly map and a gradient anomaly map;

[0012] Step 6, performing dot multiplication on the grayscale anomaly map and the gradient anomaly map obtained in step 5 and the minimum gradient map obtained in step 4 to obtain a fusion map;

[0013] Step 7, calculating the three-neighborhood difference enhancement image of the fusion image;

[0014] Step 8: Perform adaptive threshold segmentation on the three-neighborhood difference enhancement image to obtain infrared weak target detection results.

[0015] Furthermore, in step 2, the single-scale grayscale difference map Gy is first calculated L , define Gy L The value of (x,y) is:

[0016] Gy L (x,y)=O(x,y)-M L (x,y)

[0017] Where O(x,y) is the pixel value at the coordinate (x,y) in the original infrared image, M L(x, y) is the average value of the remaining pixels after removing O(x, y) in a local area of ​​L×L size centered at (x, y); in order to finely characterize the details of targets of different sizes, L is set to multiple scales, and then the multi-scale grayscale difference features are obtained by the following method:

[0018]

[0019] Furthermore, the specific implementation of step 3 is as follows:

[0020] Step 3.1, first calculate the gradient vector map of the infrared image For the gradient vector at coordinate (x,y) The magnitude g(x,y) and polar angle α(x,y) are defined as:

[0021] g(x,y)=|g v (x,y)|+|g h (x,y)

[0022]

[0023] where g h (x,y) and g v (x, y) are the results of filtering the original infrared image with the Sobel horizontal convolution kernel and the vertical convolution kernel. After calculating all points, the gradient vector map is obtained.

[0024] Step 3.2: Gradient vector map The directions are divided into eight different categories;

[0025] Step 3.3, calculate the average gradient magnitude map Gd in each direction in turn i , define Gd i The value of (x,y) is:

[0026]

[0027] in Refers to the gradient vector in a local area of ​​size P×P centered at (x, y); N g is the number of gradient vectors belonging to the i-th direction in the local area; after calculating the average amplitude of all points, the average amplitude map of each direction is obtained, and a multi-directional gradient set is obtained by combining:

[0028] MGd={Gd1, Gd2, Gd3,…,Gd8}.

[0029] Furthermore, in step 4, the minimum gradient mGd under scale P is defined first P as follows:

[0030] mGd P = min(Gd i ) P , i = 1, 2, 3, …, 8

[0031] Then, define the maximum value at scale P as the minimum gradient map mmGd:

[0032] mmGd = max(mGd P )

[0033] Furthermore, the specific implementation of step 5 is as follows:

[0034] Step 5.1, given the multi-scale gray difference dataset where b is the dimension;

[0035] Step 5.2, let (ψ < M×N) be a subsample randomly sampled from the given dataset, and ψ represents the number of subsample pixels randomly selected from the dataset;

[0036] Step 5.3, determine each sample point px sub ∈ MGy sub the nearest point among the remaining sample points is called the nearest neighbor. Then, with each sample point as the center and the distance from itself to the nearest neighbor as the radius, construct a hypersphere H(px sub ), and the radius τ is defined as:

[0037]

[0038] where ||·|| refers to the Euclidean distance, and then obtain a set of hyperspheres;

[0039] Step 5.4, repeat step 5.2 and step 5.3 to obtain t sets of hyperspheres;

[0040] Step 5.5, for each pixel point px = {MGy1, MGy2, …, MGy , Crow, Ccol} in the given dataset, where Crow and Ccol are the values after normalizing the original image pixel coordinates; based on each set of hyperspheres, define the isolation fraction of the pixel point px as follows: b , Crow, Ccol}, where Crow and Ccol are the values after normalizing the original image pixel coordinates; based on each set of hyperspheres, define the isolation fraction of the pixel point px as follows:

[0041]

[0042] where refers to the hypersphere with the shortest distance between the hypersphere center and the pixel point px in a set of hyperspheres, τ(cnn(px)) refers to the radius of the hypersphere where px is located, τ(η cnn(px)) refers to the radius of the hypersphere closest to the hypersphere where px is located;

[0043] In step 5.6, since there are t sets of hyperspheres, the anomaly score of each pixel is defined as follows:

[0044]

[0045] Step 5.7, after calculating the anomaly scores of all pixels, the grayscale anomaly map GyA is obtained;

[0046] Step 5.8, given a multi-directional gradient feature set dataset Repeat steps 5.2 to 5.7 to obtain the gradient anomaly map GdA.

[0047] Furthermore, the calculation formula of the fusion graph Fu is as follows:

[0048] Fu=GyA*GdA*mmGd.

[0049] Furthermore, the specific implementation of step 7 is as follows:

[0050] Step 7.1, design a double cross structure, where T, Bi, BBi and BBBi, (i = 1, 2, ..., 8) represent the target unit, the first layer background unit, the second layer background unit and the third layer background unit, respectively, and the size of each unit is 3 × 3 pixels; in order to effectively enhance the target and suppress the halo, a three-neighborhood difference operator based on the double cross structure is introduced, denoted as DCTND; specifically, the double cross structure is constructed one by one from top to bottom and from left to right with the pixel Fu(x, y) in the fusion image as the center, and the minimum intensity difference between the background units and the center unit of the first, second and third layers is defined as:

[0051]

[0052] Where m T 、m Bi 、m BBi 、m BBBi They refer to the pixel mean of the central unit T, the mean of the first layer background unit, the mean of the second layer background unit, and the mean of the third layer background unit respectively;

[0053] Step 7.2, in order to effectively extract the target local contrast, the three-neighborhood difference DCTND of the pixel (x, y) is defined as follows:

[0054] DCTND(x,y)=D TB +D TBB +D TBBB

[0055] Where (x, y) refers to the coordinates of the pixel. After calculating the DCTND of all pixel coordinates, the DCTND enhanced image is obtained.

[0056] Furthermore, the specific implementation of step 8 is as follows:

[0057] Step 8.1, calculate the segmentation threshold Th of the DCTND enhancement image, the calculation formula is as follows:

[0058] Th=λ×DCTND max +(1-λ)×DCTND mean

[0059] Where DCTND max and DCTND mean is the maximum and mean of the DCTND enhancement map, λ is a given parameter;

[0060] Step 8.2, segment the DCTND enhanced image according to the threshold Th, set the pixel values ​​in the DCTND enhanced image greater than or equal to the threshold to 1, and set the pixel values ​​less than the threshold to 0, to obtain a binary image, and the pixels set to 1 will be used as the target output.

[0061] The present invention also provides an infrared small target detection system based on nearest neighbor set isolation, comprising the following modules:

[0062] The original infrared image acquisition module is used to acquire a single frame of original infrared image to be detected;

[0063] A multi-scale grayscale difference feature acquisition module is used to calculate a multi-scale grayscale difference feature map;

[0064] A multi-directional gradient feature set acquisition module is used to calculate a multi-directional gradient feature set;

[0065] Minimum gradient feature acquisition module, used for minimum gradient feature map;

[0066] The grayscale anomaly map and gradient anomaly map acquisition module respectively performs nearest neighbor set isolation on the multi-scale grayscale difference features and the multi-directional gradient feature set to obtain the grayscale anomaly map and the gradient anomaly map;

[0067] A fusion image acquisition module is used to perform point multiplication on the grayscale anomaly map, the gradient anomaly map and the minimum gradient feature map to obtain a fusion image;

[0068] A three-neighborhood difference enhancement map acquisition module is used to calculate the three-neighborhood difference value of each pixel and obtain the three-neighborhood difference enhancement map of the fused image;

[0069] The infrared small target acquisition module is used to calculate the segmentation threshold Th of the three-neighborhood difference enhancement image, and use the threshold to perform binary segmentation on the three-neighborhood difference enhancement image to obtain the infrared small target.

[0070] Compared with the prior art, the present invention and its preferred embodiments have at least the following outstanding features and beneficial effects:

[0071] (1) According to the abnormal characteristics of small targets relative to the background, the present invention constructs multi-scale grayscale difference features and multi-directional gradient features, expands the difference between the target and the background at multiple feature levels, and further enhances the abnormality of small targets.

[0072] (2) In order to more accurately isolate abnormal samples belonging to weak targets, the nearest neighbor sets are constructed for grayscale features and gradient features respectively, and abnormal targets at the grayscale and gradient levels are isolated. It is not necessary to consider the local saliency of the target, and weak targets can be effectively enhanced.

[0073] (3) A three-neighborhood difference operator based on a double cross structure is designed to effectively deal with the target fragmentation and halo phenomena in the fused image, accurately locate the target, and further enhance the target and remove clutter. BRIEF DESCRIPTION OF THE DRAWINGS

[0074] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments:

[0075] Figure 1 A flowchart provided for an embodiment of the present invention;

[0076] Figure 2 A schematic diagram of the direction classification of the gradient vector provided by an embodiment of the present invention;

[0077] Figure 3 A schematic diagram of a double cross structure provided by an embodiment of the present invention;

[0078] Figure 4 The ROC curve diagram of the method provided in the embodiment of the present invention and the existing algorithm. DETAILED DESCRIPTION

[0079] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention is further described in detail below in conjunction with the accompanying drawings and examples. It should be noted that the following detailed descriptions are all illustrative and are intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used in this specification have the same meanings as those commonly understood by those of ordinary skill in the art to which the present application belongs.

[0080] like Figure 1 As shown, the target detection method process is represented in the form of a flowchart.

[0081] The specific process steps of the infrared dim small target detection method based on nearest neighbor set isolation described in the present invention are as follows:

[0082] Step 1, obtain a single frame original infrared image O to be detected, whose size is M×N, and the grayscale value of the pixel of the image O is represented by O(x, y), where x and y represent pixel coordinates, x=1, 2, ..., M, y=1, 2, ..., N;

[0083] Step 2: Obtain the multi-scale grayscale difference feature MGy. Specifically, first calculate the single-scale grayscale difference map Gy L , define Gy L The value of (x,y) is:

[0084] Gy L (x,y)=O(x,y)-M L (x,y)

[0085] Where O(x,y) is the pixel value at the coordinate (x,y) in the original infrared image, M L (x, y) is the average value of the remaining pixels after removing O(x, y) in a local area of ​​size L×L centered at (x, y). In order to finely characterize the details of targets of different sizes, L can be set to multiple scales. In an optional embodiment, L is set to 3, 5, 7, and 9. Then, the multi-scale grayscale difference feature can be obtained by the following method:

[0086]

[0087] Step 3, obtaining a multi-directional gradient feature set MGd. Specifically, it includes the following sub-steps:

[0088] Step 3.1, first calculate the gradient vector map of the infrared image For the gradient vector at coordinate (x,y) The magnitude g(x,y) and polar angle α(x,y) are defined as:

[0089] g(x,y)=|g v (x,y)|+|g h (x,y)

[0090]

[0091] where g h (x,y) and g v (x, y) are the results of filtering the original infrared image using the Sobel horizontal convolution kernel and the vertical convolution kernel. After calculating all points, the gradient vector map is obtained.

[0092] Step 3.2: Gradient vector map The directions are divided into eight different categories, such as Figure 2 shown.

[0093] Step 3.3, calculate the average gradient magnitude map Gd in each direction in sequence i , define the value of Gd i (x, y) as follows:

[0094]

[0095] where refers to the gradient vector within the local area of size P×P centered on (x, y), and α refers to the polar angle of the gradient vector. In an optional embodiment, the optimal value of P is 9. N g is the number of gradient vectors belonging to the i-th direction within the local area. After calculating the average magnitude of all points, we obtain the average magnitude map in each direction, and combine them to obtain a multi-directional gradient set:

[0096] MGd = {Gd1, Gd2, Gd3, …, Gd8}

[0097] Step 4, calculate the minimum gradient map mmGd. Specifically, define the minimum gradient mGd at scale P P as follows:

[0098] mGd P = min(Gd i ) P , i = 1, 2, 3, …, 8

[0099] Since the target size is unknown, in order to accurately measure the most suitable minimum gradient, multiple scales need to be calculated for the minimum gradient. In an optional embodiment, P is set to 5 and 9 respectively. Therefore, define the maximum value at the two scales as the minimum gradient map mmGd:

[0100] mmGd = max(mGd P ), P = 5, 9

[0101] Step 5, perform nearest neighbor set isolation on the multi-scale gray difference feature MGy and the multi-directional gradient feature set MGd respectively to obtain the gray anomaly map and the gradient anomaly map. Specifically, it includes the following sub-steps:

[0102] Step 5.1, given the multi-scale gray difference data set where b is the dimension, for the multi-scale gray difference feature map, b = 1.

[0103] Step 5.2, let (ψ < M×N) be the subsample randomly sampled from the given data set, and ψ represents the number of subsample pixels randomly selected from the data set. In an optional embodiment, the optimal value of ψ is 32.

[0104] Step 5.3, determine each sample point px one by one sub∈MGy sub The closest point among the remaining sample points (usually called the nearest neighbor), and then each sample point takes itself as the center and the distance from itself to the nearest neighbor as the radius to construct a hypersphere H(px sub ), the radius τ is defined as:

[0105]

[0106] where ||·|| refers to the Euclidean distance. Then we get a set of hyperspheres.

[0107] Step 5.4, repeating steps 5.2 and 5.3, can obtain t groups of hyperspheres. In an optional embodiment, the optimal value of t is 50. Each sampling point is independently randomly sampled from all the original data, and a group of hyperspheres is an independent training model. Since multiple groups of hyperspheres are trained, this method is ensemble learning.

[0108] Step 5.5, given a dataset Each pixel px in b ,Crow,Ccol}, where Crow and Ccol are the normalized values ​​of the original image pixel coordinates. Based on each set of hyperspheres, the isolation score of the pixel px is defined as follows:

[0109]

[0110] in It refers to the hypersphere with the shortest distance between the pixel point px and the center of the hypersphere, τ(cnn(px)) refers to the radius of the hypersphere where px is located, τ(η cnn(px) ) refers to the radius of the hypersphere closest to the hypersphere where px is located.

[0111] In step 5.6, since there are t sets of hyperspheres, the anomaly score of each pixel is defined as follows:

[0112]

[0113] Step 5.7, after calculating the anomaly scores of all pixels, the grayscale anomaly map GyA is obtained.

[0114] Step 5.8, given a multi-directional gradient feature set dataset Where b = 8. Then repeat the techniques from step 5.2 to step 5.7 to obtain the gradient anomaly map GdA.

[0115] Step 6, perform dot multiplication on the grayscale anomaly map and gradient anomaly map obtained in step 5 and the minimum gradient map obtained in step 4, and calculate the fusion map Fu according to the following formula:

[0116] Fu=GyA*GdA*mmGd

[0117] Step 7, calculate the three-neighborhood difference (DCTND) enhancement map of the fused image. Specifically, it includes the following sub-steps:

[0118] Step 7.1, a double cross structure is designed, such as Figure 3 As shown in the figure, T, Bi, BBi and BBBi, (i = 1, 2, ..., 8) represent the target unit, the first layer background unit, the second layer background unit and the third layer background unit, respectively, and the size of each unit is 3 × 3 pixels. In order to effectively enhance the target and suppress the halo, a double cross three-neighborhood difference operator (expressed as DCTND) based on a double cross structure is introduced. Specifically, the double cross structure is constructed one by one from top to bottom and from left to right with the pixel Fu (x, y) in the fusion image as the center. The minimum intensity difference between the background units and the center unit of the first, second and third layers is defined as:

[0119]

[0120] Where m T 、m Bi 、m BBi 、m BBBi They refer to the pixel mean of the central unit T, the mean of the first layer background units, the mean of the second layer background units, and the mean of the third layer background units respectively.

[0121] Step 7.2, in order to effectively extract the target local contrast, the three-neighborhood difference DCTND of the pixel (x, y) is defined as follows:

[0122] DCTND(x,y)=D TB +D TBB +D TBBB

[0123] Where (x, y) refers to the coordinates of the pixel. After calculating the DCTND of all pixel coordinates, the DCTND enhanced image is obtained.

[0124] Step 8, performing adaptive threshold segmentation on the DCTND enhanced image to obtain infrared weak small target detection results, specifically including the following sub-steps:

[0125] Step 8.1, calculate the segmentation threshold Th of the DCTND enhancement image, the calculation formula is as follows:

[0126] Th=λ×DCTND max +(1-λ)×DCTND mean

[0127] Where DCTND max and DCTNDmean is the maximum and mean value of the DCTND enhancement map, and λ is a given parameter. In an optional embodiment, the optimal range of λ is between 0.3 and 0.5.

[0128] Step 8.2, segment the DCTND enhanced image according to the threshold Th, set the pixel values ​​in the DCTND enhanced image greater than or equal to the threshold to 1, and set the pixel values ​​less than the threshold to 0, to obtain a binary image. The pixels set to 1 will be output as the target.

[0129] In order to prove the effectiveness and detection ability of this method, the infrared small target public dataset IRSTD-1K was selected for verification and compared with other commonly used target detection methods. The other compared algorithms are: non-deep learning algorithms (LCM, AMWLCM, ASPCM, FKRW, PLLCM, PSTNN, LogTFNN) and deep learning algorithms (ACM-U-Net and RDIAN). Figure 4 The ROC curves of various algorithms are shown. The vertical axis of the curve is the detection rate, and the horizontal axis is the false alarm rate. The closer the curve is to the upper left corner, the better the detection effect. AUC refers to the area under the curve. The larger the value, the better the detection performance. Figure 4 It can be seen that the curve of the method of the present invention is at the upper left corner of the other methods, and the AUC value of the present invention is the largest, which proves that the method of the present invention has stronger detection performance.

[0130] The present invention also discloses an infrared small target detection system based on nearest neighbor set isolation, comprising the following modules:

[0131] The original infrared image acquisition module is used to acquire a single frame of original infrared image to be detected;

[0132] A multi-scale grayscale difference feature acquisition module is used to calculate a multi-scale grayscale difference feature map;

[0133] A multi-directional gradient feature set acquisition module is used to calculate a multi-directional gradient feature set;

[0134] Minimum gradient feature acquisition module, used for minimum gradient feature map;

[0135] The grayscale anomaly map and gradient anomaly map acquisition module respectively performs nearest neighbor set isolation on the multi-scale grayscale difference features and the multi-directional gradient feature set to obtain the grayscale anomaly map and the gradient anomaly map;

[0136] A fusion image acquisition module is used to perform point multiplication on the grayscale anomaly map, the gradient anomaly map and the minimum gradient feature map to obtain a fusion image;

[0137] A three-neighborhood difference enhancement map acquisition module is used to calculate the three-neighborhood difference value of each pixel and obtain the three-neighborhood difference enhancement map of the fused image;

[0138] The infrared small target acquisition module is used to calculate the segmentation threshold Th of the three-neighborhood difference enhancement image, and use the threshold to perform binary segmentation on the three-neighborhood difference enhancement image to obtain the infrared small target.

[0139] The specific implementation method of each module is the same as each step and will not be described in detail in the present invention.

[0140] The above is only a preferred embodiment of the present invention, and does not limit the present invention in other forms. Any technician familiar with the profession may use the above disclosed technical content to change or modify it into an equivalent embodiment with equivalent changes. However, any simple modification, equivalent change and modification made to the above embodiment according to the technical essence of the present invention without departing from the technical solution of the present invention still belongs to the protection scope of the technical solution of the present invention.

[0141] This patent is not limited to the above-mentioned optimal implementation mode. Anyone can derive other various forms of infrared weak target detection methods based on nearest neighbor set isolation under the inspiration of this patent. All equal changes and modifications made according to the scope of the patent application of the present invention should be covered by this patent.

Claims

1. An infrared small target detection method based on nearest neighbor set isolation, characterized in that: The steps include: Step 1, obtaining a single frame original infrared image to be detected; Step 2, obtaining multi-scale grayscale difference features; Step 3, obtaining a multi-directional gradient feature set; Step 4, calculate the minimum gradient map; Step 5, performing nearest neighbor set isolation on the multi-scale grayscale difference feature and the multi-directional gradient feature set, respectively, to obtain a grayscale anomaly map and a gradient anomaly map; Step 6, performing dot multiplication on the grayscale anomaly map and the gradient anomaly map obtained in step 5 and the minimum gradient map obtained in step 4 to obtain a fusion map; Step 7, calculating the three-neighborhood difference enhancement image of the fusion image; Step 8: Perform adaptive threshold segmentation on the three-neighborhood difference enhancement image to obtain infrared weak target detection results.

2. The infrared small target detection method based on nearest neighbor set isolation as claimed in claim 1, characterized in that: The specific implementation of step 2 is as follows: First calculate the single-scale grayscale difference map Gy L , define Gy L The value of (x,y) is: Gy L (x,y)=O(x,y)-M L (x,y) Where O(x,y) is the pixel value at the coordinate (x,y) in the original infrared image, M L (x, y) is the average value of the remaining pixels after removing O(x, y) in a local area of ​​L×L size centered at (x, y); in order to finely characterize the details of targets of different sizes, L is set to multiple scales, and then the multi-scale grayscale difference features are obtained by the following method:

3. The infrared small target detection method based on nearest neighbor set isolation as claimed in claim 1, characterized in that: The specific implementation of step 3 is as follows: Step 3.1, first calculate the gradient vector map of the infrared image For the gradient vector at coordinate (x,y) The magnitude g(x,y) and polar angle α(x,y) are defined as: g(x,y)=|g v (x,y)|+|g h (x,y) where g h (x,y) and g v (x, y) are the results of filtering the original infrared image with the Sobel horizontal convolution kernel and the vertical convolution kernel. After calculating all points, the gradient vector map is obtained. Step 3.2: Gradient vector map The directions are divided into eight different categories; Step 3.3, calculate the average gradient magnitude map Gd in each direction in turn i , define Gd i The value of (x,y) is: in Refers to the gradient vector in a local area of ​​size P×P centered at (x, y); N g is the number of gradient vectors belonging to the i-th direction in the local area; after calculating the average amplitude of all points, the average amplitude map of each direction is obtained, and a multi-directional gradient set is obtained by combining: MGd={Gd1, Gd2, Gd3,…,Gd8}.

4. The infrared small target detection method based on nearest neighbor set isolation as claimed in claim 3 is characterized in that: In step 4, first define the minimum gradient mGd under scale P P as follows: mGd P =min(Gd i ) P ,i=1,2,3,…,8 Then, the maximum value at scale P is defined as the minimum gradient map mmGd: mmGd=max(mGd P )。 5. The infrared small target detection method based on nearest neighbor set isolation as claimed in claim 1, characterized in that: The specific implementation of step 5 is as follows: Step 5.1, given a multi-scale grayscale difference dataset Where b is the dimension; Step 5.2, set is a randomly sampled subsample of a given dataset, and ψ represents the number of subsample pixels randomly selected from the dataset; Step 5.3, determine each sample point px one by one sub ∈MGy sub The closest point among the remaining sample points Then each sample point takes itself as the center and the distance from itself to the nearest neighbor as the radius to construct a hypersphere H(px sub ), the radius τ is defined as: where ||·|| refers to the Euclidean distance, and then a set of hyperspheres are obtained; Step 5.4, repeat steps 5.2 and 5.3 to obtain t groups of hyperspheres; Step 5.5, given a dataset Each pixel px in b ,Crow,Ccol}, where Crow and Ccol are the normalized values ​​of the original image pixel coordinates; based on each set of hyperspheres, the isolated fraction of the pixel px is defined as follows: in It refers to the hypersphere with the shortest distance between the center of the hypersphere and the pixel px in each group of hyperspheres. τ(cnn(px)) refers to the radius of the hypersphere where px is located. τ(η cnn(px) ) refers to the radius of the hypersphere closest to the hypersphere where px is located; In step 5.6, since there are t sets of hyperspheres, the anomaly score of each pixel is defined as follows: Step 5.7, after calculating the anomaly scores of all pixels, the grayscale anomaly map GyA is obtained; Step 5.8, given a multi-directional gradient feature set dataset Repeat steps 5.2 to 5.7 to obtain the gradient anomaly map GdA.

6. The infrared small target detection method based on nearest neighbor set isolation as claimed in claim 1, characterized in that: The calculation formula of the fusion graph Fu is as follows: Fu=GyA*GdA*mmGd.

7. The infrared small target detection method based on nearest neighbor set isolation as claimed in claim 1, characterized in that: The specific implementation of step 7 is as follows: Step 7.1, design a double cross structure, where T, Bi, BBi and BBBi, (i = 1, 2, ..., 8) represent the target unit, the first layer background unit, the second layer background unit and the third layer background unit, respectively, and the size of each unit is 3 × 3 pixels; in order to effectively enhance the target and suppress the halo, a three-neighborhood difference operator based on the double cross structure is introduced, denoted as DCTND; specifically, the double cross structure is constructed one by one from top to bottom and from left to right with the pixel Fu(x, y) in the fusion image as the center, and the minimum intensity difference between the background units and the center unit of the first, second and third layers is defined as: Where m T 、m Bi 、m BBi 、m BBBi They refer to the pixel mean of the central unit T, the mean of the first layer background unit, the mean of the second layer background unit, and the mean of the third layer background unit respectively; Step 7.2, in order to effectively extract the target local contrast, the three-neighborhood difference DCTND of the pixel (x, y) is defined as follows: DCTND(x,y)=D TB +D TBB +D TBBB Where (x, y) refers to the coordinates of the pixel. After calculating the DCTND of all pixel coordinates, the DCTND enhanced image is obtained.

8. The infrared small target detection method based on nearest neighbor set isolation as claimed in claim 1, characterized in that: The specific implementation of step 8 is as follows: Step 8.1, calculate the segmentation threshold Th of the DCTND enhancement image, the calculation formula is as follows: Th=λ×DCTND max +(1-λ)×DCTND mean Where DCTND max and DCTND mean is the maximum and mean of the DCTND enhancement map, λ is a given parameter; Step 8.2, segment the DCTND enhanced image according to the threshold Th, set the pixel values ​​in the DCTND enhanced image greater than or equal to the threshold to 1, and set the pixel values ​​less than the threshold to 0, to obtain a binary image, and the pixels set to 1 will be used as the target output.

9. Infrared small target detection system based on nearest neighbor set isolation, characterized in that: Includes the following modules: The original infrared image acquisition module is used to acquire a single frame of original infrared image to be detected; A multi-scale grayscale difference feature acquisition module is used to calculate a multi-scale grayscale difference feature map; A multi-directional gradient feature set acquisition module is used to calculate a multi-directional gradient feature set; Minimum gradient feature acquisition module, used for minimum gradient feature map; The grayscale anomaly map and gradient anomaly map acquisition module respectively performs nearest neighbor set isolation on the multi-scale grayscale difference features and the multi-directional gradient feature set to obtain the grayscale anomaly map and the gradient anomaly map; A fusion image acquisition module is used to perform point multiplication on the grayscale anomaly map, the gradient anomaly map and the minimum gradient feature map to obtain a fusion image; A three-neighborhood difference enhancement map acquisition module is used to calculate the three-neighborhood difference value of each pixel and obtain the three-neighborhood difference enhancement map of the fused image; The infrared small target acquisition module is used to calculate the segmentation threshold Th of the three-neighborhood difference enhancement image, and use the threshold to perform binary segmentation on the three-neighborhood difference enhancement image to obtain the infrared small target.

Citation Information

Cited By

  • Weak rock stratum zone hyperspectral remote sensing identification method for railway engineering geological reconnaissance

    CN122336569A

  • Hyperspectral remote sensing identification method for soft rock stratum belt in railway engineering geological survey

    CN122336569B