Single image rain and fog removing method based on transmission characteristic adaptive calibration
Through adaptive calibration method based on transmission features, the transmittance and atmospheric light value of foggy images are corrected, and the image formation model is adjusted, which solves the problem of poor fogging removal effect in the existing technology, and achieves better fogging removal effect and Improved image quality.
Patent Information
- Application Number
- CN202411414999.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-11
- Publication Date
- 2025-01-10
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing image defog removal methods are limited by the atmospheric scattering model, making it difficult to fit complex fog causes, resulting in poor defog removal and excessive defog removal, and the transmission and atmospheric light value are fixed without modification or adjustment logic.
Using a single image rain-removing fog method based on transmission features adaptive calibration, a foggy image formation model is constructed by analyzing the transmittance and atmospheric light values of the foggy images, and multi-scale decomposition is performed through the Gaussian pyramid to correct the transmittance and atmospheric light. Value, adjust the foggy image to form the model to output the foggy image.
The fog removal effect and quality of fog-free images are improved, and the transmission and atmospheric light value are adaptively corrected, which avoids excessive fog removal and improves the clarity and detail fidelity of the image.
Smart Images

Figure CN119295352A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of image processing, and in particular to a single image rain and fog removal method based on transmission feature adaptive calibration. Background Art
[0002] Image dehazing aims to eliminate the impact of fog on images. Fog reduces image contrast, dims colors, and blurs details. Through physical model analysis, dark channel prior and other methods, the transmittance and atmospheric light value are estimated to restore the fog-free image, thereby improving image clarity, enhancing details and color saturation, and making the image closer to the real scene.
[0003] The invention patent with application number 202110605494.6 discloses an image defogging method, which is characterized in that it includes the following steps: S1, input a foggy image, and obtain the brightness feature map, saturation feature map, color attenuation feature map, total dark channel feature map and total contrast feature map of the foggy image by calculation; wherein the color attenuation feature map is calculated by the brightness feature map and the saturation feature map: multi-scale local area radius is taken in the foggy image, and the total dark channel feature map and the total contrast feature map are calculated and merged: wherein the step S1 includes the following steps: S101, based on the foggy image, local The local area radii are taken as 3, 7, 11 and 15px respectively, and the dark channel feature maps and contrast feature maps under different area radii are calculated: S102. The dark channel feature maps under the different area radii are merged to obtain a total dark channel feature map, and the contrast feature maps under the different area radii are merged to obtain a total contrast feature map: S2. The total dark channel feature map, the total contrast feature map, the brightness feature map, the saturation feature map and the color attenuation feature map are respectively calculated and image processed to obtain a dark channel fog attention map, a contrast fog attention map, a brightness fog attention map, a saturation fog attention map and a color attenuation fog attention map.
[0004] This application aims to solve the problem that "many image defogging methods are severely limited by the atmospheric scattering model. They estimate the transmission map of the foggy image and the atmospheric ambient light as intermediate parameters, and then restore the corresponding fog-free image through a simple linear function. However, in actual scenes, the causes of fog are complicated and difficult to fit through a linear formula. Once the atmospheric scattering model parameters are estimated incorrectly, the defogging effect will be unsatisfactory. In addition, linear fitting also severely limits the powerful ability of deep neural networks to fit complex functions. Therefore, conventional image defogging methods have poor defogging effects and are prone to over-defog."
[0005] However, the transmittance and atmospheric light values used in the current defogging algorithms for foggy images are often fixed, and basically have no logic or conditions for modification or adjustment;
[0006] To this end, we propose a single image defogging method based on adaptive calibration of transmittance features. Summary of the invention
[0007] In view of the above shortcomings of the prior art, the present invention provides a single image rain and fog removal method based on adaptive calibration of transmission characteristics, which solves the technical problems raised in the above background technology.
[0008] To achieve the above objectives, the present invention is implemented through the following technical solutions:
[0009] A single image rain and fog removal method based on adaptive calibration of transmission characteristics, comprising:
[0010] Upload foggy images, analyze the atmospheric light value and transmittance during the foggy image acquisition phase, and build a foggy image formation model based on the atmospheric light value and transmittance during the foggy image acquisition phase combined with the foggy images;
[0011] The foggy image formation model is:
[0012] I(x)=J(x)t(x)+A(1-t(x));
[0013] Where: I(x) is the foggy image; J(x) is the fog-free image; t(x) is the transmittance; A is the atmospheric light value;
[0014] Obtain a foggy image, apply Gaussian pyramid to perform multi-scale decomposition on the foggy image, decompose it into sub-images of different scales, and calculate the eigenvalue on each sub-image;
[0015] The transmittance t(x) is corrected according to the characteristic value of the sub-image, recorded as t′(x);
[0016] The atmospheric light value A is corrected according to each pixel in the foggy image, denoted as A′;
[0017] Substitute t′(x) and A′ into the foggy image formation model, replace t(x) and A, and adjust the foggy image formation model to a fog-free image output model. Based on the fog-free image output model, a fog-free image of the foggy image, i.e., a defogged image, is output.
[0018] Furthermore, the transmittance t(x) is calculated by the following formula:
[0019]
[0020] Where: β is the scattering coefficient of the foggy image when it is collected; d(x) is the scene depth of the foggy image; t0 is the lower limit of the transmittance;
[0021] The transmittance lower limit t0 is customized by the user, and max(t(x), t0) represents the operation of taking the maximum value of the two sets of values in the brackets.
[0022] Furthermore, the atmospheric light value A is obtained by the following formula:
[0023]
[0024] Where: is the gradient amplitude of the grayscale image of the foggy image at the position (x, y); L(x, y) is the brightness of the pixel point (x, y).
[0025] Furthermore, the sub-image based on Gaussian pyramid analysis is denoted as I s (x);
[0026] Where s represents the number of layers of the pyramid, and the operation of calculating the eigenvalue on each sub-image is the operation of calculating the contrast of each sub-image;
[0027] The comparison degree of the sub-image is:
[0028]
[0029] Where: I max is the maximum pixel value in the s-layer sub-image; I min is the minimum pixel value in the s-layer sub-image;
[0030] Based on the above formula, the contrast of each layer of sub-image is calculated.
[0031] Furthermore, the I max and I min When determining, take the central pixel of the sub-image as the window center, determine a set of windows, and determine I in the window max and I min The value of
[0032] The window size is q×q, where q is the number of edge pixels on one side of the window, and it follows the setting logic that the higher the defogging accuracy requirement for the foggy image, the larger the window, and vice versa.
[0033] Furthermore, the correction logic of the transmittance t(x) is expressed as:
[0034]
[0035] Where: t′(x) is the corrected transmittance; t(x) is the transmittance; a is the weight; n is the total number of pyramid layers; C s (x) is the contrast of the s-th layer sub-image; b is a constant;
[0036] in, Table pair The weight a and constant b are customized by the user, and both the weight a and constant b are non-negative numbers a<1<b.
[0037] Furthermore, the correction logic of the atmospheric light value A is expressed as:
[0038]
[0039] Where: A' is the corrected atmospheric light value; A is the atmospheric light value; X%m desc B is the pixel with the leading position X% in the pixel queue set in descending order based on brightness value in the foggy image; j is the brightness value of the jth pixel;
[0040] Among them, X% is customized by the user, and X%m desc ≥2.
[0041] Furthermore, the adjustment model of the haze-free image output model is:
[0042]
[0043] Furthermore, after the fog-free image is output based on the fog-free image output model, the fog-free image is further enhanced. The image enhancement processing logic is expressed as:
[0044] J′(x)=J(x) γ(x );
[0045] Where: J′(x) is the dehazed image after image enhancement; γ(x) is the adaptive gamma value;
[0046] The adaptive gamma value is the standard deviation of the local window centered on r in the dehazed image; is the mean value of the local window centered on r in the dehazed image;
[0047] Among them, r is the center pixel of the dehazed image, and the local window size centered on r is the same as I max and I min The window size q×q to be applied when determining.
[0048] Compared with the known public technology, the technical solution provided by the present invention has the following beneficial effects:
[0049] The present invention provides a single image rain and fog removal method based on adaptive calibration of transmittance features. During the execution of the method, a new and corrected transmittance and atmospheric light value are configured for an existing foggy image formation model based on a specified logic, thereby replacing the transmittance and atmospheric light value in the original foggy image formation model based on the new and corrected transmittance and atmospheric light value, further converting the foggy image formation model into a fog-free image output formula, realizing the output of the fog-free image, thereby improving the defogging effect of the output fog-free image, and finally optimizing the output fog-free image to further improve the quality of the fog-free image. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0051] Figure 1 The figure is a flowchart of a single image rain and fog removal method based on adaptive calibration of transmission features. DETAILED DESCRIPTION
[0052] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are 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.
[0053] The present invention will be further described below in conjunction with the embodiments.
[0054] Embodiment 1:
[0055] A single image rain and fog removal method based on adaptive calibration of transmission characteristics in this embodiment is as follows: Figure 1 As shown, including:
[0056] Upload foggy images, analyze the atmospheric light value and transmittance during the foggy image acquisition phase, and build a foggy image formation model based on the atmospheric light value and transmittance during the foggy image acquisition phase combined with the foggy images;
[0057] The foggy image formation model is:
[0058] I(x)=J(x)t(x)+A(1-t(x));
[0059] Where: I(x) is the foggy image; J(x) is the fog-free image; t(x) is the transmittance; A is the atmospheric light value;
[0060] Obtain a foggy image, apply Gaussian pyramid to perform multi-scale decomposition on the foggy image, decompose it into sub-images of different scales, and calculate the eigenvalue on each sub-image;
[0061] The transmittance t(x) is corrected according to the characteristic value of the sub-image, recorded as t′(x);
[0062] The atmospheric light value A is corrected according to each pixel in the foggy image, denoted as A′;
[0063] Substitute t′(x) and A′ into the foggy image formation model, replace t(x) and A, and adjust the foggy image formation model to a fog-free image output model, and output a fog-free image of the foggy image based on the fog-free image output model, that is, a defogged image;
[0064] The transmittance t(x) is calculated by the following formula:
[0065]
[0066] Where: β is the scattering coefficient of the foggy image when it is collected; d(x) is the scene depth of the foggy image; t0 is the lower limit of the transmittance;
[0067] Among them, the lower limit of transmittance t0 is defined by the user, and max(t(x), t0) represents the operation of taking the maximum value of the two sets of values in the brackets;
[0068] The atmospheric light value A is calculated by the following formula:
[0069]
[0070] Where: is the gradient amplitude of the grayscale image of the foggy image at the position (x, y); L(x, y) is the brightness of the pixel point (x, y);
[0071] The sub-image based on Gaussian pyramid analysis is denoted as I s (x);
[0072] Where s represents the number of layers of the pyramid, and the operation of calculating the eigenvalue on each sub-image is the operation of calculating the contrast of each sub-image;
[0073] The comparison of the sub-images is:
[0074]
[0075] Where: I max is the maximum pixel value in the s-layer sub-image; Imin is the minimum pixel value in the s-layer sub-image;
[0076] Based on the above formula, the contrast of each layer of sub-image is calculated;
[0077] The correction logic of transmittance t(x) is expressed as:
[0078]
[0079] Where: t′(x) is the corrected transmittance; t(x) is the transmittance; a is the weight; n is the total number of pyramid layers; C s (x) is the contrast of the s-th layer sub-image; b is a constant;
[0080] in, Table pair The weight a and constant b are defined by the user, and both the weight a and constant b are non-negative numbers a<1<b;
[0081] The correction logic of the atmospheric light value A is expressed as:
[0082]
[0083] Where: A' is the corrected atmospheric light value; A is the atmospheric light value; X%m desc B is the pixel with the leading position X% in the pixel queue set in descending order based on brightness value in the foggy image; j is the brightness value of the jth pixel;
[0084] Among them, X% is customized by the user, and X%m desc ≥2;
[0085] The adjustment model of the haze-free image output model is;
[0086]
[0087] After the fog-free image is output based on the fog-free image output model, the fog-free image is further enhanced. The image enhancement processing logic is expressed as follows:
[0088] J′(x)=J(x) γ(x );
[0089] Where: J′(x) is the dehazed image after image enhancement; γ(x) is the adaptive gamma value;
[0090] Adaptive Gamma is the standard deviation of the local window centered on r in the dehazed image; is the mean value of the local window centered on r in the dehazed image;
[0091] Among them, r is the center pixel of the dehazed image, and the local window size centered on r is the same as I max and I min The window size q×q to be applied when determining.
[0092] In this embodiment, by executing the method in the above embodiment, the defogging effect of the defogging image is further improved by effectively correcting the transmittance and the atmospheric light intensity, so that the defogging processing technology of the foggy image is further refined.
[0093] Embodiment 2:
[0094] In terms of specific implementation, based on Example 1, this example refers to Figure 1 The single image rain and fog removal method based on adaptive calibration of transmission characteristics in Example 1 is further specifically described as follows:
[0095] I max and I min When determining, take the central pixel of the sub-image as the window center, determine a set of windows, and determine I in the window max and I min The value of
[0096] The window size is q×q, where q is the number of edge pixels on one side of the window, and it follows the setting logic that the higher the defogging accuracy requirement for the foggy image, the larger the window, and vice versa.
[0097] In this embodiment, through the above formula, it is further defined that I max and I min The window size applied during determination provides further step execution data and logic support for the execution of the method in Example 1.
[0098] In summary, during the execution of the method in the above embodiment, the existing foggy image formation model is configured with a new and corrected transmittance and atmospheric light value based on the specified logic, thereby replacing the transmittance and atmospheric light value in the original foggy image formation model based on the new and corrected transmittance and atmospheric light value, and further converting the foggy image formation model into a fog-free image output formula to achieve the output of the fog-free image, thereby improving the defogging effect of the output fog-free image, and finally optimizing the output fog-free image to further improve the quality of the fog-free image.
[0099] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements will not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A single image rain and fog removal method based on adaptive calibration of transmission features, characterized in that: include: Upload foggy images, analyze the atmospheric light value and transmittance during the foggy image acquisition phase, and build a foggy image formation model based on the atmospheric light value and transmittance during the foggy image acquisition phase combined with the foggy images; The foggy image formation model is: I(x)=J(x)t(x)+A(1-t(x)); Where: I(x) is the foggy image; J(x) is the fog-free image; t(x) is the transmittance; A is the atmospheric light value; Obtain a foggy image, apply Gaussian pyramid to perform multi-scale decomposition on the foggy image, decompose it into sub-images of different scales, and calculate the eigenvalue on each sub-image; The transmittance t(x) is corrected according to the characteristic value of the sub-image, recorded as t′(x); The atmospheric light value A is corrected according to each pixel in the foggy image, denoted as A′; Substitute t′(x) and A′ into the foggy image formation model, replace t(x) and A, and adjust the foggy image formation model to a fog-free image output model. Based on the fog-free image output model, a fog-free image of the foggy image, i.e., a defogged image, is output.
2. The single image rain and fog removal method based on transmission feature adaptive calibration according to claim 1, characterized in that: The transmittance t(x) is calculated by the following formula: Where: β is the scattering coefficient of the foggy image when it is collected; d(x) is the scene depth of the foggy image; t0 is the lower limit of the transmittance; The transmittance lower limit t0 is customized by the user, and max(t(x), t0) represents the operation of taking the maximum value of the two sets of values in the brackets.
3. The single image rain and fog removal method based on transmission feature adaptive calibration according to claim 1, characterized in that: The atmospheric light value A is obtained by the following formula: Where: is the gradient amplitude of the grayscale image of the foggy image at the position (x, y); L(x, y) is the brightness of the pixel point (x, y).
4. The single image rain and fog removal method based on transmission feature adaptive calibration according to claim 1, characterized in that: The sub-image based on Gaussian pyramid analysis is denoted as I s (x); Where s represents the number of layers of the pyramid, and the operation of calculating the eigenvalue on each sub-image is the operation of calculating the contrast of each sub-image; The comparison degree of the sub-image is: Where: I max is the maximum pixel value in the s-layer sub-image; I min is the minimum pixel value in the s-layer sub-image; Based on the above formula, the contrast of each layer of sub-image is calculated.
5. The single image rain and fog removal method based on transmission feature adaptive calibration according to claim 4, characterized in that: I max and I min When determining, take the central pixel of the sub-image as the window center, determine a set of windows, and determine I in the window max and I min The value of The window size is q×q, where q is the number of edge pixels on one side of the window, and it follows the setting logic that the higher the defogging accuracy requirement for the foggy image, the larger the window, and vice versa.
6. The single image rain and fog removal method based on transmission feature adaptive calibration according to claim 1, characterized in that: The correction logic of the transmittance t(x) is expressed as: Where: t′(x) is the corrected transmittance; t(x) is the transmittance; a is the weight; n is the total number of pyramid layers; C s (x) is the contrast of the s-th layer sub-image; b is a constant; in, Table pair The weight a and constant b are customized by the user, and both the weight a and constant b are non-negative numbers a<1<b.
7. The single image rain and fog removal method based on transmission feature adaptive calibration according to claim 1, characterized in that: The correction logic of the atmospheric light value A is expressed as: Where: A' is the corrected atmospheric light value; A is the atmospheric light value; X%m desc B is the pixel with the leading position X% in the pixel queue set in descending order based on brightness value in the foggy image; j is the brightness value of the jth pixel; Among them, X% is customized by the user, and X%m desc ≥2.
8. The single image rain and fog removal method based on transmission feature adaptive calibration according to claim 1, characterized in that: The adjustment model of the fog-free image output model is:
9. The single image rain and fog removal method based on transmission feature adaptive calibration according to claim 8, characterized in that: After the fog-free image is output based on the fog-free image output model, the fog-free image is further enhanced. The image enhancement processing logic is expressed as follows: J′(x)=J(x) γ(x ); Where: J′(x) is the dehazed image after image enhancement; γ(x) is the adaptive gamma value; The adaptive gamma value is the standard deviation of the local window centered on r in the dehazed image; is the mean value of the local window centered on r in the dehazed image; Among them, r is the center pixel of the dehazed image, and the local window size centered on r is the same as I max and I min The window size q×q to be applied when determining.
Citation Information
Patent Citations
Image defogging method and defogging device
CN113139922A
Single-image self-adaptation defogging method based on domain transformation and weighted quadtree decomposition
CN104809709A
Image fusion-based single image defogging method
CN108537756A
Image dehazing method based on dark channel prior
WO2024060576A1