Image preprocessing method for infrared target detection and tracking
By performing grayscale inversion on infrared images, truncation of probability density function, segmented adaptive gamma correction of grayscale prior values and grayscale mapping preprocessing methods, the problem of serious background interference in infrared target detection and tracking is solved, effective enhancement and background suppression of infrared targets are achieved, and the stability and accuracy of detection and tracking are improved.
Patent Information
- Application Number
- CN202411592436.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2044-11-08
AI Technical Summary
In infrared target detection and tracking, the optical imaging signal-to-noise ratio is low, the target edge texture is weak, and complex background interference is severe, resulting in unstable efficiency and tracking accuracy.
An image preprocessing method is proposed, including grayscale inversion, probability density function truncation processing, grayscale prior value segmented adaptive gamma correction and grayscale mapping, through these steps, the infrared image is subject to background suppression and target enhancement.
Effectively suppress background noise, highlight infrared target pixel information, and improve the stability and accuracy of infrared target detection and tracking in complex scenarios.
Smart Images

Figure CN119722734A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of infrared target image processing, and in particular relates to an image preprocessing method for infrared target detection and tracking. Background Art
[0002] Target detection and tracking refers to inferring and predicting the position and scale of any object in subsequent image frames from the initial state in a given first image frame. It is an essential and demanding task in the field of computer vision and pattern recognition, and is widely used in many fields. It is found in a large number of engineering application task cases that infrared target detection and tracking based on optical imaging platforms such as airborne, vehicle-mounted, and ship-mounted usually face many difficulties such as low optical imaging signal-to-noise ratio, weak edge texture of the target, and severe interference from complex backgrounds, which makes the efficiency and tracking accuracy of infrared target detection and tracking unstable.
[0003] In infrared target detection and tracking, infrared targets are usually located above clouds or submerged in the background. In order to achieve more stable target detection and tracking, it is necessary to preprocess the infrared image before detection and tracking to remove a large amount of background noise to suppress background interference and retain only the target pixel information. Therefore, designing an image preprocessing method for infrared target detection and tracking to suppress the background of infrared images and highlight the infrared target pixel information is extremely important for improving the stability and accuracy of infrared target detection and tracking in complex scenes. Summary of the invention
[0004] In order to overcome the instability of efficiency and tracking accuracy of infrared target detection and tracking, achieve background suppression of infrared images, and highlight infrared target pixel information, the present invention proposes an image preprocessing method for infrared target detection and tracking.
[0005] The technical solution adopted by the present invention to solve the technical problem is:
[0006] An image preprocessing method for infrared target detection and tracking comprises the following steps:
[0007] Step 1: Read the original high-bit deep infrared image I, perform grayscale inversion on the infrared image I, and obtain the inverted infrared image I inv .
[0008] Step 2: Calculate the inverted image I inv The probability density function pdf is obtained by truncating it to limit the contrast and evenly distributing the excess frequency to other pixel intensities to obtain the updated probability density function pdf new ;
[0009] Step 3: Calculate the image grayscale prior value p, and convert the image probability density function pdf into new Divided into image high-order probability density function pdf h and the low-order probability density function pdf l Two parts;
[0010] Step 4: Calculate the high-order probability density function pdf of the image respectively h and the low-order probability density function pdf l Perform weight calculation and cumulative calculation to obtain the high-order cumulative distribution function (cdf) of the image h and the low-order cumulative distribution function cdf l , the infrared image I inv Based on the image high-order cumulative distribution function cdf h and the low-order cumulative distribution function cdf l Perform weighted adaptive gamma correction to obtain the corrected infrared image I e ;
[0011] Step 5: Correct the infrared image I e Do grayscale inversion to get infrared image I ed ;
[0012] Step 6: The infrared image I ed Grayscale mapping is performed to obtain the preprocessed displayable image I ans .
[0013] Furthermore, in step 1, the infrared image I is gray-scale inverted, and the calculation method is as follows;
[0014] I ive = l max -I
[0015] In the formula, l max Represents the theoretical maximum grayscale value of image I, l max =2 n -1, n is the image bit depth;
[0016] Furthermore, in step 2, the probability density function pdf is truncated to limit the contrast, and the updated image probability density function pdf new The calculation method is as follows;
[0017] Step 1: Calculate the cutoff threshold N as follows:
[0018] N = cliplimit × max(pdf)
[0019] In the formula, N represents the cutoff threshold, cliplimit represents the set cutoff percentage, and max represents the maximum value. Step 2: Establish an identification function id(·) to identify elements that exceed the cutoff threshold. The calculation method is as follows:
[0020]
[0021] Step 3: Residue calculation, calculate the sum N exceeding the cutoff threshold sum , calculated as follows:
[0022]
[0023] Step 4: Remainder redistribution, evenly distribute the sum exceeding the cutoff threshold to other pixel intensities, and obtain the updated image histogram pdf new , the calculation method of the i-th grayscale is as follows:
[0024]
[0025] Furthermore, the image grayscale prior value p is used to update the probability density function pdf based on the image grayscale prior value p. new Divided into image high-order probability density function pdf h and the low-order probability density function pdf l Two parts, calculated as follows;
[0026] Step 1: Calculate the image variance var, the calculation method is as follows:
[0027]
[0028] In the formula, I ive (x, y) represents the gray value of the pixel (x, y), and μ represents the infrared image I ive The grayscale mean of ;
[0029] Step 2: Calculate the image gradient prior val G , calculated as follows:
[0030]
[0031] In the formula, G x and G y are the gradients of the infrared image in the horizontal and vertical directions;
[0032] Step 3: Calculate the grayscale prior value p, the calculation method is as follows:
[0033]
[0034] In the formula, λ represents the adjustment parameter;
[0035] Furthermore, in step 4, the infrared image I inv Based on the image high-order probability density function pdf h and the low-order probability density function pdf l Do weighted adaptive gamma correction, the calculation method is as follows:
[0036] Step 1: Calculate the weighted image high-order probability distribution function pdf w_h and the low-order probability density function pdf w_l , and the calculation methods of the lth grayscale are as follows:
[0037]
[0038] Where α and β are respectively represented by the weighted image high-order probability distribution function pdf w_h and the low-order probability density function pdf w_l Adjustable power coefficients, α>0, β>0;
[0039] Step 2: Calculate the cumulative distribution function cdf. The calculation method of the lth gray level is as follows:
[0040]
[0041] cdf(l)=cdf l (l)+cdf h (l)
[0042] In the formula, cdf h and cdf l They are respectively represented as the high-order cumulative distribution function and the low-order cumulative distribution function of the image, and are the weighted high-order probability distribution function pdf of the image. w_h and the low-order probability density function pdf w_l The cumulative distribution function of
[0043] Step 3: Perform weighted adaptive gamma correction to obtain the updated grayscale T n , the calculation formula of the lth gray level is as follows:
[0044]
[0045] Where, T n (l) is represented by the pixel gray value l corresponding to the pixel gray value after weighted gamma correction of the image cumulative distribution function cdf;
[0046] Step 4: Based on the updated grayscale T nThe grayscale of the original infrared image I is updated to obtain the corrected infrared image I e .
[0047] Furthermore, the grayscale inversion in step 5 is calculated in the same way as in step 1;
[0048] Furthermore, in step 6, the infrared image I obtained in step 5 ed Grayscale mapping is performed to obtain the preprocessed displayable image I ans , the grayscale mapping of the (x,y) position is calculated as follows:
[0049]
[0050] Where, MAX and MIN are respectively represented by the infrared image I ed The maximum and minimum grayscale values, I ed (x,y) is the grayscale of the infrared image at the position (x,y), and (x,y) is the position of the image pixel.
[0051] The beneficial effects of the present invention are:
[0052] An image preprocessing method for infrared target detection and tracking directly enhances the target and suppresses the background according to the spatial domain feature difference between the target and the background. Grayscale inversion of the image combined with piecewise adaptive gamma correction based on a priori values can effectively achieve strong enhancement of the brighter target area of the image and weak enhancement or suppression of the darker background area of the image. Then, contrast limitation of the inverted image can effectively suppress the dominant effect of secondary information or even noise in the image on the histogram component of the effective information. This method suppresses background noise enhancement, removes a large amount of background noise interference, highlights the infrared target pixel information, and can effectively improve the stability and accuracy of infrared target detection and tracking in complex scenes. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 This is a flow chart of the image preprocessing method according to Embodiment 1 of the present invention;
[0054] Figure 2 This is a comparison chart of the background suppression and target enhancement effects of the image preprocessing method of Example 1 of the present invention on four infrared test images with strong noise interference and dim targets with four common methods. DETAILED DESCRIPTION
[0055] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0056] Example 1
[0057] An image preprocessing method for infrared target detection and tracking directly enhances the target and suppresses the background based on the spatial domain feature difference between the target and the background. Figure 1 As shown, the image is first grayscale inverted, and then the contrast of the inverted image is limited to suppress the enhancement of background noise. The image histogram is then divided into two parts by the set grayscale prior value. Based on the two parts of the histogram, the image is weighted adaptive gamma correction is performed on the image respectively. Finally, the image is grayscale inverted and grayscale mapped to convert it into a preprocessed displayable image. The specific steps include the following:
[0058] Step 1: Read the original high-bit deep infrared image I, perform grayscale inversion on the infrared image I, and obtain the inverted infrared image I inv , the grayscale inversion is calculated as follows:
[0059] I ive = l max -I
[0060] In the formula, l max Represents the theoretical maximum grayscale value of image I, l max =2 n -1, n is the image bit depth;
[0061] Step 2: Calculate the inverted image I inv The probability density function pdf is obtained by truncating it to limit the contrast and evenly distributing the excess frequency to other pixel intensities to obtain the updated probability density function pdf new , the calculation method is as follows:
[0062] First, calculate the cutoff threshold, which is calculated as follows:
[0063] N = cliplimit × max(pdf)
[0064] In the formula, N represents the cutoff threshold, cliplimit represents the set cutoff percentage, and max represents the maximum value.
[0065] Next, we establish an identification function id(·) to identify elements that exceed the cutoff threshold. The calculation method is as follows:
[0066]
[0067] Then the residual calculation is performed to calculate the sum N that exceeds the truncation threshold sum , calculated as follows:
[0068]
[0069] Finally, the residual is redistributed, and the sum exceeding the cutoff threshold is evenly distributed to other pixel intensities to obtain the updated image histogram pdf new , the calculation method of the i-th grayscale is as follows:
[0070]
[0071] Step 3: Calculate the image grayscale prior value p, and convert the image probability density function pdf into new Divided into image high-order probability density function pdf h and the low-order probability density function pdf l The two parts are calculated as follows:
[0072] First, calculate the image variance var, which is calculated as follows:
[0073]
[0074] In the formula, I ive (x, y) represents the gray value at the pixel (x, y), and μ represents the inverted infrared image I ive The grayscale mean of ;
[0075] Secondly, calculate the image gradient prior val G , calculated as follows:
[0076]
[0077] In the formula, G x and G y are the gradients of the infrared image in the horizontal and vertical directions;
[0078] Finally, based on the image variance var and image gradient prior val G Calculate the grayscale prior value p as follows:
[0079]
[0080] In the formula, λ represents the adjustment parameter;
[0081] Step 4: Calculate the high-order probability density function pdf of the image respectively h and the low-order probability density function pdf l Perform weight calculation and cumulative calculation to obtain the high-order cumulative distribution function (cdf) of the image h and the low-order cumulative distribution function cdf l , the infrared image I inv Based on the image high-order cumulative distribution function cdf h and the low-order cumulative distribution function cdf lPerform weighted adaptive gamma correction to obtain the corrected infrared image I e ;
[0082] First, calculate the weighted image high-order probability distribution function pdf w_h and the low-order probability density function pdf w_l , and the calculation methods of the lth grayscale are as follows:
[0083]
[0084] Where α and β are respectively represented by the weighted image high-order probability distribution function pdf w_h and the low-order probability density function pdf w_l Adjustable power coefficients, α>0, β>0;
[0085] Next, the image cumulative distribution function cdf is calculated. The calculation method of the lth gray level is as follows:
[0086]
[0087] cdf(l)=cdf l (l)+cdf h (l)
[0088] In the formula, cdf h and cdf l They are respectively represented as the high-order cumulative distribution function and the low-order cumulative distribution function of the image, and are the weighted high-order probability distribution function pdf of the image. w_h and the low-order probability density function pdf w_l The cumulative distribution function of
[0089] Then, weighted adaptive gamma correction is performed based on the cumulative distribution function cdf to obtain an updated grayscale T n , the calculation method of the lth grayscale value is as follows:
[0090]
[0091] Where, T n (l) is represented by the pixel gray value l corresponding to the histogram pdf h and pdf l The pixel grayscale value after weighted gamma correction;
[0092] Finally, based on the updated grayscale T n The grayscale of the original infrared image I is updated to obtain the corrected infrared image I e .
[0093] Step 5: Correct the infrared image I eDo grayscale inversion to get infrared image I ed , the calculation method of grayscale inversion is the same as step 1;
[0094] Step 6: The infrared image I ed Grayscale mapping is performed to obtain the preprocessed displayable image I ans , the grayscale calculation method of its (x,y) position is as follows:
[0095]
[0096] Where, MAX and MIN are respectively represented by the infrared image I ed The maximum and minimum grayscale values, I ed (x,y) is the grayscale of the infrared image at the position (x,y), and (x,y) is the position of the image pixel.
[0097] like Figure 2 As shown in the figure, the effect of applying this method to 4 infrared images with strong noise interference and dim targets. Compared with several common methods (HE, CLAHE, BBHE and AGCWD), it can be seen that the noise background is suppressed, and the contrast of the target is enhanced without introducing artifacts, noise, etc., to achieve better visualization effect. It can provide high-quality target scenes for subsequent target tracking methods to achieve more stable and more accurate target tracking.
Claims
1. An image preprocessing method for infrared target detection and tracking, characterized in that: The following steps are involved: Step 1: read the original infrared image I, perform grayscale inversion on the read original infrared image I, and obtain the inverted infrared image I inv ; Step 2: Calculate the inverted infrared image I inv The probability density function pdf of the grayscale image is obtained by truncating it and evenly distributing the excess frequency to other grayscale intensities to obtain the updated probability density function pdf. new ; Step 3: Based on the image variance var and image gradient prior val G , calculate the image grayscale prior value p; based on the image grayscale prior value p, the probability density function pdf new Divided into image high-order probability density function pdf h And the image low-order probability density function pdf l Two parts; Step 4: Calculate the high-order probability density function pdf of the image h And the image low-order probability density function pdf l Perform weight calculation and accumulation calculation to obtain the high-order cumulative distribution function (cdf) of the image h And the image low-order cumulative distribution function cdf l ; Based on the image high-order cumulative distribution function cdf h And the image low-order cumulative distribution function cdf l , for the inverted infrared image I inv Perform weighted adaptive gamma correction to obtain the corrected infrared image I e ; Step 5: Correct the infrared image I e Do grayscale inversion to get infrared image I ed ; Step 6: For infrared image I ed Perform grayscale mapping to obtain the preprocessed displayable image I ans .
2. The image preprocessing method according to claim 1, characterized in that: In step 1, the grayscale of the original infrared image I is reversed. inv The calculation formula is as follows: I ive =l max -I In the above formula, l max is the theoretical maximum grayscale value of the original infrared image I, l max =2 n -1, n is the image bit depth.
3. The image preprocessing method according to claim 1, characterized in that: The step 2 further comprises: Updated probability density function pdf new The function value pdf of the i-th gray level new (i) The calculation formula is as follows: In the above formula, N is the cutoff threshold, N sum is the sum of the values exceeding the cutoff threshold, id(·) is the identification function, and i is the grayscale number.
4. The image preprocessing method according to claim 1, characterized in that: The step 3 further comprises: The image grayscale prior value p is calculated as follows: In the above formula, λ is the adjustment parameter, val G is the image gradient prior, and μ is the grayscale mean of the image.
5. The image preprocessing method according to claim 4, characterized in that: To calculate the image grayscale prior value p, first calculate the image variance var, the calculation formula is as follows: In the above formula, I ive (x,y) is the grayscale value at pixel (x,y); Secondly, calculate the image gradient prior val G , the calculation formula is as follows: In the above formula, G x and G y is the gradient of the infrared image in the horizontal and vertical directions.
6. The image preprocessing method according to claim 1, characterized in that: The step 4 further comprises: Based on the cumulative distribution function cdf(l), weighted adaptive gamma correction is performed to obtain the updated grayscale T n , the calculation formula of the lth gray level is as follows: In the above formula, T n (l) is the pixel gray value after weighted gamma correction corresponding to the pixel gray value l; According to the pixel gray value T after weighted gamma correction n , update the grayscale of the original infrared image I to obtain the corrected infrared image I e .
7. The image preprocessing method according to claim 1, characterized in that: The step 6 further comprises: Grayscale I of the displayable image at position (x,y) after preprocessing ans (x,y), which is calculated as follows: In the above formula, MAX and MIN are respectively the infrared image I ed The maximum and minimum grayscale values, I ed (x,y) is the grayscale of the infrared image at the position (x,y), and (x,y) is the position of the image pixel.
Citation Information
Patent Citations
Infrared image enhancement method
CN109712101A