GPU-based infrared image parallel defogging method

By employing a GPU-based parallel dehazing method, utilizing dark channel fogged images and adaptive histogram equalization technology, the real-time performance and resolution issues of infrared image dehazing algorithms are resolved, achieving efficient and clear restoration of infrared video.

CN121981908APending Publication Date: 2026-05-05BEIJING INST OF AEROSPACE CONTROL DEVICES
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING INST OF AEROSPACE CONTROL DEVICES
Filing Date
2025-12-31
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

Existing infrared image dehazing algorithms suffer from poor real-time performance, low brightness, and low resolution, failing to meet the real-time requirements of infrared video processing.

Method used

A GPU-based parallel dehazing method is adopted, which constructs a dark channel hazy image, estimates scene transmittance, optimizes guided filtering and adaptive histogram equalization, and combines an atmospheric scattering model. The kernel function is designed using a GPU parallel language to execute the image processing steps.

Benefits of technology

It achieves high-resolution and high-contrast restoration of infrared images, improves the viewing distance, and meets the real-time processing requirements of infrared video.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121981908A_ABST
    Figure CN121981908A_ABST
Patent Text Reader

Abstract

The invention relates to an infrared image parallel defogging method based on a GPU, and the method comprises the steps: S1, constructing a dark channel fog light image with an infrared image as an input, estimating the transmittance of a scene, and obtaining a GPU transmittance image; s2, taking the infrared image as a guide image, performing guide filtering optimization on the GPU transmissivity image, and outputting a GPU refined transmissivity image; s3, the GPU refinement transmissivity image passes through an atmospheric scattering model to obtain a preliminary defogging image; s4, adjusting a contrast limit parameter according to the estimated scene transmissivity, and enhancing the preliminary defogged image by using a contrast limit adaptive histogram equalization method to obtain an infrared enhanced image; and S5, designing a kernel function by using a GPU parallel language, and executing the processing processes of the steps S1 to S4. According to the method, the real-time requirement of infrared video processing can be met, and meanwhile, the resolution and the visual distance of an infrared image can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of infrared image dehazing technology, and relates to a GPU-based parallel dehazing method for infrared images. Background Technology

[0002] Image dehazing technology aims to recover clear, high-contrast original scenes from degraded images obscured by haze or fog, and has significant value in various fields such as security monitoring, remote sensing, and drone aerial photography. Infrared image dehazing algorithms are mainly used to improve the clarity and contrast of infrared cameras, making infrared images affected by temperature, haze, smoke, etc., clearer. Traditional infrared dehazing algorithms are usually based on atmospheric scattering physics models. Because reducing fog noise simultaneously reduces overall brightness, it can result in low brightness and low resolution images after dehazing. Furthermore, these algorithms typically perform image traversal operations, resulting in poor real-time performance and making them unsuitable for real-time video processing. Summary of the Invention

[0003] The technical problem solved by this invention is to overcome the shortcomings of the prior art and propose a GPU-based parallel dehazing method for infrared images. The aim is to meet the real-time requirements of infrared video processing while improving the resolution and viewing distance of infrared images.

[0004] The solution to the technical problem of this invention is: a GPU-based parallel dehazing method for infrared images, comprising the following steps: S1. Construct a dark channel fog image using infrared image as input, estimate scene transmittance, and obtain GPU transmittance image; S2. Using the infrared image as the guide image, perform guided filtering optimization on the GPU transmittance image and output the GPU refined transmittance image. S3 and GPU refine the transmittance image to obtain a preliminary dehazed image through an atmospheric scattering model; S4. Adjust the limiting contrast parameter according to the estimated scene transmittance, and use the limiting contrast adaptive histogram equalization method to enhance the preliminary dehazed image to obtain the infrared enhanced image. S5. Design kernel functions using GPU parallel language and execute the processing steps S1 to S4.

[0005] Furthermore, the method for obtaining the GPU transmittance image is as follows: Establish a CPU-to-GPU transmission channel to transfer the original infrared image from the CPU to the GPU; GPU infrared original image grayscale channel For any point in the original GPU infrared image x In the x local neighborhood centered on Extract the minimum grayscale value of all pixels to construct a dark channel hazy image. :

[0006] in, This is a dark channel hazy image. For local neighborhood The grayscale value of the pixels within; Obtain the maximum grayscale value of all pixels in the original GPU infrared image as the global atmospheric light component. A The scene transmittance is calculated using an atmospheric scattering model to obtain a GPU transmittance image. :

[0007] These are the defogging limiting parameters. Represents the pixel coordinates in the image.

[0008] Furthermore, the method for optimizing the guided filter is as follows: Infrared images are used as guide images. I In a local window Internal guide image I and GPU transmittance image mean , ; By guiding images I and GPU transmittance image and mean , Find the coefficients a k :

[0009] in, I i To guide the image I In local window points within, P i GPU transmittance image In local window points within, It is set to prevent decimals when the divisor is 0; Through the mean , Sum of coefficients a k Find the coefficients b k :

[0010] According to the coefficient a k , b k Calculate the GPU-refined transmittance image : .

[0011] Furthermore, the method for obtaining the preliminary dehazed image is as follows:

[0012] For the initial dehazing image, This is the original infrared image for the GPU.

[0013] Furthermore, the method for obtaining infrared enhanced images is as follows: Calculate the local histogram, dividing the initially dehazed image into several window tiles; calculate the histogram for each window tile: ; in For a pixel grayscale of 256, the above formula... This indicates that the pixels are traversed, and the count is incremented by 1 every time a pixel value of a certain gray level appears. Set contrast limit , To enhance the coefficients, the histogram is cropped, with a maximum number of values ​​for a given pixel. More than enough to be cut: , The pixels cropped from the histogram must not be discarded; they need to be evenly distributed across all gray levels. First, calculate the number of cropped pixels: , The superscript + indicates that only the following should be retained. For numbers greater than 0, the remaining amount R is evenly distributed across all gray levels: , Calculate the cumulative integral function for the redistributed local histogram: , Normalization and mapping to the grayscale range yields a local equalization map. :

[0014] in The minimum pixel value in the window. N The number of pixels in the window; For local equilibrium diagrams Infrared enhanced images are obtained by performing bilinear interpolation.

[0015] Furthermore, the contrast limit parameter is adjusted based on the estimated scene transmittance, specifically as follows: For areas with transmittance higher than 0.5, the contrast parameter is limited to a value of 1.0-2.0; For areas with transmittance below 0.5, the contrast parameter is limited to a value of 0.0-1.0.

[0016] Furthermore, the design kernel function includes a dark channel kernel function, a transmittance kernel function, a guided filter kernel function, a dehazing kernel function, and an adaptive histogram equalization kernel function; The input to the dark channel kernel function is the original infrared image from the GPU, and the output is the dark channel hazy image. The transmittance kernel function takes a dark channel hazy image as input, calculates the scene transmittance using an atmospheric scattering model, and outputs a GPU transmittance image. The input to the guided filter kernel function is the GPU transmittance image and the original GPU infrared image. Based on the original GPU infrared image, the GPU transmittance image is optimized by guided filtering, and the output is a GPU-refined transmittance image. The input to the dehazing kernel function is a GPU-refined transmittance image, and the output is a preliminary dehazing image using an atmospheric scattering model. The input to the adaptive histogram equalization kernel function is the preliminary dehazed image and the GPU transmittance image. The histogram is calculated for the preliminary dehazed image. The contrast limit of the adaptive histogram equalization kernel function is set according to the transmittance. The histogram is cropped, and the cropped histogram is normalized and mapped to the grayscale range. Then, the infrared enhanced image is interpolated.

[0017] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of a GPU-based parallel dehazing method for infrared images.

[0018] The advantages of this invention compared to the prior art are: (1) The present invention can recover a clear, high-contrast original scene from degraded images, thereby improving the resolution and viewing distance of infrared images; (2) Adaptive histogram equalization and image dehazing work together to significantly improve the brightness and clarity of dehazed images; (3) The present invention uses GPU parallel language design, which significantly improves the algorithm running speed and meets the requirements of real-time infrared video processing. Attached Figure Description

[0019] Figure 1 This is a flowchart of a GPU-based parallel dehazing method for infrared images according to the present invention. Figure 2 This is a schematic diagram of the guided filtering process according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the adaptive histogram equalization process according to an embodiment of the present invention. Detailed Implementation

[0020] like Figure 1 As shown, the present invention proposes a GPU-based parallel dehazing method for infrared images, comprising the following steps: S1. Construct a dark channel fog image using infrared image as input, estimate scene transmittance, and obtain GPU transmittance image; S2. Using the infrared image as the guide image, perform guided filtering optimization on the GPU transmittance image and output the GPU refined transmittance image. S3 and GPU refine the transmittance image to obtain a preliminary dehazed image through an atmospheric scattering model; S4. Adjust the limiting contrast parameter according to the estimated scene transmittance, and use the limiting contrast adaptive histogram equalization method to enhance the preliminary dehazed image to obtain the infrared enhanced image. S5. Design kernel functions using GPU parallel language and execute the processing steps S1 to S4.

[0021] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0022] Example 1 Traditional image dehazing algorithms are all based on atmospheric scattering models, which are expressed as: ; in, The observed image is the raw input to the infrared camera; This represents the ideal restored image under fog-free conditions and is the final output of infrared defogging. This represents atmospheric light value, which is generally a constant. Representing scene transmittance, the first step to obtaining an ideally restored image is to... Make an estimate.

[0023] like Figure 1 The following are the steps of a GPU-based parallel dehazing method for infrared images in this embodiment: S1. Construct a dark channel fog image using infrared image as input, estimate scene transmittance, and obtain GPU transmittance image.

[0024] 1) Establish a CPU-to-GPU transmission channel to transfer the original infrared image from the CPU to the GPU; 2) The grayscale channel of the original GPU infrared image is... For any point in the original GPU infrared imagex In the x local neighborhood centered on Within a 7x7 window, extract the minimum grayscale value of all pixels to construct a dark channel hazy image. : ; in, This is a dark channel hazy image. For local neighborhood The grayscale value of the pixels within; 3) Obtain the maximum grayscale value of all pixels in the original GPU infrared image as the global atmospheric light component. A The scene transmittance is calculated using an atmospheric scattering model to obtain a GPU transmittance image. : ; These are the defogging limiting parameters. Represents the pixel coordinates in the image.

[0025] S2. Using the infrared image as the guide image, perform guided filtering optimization on the GPU transmittance image and output a GPU-refined transmittance image.

[0026] like Figure 2 The specific steps of the guided filter optimization include: 1) Use infrared images as guide images I In a local window Internal guide image I and GPU transmittance image mean , ; 2) By guiding the image I and GPU transmittance image and mean , Find the coefficients a k :

[0027] in, I i To guide the image I In local window points within, P i GPU transmittance image In local window points within, This is to prevent the decimal value from being divided by 0; in this embodiment, the value is 0.01. 3) Through the mean , Sum of coefficients a k Find the coefficients b k :

[0028] 4) Based on the coefficients a k , b k Calculate the GPU-refined transmittance image :

[0029] The S3 GPU refines the transmittance image and obtains a preliminary dehazing image through an atmospheric scattering model.

[0030]

[0031] For the initial dehazing image, This is the original infrared image for the GPU.

[0032] S4. Adjust the contrast limit parameter according to the estimated scene transmittance, and use the contrast limit adaptive histogram equalization method to enhance the preliminary dehazed image to obtain the infrared enhanced image.

[0033] like Figure 3 The method for enhancing the initially dehazed image using the contrast-limited adaptive histogram equalization method to obtain the infrared enhanced image is as follows: 1) Calculate the local histogram, dividing the initially dehazed image into several window tiles; calculate the histogram for each window tile: ; in For a pixel grayscale of 256, the above formula... This indicates that the pixels are traversed, and the count is incremented by 1 every time a pixel value of a certain gray level appears; in this way, the total number of each pixel value (0-255) in the window can be calculated.

[0034] 2) Set contrast limit , To enhance the coefficient, it is set to 2.0 in this embodiment. The histogram is cropped, and the maximum number of pixels for a given pixel is [value missing]. More than enough to be cut: , The pixels cropped from the histogram cannot be discarded and need to be evenly distributed across all gray levels. Therefore, the number of cropped pixels is calculated first: , The superscript + indicates that only the following should be retained. For numbers greater than 0, the remaining amount R is evenly distributed across all gray levels: , 3) Calculate the cumulative integral function of the redistributed local histogram: , Normalization and mapping to the grayscale range yields a local equalization map. :

[0035] in The minimum pixel value in the window. N The number of pixels in the window; 4) For the local equilibrium diagram Infrared enhanced images are obtained by performing bilinear interpolation.

[0036] Among them, setting a contrast limit The method is as follows: Regions with transmittance higher than 0.5 (i.e., weaker scattering) are limited to a larger contrast parameter, with a value of 1.0-2.0, to improve the enhancement effect; regions with transmittance lower than 0.5 (i.e., severe scattering) are limited to a smaller contrast parameter, with a value of 0.0-1.0, to reduce the enhancement effect and limit the noise introduced by histogram equalization.

[0037] S5. Design kernel functions using GPU parallel language and execute the processing steps S1 to S4.

[0038] The design kernel functions include dark channel kernel function, transmittance kernel function, guided filter kernel function, dehazing kernel function, and adaptive histogram equalization kernel function; The input to the dark channel kernel function is the original infrared image from the GPU, and the output is the dark channel hazy image. The transmittance kernel function takes a dark channel hazy image as input, calculates the scene transmittance using an atmospheric scattering model, and outputs a GPU transmittance image. The input to the guided filter kernel function is the GPU transmittance image and the original GPU infrared image. Based on the original GPU infrared image, the GPU transmittance image is optimized by guided filtering, and the output is a GPU-refined transmittance image. The input to the dehazing kernel function is a GPU-refined transmittance image, and the output is a preliminary dehazing image using an atmospheric scattering model. The input to the adaptive histogram equalization kernel function is the preliminary dehazed image and the GPU transmittance image. The histogram is calculated for the preliminary dehazed image. The contrast limit of the adaptive histogram equalization kernel function is set according to the transmittance. The histogram is cropped, and the cropped histogram is normalized and mapped to the grayscale range. Then, the infrared enhanced image is interpolated.

[0039] This invention can be applied to infrared video processing, reducing the impact of severe weather such as fog and smoke on infrared cameras, and can further improve the resolution and viewing distance of infrared cameras to meet real-time requirements.

[0040] Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make possible changes and modifications to the technical solutions of the present invention by utilizing the methods and techniques disclosed above without departing from the spirit and scope of the present invention. Therefore, any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solutions of the present invention shall fall within the protection scope of the technical solutions of the present invention.

[0041] The contents not described in detail in this specification are common knowledge to those skilled in the art.

Claims

1. A GPU-based parallel dehazing method for infrared images, characterized in that, Includes the following steps: S1. Construct a dark channel fog image using infrared image as input, estimate scene transmittance, and obtain GPU transmittance image; S2. Using the infrared image as the guide image, perform guided filtering optimization on the GPU transmittance image and output the GPU refined transmittance image. S3 and GPU refine the transmittance image to obtain a preliminary dehazed image through an atmospheric scattering model; S4. Adjust the limiting contrast parameter according to the estimated scene transmittance, and use the limiting contrast adaptive histogram equalization method to enhance the preliminary dehazed image to obtain the infrared enhanced image. S5. Design kernel functions using GPU parallel language and execute the processing steps S1 to S4.

2. The GPU-based parallel dehazing method for infrared images according to claim 1, characterized in that, The method for obtaining GPU transmittance images is as follows: Establish a CPU-to-GPU transmission channel to transfer the original infrared image from the CPU to the GPU; GPU infrared original image grayscale channel For any point in the original GPU infrared image x In the x local neighborhood centered on Extract the minimum grayscale value of all pixels to construct a dark channel hazy image. : in, This is a dark channel hazy image. For local neighborhood The grayscale value of the pixels within; Obtain the maximum grayscale value of all pixels in the original GPU infrared image as the global atmospheric light component. A The scene transmittance is calculated using an atmospheric scattering model to obtain a GPU transmittance image. : These are the defogging limiting parameters. Represents the pixel coordinates in the image.

3. The GPU-based parallel dehazing method for infrared images according to claim 2, characterized in that, The method for optimizing guided filtering is as follows: Infrared images are used as guide images. I In a local window Internal guide image I and GPU transmittance image mean , ; By guiding images I and GPU transmittance image and mean , Find the coefficients a k : in, I i To guide the image I In local window points within, P i GPU transmittance image In local window points within, It is set to prevent decimals when the divisor is 0; Through the mean , Sum of coefficients a k Find the coefficients b k : According to the coefficient a k , b k Calculate the GPU-refined transmittance image : 。 4. The GPU-based parallel dehazing method for infrared images according to claim 3, characterized in that, The method for obtaining a preliminary dehazed image is as follows: For the initial dehazing image, This is the original infrared image for the GPU.

5. The GPU-based parallel dehazing method for infrared images according to claim 4, characterized in that, The method for obtaining infrared enhanced images is as follows: Calculate the local histogram, dividing the initially dehazed image into several window tiles; calculate the histogram for each window tile: ; in For a pixel grayscale of 256, the above formula... This indicates that the pixels are traversed, and the count is incremented by 1 every time a pixel value of a certain gray level appears. Set contrast limit , To enhance the coefficients, the histogram is cropped, with a maximum number of values ​​for a given pixel. More than enough to be cut: , The pixels cropped from the histogram must not be discarded; they need to be evenly distributed across all gray levels. First, calculate the number of cropped pixels: , The superscript + indicates that only the following should be retained. For numbers greater than 0, the remaining amount R is evenly distributed across all gray levels: , Calculate the cumulative integral function for the redistributed local histogram: , Normalization and mapping to the grayscale range yields a local equalization map. : in The minimum pixel value in the window. N The number of pixels in the window; For local equilibrium diagrams Infrared enhanced images are obtained by performing bilinear interpolation.

6. A GPU-based parallel dehazing method for infrared images according to claim 1 or 5, characterized in that, The contrast parameters are adjusted based on the estimated scene transmittance, specifically as follows: For areas with transmittance higher than 0.5, the contrast parameter is limited to a value of 1.0-2.0; For areas with transmittance below 0.5, the contrast parameter is limited to a value of 0.0-1.

0.

7. The GPU-based parallel dehazing method for infrared images according to claim 1, characterized in that, The design kernel functions include dark channel kernel function, transmittance kernel function, guided filter kernel function, dehazing kernel function, and adaptive histogram equalization kernel function; The input to the dark channel kernel function is the original infrared image from the GPU, and the output is the dark channel hazy image. The transmittance kernel function takes a dark channel hazy image as input, calculates the scene transmittance using an atmospheric scattering model, and outputs a GPU transmittance image. The input to the guided filter kernel function is the GPU transmittance image and the original GPU infrared image. Based on the original GPU infrared image, the GPU transmittance image is optimized by guided filtering, and the output is a GPU-refined transmittance image. The input to the dehazing kernel function is a GPU-refined transmittance image, and the output is a preliminary dehazing image using an atmospheric scattering model. The input to the adaptive histogram equalization kernel function is the preliminary dehazed image and the GPU transmittance image. The histogram is calculated for the preliminary dehazed image. The contrast limit of the adaptive histogram equalization kernel function is set according to the transmittance. The histogram is cropped, and the cropped histogram is normalized and mapped to the grayscale range. Then, the infrared enhanced image is interpolated.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method as described in any one of claims 1 to 7.