Improved algorithm based on dark channel prior image defogging

Through the improved bright channel and dark channel prior single image dehazing method, the problem of poor foggy weather image processing in the existing technology is solved, and high-quality image restoration and dehazing effects are achieved, especially in the sky area. , and has the advantage of real-time processing.

CN118735823APending Publication Date: 2024-10-01UNIV OF ELECTRONICS SCI & TECH OF CHINA
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410959029.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-17
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

When the existing technology processes foggy weather images, especially the dark channel prior fails in the sky area and cannot effectively solve the problem of large-scale haze, resulting in poor image recovery results.

Method used

A single image dehazing method based on improved bright channel prior and dark channel prior is adopted, the image is divided into sky and non-sky areas through the Otsu method of particle swarm optimization, the atmospheric brightness value and transmittance are calculated, and a weighted fusion function is used Restore clear images.

Benefits of technology

High-quality image restoration is achieved, especially for images with limited haze. The dehazing effect is significant, the image restoration results are close to the real situation, and the sky area is protected. The running time is fast and suitable for real-time processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118735823A_ABST
    Figure CN118735823A_ABST
Patent Text Reader

Abstract

The invention discloses an improved algorithm based on dark channel prior image defogging, and particularly relates to the field of image processing and video display, and the algorithm specifically comprises the following steps: 1, inputting and classifying an image, and dividing the image into a sky region and a non-sky region; step 2, inspecting in sky and non-sky areas, and calculating the atmospheric brightness value and transmissivity of the non-sky area; 3, according to the sky area and non-sky area range, a weight parameter lambda is introduced; 4, parameter fusion calculation is carried out; 5, restoring to obtain a fog-free image J (q); and step 6, displaying the fog-free image on a display. According to the method, a blurred image is divided into a sky area and a non-sky area by using a particle swarm optimization Otsu method, parameters in a physical model are estimated by using improved bright channel prior and dark channel prior, and a weighted fusion function is provided to effectively fuse the parameters estimated by the two prior, so that a clear image is recovered through the physical model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of image processing and video display, and is mainly used for displaying foggy images on a display after processing. Background Art

[0002] Complex weather conditions such as haze can reduce the visibility of the landscape and affect image quality. For example, there will be missing colors, low saturation, and blurred texture details, which will lead to a decrease in the accuracy of the visual system tasks. Image dehazing methods can be divided into: image enhancement-based methods, prior-based methods, and deep learning-based methods. Enhancement-based dehazing methods, such as Retinex, histogram equalization, and wavelet transform, do not rely on physical models and improve image quality by increasing contrast and saturation. However, this method does not have a good dehazing effect and does not achieve true physical dehazing.

[0003] Prior-based image dehazing methods usually estimate the parameters of the atmospheric scattering model (transmission map and atmospheric light) and restore a clear image. For example, He et al. proposed a dark channel prior (DCP) to estimate the transmission map. DCP is a well-known prior that assumes that the low-intensity values ​​of at least one color channel in a haze-free image are close to zero. Meng proposed boundary constraint and regularization (BCCR), which uses guided filtering and bilateral filtering to replace time-consuming soft matting to improve computational efficiency. Berman discovered a haze line prior (NonLocal), that is, the color value distribution of the image will change from clusters to lines due to the presence of haze, and used this distribution rule to make a preliminary estimate of the transmission map. Some scholars have also proposed some methods that combine total variation and DCP to estimate parameters. Although these prior-based methods are somewhat successful, they rely on parameter estimation and are prone to problems such as distortion.

[0004] To address the above problems, we propose a new single image dehazing method based on an improved bright channel prior (BCP) and DCP to more accurately estimate the transmission map and atmospheric light, thereby restoring clearer haze-free images for subsequent processing and display. Summary of the invention

[0005] Aiming at the problem that dark channel prior fails in the sky area and many current methods cannot solve the problem of large-scale haze, the present invention proposes a simple and effective single image dehazing method based on improved bright channel prior and dark channel prior, thereby achieving high-quality image restoration, especially for images with limited haze.

[0006] To achieve the above object, the present invention provides the following technical solution: an improved algorithm for defogging dark channel prior images, the algorithm specifically comprising the following steps:

[0007] Step 1: Image input: algorithm processing is performed on the foggy image input by the camera. The OSTU method based on genetic algorithm is used to classify the foggy image into sky and non-sky areas.

[0008] Step 2: Use the bright channel to test the sky area, calculate the atmospheric brightness value A_bright and transmittance t_bright in the sky area, and use the dark channel to test the non-sky area, calculate the atmospheric brightness value A_dark and transmittance t_dark in the non-sky area;

[0009] Step 3: Introduce a weight parameter λ according to the range of the sky area and the non-sky area;

[0010] Step 4: Based on the parameters calculated in Step 2 and Step 3, perform parameter fusion calculation to obtain the atmospheric illumination A and transmittance t(q) for the entire image;

[0011] Step 5: According to the image restoration formula

[0012]

[0013] Repair the foggy image to obtain the fog-free image J(q);

[0014] Step 6: Display the fog-free image on the monitor.

[0015] As a further improvement of the technical solution of the present invention, before step one, it is necessary to use a high-speed CCD camera to collect images, filter the images during the collection process, and delete images with high repetition.

[0016] As a further improvement of the technical solution of the present invention, the image to be processed is a grayscale image. Generally, the pictures taken are RGB three-primary color images, and the image is pre-processed to perform grayscale conversion.

[0017] As a further improvement of the technical solution of the present invention, in step 2, the atmospheric brightness value A_bright of the sky area is fused with the atmospheric brightness value A_dark of the non-sky area to obtain the atmospheric illumination A, and the transmittance t_bright of the sky area is fused with the transmittance t_dark of the non-sky area to obtain the transmittance t(q).

[0018] As a further improvement of the technical solution of the present invention, the algorithm is mainly used to process outdoor foggy scenes. When the video displays outdoor scenes, the defogging mode can be turned on. In addition, the algorithm is also very helpful for safe driving in foggy weather at night.

[0019] As a further improvement of the technical solution of the present invention, the algorithm has a fast running time and, if deployed in an embedded system, can process the fog image in real time and return the processed image.

[0020] As a further improvement of the technical solution of the present invention, after the defogging operation is performed on the image, other image processing may be performed to achieve the desired effect, such as edge detection.

[0021] Technical effects and advantages of the present invention:

[0022] This design uses the Otsu method of particle swarm optimization to divide the blurred image into sky area and non-sky area, uses improved bright channel prior and dark channel prior to estimate the parameters in the physical model, and proposes a weighted fusion function to effectively fuse the parameters estimated by the two priors, thereby restoring a clear image through the physical model.

[0023] By comparing with algorithms such as DCP, BCCR, and AODNet, the results of dehazing and restoring images using the improved algorithm are closest to the real fog-free situation. In addition, the algorithm protects the sky area of ​​the image well, solving the problem of DCP failing in the sky area. In terms of dehazing effect, the dehazing effect of the improved algorithm is also more obvious. The image restoration result has the smallest haze and is closest to the real situation. In order to objectively verify the performance, a detailed quantitative evaluation was performed using the PSNR (peak signal-to-noise ratio) and SSIM (structural similarity index) indicators for comparison. The scores obtained by calculating PNSR / SSIM by the improved algorithm are also quite objective compared to other algorithms. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 It is a schematic diagram of the overall process of the present invention. DETAILED DESCRIPTION

[0025] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0026] As attached Figure 1 The improved algorithm based on dark channel prior image defogging is characterized in that the algorithm specifically comprises the following steps:

[0027] Step 1: Image input: algorithm processing is performed on the foggy image input by the camera. The OSTU method based on genetic algorithm is used to classify the foggy image into sky and non-sky areas.

[0028] Step 2: Use the bright channel to test the sky area, calculate the atmospheric brightness value A_bright and transmittance t_bright in the sky area, and use the dark channel to test the non-sky area, calculate the atmospheric brightness value A_dark and transmittance t_dark in the non-sky area;

[0029] Step 3: Introduce a weight parameter λ according to the range of the sky area and the non-sky area;

[0030] Step 4: Based on the parameters calculated in Step 2 and Step 3, perform parameter fusion calculation to obtain the atmospheric illumination A and transmittance t(q) for the entire image;

[0031] Step 5: According to the image restoration formula

[0032]

[0033] Repair the foggy image to obtain the fog-free image J(q);

[0034] Step 6: Display the fog-free image on the monitor.

[0035] Before step 1, it is necessary to use a high-speed CCD camera to collect images, filter the images during the collection process, and delete images with high repetition.

[0036] The image to be processed is a grayscale image. Generally, the pictures taken are RGB three-primary color images. The image is preprocessed for grayscale conversion.

[0037] In step 2, the atmospheric brightness value A_bright of the sky area is fused with the atmospheric brightness value A_dark of the non-sky area to obtain the atmospheric illumination A, and the transmittance t_bright of the sky area is fused with the transmittance t_dark of the non-sky area to obtain the transmittance t(q).

[0038] This algorithm is mainly used to process outdoor foggy scenes. When the video displays outdoor scenes, the defogging mode can be turned on. In addition, this algorithm is also very helpful for safe driving in foggy weather at night.

[0039] The algorithm has a fast running time and, if deployed in an embedded system, can process the fog image in real time and return the processed image.

[0040] After dehazing the image, other image processing can be performed to achieve the desired effect, such as edge detection.

[0041] Secondly: In the drawings of the embodiments disclosed in the present invention, only the structures related to the embodiments disclosed in the present invention are involved, and other structures can refer to the general design. In the absence of conflict, the same embodiment and different embodiments of the present invention can be combined with each other;

[0042] Finally: The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. An improved algorithm for defogging images based on dark channel priors, characterized by: The algorithm specifically includes the following steps: Step 1: Image input: algorithm processing is performed on the foggy image input by the camera. The OSTU method based on genetic algorithm is used to classify the foggy image into sky and non-sky areas. Step 2: Use the bright channel to test the sky area, calculate the atmospheric brightness value A_bright and transmittance t_bright in the sky area, and use the dark channel to test the non-sky area, calculate the atmospheric brightness value A_dark and transmittance t_dark in the non-sky area; Step 3: Introduce a weight parameter λ according to the range of the sky area and the non-sky area; Step 4: Based on the parameters calculated in Step 2 and Step 3, perform parameter fusion calculation to obtain the atmospheric illumination A and transmittance t(q) for the entire image; Step 5: According to the image restoration formula Repair the foggy image to obtain the fog-free image J(q); Step 6: Display the fog-free image on the monitor.

2. The improved algorithm based on dark channel prior image defogging according to claim 1 is characterized in that: Before step 1, it is necessary to use a high-speed CCD camera to collect images, filter the images during the collection process, and delete images with high repetition.

3. The improved algorithm based on dark channel prior image defogging according to claim 1 is characterized in that: The image to be processed is a grayscale image. Generally, the pictures taken are RGB three-primary color images. The image is preprocessed for grayscale conversion.

4. The improved algorithm for defogging based on dark channel priori images according to claim 1 is characterized in that: In step 2, the atmospheric brightness value A_bright of the sky area is fused with the atmospheric brightness value A_dark of the non-sky area to obtain the atmospheric illumination A, and the transmittance t_bright of the sky area is fused with the transmittance t_dark of the non-sky area to obtain the transmittance t(q).

5. The improved algorithm for defogging based on dark channel priori images according to claim 1 is characterized in that: This algorithm is mainly used to process outdoor foggy scenes. When the video displays outdoor scenes, the defogging mode can be turned on. In addition, this algorithm is also very helpful for safe driving in foggy weather at night.

6. The improved algorithm for defogging based on dark channel priori images according to claim 1 is characterized in that: The algorithm has a fast running time and, if deployed in an embedded system, can process the fog image in real time and return the processed image.

7. The improved algorithm for defogging based on dark channel priori images according to claim 1 is characterized in that: After dehazing the image, other image processing can be performed to achieve the desired effect, such as edge detection.

Citation Information

Cited By

  • Image defogging method based on sky region segmentation

    CN121437316A