CN110349113B - Adaptive image defogging method based on dark primary color priori improvement - Google Patents

Adaptive image defogging method based on dark primary color priori improvement Download PDF

Info

Publication number
CN110349113B
CN110349113B CN201910177949.1A CN201910177949A CN110349113B CN 110349113 B CN110349113 B CN 110349113B CN 201910177949 A CN201910177949 A CN 201910177949A CN 110349113 B CN110349113 B CN 110349113B
Authority
CN
China
Prior art keywords
image
defogging
adaptive
value
haze
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
CN201910177949.1A
Other languages
Chinese (zh)
Other versions
CN110349113A (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.)
Army Engineering University of PLA
Original Assignee
Army Engineering University of PLA
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 Army Engineering University of PLA filed Critical Army Engineering University of PLA
Priority to CN201910177949.1A priority Critical patent/CN110349113B/en
Publication of CN110349113A publication Critical patent/CN110349113A/en
Application granted granted Critical
Publication of CN110349113B publication Critical patent/CN110349113B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/40Image enhancement or restoration using histogram techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a self-adaptive image defogging method based on dark primary prior improvement, which comprises a self-adaptive image defogging method based on a haze image degradation model and a dark primary prior model; the adaptive image defogging method comprises a dark primary color value adaptive acquisition method, an atmosphere light intensity adaptive estimation method, a defogging coefficient adaptive calculation method and an image color level adaptive adjustment method which are used for realizing parameter acquisition or data processing in an adaptive manner; the adaptive image defogging method based on dark primary color priori improvement, disclosed by the invention, has the advantages that defogging parameters are completely obtained according to the characteristics of a haze image, manual parameter setting is not needed, the robustness in the defogging aspect of a multi-concentration and multi-scene haze image is higher, the obtained defogging image is large in information quantity, high in contrast, clear in image, natural in color and free of halation phenomenon, and the method is obviously superior to a multi-scale Retinex enhanced defogging method and a He dark primary color priori restoration defogging method.

Description

Adaptive image defogging method based on dark primary color priori improvement
Technical Field
The invention relates to a self-adaptive image defogging method based on dark primary color priori improvement, and belongs to the technical field of image defogging processing methods.
Background
With the continuous progress of society and the rapid development of science and technology, a computer vision system has been widely applied to various fields such as urban traffic, video monitoring, intelligent navigation, remote sensing imaging, military reconnaissance and the like; therefore, the research on the image defogging technology reduces the influence of haze on the image quality, and has important practical value and practical significance for improving the visual performance of a computer.
According to the difference of image defogging mechanisms, the existing image defogging methods are mainly divided into an image enhancement method based on image processing and an image restoration method based on a physical model; the first type of method does not depend on a physical model, and directly utilizes an image processing algorithm to improve the image contrast, and typical methods are as follows: histogram equalization, retinex, etc., which do not consider the cause of degradation of haze images, and it is difficult to mechanically improve the quality of haze images; the second method is to invert the haze image degradation process by constructing a haze image generation model, and finally restore the haze-free image, and the typical method is as follows: partial differential equation method, depth defogging method and image restoration method based on prior information; in contrast, the partial differential equation method and the image depth defogging method generally assume that haze obeys a uniform distribution model, and a haze image is restored by adopting an overall uniform method, and the actual haze distribution is not uniform, so that the effect of the image definition processing is poor, and some detail information is lost; the image restoration method based on the prior information is established on the basis of carrying out statistical analysis on the actual haze image, and a better haze image restoration effect can be obtained.
A large number of statistical experiments are carried out on the haze-free image and the haze-free image, and the contrast of the haze-free image is found to be obviously higher than that of the haze-free image, so that a haze-removing method for maximizing local contrast is provided, the purpose of haze removal is achieved through local contrast maximizing treatment, but the color of the treated image has the phenomena of cannon and distortion; in addition, the prior knowledge that the light propagation is irrelevant to the partial surface reflection part of the scene is utilized to estimate the reflectivity of the scene and obtain the haze-free image, but the method has good haze treatment effect on the premise of obtaining vivid image colors, and is difficult to be used for image restoration in dense fog weather; aiming at the problems, an image defogging method based on a dark channel priori theory is provided in the prior art, and the transmittance optimization is carried out by adopting guide filtering instead of soft matting, so that the defogging processing speed is improved, but the color of a bright area of the processed image is unnatural and the blocking effect is obvious; the method of combining the bright channel and the dark channel is adopted to estimate the atmospheric light value and the transmissivity, so that the problem of color distortion of defogging in a bright area is solved to a certain extent, but the problem of self-adaptive defogging of haze images with different concentrations is not considered yet; in addition, in the prior primary color prior and the improved defogging algorithm thereof, the defogging coefficient omega for adjusting the defogging effect mostly adopts a fixed value, and is less adaptively adjusted according to actual conditions; therefore, in order to solve the problems that the existing algorithm is difficult to be universally suitable for defogging multi-scene haze images with different concentrations and unclear brightness, the invention provides a self-adaptive defogging algorithm based on the dark primary color priori theory, the defogging parameters of the algorithm are completely acquired according to the self characteristics of the haze images, the parameters are not required to be set manually, and the algorithm has higher robustness in defogging the multi-concentration multi-scene haze images.
Disclosure of Invention
In order to solve the problems, the invention provides a self-adaptive image defogging method based on dark primary color priori improvement, defogging parameters are not required to be set manually, the obtained image is clear and natural in color, and the method has better robustness in defogging of multi-concentration and multi-scene haze images.
The self-adaptive image defogging method based on dark primary prior improvement comprises a self-adaptive image defogging method based on a haze image degradation model and a dark primary prior model; the adaptive image defogging method comprises a dark primary color value adaptive acquisition method, an atmosphere light intensity adaptive estimation method, a defogging coefficient adaptive calculation method and an image color level adaptive adjustment method which are used for realizing parameter acquisition or data processing in an adaptive manner;
the self-adaptive acquisition method of the dark primary color value is to carry out self-adaptive segmentation on a bright and dark area of a haze image by utilizing a rapid OSTU algorithm, and acquire the dark primary color value of the bright and dark area in the segmented area;
the adaptive estimation method of the atmospheric light intensity is to carry out adaptive estimation on the atmospheric light intensity of a bright and dark area according to the distribution condition of the bright area;
the adaptive defogging coefficient calculating method is to provide adaptive defogging coefficient calculation by adopting a gray level concentration method through statistics of the characteristics of the fog image histogram;
the image color level self-adaptive adjustment method is to use the color level self-adaptive adjustment method to adjust the color of the output image.
Further, the haze-based image degradation model is as follows
I(x)=J(x)t(x)+A[1-t(x)], (1)
Wherein: i (x) is the haze image intensity observed by the imaging equipment; j (x) is the fog-free image intensity, namely the image to be restored; t (x) is transmittance and reflects the haze penetration ability of light; a is the atmospheric light intensity at infinity; the reflected light of the target corresponding to J (x) t (x) enters the part of the imaging equipment after being attenuated by atmospheric scattering, and the part is attenuated exponentially with the increase of the depth of the scene; a1-t (x) ] corresponds to the part of the atmospheric light entering the imaging device after scattering, and the part increases with the increase of the scene depth, so that scene blurring and color shift distortion can be caused;
the term of the formula (1) is shifted and arranged, and the haze-free image intensity is expressed as
Figure GDA0004198266610000031
In the above formulae, only I (x) is known, and the essence of image defogging is to restore a clear image J (x) by estimating the transmittance t (x) and the atmospheric light intensity a according to the above model.
Further, the dark primary color prior model is a dark primary color prior rule counted according to a He dark primary color prior restoration defogging method, and is expressed on an image, namely, dark pixel points exist at each position of a foggless image, and the dark pixel points are the dark primary colors J dark The gray values of the dark primary color points tend to be 0, which satisfies
Figure GDA0004198266610000032
Wherein: superscript c denotes the RGB channels of the image; y ε Ω (x) represents a window centered on pixel x;
assuming that the known atmospheric light intensity A and the transmittance t (x) in the window omega (x) are constants, the method can be obtained by arranging the formula (1) and performing two minimum operations:
Figure GDA0004198266610000041
the estimated value of the obtainable transmittance is given by the simultaneous formulas (3) and (4)
Figure GDA0004198266610000042
Considering the visual haziness of people observing distant scenes in real life, introducing a defogging coefficient omega (0 is more than omega and less than or equal to 1), and correcting the above formula to be
Figure GDA0004198266610000043
Wherein: the smaller the omega value is, the more fog components are in the restored image, the weaker the defogging capability is, but the smaller the value is, and the purpose of defogging is approaching to 0; the closer the omega value is to 1, the stronger the defogging capability is, but the oversaturation of the image color is caused, and the sense of reality is lacking;
the method for estimating the atmospheric light intensity A comprises the following steps: firstly, obtaining pixels with maximum brightness of 0.1% in dark primary colors of an image, and then using the maximum value of the pixels corresponding to the pixels in the original image as an estimated value of A;
the estimated transmittance t (x) and the atmospheric light intensity A in the formula (2) can be used for obtaining a haze-free image, and in actual calculation, in order to avoid image distortion caused by too small transmittance, a lower transmittance limit t is usually set 0 The haze-free image is
Figure GDA0004198266610000044
Further, the method for adaptively acquiring the dark primary color value comprises the following specific operation steps: classifying the image pixels, and determining an optimal segmentation threshold value by maximizing the distance between the classified classes;
the first step, assuming that the image I has L gray levels, the number of the ith level pixels is n i The total pixel number is
Figure GDA0004198266610000051
The probability of occurrence of the ith pixel is p i =n i /N;
Second, for the set threshold k, dividing the image into two classes A and B, wherein the class A gray scale interval is [0, k]Class B gray scale interval is [ k+1, L-1 ]]The gray average value mu of the whole image and the gray average value mu of class A interval A (k) Class B interval gray scale average mu B (k) The method comprises the following steps of:
Figure GDA0004198266610000052
the probability distribution of the two types of gray intervals satisfies:
Figure GDA0004198266610000053
the inter-class variance when defining the threshold k as:
σ 2 (k)=p A [μ-μ A (k)] 2 +p B [μ-μ B (k)] 2 , (10)
according to the maximum inter-class variance criterion, changing the L-1 threshold k from 0 to find out the k value which makes the variance maximum in the above formula, namely the optimal segmentation threshold T; for each change of the threshold k, the above formulas are recalculated, and for reducing the time consumption of operation, a plurality of threshold points are firstly screened out according to the valley gray scale characteristics of the haze image histogram, and then substituted into the formulas, so that the rapid OSTU threshold segmentation is realized;
third, according to the gray level i and the pixel number n i Build L relation pairs [ i, n ] i ]Assume a curve i, n i ]Gray scale at a certain positionGrade T j When the pixel number n is j The gray level T is set to satisfy the following relation j Screening to be threshold points:
Figure GDA0004198266610000054
wherein: delta is the size of the screening window, taking delta = 3pixels; α is a minimum limiting ratio, taking α=0.1%;
fourthly, performing threshold segmentation on the haze image by using an improved rapid OSTU threshold method, and according to the threshold point screening and bright and dark region segmentation results, the method can be seen: after screening, only 49 threshold points are left, and the number of the threshold points participating in calculation is reduced by more than 80%; meanwhile, the bright and dark areas are effectively separated, and the defogging treatment of the separated areas is facilitated;
fifth, according to formula (3), the minimum value of the RGB three channels of each pixel point is the dark primary color value, namely:
Figure GDA0004198266610000061
if the haze images with different concentrations adopt the above method for solving the dark primary color values, color distortion of a bright area can be caused; the minimum gray value of the bright area is higher than that of the dark area, if the dark primary color value is obtained by directly adopting the minimum value method, the transmittance is calculated inaccurately, and the three-channel gray average value is selected as the dark primary color value of the bright area, so that the actual situation can be reflected; for this purpose, the dark primary color minimum value is corrected by solving the dark primary color value using the following equation:
Figure GDA0004198266610000062
wherein: t (T) c Threshold is partitioned for c-channels, c ε { R, G, B }.
Further, the specific operation steps of the adaptive estimation method for the atmospheric light intensity are as follows: the atmospheric light intensity self-adaptive estimation is carried out by adopting a bright and dark division area mean method,when the pixel number of the bright area is P b c When the brightness is less than 10%, indicating that the bright areas are less, firstly taking the bright points of 0.1% in front of the dark primary color image, and then finding out the gray average value of the bright points corresponding to the pixel points in the original image as an atmospheric light intensity estimation value; when the pixel number of the bright area is P b c And when the gray level average value is more than or equal to 10%, indicating that the bright areas are more, taking the gray level average value of all the pixel points in the bright areas as an atmospheric light intensity estimated value, and adopting the following calculation formula:
Figure GDA0004198266610000063
wherein: n (N) b Is the number of pixels in the bright area.
Further, the adaptive calculation method for the defogging coefficient comprises the following specific operation steps: the color gradation self-adaptive adjustment method is adopted for restoring the image J 0 By carrying out enhancement treatment and carrying out histogram statistics on haze images with different concentrations, the greater the haze concentration is, the more concentrated the histogram distribution is, and most gray values are concentrated in the size of [ m ] c ,M c ]By utilizing the property, a defogging coefficient calculation method based on gray level concentration is provided, and the following conditions are satisfied:
Figure GDA0004198266610000071
wherein: omega c Adjusting the coefficient to be the minimum value, taking the value omega c =0.15; upper and lower limits m c And M c The method meets the following conditions:
Figure GDA0004198266610000072
wherein: alpha is an upper limit and lower limit adjustment coefficient, and the value alpha=1%;
substituting the above formulas into the transmittance formula (6) correspondingly to obtain the transmittance of the bright and dark areas of the haze image; and then combining the formula (7) to obtain the restored image J 0
Further, the image tone self-adaptive adjustment method comprises the following specific operation steps: according to the formula (16), the concentration degree interval [ m ] of the three channels of the haze image RGB is obtained c ,M c ]The mapping table is calculated using the following formula:
Figure GDA0004198266610000073
for the preliminary restored image J using the map generated by equation (17) 0 The tone scale adjustment is performed as follows:
J(x)=Map(J 0 (x)+1)。 (18)
further, the method for verifying the effectiveness of the adaptive image defogging method comprises the following steps: firstly, 5 haze images with different concentrations, such as forests, river sides, traffic, urban areas, suburbs and the like and different areas of bright areas are selected as experimental objects, defogging treatment is carried out by respectively utilizing a multi-scale Retinex enhanced defogging method, a He dark primary color priori restoration defogging method and a self-adaptive image defogging method, and subjective and objective analysis is carried out on experimental results.
Compared with the prior art, the adaptive image defogging method based on dark primary color priori improvement provided by the invention has the advantages that the bright and dark areas of the haze image are segmented by the fast OSTU method, the dark primary color values of the bright and dark areas are obtained by the segmented areas, and the atmospheric light intensity values of different areas are adaptively estimated; according to the characteristics of the haze image histogram, a gray level concentration method is adopted to calculate a defogging coefficient; performing enhancement treatment on the primarily restored image by adopting a color level self-adaptive adjustment method so as to restore the original color of the haze image as much as possible; the defogging parameters of the self-adaptive image defogging method are completely acquired according to the characteristics of the haze image, the manual parameter setting is not needed, the robustness is higher in defogging aspects of the multi-concentration and multi-scene haze image, the acquired defogging image is large in information quantity, high in contrast, clear in image, natural in color and free of halation, and the defogging method is obviously superior to a multi-scale Retinex enhanced defogging method and a He dark primary prior restoration defogging method.
Drawings
Fig. 1 is a schematic diagram of an atmospheric scattering model proposed by McCartney.
Fig. 2 is a flow chart of the adaptive image defogging method of the present invention.
Fig. 3 is a live view of a campus of the present invention capturing haze images.
FIG. 4 is a schematic view of the threshold point screening and bright and dark region segmentation results of the present invention;
wherein, the diagram (a) is a threshold point screening schematic diagram of the present invention, and the diagram (b) is a bright and dark region segmentation result schematic diagram of the present invention.
Fig. 5 is a schematic illustration of the defogging effect of the different methods.
FIG. 6 is a schematic diagram of evaluation of objective indexes of defogging effect.
Detailed Description
The adaptive image defogging method based on dark primary prior improvement as shown in fig. 2 comprises an adaptive image defogging method based on a haze image degradation model and a dark primary prior model; the adaptive image defogging method comprises a dark primary color value adaptive acquisition (obtain dark channel image adaptively) method, an atmospheric light intensity adaptive estimation (estimate air light adaptively) method, a defogging coefficient adaptive calculation (calculate dehazing coefficient adaptively) method and an image color level adaptive adjustment (adjust image color level adaptively) method which are used for realizing parameter acquisition or data processing in an adaptive manner;
the self-adaptive acquisition method of the dark primary color value is to carry out self-adaptive segmentation on a bright and dark area of a haze image by utilizing a rapid OSTU algorithm, and acquire the dark primary color value of the bright and dark area in the segmented area;
the adaptive estimation method of the atmospheric light intensity is to carry out adaptive estimation on the atmospheric light intensity of a bright and dark area according to the distribution condition of the bright area;
the adaptive defogging coefficient calculating method is to provide adaptive defogging coefficient calculation by adopting a gray level concentration method through statistics of the characteristics of the fog image histogram;
the image color level self-adaptive adjustment method is to use the color level self-adaptive adjustment method to adjust the color of the output image.
Wherein the haze image degradation model can better reveal the degradation mechanism of the haze image, according to the model, the target image acquired by the imaging device is mainly composed of an attenuation component and an environment scattering light component of the reflected light from the target, as shown in figure 1,
simplifying the McCartney to obtain a simplified model of haze image degradation as follows
I(x)=J(x)t(x)+A[1-t(x)], (1)
Wherein: i (x) is the haze image intensity observed by the imaging equipment; j (x) is the fog-free image intensity, namely the image to be restored; t (x) is transmittance and reflects the haze penetration ability of light; a is the atmospheric light intensity at infinity; as shown in fig. 1, J (x) t (x) corresponds to a portion of the target reflected light in fig. 1 that enters the imaging device after being attenuated by atmospheric scattering, and the portion is attenuated exponentially as the depth of the scene increases; a [1-t (x) ] corresponds to the part of the image forming apparatus shown in fig. 1 into which atmospheric light is scattered, which increases as the depth of the scene increases, causing blurring of the scene and distortion of color shift;
the term of the formula (1) is shifted and arranged, and the haze-free image intensity can be expressed as
Figure GDA0004198266610000101
In the above formulas, only I (x) is a known term, and the essence of image defogging is to restore a clear image J (x) by estimating the transmittance t (x) and the atmospheric light intensity a according to the above model;
according to the prior law of the dark primary colors counted by the prior restoration defogging method of the He dark primary colors, shadows are visible everywhere in a natural scene, and the dark primary colors are represented on an image, namely, dark pixel points exist at each position of a foggless image, and the dark pixel points are the dark primary colors J dark The gray values of the dark primary color points tend to be 0, which satisfies
Figure GDA0004198266610000102
Wherein: superscript c denotes the RGB channels of the image; y ε Ω (x) represents a window centered on pixel x;
assuming that the known atmospheric light intensity A and the transmittance t (x) in the window omega (x) are constants, the method can be obtained by arranging the formula (1) and performing two minimum operations:
Figure GDA0004198266610000103
the estimated value of the obtainable transmittance is given by the simultaneous formulas (3) and (4)
Figure GDA0004198266610000104
Considering the visual haziness of people observing distant scenes in real life, introducing a defogging coefficient omega (0 is more than omega and less than or equal to 1), and correcting the above formula to be
Figure GDA0004198266610000105
Wherein: the smaller the omega value is, the more fog components are in the restored image, the weaker the defogging capability is, but the smaller the value is (approaching to 0) has the purpose of illegal defogging; the closer the omega value is to 1, the stronger the defogging capability is, but the oversaturation of the image color is caused, and the sense of reality is lacking;
the method for estimating the atmospheric light intensity A comprises the following steps: firstly, obtaining pixels with maximum brightness of 0.1% in dark primary colors of an image, and then using the maximum value of the pixels corresponding to the pixels in the original image as an estimated value of A;
the estimated transmittance t (x) and the atmospheric light intensity A formula (2) can be used for obtaining a haze-free image, and in actual calculation, in order to avoid image distortion caused by too small transmittance, a lower transmittance limit t is usually set 0 The haze-free image is
Figure GDA0004198266610000111
The method for adaptively acquiring the dark primary color value comprises the following specific operation steps: classifying the image pixels, and determining an optimal segmentation threshold value by maximizing the distance between the classified classes;
the first step, assuming that the image I has L gray levels, the number of the ith level pixels is n i The total pixel number is
Figure GDA0004198266610000112
The probability of occurrence of the ith pixel is p i =n i /N;
Second, for the set threshold k, dividing the image into two classes A and B, wherein the class A gray scale interval is [0, k]Class B gray scale interval is [ k+1, L-1 ]]The gray average value mu of the whole image and the gray average value mu of class A interval A (k) Class B interval gray scale average mu B (k) The method comprises the following steps of:
Figure GDA0004198266610000113
the probability distribution of the two types of gray intervals satisfies:
Figure GDA0004198266610000114
the inter-class variance when defining the threshold k as:
σ 2 (k)=p A [μ-μ A (k)] 2 +p B [μ-μ B (k)] 2 , (10)
according to the maximum inter-class variance criterion, changing the L-1 threshold k from 0 to find out the k value which makes the variance maximum in the above formula, namely the optimal segmentation threshold T; for each change of the threshold k, the above formulas are recalculated, and for reducing the time consumption of operation, a plurality of threshold points are firstly screened out according to the valley gray scale characteristics of the haze image histogram, and then substituted into the formulas, so that the rapid OSTU threshold segmentation is realized;
third, according to the gray level i and the pixel number n i Build L relation pairs [ i, n ] i ]Assume a curve i, n i ]The gray level at the upper position is T j When (when)The pixel number n j The gray level T is set to satisfy the following relation j Screening to be threshold points:
Figure GDA0004198266610000121
wherein: delta is the size of the screening window, taking delta = 3pixels; α is a minimum limiting ratio, taking α=0.1%;
fourth, the haze image shown in fig. 3 is subjected to threshold segmentation by using an improved rapid OSTU threshold method, and the results of screening the threshold points and segmenting the bright and dark areas are shown in fig. 4, so that it can be seen that: after screening, only 49 threshold points are left, and the number of the threshold points participating in calculation is reduced by more than 80%; meanwhile, the bright and dark areas are effectively separated, and the defogging treatment of the separated areas is facilitated;
fifth, according to formula (3), the minimum value of the RGB three channels of each pixel point is the dark primary color value, namely:
Figure GDA0004198266610000122
if the haze images with different concentrations adopt the above method for solving the dark primary color values, color distortion of a bright area can be caused; the minimum gray value of the bright area is higher than that of the dark area, if the dark primary color value is obtained by directly adopting the minimum value method, the transmittance is calculated inaccurately, and the three-channel gray average value is selected as the dark primary color value of the bright area, so that the actual situation can be reflected; for this purpose, the dark primary color minimum value is corrected by solving the dark primary color value using the following equation:
Figure GDA0004198266610000123
wherein: t (T) c Threshold is partitioned for c-channels, c ε { R, G, B }.
The method for adaptively estimating the atmospheric light intensity comprises the following specific operation steps: the atmospheric light intensity self-adaptive estimation is carried out by adopting a bright-dark zoning average value method, and when a bright zone existsDomain pixel number duty ratio P b c When the brightness is less than 10%, indicating that the bright areas are less, firstly taking the bright points of 0.1% in front of the dark primary color image, and then finding out the gray average value of the bright points corresponding to the pixel points in the original image as an atmospheric light intensity estimation value; when the pixel number of the bright area is P b c And when the gray level average value is more than or equal to 10%, indicating that the bright areas are more, taking the gray level average value of all the pixel points in the bright areas as an atmospheric light intensity estimated value, and adopting the following calculation formula:
Figure GDA0004198266610000131
wherein: n (N) b Is the number of pixels in the bright area.
The defogging coefficient adaptive calculation method comprises the following specific operation steps: the color gradation self-adaptive adjustment method is adopted for restoring the image J 0 By carrying out enhancement treatment and carrying out histogram statistics on haze images with different concentrations, the greater the haze concentration is, the more concentrated the histogram distribution is, and most gray values are concentrated in the size of [ m ] c ,M c ]By utilizing the property, a defogging coefficient calculation method based on gray level concentration is provided, and the following conditions are satisfied:
Figure GDA0004198266610000132
wherein: omega c Adjusting the coefficient to be the minimum value, taking the value omega c =0.15; upper and lower limits m c And M c The method meets the following conditions:
Figure GDA0004198266610000133
wherein: alpha is an upper limit and lower limit adjustment coefficient, and the value alpha=1%;
substituting the above formulas into the transmittance formula (6) correspondingly to obtain the transmittance of the bright and dark areas of the haze image; and then combining the formula (7) to obtain the restored image J 0
The image tone scale self-adaptive adjustment method comprises the following specific operation steps: according to the formula (16), the concentration degree interval [ m ] of the three channels of the haze image RGB is obtained c ,M c ]The mapping table is calculated using the following formula:
Figure GDA0004198266610000134
for the preliminary restored image J using the map generated by equation (17) 0 The tone scale adjustment is performed as follows:
J(x)=Map(J 0 (x)+1)。 (18)
the method for verifying the effectiveness of the adaptive image defogging method comprises the following steps: firstly, selecting 5 haze images with different concentrations and different areas of bright areas, such as forests, river sides, traffic, urban areas, suburban areas and the like as experimental objects, respectively carrying out defogging treatment by using a multi-scale Retinex enhanced defogging method, a He dark primary color priori restoration defogging method and a self-adaptive image defogging method, carrying out subjective and objective analysis on experimental results, and analyzing from subjective visual effects of defogged images as shown in fig. 5:
(1) In general, when the space-time bright area in the image is not considered, three algorithms can effectively defog, so that the image quality is improved; however, in a bright area and a bright-dark interface area, the multi-scale Retinex enhanced defogging method and the He dark primary color priori restoration defogging method have color distortion and halation phenomena, and the more serious the haze is, the more obvious the phenomenon is;
(2) Compared with the self-adaptive image defogging method and the multi-scale Retinex enhanced defogging method, the Retinex algorithm belongs to an image enhancement algorithm, so that the contrast of the image is greatly improved, the whole image looks unnatural, larger color deviation exists, and the defogging effect is poorer along with the increase of haze concentration.
(3) Comparing the effect of the self-adaptive image defogging method and the effect of the He dark primary prior restoration defogging method, when the sky bright area is not more and the haze is smaller in the image, the two algorithm effects are equivalent, and even the He dark primary prior restoration defogging method is slightly better than the self-adaptive image defogging method, such as the defogging effect of the first forest mist scene in fig. 5; however, as the bright area in the image increases and the haze concentration increases, the adaptive image defogging method has gradually obvious advantages, and the He dark primary prior restoration defogging method has larger textures and blocking phenomena in the sky bright area, such as defogging effects of urban areas and suburban scenes under the fourth and fifth severe haze in fig. 5;
in order to objectively analyze defogging effects, the invention adopts information entropy (Information entropy), mean Square Error (MSE) and Laplacian (Laplacian) as indexes to quantitatively analyze defogging results; the information entropy H is a measure of the information amount of an image, and the larger the value is, the more the information amount is described, and the definition formula is:
Figure GDA0004198266610000151
the mean square error sigma reflects the image contrast, and the larger the value is, the more obvious the black-and-white contrast is, and the definition formula is:
Figure GDA0004198266610000152
wherein: n (N) 1 And N 2 Respectively the number of rows and columns of the image, n=n 1 ×N 2 The method comprises the steps of carrying out a first treatment on the surface of the Mu is the gray average value of the image;
the laplace operator LS reflects the gray level change of the pixel neighborhood, and the larger the value is, the clearer the image is, the more vivid the image contour is, and the definition formula is:
Figure GDA0004198266610000153
the objective evaluation of defogging effect is shown in fig. 6, and analyzed as follows:
in general, the information entropy, the mean square error and the Laplacian of the self-adaptive image defogging method are mostly higher than those of a multi-scale Retinex enhanced defogging method and a He dark primary prior restoration defogging method, so that the defogging image obtained by the self-adaptive image defogging method has more information and is clearer;
comparing the effect of the self-adaptive image defogging method and the effect of the multi-scale Retinex enhanced defogging method, in 5 evaluated images, the self-adaptive image defogging method is equivalent to the effect of the multi-scale Retinex enhanced defogging method, wherein 4 information entropy values, 4 mean square values and 2 Laplacian operator values are slightly higher than those of the multi-scale Retinex enhanced defogging method, and the self-adaptive image defogging method is superior to the multi-scale Retinex enhanced defogging method;
compared with the effect of the adaptive image defogging method and the He dark primary prior restoration defogging method, the adaptive image defogging method has other indexes higher than the He dark primary prior restoration defogging method except that the Laplacian algorithm value is equivalent to the Laplacian algorithm value of the forest mist image, so that the effectiveness of the adaptive algorithm is illustrated;
the method has the advantages that the subjective and objective evaluation effect is integrated, various defogging parameters of the multi-scale Retinex enhanced defogging method and the He dark primary prior restoration defogging method are required to be subjectively determined, and various parameters in the self-adaptive image defogging method are acquired in a self-adaptive mode and are influenced by the bright and dark areas and the haze concentration of the image, so that the self-adaptive image defogging method has better robustness in the aspects of defogging of multi-concentration and multi-scene haze images.
According to the adaptive image defogging method based on dark primary color priori improvement, a fast OSTU method is used for dividing a bright and dark region of a haze image, obtaining a dark primary color value of the bright and dark region in the divided region, and carrying out adaptive estimation on atmospheric light intensity values of different regions; according to the characteristics of the haze image histogram, a gray level concentration method is adopted to calculate a defogging coefficient; performing enhancement treatment on the primarily restored image by adopting a color level self-adaptive adjustment method so as to restore the original color of the haze image as much as possible; the subjective and objective evaluation results show that: the defogging image information obtained by the self-adaptive image defogging method has the advantages of large information quantity, high contrast, clear image, natural color and no halation phenomenon, and is obviously superior to a multi-scale Retinex enhanced defogging method and a He dark primary color priori restoration defogging method.
The above embodiments are merely preferred embodiments of the present invention, and all changes and modifications that come within the meaning and range of equivalency of the structures, features and principles of the invention are therefore intended to be embraced therein.

Claims (2)

1. A self-adaptive image defogging method based on dark primary prior improvement comprises a self-adaptive image defogging method based on a haze image degradation model and a dark primary prior model; the method is characterized in that: the adaptive image defogging method comprises a dark primary color value adaptive acquisition method, an atmosphere light intensity adaptive estimation method, a defogging coefficient adaptive calculation method and an image color level adaptive adjustment method which are used for realizing parameter acquisition or data processing in an adaptive manner;
the self-adaptive acquisition method of the dark primary color value is to carry out self-adaptive segmentation on a bright and dark area of a haze image by utilizing a rapid OSTU algorithm, and acquire the dark primary color value of the bright and dark area in the segmented area;
the adaptive estimation method of the atmospheric light intensity is to carry out adaptive estimation on the atmospheric light intensity of a bright and dark area according to the distribution condition of the bright area;
the adaptive defogging coefficient calculating method is to provide adaptive defogging coefficient calculation by adopting a gray level concentration method through statistics of the characteristics of the fog image histogram;
the image color level self-adaptive adjustment method is to use the color level self-adaptive adjustment method to adjust the color of the output image;
the haze-based image degradation model is as follows
I(x)=J(x)t(x)+A[1-t(x)], (1)
Wherein: i (x) is the haze image intensity observed by the imaging equipment; j (x) is the fog-free image intensity, namely the image to be restored; t (x) is transmittance and reflects the haze penetration ability of light; a is the atmospheric light intensity at infinity; the reflected light of the target corresponding to J (x) t (x) enters the part of the imaging equipment after being attenuated by atmospheric scattering, and the part is attenuated exponentially with the increase of the depth of the scene; a1-t (x) ] corresponds to the part of the atmospheric light entering the imaging device after scattering, and the part increases with the increase of the scene depth, so that scene blurring and color shift distortion can be caused;
the term of the formula (1) is shifted and arranged, and the haze-free image intensity is expressed as
Figure QLYQS_1
In the above formulas, only I (x) is a known term, and the essence of image defogging is to restore a clear image J (x) by estimating the transmittance t (x) and the atmospheric light intensity a according to the above model;
the dark primary color prior model is a dark primary color prior rule counted by a haze removal method according to He dark primary color prior restoration, and is expressed on an image, namely, dark pixel points exist at each position of a haze-free image, and the dark pixel points are the dark primary colors J dark The gray values of the dark primary color points tend to be 0, which satisfies
Figure QLYQS_2
Wherein: superscript c denotes the RGB channels of the image; y ε Ω (x) represents a window centered on pixel x;
assuming that the known atmospheric light intensity A and the transmittance t (x) in the window omega (x) are constants, the method can be obtained by arranging the formula (1) and performing two minimum operations:
Figure QLYQS_3
the estimated value of the obtainable transmittance is given by the simultaneous formulas (3) and (4)
Figure QLYQS_4
Considering the visual haziness of people observing distant scenes in real life, introducing a defogging coefficient omega (0 is more than omega and less than or equal to 1), and correcting the above formula to be
Figure QLYQS_5
Wherein: the smaller the omega value is, the more fog components are in the restored image, the weaker the defogging capability is, but the smaller the value is, and the purpose of defogging is approaching to 0; the closer the omega value is to 1, the stronger the defogging capability is, but the oversaturation of the image color is caused, and the sense of reality is lacking;
the method for estimating the atmospheric light intensity A comprises the following steps: firstly, obtaining pixels with maximum brightness of 0.1% in dark primary colors of an image, and then using the maximum value of the pixels corresponding to the pixels in the original image as an estimated value of A;
the estimated transmittance t (x) and the atmospheric light intensity A in the formula (2) can be used for obtaining a haze-free image, and in actual calculation, in order to avoid image distortion caused by too small transmittance, a lower transmittance limit t is usually set 0 The haze-free image is
Figure QLYQS_6
The method for adaptively acquiring the dark primary color value comprises the following specific operation steps: classifying the image pixels, and determining an optimal segmentation threshold value by maximizing the distance between the classified classes;
the first step, assuming that the image I has L gray levels, the number of the ith level pixels is n i The total pixel number is
Figure QLYQS_7
The probability of occurrence of the ith pixel is p i =n i /N;
Second, for the set threshold k, dividing the image into two classes A and B, wherein the class A gray scale interval is [0, k]Class B gray scale interval is [ k+1, L-1 ]]The gray average value mu of the whole image and the gray average value mu of class A interval A (k) Class B interval gray scale average mu B (k) The method comprises the following steps of:
Figure QLYQS_8
the probability distribution of the two types of gray intervals satisfies:
Figure QLYQS_9
the inter-class variance when defining the threshold k as:
σ 2 (k)=p A [μ-μ A (k)] 2 +p B [μ-μ B (k)] 2 , (10)
according to the maximum inter-class variance criterion, changing the L-1 threshold k from 0 to find out the k value which makes the variance maximum in the above formula, namely the optimal segmentation threshold T; for each change of the threshold k, the above formulas are recalculated, and for reducing the time consumption of operation, a plurality of threshold points are firstly screened out according to the valley gray scale characteristics of the haze image histogram, and then substituted into the formulas, so that the rapid OSTU threshold segmentation is realized;
third, according to the gray level i and the pixel number n i Build L relation pairs [ i, n ] i ]Assume a curve i, n i ]The gray level at the upper position is T j When the pixel number n is j The gray level T is set to satisfy the following relation j Screening to be threshold points:
Figure QLYQS_10
wherein: delta is the size of the screening window, taking delta = 3pixels; α is a minimum limiting ratio, taking α=0.1%;
fourthly, performing threshold segmentation on the haze image by using an improved rapid OSTU threshold method, and according to the threshold point screening and bright and dark region segmentation results, the method can be seen: after screening, only 49 threshold points are left, and the number of the threshold points participating in calculation is reduced by more than 80%; meanwhile, the bright and dark areas are effectively separated, and the defogging treatment of the separated areas is facilitated;
fifth, according to formula (3), the minimum value of the RGB three channels of each pixel point is the dark primary color value, namely:
Figure QLYQS_11
if the haze images with different concentrations adopt the above method for solving the dark primary color values, color distortion of a bright area can be caused; the minimum gray value of the bright area is higher than that of the dark area, if the dark primary color value is obtained by directly adopting the minimum value method, the transmittance is calculated inaccurately, and the three-channel gray average value is selected as the dark primary color value of the bright area, so that the actual situation can be reflected; for this purpose, the dark primary color minimum value is corrected by solving the dark primary color value using the following equation:
Figure QLYQS_12
wherein: t (T) c Dividing a threshold value for a c channel, c epsilon { R, G, B };
the method for adaptively estimating the atmospheric light intensity comprises the following specific operation steps: the atmospheric light intensity self-adaptive estimation is carried out by adopting a bright and dark division area mean value method, and when the pixel number of the bright area is equal to the duty ratio P b c When the brightness is less than 10%, indicating that the bright areas are less, firstly taking the bright points of 0.1% in front of the dark primary color image, and then finding out the gray average value of the bright points corresponding to the pixel points in the original image as an atmospheric light intensity estimation value; when the pixel number of the bright area is P b c And when the gray level average value is more than or equal to 10%, indicating that the bright areas are more, taking the gray level average value of all the pixel points in the bright areas as an atmospheric light intensity estimated value, and adopting the following calculation formula:
Figure QLYQS_13
wherein: n (N) b The number of pixel points in a bright area;
the defogging coefficient adaptive calculation method comprises the following specific operation steps: the color gradation self-adaptive adjustment method is adopted for restoring the image J 0 Enhancement treatment is carried out by fog with different concentrationsThe haze images are subjected to histogram statistics, and the haze concentration is larger, the histogram distribution is more concentrated, and most gray values are concentrated in the size of [ m ] c ,M c ]By utilizing the property, a defogging coefficient calculation method based on gray level concentration is provided, and the following conditions are satisfied:
Figure QLYQS_14
wherein: omega c Adjusting the coefficient to be the minimum value, taking the value omega c =0.15; upper and lower limits m c And M c The method meets the following conditions:
Figure QLYQS_15
wherein: alpha is an upper limit and lower limit adjustment coefficient, and the value alpha=1%;
substituting the above formulas into the transmittance formula (6) correspondingly to obtain the transmittance of the bright and dark areas of the haze image; and then combining the formula (7) to obtain the restored image J 0
The image tone scale self-adaptive adjustment method comprises the following specific operation steps: according to the formula (16), the concentration degree interval [ m ] of the three channels of the haze image RGB is obtained c ,M c ]The mapping table is calculated using the following formula:
Figure QLYQS_16
for the preliminary restored image J using the map generated by equation (17) 0 The tone scale adjustment is performed as follows:
J(x)=Map(J 0 (x)+1) (18)。
2. the adaptive image defogging method based on dark primary prior improvement according to claim 1, wherein: the method for verifying the effectiveness of the adaptive image defogging method comprises the following steps: firstly, 5 haze images with different concentrations, such as forests, river sides, traffic, urban areas, suburbs and the like and different areas of bright areas are selected as experimental objects, defogging treatment is carried out by respectively utilizing a multi-scale Retinex enhanced defogging method, a He dark primary color priori restoration defogging method and a self-adaptive image defogging method, and subjective and objective analysis is carried out on experimental results.
CN201910177949.1A 2019-03-11 2019-03-11 Adaptive image defogging method based on dark primary color priori improvement Active CN110349113B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910177949.1A CN110349113B (en) 2019-03-11 2019-03-11 Adaptive image defogging method based on dark primary color priori improvement

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910177949.1A CN110349113B (en) 2019-03-11 2019-03-11 Adaptive image defogging method based on dark primary color priori improvement

Publications (2)

Publication Number Publication Date
CN110349113A CN110349113A (en) 2019-10-18
CN110349113B true CN110349113B (en) 2023-06-27

Family

ID=68174217

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910177949.1A Active CN110349113B (en) 2019-03-11 2019-03-11 Adaptive image defogging method based on dark primary color priori improvement

Country Status (1)

Country Link
CN (1) CN110349113B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112446841B (en) * 2020-12-14 2022-05-31 中国科学院长春光学精密机械与物理研究所 Self-adaptive image recovery method
CN112785521A (en) * 2021-01-19 2021-05-11 澜途集思生态科技集团有限公司 Remote sensing image processing method under haze condition
CN117952864A (en) * 2024-03-20 2024-04-30 中国科学院西安光学精密机械研究所 Image defogging method based on region segmentation, storage medium and terminal equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105787904A (en) * 2016-03-25 2016-07-20 桂林航天工业学院 Adaptive global dark channel prior image dehazing method for bright area
CN107767354A (en) * 2017-12-08 2018-03-06 福州大学 A kind of image defogging algorithm based on dark primary priori
CN108765336A (en) * 2018-05-25 2018-11-06 长安大学 Image defogging method based on dark bright primary colors priori with auto-adaptive parameter optimization

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9478016B2 (en) * 2014-09-16 2016-10-25 National Taipei University Of Technology Image restoration method and image processing apparatus using the same

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105787904A (en) * 2016-03-25 2016-07-20 桂林航天工业学院 Adaptive global dark channel prior image dehazing method for bright area
CN107767354A (en) * 2017-12-08 2018-03-06 福州大学 A kind of image defogging algorithm based on dark primary priori
CN108765336A (en) * 2018-05-25 2018-11-06 长安大学 Image defogging method based on dark bright primary colors priori with auto-adaptive parameter optimization

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
基于改进暗通道先验的交通图像去雾新方法;王泽胜;《控制与决策》;20180330;第486-490页 *
基于高亮区域自适应处理的监控图像去雾算法;李云峰;《计算机应用与软件》;20180830;第209-214页 *
针对明亮区域的自适应全局暗原色先验去雾;邓莉;《光学精密工程》;20160430;第892-900页 *

Also Published As

Publication number Publication date
CN110349113A (en) 2019-10-18

Similar Documents

Publication Publication Date Title
CN107103591B (en) Single image defogging method based on image haze concentration estimation
CN107767353A (en) A kind of adapting to image defogging method based on definition evaluation
CN108389175B (en) Image defogging method integrating variation function and color attenuation prior
Gao et al. Sand-dust image restoration based on reversing the blue channel prior
CN110349113B (en) Adaptive image defogging method based on dark primary color priori improvement
CN110288550B (en) Single-image defogging method for generating countermeasure network based on priori knowledge guiding condition
CN109785262A (en) Image defogging method based on dark channel prior and adaptive histogram equalization
CN105913390B (en) A kind of image defogging method and system
CN111598791B (en) Image defogging method based on improved dynamic atmospheric scattering coefficient function
CN108133462B (en) Single image restoration method based on gradient field region segmentation
CN111598814B (en) Single image defogging method based on extreme scattering channel
CN111861896A (en) UUV-oriented underwater image color compensation and recovery method
CN105447825A (en) Image defogging method and system
CN105023246B (en) A kind of image enchancing method based on contrast and structural similarity
CN109949239B (en) Self-adaptive sharpening method suitable for multi-concentration multi-scene haze image
CN111598800A (en) Single image defogging method based on space domain homomorphic filtering and dark channel prior
CN105913391B (en) A kind of defogging method can be changed Morphological Reconstruction based on shape
Khan et al. Recent advancement in haze removal approaches
CN112419163A (en) Single image weak supervision defogging method based on priori knowledge and deep learning
CN108765337B (en) Single color image defogging processing method based on dark channel prior and non-local MTV model
CN112907461A (en) Defogging and enhancing method for infrared degraded image in foggy day
Xie et al. Image defogging method combining light field depth estimation and dark channel
CN115937019A (en) Non-uniform defogging method combining LSD (local Scale decomposition) quadratic segmentation and deep learning
Negru et al. Exponential image enhancement in daytime fog conditions
CN114549343A (en) Defogging method based on dual-branch residual error feature fusion

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
GR01 Patent grant
GR01 Patent grant