CN110175967B - Image defogging processing method, system, computer device and storage medium - Google Patents

Image defogging processing method, system, computer device and storage medium Download PDF

Info

Publication number
CN110175967B
CN110175967B CN201910485387.7A CN201910485387A CN110175967B CN 110175967 B CN110175967 B CN 110175967B CN 201910485387 A CN201910485387 A CN 201910485387A CN 110175967 B CN110175967 B CN 110175967B
Authority
CN
China
Prior art keywords
image
brightness
defogged
color saturation
calculated
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910485387.7A
Other languages
Chinese (zh)
Other versions
CN110175967A (en
Inventor
邓诗雨
邓家先
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Deng Shi Yu
Original Assignee
邓诗雨
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 邓诗雨 filed Critical 邓诗雨
Priority to CN201910485387.7A priority Critical patent/CN110175967B/en
Publication of CN110175967A publication Critical patent/CN110175967A/en
Application granted granted Critical
Publication of CN110175967B publication Critical patent/CN110175967B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • G06T5/73
    • G06T5/92

Abstract

The application relates to an image defogging processing method, system, computer device and storage medium. The method comprises the following steps: acquiring an original image to be defogged; converting the original image into an HIS image; carrying out defogging treatment on the HIS image by adopting the pre-calculated transmissivity to obtain a defogged HIS image; and adjusting the brightness, the color saturation and the color tone of the defogged HIS image to obtain a final defogged image. The method converts RGB into HIS space, carries out defogging treatment in the HIS space and adjusts the transmissivity of the HIS space in the defogging process, and can effectively reduce halation while defogging. In addition, the brightness, the color saturation and the color tone of the image are adjusted after defogging, so that the brightness of the image after defogging is improved, the accuracy of the color saturation and the color tone is ensured, and the quality of the image is further improved.

Description

Image defogging processing method, system, computer device and storage medium
Technical Field
The present application relates to the field of image processing technologies, and in particular, to an image defogging method and system, a computer device, and a storage medium.
Background
With the rapid development of smart cities and security, video surveillance is spread in every corner of our lives. However, as the atmospheric pollution increases, the frequency of the occurrence of haze weather becomes higher and higher. Under haze weather, suspended fine particles and water drops in the atmosphere can absorb, scatter and refract light, so that image scenes generated in the haze weather are not clear, image details are lost, and the application of images and videos in the fields of traffic monitoring, target tracking, autonomous navigation and the like is limited. Therefore, under severe weather conditions, it is important how to obtain a high-quality clear image to accurately detect a target object.
At present, in the prior art, a dark channel image defogging algorithm is generally adopted to perform defogging processing on an image, and the dark channel image defogging algorithm is used for reconstructing the image by estimating the perspective ratio of haze, so that the influence of the haze (haze) on the image can be well reduced. However, the dark channel image defogging algorithm is easy to affect the color tone of the image and a halo phenomenon can occur.
Disclosure of Invention
In view of the above, it is necessary to provide an image defogging processing method, system, computer device, and storage medium that can solve the above-described problems.
An image defogging processing method, comprising:
acquiring an original image to be defogged;
converting the original image into an HIS image;
carrying out defogging treatment on the HIS image by adopting the pre-calculated transmissivity to obtain a defogged HIS image;
and adjusting the brightness, the color saturation and the color tone of the defogged HIS image to obtain a final defogged image.
In one embodiment, the method for calculating the pre-calculated transmittance includes:
processing the original image to obtain a dark channel image of the original image;
performing guiding filtering processing on the dark channel image to obtain a filtered dark channel image;
and calculating the transmissivity of the dark channel image to obtain the pre-calculated transmissivity.
In one embodiment, the step of performing brightness on the dehazed HIS image comprises:
and adjusting the brightness of the defogged HIS image by adopting a brightness adjusting function.
In one embodiment, the step of adjusting the brightness of the dehazed HIS image by using the brightness adjustment function is a brightness segmentation function, and the step of adjusting the brightness of the dehazed HIS image by using the brightness adjustment function includes:
and adjusting the brightness of the defogged HIS image by adopting the following brightness piecewise function:
Figure BDA0002085217070000021
where y denotes a luminance value after adjustment, x denotes a luminance value before adjustment, and up denotes an upper limit value of luminance.
In one embodiment, the brightness adjustment function is a brightness gain function, and the step of adjusting the brightness of the defogged HIS image by using the brightness adjustment function includes:
and adjusting the brightness of the defogged HIS image by adopting the following brightness gain function:
y=xf(x)
where y represents the adjusted luminance value, x represents the luminance value before adjustment, and f (x) represents a preset gain function.
In one embodiment, the step of adjusting the color saturation of the dehazed HIS image comprises:
and adjusting the color saturation of the defogged HIS image by adopting a pre-calculated color saturation adjusting factor.
In one embodiment, the method for calculating the pre-calculated color saturation adjustment factor includes:
carrying out color saturation normalization processing on the original image;
determining an upper limit value and a lower limit value of the color saturation according to the distribution probability of the image color saturation after normalization processing;
determining a first color saturation adjustment factor according to the upper limit value and the lower limit value;
and correcting the first color saturation adjustment factor and a preset second color saturation adjustment factor to obtain the pre-calculated color saturation adjustment factor.
An image defogging processing system, the system comprising:
the original image acquisition module is used for acquiring an original image to be defogged;
the HIS image conversion module is used for converting the original image into an HIS image;
the defogging module is used for defogging the HIS image by adopting the pre-calculated transmissivity to obtain the defogged HIS image;
and the final defogged image obtaining module is used for adjusting the brightness, the color saturation and the color tone of the defogged HIS image to obtain a final defogged image.
A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
acquiring an original image to be defogged;
converting the original image into an HIS image;
carrying out defogging treatment on the HIS image by adopting the pre-calculated transmissivity to obtain a defogged HIS image;
and adjusting the brightness, the color saturation and the color tone of the defogged HIS image to obtain a final defogged image.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
acquiring an original image to be defogged;
converting the original image into an HIS image;
carrying out defogging treatment on the HIS image by adopting the pre-calculated transmissivity to obtain a defogged HIS image;
and adjusting the brightness, the color saturation and the color tone of the defogged HIS image to obtain a final defogged image.
The image defogging processing method, the image defogging processing system, the computer equipment and the storage medium are characterized in that an original image to be defogged is firstly obtained, the original image is converted into an HIS image, then the HIS image is subjected to transmittance pre-calculated, and brightness, color saturation and color tone of the image are adjusted after defogging. The method converts RGB into HIS space, carries out defogging treatment in the HIS space and adjusts the transmissivity of the HIS space in the defogging process, and can effectively reduce halation while defogging. In addition, the brightness, the color saturation and the color tone of the image are adjusted after defogging, so that the brightness of the image after defogging is improved, the accuracy of the color saturation and the color tone is ensured, and the quality of the image is further improved.
Drawings
FIG. 1 is a diagram illustrating an application environment of an image defogging method according to an embodiment;
FIG. 2 is a diagram illustrating an exemplary embodiment of an image defogging method;
FIG. 3 is a flowchart illustrating an image defogging method according to an embodiment;
FIG. 4 is a schematic diagram of a process for calculating a pre-calculated transmittance in an image defogging processing method according to an embodiment;
FIG. 5 is a flowchart illustrating an image defogging method according to another embodiment;
FIG. 6 is a diagram illustrating the result of processing a picture using the image defogging method according to the present invention in one embodiment;
FIG. 7 is a diagram illustrating the results of processing a picture using the image defogging method and other methods of the present invention in another embodiment;
FIG. 8 is a block diagram showing the configuration of an image defogging processing system in one embodiment;
FIG. 9 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The method is applied to the terminal 102 in fig. 1, the terminal may be a personal computer, a notebook computer, or the like, the terminal 102 is in communication connection with the detection device 104, and the detection device 104 may be an image collector, a camera, or the like.
When the terminal 102 and the detection device 104 are connected by using a local interface, the detection device 104 may send the acquired initial image to the terminal 102. In addition, the terminal 102 may also acquire an initial image measured in the detection device 104 by an instruction.
In one embodiment, as shown in fig. 2, an image defogging method is provided, which is described by taking the method as an example applied to the terminal in fig. 1, and includes the following steps:
step S202, obtaining an original image to be defogged;
step S204, converting the original image into an HIS image;
the original image to be defogged refers to any photograph, picture, etc. having fog (haze). Usually, the pictures are in color, and color pictures are represented by R (red), G (green) and B (blue). RGB corresponds to the three stimulus values of a monitor or scanner, which make up a three-dimensional orthogonal coordinate system where any color calculated falls within the RGB color cube. The RGB system defines different colors by the mixing ratio of the three primary colors of red, green and blue, making it difficult to express the different colors by accurate numerical values for quantitative analysis.
The HIS (Hue-Intensity-Saturation) color space is another color space commonly used in image processing, and it describes colors in terms of Hue (Hue), Saturation (Saturation or Chroma), and lightness (Intensity or Brightness) from the human visual system. The HIS color space can be described using the conical space model of fig. 2-2. Wherein, the hue H is represented by an angle, and red, yellow, green, blue, magenta are represented by different angles. The saturation S is the radial length from the axis to the color point in the HIS color space, the closer the color point is to the axis, the more white light that represents a color. The intensity I is represented by the height in the direction of the axis, the axis of the cone describing the grey level, the intensity being black at the minimum and white at the maximum. The intensity values are equal for each point on the tangent plane orthogonal to the axis. Although the cone model describing the HIS color space is quite complex, the change situations of hue, brightness and saturation can be clearly shown. Hue and saturation are commonly referred to as chroma and are used to indicate the class and shade of a color. The original image to be defogged is changed from RGB to HIS in the present embodiment.
Step S206, carrying out defogging treatment on the HIS image by adopting the pre-calculated transmissivity to obtain a defogged HIS image;
the image defogging is the intersection and fusion of two technologies of image enhancement and image restoration, if the haze is regarded as noise, the haze is removed, namely the noise of the image is removed, and the image is restored to the condition that no haze is obtained; if a picture taken in a haze environment is considered to be the original appearance of an image, then defogging is obviously an enhancement that people make to the image in order to improve subjective visual quality. Haze removal through a dark channel is a common method for removing haze at present, wherein in the process of haze removal through the dark channel, the transmissivity is a very critical factor; in other words, the essence of dark channel defogging is to calculate transmittance and then adjust the image based on the transmittance. In the present embodiment, the transmittance is calculated in advance, and the transmittance may be calculated using the guide filter and corrected, and then the calculated transmittance is obtained in advance. The pre-calculated transmissivity can be stored in a computer or a terminal device, and can be directly called when the transmissivity is required to be used when the image is subjected to defogging processing.
And step S208, adjusting the brightness, the color saturation and the color tone of the defogged HIS image to obtain a final defogged image.
After the HIS image is defogged, the brightness, color saturation and color tone of the defogged HIS image are adjusted, wherein some relevant adjusting functions such as a piecewise function, a gain function and the like are generally adopted when the brightness, the color saturation and the color tone are adjusted. In addition, when adjusting the color tone, the color tone of the dehazed HIS image may be adjusted according to a preset color tone adjustment value, where the preset color tone adjustment value is not a unique value, and is usually a range, and any value in the range may be used.
The image defogging method comprises the steps of firstly obtaining an original image to be defogged, converting the original image into an HIS image, then adopting a pre-calculated transmissivity to adjust the HIS image, and adjusting the brightness, the color saturation and the color tone of the image after defogging. The method converts RGB into HIS space, carries out defogging treatment in the HIS space and adjusts the transmissivity of the HIS space in the defogging process, and can effectively reduce halation while defogging. In addition, the brightness, the color saturation and the color tone of the image are adjusted after defogging, so that the brightness of the image after defogging is improved, the accuracy of the color saturation and the color tone is ensured, and the quality of the image is further improved.
In one embodiment, as shown in fig. 3, the method for calculating the pre-calculated transmittance includes:
step S302, processing the original image to obtain a dark channel image of the original image;
step S304, conducting guiding filtering processing on the dark channel image to obtain a filtered dark channel image;
step S306, calculating the transmissivity of the dark channel image to obtain the pre-calculated transmissivity.
Specifically, as shown in fig. 4, the process of calculating the transmittance generally includes: dark channel images are extracted from the original image, guided filtered, and the transmittance of the dark channel images is calculated in the process.
The guide map filtering is an image filtering technique that performs a filtering process on a target image P (input image) by a guide map G so that the final output image is substantially similar to the target image P, but the texture portion is similar to the guide map G. There are two typical applications: the edge-protected image is smooth and sectional. The purpose of the guided filtering is to preserve the edge dominance (effectively preserving edges, non-iterative computation). Note that the guide map (guide map) is G, the input image is P, the output image is Q, and the goal of guide map filtering is to make the original input and output as identical as possible, while the texture part is similar to the guide map G. Since the above equation is only a local linear model, the two coefficients are actually a position-dependent variable. To determine its value, a small window is considered so that the pixels within the window satisfy both of the above conditions, and the above equation can be substituted into the first equation to obtain the objective function.
In addition, the transmittance is determined from the original image to be defogged and the global atmospheric light component. The transmittance is typically adjusted after the throw ratio is calculated to obtain a pre-calculated transmittance.
In one embodiment, the transmittance is adjusted using a nonlinear function, wherein the nonlinear function is:
Figure BDA0002085217070000081
txindicating transmittance, α, β are non-negative real numbers.
In another alternative embodiment, an adjustment constant may be used to adjust the transmittance, i.e., each luminance value is assigned a positive value and multiplied by the original transmittance, thereby changing the transmittance and achieving the adjustment of the defogging effect. Wherein the adjustment constant can be set according to the needs of the user.
In one embodiment, the step of performing brightness on the dehazed HIS image includes:
and adjusting the brightness of the defogged HIS image by adopting a brightness adjusting function.
Specifically, the brightness of the defogged HIS image is adjusted by using a brightness adjustment function. And the brightness of the defogged HIS image is adjusted by adopting a brightness adjusting function, so that the image can be continuously adjusted, and an optimal adjusting scheme can be conveniently selected.
In one specific embodiment, the brightness adjustment function is a brightness segmentation function, and the step of adjusting the brightness of the defogged HIS image by using the brightness adjustment function includes:
and (3) adjusting the brightness of the defogged HIS image by adopting the following brightness piecewise function:
Figure BDA0002085217070000091
where y denotes a luminance value after adjustment, x denotes a luminance value before adjustment, and up denotes an upper limit value of luminance. When the upper limit value of the brightness is confirmed, the brightness with the probability greater than or equal to the preset probability value is taken as the upper limit value according to the brightness probability distribution of the defogged HIS image. The preset probability value is determined according to the requirement of the picture processing effect in practice, and is usually selected to be 95%.
In another embodiment, the brightness adjustment function is a brightness gain function, and the step of adjusting the brightness of the dehazed HIS image by using the brightness adjustment function includes:
and (3) carrying out brightness adjustment on the defogged HIS image by adopting the following brightness gain function:
y=xf(x)
where y represents the adjusted luminance value, x represents the luminance value before adjustment, and f (x) represents a preset gain function.
In one embodiment, the step of adjusting the color saturation of the dehazed HIS image comprises:
and adjusting the color saturation of the defogged HIS image by adopting a pre-calculated color saturation adjusting factor.
In one embodiment, as shown in fig. 5, the method for calculating the pre-calculated color saturation adjustment factor includes:
step S502, carrying out color saturation normalization processing on the original image;
step S504, determining an upper limit value and a lower limit value of the color saturation according to the distribution probability of the image color saturation after normalization processing;
step S506, determining a first color saturation adjustment factor according to the upper limit value and the lower limit value;
and step S508, correcting the first color saturation adjustment factor and the preset second color saturation adjustment factor to obtain a pre-calculated color saturation adjustment factor.
Specifically, firstly, color saturation normalization processing is performed on an original image, and then the normalized color saturation is quantized, namely, the normalized color saturation is multiplied by 255 and then rounded; statistics of the probability distribution of the quantized color saturation; taking the value of the quantized color saturation corresponding to 5% as a lower limit value up, and taking the quantized color saturation corresponding to 95% as an upper limit value floor in the same way; according to the upper limit value and the lower limit value, a first color saturation adjustment factor:
b=0.75×up/floor
and then forming a color saturation adjustment factor according to the first color saturation adjustment factor and a preset second color saturation adjustment factor, wherein the color saturation adjustment factor comprises the following components:
Figure BDA0002085217070000101
where a represents a preset second color saturation adjustment factor, a is usually a non-negative real number set by the user, and b represents the first color saturation adjustment factor. Then, the color saturation adjustment factor is corrected to obtain the pre-calculated color saturation adjustment factor
Figure BDA0002085217070000102
Wherein x is the quantized color saturation; calculating each of them according to the adjusted brightnessAnd obtaining the corrected color saturation by multiplying the maximum value of the color saturation corresponding to the pixel by the original color saturation by using the adjustment factor d, and performing inverse normalization processing to obtain the final color saturation.
Effects of the embodiment
In order to verify the effect of the image defogging processing method in the invention, an effect embodiment is given. The result is shown in fig. 6, where a is the original foggy image; b, reconstructing an image by automatic color saturation and automatic brightness adjustment after defogging; c is a reconstructed image with the color saturation of 0.5; d is a reconstructed image with a color saturation of 1.6; e is a reconstructed image with a color saturation of 2.6; f is the reconstructed image after hue offset-15 degrees; g is the reconstructed image after 90 g has been biased for green. As can be seen from the figure, the haze in the picture can be effectively removed by adopting the defogging processing method provided by the invention, and the effect is good.
Comparative examples
In order to further verify the effect of the image defogging processing method in the invention, a comparative example is given, and the result is shown in fig. 7, wherein a is an original image, and b is a reconstructed image of an original defogging algorithm in an RGB space; c is a reconstructed image of the HIS space without using guided filtering and transmittance adaptive correction; d is the reconstructed image without adaptive brightness adjustment; e is a reconstructed image after adaptive brightness adjustment, guide filtering and perspective rate adaptive adjustment; as can be seen from the figure, the image defogging method in the method can effectively remove haze in the figure and effectively keep details such as edges of the image, namely, the defogging effect is good.
It should be understood that although the various steps in the flow charts of fig. 2-5 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-5 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 8, there is provided an image defogging processing system including:
an original image obtaining module 802, configured to obtain an original image to be defogged;
an HIS image conversion module 804, configured to convert an original image into an HIS image;
the defogging module 806 is configured to perform defogging on the HIS image by using a pre-calculated transmittance, so as to obtain a defogged HIS image;
and a final defogged image obtaining module 808, configured to perform brightness, color saturation, and color tone adjustment on the defogged HIS image to obtain a final defogged image.
In one embodiment, the method comprises the following steps:
the dark channel image obtaining module is used for processing the original image to obtain a dark channel image of the original image;
the guiding filtering module is used for conducting guiding filtering processing on the dark channel image to obtain a filtered dark channel image;
and the pre-calculated transmissivity obtaining module is used for calculating the transmissivity of the dark channel image to obtain the pre-calculated transmissivity.
In one embodiment, the final defogged image obtaining module includes:
and the brightness adjusting module is used for adjusting the brightness of the defogged HIS image by adopting a brightness adjusting function.
In one embodiment, the brightness adjusting function is a brightness segmentation function, and the brightness adjusting module is further configured to adjust the brightness of the dehazed HIS image by using the following brightness segmentation function:
Figure BDA0002085217070000121
where y denotes a luminance value after adjustment, x denotes a luminance value before adjustment, and up denotes an upper limit value of luminance.
In one embodiment, the brightness adjustment function is a brightness gain function, and the brightness adjustment module is further configured to perform brightness adjustment on the dehazed HIS image by using the following brightness gain function:
y=xf(x)
where y represents the adjusted luminance value, x represents the luminance value before adjustment, and f (x) represents a preset gain function.
In one embodiment, the final defogged image obtaining module includes:
and the color saturation adjusting module is used for adjusting the color saturation of the defogged HIS image by adopting a pre-calculated color saturation adjusting factor.
In one embodiment, the method comprises the following steps:
the normalization module is used for carrying out color saturation normalization processing on the original image;
the limit value determining module is used for determining an upper limit value and a lower limit value of the color saturation according to the distribution probability of the image color saturation after normalization processing;
the first color saturation adjustment factor determining module is used for determining a first color saturation adjustment factor according to the upper limit value and the lower limit value;
and the pre-calculated color saturation adjustment factor obtaining module is used for correcting the first color saturation adjustment factor and the preset second color saturation adjustment factor to obtain the pre-calculated color saturation adjustment factor.
For specific limitations of the image defogging processing system, reference may be made to the above limitations of the image defogging processing method, which are not described herein again. The modules in the image defogging processing system can be completely or partially realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 7. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer equipment is used for storing data of the resistance equivalent model and the equivalent submodel, and storing equivalent resistance, working resistance and contact resistance obtained in the process of executing calculation. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement an image defogging processing method.
Those skilled in the art will appreciate that the architecture shown in fig. 7 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program: acquiring an original image to be defogged; converting the original image into an HIS image; carrying out defogging treatment on the HIS image by adopting the pre-calculated transmissivity to obtain a defogged HIS image; and adjusting the brightness, the color saturation and the color tone of the defogged HIS image to obtain a final defogged image.
In one embodiment, the processor, when executing the computer program, further performs the steps of: processing the original image to obtain a dark channel image of the original image; performing guided filtering processing on the dark channel image to obtain a filtered dark channel image; the transmittance of the dark channel image is calculated, resulting in a pre-calculated transmittance.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and adjusting the brightness of the defogged HIS image by adopting a brightness adjusting function.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and (3) adjusting the brightness of the defogged HIS image by adopting the following brightness piecewise function:
Figure BDA0002085217070000141
where y denotes a luminance value after adjustment, x denotes a luminance value before adjustment, and up denotes an upper limit value of luminance.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and (3) carrying out brightness adjustment on the defogged HIS image by adopting the following brightness gain function: y-xf (x)
Where y represents the adjusted luminance value, x represents the luminance value before adjustment, and f (x) represents a preset gain function.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and adjusting the color saturation of the defogged HIS image by adopting a pre-calculated color saturation adjusting factor.
In one embodiment, the processor, when executing the computer program, further performs the steps of: carrying out color saturation normalization processing on the original image; determining an upper limit value and a lower limit value of the color saturation according to the distribution probability of the image color saturation after normalization processing; determining a first color saturation adjustment factor according to the upper limit value and the lower limit value; and correcting the first color saturation adjustment factor and the preset second color saturation adjustment factor to obtain a pre-calculated color saturation adjustment factor.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of: acquiring an original image to be defogged; converting the original image into an HIS image; carrying out defogging treatment on the HIS image by adopting the pre-calculated transmissivity to obtain a defogged HIS image; and adjusting the brightness, the color saturation and the color tone of the defogged HIS image to obtain a final defogged image.
In one embodiment, the computer program when executed by the processor further performs the steps of: processing the original image to obtain a dark channel image of the original image; performing guided filtering processing on the dark channel image to obtain a filtered dark channel image; the transmittance of the dark channel image is calculated, resulting in a pre-calculated transmittance.
In one embodiment, the computer program when executed by the processor further performs the steps of: and adjusting the brightness of the defogged HIS image by adopting a brightness adjusting function.
In one embodiment, the computer program when executed by the processor further performs the steps of: and (3) adjusting the brightness of the defogged HIS image by adopting the following brightness piecewise function:
Figure BDA0002085217070000151
where y denotes a luminance value after adjustment, x denotes a luminance value before adjustment, and up denotes an upper limit value of luminance.
In one embodiment, the computer program when executed by the processor further performs the steps of: and (3) carrying out brightness adjustment on the defogged HIS image by adopting the following brightness gain function: y-xf (x)
Where y represents the adjusted luminance value, x represents the luminance value before adjustment, and f (x) represents a preset gain function.
In one embodiment, the computer program when executed by the processor further performs the steps of: and adjusting the color saturation of the defogged HIS image by adopting a pre-calculated color saturation adjusting factor.
In one embodiment, the computer program when executed by the processor further performs the steps of: carrying out color saturation normalization processing on the original image; determining an upper limit value and a lower limit value of the color saturation according to the distribution probability of the image color saturation after normalization processing; determining a first color saturation adjustment factor according to the upper limit value and the lower limit value; and correcting the first color saturation adjustment factor and the preset second color saturation adjustment factor to obtain a pre-calculated color saturation adjustment factor.
Those of ordinary skill in the art will appreciate that all or a portion of the processes in implementing the methods of the embodiments may be performed by hardware associated with instructions of a computer program, which may be stored in a non-volatile computer-readable storage medium that, when executed, may include processes such as those of the embodiments of the methods, wherein any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments are not described, however, as long as there is no contradiction between the combinations of the technical features, the scope of the present description should be considered as being described in the present specification.
The above examples only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (9)

1. An image defogging processing method, comprising:
acquiring an original image to be defogged;
converting the original image into an HIS image;
carrying out defogging treatment on the HIS image by adopting the pre-calculated transmissivity to obtain a defogged HIS image; the transmissivity is determined according to the original image to be defogged and the global atmospheric light component, and the pre-calculated transmissivity is obtained by correcting the calculated transmissivity; wherein the transmittance is adjusted using a nonlinear function when correcting the calculated transmittance;
adjusting the brightness, the color saturation and the color tone of the defogged HIS image to obtain a final defogged image;
the method for calculating the pre-calculated transmittance includes:
processing the original image to obtain a dark channel image of the original image;
performing guiding filtering processing on the dark channel image to obtain a filtered dark channel image;
and calculating the transmissivity of the dark channel image to obtain the pre-calculated transmissivity.
2. The method according to claim 1, wherein the step of performing brightness on the dehazed HIS image comprises:
and adjusting the brightness of the defogged HIS image by adopting a brightness adjusting function.
3. The method according to claim 2, wherein the brightness adjustment function is a brightness segmentation function, and the step of performing brightness adjustment on the dehazed HIS image by using the brightness adjustment function comprises:
and adjusting the brightness of the defogged HIS image by adopting the following brightness piecewise function:
Figure FDA0002484696860000011
where y denotes a luminance value after adjustment, x denotes a luminance value before adjustment, and up denotes an upper limit value of luminance.
4. The method according to claim 3, wherein the brightness adjustment function is a brightness gain function, and the step of performing brightness adjustment on the dehazed HIS image by using the brightness adjustment function comprises:
and adjusting the brightness of the defogged HIS image by adopting the following brightness gain function:
y=xf(x)
where y represents the adjusted luminance value, x represents the luminance value before adjustment, and f (x) represents a preset gain function.
5. The method according to any one of claims 1 to 4, wherein the step of performing color saturation adjustment on the defogged HIS image comprises:
and adjusting the color saturation of the defogged HIS image by adopting a pre-calculated color saturation adjusting factor.
6. The method of claim 5, wherein the pre-computed color saturation adjustment factor is computed by:
carrying out color saturation normalization processing on the original image;
determining an upper limit value and a lower limit value of the color saturation according to the distribution probability of the image color saturation after normalization processing;
determining a first color saturation adjustment factor according to the upper limit value and the lower limit value;
and correcting the first color saturation adjustment factor and a preset second color saturation adjustment factor to obtain the pre-calculated color saturation adjustment factor.
7. An image defogging processing system, said system comprising:
the original image acquisition module is used for acquiring an original image to be defogged;
the HIS image conversion module is used for converting the original image into an HIS image;
the defogging module is used for defogging the HIS image by adopting the pre-calculated transmissivity to obtain the defogged HIS image; the transmissivity is determined according to the original image to be defogged and the global atmospheric light component, and the pre-calculated transmissivity is obtained by correcting the calculated transmissivity; wherein the transmittance is adjusted using a nonlinear function when correcting the calculated transmittance;
a final defogged image obtaining module, configured to perform brightness, color saturation and color tone adjustment on the defogged HIS image to obtain a final defogged image;
the dark channel image obtaining module is used for processing the original image to obtain a dark channel image of the original image;
the guiding filtering module is used for conducting guiding filtering processing on the dark channel image to obtain a filtered dark channel image;
and the pre-calculated transmissivity obtaining module is used for calculating the transmissivity of the dark channel image to obtain the pre-calculated transmissivity.
8. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1 to 6 are implemented when the computer program is executed by the processor.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
CN201910485387.7A 2019-06-05 2019-06-05 Image defogging processing method, system, computer device and storage medium Active CN110175967B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910485387.7A CN110175967B (en) 2019-06-05 2019-06-05 Image defogging processing method, system, computer device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910485387.7A CN110175967B (en) 2019-06-05 2019-06-05 Image defogging processing method, system, computer device and storage medium

Publications (2)

Publication Number Publication Date
CN110175967A CN110175967A (en) 2019-08-27
CN110175967B true CN110175967B (en) 2020-07-17

Family

ID=67697059

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910485387.7A Active CN110175967B (en) 2019-06-05 2019-06-05 Image defogging processing method, system, computer device and storage medium

Country Status (1)

Country Link
CN (1) CN110175967B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110648297B (en) * 2019-09-26 2023-05-26 邓诗雨 Image defogging method, system, electronic device and storage medium
CN112488954B (en) * 2020-12-07 2023-09-22 江苏理工学院 Adaptive image enhancement method and device based on image gray level
WO2022213372A1 (en) * 2021-04-09 2022-10-13 深圳市大疆创新科技有限公司 Image dehazing method and apparatus, and electronic device and computer-readable medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104252698A (en) * 2014-06-25 2014-12-31 西南科技大学 Semi-inverse method-based rapid single image dehazing algorithm
CN104978719A (en) * 2015-06-16 2015-10-14 浙江工业大学 Self-adaptive traffic video real-time defogging method based on temporal-spatial coherence
CN105608683A (en) * 2016-03-11 2016-05-25 北京理工大学 Defogging method of single image
CN105631829A (en) * 2016-01-15 2016-06-01 天津大学 Night haze image defogging method based on dark channel prior and color correction

Family Cites Families (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102999883B (en) * 2011-09-08 2016-03-02 富士通株式会社 Image defogging method capable and system
CN102663694A (en) * 2012-03-30 2012-09-12 大连理工大学 Digital fog effect filter method based on dark primary color channel prior principle
CN102968772B (en) * 2012-12-04 2016-01-13 电子科技大学 A kind of image defogging method capable based on dark channel information
CN104715239B (en) * 2015-03-12 2019-01-18 哈尔滨工程大学 A kind of vehicle color identification method based on defogging processing and weight piecemeal
CN105118027B (en) * 2015-07-28 2017-10-27 北京航空航天大学 A kind of defogging method of image
CN106127715A (en) * 2016-08-29 2016-11-16 程建 A kind of image defogging method and system
CN106886985B (en) * 2017-04-25 2019-10-08 哈尔滨工业大学 A kind of adaptive enhancement method of low-illumination image reducing colour cast
CN107424198B (en) * 2017-07-27 2020-03-27 Oppo广东移动通信有限公司 Image processing method, image processing device, mobile terminal and computer readable storage medium
CN107886480A (en) * 2017-11-06 2018-04-06 北方工业大学 Image defogging method based on V system
CN107977941B (en) * 2017-12-04 2021-04-20 国网智能科技股份有限公司 Image defogging method for color fidelity and contrast enhancement of bright area
CN108133462B (en) * 2017-12-08 2020-06-19 泉州装备制造研究所 Single image restoration method based on gradient field region segmentation
CN108416739B (en) * 2018-01-16 2021-09-24 辽宁师范大学 Traffic image defogging method based on contour wave and Markov random field
CN108416745B (en) * 2018-02-02 2020-06-26 中国科学院西安光学精密机械研究所 Image self-adaptive defogging enhancement method with color constancy
CN108389175B (en) * 2018-04-26 2021-05-18 长安大学 Image defogging method integrating variation function and color attenuation prior
CN108876743B (en) * 2018-06-26 2020-12-29 中山大学 Image rapid defogging method, system, terminal and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104252698A (en) * 2014-06-25 2014-12-31 西南科技大学 Semi-inverse method-based rapid single image dehazing algorithm
CN104978719A (en) * 2015-06-16 2015-10-14 浙江工业大学 Self-adaptive traffic video real-time defogging method based on temporal-spatial coherence
CN105631829A (en) * 2016-01-15 2016-06-01 天津大学 Night haze image defogging method based on dark channel prior and color correction
CN105608683A (en) * 2016-03-11 2016-05-25 北京理工大学 Defogging method of single image

Also Published As

Publication number Publication date
CN110175967A (en) 2019-08-27

Similar Documents

Publication Publication Date Title
Park et al. Single image dehazing with image entropy and information fidelity
US9710715B2 (en) Image processing system, image processing device, and image processing method
US10672112B2 (en) Method and system for real-time noise removal and image enhancement of high-dynamic range images
WO2016206087A1 (en) Low-illumination image processing method and device
US9842382B2 (en) Method and device for removing haze in single image
WO2019200657A1 (en) Method for processing image edge, electronic device, and computer readable storage medium
CN110175967B (en) Image defogging processing method, system, computer device and storage medium
US20120219218A1 (en) Automatic localized adjustment of image shadows and highlights
US20130136352A1 (en) Method of chromatic classification of pixels and method of adaptive enhancement of a color image
US10521887B2 (en) Image processing device and image processing method
KR102567860B1 (en) Improved inverse tone mapping method and corresponding device
US10609303B2 (en) Method and apparatus for rapid improvement of smog/low-light-level image using mapping table
CN107895350B (en) HDR image generation method based on self-adaptive double gamma transformation
CN108961299B (en) Foreground image obtaining method and device
CN108965647B (en) Foreground image obtaining method and device
CN111192205A (en) Image defogging method and system and computer readable storage medium
Cheng et al. Blue channel and fusion for sandstorm image enhancement
CN111369471A (en) Image processing method, device, equipment and storage medium
CN112541868A (en) Image processing method, image processing device, computer equipment and storage medium
US9330340B1 (en) Noise estimation for images using polynomial relationship for pixel values of image features
Liu et al. Single image haze removal via depth-based contrast stretching transform
CN114037641A (en) Low-illumination image enhancement method, device, equipment and medium
CN111598812B (en) Image defogging method based on RGB and HSV double-color space
CN112825189B (en) Image defogging method and related equipment
CN109961422B (en) Determination of contrast values for digital images

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20190925

Address after: 570228 No. 58 Renmin Avenue, Meilan District, Hainan, Haikou

Applicant after: Deng Shi Yu

Address before: 570228 No. 58 Renmin Avenue, Meilan District, Hainan, Haikou

Applicant before: Hainan University

GR01 Patent grant
GR01 Patent grant