Infrared dim small target detection method based on local contrast difference
The local contrast difference method is used to process infrared images, which solves the interference suppression problem of infrared weak target detection in complex backgrounds, improves detection accuracy and efficiency, reduces the probability of false alarms, and enhances detection performance and real-time performance.
Patent Information
- Application Number
- CN202510552555.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-29
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2045-04-29
AI Technical Summary
The existing infrared weak target detection algorithm has poor interference suppression capabilities in complex backgrounds, low detection accuracy and efficiency, high probability of false alarms, and insufficient real-time performance.
The local contrast difference method is used, and the grayscale maximum position in the confidence graph is calculated as the detection position of the weak infrared target through mean filtering, background suppression and local contrast difference window processing, and the target contrast ratio is further enhanced by using the contrast difference enhancement coefficient matrix.
It improves the accuracy and efficiency of infrared weak target detection, effectively suppresses background interference, reduces the probability of false alarms, and enhances detection performance and algorithm real-time performance.
Smart Images

Figure CN120070876B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of infrared image processing and target detection, and in particular relates to an infrared dim small target detection method based on local contrast difference. Background Art
[0002] Small target detection based on infrared images is a crucial component of infrared search and tracking systems, with widespread applications in areas such as early warning, missile guidance, and long-range surveillance. Therefore, it remains a hot research topic worldwide. On the one hand, due to the relatively low resolution of infrared images, small targets appear small and lack rich texture and structural information. On the other hand, the often complex scenes often obscure small targets within the background, resulting in a low signal-to-noise ratio. These complex factors make accurate and effective detection and extraction of small infrared targets challenging. While significant progress has been made in the field of infrared small target detection, further research is needed to further enhance the ability to lock onto and track enemy targets and effectively enhance battlefield situational awareness.
[0003] Based on the form of the input image to infrared small target detection algorithms, existing algorithms can be divided into two categories: single-frame image detection algorithms and continuous multi-frame image detection algorithms. The input to continuous multi-frame image detection algorithms is generally a sequence of continuously captured infrared images with a continuous target trajectory and minimal background variation. This type of algorithm can effectively estimate the target trajectory by combining prior information from the input image. However, this type of algorithm has a large computational load and high computational complexity, placing certain demands on the system's computing platform resources. Single-frame image detection algorithms are not restricted by the continuity of target and background variations. This type of algorithm has a simple and clear structure and high timeliness, enabling rapid and effective target position estimation based on a single infrared image. For systems with limited computing resources and high real-time requirements, research on infrared small target detection based on single-frame images has gradually become mainstream. Currently, the vast majority of research on infrared small target detection algorithms is based on single-frame images. The theoretical methods based on the small target detection algorithm based on single-frame infrared images can be divided into filtering-based detection methods, statistical model-based detection algorithms, contrast enhancement algorithms based on human visual mechanisms, and big data-based deep learning algorithms; the first two detection algorithms have clear mechanisms, are relatively simple, and are easy to implement in engineering, but the detection probability is reduced under complex backgrounds and the false alarm rate is high; the fourth detection algorithm has a high dependence on data, and the deep learning network is generally more complex, which is not easy to implement in engineering; the third detection algorithm has good detection performance and real-time performance, but when there are interferences such as high-brightness edges and high-brightness complex backgrounds in the scene, this type of algorithm generally cannot effectively suppress the interference. In order to obtain better detection results, this type of algorithm needs to perform multiple calculations at different scales. Summary of the Invention
[0004] In view of this, the present invention aims to provide an infrared dim small target detection method based on local contrast difference to solve the problem that the existing algorithm has poor ability to suppress complex background interference. The present invention can directly give the pixel distribution coordinates of small infrared targets and can greatly improve the detection accuracy and efficiency, while further improving the detection performance, algorithm real-time performance and reducing the probability of false alarm.
[0005] To achieve the above object, the technical solution created by the present invention is implemented as follows:
[0006] A method for detecting infrared dim small targets based on local contrast differences specifically includes the following steps:
[0007] S1: Obtain the original infrared image, perform mean filtering and background suppression preprocessing on the original infrared image to obtain a background suppressed image;
[0008] S2: Design a local contrast difference window and use it to process the background suppression image to obtain a contrast difference image and a contrast difference enhancement coefficient matrix;
[0009] S3: Calculate the confidence map based on the contrast difference image and the contrast difference enhancement coefficient matrix, and use the pixel position corresponding to the grayscale maximum value in the confidence map as the detection position of the infrared weak target.
[0010] Furthermore, step S1 specifically includes the following steps:
[0011] S11: performing mean filtering on the original infrared image to obtain a filtered image;
[0012] S12: performing difference processing on the original infrared image and the filtered image to obtain a difference image;
[0013] S13: performing background suppression preprocessing on the difference image using a background suppression operator to obtain a background suppressed image.
[0014] Furthermore, in step S11 , the scale of the mean filter coefficients used in the mean filter process is 15×15.
[0015] Furthermore, in step S13, the background suppression operator DF is expressed as:
[0016] .
[0017] Furthermore, in step S2, the local contrast difference window includes 5×5 subwindows, each subwindow has a size of 3×3, the subwindow located at the center of the local contrast difference window is used as the target subwindow, and the remaining subwindows in the local contrast difference window except the target subwindow are used as background subwindows;
[0018] The sub-windows are numbered from top to bottom and from left to right. The expression of the average gray value of each sub-window is:
[0019] ;
[0020] in, is the average gray value of the subwindow numbered i, N is the total number of pixels in the subwindow, j is the jth pixel in the subwindow, is the grayscale value of the j-th pixel in the subwindow numbered i in the background suppressed image.
[0021] Furthermore, step S2 specifically includes the following steps:
[0022] S21: Based on ( , , , )、( , , , )、( , , , )、( , , , )、( , , , )、( , , , )、( , , , )、( , , , ), calculate the minimum contrast difference of the target sub-window and obtain the first contrast difference image :
[0023] ;
[0024] in, The target sub-window is based on ( , , , )and( , , , ) calculated as the contrast difference, The target sub-window is based on ( , , , )and( , , , ) calculated as the contrast difference, The target sub-window is based on ( , , , )and( , , , ) calculated as the contrast difference, The target sub-window is based on ( , , , )and( , , , ) calculated contrast difference;
[0025] S22: Calculate the contrast difference of the target sub-window in the horizontal direction, vertical direction, 45° direction and 135° direction, and take the minimum contrast difference of the target sub-window in the four directions as the second contrast difference image :
[0026] ;
[0027] in, is the contrast difference of the target sub-window in the horizontal direction, is the contrast difference of the target sub-window in the vertical direction, is the contrast difference of the target sub-window in the 45° direction, is the contrast difference of the target sub-window in the 135° direction;
[0028] S23: Based on the first contrast difference image and the second contrast difference image , the contrast difference image is calculated DG :
[0029] ;
[0030] S24: Divide the background sub-window into 8 areas, the 8 areas are: ( , , , )、( , , , )、( , , , )、( , , , )、( , , , )、( , , , )、( , , , )、( , , , ), and calculate the mean grayscale maximum value of each region:
[0031] ;
[0032] in, is the hth region, h≤8, 、 、 and Represents the average grayscale value of each of the four sub-windows in the area, The maximum value among the average grayscale values of the four sub-windows is taken as the average grayscale maximum value of the region;
[0033] S25: Sort the mean grayscale maximum values of the eight regions in descending order, take the average of the mean grayscale maximum values in the top four positions as the target average value, and subtract the square of the mean grayscale value of the target subwindow from the square of the target average value to obtain a contrast difference enhancement coefficient matrix.
[0034] Furthermore, step S21 includes the following steps:
[0035] S211: Based on ( , , , )and( , , , ) Calculate the grayscale average of the left and right sub-windows of the target sub-window to obtain the contrast difference :
[0036] ;
[0037] ;
[0038] ;
[0039] in, for( , , , ) The grayscale average value of these four sub-windows, for( , , , ) The grayscale average of these four sub-windows;
[0040] S212: Based on ( , , , )and( , , , ) Calculate the grayscale average of the upper and lower sub-windows of the target sub-window to obtain the contrast difference :
[0041] ;
[0042] ;
[0043] ;
[0044] in, for( , , , ) The grayscale average value of these four sub-windows, for( , , , ) The grayscale average of these four sub-windows;
[0045] S213: Based on ( , , , )and( , , , ) Calculate the grayscale average of the upper and lower sub-windows of the target sub-window to obtain the contrast difference :
[0046] ;
[0047] ;
[0048] ;
[0049] in, for( , , , ) The grayscale average value of these four sub-windows, for( , , , ) The grayscale average of these four sub-windows;
[0050] S214: Based on ( , , , )and( , , , ) Calculate the grayscale average of the upper and lower sub-windows of the target sub-window to obtain the contrast difference :
[0051] ;
[0052] ;
[0053] ;
[0054] in, for( , , , ) The grayscale average value of these four sub-windows, for( , , , ) The grayscale average of these four sub-windows.
[0055] Furthermore, step S22 includes the following steps:
[0056] S221: Calculate the contrast difference of the target sub-window in the horizontal direction :
[0057] ;
[0058] ;
[0059] ;
[0060] in, is the grayscale average of the target sub-window on one side in the horizontal direction, is the grayscale average of the target sub-window on the other side in the horizontal direction;
[0061] S222: Calculate the contrast difference of the target sub-window in the vertical direction :
[0062] ;
[0063] ;
[0064] ;
[0065] in, is the grayscale average of the target sub-window on one side in the vertical direction, is the grayscale average of the target sub-window on the other side in the vertical direction;
[0066] S223: Calculate the contrast difference of the target sub-window in the 45° direction :
[0067] ;
[0068] ;
[0069] ;
[0070] in, is the grayscale average of the target sub-window on one side of the 45° direction, is the grayscale average of the target sub-window on the other side of the 45° direction;
[0071] S224: Calculate the contrast difference of the target sub-window in the 135° direction :
[0072] ;
[0073] ;
[0074] ;
[0075] in, is the grayscale average of the target sub-window on one side of the 135° direction, is the grayscale average of the target sub-window on the other side of the 135° direction.
[0076] Furthermore, in step S3, the confidence map R is calculated as follows:
[0077] ;
[0078] in, is the contrast difference enhancement coefficient matrix, DG is the contrast difference image.
[0079] Compared with the prior art, the present invention can achieve the following beneficial effects:
[0080] (1) The infrared small target detection method based on local contrast difference created by the present invention can directly provide the pixel distribution coordinates of the infrared small target and greatly improve the detection accuracy and efficiency. While effectively suppressing background interference, it can further improve the detection performance, algorithm real-time performance and reduce the probability of false alarms.
[0081] (2) The present invention creates the infrared dim small target detection method based on local contrast difference. The local contrast difference window designed by the present invention includes both the background around the target and the outermost and more distant background. The background suppression effect is greatly enhanced by using the local contrast difference window to process the background suppression image, thereby improving the accuracy of infrared dim small target detection and reducing the computational cost.
[0082] (3) The infrared small target detection method based on local contrast difference created by the present invention further enhances the target contrast by using the contrast difference enhancement coefficient matrix, thereby effectively reducing background interference. BRIEF DESCRIPTION OF THE DRAWINGS
[0083] The accompanying drawings, which constitute part of the present invention, are intended to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are intended to explain the present invention and do not constitute an undue limitation of the present invention. In the accompanying drawings:
[0084] Figure 1 A flowchart of a method for detecting small infrared targets based on local contrast differences according to an embodiment of the present invention is provided;
[0085] Figure 2 The original infrared image and the three-dimensional image of the original infrared image described in the embodiment of the present invention are created;
[0086] Figure 3 Creating the difference image and the three-dimensional image of the difference image as described in the embodiment of the present invention;
[0087] Figure 4Creating a background suppressed image and a 3D image of the background suppressed image as described in an embodiment of the present invention;
[0088] Figure 5 A schematic diagram of the structure of the local contrast difference window according to an embodiment of the present invention;
[0089] Figure 6 Creating the first contrast difference image and the three-dimensional image of the first contrast difference image according to the embodiment of the present invention;
[0090] Figure 7 Creating the second contrast difference image and the three-dimensional image of the second contrast difference image according to the embodiment of the present invention;
[0091] Figure 8 Creating the contrast difference image and the 3D image of the contrast difference image as described in the embodiments of the present invention;
[0092] Figure 9 A two-dimensional image of the contrast difference enhancement coefficient matrix and a three-dimensional image of the contrast difference enhancement coefficient matrix described in an embodiment of the present invention;
[0093] Figure 10 The present invention creates a confidence map and a three-dimensional map of the confidence map described in the embodiment. DETAILED DESCRIPTION
[0094] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and do not constitute a limitation of the present invention.
[0095] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other.
[0096] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention. In addition, the terms "first", "second" and the like are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, features defined as "first", "second" and the like may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "multiple" means two or more.
[0097] In the description of the present invention, it should be noted that, unless otherwise expressly specified or limited, the terms "installed," "connected," and "connected" should be understood in a broad sense. For example, they can refer to fixed connections, detachable connections, or integral connections; they can refer to mechanical connections or electrical connections; they can refer to direct connections or indirect connections through an intermediate medium; and they can refer to internal connections between two components. Those skilled in the art can understand the specific meanings of the above terms in the present invention based on specific circumstances.
[0098] The present invention will be described in detail below with reference to the accompanying drawings and in combination with embodiments.
[0099] like Figure 1 As shown, the present invention provides an infrared dim small target detection method based on local contrast difference, which specifically includes the following steps: S1: acquiring an original infrared image, performing mean filtering processing and background suppression preprocessing on the original infrared image, and obtaining a background suppression image; S2: designing a local contrast difference window, and using the local contrast difference window to process the background suppression image, and obtaining a contrast difference image and a contrast difference enhancement coefficient matrix; S3: calculating a confidence map based on the contrast difference image and the contrast difference enhancement coefficient matrix, and taking the pixel position corresponding to the grayscale maximum value in the confidence map as the detection position of the infrared dim small target.
[0100] It should be noted that, first, two types of local contrast differences based on the double-layer background area are calculated and the two types of local contrast difference results are fused; then, the contrast difference enhancement coefficient matrix is obtained according to the mean brightness difference of the double-layer background area; finally, the estimation result of the infrared weak target is obtained according to the fusion result and the local contrast coefficient.
[0101] In some embodiments, step S1 specifically includes the following steps: S11: performing mean filtering on the original infrared image to obtain a filtered image; S12: performing difference processing on the original infrared image and the filtered image to obtain a difference image; S13: using a background suppression operator to perform background suppression preprocessing on the difference image to obtain a background suppressed image.
[0102] In some embodiments, in step S11 , the scale of the mean filter coefficients used in the mean filter process is 15×15.
[0103] It should be noted that the scale of the mean filter coefficient is the same as the scale of the local contrast difference window.
[0104] Further, such as Figure 2-Figure 4 As shown, in step S12, the original infrared image With filtered image Perform difference processing to obtain a difference image :
[0105] ;
[0106] The scale used is The symmetric background suppression operator DF is used to calculate the difference image Perform background suppression preprocessing to obtain the preprocessed background suppression image , the calculation process is shown as follows:
[0107] ;
[0108] Among them, p and q are the horizontal and vertical coordinates of the DF operator.
[0109] In some embodiments, in step S13, the background suppression operator DF is expressed as:
[0110] .
[0111] The local contrast difference window includes 5×5 subwindows, each subwindow has a size of 3×3. The subwindow located at the center of the local contrast difference window is used as the target subwindow, and the remaining subwindows in the local contrast difference window except the target subwindow are used as background subwindows.
[0112] The sub-windows are numbered from top to bottom and from left to right. The expression of the average gray value of each sub-window is:
[0113] ;
[0114] in, is the average grayscale value of the subwindow numbered i, i=1, 2, 3..., 25; N is the total number of pixels in the subwindow, N=1, 2, 3..., 9; j is the jth pixel in the subwindow, is the grayscale value of the j-th pixel in the subwindow numbered i in the background suppressed image.
[0115] It should be noted that if Figure 5 As shown in , since the local contrast difference window includes 5×5 sub-windows and the size of each sub-window is 3×3, the scale of the local contrast difference window is ; Among them, the central window C represents the target sub-window, and the peripheral window B represents the background sub-window.
[0116] In some embodiments, as Figure 6-Figure 9 As shown, step S2 specifically includes the following steps: S21: Based on ( , , , )、( , , , )、( , , , )、( , , , )、( , , , )、( , , , )、( , , , )、( , , , ), calculate the minimum contrast difference of the target sub-window and obtain the first contrast difference image :
[0117] ;
[0118] in, The target sub-window is based on ( , , , )and( , , , ) calculated as the contrast difference, The target sub-window is based on ( , , , )and( , , , ) calculated as the contrast difference, The target sub-window is based on ( , , , )and( , , , ) calculated as the contrast difference, The target sub-window is based on ( , , , )and( , , , ) calculated contrast difference;
[0119] S22: Calculate the contrast difference of the target sub-window in the horizontal direction, vertical direction, 45° direction and 135° direction, and take the minimum contrast difference of the target sub-window in the four directions as the second contrast difference image :
[0120] ;
[0121] in, is the contrast difference of the target sub-window in the horizontal direction, is the contrast difference of the target sub-window in the vertical direction, is the contrast difference of the target sub-window in the 45° direction, is the contrast difference of the target sub-window in the 135° direction;
[0122] S23: Based on the first contrast difference image and the second contrast difference image , the contrast difference image is calculated DG :
[0123] ;
[0124] S24: Divide the background sub-window into 8 areas, the 8 areas are: ( , , , )、( , , , )、( , , , )、( , , , )、( , , , )、( , , , )、( , , , )、( , , , ), and calculate the mean grayscale maximum value of each region:
[0125] ;
[0126] in, is the hth region, h≤8, 、 、 and Represents the average grayscale value of each of the four sub-windows in the area, The maximum value among the average grayscale values of the four sub-windows is taken as the average grayscale maximum value of the region;
[0127] S25: Sort the mean grayscale maximum values of the eight regions in descending order, take the average of the mean grayscale maximum values in the top four positions as the target average value, and subtract the square of the mean grayscale value of the target subwindow from the square of the target average value to obtain a contrast difference enhancement coefficient matrix.
[0128] It should be noted that the main function of the contrast difference enhancement coefficient matrix is to further enhance the contrast difference image DG The specific calculation process is as follows:
[0129] For different sub-window areas around the target area C, the maximum mean grayscale value in the area is obtained. The calculation formula is as follows:
[0130] ;
[0131] ;
[0132] ;
[0133] ;
[0134] ;
[0135] ;
[0136] ;
[0137] ;
[0138] Then, the above 8 mean grayscale maximum values are sorted, and the first 4 values from large to small are expressed as 、 、 and , then the contrast difference enhancement coefficient matrix PG can be expressed as:
[0139] .
[0140] Further, in step S23, the contrast difference image DG is represented as the contrast difference image and contrast difference image fusion.
[0141] In some embodiments, step S21 includes the following steps:
[0142] S211: Based on ( , , , )and( , , , ) Calculate the grayscale average of the left and right sub-windows of the target sub-window to obtain the contrast difference :
[0143] ;
[0144] ;
[0145] ;
[0146] in, for( , , , ) The grayscale average value of these four sub-windows, for( , , , ) The grayscale average of these four sub-windows;
[0147] S212: Based on ( , , , )and( , , , ) Calculate the grayscale average of the upper and lower sub-windows of the target sub-window to obtain the contrast difference :
[0148] ;
[0149] ;
[0150] ;
[0151] in, for( , , , ) The grayscale average value of these four sub-windows, for( , , , ) The grayscale average of these four sub-windows;
[0152] S213: Based on ( , , , )and( , , , ) Calculate the grayscale average of the upper and lower sub-windows of the target sub-window to obtain the contrast difference :
[0153] ;
[0154] ;
[0155] ;
[0156] in, for( , , , ) The grayscale average value of these four sub-windows, for( , , , ) The grayscale average of these four sub-windows;
[0157] S214: Based on ( , , , )and( , , , ) Calculate the grayscale average of the upper and lower sub-windows of the target sub-window to obtain the contrast difference :
[0158] ;
[0159] ;
[0160] ;
[0161] in, for( , , , ) The grayscale average value of these four sub-windows, for( , , , ) The grayscale average of these four sub-windows.
[0162] Based on contrast differences , contrast difference , contrast difference and contrast differences , calculate and obtain the first contrast difference image :
[0163] .
[0164] In one embodiment, step S22 includes the following steps:
[0165] S221: Calculate the contrast difference of the target sub-window in the horizontal direction :
[0166] ;
[0167] ;
[0168] ;
[0169] in, is the grayscale average of the target sub-window on one side in the horizontal direction, is the grayscale average of the target sub-window on the other side in the horizontal direction;
[0170] S222: Calculate the contrast difference of the target sub-window in the vertical direction :
[0171] ;
[0172] ;
[0173] ;
[0174] in, is the grayscale average of the target sub-window on one side in the vertical direction, is the grayscale average of the target sub-window on the other side in the vertical direction;
[0175] S223: Calculate the contrast difference of the target sub-window in the 45° direction :
[0176] ;
[0177] ;
[0178] ;
[0179] in, is the grayscale average of the target sub-window on one side of the 45° direction, is the grayscale average of the target sub-window on the other side of the 45° direction;
[0180] S224: Calculate the contrast difference of the target sub-window in the 135° direction :
[0181] ;
[0182] ;
[0183] ;
[0184] in, is the grayscale average of the target sub-window on one side of the 135° direction, is the grayscale average of the target sub-window on the other side of the 135° direction.
[0185] Based on contrast differences , contrast difference , contrast difference and contrast differences , calculate and obtain the second contrast difference image :
[0186] .
[0187] It should be noted that, with the calculation Different, seek Only the sub-window in a certain direction is considered, and the sub-windows on both sides of the direction axis are not considered. The average gray value of the pixels in the sub-window where the target area C is located is ,use Calculate the contrast difference in each direction.
[0188] In some embodiments, in step S3, the confidence map R is calculated as follows:
[0189] ;
[0190] in, is the contrast difference enhancement coefficient matrix, DG is the contrast difference image.
[0191] It should be noted that if Figure 10 As shown in Figure 1, the detection position of the infrared weak target can be obtained according to the maximum value position in the confidence map R.
[0192] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved. This is not limited herein.
[0193] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.
Claims
1. A method for detecting small infrared targets based on local contrast differences, characterized by: The specific steps include: S1: Acquire an original infrared image, perform mean filtering and background suppression preprocessing on the original infrared image, and obtain a background suppressed image; S2: Design a local contrast difference window and use it to process the background suppression image to obtain a contrast difference image and a contrast difference enhancement coefficient matrix; In step S2, the local contrast difference window includes 5×5 subwindows, each subwindow has a size of 3×3, the subwindow located at the center of the local contrast difference window is used as the target subwindow, and the remaining subwindows in the local contrast difference window except the target subwindow are used as background subwindows; The sub-windows are numbered from top to bottom and from left to right. The expression of the average gray value of each sub-window is: ; in, is the average gray value of the subwindow numbered i, N is the total number of pixels in the subwindow, j is the jth pixel in the subwindow, is the grayscale value of the j-th pixel in the subwindow numbered i in the background suppression image; Step S2 specifically includes the following steps: S21: Based on ( , , , )、( , , , )、( , , , )、( , , , )、( , , , )、( , , , )、( , , , )、( , , , ), calculate the minimum contrast difference of the target sub-window and obtain the first contrast difference image : ; in, The target sub-window is based on ( , , , )and( , , , ) calculated as the contrast difference, The target sub-window is based on ( , , , )and( , , , ) calculated as the contrast difference, The target sub-window is based on ( , , , )and( , , , ) calculated as the contrast difference, The target sub-window is based on ( , , , )and( , , , ) calculated contrast difference; S22: Calculate the contrast difference of the target sub-window in the horizontal direction, vertical direction, 45° direction and 135° direction, and take the minimum contrast difference of the target sub-window in the four directions as the second contrast difference image : ; in, is the contrast difference of the target sub-window in the horizontal direction, is the contrast difference of the target sub-window in the vertical direction, is the contrast difference of the target sub-window in the 45° direction, is the contrast difference of the target sub-window in the 135° direction; S23: Based on the first contrast difference image and the second contrast difference image , the contrast difference image is calculated DG : ; S24: Divide the background sub-window into 8 areas, the 8 areas are: ( , , , )、( , , , )、( , , , )、( , , , )、( , , , )、( , , , )、( , , , )、( , , , ), and calculate the mean grayscale maximum value of each region: ; in, is the hth region, h≤8, 、 、 and Represents the average grayscale value of the four background sub-windows in the area, The maximum value among the average grayscale values of the four background sub-windows is taken as the average grayscale maximum value of the region; S25: Sort the mean grayscale maximum values of the eight regions in descending order, take the average of the mean grayscale maximum values in the top four positions as the target average value, and calculate the difference between the square of the mean grayscale value of the target subwindow and the square of the target average value to obtain a contrast difference enhancement coefficient matrix; S3: Calculate the confidence map based on the contrast difference image and the contrast difference enhancement coefficient matrix, and use the pixel position corresponding to the grayscale maximum value in the confidence map as the detection position of the infrared weak target.
2. The infrared small target detection method based on local contrast difference according to claim 1, characterized in that: Step S1 specifically includes the following steps: S11: performing mean filtering on the original infrared image to obtain a filtered image; S12: performing difference processing on the original infrared image and the filtered image to obtain a difference image; S13: performing background suppression preprocessing on the difference image using a background suppression operator to obtain a background suppressed image.
3. The infrared small target detection method based on local contrast difference according to claim 2, characterized in that: In step S11 , the scale of the mean filter coefficients used in the mean filter process is 15×15.
4. The infrared small target detection method based on local contrast difference according to claim 2, characterized in that: In step S13, the background suppression operator DF is expressed as: 。 5. The infrared small target detection method based on local contrast difference according to claim 1, characterized in that: Step S21 includes the following steps: S211: Based on ( , , , )and( , , , ) Calculate the grayscale average of the left and right sub-windows of the target sub-window to obtain the contrast difference : ; ; ; in, for( , , , ) The grayscale average value of these four sub-windows, for( , , , ) The grayscale average of these four sub-windows; S212: Based on ( , , , )and( , , , ) Calculate the grayscale average of the upper and lower sub-windows of the target sub-window to obtain the contrast difference : ; ; ; in, for( , , , ) The grayscale average value of these four sub-windows, for( , , , ) The grayscale average of these four sub-windows; S213: Based on ( , , , )and( , , , ) Calculate the grayscale average of the upper and lower sub-windows of the target sub-window to obtain the contrast difference : ; ; ; in, for( , , , ) The grayscale average value of these four sub-windows, for( , , , ) The grayscale average of these four sub-windows; S214: Based on ( , , , )and( , , , ) Calculate the grayscale average of the upper and lower sub-windows of the target sub-window to obtain the contrast difference : ; ; ; in, for( , , , ) The grayscale average value of these four sub-windows, for( , , , ) The grayscale average of these four sub-windows.
6. The infrared small target detection method based on local contrast difference according to claim 1, characterized in that: Step S22 includes the following steps: S221: Calculate the contrast difference of the target sub-window in the horizontal direction : ; ; ; in, is the grayscale average of the target sub-window on one side in the horizontal direction, is the grayscale average of the target sub-window on the other side in the horizontal direction; S222: Calculate the contrast difference of the target sub-window in the vertical direction : ; ; ; in, is the grayscale average of the target sub-window on one side in the vertical direction, is the grayscale average of the target sub-window on the other side in the vertical direction; S223: Calculate the contrast difference of the target sub-window in the 45° direction : ; ; ; in, is the grayscale average of the target sub-window on one side of the 45° direction, is the grayscale average of the target sub-window on the other side of the 45° direction; S224: Calculate the contrast difference of the target sub-window in the 135° direction : ; ; ; in, is the grayscale average of the target sub-window on one side of the 135° direction, is the grayscale average of the target sub-window on the other side of the 135° direction.
7. The infrared small target detection method based on local contrast difference according to claim 1, characterized in that: In step S3, the confidence map R is calculated as follows: ; in, is the contrast difference enhancement coefficient matrix, DG is the contrast difference image.
Citation Information
Patent Citations
Multi-scale difference and bilateral filtering target detection method of an adaptive window
CN109767439A
Infrared target detection method based on local contrast
CN116310402A