An infrared dim small target detection method based on window adaptive local contrast measurement
By employing a multi-directional gradient detection and adaptive nested window infrared weak target detection method, the problems of low signal-to-noise ratio, fixed window structure, and high computational complexity in existing technologies are solved, achieving efficient and stable target detection in complex backgrounds and meeting real-time requirements.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHENGZHOU UNIVERSITY OF AERONAUTICS
- Filing Date
- 2026-03-25
- Publication Date
- 2026-06-23
AI Technical Summary
Existing infrared weak target detection technologies struggle to effectively separate targets from the background under low signal-to-noise ratio conditions. Fixed window structures have poor adaptability, high multi-scale computational complexity, and are difficult to meet real-time requirements. Furthermore, they have a high false alarm rate in complex backgrounds.
Potential targets are identified through multi-directional gradient detection, and an adaptive nested window is constructed. By combining weighted local contrast calculation and adaptive threshold segmentation, the window size is dynamically adjusted to adapt to changes in target size. Local contrast is also calculated in a weighted manner along the diagonal direction to suppress background clutter.
It achieves high-performance and stable detection of small targets with varying sizes in complex backgrounds, reduces computational complexity, meets real-time processing requirements, and improves the robustness and reliability of detection.
Smart Images

Figure CN122265628A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of technology, and specifically to an infrared weak target detection method based on window adaptive local contrast measurement. Background Technology
[0002] Infrared imaging technology, with its advantages of passive detection and all-weather operation, has become a core technology in key areas such as national defense early warning, precision guidance, security monitoring, and disaster prevention. In these typical application scenarios, the target to be detected is usually far from the sensor, occupying only a few pixels (usually 2×2-9×9 pixels) after imaging on the infrared focal plane array, and the signal energy is weak. Therefore, such targets are defined as "infrared weak targets." The fundamental technical challenge of infrared weak target detection is that the target signal is easily overwhelmed by strong background clutter. The background clutter mentioned here specifically refers to interference with spatial correlation and structural characteristics in the image, such as cloud edges, ocean wave ripples, building outlines, and thermal radiation changes in natural terrain. These clutters may exhibit brightness and texture features similar to real targets in local areas, leading to a large number of false alarms in the detection system. Therefore, the essence of the problem is to quickly and accurately extract weak point-like or small-sized target signals from complex scenes with extremely low signal-to-noise ratios (SNR).
[0003] To address this core challenge, research in this field primarily focuses on the spatial, temporal, and feature domain characteristics of targets. Early research emphasized leveraging the continuity of target motion to develop methods based on temporal filtering and trajectory prediction; however, these methods fail for targets that appear suddenly or possess high mobility. In recent years, with the development of artificial intelligence, deep learning-based detection methods have made significant progress, but their performance heavily relies on large-scale, high-quality labeled datasets, and their generalization ability in unknown scenarios and real-time deployment in front-end embedded systems still face severe challenges. Another mainstream approach is based on background estimation and suppression, which highlights foreground targets by modeling and subtracting the background; however, its adaptability to non-stationary, rapidly changing, and complex backgrounds is often insufficient.
[0004] Among the various methods mentioned above, the Local Contrast Measure (LCM) method, inspired by the Human Visual System (HVS), exhibits unique advantages. The biological basis of this method lies in the extreme sensitivity of the human visual nervous system to significant mutations in local regions. Based on this characteristic, researchers have introduced it into the field of infrared small target detection. The basic idea is that although small targets are not prominent in the global image, there should be significant grayscale or feature differences between the target pixels and the surrounding background pixels in their immediate neighborhood. By designing a reasonable mathematical model to calculate and enhance this local contrast, the saliency of the target region can be effectively improved while suppressing the broad background. Because this method is intuitive, does not rely on target motion models or large-scale training data, and has a relatively efficient computational framework, it has become one of the research directions with great engineering application potential in the current field of infrared small target detection.
[0005] The Tri-Layer Window Local Contrast Measure (TLLCM) method is an important improvement over the traditional LCM. Its core idea is to introduce a two-layer computational architecture to enhance the ability to suppress background clutter.
[0006] The specific technical solution of this existing method is as follows: a three-layer nested rectangular window structure is defined for each pixel in the input image, namely the target layer, the transition layer, and the background layer. Then, the local contrast values between the target layer and the transition layer, and between the transition layer and the background layer are calculated respectively. Finally, the results of these two contrast calculations are used as the final saliency value of the pixel.
[0007] Although TLLCM improves performance in some scenarios, it has the following drawbacks: 1. The window structure is fixed and simple, with poor adaptability; 2. When the target size is slightly large, the target will overflow from the target layer to the transition layer, affecting its gray-scale mean value. This will calculate an incorrect contrast value, ultimately affecting the target enhancement and background suppression effects; 3. It requires multi-scale local contrast calculation, and it needs to be calculated for every pixel of the input image. This results in computational redundancy and reduces real-time performance.
[0008] The Weighted Strengthened Local Contrast Measure (WSLCM) method is another improvement on LCM. Its core idea is to optimize the contrast calculation process by introducing a weighting mechanism.
[0009] The specific technical solution of the existing method is as follows: First, the input image is subjected to Gaussian filtering and the enhanced local contrast is calculated. Then, the difference between the maximum value and the average value of the target block is defined as the regional intensity level to measure the target features. The difference between the target features, the target domain background and the background features are combined into a weight function. Finally, the enhanced local contrast is multiplied by the weight function to obtain WSLCM.
[0010] This type of scheme has the following limitations in actual detection: 1. The fixed sliding nested window structure has limited adaptability to non-uniform or complex textured backgrounds; 2. The suppression effect on bright background clutter is limited. When there are small areas of bright clutter in the background, these clutter points will have a higher weight in the weighted calculation, which will increase the false alarm rate to some extent; 3. The computational complexity is extremely high. The contrast calculation of each pixel requires multiple weighted operations and involves multi-scale calculations, which seriously affects the processing speed of the algorithm and makes it difficult to meet the requirements of real-time processing.
[0011] The Double-Neighborhood Gradient Method (DNGM) is a local contrast method that aims to avoid the multi-scale "expansion effect" by using a fixed-scale three-layer window structure. It designs a special neighborhood structure and gradient (difference) product calculation.
[0012] The specific technical solution of the existing method is as follows: First, a fixed 15×15 three-layer sliding window is designed, including a central cell, a first-layer neighborhood background, and a second-layer neighborhood background. Then, the minimum gradient (difference) between the central cell and the first-layer neighborhood background, and between the first-layer neighborhood background and the second-layer neighborhood background are calculated respectively. Finally, the two gradients (differences) are multiplied together to obtain DNGM.
[0013] This type of scheme has the following limitations in actual detection: 1. The fixed three-layer window structure has limitations. If the target size is larger than the size of the central unit, it will weaken the enhancement effect on the target; 2. The gradient (difference) product calculation can suppress weak targets while suppressing the background. Summary of the Invention
[0014] To address the above problems, this invention proposes an infrared weak target detection method based on window adaptive local contrast measurement.
[0015] The technical solution of this invention is: an infrared weak target detection method based on window adaptive local contrast measurement, comprising the following steps:
[0016] S1. Preprocess the infrared image and identify potential targets through multi-directional gradient detection;
[0017] S2. Filter potential targets to obtain candidate targets, and construct nested windows for candidate targets;
[0018] S3. Construct a weighted calculation model and calculate the local contrast based on the nested windows corresponding to the candidate targets;
[0019] S4. Based on local contrast, obtain the final target.
[0020] Furthermore, S1 includes the following sub-steps:
[0021] S11. Convolve the infrared image using a Gaussian kernel to obtain the processed image of each scale response.
[0022] S12. Overlay the processed images of all scale responses to obtain the preprocessed image;
[0023] S13. Use the multi-directional gradient operator to process the preprocessed image to obtain edge information;
[0024] S14. Overlay all edge information to obtain a complete edge map;
[0025] S15. Calculate the distance between the current pixel and the pixel with the largest gradient magnitude in each direction within the search range on the complete edge map, and select the pixels that can find the edge within the search range as potential targets.
[0026] Furthermore, in S12, the image is preprocessed. The expression is:
[0027] ;
[0028] in, This represents the Gaussian kernel corresponding to each scale, and O represents the infrared image. Processed images representing responses at various scales;
[0029] In S14, the expression for the complete edge graph E is:
[0030] ;
[0031] in, This represents the multi-directional gradient operator. Represents edge information;
[0032] In S15, the gradient magnitude from the current pixel (x, y) to the pixel with the largest gradient magnitude in each diagonal direction is... The expression for the distance between them is:
[0033] ;
[0034] in, This represents the pixel with the largest gradient magnitude in the top-left direction from the current pixel (x, y). The distance between them This represents the pixel with the largest gradient magnitude in the upper right direction from the current pixel (x, y). The distance between them This represents the pixel with the largest gradient magnitude in the lower left direction from the current pixel (x, y). The distance between them This represents the pixel with the largest gradient magnitude in the lower right direction from the current pixel (x, y). The distance between them, where x represents the x-coordinate of the current pixel and y represents the y-coordinate of the current pixel. The x-coordinate of the pixel with the largest gradient magnitude. The ordinate of the pixel with the largest gradient magnitude. This represents the pixel with the largest gradient magnitude in the upward direction from the current pixel (x, y). The distance between them This represents the pixel with the largest gradient magnitude in the downward direction from the current pixel (x, y). The distance between them This represents the pixel with the largest gradient magnitude in the left direction from the current pixel (x, y). The distance between them This represents the pixel with the largest gradient magnitude in the right direction from the current pixel (x, y). The distance between them.
[0035] Furthermore, S2 includes the following sub-steps:
[0036] S21. Construct filtering rules and use these rules to filter potential targets to obtain candidate targets;
[0037] S22. Construct nested windows for candidate targets.
[0038] Furthermore, in S21, the expression for the filtering rule is:
[0039] ;
[0040] ;
[0041] ;
[0042] Where CT(x,y) represents the candidate target. This represents the first criterion for determining a candidate target. This represents the second criterion for determining the candidate target. This represents the pixel with the largest gradient magnitude in the top-left direction from the current pixel (x, y). The distance between them This represents the pixel with the largest gradient magnitude in the lower left direction from the current pixel (x, y). The distance between them This represents the pixel with the largest gradient magnitude in the upper right direction from the current pixel (x, y). The distance between them This represents the pixel with the largest gradient magnitude in the lower right direction from the current pixel (x, y). The distance between them, where x represents the x-coordinate of the current pixel and y represents the y-coordinate of the current pixel. This represents the pixel with the largest gradient magnitude in the upward direction from the current pixel (x, y). The distance between them This represents the pixel with the largest gradient magnitude in the downward direction from the current pixel (x, y). The distance between them This represents the pixel with the largest gradient magnitude in the left direction from the current pixel (x, y). The distance between them This represents the pixel with the largest gradient magnitude in the right direction from the current pixel (x, y). The distance between them;
[0043] In S22, the specific steps for constructing nested windows are as follows:
[0044] ;
[0045] ;
[0046] ;
[0047] ;
[0048] ;
[0049] ;
[0050] Where w represents the estimated width of the candidate target block, and h represents the estimated height of the candidate target block. Indicates the dominant direction. This indicates taking the maximum value. Indicates a non-dominant direction. This indicates taking the minimum value, TW represents the transition layer, and BPS represents the background block size. This indicates that the structure of the sliding nested window is a three-layer window structure. This indicates that the structure of the sliding nested window is a two-layer window structure.
[0051] Furthermore, in S3, when the nested window structure of the candidate target is a three-layer window, the expression for local contrast is:
[0052] ;
[0053] ;
[0054] ;
[0055] ;
[0056] ;
[0057] ;
[0058] Where D(x,y) represents the saliency value of the point, O(i,j) represents all pixel positions in the current image patch, k represents the background patch number, T represents the target patch, i represents the x-coordinate of the current pixel position, j represents the y-coordinate of the current pixel position, and B k B represents the current background block. k+1 B represents the next background block adjacent to the current background block. k-1 This represents the previous background block adjacent to the current background block, and BPS represents the size of the background block. This indicates the local contrast of a three-layer nested window. This represents the average grayscale value of the top j largest pixels in the candidate target block. This represents the average grayscale value of pixels between the candidate target layer and the background layer. Represents the background block in the diagonal direction Background blocks in the horizontal and vertical directions Weighted fusion, This represents the average grayscale value of the j largest pixels in the background block along the diagonal direction. This represents the average grayscale value of the j largest pixels in the background block along the horizontal or vertical direction, where w represents the width of the estimated candidate target block and h represents the height of the estimated candidate target block. This indicates taking the maximum value. Indicates a non-dominant direction. This indicates taking the minimum value.
[0059] Furthermore, in S3, when the nested window structure of the candidate target is a two-layer window, the expression for local contrast is:
[0060] ;
[0061] ;
[0062] Where k represents the background block number, For calculating the local contrast of a nested double-layer window, D(x,y) represents the significance value at that point. This represents the average grayscale value of the top j largest pixels in the candidate target block. Represents the background block in the diagonal direction Background blocks in the horizontal and vertical directions Weighted fusion.
[0063] Furthermore, in S4, the final target is extracted using an adaptive threshold segmentation algorithm, the expression of which is:
[0064] ;
[0065] ;
[0066] ;
[0067] in, This represents the threshold value in the adaptive threshold segmentation algorithm, where x represents the x-coordinate of the current pixel and y represents the y-coordinate of the current pixel. This indicates an adjustable parameter. This represents the maximum grayscale value in the image after processing by the algorithm. This represents the average grayscale value in the image after algorithm processing. This represents the image obtained after algorithm processing. This represents the average grayscale value in the image after processing by the algorithm.
[0068] The beneficial effects of this invention are:
[0069] (1) The present invention achieves high-performance stable detection of weak targets with changing size: the size of the candidate target is estimated by pre-multi-directional gradient analysis, and a nested window with an adaptive size corresponding to the size of the candidate target is constructed accordingly; the method achieves high-precision stable detection within the dynamic range of the pixel size of weak targets, and significantly suppresses false alarms caused by background structure in various complex scenes such as cloud edges and urban backgrounds, ensuring the reliability and stability of the detection in complex scenes.
[0070] (2) The present invention achieves high-efficiency computation and real-time processing capabilities: By using the strategy of estimation before computation, the candidate targets after queuing and screening are performed in a single computation under a customized window, avoiding the global exhaustive search required by traditional multi-scale methods; this design greatly reduces the computational complexity of the algorithm and reduces the processing time to the level that meets the continuous processing requirements of typical infrared imaging systems, achieving stable frame rate output; this ensures that the algorithm can complete the processing within the image acquisition cycle, meeting the real-time requirements of infrared early warning and tracking systems, and laying the foundation for efficient deployment on embedded or experimental processing platforms.
[0071] (3) This invention effectively suppresses complex background interference and improves low signal-to-noise ratio detection performance: By designing a weighted local contrast calculation model dominated by the diagonal direction, the response to the target feature direction is enhanced, while the background clutter in non-target directions is suppressed; combined with the accurate estimation of local areas by the adaptive window, the significance of the target signal relative to the background clutter is systematically improved; this enables the algorithm to maintain robust target detection capability under low signal-to-noise ratio conditions, and improves the detection robustness of the system. Attached Figure Description
[0072] Figure 1 The flowchart shows an infrared weak target detection method based on window adaptive local contrast measurement.
[0073] Figure 2 This is a schematic diagram of the structure of an infrared weak target detection method;
[0074] Figure 3 A schematic diagram of a multi-directional gradient operator;
[0075] Figure 4 A schematic diagram for configuring the window. Detailed Implementation
[0076] The embodiments of the present invention will be further described below with reference to the accompanying drawings.
[0077] like Figure 1 As shown, this invention provides a method for detecting weak infrared targets based on window-adaptive local contrast measurement, comprising the following steps:
[0078] S1. Preprocess the infrared image and identify potential targets through multi-directional gradient detection;
[0079] S2. Filter potential targets to obtain candidate targets, and construct nested windows for candidate targets;
[0080] S3. Construct a weighted calculation model and calculate the local contrast based on the nested windows corresponding to the candidate targets;
[0081] S4. Based on local contrast, obtain the final target.
[0082] This invention aims to address the following technical shortcomings in existing infrared weak target detection technologies based on local contrast:
[0083] The technical drawback of existing technologies is that they are difficult to detect weak targets under low signal-to-noise ratio conditions: when the target signal is extremely weak and highly mixed with background noise and clutter (i.e., extremely low signal-to-noise ratio scenarios), existing models are unable to effectively separate the target from the background. Their ability to distinguish between signal and noise drops sharply near the critical point, which leads to an increased false negative rate for weak targets.
[0084] Existing technologies suffer from a lack of dynamic perception of the scale of small targets: Current local contrast methods (such as traditional LCM and its improved algorithms) rely on a pre-defined fixed-size sliding window. In practical applications of infrared small target detection, the target pixel size continuously varies within the range of 2x2 to 9x9 due to factors such as distance and orientation. A fixed window inevitably becomes mismatched when facing this dynamic range: a small window cannot completely cover a larger target, resulting in energy fragmentation and a decreased detection rate; a large window, on the other hand, will contain too much background noise, diluting the target contrast and significantly increasing false alarms at clutter edges. This severely limits the detection performance of local contrast methods.
[0085] Technical shortcomings of existing technologies that conflict between detection efficiency and real-time requirements: To compensate for the limitations of fixed windows, some existing technologies employ a multi-scale sliding window traversal strategy to cover a range of possible target sizes. While this method can improve the detection rate to some extent, its computational complexity increases linearly or even exponentially with the number of scales, which fundamentally contradicts the stringent real-time requirements of infrared early warning and tracking systems for low latency and high frame rates.
[0086] Existing technologies suffer from a technical deficiency in distinguishing targets from backgrounds in complex environments: Current methods typically employ statistical models of detection (such as the mean / median of a circular or square neighborhood) to estimate the background when calculating local contrast, failing to fully utilize the latent spatial features of the target (edges, etc.). When faced with complex backgrounds possessing strong directional or structural characteristics, such as cloud edges or urban building outlines, this coarse background estimation model cannot accurately distinguish between the target and background clutter, leading to numerous false alarms in these areas and severely impacting its reliability in real-world, complex scenarios.
[0087] This invention provides an infrared weak target detection method based on adaptive local contrast measurement using window size. The method first preprocesses the original image using multi-scale Gaussian filtering. Then, multi-directional gradient detection is used to obtain the location and size information of potential targets, and the spatial structure of small targets is used to further filter out the location and size information of candidate targets. Next, different window sizes are adaptively constructed based on the obtained candidate target size information, and the corresponding local contrast is calculated. Finally, thresholding is used to extract the true target.
[0088] In this embodiment of the invention, S1 includes the following sub-steps:
[0089] S11. Convolve the infrared image using a Gaussian kernel to obtain the processed image of each scale response.
[0090] S12. Overlay the processed images of all scale responses to obtain the preprocessed image;
[0091] S13. Use the multi-directional gradient operator to process the preprocessed image to obtain edge information;
[0092] S14. Overlay all edge information to obtain a complete edge map;
[0093] S15. Calculate the distance between the current pixel and the pixel with the largest gradient magnitude in each direction within the search range on the complete edge map, and select the pixels that can find the edge within the search range as potential targets.
[0094] Multi-scale Gaussian filtering is applied to the input infrared image to suppress noise. Given a discrete set of scales... Each Corresponding to a Gaussian kernel Different scale Gaussian kernels are convolved with the input image O to obtain processed images with responses at different scales. Preprocessed images It is obtained by superimposing the corresponding maps at all scales. Then, a multi-directional gradient operator is used. The filtered image is processed to obtain the image's edge information. Finally, all of them The edges are superimposed to obtain a complete edge map.
[0095] Figure 3 The gradient operator is multi-directional, with angles of 0°, 45°, 90°, and 135° from left to right. Then, the distances from each pixel to its nearest edge in eight directions are calculated on the edge map E. This nearest distance is defined as the distance between the current pixel (x, y) and the pixel with the largest gradient magnitude within the search range (s=11) in each direction. The distance between them. .
[0096] If the current pixel position (x, y) can find an edge within the search range s, then the pixel position is considered a potential target.
[0097] In this embodiment of the invention, in S12, the image is preprocessed. The expression is:
[0098] ;
[0099] in, This represents the Gaussian kernel corresponding to each scale, and O represents the infrared image. Processed images representing responses at various scales;
[0100] In S14, the expression for the complete edge graph E is:
[0101] ;
[0102] in, This represents the multi-directional gradient operator. Represents edge information;
[0103] In S15, the gradient magnitude from the current pixel (x, y) to the pixel with the largest gradient magnitude in each diagonal direction is... The expression for the distance between them is:
[0104] ;
[0105] in, This represents the pixel with the largest gradient magnitude in the top-left direction from the current pixel (x, y). The distance between them This represents the pixel with the largest gradient magnitude in the upper right direction from the current pixel (x, y). The distance between them This represents the pixel with the largest gradient magnitude in the lower left direction from the current pixel (x, y). The distance between them This represents the pixel with the largest gradient magnitude in the lower right direction from the current pixel (x, y). The distance between them, where x represents the x-coordinate of the current pixel and y represents the y-coordinate of the current pixel. The x-coordinate of the pixel with the largest gradient magnitude. The ordinate of the pixel with the largest gradient magnitude. This represents the pixel with the largest gradient magnitude in the upward direction from the current pixel (x, y). The distance between them This represents the pixel with the largest gradient magnitude in the downward direction from the current pixel (x, y). The distance between them This represents the pixel with the largest gradient magnitude in the left direction from the current pixel (x, y). The distance between them This represents the pixel with the largest gradient magnitude in the right direction from the current pixel (x, y). The distance between them.
[0106] In this embodiment of the invention, S2 includes the following sub-steps:
[0107] S21. Construct filtering rules and use these rules to filter potential targets to obtain candidate targets;
[0108] S22. Construct nested windows for candidate targets.
[0109] In this embodiment of the invention, in S21, after obtaining the size and location information of the potential target, reliable candidate targets are further screened based on the spatial characteristics of the small target.
[0110] The expression for the filtering rule is:
[0111] ;
[0112] ;
[0113] ;
[0114] Where CT(x,y) represents the candidate target. This represents the first criterion for determining a candidate target. This represents the second criterion for determining the candidate target. This represents the pixel with the largest gradient magnitude in the top-left direction from the current pixel (x, y). The distance between them This represents the pixel with the largest gradient magnitude in the lower left direction from the current pixel (x, y). The distance between them This represents the pixel with the largest gradient magnitude in the upper right direction from the current pixel (x, y). The distance between them This represents the pixel with the largest gradient magnitude in the lower right direction from the current pixel (x, y). The distance between them, where x represents the x-coordinate of the current pixel and y represents the y-coordinate of the current pixel. This represents the pixel with the largest gradient magnitude in the upward direction from the current pixel (x, y). The distance between them This represents the pixel with the largest gradient magnitude in the downward direction from the current pixel (x, y). The distance between them This represents the pixel with the largest gradient magnitude in the left direction from the current pixel (x, y). The distance between them This represents the pixel with the largest gradient magnitude in the right direction from the current pixel (x, y). The distance between them;
[0115] In S22, for each candidate target CT(x,y), a nested window that matches it is dynamically constructed based on its estimated size.
[0116] The specific steps for constructing nested windows are as follows:
[0117] ;
[0118] ;
[0119] ;
[0120] ;
[0121] ;
[0122] ;
[0123] Where w represents the estimated width of the candidate target block, and h represents the estimated height of the candidate target block. Indicates the dominant direction. This indicates taking the maximum value. Indicates a non-dominant direction. This indicates taking the minimum value, TW represents the transition layer, and BPS represents the background block size. This indicates that the structure of the sliding nested window is a three-layer window structure. This indicates that the structure of the sliding nested window is a two-layer window structure.
[0124] Figure 4 Configure the window layout. The target size of the leftmost image is 3×5, with a three-layer nested window; the target size of the middle image is 4×4, with a three-layer nested window; the target size of the rightmost image is 5×5, with a two-layer nested window, and the final window size is 15×15.
[0125] Based on the size of the LD (Layer of Window), the size of the transition layer (TW, TransitionWindow) is further designed, while the background patch size (BPS, BackgroundPatchScale) is determined by the TW. Then, based on the size relationships between w, h, LD, NLD, TW, and BPS, the final adaptive nested window structure—whether it's a three-layer or two-layer window—is determined. Figure 4 For example, the target sizes from left to right are 3×5, 4×4, and 5×5. When the target size is... Figure 4 As shown in the leftmost image, w=5, h=3, LD=5, NLD=3, TW=5, and BPS=5. This corresponds to the first case, where the nested window structure is a three-layer window. When the target size is... Figure 4 As shown in the middle diagram, w=4, h=4, LD=4, NLD=4, TW=4, and BPS=4. Similarly, this corresponds to the first case, where the nested window structure is a three-layer window. When the target size is... Figure 4 As shown on the rightmost side, w=5, h=5, corresponding to LD=5, NLD=5, TW=5, and BPS=5. This corresponds to the second case, where the nested window structure is a two-layer window.
[0126] After constructing the nested windows, a weighted calculation model is designed, which primarily uses diagonal image patches and secondarily uses horizontal and vertical image patches. Simultaneously, specific local contrast calculation methods are designed for different nested window structures of different candidate targets.
[0127] In this embodiment of the invention, in S3, when the nested window structure of the candidate target is a three-layer window, the expression for local contrast is:
[0128] ;
[0129] ;
[0130] ;
[0131] ;
[0132] ;
[0133] ;
[0134] Where D(x,y) represents the saliency value of the point, O(i,j) represents all pixel positions in the current image patch, k represents the background patch number, T represents the target patch, i represents the x-coordinate of the current pixel position, j represents the y-coordinate of the current pixel position, and B k B represents the current background block. k+1 B represents the next background block adjacent to the current background block. k-1 This represents the previous background block adjacent to the current background block, and BPS represents the size of the background block. This indicates the local contrast of a three-layer nested window. This represents the average grayscale value of the top j largest pixels in the candidate target block. This represents the average grayscale value of pixels between the candidate target layer and the background layer. Represents the background block in the diagonal direction Background blocks in the horizontal and vertical directions Weighted fusion, This represents the average grayscale value of the j largest pixels in the background block along the diagonal direction. This represents the average grayscale value of the j largest pixels in the background block along the horizontal or vertical direction, where w represents the width of the estimated candidate target block and h represents the height of the estimated candidate target block. This indicates taking the maximum value. Indicates a non-dominant direction. This indicates taking the minimum value.
[0135] When TW=3, j=4; when TW=5, j=9; when TW=7, j=11; when TW=9, j=13.
[0136] In this embodiment of the invention, in S3, when the nested window structure of the candidate target is a two-layer window, the expression for local contrast is:
[0137] ;
[0138] ;
[0139] Where k represents the background block number, For calculating the local contrast of a nested double-layer window, D(x,y) represents the significance value at that point. This represents the average grayscale value of the top j largest pixels in the candidate target block. Represents the background block in the diagonal direction Background blocks in the horizontal and vertical directions Weighted fusion.
[0140] In this embodiment of the invention, in step S4, the final target is extracted using an adaptive threshold segmentation algorithm, the expression of which is:
[0141] ;
[0142] ;
[0143] ;
[0144] in, This represents the threshold value in the adaptive threshold segmentation algorithm, where x represents the x-coordinate of the current pixel and y represents the y-coordinate of the current pixel. This indicates an adjustable parameter. This represents the maximum grayscale value in the image after processing by the algorithm. This represents the average grayscale value in the image after algorithm processing. This represents the image obtained after algorithm processing. This represents the average grayscale value in the image after processing by the algorithm.
[0145] Example scenario: Processing a single 256×256 infrared image containing urban building heat sources, sky background, and small flying targets.
[0146] Image input and initialization:
[0147] The algorithm loads preset parameters, including Gaussian filter kernel (σ=0.5, 0.9, 1.3), gradient detection operator, edge search range (s=11), and window mapping rules.
[0148] The infrared image frame is read in and used as input data O for the algorithm.
[0149] Image preprocessing and feature extraction:
[0150] The input image O is processed by multi-scale Gaussian filtering to obtain the noise-suppressed image. .
[0151] right Gradient detection is performed using a multi-directional gradient operator to obtain a gradient map E, thereby acquiring the size and location information of the potential target.
[0152] Based on the spatial characteristics of weak targets, potential targets are screened to obtain candidate targets CT(x,y).
[0153] Adaptive window construction:
[0154] For each candidate target CT(x,y), construct the target block T based on its size (w,h) and obtain the sizes of LD and NLD. Then, construct TW centered on CT(x,y) based on the size of LD, and then construct BPS centered on TW based on the size of TW.
[0155] The final adaptive nested window structure, whether a three-layer or two-layer window, is determined by the size relationship between w, h, LD, NLD, TW, and BPS.
[0156] Local contrast calculation:
[0157] Centered on CT(x, y), a 3BPS nested window-sized image patch is extracted from the original image, which contains the target block (T), the transition layer (TW), and the background block BPS.
[0158] At that pixel location, a weighted local contrast calculation model based on the diagonal direction is used, according to the structure of the nested windows, to output the saliency value at that location. or .
[0159] Target extraction:
[0160] Gather all or Generate a global saliency map WSALCM.
[0161] Adaptive thresholding is used to segment WSALCM to obtain the true target.
[0162] Those skilled in the art will recognize that the embodiments described herein are intended to help the reader understand the principles of the invention, and should be understood that the scope of protection of the invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific modifications and combinations based on the technical teachings disclosed in this invention without departing from the spirit of the invention, and these modifications and combinations are still within the scope of protection of this invention.
Claims
1. A method for detecting weak infrared targets based on window-adaptive local contrast measurement, characterized in that, Includes the following steps: S1. Preprocess the infrared image and identify potential targets through multi-directional gradient detection; S2. Filter potential targets to obtain candidate targets, and construct nested windows for candidate targets; S3. Construct a weighted calculation model and calculate the local contrast based on the nested windows corresponding to the candidate targets; S4. Based on local contrast, obtain the final target.
2. The infrared weak target detection method based on window adaptive local contrast measurement according to claim 1, characterized in that, S1 includes the following sub-steps: S11. Convolve the infrared image using a Gaussian kernel to obtain the processed image of each scale response. S12. Overlay the processed images of all scale responses to obtain the preprocessed image; S13. Use the multi-directional gradient operator to process the preprocessed image to obtain edge information; S14. Overlay all edge information to obtain a complete edge map; S15. Calculate the distance between the current pixel and the pixel with the largest gradient magnitude in each direction within the search range on the complete edge map, and select the pixels that can find the edge within the search range as potential targets.
3. The infrared weak target detection method based on window adaptive local contrast measurement according to claim 2, characterized in that, In S12, the preprocessed image The expression is: ; in, This represents the Gaussian kernel corresponding to each scale, and O represents the infrared image. Processed images representing responses at various scales; In S14, the expression for the complete edge map E is: ; in, This represents the multi-directional gradient operator. Represents edge information; In step S15, the gradient magnitude from the current pixel (x, y) to the pixel with the largest gradient magnitude in each diagonal direction is... The expression for the distance between them is: ; in, This represents the pixel with the largest gradient magnitude in the top-left direction from the current pixel (x, y). The distance between them This represents the pixel with the largest gradient magnitude in the upper right direction from the current pixel (x, y). The distance between them This represents the pixel with the largest gradient magnitude in the lower left direction from the current pixel (x, y). The distance between them This represents the pixel with the largest gradient magnitude in the lower right direction from the current pixel (x, y). The distance between them, where x represents the x-coordinate of the current pixel and y represents the y-coordinate of the current pixel. The x-coordinate of the pixel with the largest gradient magnitude. The ordinate of the pixel with the largest gradient magnitude. This represents the pixel with the largest gradient magnitude in the upward direction from the current pixel (x, y). The distance between them This represents the pixel with the largest gradient magnitude in the downward direction from the current pixel (x, y). The distance between them This represents the pixel with the largest gradient magnitude in the left direction from the current pixel (x, y). The distance between them This represents the pixel with the largest gradient magnitude in the right direction from the current pixel (x, y). The distance between them.
4. The infrared weak target detection method based on window adaptive local contrast measurement according to claim 1, characterized in that, S2 includes the following sub-steps: S21. Construct filtering rules and use these rules to filter potential targets to obtain candidate targets; S22. Construct nested windows for candidate targets.
5. The infrared weak target detection method based on window adaptive local contrast measurement according to claim 4, characterized in that, In step S21, the expression for the filtering rule is: ; ; ; Where CT(x,y) represents the candidate target. This represents the first criterion for determining a candidate target. This represents the second criterion for determining the candidate target. This represents the pixel with the largest gradient magnitude in the top-left direction from the current pixel (x, y). The distance between them This represents the pixel with the largest gradient magnitude in the lower left direction from the current pixel (x, y). The distance between them This represents the pixel with the largest gradient magnitude in the upper right direction from the current pixel (x, y). The distance between them This represents the pixel with the largest gradient magnitude in the lower right direction from the current pixel (x, y). The distance between them, where x represents the x-coordinate of the current pixel and y represents the y-coordinate of the current pixel. This represents the pixel with the largest gradient magnitude in the upward direction from the current pixel (x, y). The distance between them This represents the pixel with the largest gradient magnitude in the downward direction from the current pixel (x, y). The distance between them This represents the pixel with the largest gradient magnitude in the left direction from the current pixel (x, y). The distance between them This represents the pixel with the largest gradient magnitude in the right direction from the current pixel (x, y). The distance between them; In step S22, constructing the nested window specifically involves: ; ; ; ; ; ; Where w represents the estimated width of the candidate target block, and h represents the estimated height of the candidate target block. Indicates the dominant direction. This indicates taking the maximum value. Indicates a non-dominant direction. This indicates taking the minimum value, TW represents the transition layer, and BPS represents the background block size. This indicates that the structure of the sliding nested window is a three-layer window structure. This indicates that the structure of the sliding nested window is a two-layer window structure.
6. The infrared weak target detection method based on window adaptive local contrast measurement according to claim 1, characterized in that, In step S3, when the nested window structure of the candidate target is a three-layer window, the expression for local contrast is: ; ; ; ; ; ; Where D(x,y) represents the saliency value of the point, O(i,j) represents all pixel positions in the current image patch, k represents the background patch number, T represents the target patch, i represents the x-coordinate of the current pixel position, j represents the y-coordinate of the current pixel position, and B k B represents the current background block. k+1 B represents the next background block adjacent to the current background block. k-1 This represents the previous background block adjacent to the current background block, and BPS represents the size of the background block. This indicates the local contrast of a three-layer nested window. This represents the average grayscale value of the top j largest pixels in the candidate target block. This represents the average grayscale value of pixels between the candidate target layer and the background layer. Represents the background block in the diagonal direction Background blocks in the horizontal and vertical directions Weighted fusion, This represents the average grayscale value of the j largest pixels in the background block along the diagonal direction. This represents the average grayscale value of the j largest pixels in the background block along the horizontal or vertical direction, where w represents the width of the estimated candidate target block and h represents the height of the estimated candidate target block. This indicates taking the maximum value. Indicates a non-dominant direction. This indicates taking the minimum value.
7. The infrared weak target detection method based on window adaptive local contrast measurement according to claim 1, characterized in that, In step S3, when the nested window structure of the candidate target is a two-layer window, the expression for local contrast is: ; ; Where k represents the background block number, For calculating the local contrast of a nested double-layer window, D(x,y) represents the significance value at that point. This represents the average grayscale value of the top j largest pixels in the candidate target block. Represents the background block in the diagonal direction Background blocks in the horizontal and vertical directions Weighted fusion.
8. The infrared weak target detection method based on window adaptive local contrast measurement according to claim 1, characterized in that, In step S4, the final target is extracted using an adaptive threshold segmentation algorithm, the expression of which is: ; ; ; in, This represents the threshold value in the adaptive threshold segmentation algorithm, where x represents the x-coordinate of the current pixel and y represents the y-coordinate of the current pixel. This indicates an adjustable parameter. This represents the maximum grayscale value in the image after processing by the algorithm. This represents the average grayscale value in the image after processing by the algorithm. This represents the image obtained after algorithm processing. This represents the average grayscale value in the image after processing by the algorithm.