CN112669223A - Real-time video defogging method and device based on dark channel prior, and computer storage medium - Google Patents

Real-time video defogging method and device based on dark channel prior, and computer storage medium Download PDF

Info

Publication number
CN112669223A
CN112669223A CN201910979097.8A CN201910979097A CN112669223A CN 112669223 A CN112669223 A CN 112669223A CN 201910979097 A CN201910979097 A CN 201910979097A CN 112669223 A CN112669223 A CN 112669223A
Authority
CN
China
Prior art keywords
image
dark channel
value
sub
block
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.)
Pending
Application number
CN201910979097.8A
Other languages
Chinese (zh)
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.)
Shenzhen Kaiyang Electronics Co ltd
Original Assignee
Shenzhen Kaiyang Electronics Co ltd
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 Shenzhen Kaiyang Electronics Co ltd filed Critical Shenzhen Kaiyang Electronics Co ltd
Priority to CN201910979097.8A priority Critical patent/CN112669223A/en
Publication of CN112669223A publication Critical patent/CN112669223A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention provides a real-time video defogging method and device based on dark channel prior, wherein the method comprises the following steps: dividing the foggy day image into a plurality of sub-block images, and selecting pixel points meeting a second preset condition in the sub-block images meeting a first preset condition to estimate an atmospheric light value; constructing a transmission pyramid sequence according to the dark channel image, and fusing the transmission pyramid sequence in a layer-by-layer thinning mode to obtain an initial transmission rate; performing edge effect removing filtering processing on the initial transmittance to obtain a final transmittance; and defogging the foggy day image according to the atmospheric light value and the final transmittance. The method can inhibit the problems of flicker, jitter, color distortion and the like of the video in the defogging process, and has the advantages of low calculation complexity, good real-time performance, good space-time consistency and high imaging quality.

Description

Real-time video defogging method and device based on dark channel prior, and computer storage medium
Technical Field
The invention relates to the technical field of image and video processing, in particular to a real-time video defogging method and device based on dark channel prior and a computer storage medium.
Background
The visible light imaging system is affected by haze weather, the visibility of captured outdoor images and videos is low, details are fuzzy, color distortion occurs, and the visual effect of pictures and videos and the performance of an image processing system are seriously affected. Currently, the common defogging methods are mainly divided into two main categories: a fog image enhancement method based on image processing, such as histogram equalization, local contrast enhancement, gamma correction and the like, does not consider the reason of image degradation, and aims to improve the fog image contrast and highlight image details, but easily loses certain image information. A fog image restoration method based on a physical model, such as a defogging method based on dark channel prior, a defogging method based on scene depth information and the like, has less information loss and more natural defogging effect. Compared with an image defogging algorithm, the video defogging algorithm has higher requirements on the real-time performance and the time-space consistency of the algorithm. However, the existing defogging method based on dark channel prior has the problems of poor real-time performance and inconsistent space and time, so that the imaging quality is not high.
Disclosure of Invention
In view of the above, the present invention provides a real-time video defogging method and apparatus based on dark channel prior, and a computer storage medium, which are used to solve the deficiencies of the prior art.
In order to achieve the purpose, the invention adopts the following technical scheme:
the embodiment of the invention provides a real-time video defogging method based on dark channel prior, which comprises the following steps:
dividing the foggy day image into a plurality of sub-block images, and selecting pixel points meeting a second preset condition in the sub-block images meeting a first preset condition to estimate an atmospheric light value;
constructing a transmission pyramid sequence according to the dark channel image, and fusing the transmission pyramid sequence in a layer-by-layer thinning mode to obtain an initial transmission rate;
performing edge effect removing filtering processing on the initial transmittance to obtain a final transmittance;
defogging the foggy day image according to the atmospheric light value and the final transmittance;
the step of dividing the foggy day image into a plurality of sub-block images and selecting pixel points meeting a second preset condition in the sub-block images meeting the first preset condition to estimate the atmospheric light value specifically comprises the following steps:
dividing the foggy day image into a plurality of subblock images with equal sizes;
calculating the minimum value of the dark channel value of each sub-block image
Figure BDA0002234597910000021
According to a first preset condition
Figure BDA0002234597910000022
Selecting corresponding sub-block image, wherein the threshold value DminAnd DmaxAccording to
Figure BDA0002234597910000023
Self-adaptive setting of the histogram distribution;
according to a second preset condition
Figure BDA0002234597910000024
Selecting pixel points in the corresponding sub-block images, wherein,
Figure BDA0002234597910000025
g, R, B component values of pixel points representing the selected k-th sub-block image are all smaller than a threshold value Lmax
Respectively carrying out RGB component averaging on all pixel points meeting the conditions to obtain an atmospheric light value;
the method for obtaining the initial transmittance by fusing the transmittance pyramid sequence according to the dark channel image comprises the following steps of:
calculating the minimum value of a channel of each pixel point of the foggy day image to obtain a dark channel image;
carrying out minimum value downsampling on the dark channel image to construct a transmissivity pyramid image;
the transmittance pyramid images are fused to obtain an initial transmittance image.
Further, the minimum value of the dark channel value of each sub-block image is calculated
Figure BDA0002234597910000031
The following expression is used:
Figure BDA0002234597910000032
wherein k represents the number of the sub-block image, (x, y) represents the coordinate point of the pixel point, and omega represents the whole area of the sub-block image;
Figure BDA0002234597910000033
representing calculating a dark channel value of each pixel of the sub-block image, wherein the dark channel value is the minimum value of R, G, B values of the pixel point;
Figure BDA0002234597910000034
the minimum value of the dark channel values of all pixels in the sub-block image is taken as the minimum value of the dark channel values of the sub-block image;
atmospheric light value Ac=[Ar Ag Ab]Wherein, in the step (A),
Figure BDA0002234597910000035
wherein
Figure BDA0002234597910000036
mean represents taking the mean.
Further, a transmittance pyramid image t is constructed by minimum downsampling the dark channel image2↓,t4↓,t8↓The calculation adopts the following expression:
Figure BDA0002234597910000037
Figure BDA0002234597910000038
Figure BDA0002234597910000039
wherein the content of the first and second substances,
Figure BDA00022345979100000310
representing the image of dark channel Idark(x, y) is subjected to minimum value downsampling, omega 2 represents a 2 x 2 block domain, namely, the minimum value is taken as a downsampling value in each 2 x 2 block domain, omega (x, y) is an adaptive factor,
Figure BDA00022345979100000311
that is, the value of ω (x, y) is obtained by looking up the display lookup table according to the current minimum value in the 2 × 2 block domain; t is t4↓Is to t2↓Result of minimum downsampling, t8↓Is to t4↓The result of minimum downsampling; t is t8↓One value of (a) corresponds to an 8 x 8 region in the dark channel image, t4↓One value of (a) corresponds to a 4 x 4 region in the dark channel image, t2↓One value in (a) corresponds to a 2 × 2 area in the dark channel image;
the operation of obtaining the initial transmittance image by fusing the transmittance pyramid images is specifically as follows:
calculating t8↓The absolute difference values of the upper, lower, left and right points adjacent to the point are all smaller than a preset threshold Th8Then the 8 x 8 neighborhood of the initial transmission takes t8↓A corresponding one of the values; otherwise, dividing the 8 multiplied by 8 neighborhood into 4 multiplied by 4 neighborhoods; each 4 x 4 neighborhood corresponds to t4↓A point of (1), calculating t4↓The absolute difference values of the upper, lower, left and right points adjacent to the point are all smaller than a preset threshold Th4Then t is taken from the 4 x 4 neighborhood of the initial transmission4↓A corresponding one of the values; otherwise, dividing the 4 multiplied by 4 neighborhood into 4 2 multiplied by 2 neighborhoods; each 2 x 2 neighborhood corresponds to t2↓One point of (2).
Further, the edge effect removing filtering process performs low-pass filtering processes on the initial transmittance in the horizontal direction and the vertical direction, respectively.
Further, the defogging treatment on the foggy day image according to the atmospheric light value and the final transmissivity adopts the following expression:
Figure BDA0002234597910000041
wherein A iscIs the atmospheric light value, ts(x, y) is the final transmission, Ic(x, y) is a foggy day image, Jc(x, y) is the image after the defogging processing.
The embodiment of the invention also provides a real-time video defogging device based on dark channel prior, which comprises:
the dividing and estimating module is used for dividing the foggy day image into a plurality of sub-block images and selecting pixel points meeting a second preset condition in the sub-block images meeting the first preset condition to estimate an atmospheric light value;
the construction fusion module is used for constructing a transmissivity pyramid sequence according to the dark channel image and fusing the transmissivity pyramid sequence in a layer-by-layer thinning mode to obtain initial transmissivity;
the filtering module is used for carrying out edge effect removing filtering processing on the initial transmissivity to obtain final transmissivity;
and the defogging module is used for defogging the foggy day image according to the atmospheric light value and the final transmittance.
Embodiments of the present invention also provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the real-time video defogging method based on dark channel prior as described above.
The embodiment of the present invention further provides a terminal device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the program to implement the above-mentioned real-time video defogging method based on dark channel prior.
The real-time video defogging method based on dark channel prior can inhibit the problems of flicker and jitter, color distortion and the like of a video in the defogging process, and has the advantages of low calculation complexity, good real-time performance, good space-time consistency and high imaging quality.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a real-time video defogging method based on dark channel prior provided in an embodiment of the present invention;
FIG. 2 is a schematic view of a process for estimating an atmospheric light value from a foggy day image;
FIG. 3 is a schematic flow chart of obtaining an initial transmittance from a foggy day image;
FIG. 4 is a schematic diagram of 1 8 × 8 neighborhood divided into 4 × 4 neighborhoods;
fig. 5 is a schematic structural diagram of a real-time video defogging device based on dark channel prior provided in an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
As shown in fig. 1, an embodiment of the present invention provides a real-time video defogging method based on dark channel prior, including:
s101, dividing the foggy day image into a plurality of sub-block images, and selecting pixel points meeting a second preset condition in the sub-block images meeting the first preset condition to estimate an atmospheric light value. As shown in fig. 2, dividing the foggy day image into a plurality of sub-block images, and selecting pixel points satisfying a second preset condition in the sub-block images satisfying the first preset condition to estimate the atmospheric light value specifically includes:
and S1011, dividing the foggy day image into a plurality of sub-block images with equal sizes.
Let Ic(x, y) is a foggy day image with the size of M multiplied by N, and the foggy day image is divided into K subblock image sequences with the same size
Figure BDA0002234597910000061
The size of the sub-block image is Ms×Ns
S1012, calculating the minimum value of the dark channel value of each sub-block image
Figure BDA0002234597910000062
As shown in expression (1), the dark channel value of each pixel of the sub-block image, which is the minimum value among R, G, B values of the pixel point, is first calculated. Then, the minimum value of the dark channel values of the entire subblock image is calculated, wherein Ω represents the entire M of the subblock images×NsAnd (4) a region.
Figure BDA0002234597910000071
Calculating the minimum value of the dark channel value of each sub-block image
Figure BDA0002234597910000072
The method adopts the formula (1): wherein k represents the number of the sub-block image, (x, y) represents the coordinate point of the pixel point, and Ω represents the whole M of the sub-block images×NsAn area;
Figure BDA0002234597910000073
representing calculating a dark channel value of each pixel of the sub-block image, wherein the dark channel value is the minimum value of R, G, B values of the pixel point;
Figure BDA0002234597910000074
the expression takes the minimum value of the dark channel values of all the pixels in the sub-block image as the minimum value of the dark channel values of the sub-block image.
S1013, according to a first preset condition
Figure BDA0002234597910000075
Selecting corresponding sub-block image, wherein the threshold value DminAnd DmaxAccording to
Figure BDA0002234597910000076
Is adaptively set.
S1014, according to a second preset condition
Figure BDA0002234597910000077
Selecting pixel points in the corresponding sub-block images, wherein,
Figure BDA0002234597910000078
g, R, B component values of pixel points representing the selected k-th sub-block image are all smaller than a threshold value Lmax
And S1015, respectively carrying out RGB component averaging on all the pixel points meeting the conditions to obtain the atmospheric light value.
Atmospheric light value Ac=[Ar Ag Ab]Wherein, in the step (A),
Figure BDA0002234597910000079
wherein
Figure BDA00022345979100000710
mean represents taking the mean.
According to a first preset condition as shown in formula (2)
Figure BDA00022345979100000711
Is selected out
Figure BDA00022345979100000712
Corresponding sub-block images with relatively large values satisfy a second preset condition
Figure BDA00022345979100000713
Averaging R, G, B components of all pixel points to obtain atmospheric light value Ac. Wherein the threshold value DminAnd DmaxIs based on
Figure BDA00022345979100000714
Is adaptively set.
S102, constructing a transmissivity pyramid sequence according to the dark channel image, and fusing the transmissivity pyramid sequence in a layer-by-layer thinning mode to obtain initial transmissivity.
As shown in fig. 3, the constructing a transmittance pyramid sequence according to the dark channel image, and fusing the transmittance pyramid sequence in a layer-by-layer thinning manner to obtain an initial transmittance specifically includes:
1021. and calculating the minimum value of the channel of each pixel point of the foggy day image to obtain a dark channel image.
Formula (3) for calculating minimum value of channel of each pixel point of foggy day image
Figure BDA0002234597910000081
1022. And carrying out minimum value downsampling on the dark channel image to construct a transmissivity pyramid image.
Constructing a transmittance pyramid image t by minimum downsampling of dark channel images2↓,t4↓,t8↓
Wherein t is2↓,t4↓,t8↓The calculation formula (4) is as follows:
Figure BDA0002234597910000082
wherein
Figure BDA0002234597910000083
Representing the image of dark channel Idark(x, y) minimum value downsampling is performed, and Ω 2 represents a 2 × 2 block domain, that is, the minimum value is taken in each 2 × 2 block domain as a downsampling value. Omega (x, y) is an adaptive factor,
Figure BDA0002234597910000084
i.e., the value of ω (x, y) is obtained from the current 2 × 2 block intra-domain minimum lookup table. t is t4↓Is to t2↓Result of minimum downsampling, t8↓Is to t4↓The result of minimum downsampling. Thus, t8↓One value of (a) corresponds to an 8 x 8 region in the dark channel image, t4↓One value of (a) corresponds to a 4 x 4 region in the dark channel image, t2↓One value in (a) corresponds to a 2 x 2 area in the dark channel image.
1023. The transmittance pyramid images are fused to obtain an initial transmittance image.
The specific steps of obtaining the initial transmittance image by fusing the transmittance pyramid images are as follows:
let initial transmittance image be t0Calculating t as shown in equation (5)8↓(i, j) absolute difference values of four points, upper, lower, left and right, adjacent thereto. Wherein for the boundary points the absolute difference present is calculated.
Figure BDA0002234597910000091
If the four sets of absolute difference values are all smaller than the preset threshold value, that is
Figure BDA0002234597910000092
Then the 8 x 8 neighborhood of the initial transmission takes t8↓Of a corresponding value, i.e. t0(8i-7:8i,8j-7:8j)=t8↓(i, j). Otherwise, the 8 × 8 neighborhood is divided into 4 × 4 neighborhoods, and each 4 × 4 neighborhood corresponds to t4↓One point in (1), similarly, as shown in FIG. 4, at t4↓(2i-1, 2j-1) points as an example, calculate t4↓(2i-1, 2j-1) and the absolute difference between the upper, lower, left and right points adjacent thereto, as shown in equation (6).
Figure BDA0002234597910000093
Similarly, if the four sets of absolute differences are all smaller than the preset threshold, that is
Figure BDA0002234597910000094
Then the 4 x 4 neighborhood of the initial transmission takes t4↓Of a corresponding value, i.e. t0(8i-7:8i-4,8j-7:8j-4)=t4↓(2i-1, 2 j-1). Otherwise, the 4 × 4 neighborhood is divided into 4 2 × 2 neighborhoods, and each 2 × 2 neighborhood corresponds to t2↓At this time, the perspective ratio of 4 2 × 2 neighborhoods is t2↓Of four corresponding values, i.e.
Figure BDA0002234597910000101
As described above, the transmittance fusion method for the 8 × 8 neighborhood is adopted to fuse the whole initial transmittance t0
And S103, performing edge effect removing filtering processing on the initial transmissivity to obtain the final transmissivity.
And performing low-pass filtering processing on the initial transmissivity along the horizontal direction and the vertical direction respectively by the edge effect removing filtering processing. Specifically, the initial transmittance can be optimized by using guide filtering and median filtering, so as to achieve the purposes of smoothing the image and keeping the edge.
And S104, defogging the foggy day image according to the atmospheric light value and the final transmittance.
The defogging treatment on the foggy day image according to the atmospheric light value and the final transmissivity adopts the following expression:
Figure BDA0002234597910000102
wherein A iscIs the atmospheric light value,ts(x, y) is the final transmission, Ic(x, y) is a foggy day image, Jc(x, y) is the image after the defogging processing.
As shown in fig. 5, an embodiment of the present invention provides a real-time video defogging device based on dark channel prior, including:
the dividing and estimating module is used for dividing the foggy day image into a plurality of sub-block images and selecting pixel points meeting a second preset condition in the sub-block images meeting the first preset condition to estimate an atmospheric light value;
the construction fusion module is used for constructing a transmissivity pyramid sequence according to the dark channel image and fusing the transmissivity pyramid sequence in a layer-by-layer thinning mode to obtain initial transmissivity;
the filtering module is used for carrying out edge effect removing filtering processing on the initial transmissivity to obtain final transmissivity;
and the defogging module is used for defogging the foggy day image according to the atmospheric light value and the final transmittance.
It should be noted that: in the real-time video defogging device based on dark channel prior provided by the above embodiment, only the division of the above program modules is taken as an example for defogging, and in practical application, the above processing distribution can be completed by different program modules according to needs, that is, the internal structure of the device is divided into different program modules to complete all or part of the above-described processing. In addition, the real-time video defogging device based on the dark channel prior and the real-time video defogging method based on the dark channel prior provided by the embodiment belong to the same concept, the specific implementation process is described in the method embodiment in detail, and the beneficial effects are the same as the method embodiment and are not described again.
Embodiments of the present invention further provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method for defogging a video in real time based on a dark channel prior. The computer-readable storage medium may be a magnetic random access Memory (FRAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), a Flash Memory (Flash Memory), a magnetic surface Memory, an optical disk, or a Compact Disc Read-Only Memory (CD-ROM), among other memories.
The embodiment of the invention also provides terminal equipment which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein when the processor executes the program, the real-time video defogging method based on dark channel prior is realized.
In the embodiments provided in the present invention, it should be understood that the disclosed method and intelligent device may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of the unit is only a logical functional division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (8)

1. A real-time video defogging method based on dark channel prior is characterized by comprising the following steps:
dividing the foggy day image into a plurality of sub-block images, and selecting pixel points meeting a second preset condition in the sub-block images meeting a first preset condition to estimate an atmospheric light value;
constructing a transmission pyramid sequence according to the dark channel image, and fusing the transmission pyramid sequence in a layer-by-layer thinning mode to obtain an initial transmission rate;
performing edge effect removing filtering processing on the initial transmittance to obtain a final transmittance;
defogging the foggy day image according to the atmospheric light value and the final transmittance;
the step of dividing the foggy day image into a plurality of sub-block images and selecting pixel points meeting a second preset condition in the sub-block images meeting the first preset condition to estimate the atmospheric light value specifically comprises the following steps:
dividing the foggy day image into a plurality of subblock images with equal sizes;
calculating the minimum value of the dark channel value of each sub-block image
Figure FDA0002234597900000011
According to a first preset condition
Figure FDA0002234597900000012
Selecting corresponding sub-block image, wherein the threshold value DminAnd DmaxAccording to
Figure FDA0002234597900000013
Self-adaptive setting of the histogram distribution;
according to a second preset condition
Figure FDA0002234597900000014
SelectingCorresponding to the pixel points in the sub-block image, wherein,
Figure FDA0002234597900000015
g, R, B component values of pixel points representing the selected k-th sub-block image are all smaller than a threshold value Lmax
Respectively carrying out RGB component averaging on all pixel points meeting the conditions to obtain an atmospheric light value;
the method for obtaining the initial transmittance by fusing the transmittance pyramid sequence according to the dark channel image comprises the following steps of:
calculating the minimum value of a channel of each pixel point of the foggy day image to obtain a dark channel image;
carrying out minimum value downsampling on the dark channel image to construct a transmissivity pyramid image;
the transmittance pyramid images are fused to obtain an initial transmittance image.
2. The method of claim 1, wherein the minimum value of the dark channel values of each sub-block image is calculated
Figure FDA0002234597900000021
The following expression is used:
Figure FDA0002234597900000022
wherein k represents the number of the sub-block image, (x, y) represents the coordinate point of the pixel point, and omega represents the whole area of the sub-block image;
Figure FDA0002234597900000023
representing calculating a dark channel value of each pixel of the sub-block image, wherein the dark channel value is the minimum value of R, G, B values of the pixel point;
Figure FDA0002234597900000024
the expression takes the minimum value of the dark channel values of all the pixels in the sub-block image as the dark of the sub-block imageA minimum value of the channel value;
atmospheric light value Ac=[Ar Ag Ab]Wherein, in the step (A),
Figure FDA0002234597900000025
wherein
Figure FDA0002234597900000026
mean represents taking the mean.
3. The method of claim 1, wherein minimum down-sampling the dark channel image constructs a transmittance pyramid image t2↓,t4↓,t8↓The calculation adopts the following expression:
Figure FDA0002234597900000027
Figure FDA0002234597900000028
Figure FDA0002234597900000029
wherein the content of the first and second substances,
Figure FDA00022345979000000210
representing the image of dark channel Idark(x, y) is subjected to minimum value downsampling, omega 2 represents a 2 x 2 block domain, namely, the minimum value is taken as a downsampling value in each 2 x 2 block domain, omega (x, y) is an adaptive factor,
Figure FDA00022345979000000211
i.e. the value of ω (x, y) is looked up according to the minimum value in the current 2 × 2 block domainObtaining a lookup table; t is t4↓Is to t2↓Result of minimum downsampling, t8↓Is to t4↓The result of minimum downsampling; t is t8↓One value of (a) corresponds to an 8 x 8 region in the dark channel image, t4↓One value of (a) corresponds to a 4 x 4 region in the dark channel image, t2↓One value in (a) corresponds to a 2 × 2 area in the dark channel image;
the operation of obtaining the initial transmittance image by fusing the transmittance pyramid images is specifically as follows:
calculating t8↓The absolute difference values of the upper, lower, left and right points adjacent to the point are all smaller than a preset threshold Th8Then the 8 x 8 neighborhood of the initial transmission takes t8↓A corresponding one of the values; otherwise, dividing the 8 multiplied by 8 neighborhood into 4 multiplied by 4 neighborhoods; each 4 x 4 neighborhood corresponds to t4↓A point of (1), calculating t4↓The absolute difference values of the upper, lower, left and right points adjacent to the point are all smaller than a preset threshold Th4Then t is taken from the 4 x 4 neighborhood of the initial transmission4↓A corresponding one of the values; otherwise, dividing the 4 multiplied by 4 neighborhood into 4 2 multiplied by 2 neighborhoods; each 2 x 2 neighborhood corresponds to t2↓One point of (2).
4. The method according to claim 1, wherein the de-edge effect filtering process low-pass filters the initial transmittance in the horizontal direction and the vertical direction, respectively.
5. The method of claim 1, wherein the defogging process for the fog pattern according to the atmospheric light value and the final transmittance adopts the following expression:
Figure FDA0002234597900000031
wherein A iscIs the atmospheric light value, ts(x, y) is the final transmission, Ic(x, y) is a foggy day image, Jc(x, y) is the image after the defogging processing.
6. A real-time video defogging device based on dark channel prior comprises:
the dividing and estimating module is used for dividing the foggy day image into a plurality of sub-block images and selecting pixel points meeting a second preset condition in the sub-block images meeting the first preset condition to estimate an atmospheric light value;
the construction fusion module is used for constructing a transmissivity pyramid sequence according to the dark channel image and fusing the transmissivity pyramid sequence in a layer-by-layer thinning mode to obtain initial transmissivity;
the filtering module is used for carrying out edge effect removing filtering processing on the initial transmissivity to obtain final transmissivity;
and the defogging module is used for defogging the foggy day image according to the atmospheric light value and the final transmittance.
7. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out a dark channel prior based real-time video defogging method according to any one of claims 1 to 4.
8. A terminal device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor when executing the program implements the dark channel prior based real-time video defogging method according to any one of claims 1 to 4.
CN201910979097.8A 2019-10-15 2019-10-15 Real-time video defogging method and device based on dark channel prior, and computer storage medium Pending CN112669223A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910979097.8A CN112669223A (en) 2019-10-15 2019-10-15 Real-time video defogging method and device based on dark channel prior, and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910979097.8A CN112669223A (en) 2019-10-15 2019-10-15 Real-time video defogging method and device based on dark channel prior, and computer storage medium

Publications (1)

Publication Number Publication Date
CN112669223A true CN112669223A (en) 2021-04-16

Family

ID=75400187

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910979097.8A Pending CN112669223A (en) 2019-10-15 2019-10-15 Real-time video defogging method and device based on dark channel prior, and computer storage medium

Country Status (1)

Country Link
CN (1) CN112669223A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113516602A (en) * 2021-07-14 2021-10-19 广东汇天航空航天科技有限公司 Image defogging method, image defogging device, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113516602A (en) * 2021-07-14 2021-10-19 广东汇天航空航天科技有限公司 Image defogging method, image defogging device, electronic equipment and storage medium
CN113516602B (en) * 2021-07-14 2022-11-22 广东汇天航空航天科技有限公司 Image defogging method, image defogging device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
JP5962393B2 (en) Image processing apparatus, image processing method, and image processing program
CN103581648B (en) Draw the hole-filling method in new viewpoint
KR102182697B1 (en) Apparatus and method for processing image
CN109345490B (en) Method and system for enhancing real-time video image quality of mobile playing terminal
Zhou et al. FSAD-Net: Feedback spatial attention dehazing network
Peng et al. Single image restoration using scene ambient light differential
CN115115516B (en) Real world video super-resolution construction method based on Raw domain
Fan et al. Multiscale cross-connected dehazing network with scene depth fusion
CN111105359A (en) Tone mapping method for high dynamic range image
CN110430403A (en) A kind of image processing method and device
CN116385305A (en) Cross-region transducer-based image shadow removing method and system for nerve radiation field
CN110378860B (en) Method, device, computer equipment and storage medium for repairing video
CN108093175A (en) A kind of adaptive defogging method of real-time high-definition video and device
CN112669223A (en) Real-time video defogging method and device based on dark channel prior, and computer storage medium
Zhu et al. Low-light image enhancement network with decomposition and adaptive information fusion
CN108898561B (en) Defogging method, server and system for foggy image containing sky area
Ke et al. Single underwater image restoration based on descattering and color correction
CN111696034A (en) Image processing method and device and electronic equipment
CN116468636A (en) Low-illumination enhancement method, device, electronic equipment and readable storage medium
Dong et al. Low lighting image enhancement using local maximum color value prior
Pei et al. Nighttime haze removal using bilateral filtering and adaptive dark channel prior
CN115760640A (en) Coal mine low-illumination image enhancement method based on noise-containing Retinex model
CN115439346A (en) Defogging enhancement method for fog-containing image based on airborne embedded FPGA development platform
CN114862707A (en) Multi-scale feature recovery image enhancement method and device and storage medium
CN115880163A (en) Well station night video monitoring image defogging method and equipment

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