Image defogging method

By reconstructing the dehazing gain value through regional averaging and upsampling, the halo problem in existing technologies is solved, achieving high-quality image dehazing effects, which are applicable to fields such as security monitoring, assisted driving, and remote sensing mapping.

CN122199336APending Publication Date: 2026-06-12SHANGHAI TONGTU SEMICON TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANGHAI TONGTU SEMICON TECH
Filing Date
2026-04-08
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

Existing single-image dehazing methods based on atmospheric scattering models and dark channel priors are prone to producing halo side effects during the dehazing process, which affects the visual effect of the image.

Method used

By averaging the transmittance over a region and upsampling the dehazing gain value, the smoothness of the gain value is ensured and halo formation is avoided. The specific steps include estimating the atmospheric light value, calculating the dehazing gain value, and reconstructing the gain value through spatial smoothing and upsampling of the regional transmittance.

🎯Benefits of technology

It effectively eliminates halo effects, improves image clarity and visual effects, while preserving image details and colors, and is suitable for image processing in various foggy scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122199336A_ABST
    Figure CN122199336A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of video image processing, in particular to an image defogging method, comprising the following steps: S1: estimating atmospheric light value; S2: calculating defogging gain value; including pixel transmittance calculation, region transmittance calculation, region defogging gain value calculation and pixel defogging gain value calculation, S3: image restoration; by limiting the upper region and block mean value calculation, effectively excluding white object interference and avoiding color distortion after defogging; by region average transmittance and up-sampling reconstruction gain value, ensuring global smoothness of the gain value and solving the halo problem in the depth-of-field mutation area; while eliminating halo, the image details and colors are completely preserved, and the method is suitable for multi-scene foggy image processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of video image processing technology, specifically to an image dehazing method. Background Technology

[0002] Due to the absorption and scattering of particles floating in the atmosphere, the image quality of images taken in foggy environments is significantly reduced, manifested as: reduced contrast, color shift, and blurred textures and edges, which directly affects the visual experience and the accuracy of computer vision tasks.

[0003] Image dehazing technology aims to eliminate the negative impact of haze on image quality, improve image clarity and detail, and has important application value in fields such as security monitoring, driver assistance, remote sensing mapping, and consumer photography.

[0004] Among these methods, single-image dehazing based on atmospheric scattering models and dark channel priors is a classic technique in this field. It can effectively restore a clear image by estimating scene transmittance and global atmospheric light values. However, such dehazing methods can cause halo side effects, severely affecting the visual quality of the dehazed image. Therefore, this paper proposes an image dehazing method to address the aforementioned halo problem. Summary of the Invention

[0005] The principle of the defogging method based on atmospheric scattering model and dark channel prior is as follows. Haze-free images To capture images, the image generation model under foggy conditions is as follows:

[0006] in, Transmittance, Atmospheric light. Haze-free image. The restoration formula is as follows:

[0007] in, This represents the dehazing gain value. It can be seen that the atmospheric light value A and transmittance were obtained. This will restore the haze-free image. .

[0008] Assuming a small area Internal transmittance They are the same, and both have a dark channel prior, meaning the minimum RGB value of a pixel is zero. So in a local small area The internal image generation model can be transformed into:

[0009]

[0010] Therefore, the transmittance can be calculated as follows: ,in The minimum pixel value in a local small region, atmospheric light value. It can be used We approximate it with the maximum value.

[0011] The above dehazing methods can effectively restore a clear image, but they can cause halo effects.

[0012] To address the halo problem in dehazing methods, this invention aims to provide an image dehazing method that generates clear dehazed images without producing halo side effects. The key to whether or not halo exists lies in the dehazing gain value in the restoration formula. The calculation of the gain value is performed by regional averaging of transmittance and upsampling the dehazing gain value by a large factor. The smoothness of the surface helps to avoid the formation of halos.

[0013] This invention provides an image dehazing method, comprising the following steps: S1: Estimated atmospheric light value ; Select input image with fog The uppermost N-row region, not exceeding 1 / 3 of the total number of rows, is horizontally divided into M equal-width sub-regions. The dark channel value of each sub-region is then calculated. ; Take each sub-region The maximum value is used as a candidate value, and the average of the M candidate values ​​is taken to obtain the image. Atmospheric light value ; S2: Calculate the defogging gain value ; S21: Pixel transmittance calculation; ,in It represents the minimum value of all pixels in a local small region Ω; S22: Regional transmittance calculation; divide the image into equal parts. x For each region, the pixel transmittance of all pixels within that region is averaged to obtain the region transmittance. ,in The number of pixels in the region; S23: Calculation of area defogging gain value; the area defogging gain value is the reciprocal of the area transmittance, i.e. ; S24: Pixel dehazing gain value calculation; x Area defogging gain Upsampled image with fog Resolution, to obtain globally continuous smooth pixel dehazing gain values. ; S3: Image restoration; Based on estimated atmospheric light Compared with the calculated defogging gain value Restore the fog-free image The formula for restoring the haze-free image is as follows: .

[0014] In a preferred embodiment, the value of the horizontal division M of the region in step S1 is M≥2.

[0015] In a preferred embodiment, the image region segmentation in step S22 satisfies ≥4, ≥4, the upsampling algorithm in step S24 adopts the traditional interpolation method.

[0016] In a preferred technical solution, the pixel transmittance is spatially smoothed by regional transmittance, and upsampling reconstruction is performed after the dehazing gain is calculated, so that the dehazing gain changes continuously in space, thereby reducing the halo effect caused by pixel-level transmittance abrupt changes.

[0017] Compared with the prior art, the beneficial effects of the present invention are: 1. Accurate atmospheric light estimation: By limiting the upper region and calculating the average value of blocks, the interference of white objects is effectively eliminated, avoiding color distortion after defogging; 2. Completely eliminate halos: By using regional average transmittance plus upsampling reconstruction gain value, ensure... Global smoothing resolves halo issues in areas of abrupt changes in depth of field. 3. High-fidelity dehazing effect: While eliminating halos, it fully preserves image details and colors, making it suitable for image processing in various foggy scenarios. Attached Figure Description

[0018] Figure 1 This is a flowchart of the image dehazing method of the present invention; Figure 2 This is a schematic diagram of the atmospheric light estimation region division in this invention; Figure 3 This is a flowchart illustrating the steps involved in calculating the defogging gain value according to the present invention. Figure 4 This is a schematic diagram showing the division of the defogging gain value calculation area in this invention. Detailed Implementation

[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. Example

[0020] Please see Figure 1-4 This invention provides an image dehazing method, comprising the following steps: S1: Estimated atmospheric light value ; To avoid the influence of white objects in the image on atmospheric light estimation, this invention selects image content located in the upper part of the image for atmospheric light estimation. Select input image with fog The uppermost N rows, not exceeding one-third of the total number of rows, are horizontally divided into M equal-width sub-regions, as shown in the reference. Figure 2 Calculate the dark channel value for each sub-region. ; Figure 2 The entire rectangle represents the input foggy image. ; The area marked with N rows is the upper region selected starting from the first row of the image. It is required that the number of rows in this region does not exceed 1 / 3 of the total number of rows in the image, corresponding to the sky / distant area of ​​the foggy image. The vertical dashed line divides the N-row region horizontally into four equal-width sub-regions (corresponding to M=4).

[0021] Technical function: By limiting the upper region and using block averaging, the interference of non-sky areas such as white buildings and ground in the lower foreground of the image on atmospheric light estimation is avoided, thereby improving the accuracy of atmospheric light estimation and reducing color distortion after dehazing from the source.

[0022] Take each sub-region The maximum value is used as a candidate value, and the average of the M candidate values ​​is taken to obtain the image. Atmospheric light value ; S2: Calculate the defogging gain value ;refer to Figure 3 : S21: Pixel transmittance calculation; ,in It represents the minimum value of all pixels in a local small region Ω; S22: Regional transmittance calculation; divide the image into equal parts. x Each region, for reference Figure 4The regional transmittance is obtained by averaging the pixel transmittance of all pixels within each region. ,in The number of pixels in the region; Figure 4 The entire rectangle represents the input foggy image. ; Horizontal label Vertical labeling This indicates that the entire image is divided evenly into... x A grid-like sub-region ( ≥4, ≥4, preferred =8, =8).

[0023] Technical function: 1. By averaging the initial transmittance within each sub-region, abrupt changes in pixel-level transmittance are eliminated, resulting in smooth regional transmittance. 2. Calculate the regional gain value based on the regional transmittance, and then restore it to the original resolution through upsampling to ensure the final pixel-level gain value. The global smoothness solves the halo artifact problem in traditional dark channel dehazing from the root.

[0024] S23: Calculation of area defogging gain value; the area defogging gain value is the reciprocal of the area transmittance, i.e. ; S24: Pixel dehazing gain value calculation; x Area defogging gain Upsampled image with fog Resolution, to obtain pixel dehazing gain value ; S3: Image restoration; Based on estimated atmospheric light Compared with the calculated defogging gain value Restore the fog-free image The formula for restoring the haze-free image is as follows: .

[0025] As a preferred embodiment, in step S1, the value of the horizontal division M of the region is M≥2, and M can be set to 4.

[0026] As a preferred embodiment, the image region division in step S22 satisfies ≥4, ≥4, and It can be set to 8. In step S24, the upsampling algorithm adopts a traditional interpolation method, such as bicubic interpolation.

[0027] As a preferred embodiment, the pixel transmittance is spatially smoothed by regional transmittance, and upsampling reconstruction is performed after dehazing gain calculation, so that the dehazing gain changes continuously in space, thereby reducing the halo effect caused by pixel-level transmittance abrupt changes.

[0028] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. An image dehazing method, characterized in that, Includes the following steps: S1: Estimated atmospheric light value ; Select input image with fog The uppermost N-row region, not exceeding 1 / 3 of the total number of rows, is horizontally divided into M equal-width sub-regions. The dark channel value of each sub-region is then calculated. ; Take each sub-region The maximum value is used as a candidate value, and the average of the M candidate values ​​is taken to obtain the image. Atmospheric light value ; S2: Calculate the defogging gain value ; S21: Pixel transmittance calculation; ,in It represents the minimum value of all pixels in a local small region Ω; S22: Regional transmittance calculation; divide the image into equal parts. x For each region, the pixel transmittance of all pixels within that region is averaged to obtain the region transmittance. ,in The number of pixels in the region; S23: Calculation of area defogging gain value; the area defogging gain value is the reciprocal of the area transmittance, i.e. ; S24: Pixel dehazing gain value calculation; x Area defogging gain Upsampled image with fog Resolution, to obtain pixel dehazing gain value ; S3: Image restoration; Based on estimated atmospheric light Compared with the calculated defogging gain value Restore the fog-free image The formula for restoring the haze-free image is as follows: .

2. The image dehazing method according to claim 1, characterized in that: In step S1, the value of the horizontal division M of the region is M≥2.

3. The image dehazing method according to claim 1, characterized in that: The image region division in step S22 satisfies ≥4, ≥4, the upsampling algorithm in step S24 adopts the traditional interpolation method.

4. The image dehazing method according to claim 1, characterized in that: Spatially smoothing pixel transmittance by regional transmittance and upsampling reconstruction after dehazing gain calculation allows the dehazing gain to change continuously in space, thereby reducing the halo effect caused by pixel-level transmittance abrupt changes.