Image defogging method and device
By obtaining white light noise, visibility and scene depth, and using the object image light penetration and fog attenuation model for numerical calculation, the problem of low image defogging efficiency in existing technologies is solved, a more efficient image defogging effect is achieved, and the clarity and detail resolution of foggy images are improved.
Patent Information
- Application Number
- CN202111640751.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-29
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2041-12-29
AI Technical Summary
Existing image dehazing methods have complex computational processes and low efficiency, making it difficult to effectively improve the quality of foggy images.
By obtaining the white light noise, visibility and scene depth of the foggy image to be processed, numerical calculation is performed using the object image light penetration attenuation model to compensate for the attenuation of light caused by fog droplet scattering and generate a defogged image.
Without the need for complex algorithms, a more efficient image dehazing effect is achieved, improving the clarity and detail resolution of foggy images.
Smart Images

Figure CN114519672B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to an image defogging method and device. Background Art
[0002] Foggy weather refers to a complex atmospheric environment composed of multiple gases and suspended matter. When capturing images in foggy conditions, the quality of the images obtained is low, and details are difficult to discern.
[0003] Existing image dehazing methods can be mainly divided into three categories: image enhancement-based dehazing algorithms, physical model-based dehazing algorithms, and convolutional neural network-based dehazing algorithms. Image enhancement-based dehazing algorithms can improve the contrast of foggy images and highlight the details of foggy images through image enhancement, thereby achieving image dehazing. Representative algorithms include histogram equalization, wavelet transform, and Retinex algorithm. Physical model-based dehazing algorithms are mainly based on the atmospheric scattering physical model. By observing and summarizing a large number of foggy and fog-free images, some existing mapping relationships are obtained. Then, based on the formation process of the foggy image, inverse operations are performed to obtain a clear dehazed image. Representative algorithms include the dark channel prior dehazing algorithm, which has good dehazing effect and high stability. Convolutional neural network-based dehazing algorithms can build an end-to-end model based on the convolutional neural network, use this model to generate relevant parameters of the atmospheric scattering model, and then obtain the dehazed image based on these parameters. Alternatively, the convolutional neural network can be used to directly obtain a clear dehazed image from the foggy image.
[0004] However, existing image dehazing methods involve many algorithms, the calculation process is relatively complex, and the efficiency of image dehazing is low. Summary of the Invention
[0005] The present invention provides an image defogging method and device, which are used to solve the defect of low efficiency of image defogging in the prior art and achieve more efficient image defogging.
[0006] The present invention provides an image defogging method, comprising:
[0007] Obtain the foggy image to be processed;
[0008] Obtaining white light noise, visibility, and scene depth of the foggy image to be processed;
[0009] Based on the white light noise, the visibility and the scene depth, image defogging is performed on the foggy image to be processed to obtain a defogged image corresponding to the foggy image to be processed.
[0010] According to an image defogging method provided by the present invention, performing image defogging on the foggy image to be processed based on the white light noise, the visibility, and the scene depth, and obtaining a defogged image corresponding to the foggy image to be processed, specifically includes:
[0011] Based on the visibility, obtaining an extinction coefficient of the foggy image to be processed;
[0012] Acquiring a scene transmittance of the foggy image to be processed based on the extinction coefficient and scene depth of the foggy image to be processed;
[0013] Inputting the scene transmittance, white light noise and scene depth of the foggy image to be processed into an object image light penetration fog attenuation model, and obtaining an original defogging image corresponding to the foggy image to be processed output by the object image light penetration fog attenuation model;
[0014] Among them, the object image light penetration and fog attenuation model is used to compensate for the first target attenuation corresponding to the foggy image to be processed based on the scene transmittance, white light noise and scene depth of the foggy image to be processed; the first target attenuation includes the attenuation of light caused by fog droplets when obtaining the foggy image to be processed.
[0015] According to an image defogging method provided by the present invention, the scene transmittance, white light noise and scene depth of the foggy image to be processed are input into an object image light penetration fog attenuation model, and an original defogging image corresponding to the foggy image to be processed output by the object image light penetration fog attenuation model is obtained, which specifically includes:
[0016] Inputting the scene transmittance, white light noise, and scene depth of the foggy image to be processed into an object light penetration attenuation model, using the object light penetration attenuation model to compensate for the second target attenuation corresponding to each channel of the foggy image to be processed, obtaining an original defogged sub-image corresponding to each channel of the foggy image to be processed, and combining the original sub-images as the original defogged image;
[0017] The second target attenuation includes the attenuation corresponding to any channel in the first target attenuation; and the first target attenuation includes each of the second target attenuations.
[0018] According to an image defogging method provided by the present invention, the calculation formula of the object image light penetration fog attenuation model includes:
[0019]
[0020] Wherein, i represents the channel of the foggy image to be processed; J i (x) represents the original defogging sub-image corresponding to channel i of the foggy image to be processed; I i (x) represents the foggy image to be processed in channel i; Wi represents the white light noise corresponding to the i channel of the foggy image to be processed; d represents the scene depth of the foggy image to be processed; σ i represents the extinction coefficient corresponding to channel i of the foggy image to be processed; Indicates the scene transmittance corresponding to channel i of the foggy image to be processed.
[0021] According to an image defogging method provided by the present invention, after inputting the scene transmittance, white light noise, and scene depth of the foggy image to be processed into an object image light penetration fog attenuation model and obtaining an original defogging image corresponding to the foggy image to be processed output by the object image light penetration fog attenuation model, the method further includes:
[0022] Perform image enhancement processing on the original defogging image to obtain the defogging image.
[0023] According to an image defogging method provided by the present invention, obtaining the extinction coefficient of the foggy image to be processed based on the visibility specifically includes:
[0024] Based on the visibility, obtaining the radius of fog droplets in the foggy image to be processed;
[0025] Obtaining a Mie scattering efficiency factor of the droplet based on the radius of the droplet;
[0026] An extinction coefficient of the foggy image to be processed is obtained based on the radius of the fog droplet and the Mie scattering efficiency factor.
[0027] According to an image defogging method provided by the present invention, obtaining the radius of fog droplets in the foggy image to be processed based on the visibility specifically includes:
[0028] Obtaining the type of the mist droplets;
[0029] The radius of the mist droplet is obtained based on the visibility and the type of the mist droplet.
[0030] The present invention also provides an image defogging device, comprising:
[0031] An image acquisition module, used to acquire foggy images to be processed;
[0032] A parameter acquisition module, configured to acquire white light noise, visibility, and scene depth of the foggy image to be processed;
[0033] An image defogging module is configured to perform image defogging on the foggy image to be processed based on the white light noise, the visibility, and the scene depth, and obtain a defogging image corresponding to the foggy image to be processed.
[0034] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of any of the above-described image defogging methods are implemented.
[0035] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the above-described image defogging methods.
[0036] The present invention also provides a computer program product, comprising a computer program, which implements the steps of any of the above-mentioned image defogging methods when executed by a processor.
[0037] The image defogging method and device provided by the present invention obtain the white light noise, visibility and scene depth of the foggy image to be processed, and then perform image defogging on the foggy image to be processed through numerical calculation based on the above white light noise, visibility and scene depth to obtain a defogged image corresponding to the foggy image to be processed. The method and device can compensate for the attenuation of light due to the scattering effect of fog droplets based on the white light noise, visibility and scene depth of the foggy image to be processed, thereby achieving more efficient image defogging without the need for complex calculations, and having a better defogging effect on the foggy image to be processed. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction is given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0039] Figure 1 This is one of the flow charts of the image defogging method provided by the present invention;
[0040] Figure 2 This is the second flow chart of the image defogging method provided by the present invention;
[0041] Figure 3 This is one of the structural schematic diagrams of the image defogging device provided by the present invention;
[0042] Figure 4 This is the second structural diagram of the image defogging device provided by the present invention;
[0043] Figure 5 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0044] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0045] In the description of the invention, it should be noted that, unless otherwise expressly specified or limited, the terms "mounted," "connected," and "connected" should be understood broadly. For example, they may refer to fixed, detachable, or integral connections; mechanical or electrical connections; direct or indirect connections through an intermediary; and internal communication between two components. Those skilled in the art will understand the specific meanings of the above terms in the present invention based on specific circumstances.
[0046] It should be noted that under foggy weather conditions, various substances in the atmospheric environment, especially a large number of distributed fog droplets, will scatter the light passing through, causing the light to scatter in all directions during transmission.
[0047] When capturing images in foggy weather conditions, the light received by the imaging device is attenuated due to the scattering effect of fog droplets, resulting in low-quality foggy images obtained by the imaging device and difficulty in distinguishing details.
[0048] In this regard, the present invention proposes an image defogging method, which can achieve image defogging of foggy images by compensating for the above-mentioned attenuation. Without the need for complex algorithms, the defogging image corresponding to the foggy image can be obtained more efficiently.
[0049] Figure 1 This is one of the flow charts of the image defogging method provided by the present invention. Figure 1 The image defogging method of the present invention is described. Figure 1 As shown, the method includes: step 101, obtaining a foggy image to be processed.
[0050] Specifically, an imaging device may be used to photograph a shooting target to obtain a foggy image to be processed including the shooting target.
[0051] It should be noted that the foggy image to be processed is a multi-channel image, and the channels of the foggy image to be processed include R channel, G channel and B channel.
[0052] In the embodiment of the present invention, i can be used to represent the channel of the foggy image to be processed. i can represent R, G or B. The foggy image to be processed in channel i can be represented by I i (x) indicates.
[0053] Each channel of the foggy image to be processed may correspond to light of different wavelengths.
[0054] Optionally, the R channel of the foggy image to be processed may correspond to light within the red wavelength range; the G channel of the foggy image to be processed may correspond to light within the green wavelength range; and the B channel of the foggy image to be processed may correspond to light within the blue wavelength range.
[0055] Step 102: Obtain white light noise, visibility, and scene depth of the foggy image to be processed.
[0056] White light noise refers to a layer of light noise superimposed on a foggy image obtained under foggy weather conditions. The above light noise can be called white light noise.
[0057] The white light noise of the foggy image to be processed may include the white light noise corresponding to each channel of the foggy image to be processed.
[0058] The white light noise corresponding to each channel of the foggy image to be processed can be obtained in a variety of ways.
[0059] In the embodiment of the present invention, the white light noise W corresponding to the channel i of the foggy image to be processed is obtained i The process includes: obtaining a dark channel chromatogram and a white expression of the foggy image to be processed; obtaining a white light image corresponding to each channel of the foggy image to be processed according to the dark channel chromatogram and the white expression of the foggy image to be processed; obtaining the minimum value in the white light image corresponding to the i channel of the foggy image to be processed as the white light noise corresponding to the i channel of the foggy image to be processed.
[0060] Specifically, for each pixel in the foggy image to be processed, the value of the lowest color channel of each pixel and its corresponding color channel can be obtained as the target data corresponding to each pixel. Based on the target data corresponding to each pixel, the dark channel chromatogram of the foggy image to be processed is obtained.
[0061] Based on the iterative estimation method, the foggy image to be processed is divided into a preset number of independent image blocks, and the mean and variance of the numerical ratio of each channel of each image block are calculated respectively. The image block closest to the image color representation of pure white and with the smallest variance is selected from the above image blocks as the optimal image block corresponding to the first equal division. For each image block, each image block is divided into a preset number of independent image blocks, and the optimal image block corresponding to the second equal division is obtained. By repeating the above process continuously, and when the size of the optimal image block corresponding to the Nth equal division is less than a preset threshold, the above process is stopped, and the mean of the numerical ratio of each channel of the optimal image block corresponding to the Nth equal division is determined as the white expression of the foggy image to be processed. Wherein, N is a positive integer greater than 0.
[0062] For any pixel in the foggy image to be processed, based on the white color expression and dark channel chromatogram of the foggy image to be processed, if the lowest pixel value of the pixel in the dark channel chromatogram is determined to be from the X channel, the white light components of the pixel in channels other than the X channel are obtained according to the white color expression of the foggy image to be processed. After obtaining the white light components of each pixel in the foggy image to be processed, the white light map corresponding to each channel of the foggy image to be processed is obtained based on the white light components of each pixel in the foggy image to be processed. The X channel is the R channel, the G channel, or the B channel.
[0063] Get the minimum value of each row and column of the white light image corresponding to the i channel of the foggy image to be processed as the white light noise W corresponding to the i channel of the foggy image to be processed i .
[0064] Visibility refers to the maximum distance at which a person with normal vision can distinguish an object from its background. Visibility is a weather indicator that helps us understand the stability and vertical structure of the atmosphere.
[0065] In foggy weather conditions, the visibility varies depending on the fog density. According to the fog density, fog can be divided into light fog, heavy fog, dense fog and very dense fog.
[0066] Under normal circumstances, the visibility corresponding to light fog is about 1km; the visibility corresponding to heavy fog is between 200 and 500m; the visibility corresponding to dense fog is roughly between 0.05 and 0.2km; in severe fog, the visibility is less than 0.05km.
[0067] It should be noted that the visibility of the foggy image to be processed may refer to the visibility when the imaging device captures the foggy image to be processed.
[0068] The visibility V when collecting the foggy image to be processed can be obtained in advance in a variety of ways.
[0069] For example, the visibility calculation method based on image edge uses image data such as image edge gradient, contrast, and brightness of the foggy image to be processed to quantitatively judge the visibility of the scene in the foggy image to be processed according to a preset threshold, thereby obtaining the visibility V when the foggy image to be processed is collected;
[0070] For another example, when an imaging device is used to capture a foggy image to be processed, the location information of the imaging device may be obtained, and based on the location information and the time when the foggy image to be processed was captured, a corresponding weather forecast may be queried. Based on the queried weather forecast, the visibility V at the time when the foggy image to be processed was captured may be obtained.
[0071] For another example, the visibility of the area where the imaging device is located can be obtained based on the visibility acquisition device as the visibility V when acquiring the foggy image to be processed.
[0072] It should be noted that before obtaining the foggy image to be processed, the visibility V of the foggy image to be processed obtained based on the latter two methods in the above-mentioned methods can be saved in the image information of the foggy image to be processed. After obtaining the foggy image to be processed, the visibility V of the foggy image to be processed can be obtained by reading the image information of the foggy image to be processed.
[0073] Depth of scene can be used to describe the distance range in which a clear image can be formed.
[0074] The scene depth d of the foggy image to be processed can be obtained in many ways.
[0075] For example, based on the dark channel prior algorithm, the scene transmittance of the foggy image to be processed can be obtained. The scene depth of each pixel in the foggy image to be processed can be estimated using the scene transmittance and the extinction coefficient of the foggy image to be processed based on the visibility of the foggy image to be processed. The scene depth of each pixel obtained can be processed based on the mean filtering method, so that the scene depths in the same local area in the foggy image to be processed can be unified to obtain the scene depth d of the foggy image to be processed.
[0076] For another example, when using an imaging device to capture a foggy image to be processed, the distance between a certain scene in the foggy image to be processed and the imaging device can be directly measured. Then, based on the projection relationship between the scenes, the scene depth corresponding to different scenes can be estimated by region, thereby obtaining the scene depth d of the foggy image to be processed.
[0077] It should be noted that in the process of obtaining the foggy image to be processed, the scene depth d of the foggy image to be processed can be obtained based on the latter method among the above-mentioned methods, and can be saved in the image information of the foggy image to be processed. After obtaining the foggy image to be processed, the scene depth d of the foggy image to be processed can be obtained by reading the image information of the foggy image to be processed.
[0078] Step 103: Defogging the foggy image to be processed based on white light noise, scene depth, and visibility to obtain a defogging image corresponding to the foggy image to be processed.
[0079] Specifically, based on the pre-acquired visibility when collecting the foggy image to be processed, the white light noise and scene depth of the foggy image to be processed, the foggy image to be processed can be defogged by numerical calculation and other methods to obtain a defogged image corresponding to the foggy image to be processed.
[0080] The embodiment of the present invention obtains the white light noise, visibility and scene depth of the foggy image to be processed, and then defogs the foggy image to be processed through numerical calculation based on the above white light noise, visibility and scene depth to obtain a defogged image corresponding to the foggy image to be processed. The embodiment of the present invention can compensate for the attenuation of light due to the scattering effect of fog droplets based on the white light noise, visibility and scene depth of the foggy image to be processed, thereby achieving more efficient image defogging without the need for complex calculations, and has a better defogging effect on the foggy image to be processed.
[0081] Figure 2 This is the second flow chart of the image defogging method provided by the present invention. Figure 2 As shown, based on visibility, the extinction coefficient of the foggy image to be processed is obtained, specifically including: based on visibility, obtaining the radius of the fog droplets in the foggy image to be processed.
[0082] It should be noted that, in the embodiment of the present invention, the fog droplets in the foggy image to be processed may generally refer to every fog droplet in the foggy image to be processed.
[0083] Specifically, the distribution function can be used to describe the statistical laws of random variables and determine all other probabilistic characteristics of random variables.
[0084] Traditional distribution functions include normal distribution, lognormal distribution, gamma distribution, and generalized gamma distribution.
[0085] The normal distribution is also called the Gaussian distribution, and its probability density function is shown below:
[0086]
[0087] Among them, μ represents the mathematical expectation; δ 2 represents the variance; r represents the radius of the particle.
[0088] Lognormal distribution means that the logarithm of a random variable obeys normal distribution. Lognormal distribution can be expressed by the following formula:
[0089]
[0090] Among them, μ represents the mathematical expectation; δ 2 represents the variance; r represents the radius of the particle.
[0091] Gamma distribution is a continuous probability function. It can be expressed by the following formula:
[0092]
[0093] Among them, μ can be used to describe the width of the size distribution. The smaller μ is, the wider the particle size distribution is; r represents the radius of the particle.
[0094] The generalized gamma distribution is the most widely used and very simple particle spectrum model. The generalized gamma distribution can be expressed by the following formula:
[0095] n(r)=Ar a exp(-Br β ) (4)
[0096] It should be noted that, usually a=2, β=1, and the generalized gamma distribution can be expressed by the following formula:
[0097] n(r)=Ar 2 exp(-Br) (5)
[0098] Where A and B represent coefficients; r represents the radius of the particle.
[0099] In the embodiment of the present invention, a droplet distribution function is constructed based on the generalized gamma distribution to describe the relationship between the radius of the droplets and the concentration of the droplets in the foggy image to be processed. Based on the above droplet distribution function, the pattern radius r0 or the average radius of the droplets in the foggy image to be processed can be obtained. The above mode radius r0 or average radius can be Any one of them is used as the radius r of the fog droplet in the foggy image to be processed.
[0100] The droplet distribution function in the embodiment of the present invention can be expressed by the following formula:
[0101] n(r)=Ar 2 exp(-Br) (6)
[0102] Among them, A and B represent coefficients, and the values of A and B are related to the water content W of the fog droplets and the visibility V of the foggy image to be processed.
[0103] It should be noted that the relationship between the visibility V of the foggy image to be processed and the water content W of the foggy droplets can be obtained based on prior knowledge. After obtaining the visibility V of the foggy image to be processed, the water content W of the foggy droplets in the foggy image to be processed can be obtained based on the relationship between the visibility V and the water content W of the foggy image to be processed.
[0104] Based on the above droplet distribution function, r0 can be obtained by the following formula:
[0105]
[0106] Based on the above droplet distribution function, the following formula can be used to obtain
[0107]
[0108] Get the Mie scattering efficiency factor of the droplet based on the radius of the droplet.
[0109] It should be noted that since the scattering of light by fog droplets is closest to Mie scattering, the scattering characteristics of fog droplets are analyzed based on Mie scattering theory in the embodiment of the present invention, so that the Mie scattering efficiency factor Q of the above-mentioned fog droplets can be obtained based on the radius of the fog droplets in the foggy image to be processed.
[0110] The Mie scattering efficiency factor Q of the fog droplets may include the Mie scattering efficiency factor of the fog droplets corresponding to each channel of the foggy image to be processed.
[0111] Mie scattering efficiency factor Q of the fog droplets corresponding to channel i of the foggy image to be processed i (m i ,x i ), the refractive index m of the fog droplet corresponding to channel i of the foggy image to be processed i The size parameter x of the fog droplet corresponding to channel i of the foggy image to be processed i Related.
[0112] The size parameter x of the fog droplet corresponding to channel i of the foggy image to be processed i The wavelength λ of the light corresponding to channel i of the foggy image to be processed i Related, x i =2πr / λ i .
[0113] It can be understood that the Mie scattering efficiency factor Q corresponding to the i channel of the foggy image to be processed is obtained i When , it is necessary to obtain the refractive index m of the fog droplet corresponding to the i channel of the foggy image to be processed i .
[0114] Since the complex refractive index of fog droplets is an important factor affecting the refractive index of fog droplets, which can be determined by both the fog droplets themselves and the incident wavelength of light, the refractive index of light within the red, green, and blue wavelength ranges can be obtained based on prior knowledge.
[0115] For example, the wavelength range of red light can be between 0.622 and 0.678 μm, and the complex refractive index of the droplets corresponding to the red light in the red light wavelength range can be 1.331+2.23*10 -8 j~1.332+1.39*10 -8j; the wavelength range of green light can be between 0.492 and 0.577 μm, and the complex refractive index of the droplets corresponding to the green light in the green light wavelength range can be 1.33+3.6*10 -9 j~1.335+1*10 -9 j; the blue light wavelength range can be between 0.455 and 0.492 μm, and the complex refractive index of the droplets corresponding to the blue light in the blue light wavelength range can be 1.335+1*10 -9 j~1.337+1.02*10 -9 j, where j represents the imaginary part of the complex number. Light with shorter wavelengths has a smaller imaginary part of the complex refractive index of the droplets, indicating weaker absorption of light by the droplets. Light with longer wavelengths has a larger imaginary part of the complex refractive index of the droplets, indicating stronger absorption of light by the droplets.
[0116] Based on prior knowledge, we can determine that the wavelength of red light is 0.625 μm, and the complex refractive index of the fog droplets corresponding to the red light is 1.332+1.39*10 -8 j; Determine the wavelength of green light to be 0.575 μm, and the complex refractive index of the fog droplets corresponding to the green light to be 1.333+3.6*10 -9 j; Determine the wavelength of blue light to be 0.475 μm, and the complex refractive index of the droplets corresponding to the blue light to be 1.336+9.35*10 -10 j.
[0117] The radius r0 of the fog droplet pattern in the foggy image to be processed is used as the radius r of the fog droplet, and the size parameter x of the fog droplet corresponding to the i channel of the foggy image to be processed can be obtained. i .
[0118] Based on the Mie scattering theory, the Mie scattering coefficient of the fog droplets corresponding to the i channel of the foggy image to be processed can be obtained and based on and The scattered field amplitude can be calculated. This involves the high-order spherical Bessel function ψ n (x) and ζ n (x), ψ n ′(x) and ζ n '(x) are the differentials of their respective variables. And the refractive index m of the fog droplets in the foggy image to be processed, and It can be expressed by the following formula:
[0119]
[0120]
[0121] Where n represents the number of iterations. In programming calculations, it is necessary to set an appropriate value for the number of iterations n so that the calculation can meet certain calculation accuracy without occupying too much memory resources. Here, the empirical formula proposed by Wiscombe is used for programming solution:
[0122]
[0123] Get the Mie scattering coefficient of the fog droplets corresponding to channel i of the foggy image to be processed and Afterwards, you can use and Obtain the Mie scattering efficiency factor of the fog droplets corresponding to channel i of the foggy image to be processed. The Mie scattering efficiency factor may include the extinction efficiency factor Scattering efficiency factor and absorption efficiency factor
[0124] Extinction efficiency factor Q ext , scattering efficiency factor Q sca and absorption efficiency factor Q abs It can be expressed by the following formula:
[0125]
[0126]
[0127]
[0128] Among them, since the imaginary part of the complex refractive index of the droplet is very small, the absorption part can be ignored, so the calculated extinction efficiency factor is and scattering efficiency factor Equal, the extinction efficiency factor can be obtained or scattering efficiency factor Any one of them is used as the Mie scattering efficiency factor Q of the fog droplet corresponding to channel i of the foggy image to be processed i (m i ,x i ).
[0129] The extinction coefficient of the foggy image to be processed is obtained based on the radius of the fog droplets and the Mie scattering efficiency factor.
[0130] Specifically, the extinction coefficient σ of the foggy image to be processed may include the extinction coefficient corresponding to each channel of the foggy image to be processed.
[0131] Based on the radius r of the fog droplet corresponding to channel i of the foggy image to be processed and the Mie scattering efficiency factor Q i (m i ,xi ), we can obtain the extinction coefficient σ corresponding to the i channel of the foggy image to be processed i .
[0132] The extinction coefficient σ corresponding to channel i of the foggy image to be processed i It can be expressed by the following formula:
[0133]
[0134] The embodiment of the present invention obtains the radius of fog droplets in the foggy image to be processed based on the visibility of the foggy image to be processed, obtains the Mie scattering efficiency factor of the fog droplets based on the radius of the fog droplets, and obtains the extinction coefficient of the foggy image to be processed based on the Mie scattering efficiency factor and radius of the foggy image to be processed. This can more simply and efficiently obtain the extinction coefficient of the foggy image to be processed, and can provide a data basis for image defogging of the foggy image to be processed.
[0135] Based on the contents of the above embodiments, obtaining the radius of fog droplets in the foggy image to be processed based on visibility specifically includes: obtaining the type of fog droplets.
[0136] Generally speaking, fog can be divided into advection fog and radiation fog according to the geographical environment and generation principle of fog. The above two types of fog differ in the size of fog droplets.
[0137] The radius of advection fog droplets is usually around 10 μm, while the radius of radiation fog droplets is usually less than 10 μm.
[0138] Optionally, the type of the mist droplets can be obtained in a variety of ways.
[0139] For example, when an imaging device is used to capture a foggy image to be processed, the location information of the imaging device can be obtained. Based on the location information and the time when the foggy image to be processed was captured, a corresponding weather forecast can be queried. Based on the queried weather forecast, the type of fog droplets in the foggy image to be processed can be obtained.
[0140] For example, advection fog usually appears on the sea surface, while radiation fog usually appears inland. When using an imaging device to collect foggy images to be processed, the location information of the above-mentioned imaging device can be obtained, and based on the location information of the above-mentioned imaging device, the geographical environment of the foggy image to be processed can be determined, and the type of fog droplets in the foggy image to be processed can be inferred based on the geographical environment of the foggy image to be processed.
[0141] After obtaining the type of fog droplets to be processed based on the above-mentioned method, the obtained type of fog droplets can be saved in the image information of the foggy image to be processed. After obtaining the foggy image to be processed, the type of fog droplets in the foggy image to be processed can be obtained by reading the image information of the foggy image to be processed.
[0142] Gets the radius of the fog droplets based on visibility and the type of fog droplets.
[0143] According to the relationship between the water content W of fog droplets in the foggy image to be processed and the visibility V of the foggy image to be processed, the fog droplet distribution functions corresponding to different types of fog droplets can be obtained.
[0144] The droplet distribution function corresponding to the advection fog droplets can be expressed by the following formula:
[0145] m(r)=1.059*10 7 V 1.15 r 2 exp(-0.8359V 0.43 r) (16)
[0146] The droplet distribution function corresponding to the advection fog droplets can be expressed by the following formula:
[0147] n(r)=3.104*10 7 V 1.7 r 2 exp(-4.122V 0.54 r) (17)
[0148] Based on formula (7) and formula (8), formula (16) and formula (17) can be converted to obtain the pattern radius r0 = 2.3924V of the advection fog droplet -0.43 , the average radius The pattern radius of the radiation fog droplets r0=0.484V -0.54 , the average radius
[0149] Based on the visibility of the foggy image to be processed and the type of fog droplets in the foggy image to be processed, the radius r of the fog droplets in the foggy image to be processed can be obtained.
[0150] It should be noted that when the type of fog droplets in the foggy image to be processed is not obtained, the radius of the fog droplets in the foggy image to be processed can be obtained respectively when the fog droplet types are advection fog and radiation fog, and the average value of the above two radii obtained can be used as the radius r of the fog droplets in the foggy image to be processed.
[0151] The embodiment of the present invention obtains the radius of the fog droplets based on the type of fog droplets in the foggy image to be processed and the visibility of the foggy image to be processed. It can more accurately obtain the radius of the fog droplets based on the type of the fog droplets, thereby more accurately obtaining the extinction coefficient of the foggy image to be processed, and can improve the defogging effect of the foggy image to be processed.
[0152] Based on the contents of the above embodiments, image defogging is performed on the foggy image to be processed based on white light noise, scene depth and visibility, and a defogged image corresponding to the foggy image to be processed is obtained, specifically including: obtaining the extinction coefficient of the foggy image to be processed based on visibility.
[0153] Specifically, based on the visibility of the foggy image to be processed, the extinction coefficient of the foggy image to be processed can be obtained through a numerical calculation method.
[0154] It should be noted that the specific process of obtaining the extinction coefficient of the foggy image to be processed can be found in the contents of the above embodiments and will not be repeated here.
[0155] The scene transmittance of the foggy image to be processed is obtained based on the extinction coefficient and scene depth of the foggy image to be processed.
[0156] It should be noted that during light propagation, it is attenuated due to scattering by fog droplets. The scene transmittance of the foggy image to be processed can describe the ratio of light that actually reaches the imaging device during this attenuation process.
[0157] The scene transmittance of the foggy image to be processed may include the scene transmittance corresponding to each channel of the foggy image to be processed. The scene transmittance e corresponding to channel i of the foggy image to be processed -σid , can be based on the extinction coefficient σ of the foggy image to be processed i and scene depth d, obtained by numerical calculation.
[0158] The scene transmittance, white light noise and scene depth of the foggy image to be processed are input into the object image light penetration fog attenuation model to obtain the original defogging image corresponding to the foggy image to be processed output by the object image light penetration fog attenuation model.
[0159] Among them, the object image light penetration fog attenuation model is used to compensate for the first target attenuation corresponding to the foggy image to be processed based on the scene transmittance, white light noise and scene depth of the foggy image to be processed; the first target attenuation includes the attenuation of light caused by fog droplets when obtaining the foggy image to be processed.
[0160] Specifically, the scene transmittance, white light noise and scene depth of the foggy image to be processed are input into the object image light penetration attenuation model. The above-mentioned object image light penetration attenuation model can compensate for the attenuation of light caused by the scattering effect of fog droplets when obtaining the foggy image to be processed based on the scene transmittance, white light noise and scene depth of the foggy image to be processed, thereby realizing image defogging of the foggy image to be processed, and generating and outputting the original defogging image corresponding to the foggy image to be processed.
[0161] It should be noted that the object image light attenuation model through fog is a physical model.
[0162] It should be noted that the attenuation of light caused by the scattering effect of fog droplets when acquiring the foggy image to be processed can be used as the first target attenuation.
[0163] The embodiment of the present invention obtains the extinction coefficient of the foggy image to be processed based on the visibility of the foggy image to be processed, obtains the scene transmittance of the foggy image to be processed based on the extinction coefficient and scene depth of the foggy image to be processed, and inputs the scene transmittance, white light noise and scene depth of the foggy image to be processed into the object image light penetration fog attenuation model. The object image light penetration fog attenuation model compensates for the first target attenuation corresponding to the foggy image to be processed based on the scene transmittance, white light noise and scene depth of the foggy image to be processed, thereby realizing image defogging of the foggy image to be processed. The first target attenuation includes the attenuation of light caused by the scattering effect of fog droplets when obtaining the foggy image to be processed. The original defogged image corresponding to the foggy image to be processed output by the object image light penetration fog attenuation model is obtained, which can achieve more efficient image defogging without complex calculations, and has a better defogging effect on the foggy image to be processed.
[0164] Based on the contents of the above embodiments, the scene transmittance, white light noise and scene depth of the foggy image to be processed are input into the object image light penetration attenuation model to obtain the original defogged image corresponding to the foggy image to be processed output by the object image light penetration attenuation model, specifically including: inputting the scene transmittance, white light noise and scene depth of the foggy image to be processed into the object image light penetration attenuation model, using the object image light penetration attenuation model to compensate for the second target attenuation corresponding to each channel of the foggy image to be processed, obtaining the original defogged sub-image corresponding to each channel of the foggy image to be processed, and combining the original sub-images as the original defogged image; wherein, the second target attenuation includes the attenuation corresponding to each channel in the first target attenuation; and the first target attenuation includes the second target attenuation.
[0165] It should be noted that for fog droplets of the same size, light of different wavelengths scatters to varying degrees due to the droplets. The same wavelength also scatters to varying degrees due to droplets of different sizes. As the distance between the subject and the imaging device increases or as the fog density increases, details in foggy images become increasingly difficult to discern.
[0166] Specifically, the scene transmittance e corresponding to channel i of the foggy image to be processed is -σid , white light noise W i The scene depth d of the foggy image to be processed is input into the object light penetration fog attenuation model. The object light penetration fog attenuation model can be based on the scene transmittance corresponding to the channel i of the foggy image to be processed. White light noise W iAnd the scene depth d of the foggy image to be processed, to compensate for the attenuation of the light of the wavelength corresponding to the i channel caused by the scattering effect of the fog droplets when obtaining the foggy image to be processed, the generated image is the foggy image to be processed output by the light penetration attenuation model, and the i channel corresponds to the original defogging sub-image J i (x).
[0167] It should be noted that the attenuation of light of a wavelength corresponding to any channel caused by the scattering effect of fog droplets when acquiring the foggy image to be processed can be used as a second target attenuation. The first target attenuation is composed of the second target attenuations.
[0168] After the object image light penetration and fog attenuation model generates the original defogged sub-image corresponding to each channel of the foggy image to be processed, the original defogged sub-images can be combined as the original defogged image corresponding to the defogged image to be processed, so as to obtain the original defogged image corresponding to the foggy image to be processed output by the object image light penetration and fog attenuation model.
[0169] The embodiment of the present invention inputs the scene transmittance and white light noise corresponding to each channel of the foggy image to be processed, as well as the scene depth of the foggy image to be processed, into the object image light penetration attenuation model. The object image light penetration attenuation model compensates for the attenuation of light of the wavelength corresponding to each channel caused by the scattering effect of fog droplets when obtaining the foggy image to be processed, and generates an original defogged sub-image corresponding to each channel of the foggy image to be processed. After combining the above original defogged sub-images, the original defogged image corresponding to the foggy image to be processed is used to obtain the original defogged image corresponding to the foggy image to be processed output by the object image light penetration attenuation model. The defogging effect of the foggy image to be processed can be improved by attenuating the light of the wavelength corresponding to each channel caused by the scattering effect of fog droplets when obtaining the foggy image to be processed.
[0170] Based on the contents of the above embodiments, the calculation formula of the object image light penetration fog attenuation model includes:
[0171]
[0172] Where i represents the channel of the foggy image to be processed; J i (x) represents the original defogging sub-image corresponding to channel i of the foggy image to be processed; I i (x) represents the foggy image to be processed in channel i; W i represents the white light noise corresponding to channel i of the foggy image to be processed; d represents the scene depth of the foggy image to be processed; σ i Indicates the extinction coefficient corresponding to channel i of the foggy image to be processed; Indicates the scene transmittance corresponding to channel i of the foggy image to be processed.
[0173] Specifically, obtain the white light noise W corresponding to channel i of the foggy image to be processedi , extinction coefficient σ i And the scene depth d of the foggy image to be processed, the white light noise W corresponding to the i channel of the foggy image to be processed can be i , extinction coefficient σ i And the scene depth d of the foggy image to be processed is input into the above formula, and the original defogging sub-image J corresponding to the i channel of the foggy image to be processed is obtained through numerical calculation i (x).
[0174] After obtaining the original defogged sub-image corresponding to the R channel of the foggy image to be processed, the original defogged sub-image corresponding to the G channel of the foggy image to be processed, and the original defogged sub-image corresponding to the B channel of the foggy image to be processed, the original defogged sub-images can be combined as the original defogged image corresponding to the defogged image to be processed, thereby obtaining the original defogged image corresponding to the foggy image to be processed output by the object image light penetration and fog attenuation model.
[0175] The embodiment of the present invention inputs the scene transmittance and white light noise corresponding to each channel of the foggy image to be processed, as well as the scene depth of the foggy image to be processed into the object image light penetration attenuation model, and obtains the original defogged image corresponding to each channel of the foggy image to be processed output by the object image light penetration attenuation model. By obtaining the attenuation of light of the wavelength corresponding to each channel caused by the scattering effect of fog droplets when the foggy image to be processed is obtained, the defogging effect of the foggy image to be processed can be improved, and the process of defogging the foggy image to be processed is simpler and more efficient.
[0176] Based on the contents of the above embodiments, the scene transmittance, white light noise and scene depth of the foggy image to be processed are input into the object image light penetration attenuation model, and the original defogged image corresponding to the foggy image to be processed output by the object image light penetration attenuation model is obtained. The above method also includes: performing image enhancement processing on the original defogged image to obtain a defogged image.
[0177] Specifically, after obtaining the original defogged image corresponding to the foggy image to be processed, image enhancement processing may be performed on the original defogged image to obtain a defogged image corresponding to the defogged image to be processed.
[0178] The image enhancement processing performed on the original defogging image may include dynamic range expansion, adaptive histogram equalization, adaptive correspondence or color level enhancement, etc. on the original defogging image, so as to obtain a defogging image corresponding to the defogging image to be processed.
[0179] The embodiment of the present invention obtains the original defogged image corresponding to the foggy image to be processed output by the object image light penetration attenuation model, and then performs image enhancement processing on the above-mentioned original defogged image to obtain the defogged image corresponding to the foggy image to be processed, which can further improve the defogging effect of the foggy image to be processed.
[0180] Figure 3 This is one of the structural diagrams of the image defogging device provided by the present invention. Figure 3 The image defogging device provided by the present invention is described. The image defogging device described below and the image defogging method provided by the present invention described above can be referred to each other. Figure 3 As shown, there are an image acquisition module 301, a parameter acquisition module 302 and an image defogging module 303.
[0181] The image acquisition module 301 is used to acquire the foggy image to be processed.
[0182] The parameter acquisition module 302 is used to acquire white light noise, visibility and scene depth of the foggy image to be processed.
[0183] The image defogging module 303 is configured to perform image defogging on the foggy image to be processed based on white light noise, visibility, and scene depth, and obtain a defogging image corresponding to the foggy image to be processed.
[0184] Specifically, an image acquisition module 301 , a parameter acquisition module 302 and an image defogging module 303 .
[0185] The image acquisition module 301 may use an imaging device to photograph a target and acquire a foggy image to be processed including the target.
[0186] It should be noted that the foggy image to be processed is a multi-channel image, and the channels of the foggy image to be processed include R channel, G channel and B channel.
[0187] The parameter acquisition module 302 can be used to obtain white light noise, visibility and scene depth of the foggy image to be processed through methods such as numerical calculation.
[0188] The image defogging module 303 can be used to perform image defogging on the foggy image to be processed based on the visibility, white light noise and scene depth of the foggy image to be processed that were previously acquired. It can use methods such as numerical calculation to obtain a defogging image corresponding to the foggy image to be processed.
[0189] Figure 4 This is the second structural diagram of the image defogging device provided by the present invention. Figure 4 As shown, the parameter acquisition module 302 may further include an extinction coefficient acquisition submodule 401 , a scene transmittance acquisition submodule 402 and a model output submodule 403 .
[0190] The extinction coefficient acquisition submodule 401 may be configured to acquire the extinction coefficient of the foggy image to be processed based on visibility.
[0191] The scene transmittance acquisition submodule 402 may be configured to acquire the scene transmittance of the foggy image to be processed based on the extinction coefficient and scene depth of the foggy image to be processed.
[0192] The model output submodule 403 can be used to input the scene transmittance, white light noise and scene depth of the foggy image to be processed into the object image light penetration attenuation model to obtain the original defogged image corresponding to the foggy image to be processed output by the object image light penetration attenuation model; wherein, the object image light penetration attenuation model is used to compensate for the first target attenuation corresponding to the foggy image to be processed based on the scene transmittance, white light noise and scene depth of the foggy image to be processed; the first target attenuation includes the attenuation of light caused by fog droplets when obtaining the foggy image to be processed.
[0193] The extinction coefficient acquisition submodule 401 may further include a droplet radius acquisition unit 404 , a scattering efficiency factor acquisition unit 405 and an extinction coefficient acquisition unit 406 .
[0194] The fog droplet radius obtaining unit 404 may be configured to obtain the radius of fog droplets in the foggy image to be processed based on visibility.
[0195] The scattering efficiency factor acquisition unit 405 may be configured to acquire the Mie scattering efficiency factor of the droplet based on the radius of the droplet.
[0196] The extinction coefficient acquiring unit 406 may be configured to acquire the extinction coefficient of the foggy image to be processed based on the radius of the fog droplets and the Mie scattering efficiency factor.
[0197] Optionally, the droplet radius acquiring unit 404 may include a droplet type acquiring subunit 407 and a droplet radius acquiring subunit 408 .
[0198] The droplet type acquisition subunit 407 can be used to acquire the type of droplets.
[0199] The droplet radius obtaining subunit 408 may be configured to obtain the radius of the droplet based on visibility and the type of the droplet.
[0200] Optionally, the image defogging device may include an image enhancement module 409 .
[0201] The image enhancement module 409 may be used to perform image enhancement processing on the original defogging image to obtain a defogging image.
[0202] Figure 5 An example of a physical structure diagram of an electronic device is shown below. Figure 5As shown, the electronic device may include: a processor 510, a communication interface 520, a memory 530, and a communication bus 540, wherein the processor 510, the communication interface 520, and the memory 530 communicate with each other via the communication bus 540. The processor 510 may call the logic instructions in the memory 530 to execute an image defogging method, which includes: obtaining a foggy image to be processed; obtaining white light noise, visibility, and scene depth of the foggy image to be processed; and performing image defogging on the foggy image to be processed based on the white light noise, visibility, and scene depth to obtain a defogging image corresponding to the foggy image to be processed.
[0203] In addition, the logic instructions in the above-mentioned memory 530 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0204] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the image defogging method provided by the above methods, which includes: obtaining a foggy image to be processed; obtaining white light noise, visibility and scene depth of the foggy image to be processed; based on the white light noise, visibility and scene depth, performing image defogging on the foggy image to be processed, and obtaining a defogged image corresponding to the foggy image to be processed.
[0205] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it is implemented to execute the image defogging method provided by the above-mentioned methods, the method including: obtaining a foggy image to be processed; obtaining white light noise, visibility and scene depth of the foggy image to be processed; based on the white light noise, visibility and scene depth, performing image defogging on the foggy image to be processed, and obtaining a defogging image corresponding to the foggy image to be processed.
[0206] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.
[0207] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus the necessary general hardware platform, or of course, by hardware. Based on this understanding, the above technical solution, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as a ROM / R to be processed foggy image M, a disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or certain parts of the embodiment.
[0208] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. An image defogging method, characterized in that: include: Obtain the foggy image to be processed; Obtaining white light noise, visibility, and scene depth of the foggy image to be processed; performing image defogging on the foggy image to be processed based on the white light noise, the visibility, and the scene depth to obtain a defogging image corresponding to the foggy image to be processed; The performing image defogging on the foggy image to be processed based on the white light noise, the visibility, and the scene depth to obtain a defogged image corresponding to the foggy image to be processed specifically includes: Based on the visibility, obtaining an extinction coefficient of the foggy image to be processed; Acquiring a scene transmittance of the foggy image to be processed based on the extinction coefficient and scene depth of the foggy image to be processed; Inputting the scene transmittance, white light noise and scene depth of the foggy image to be processed into an object image light penetration fog attenuation model, and obtaining an original defogging image corresponding to the foggy image to be processed output by the object image light penetration fog attenuation model; The object image light penetration fog attenuation model is used to compensate for the first target attenuation corresponding to the foggy image to be processed based on the scene transmittance, white light noise and scene depth of the foggy image to be processed; the first target attenuation includes the attenuation of light caused by fog droplets when acquiring the foggy image to be processed; The step of inputting the scene transmittance, white light noise, and scene depth of the foggy image to be processed into an object image light penetration fog attenuation model, and obtaining an original defogged image corresponding to the foggy image to be processed output by the object image light penetration fog attenuation model, specifically includes: Inputting the scene transmittance, white light noise, and scene depth of the foggy image to be processed into an object light penetration attenuation model, using the object light penetration attenuation model to compensate for the second target attenuation corresponding to each channel of the foggy image to be processed, obtaining an original defogged sub-image corresponding to each channel of the foggy image to be processed, and combining the original defogged sub-images to obtain the original defogged image; The second target attenuation includes the attenuation corresponding to any channel in the first target attenuation; and the first target attenuation includes each of the second target attenuations.
2. The image defogging method according to claim 1, characterized in that: The calculation formula of the object image light penetration fog attenuation model includes: ; in, represents the channel of the foggy image to be processed; Represents the foggy image to be processed The channel corresponds to the original dehazed sub-image; express The foggy image to be processed of the channel; Represents the foggy image to be processed White light noise corresponding to the channel; represents the scene depth of the foggy image to be processed; Represents the foggy image to be processed The extinction coefficient corresponding to the channel; Represents the foggy image to be processed The scene transmittance corresponding to the channel.
3. The image defogging method according to claim 1 or 2, characterized in that: After inputting the scene transmittance, white light noise, and scene depth of the foggy image to be processed into the object image light penetration fog attenuation model and obtaining the original defogged image corresponding to the foggy image to be processed output by the object image light penetration fog attenuation model, the method further includes: Perform image enhancement processing on the original defogging image to obtain the defogging image.
4. The image defogging method according to claim 1, wherein: The acquiring, based on the visibility, an extinction coefficient of the foggy image to be processed, specifically includes: Based on the visibility, obtaining the radius of fog droplets in the foggy image to be processed; Obtaining a Mie scattering efficiency factor of the droplet based on the radius of the droplet; An extinction coefficient of the foggy image to be processed is obtained based on the radius of the fog droplet and the Mie scattering efficiency factor.
5. The image defogging method according to claim 4, characterized in that: The step of obtaining the radius of fog droplets in the foggy image to be processed based on the visibility specifically includes: Obtaining the type of the mist droplets; The radius of the mist droplet is obtained based on the visibility and the type of the mist droplet.
6. An image defogging device, characterized in that: include: An image acquisition module, used to acquire foggy images to be processed; A parameter acquisition module, configured to acquire white light noise, visibility, and scene depth of the foggy image to be processed; an image defogging module, configured to perform image defogging on the foggy image to be processed based on the white light noise, the visibility, and the scene depth, and obtain a defogging image corresponding to the foggy image to be processed; The image defogging module is specifically used to: Based on the visibility, obtaining an extinction coefficient of the foggy image to be processed; Acquiring a scene transmittance of the foggy image to be processed based on the extinction coefficient and scene depth of the foggy image to be processed; Inputting the scene transmittance, white light noise and scene depth of the foggy image to be processed into an object image light penetration fog attenuation model, and obtaining an original defogging image corresponding to the foggy image to be processed output by the object image light penetration fog attenuation model; The object image light penetration fog attenuation model is used to compensate for the first target attenuation corresponding to the foggy image to be processed based on the scene transmittance, white light noise and scene depth of the foggy image to be processed; the first target attenuation includes the attenuation of light caused by fog droplets when acquiring the foggy image to be processed; The image defogging module is specifically used to: Inputting the scene transmittance, white light noise, and scene depth of the foggy image to be processed into an object light penetration attenuation model, using the object light penetration attenuation model to compensate for the second target attenuation corresponding to each channel of the foggy image to be processed, obtaining an original defogged sub-image corresponding to each channel of the foggy image to be processed, and combining the original defogged sub-images to obtain the original defogged image; The second target attenuation includes the attenuation corresponding to any channel in the first target attenuation; and the first target attenuation includes each of the second target attenuations.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the image defogging method according to any one of claims 1 to 5 are implemented.
8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the image defogging method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
A method and apparatus for image defogging
CN109242783A