Infrared small target detection method based on image block gradient and improved annular contrast
By adopting detection methods based on image block gradient and improved ring contrast in infrared small object detection, the problem of high false alarm rate and time-consuming caused by high bright noise and complex background in the prior art is solved, and higher detection accuracy and real-time performance are achieved.
Patent Information
- Application Number
- CN202411794038.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-03-28
AI Technical Summary
When dealing with high bright noise and complex backgrounds, the existing infrared small object detection algorithm has a high false alarm rate and takes a long time, making it difficult to achieve real-time detection.
Using a detection method based on image block gradient and improved ring contrast, local contrast is calculated through an annular structure window, and weighted factors are calculated based on multi-directional image block gradient information to generate a weighted improved ring local contrast map, and adaptively segment the threshold to realize infrared small object detection.
It effectively reduces false alarm problems caused by high-brightness interference and complex background in infrared small target detection, and improves the accuracy and real-time detection.
Smart Images

Figure CN119723046A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of infrared image detection, and in particular to an infrared small target detection method based on image block gradient and improved annular contrast. Background Art
[0002] With the advancement and development of science and technology, "low, small and slow" aircraft such as drones and aerostats are becoming more and more common, which has played a huge role in promoting the development of national production industries, but at the same time it has also brought considerable potential threats to public safety. Therefore, it is necessary to effectively detect and stably track such aircraft; similarly, in the military field, accurate monitoring is also required for highly threatening non-cooperative targets such as ballistic missiles and high-altitude unmanned reconnaissance aircraft.
[0003] Currently, the main detection methods for this type of target include visible light detection, radar detection, acoustic detection and infrared detection; infrared weak target detection methods can be roughly divided into filtering-based detection algorithms, local contrast-based detection algorithms, data optimization-based detection algorithms and depth-based detection algorithms.
[0004] There are three main types of filtering-based detection algorithms: spatial domain filtering, frequency domain filtering, and morphological filtering. The detection effect of this type of algorithm is largely affected by the filter window and the shape of the structural element, and has poor adaptability to complex backgrounds with a large number of edges and random highlight noise.
[0005] The infrared small target detection algorithm based on data optimization realizes the detection of the target by establishing a data optimization model of the target and the background. However, for infrared images with random highlight noise and strong short edges, the false alarm rate of the algorithm is often high, and this type of algorithm is time-consuming and often cannot be used for real-time detection.
[0006] The deep learning-based detection algorithm is based on the constructed network model and trains the existing data to generate the detection network. However, there are currently few infrared small target data sets and the generalization ability of the algorithm needs to be verified. Summary of the invention
[0007] In order to solve the problem of high false alarm rate caused by highlight noise and edges in existing algorithms, the present application provides an infrared small target detection method based on image block gradient and improved ring contrast.
[0008] This application provides an infrared small target detection method based on image block gradient and improved ring contrast, which adopts the following technical solutions:
[0009] An infrared small target detection method based on image block gradient and improved ring contrast comprises the following steps:
[0010] S1, obtain the original image;
[0011] S2, calculating the annular local contrast based on the annular structure window and the image pixel coordinate values;
[0012] S3, calculating the weighting factor of the image based on the multi-directional image block gradient information and the image enhancement scheme;
[0013] S4, calculating a weighted improved annular local contrast map according to the obtained weighting factor and the annular local contrast;
[0014] S5, calculating an adaptive segmentation threshold according to the annular local contrast map, and obtaining a final detection map;
[0015] S6. Complete the detection of small infrared targets according to the final detection image.
[0016] Optionally, in step S2, the original image is pre-enhanced to eliminate the influence of random noise and highlight noise on detection, and the pre-enhancement method is:
[0017]
[0018] Among them, M C represents the image after pre-enhancement, G n Indicates the central area Ω C The nth largest pixel value, Represents G n The weighting factor of K represents the number of pixels used.
[0019] Optionally, in step S2, after pre-enhancement is completed, the annular structure window in the original image is taken, and the annular structure window is divided into a central area, an isolated area, and an annular background area; the central area Ω C Set to a 3*3 image block, isolate area Ω I The width of the circular background area is 1 pixel. It can be expressed as
[0020]
[0021] Among them, (x, y) is the coordinate of the center pixel, (p, q) is the pixel coordinate of the annular background area, k is the serial number of the annular background area, L is the maximum number of annular background areas, and the dist() function represents the spatial distance between two pixels.
[0022] Optionally, the annular local contrast IRLCM in step S2 is:
[0023]
[0024] In the formula, The annular background area The grayscale mean, The annular background area The maximum gray value of represents the pixel weighting factor of the annular background area, (p, q) represents the pixel coordinates of the annular background area, (x0, y0) is the central pixel coordinates of the local structure, α is the coefficient used to estimate the standard deviation, exp() represents the natural exponential function, ⊙ represents the Hadamard product, Norm() represents the normalization function, and mean() represents the mean function.
[0025] Optionally, in step S3, in order to obtain the multi-directional image block gradient information, it is necessary to first design a structural window that meets the small target. The structural window is a 3*3 rectangular window, the values at the four corners are 0, and the remaining values are 1; the pixel value of a specific serial number in the structural window is output through the sorting filter operation as the gray value I of the current pixel point pre , specifically:
[0026] I pre =imfilter ord (I raw ,se1,item)
[0027] Among them, I raw represents the original image, se1 represents the structure window, item represents the sequence number of the output pixel grayscale value, imfilter ord () represents the sorting filter method;
[0028] Then extract the multi-directional image block gradient information of the sorted filtered image, specifically:
[0029] I mdbg =imfilter(I pre ,se2)
[0030] Among them, I mdbg It represents the multi-directional image block gradient information of the image, imfilter() represents the filtering operation, se2 represents the multi-directional image block filtering operator, the multi-directional image block filtering operator is a 5*5 rectangular operator, and the operators in the first row are: -1, -2, -1, -2, -1; the operators in the second row are: -2, 0, 3, 0, -2; the operators in the third row are: -1, 3, 8, 3, -1; the operators in the fourth row are: -2, 0, 3, 0, -2; the operators in the fifth row are: -1, -2, -1, -2, -1.
[0031] Optionally, to obtain the image enhancement solution described in step S3, two eigenvalues λ1, λ2 of the structure tensor need to be calculated. The structure tensor ST is specifically:
[0032]
[0033] Among them, T 11 =g x g x T ,T 12 =g x g y T ,T 21 =g y g x T ,T 22 =g y g y T , g x ,g y are the gradients of the current pixel in the x and y directions, G σ represents the Gaussian blur function, σ is the standard deviation of the Gaussian kernel, then the two eigenvalues λ1 and λ2 of the structure tensor are
[0034]
[0035] According to the structure tensor eigenvalue, the following image enhancement scheme I can be obtained stru :
[0036]
[0037] Optionally, the weighting factor W of the image obtained in step S3 is:
[0038] W=I mdbg ⊙I stru .
[0039] Optionally, the weighted improved annular local contrast map MGIRLCM obtained in step S4 is:
[0040] MGIRLCM=IRLCM⊙W.
[0041] Furthermore, the adaptive segmentation threshold Th of the image obtained in step S5 is:
[0042] Th=βmax(MGIRLSM)+(1-β)mean(MGIRLCM)
[0043] Among them, β is a constant between 0 and 1, max() represents the maximum pixel value in the image, and mean() represents the mean pixel value of the image.
[0044] Furthermore, the final detection image GT obtained in step S5 MGIRLCM for:
[0045] GTMGIRLCM =seg BW (MGIRLCM,Th)
[0046] Among them, seg BW ( ) represents a binary segmentation function, and infrared small target detection can be completed through the final detection image.
[0047] In summary, this application includes the following beneficial technical effects:
[0048] The present application calculates the annular local contrast based on the annular structure window and the image pixel coordinate values, and calculates the weighted factor of the image based on the multi-directional image block gradient information and the image enhancement scheme; a weighted improved annular local contrast map is obtained, which solves the high false alarm problem caused by high-brightness interference pixels and complex backgrounds (such as roads, thick clouds, building corners, etc.) in infrared weak and small target detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 This is the overall process of this application;
[0050] Figure 2 is a schematic diagram of the ring structure window in step S2;
[0051] Figure 3 is a schematic diagram of the structure window in step S4;
[0052] Figure 4 Schematic diagram of the multi-directional image block filtering operator in step S4. DETAILED DESCRIPTION
[0053] The following is combined with Figure 1-4 This application is described in further detail.
[0054] The present application embodiment discloses a method for detecting small infrared targets based on image block gradient and improved annular contrast, comprising the following steps:
[0055] S1, obtain the original image;
[0056] S2. Calculate the annular local contrast based on the annular structure window and the image pixel coordinate values, specifically:
[0057] First, pre-enhance the original image to eliminate the influence of random noise and highlight noise on detection. The pre-enhancement method is as follows:
[0058]
[0059] Among them, M C represents the image after pre-enhancement, G n Indicates the central area Ω CThe nth largest pixel value, Represents G n The weighting factor of K represents the number of pixels used;
[0060] After pre-enhancement, the annular structure window in the original image is taken and divided into a central area, an isolated area and an annular background area; Figure 2 As shown, the central area Ω C Set to a 3*3 image block, isolate area Ω I The width of the circular background area is 1 pixel. It can be expressed as
[0061]
[0062] Compared with the original window, this window adds a layer of isolation zone between the target area and the background area, avoiding the proximity of the target area and the background area. It effectively solves the problem of large-sized small targets leaking energy into the background area when using the original window, resulting in incorrect estimation of the background and high detection missed rate.
[0063] Where (x, y) is the center pixel coordinate, (p, q) is the pixel coordinate of the annular background area, k is the serial number of the annular background area, L is the maximum number of annular background areas, and the dist() function represents the spatial distance between two pixels.
[0064] The final annular local contrast IRLCM is:
[0065]
[0066] In the formula, The annular background area The grayscale mean, The annular background area The maximum gray value of represents the pixel weighting factor of the annular background area, (p, q) represents the pixel coordinates of the annular background area, (x0, y0) represents the central pixel coordinates of the local structure, α is the coefficient used to estimate the standard deviation, exp() represents the natural exponential function, ⊙ represents the Hadamard product, Norm() represents the normalization function, and mean() represents the mean function
[0067] S3. Calculate the weighting factor of the image based on the multi-directional image block gradient information and the image enhancement scheme, specifically:
[0068] In order to obtain multi-directional image block gradient information, it is necessary to first design a structural window that meets the needs of small targets. Since infrared imaging equipment relies on the infrared radiation energy of the target for imaging, and the small target has a long imaging distance, the number of pixels occupied in the image is small, and it generally presents a two-dimensional Gaussian distribution in the image. Therefore, the design is as follows Figure 3 The Gaussian-like filter structure window is shown.
[0069] The structure window is a 3*3 rectangular window, with the values at the four corners being 0 and the rest being 1. The pixel value of a specific serial number in the output window is used as the gray value I of the current pixel point through the sorting filter operation. pre , specifically:
[0070] I pre =imfilter ord (I raw ,se1,item)
[0071] Among them, I raw represents the original image, se1 represents the structure window, item represents the sequence number of the output pixel grayscale value, imfilter ord () represents the sorting filter method;
[0072] From the previous analysis, we can see that the infrared small target appears as a two-dimensional Gaussian distribution in the image, so its grayscale change trend in all directions is similar, and the grayscale change degree is drastic, which is isotropic; the uniform background is also isotropic, but its grayscale change is small; and image noise and interference such as corner points and strong edges have a main direction in the image, and their pixels are anisotropic. Therefore, a weighting scheme can be designed for the contrast image according to the above characteristics. At the same time, in order to enhance the stability of the image gradient, the image fast gradient operator is used instead of the traditional pixel gradient operator, and a multi-directional image block gradient operator is designed. The gradient operation results of multiple directional images are extracted and then summed to obtain the gradient operation results based on the multi-directional image block, which is as follows:
[0073] I mdbg =imfilter(I pre ,se2)
[0074] Among them, I mdbg represents the multi-directional image block gradient information of the image, imfilter() represents the filtering operation, and se2 represents the multi-directional image block filtering operator; Figure 4As shown, the multi-directional image block filtering operator is a 5*5 rectangular operator, and the operators in the first row are: -1, -2, -1, -2, -1; the operators in the second row are: -2, 0, 3, 0, -2; the operators in the third row are: -1, 3, 8, 3, -1; the operators in the fourth row are: -2, 0, 3, 0, -2; and the operators in the fifth row are: -1, -2, -1, -2, -1.
[0075] To obtain the image enhancement scheme described in step S3, it is necessary to calculate two eigenvalues λ1, λ2 of the structure tensor. The structure tensor ST is specifically:
[0076]
[0077] Among them, T 11 =g x g x T ,T 12 =g x g y T ,T 21 =g y g x T ,T 22 =g y g y T , g x ,g y are the gradients of the current pixel in the x and y directions, G σ represents the Gaussian blur function, σ is the standard deviation of the Gaussian kernel, then the two eigenvalues λ1 and λ2 of the structure tensor are
[0078]
[0079] According to the structure tensor eigenvalue, the following image enhancement scheme I can be obtained stru :
[0080]
[0081] The weighting factor W of the image is obtained as follows:
[0082] W=I mdbg ⊙I stru ;
[0083] S4. Calculate the weighted improved annular local contrast map according to the obtained weighting factor and the annular local contrast. Specifically, the weighted improved annular local contrast map MGIRLCM is:
[0084] MGIRLCM=IRLCM⊙W;
[0085] S5. Calculate the adaptive segmentation threshold according to the annular local contrast map, and obtain the final detection map, where the adaptive segmentation threshold Th is:
[0086] Th=βmax(MGIRLSM)+(1-β)mean(MGIRLCM)
[0087] Among them, β is a constant between 0 and 1, max() represents the maximum pixel value in the image, and mean() represents the mean pixel value of the image;
[0088] Final detection map GT MGIRLCM for:
[0089] GT MGIRLCM =seg BW (MGIRLCM,Th)
[0090] Among them, seg BW ( ) represents a binary segmentation function, and infrared small target detection can be completed through the final detection image;
[0091] S6. Complete the detection of small infrared targets according to the final detection image.
[0092] In order to solve the problem that the target energy may leak into the background area due to the direct proximity of the central area and the annular background area in the original annular local contrast calculation, this application proposes an improved annular window and optimizes the generation method of the annular background so that it has more image information.
[0093] In view of the fact that the original local contrast algorithm does not consider the spatial relationship between pixels and directly uses the background area mean as the estimation of background information, this technical solution introduces the relative spatial distance between pixels and designs an adaptive annular background weighting method;
[0094] In summary, an isolation layer is added to the original annular structure window, the local contrast calculation method is improved, and then the weighting factor of the local contrast map is designed based on the multi-directional image block gradient information, which eliminates the influence of image bad pixels and edge noise on the detection results.
[0095] The above are all preferred embodiments of the present application, and the protection scope of the present application is not limited thereto. Therefore, any equivalent changes made according to the structure, shape, and principle of the present application should be included in the protection scope of the present application.
Claims
1. A method for detecting small infrared targets based on image block gradient and improved annular contrast, characterized in that: The steps include: S1, obtain the original image; S2, calculating the annular local contrast based on the annular structure window and the image pixel coordinate values; S3, calculating the weighting factor of the image based on the multi-directional image block gradient information and the image enhancement scheme; S4, calculating a weighted improved annular local contrast map according to the obtained weighting factor and the annular local contrast; S5, calculating an adaptive segmentation threshold according to the annular local contrast map, and obtaining a final detection map; S6. Complete the detection of small infrared targets according to the final detection image.
2. The infrared small target detection method based on image block gradient and improved annular contrast according to claim 1, characterized in that: In step S2, the original image is pre-enhanced to eliminate the influence of random noise and highlight noise on detection. The pre-enhancement method is as follows: Among them, M C represents the image after pre-enhancement, G n Indicates the central area Ω C The nth largest pixel value, Represents G n The weighting factor of K represents the number of pixels used.
3. The infrared small target detection method based on image block gradient and improved annular contrast according to claim 2 is characterized in that: In step S2, after pre-enhancement, the annular structure window in the original image is taken and the annular structure window is divided into a central area, an isolated area and an annular background area; the central area Ω C Set to a 3*3 image block, isolate area Ω I The width of the circular background area is 1 pixel. Expressed as Among them, (x, y) is the coordinate of the center pixel, (p, q) is the pixel coordinate of the annular background area, k is the serial number of the annular background area, L is the maximum number of annular background areas, and the dist() function represents the spatial distance between two pixels.
4. The infrared small target detection method based on image block gradient and improved annular contrast according to claim 3 is characterized in that: The annular local contrast IRLCM in step S2 is: In the formula, The annular background area The grayscale mean, The annular background area The maximum gray value of represents the pixel weighting factor of the annular background area, (p, q) represents the pixel coordinates of the annular background area, (x0, y0) is the central pixel coordinates of the local structure, α is the coefficient used to estimate the standard deviation, exp() represents the natural exponential function, ⊙ represents the Hadamard product, Norm() represents the normalization function, and mean() represents the mean function.
5. The infrared small target detection method based on image block gradient and improved annular contrast according to claim 4, characterized in that: In step S3, in order to obtain the multi-directional image block gradient information, it is necessary to first design a structural window that meets the small target. The structural window is a 3*3 rectangular window with values of 0 at the four corners and 1 at the rest. The pixel value of a specific serial number in the structural window is output as the gray value I of the current pixel point through the sorting filter operation. pre , specifically: I pre =imfilter ord (I raw ,se1,item) Among them, I raw represents the original image, se1 represents the structure window, item represents the sequence number of the output pixel grayscale value, imfilter ord () represents the sorting filter method; Then extract the multi-directional image block gradient information of the sorted filtered image, specifically: I mdbg =imfilter(I pre ,se2) Among them, I mdbg It represents the multi-directional image block gradient information of the image, imfilter() represents the filtering operation, se2 represents the multi-directional image block filtering operator, the multi-directional image block filtering operator is a 5*5 rectangular operator, and the first row of operators are: -1, -2, -1, -2, -1; the second row of operators are: -2, 0, 3, 0, -2; the third row of operators are: -1, 3, 8, 3, -1; the fourth row of operators are: -2, 0, 3, 0, -2; the fifth row of operators are: -1, -2, -1, -2, -1.
6. The infrared small target detection method based on image block gradient and improved annular contrast according to claim 5, characterized in that: To obtain the image enhancement scheme described in step S3, it is necessary to calculate two eigenvalues λ1, λ2 of the structure tensor. The structure tensor ST is specifically: Among them, T 11 =g x g x T ,T 12 =g x g y T ,T 21 =g y g x T ,T 22 =g y g y T , g x ,g y are the gradients of the current pixel in the x and y directions, G σ represents the Gaussian blur function, σ is the standard deviation of the Gaussian kernel, then the two eigenvalues λ1 and λ2 of the structure tensor are According to the structure tensor eigenvalue, the following image enhancement scheme I can be obtained stru :
7. The infrared small target detection method based on image block gradient and improved annular contrast according to claim 6, characterized in that: The weighting factor W of the image obtained in step S3 is: In=I mdbg ⊙I stru 。 8. The infrared small target detection method based on image block gradient and improved annular contrast according to claim 7, characterized in that: The weighted improved annular local contrast map MGIRLCM obtained in step S4 is: MGIRLCM=IRLCM⊙W.
9. The infrared small target detection method based on image block gradient and improved annular contrast according to claim 8, characterized in that: The adaptive segmentation threshold Th of the image obtained in step S5 is: Th=βmax(MGIRLSM)+(1-β)mean(MGIRLCM) Among them, β is a constant between 0 and 1, max() represents the maximum pixel value in the image, and mean() represents the mean pixel value of the image.
10. The infrared small target detection method based on image block gradient and improved annular contrast according to claim 9, characterized in that: The final detection image GT obtained in step S5 MGIRLCM for: GT MGIRLCM =seg BW (MGIRLCM,Th) Among them, seg BW ( ) represents the binary segmentation function, and the infrared small target detection is completed through the final detection image.
Citation Information
Cited By
Image adaptive optimization processing method and system for laser printing output
CN121073857A
Image adaptive optimization processing method and system for laser printing output
CN121073857B