Infrared weak target detection method based on local contrast
Patent Information
- Application Number
- CN202310176034.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-28
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2043-02-28
Smart Images

Figure CN116342492B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of infrared weak target detection technology, specifically relating to an infrared weak target detection method based on local contrast. Background Technology
[0002] Infrared detection of weak targets is an indispensable part of infrared search and track systems. Current mainstream detection systems are divided into three categories: radar detection, visible light detection, and infrared detection. Radar detection is an active detection method, requiring the active emission of electromagnetic waves, and thus lacks strong stealth capabilities. Visible light detection is greatly affected by lighting conditions and cannot operate in all weather conditions. Infrared detection offers strong stealth and is unaffected by lighting conditions, possessing irreplaceable advantages and becoming an effective supplement or replacement for radar and visible light detection.
[0003] With the continuous improvement of infrared detection system performance, infrared detection technology is widely used in military fields such as early warning, guidance, and tracking, as well as civilian fields such as medical lesion cell diagnosis and industrial flaw detection. In both civilian and military fields, high detection rate and low false alarm rate are essential requirements for practical applications, and current algorithms can already achieve relatively excellent detection results.
[0004] However, infrared small targets are small in size, typically less than 9×9 pixels, lacking obvious texture, color, and other information, and have a low signal-to-noise ratio, making detection difficult. Existing algorithms struggle to achieve a balance between detection rate and false alarm rate. Summary of the Invention
[0005] The purpose of this invention is to provide an infrared weak target detection method based on local contrast, which can maximize the detection rate and minimize the false alarm rate with less algorithm time.
[0006] The technical solution adopted in this invention is an infrared weak target detection method based on local contrast, which is implemented according to the following steps:
[0007] Step 1: Create a new window and calculate the local contrast ratio (DLCM) of each pixel in the infrared image;
[0008] Step 2: Apply a weighting function to weight the local contrast.
[0009] Step 3: Calculate the WDLCM for each pixel at different scales, and obtain the final WDLCM saliency mapping through max pooling operation;
[0010] Step 4: Differentiate the target from the background using adaptive threshold segmentation.
[0011] The invention is further characterized in that,
[0012] The specific process of step 1 is as follows:
[0013] Step 1.1: Create a new window containing a target block Ti (i = 1, 2, 3, 4) and a background block Bij (j = 1, 2, 3);
[0014] Step 1.2: Calculate the local contrast ratio (LCM) of each pixel in the infrared image between the target block and the background block in the Ti direction. TiB The expression is:
[0015]
[0016] In equation (1), Ti represents the i-th small block of the target, Bij represents the j-th background block in the direction to which the target small block Ti belongs, and M Ti M represents the average gray level of all pixels in the target block Ti. Bij This represents the average gray level of all pixels in the background block Bij in the direction to which the target block Ti belongs; max() represents the operation of finding the maximum value.
[0017] Step 1.3: Calculate the local contrast (LCM) of each pixel in the infrared image within the target block along the Ti direction. Ti The expression is:
[0018]
[0019] In equation (2), M K This represents the average gray level of the K largest pixels in the target block Ti;
[0020] Step 1.4, LCM Ti and LCM Ti The local contrast DLCM of the target small block Ti was obtained by combining calculations. Ti The expression is:
[0021] DLCM Ti =LCM TiB ×LCM Ti (3)
[0022] Step 1.5, DLCM of each target block Ti Ti The final local contrast ratio DLCM is obtained by combining these parameters:
[0023]
[0024] The specific process of step 2 is as follows:
[0025] Step 2.1: Calculate the WT of each pixel using the variance of the target block T. The expression is:
[0026] WT = Var(T) (5)
[0027] In equation (5), Var(T) represents the variance of the target block T;
[0028] Step 2.2: First, perform pixel difference analysis between the target patch Ti and the background patch Bij in its corresponding direction. Then, calculate the variance of the differenced result to calculate the WTiB of the target patch Ti. Based on WTiB, calculate the statistical difference WTB between the target and the background. The expression is:
[0029] WTiB=min(Var(Ti-Bij)),i=1,2,3,4; j=1,2,3 (6)
[0030] In equation (6), (Ti-Bij) represents the corresponding pixel difference operation between the target block Ti and the background block Bij in its direction, Var(Ti-Bij) represents the calculation of the variance of (Ti-Bij), and min() represents the operation of finding the minimum value;
[0031]
[0032] Step 2.3: Calculate the background characteristic WB using the standard deviation of the surrounding background block Bij. The expression is:
[0033]
[0034]
[0035] In equations (8) and (9), N is the number of background block Bij pixels. Std is the p-th maximum gray level of the background block Bij. Bij It is the standard deviation of the background block Bij;
[0036] Step 2.4, define the weighting function W for each pixel, with the expression:
[0037]
[0038] In equation (10), δ is a priori parameter.
[0039] In step 3, the expression for calculating the WDLCM of each pixel at different scales is as follows:
[0040] WDLCM=DLCM×W (11).
[0041] In step 3, the final expression for the WDLCM significance mapping is:
[0042] WDLCM = max(WDLCM) h ),h=1,2,…,s (12)
[0043] In equation (12), h represents the h-th scale and s represents the total number of scales.
[0044] In step 4, the threshold Th is defined as follows:
[0045] Th=αmax(WDLCM)+(1-α)mean(WDLCM) (13)
[0046] In equation (13), mean() represents the mean operation, and α is a parameter between 0 and 1.
[0047] The beneficial effects of this invention are: by using a novel nested window to calculate the dual local contrast of the target, the invention extracts the target features more effectively. By using the variance of the target, the standard deviation of the background, and the difference variance between the target and the background to calculate a weighted function, the statistical features of the target and background regions are further extracted. Under relatively low time consumption conditions, excellent detection results can be obtained, which greatly improves the detection rate and reduces the false alarm rate. Attached Figure Description
[0048] Figure 1 This is a flowchart of the method of the present invention;
[0049] Figure 2 This is a schematic diagram of the novel window in the method of the present invention;
[0050] Figure 3 This is a schematic diagram of the original infrared image used in the method of the present invention;
[0051] Figure 4 This is a comparison diagram of the method of this invention with other algorithms;
[0052] Figure 5 The ROC curves of the method of this invention are shown on five datasets. Detailed Implementation
[0053] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments.
[0054] This invention relates to an infrared weak target detection method based on local contrast, such as... Figure 1 As shown, please follow these steps:
[0055] Step 1: Create a new window and calculate the local contrast ratio (DLCM) of each pixel in the infrared image;
[0056] like Figure 2 As shown, the local contrast DLCM consists of two parts: the local contrast LCM between the target block Ti (i = 1, 2, 3, 4) and the corresponding background block Bij (j = 1, 2, 3). TiBLocal contrast ratio (LCM) within the target block Ti (i = 1, 2, 3, 4) Ti ;
[0057] Step 1.1: Create a new window containing a target block Ti (i = 1, 2, 3, 4) and a background block Bij (j = 1, 2, 3);
[0058] Step 1.2: Calculate the local contrast ratio (LCM) of each pixel in the infrared image between the target block and the background block in the Ti direction. TiB The expression is:
[0059]
[0060] In equation (1), Ti represents the i-th small block of the target, Bij represents the j-th background block in the direction to which the target small block Ti belongs, and M Ti M represents the average gray level of all pixels in the target block Ti. Bij This represents the average gray level of all pixels in the background block Bij in the direction to which the target block Ti belongs; max() represents the operation of finding the maximum value.
[0061] Step 1.3: Calculate the local contrast (LCM) of each pixel in the infrared image within the target block along the Ti direction. Ti The expression is:
[0062]
[0063] In equation (2), M K This represents the average gray level of the K largest pixels in the target block Ti;
[0064] Step 1.4, LCM Ti and LCM Ti The local contrast DLCM of the target small block Ti was obtained by combining calculations. Ti The expression is:
[0065] DLCM Ti =LCM TiB ×LCM Ti (3)
[0066] Step 1.5, DLCM of each target block Ti Ti The final local contrast ratio DLCM is obtained by combining these parameters:
[0067]
[0068] Step 2: Apply a weighting function to weight the local contrast.
[0069] When the background of an infrared image is complex, many false alarms will appear in the detection results obtained by using only DLCM detection. Therefore, a weighting function is used to weight the local contrast to solve the problem of difficult detection of weak infrared targets in complex backgrounds.
[0070] When designing the weighting function, three aspects were considered: (1) the characteristics of the target; (2) the statistical difference between the target and the background; and (3) the characteristics of the background. The target was further enhanced while the background was suppressed.
[0071] Step 2.1: Calculate the WT of each pixel using the variance of the target block T. The expression is:
[0072] WT = Var(T) (5)
[0073] In equation (5), Var(T) represents the variance of the target block T, which is obtained by integrating all the target sub-blocks Ti.
[0074] Step 2.2: First, perform pixel difference analysis between the target patch Ti and the background patch Bij in its corresponding direction. Then, calculate the variance of the differenced result to calculate the WTiB of the target patch Ti. Based on WTiB, calculate the statistical difference WTB between the target and the background. The expression is:
[0075] WTiB=min(Var(Ti-Bij)),i=1,2,3,4; j=1,2,3 (6)
[0076] In equation (6), (Ti-Bij) represents the corresponding pixel difference operation between the target block Ti and the background block Bij in its direction, Var(Ti-Bij) represents the calculation of the variance of (Ti-Bij), and min() represents the operation of finding the minimum value;
[0077]
[0078] Step 2.3: Calculate the background characteristic WB using the standard deviation of the surrounding background block Bij. The expression is:
[0079]
[0080]
[0081] In equations (8) and (9), N is the number of background block Bij pixels. Std is the p-th maximum gray level of the background block Bij. Bij It is the standard deviation of the background block Bij;
[0082] Step 2.4, define the weighting function W for each pixel, with the expression:
[0083]
[0084] In equation (10), δ is a priori parameter;
[0085] Step 3: Calculate the WDLCM for each pixel at different scales, and obtain the final WDLCM saliency map through max pooling operation. The expression is:
[0086] In real-world detection scenarios, the target size is often unknown, necessitating multi-scale operations. First, based on the target size range in the infrared image, blocks at different scales are set to different sizes. Then, the WDLCM (Wide Detailed Dynamics Mapping) for each pixel at different scales is calculated. Finally, max pooling is used to obtain the final WDLCM saliency mapping, expressed as follows:
[0087] WDLCM=DLCM×W (11)
[0088] WDLCM = max(WDLCM) h ),h=1,2,…,s (12)
[0089] In equation (12), h represents the h-th scale and s represents the total number of scales;
[0090] Step 4: Differentiate the target and background using adaptive threshold segmentation.
[0091] After obtaining the saliency mapping of WDLCM, the target is significantly enhanced and the background is greatly suppressed. Therefore, a simple adaptive threshold segmentation is used to distinguish between the target and the background. The portion of the image larger than the threshold is defined as the target, while the portion smaller than the threshold is considered as the image background. The threshold Th is defined as follows:
[0092] Th=αmax(WDLCM)+(1-α)mean(WDLCM) (13)
[0093] In equation (13), mean() represents the mean operation, and α is a parameter between 0 and 1.
[0094] like Figure 4As shown, (a) is the original image, (b) is the image processed by the LCM method, (c) is the image processed by the MPCM method, (d) is the image processed by the RLCM method, (e) is the image processed by the TLLCM method, (f) is the image processed by the DNGM method, (g) is the image processed by the WTLLCM method, (h) is the image processed by the WSLCM method, and (i) is the method of this invention. While both LCM and MPCM can successfully detect targets, they have many false alarms. RLCM, TLLCM, and DNGM not only detect targets but also significantly reduce false alarms compared to LCM and MPCM. In the detection results of LCM and DLCM, the target appears as a blocky diffusion. WTTLCM and WSLCM can successfully detect targets in infrared images with simple backgrounds without false alarms. Moreover, in infrared images with complex backgrounds, only a few false alarms appear in the detection results. In contrast, this method has a good background suppression effect and can accurately detect targets without false alarms. In contrast, the method of the present invention can detect targets without false alarms, and can effectively suppress clutter and noise.
[0095] like Figure 5 As shown, in most cases, the proposed method has good detection performance under different backgrounds and clutter.
Claims
1. A method for detecting weak infrared targets based on local contrast, characterized in that, The specific steps are as follows: Step 1: Create a new window and calculate the local contrast ratio (DLCM) of each pixel in the infrared image; The specific process of step 1 is as follows: Step 1.1: Create a new window containing the target block Ti (i=1,2,3,4) and the background block Bij (j=1,2,3); Step 1.2: Calculate the local contrast ratio (LCM) of each pixel in the infrared image between the target block and the background block in the Ti direction. TiB The expression is: (1) In equation (1), Ti represents the i-th small block of the target, Bij represents the j-th background block in the direction to which the target small block Ti belongs, and M Ti M represents the average gray level of all pixels in the target block Ti. Bij This represents the average gray level of all pixels in the background block Bij in the direction to which the target block Ti belongs; max() represents the operation of finding the maximum value. Step 1.3: Calculate the local contrast (LCM) of each pixel in the infrared image within the target block along the Ti direction. Ti The expression is: (2) In equation (2), M K This represents the average gray level of the K largest pixels in the target block Ti; Step 1.4, and The local contrast DLCM of the target small block Ti was obtained by combining calculations. Ti The expression is: (3) Step 1.5, DLCM of each target block Ti Ti The final local contrast ratio DLCM is obtained by combining these parameters: (4); Step 2: Apply a weighting function to weight the local contrast. Step 3: Calculate the WDLCM for each pixel at different scales, and obtain the final WDLCM saliency mapping through max pooling operation; Step 4: Differentiate the target from the background using adaptive threshold segmentation.
2. The infrared weak target detection method based on local contrast according to claim 1, characterized in that, The specific process of step 2 is as follows: Step 2.1: Calculate the WT of each pixel using the variance of the target block T. The expression is: (5) In equation (5), Var(T) represents the variance of the target block T; Step 2.2: First, perform pixel difference analysis between the target patch Ti and the background patch Bij in its corresponding direction. Then, calculate the variance of the differenced result to calculate the WTiB of the target patch Ti. Based on WTiB, calculate the statistical difference WTB between the target and the background. The expression is: (6) In equation (6), (Ti-Bij) represents the corresponding pixel difference operation between the target block Ti and the background block Bij in its direction, Var(Ti-Bij) represents the calculation of the variance of (Ti-Bij), and min() represents the operation of finding the minimum value; (7); Step 2.3: Calculate the background characteristic WB using the standard deviation of the surrounding background block Bij. The expression is: ,i=1,2,3,4; j=1,2,3(8) (9) In equations (8) and (9), N is the number of background block Bij pixels. It is the p-th largest gray level of the background block Bij. It is the standard deviation of the background block Bij; Step 2.4, define the weighting function W for each pixel, with the expression: (10) In equation (10), δ is a priori parameter.
3. The infrared weak target detection method based on local contrast according to claim 2, characterized in that, In step 3, the expression for calculating the WDLCM of each pixel at different scales is as follows: (11)。 4. The infrared weak target detection method based on local contrast according to claim 1, characterized in that, In step 3, the final expression for the WDLCM significance mapping is: ,h=1,2,…,s(12) In equation (12), h represents the h-th scale and s represents the total number of scales.
5. The infrared weak target detection method based on local contrast according to claim 1, characterized in that, In step 4, the threshold Th is defined as follows: (13) In equation (13), mean() represents the mean operation, and α is a parameter between 0 and 1.
Citation Information
Patent Citations
Ship target detection method based on local saliency feature measurement
CN114373135A
Infrared small target detection method based on improved weighted enhanced local contrast measurement
CN114627362A