An image dehazing method based on information entropy to quickly determine homomorphic filtering parameters
By quickly determining homomorphic filtering parameters based on information entropy, the problem of inaccurate value of homomorphic filtering parameters in the prior art is solved, and efficient and accurate fog image defog processing is achieved, which significantly improves image quality.
Patent Information
- Application Number
- CN202310367950.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-07
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2043-04-07
AI Technical Summary
In the existing homomorphic filtering, in the fog removal process of fog pattern image, the empirical value of the inclined sharpening parameters and cutoff frequency parameters is inaccurate, resulting in unstable fog removal effect and it is difficult to efficiently and accurately remove the impact of haze.
The homomorphic filtering parameters are quickly determined by using a method based on information entropy. By calculating the information entropy after the combination of different parameters, a three-dimensional spatial image is established, the information entropy peak curve is determined, and the projection line of the inclined sharpening parameters and cutoff frequency parameters is obtained, and an oblique sharp cutoff model is established for optimization of defog treatment.
It realizes the rapid and accurate determination of homomorphic filtering parameters, significantly improving the processing effect of fog image defog, ensuring that the image information entropy after fog removal is at a high value, and improving image quality.
Smart Images

Figure CN116385303B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of digital image processing, in particular to an image defogging method based on information entropy to quickly determine homomorphic filtering parameters in defogging processing of foggy images. Background Art
[0002] At present, the computer vision industry is booming. Fields such as autonomous driving, aerospace photography, and urban brain all require the cooperation of computer vision. Computer vision is similar to the human eye. The former mainly perceives the images obtained by photographic equipment to achieve the effect of human vision. Therefore, the quality of the image will directly affect the application effect of the computer vision system. Generally, the quality of the image is closely related to the imaging device and the external environment. The imaging device is easy to control the quality of the image, but the impact of the external environment on the image quality is difficult to control. Therefore, digital image processing technology methods are needed to improve the quality of the image. At present, the frequent occurrence of haze weather has greatly affected the quality of the acquired images, and its occlusion has caused serious loss of image details. Therefore, it is of great practical significance to process foggy images.
[0003] At present, the rapid defogging of foggy images mainly adopts the defogging method based on physical model and the defogging method based on image enhancement. The two major methods have a tendency to merge with each other, and the two methods are usually connected in the form of filtering. Homomorphic filtering is widely used because it can retain the original appearance of the image to a large extent and enhance the details. Homomorphic filtering involves the empirical value setting problem of multiple parameters during use, and the empirical value setting is often difficult to quickly and effectively guarantee the image effect after defogging. In particular, facing the defogging processing of a large number of foggy images, the existing homomorphic filtering processing technology methods are difficult to ensure that the foggy images are efficiently and accurately defogged. Therefore, the present invention performs defogging processing on images that are foggy due to the influence of haze weather, and adopts an image defogging method based on information entropy to quickly determine the parameters of homomorphic filtering, efficiently and accurately perform parameter setting and defogging of the homomorphic filtering model, and obtain a defogging image with obvious effect. Summary of the invention
[0004] The purpose of the present invention is to provide an image defogging method for quickly determining homomorphic filtering parameters based on information entropy, so as to overcome the defect that the inaccurate empirical determination of bevel sharpening parameters and cutoff frequency parameters during the use of homomorphic filtering leads to unstable filtering effect, quickly determine the parameters, and make the information entropy of the filtered image at a higher value, thereby significantly improving the processing effect of image defogging.
[0005] The technical solution of the present invention is as follows:
[0006] An image defogging method for quickly determining homomorphic filtering parameters based on information entropy comprises the following steps:
[0007] 1) A single foggy image is subjected to filtering and defogging by homomorphic filtering, where the high-frequency gain and low-frequency gain in the transfer function of homomorphic filtering are fixed, the slope sharpening parameter and the cutoff frequency parameter are variable, and the information entropy of the image obtained by processing with different parameter combinations is calculated;
[0008] When filtering the fog image, set the high-frequency gain, generally a value greater than 1; set the low-frequency gain, generally a positive value less than 1. The bevel sharpening parameters and the cutoff frequency parameters are sampled at a certain interval and brought into the homomorphic filtering for calculation, and the information entropy of the output images of different fog images is calculated. The bevel sharpening parameters and the cutoff frequency parameters can be sampled at either equal intervals or unequal intervals. The larger the sampling range and the smaller the sampling interval, the more accurate the relationship between the obtained bevel sharpening parameters, the cutoff frequency parameters and the corresponding information entropy.
[0009] 2) According to the bevel sharpening parameters, the cutoff frequency parameters and the corresponding information entropy, a three-dimensional spatial image of the three is established, wherein the bevel sharpening parameters and the cutoff frequency parameters construct a two-dimensional plane, and the information entropy is used as a one-dimensional vertical plane;
[0010] 3) Determine the vertical information entropy peak curve based on the three-dimensional space image constructed according to different slope sharpening parameters, cutoff frequency parameters and corresponding information entropy;
[0011] According to the characteristic that the output image has the maximum information entropy when the dehazing effect of the fog image is optimal, the maximum information entropy and its corresponding slope sharpening parameters and cutoff frequency parameters can be screened.
[0012] 4) Projecting the information entropy peak curve onto a two-dimensional plane to obtain the projection line of the slope sharpening parameter and the cutoff frequency parameter;
[0013] 5) Processing multiple fog images according to 1) to 4) to obtain projection lines of different fog image bevel sharpening parameters and cutoff frequency parameters;
[0014] 6) partitioning the projection lines, performing polynomial fitting on the clustered projection lines of each partition, and establishing an oblique sharp cutoff frequency model of the oblique sharpening parameter and the cutoff frequency parameter based on information entropy, wherein the oblique sharp cutoff frequency model is one of a model in which the oblique sharpening parameter is used as an independent variable to express the cutoff frequency parameter as a dependent variable, and a model in which the cutoff frequency parameter is used as an independent variable to express the oblique sharpening parameter as a dependent variable;
[0015] 7) Determine the polynomial fitting model according to the fitting accuracy and use it as the optimal oblique sharp cutoff frequency model;
[0016] 8) The optimal oblique sharp cutoff frequency model determined by each partition is respectively used, and the independent variables in the optimal oblique sharp cutoff frequency model are arbitrarily given, the dependent variables are calculated, and the foggy image to be processed is defogged using homomorphic filtering, and the defogged image with the best quality is selected as the final defogged image.
[0017] Preferably, the homomorphic filtering is one of Gaussian homomorphic filtering, Butterworth homomorphic filtering and exponential homomorphic filtering.
[0018] Preferably, the bevel sharpening parameter and the cutoff frequency parameter are varied in that the bevel sharpening parameter is varied point by point at intervals g within a certain range a, and the cutoff frequency parameter is varied point by point at intervals h within a certain range b.
[0019] Preferably, the interval g is one of equal interval and unequal interval, and the interval h is one of equal interval and unequal interval.
[0020] Preferably, the model coefficient calculation of the polynomial fitting can adopt one of the least squares method, the orthogonal least squares method and the overall least squares method.
[0021] Preferably, the fitting accuracy is one of mean absolute error, mean error, and variance.
[0022] Compared with the prior art, the present invention has the following advantages:
[0023] In the process of using homomorphic filtering to dehaze fog images, the uncertainty of image dehazing effect caused by the use of empirical values for bevel sharpening parameters and cutoff frequency parameters in existing methods, as well as the low efficiency of image dehazing processing caused by the use of enumeration method for empirical values, are avoided. The parameters of homomorphic filtering transfer function can be determined quickly, foggy images can be processed in batches efficiently, and better dehazing effect can be obtained. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0025] Figure 1 The figure is a schematic diagram of the overall process of an embodiment of the present invention.
[0026] Figure 2 The figure is a schematic diagram of a process of generating projection lines of bevel sharpening parameters and cutoff frequency parameters for a single fog image according to an embodiment of the present invention.
[0027] Figure 3A schematic diagram of a process for generating an optimal oblique sharp cutoff frequency model for multiple fog images according to an embodiment of the present invention.
[0028] Figure 4 This is a schematic diagram of the correlation between the bevel sharpening parameters and the cutoff frequency parameters in the process of defogging multiple foggy images according to an embodiment of the present invention.
[0029] Figure 5 It is a schematic diagram of a three-dimensional space image constructed by different bevel sharpening parameters, cutoff frequency parameters and corresponding information entropy in the defogging process of multiple foggy images in an embodiment of the present invention, as well as a side schematic diagram with the bevel sharpening parameter as the horizontal axis and the information entropy as the vertical axis.
[0030] Figure 6 It is a schematic diagram of projection lines of bevel sharpening parameters and cutoff frequency parameters of multiple fog images according to an embodiment of the present invention.
[0031] Figure 7 Schematic diagram of a curve of an optimal oblique sharp cutoff frequency model for multiple fog images according to an embodiment of the present invention.
[0032] exist Figure 4 In the figure, the horizontal axis is the bevel sharpening parameter, and the vertical axis is the cutoff frequency parameter. The colors in the figure change from light to dark, reflecting the change of information entropy from low to high. The lightest color is white, which is the lowest information entropy of the cutoff, and its value is equal to the information entropy of the original image. The darkest color is the maximum information entropy value of the dehazed image.
[0033] exist Figure 5 In the figure, the left image is a three-dimensional image constructed by the bevel sharpening parameter, the cutoff frequency parameter and the corresponding information entropy, and the right image is a side view of the horizontal coordinate of the bevel sharpening parameter and the vertical coordinate of the information entropy. The information entropy changes from light to dark from low to high.
[0034] exist Figure 6 In the figure, the projection lines of the slope sharpening parameters and cutoff frequency parameters of multiple fog images are divided into three regions.
[0035] exist Figure 7 In the paper, after the projection line is divided into three regions, the optimal oblique sharp cutoff frequency model of each region is obtained by polynomial fitting. DETAILED DESCRIPTION
[0036] The present invention is further described below in conjunction with the accompanying drawings and embodiments. It should be noted that, in the absence of conflict, the embodiments in this application and the technical features in the embodiments can be combined with each other. Unless otherwise defined, the technical terms or scientific terms used in the disclosure of the present invention should be the usual meanings understood by people with ordinary skills in the field to which the disclosure belongs. The words "including" or "comprising" and the like used in the disclosure of the present invention mean that the elements or objects appearing before the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects.
[0037] An image defogging method for quickly determining homomorphic filtering parameters based on information entropy comprises the following steps:
[0038] 1) A single foggy image is subjected to filtering and dehazing processing by homomorphic filtering. In the transfer function of homomorphic filtering, the high-frequency gain and low-frequency gain are fixed, the slope sharpening parameter and the cutoff frequency parameter are variable, and the information entropy of the image obtained by processing with different parameter combinations is calculated.
[0039] The homomorphic filtering is one of Gaussian homomorphic filtering, Butterworth homomorphic filtering, and exponential homomorphic filtering.
[0040] In a specific embodiment, Gaussian homomorphic filtering is used to process the fog image. The equation of Gaussian homomorphic filtering is expressed as follows:
[0041]
[0042] Where H(u,v) is the value of the homomorphic filtering function; (u,v) represents the position of the image pixel; γ H is the high frequency gain; γ L is the low frequency gain; D 2 (u,v) is the square of the Euclidean distance from the pixel at (u,v) to the center of the image; C is the slope sharpening parameter; D 0 is the cutoff frequency parameter.
[0043] When filtering the fog image, the high-frequency gain can be set to a value greater than 1, and the low-frequency gain can be set to a positive value less than 1.
[0044] In a specific embodiment, the high frequency gain is set to 2 and the low frequency gain is set to 0.5.
[0045] The slope sharpening parameter and the cutoff frequency parameter change values are that the slope sharpening parameter is valued point by point at intervals g within a certain range a, and the cutoff frequency parameter is valued point by point at intervals h within a certain range b. The interval g is one of equal spacing and unequal spacing, and the interval h is one of equal spacing and unequal spacing.
[0046] After taking values of the bevel sharpening parameters and cutoff frequency parameters according to the set range and spacing, the two combinations are brought into the homomorphic filtering for calculation, the processed fog image is output, and the information entropy is calculated. The larger the sampling range and the smaller the sampling spacing, the more accurate the relationship between the obtained bevel sharpening parameters, cutoff frequency parameters and corresponding information entropy, and the clearer the obtained three-dimensional space image.
[0047] In a specific embodiment, the certain range a is [0,80], and the interval g is 0.1. The certain range b is [0,50], and the interval h is 0.1. Starting from 0, with a spacing of 0.1, the bevel sharpening parameter and the cutoff frequency parameter are respectively taken, and each fog image has 501×801 combinations of the two parameters.
[0048] In another specific embodiment, the certain range a is [0, 80], the interval g is 0.1 and 0.05 used alternately, and the certain range b is [0, 50], the interval h is 0.05 and 0.1 used alternately.
[0049] Substitute each combination of bevel sharpening parameters and cutoff frequency parameters into equation (1) to obtain the corresponding processed images of a single image of 501×801. Calculate the information entropy of the processed image. The information entropy solution equation is as follows:
[0050]
[0051]
[0052] In the formula, H Gray is the information entropy of the grayscale image; H is the information entropy of the color image; p(i) is the frequency of the i pixel appearing in the image; Grayx(x∈{R,G,B}) represents the RGB layer corresponding to the image.
[0053] According to equations (2) and (3), the information entropy of a single fog image corresponding to 501×801 processed images can be calculated.
[0054] 2) According to the bevel sharpening parameters, cutoff frequency parameters and corresponding information entropy, a three-dimensional spatial image of the three is established, wherein the bevel sharpening parameters and cutoff frequency parameters construct a two-dimensional plane, and the information entropy is used as a one-dimensional vertical plane. Figure 5 As shown in the figure on the left.
[0055] 3) According to the three-dimensional space image constructed by different slope sharpening parameters, cutoff frequency parameters and corresponding information entropy, determine the vertical information entropy peak curve. Figure 5 As shown in the figure on the right.
[0056] 4) The information entropy peak curve is projected onto a two-dimensional plane to obtain the projection lines of the slope sharpening parameters and the cutoff frequency parameters.
[0057] 5) Process multiple fog images according to 1)-4) to obtain projection lines of different fog image bevel sharpening parameters and cutoff frequency parameters.
[0058] In a specific embodiment, 40 fog images are selected for modeling. The fog images should contain as many scenes as possible, such as the sky, rivers, lakes, mountains, etc., to ensure the accuracy of modeling.
[0059] The 40 fog images are processed according to 1)-4) to obtain the projection lines of different fog image bevel sharpening parameters and cutoff frequency parameters, and the projection lines will be displayed in clusters, see Figure 6 shown.
[0060] 6) The projection lines are partitioned, and polynomial fitting is performed on the clustered projection lines of each partition to establish a slope sharpening parameter and a cutoff frequency parameter based on information entropy.
[0061] The oblique sharp cutoff frequency model is one of a model in which an oblique surface sharpening parameter is used as an independent variable to express a cutoff frequency parameter as a dependent variable and a model in which a cutoff frequency parameter is used as an independent variable to express an oblique surface sharpening parameter as a dependent variable.
[0062] The polynomial fitting model may adopt one or more of a 2nd order polynomial, a 3rd order polynomial, a 4th order polynomial, a 5th order polynomial, a 6th order polynomial, a 7th order polynomial, an 8th order polynomial, a 9th order polynomial, and a 10th order polynomial.
[0063] The model coefficient calculation of the polynomial fitting can adopt one of the least squares method, the orthogonal least squares method and the overall least squares method.
[0064] In a specific embodiment, the slope sharpening parameter is used as an independent variable and the cutoff frequency parameter is used as a dependent variable to construct a polynomial in which the slope sharpening parameter represents the cutoff frequency parameter. A 2nd to 10th order polynomial is used for fitting. For example, the formula for fitting a 3rd order polynomial is as follows:
[0065] D 0 =A 0 +A 1 C+A 2 C 2 +A 3 C 3 (4)
[0066] In the formula, A 0 , A 1 , A 2 , A 3 are the polynomial coefficients.
[0067] The clustered projection lines of each partition are fitted with polynomials of order 2 to 10. The partial derivatives of the n (n = 2, 3, L, 10) order polynomials are calculated for the estimated coefficients, and the rearranged equation is:
[0068]
[0069] Where m is the projection line of a certain partition cluster C i and D 0i The number of points combined.
[0070] According to formula (5), the least square method is used to solve the coefficients of n (n = 2, 3, L, 10) order polynomials.
[0071] 7) Determine the polynomial fitting model according to the fitting accuracy and use it as the optimal oblique sharp cutoff frequency model.
[0072] The fitting accuracy is one of mean absolute error, mean error, and variance.
[0073] In a specific embodiment, the mean error of each fitting curve is calculated, and the formula of the mean error is as follows:
[0074]
[0075] Where D 0i is the value on the projection line; is the value obtained by fitting.
[0076] The fitting accuracy results of polynomials of different orders are shown in Table 1.
[0077] Table 1
[0078]
[0079] From Table 1, we can determine the model with the highest accuracy as the optimal oblique sharp cutoff frequency model based on the relationship between the order of the polynomial fitting model and the mean error.
[0080] from Figure 6 It can be seen that the clustered projection lines present three partitions: upper, middle and lower. Table 2 shows the coefficients of the optimal oblique sharp cutoff frequency model for the three partitions, and the corresponding fitting curves are shown in Figure 7 shown.
[0081] Table 2
[0082]
[0083] 8) The optimal oblique sharp cutoff frequency model determined by each partition is respectively used, and the independent variables in the optimal oblique sharp cutoff frequency model are arbitrarily given, the dependent variables are calculated, and the foggy image to be processed is defogged using homomorphic filtering, and the defogged image with the best quality is selected as the final defogged image.
[0084] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment as above, it is not used to limit the present invention. Any technician familiar with this profession can make some changes or modify the technical contents disclosed above into equivalent embodiments without departing from the scope of the technical solution of the present invention. However, any simple modification, equivalent change and modification made to the above embodiments according to the technical essence of the present invention without departing from the content of the technical solution of the present invention still fall within the scope of the technical solution of the present invention.
Claims
1. An image dehazing method for quickly determining homomorphic filtering parameters based on information entropy, characterized in that: The following steps are involved: 1) A single foggy image is subjected to filtering and dehazing processing by homomorphic filtering. In the transfer function of homomorphic filtering, the high-frequency gain and low-frequency gain are fixed, the slope sharpening parameter and the cutoff frequency parameter are variable, and the information entropy of the image obtained by processing with different parameter combinations is calculated; 2) According to the bevel sharpening parameters, cutoff frequency parameters and corresponding information entropy, a three-dimensional spatial image of the three is established, wherein the bevel sharpening parameters and cutoff frequency parameters construct a two-dimensional plane, and the information entropy is used as a one-dimensional vertical plane; 3) Determine the vertical information entropy peak curve based on the three-dimensional space image constructed by different slope sharpening parameters, cutoff frequency parameters and corresponding information entropy; 4) Project the information entropy peak curve onto a two-dimensional plane to obtain the projection line of the slope sharpening parameter and the cutoff frequency parameter; 5) Process multiple fog images according to 1) to 4) to obtain projection lines of different fog image bevel sharpening parameters and cutoff frequency parameters; 6) Partition the projection lines, perform polynomial fitting on the clustered projection lines of each partition, and establish a slope sharp cutoff frequency model based on the slope sharpening parameters and cutoff frequency parameters of the information entropy; 7) Determine the polynomial fitting model according to the fitting accuracy and use it as the optimal oblique sharp cutoff frequency model; 8) The optimal oblique sharp cutoff frequency model determined by each partition is used respectively, and the independent variables in the optimal oblique sharp cutoff frequency model are arbitrarily given, and the dependent variables are calculated. The homomorphic filtering is used to defog the foggy image to be processed, and the defogged image with the best quality is selected as the final defogged image.
2. According to claim 1, the image defogging method for quickly determining homomorphic filtering parameters based on information entropy is characterized in that: The homomorphic filtering is one of Gaussian homomorphic filtering, Butterworth homomorphic filtering, and exponential homomorphic filtering.
3. The image defogging method for quickly determining homomorphic filtering parameters based on information entropy according to claim 1, characterized in that: The variable values of the bevel sharpening parameter and the cutoff frequency parameter are that the bevel sharpening parameter is valued point by point at intervals g within a certain range a, and the cutoff frequency parameter is valued point by point at intervals h within a certain range b.
4. The image defogging method for quickly determining homomorphic filtering parameters based on information entropy according to claim 3 is characterized in that: The interval g is either an equal interval or an unequal interval, and the interval h is either an equal interval or an unequal interval.
5. The image defogging method for quickly determining homomorphic filtering parameters based on information entropy according to claim 1, characterized in that: The model coefficient calculation of the polynomial fitting can adopt one of the least squares method, the orthogonal least squares method and the overall least squares method.
6. The image defogging method for quickly determining homomorphic filtering parameters based on information entropy according to claim 1, characterized in that: The fitting accuracy is one of mean absolute error, mean error, and variance.