A fog penetration processing method and system based on differential channel images
Through the fog-transmissive processing method based on differential channel images, the complex calculation of the existing fog-transmissive algorithm is simplified, and the atmospheric scattering imaging model is used to process the fog-day images in the RGB domain, solving the problem of complex computing of the existing fog-transmissive algorithm in embedded systems, and a clearer and higher contrast defog-removing image is obtained.
Patent Information
- Application Number
- CN202210418091.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-20
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2042-04-20
AI Technical Summary
The guide filtering used by the existing fog-transmissive algorithms when refining the light propagation diagram is too complex. Each time the filter is performed, the filter template coefficient of the guide filter must be recalculated. The operation is complex and the scene adaptability is average, so it is not suitable for transplantation into embedded systems.
The fog-transmissive processing method based on differential channel images is adopted. By acquiring the atmospheric light value map and transmission rate image of the fog-day image of the RGB domain, the fog-transmissive processing is performed using the atmospheric scattering imaging model to replace the guide filtering, simplifying the computing process and improving the scene adaptability.
A simpler computing process is realized, and the resulting RGB defogging image is clearer, the overall image is transparent, more object information, higher contrast, and better fogging effect.
Smart Images

Figure CN114742734B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of video image defogging processing, and particularly to a defogging processing method and system based on differential channel images. Background Art
[0002] In fog and haze weather, various aerosol particles in the air will cause significant refraction of light, resulting in the light collected by the camera imaging system gradually attenuating as the refraction optical path increases. The images obtained through the camera imaging system show quality problems such as decreased contrast, color distortion, and blurriness, seriously affecting the outdoor monitoring effect and reducing the accuracy of target tracking. Therefore, in order to weaken or eliminate the influence of fog and haze on the imaging of the camera imaging system, it is necessary to perform real-time defogging processing on the monitoring video to obtain high-definition images.
[0003] In the prior art, through statistical analysis of outdoor scene image data, the dark channel prior theory is proposed, and then a defogging algorithm based on dark channel prior is proposed. However, the guided filtering used in the defogging algorithm to refine the light propagation map is too complex. Each time a filtering is performed, the filter template coefficients of the guided filtering must be recalculated, the operation is too complex, and the scene adaptability is average, and it is not suitable for transplantation into an embedded system composed of DSP, FPGA, etc. Summary of the Invention
[0004] The present application provides a defogging processing method and system based on differential channel images to solve the problems in the prior art that the guided filtering used in the defogging algorithm to refine the light propagation map is too complex, each time a filtering is performed, the filter template coefficients of the guided filtering must be recalculated, the operation is too complex, and the scene adaptability is average, and it is not suitable for transplantation into an embedded system composed of DSP, FPGA, etc.
[0005] In a first aspect, the present application provides a defogging processing method based on differential channel images, the method comprising:
[0006] Obtaining a foggy day image in the RGB domain of the current frame;
[0007] Calculating an atmospheric light value map of the foggy day image in the RGB domain based on differential channels;
[0008] Calculating a transmission rate image of the foggy day image in the RGB domain through a fusion weight relationship, the fusion weight relationship being calculated based on the foggy day image in the RGB domain and the atmospheric light value map;
[0009] Processing the foggy day image in the RGB domain of the current frame into a corresponding RGB defogged image through an atmospheric scattering imaging model, the atmospheric scattering imaging model being established according to the foggy day image in the RGB domain, the atmospheric light value map, and the transmission rate image.
[0010] In a preferred embodiment of the present application, calculating an atmospheric light value map of the RGB domain foggy image based on a differential channel includes:
[0011] Calculating a minimum channel map;
[0012] Calculating a maximum channel map;
[0013] Calculating a differential channel map according to the minimum channel map and the maximum channel map;
[0014] Obtaining an atmospheric light value map according to the RGB domain foggy image and the differential channel map.
[0015] In a preferred embodiment of the present application, obtaining an atmospheric light value map according to the RGB domain foggy image and the differential channel map includes:
[0016] Obtaining an R channel map, a G channel map, and a B channel map of the RGB domain foggy image;
[0017] Taking the R channel map as a guidance map and the differential channel map as a processing map, and performing guided filtering to obtain a corresponding R channel atmospheric light value map;
[0018] Taking the G channel map as a guidance map and the differential channel map as a processing map, and performing guided filtering to obtain a corresponding G channel atmospheric light value map;
[0019] Taking the B channel map as a guidance map and the differential channel map as a processing map, and performing guided filtering to obtain a corresponding B channel atmospheric light value map.
[0020] In a preferred embodiment of the present application, the minimum channel map is obtained by performing a comparison operation on the R channel map, the G channel map, and the B channel map of the RGB domain foggy image;
[0021] The maximum channel map is obtained by performing a comparison operation on the R channel map, the G channel map, and the B channel map of the RGB domain foggy image.
[0022] In a preferred embodiment of the present application, calculating a transmission rate image of the RGB domain foggy image by fusing weight relationships includes:
[0023] Calculating a minimum channel transmission rate image;
[0024] Calculating a maximum channel transmission rate image;
[0025] Fusing the minimum channel transmission rate image and the maximum channel transmission rate image into a transmission rate image according to a preset fusion weight relationship.
[0026] In a preferred embodiment of the present application, the minimum channel transmittance image is obtained by calculating and comparing according to the RGB domain foggy day image and the atmospheric light value map;
[0027] The maximum channel transmittance image is obtained by calculating and comparing according to the RGB domain foggy day image and the atmospheric light value map.
[0028] In a preferred embodiment of the present application, the fusion weight relationship includes a linear weight relationship and a non-linear weight relationship. A fusion weight coefficient is provided in the fusion weight relationship. The fusion weight coefficient includes a first weight coefficient and a second weight coefficient. The first weight coefficient is the coefficient of the minimum channel transmittance image, and the second weight coefficient is the coefficient of the maximum channel transmittance image.
[0029] In a second aspect, the present application provides a fog removal processing system based on differential channel images. The system includes: an acquisition unit, a differential unit, a fusion weight relationship unit, and a defogging unit that are communicatively connected to each other;
[0030] Among them, the acquisition unit is configured to:
[0031] Obtain the RGB domain foggy day image of the current frame;
[0032] The differential unit is configured to:
[0033] Calculate the atmospheric light value map of the RGB domain foggy day image based on the differential channel;
[0034] The fusion weight relationship unit is configured to:
[0035] Calculate the transmittance image of the RGB domain foggy day image through the fusion weight relationship, and the fusion weight relationship is obtained by calculating according to the RGB domain foggy day image and the atmospheric light value map;
[0036] The defogging unit is configured to:
[0037] Process the RGB domain foggy day image of the current frame into a corresponding RGB defogged image through the atmospheric scattering imaging model, and the atmospheric scattering imaging model is established according to the RGB domain foggy day image, the atmospheric light value map, and the transmittance image.
[0038] In a third aspect, the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of a fog removal processing method based on differential channel images are implemented.
[0039] Fourthly, the present application provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the steps of a fog removal processing method based on a differential channel image are implemented.
[0040] The fog removal processing method and system based on a differential channel image provided by the present application have the following beneficial effects compared with the prior art:
[0041] In the present application, after performing differential processing and guided filtering on the obtained RGB-domain foggy image based on the differential channel image, an atmospheric light value map is obtained; then, a transmission rate image is calculated through a fusion weight relationship; finally, the RGB-domain foggy image, the atmospheric light value map, and the transmission rate image are brought into the atmospheric scattering imaging model for fog removal processing to obtain an RGB de-fogged image. In the present application, differential processing and guided filtering are used instead of the guided filtering in the dark channel prior fog removal algorithm, and the operation process is simpler and the scene adaptability is stronger. Moreover, the RGB de-fogged image obtained by the fog removal processing method of the present application is clearer, the overall permeability of the image is better, more object information is displayed in the image, the contrast is higher, and the fog removal effect is better. Description of the Drawings
[0042] In order to more clearly illustrate the technical solutions of the present application, the drawings required to be used in the embodiments will be briefly introduced below. Obviously, for those of ordinary skill in the art, other drawings can also be obtained based on these drawings without creative efforts.
[0043] Figure 1 It is the overall flowchart of a fog removal processing method based on a differential channel image in Embodiment 1 of the present application;
[0044] Figure 2 It is the overall flowchart of calculating the atmospheric light value map in Embodiment 1 of the present application;
[0045] Figure 3 It is a partial flowchart of calculating the atmospheric light value map in Embodiment 1 of the present application;
[0046] Figure 4 It is the overall flowchart of calculating the transmission rate image in Embodiment 1 of the present application;
[0047] Figure 5 It is a schematic diagram of the RGB-domain foggy image of the current frame in the application example of the present application;
[0048] Figure 6 It is a schematic diagram of the minimum channel map in the application example of the present application;
[0049] Figure 7 It is a schematic diagram of the maximum channel map in the application example of the present application;
[0050] Figure 8 It is a schematic diagram of the differential channel in the application example of this application;
[0051] Figure 9 It is a schematic diagram of the atmospheric light value in the application example of this application;
[0052] Figure 10 It is a schematic diagram of the minimum channel transmission rate image in the application example of this application;
[0053] Figure 11 It is a schematic diagram of the maximum channel transmission rate image in the application example of this application;
[0054] Figure 12 It is a schematic diagram of the transmission rate image in the application example of this application;
[0055] Figure 13 It is a schematic diagram of the RGB defogging image of the current frame in the application example of this application. Detailed implementation manners
[0056] To make the purpose, implementation manners and advantages of this application clearer, the following will clearly and completely describe the exemplary implementation manners of this application with reference to the accompanying drawings in the exemplary embodiments of this application. Obviously, the described exemplary embodiments are only a part of the embodiments of this application, rather than all of the embodiments.
[0057] Therefore, the following detailed description of the embodiments of this application provided in the drawings is not intended to limit the scope of this application that is claimed, but merely represents the selected embodiments of this application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in this application without making creative efforts fall within the scope of protection of this application.
[0058] Based on the exemplary embodiments described in this application, all other embodiments obtained by those of ordinary skill in the art without making creative efforts fall within the scope of protection of the appended claims of this application. In addition, although the disclosed content in this application is introduced according to exemplary one or several examples, it should be understood that each aspect of these disclosed contents can also be separately constituted as a complete implementation manner.
[0059] It should be noted that the brief description of the terms in this application is only for the convenience of understanding the implementation manners described next, rather than intending to limit the implementation manners of this application. Unless otherwise specified, these terms should be understood according to their ordinary and common meanings.
[0060] To facilitate the technical solutions of the application, some concepts involved in this application are first described below.
[0061] In this application, terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Additionally, the term "comprising", "also comprising", "configured to" or any other variant is intended to cover non-exclusive inclusion, so that it includes not only the explicitly listed elements, but also other elements not explicitly listed. Therefore, the solution of this application will not be unclear. Moreover, words such as "unit", "system", "module" in this application all require the cooperation of relevant hardware devices and computer programs to achieve their corresponding functions. The hardware devices are known camera imaging systems in the art, including camera devices, servers, etc. Therefore, the solution of this application will not be unclear.
[0062] Some outdoor imaging systems cannot work properly and stably in foggy weather. Studying image defogging algorithms to reduce the impact of haze on camera imaging systems has great application value.
[0063] The prior art also provides a defogging algorithm based on histogram equalization. This defogging algorithm is simple to operate, but the defogging effect is poor.
[0064] Embodiment 1
[0065] As Figure 1 shown, Embodiment 1 of this application provides a defogging processing method based on differential channel images, including the following steps:
[0066] S10, obtaining a foggy image in the RGB domain of the current frame;
[0067] S20, calculating an atmospheric light value map of the foggy image in the RGB domain based on the differential channel;
[0068] S30, calculating a transmission rate image of the foggy image in the RGB domain through a fusion weight relationship, and the fusion weight relationship is calculated according to the foggy image in the RGB domain and the atmospheric light value map;
[0069] S40, processing the foggy image in the RGB domain of the current frame into a corresponding RGB defogged image through an atmospheric scattering imaging model, and the atmospheric scattering imaging model is established according to the foggy image in the RGB domain, the atmospheric light value map and the transmission rate image.
[0070] It should be particularly noted that the foggy image in the RGB domain in step S10 is obtained by shooting with a camera device in a camera imaging system. The foggy image in the RGB domain includes an R channel map, a G channel map and a B channel map. I k represents the foggy image in the RGB domain, and I k r represents the R channel map, and Ik g Indicates the G-channel image, I k b Indicates the B-channel image; further, the atmospheric light value image in step S20 also correspondingly includes an R-channel atmospheric light value image, a G-channel atmospheric light value image, and a B-channel atmospheric light value image; the transmission rate image in step S30 also correspondingly includes an R-channel transmission rate image, a G-channel transmission rate image, and a B-channel transmission rate image; the RGB defogging image in step S40 is the RGB defogging image of the current frame corresponding to the foggy image in the RGB domain of the current frame, and the RGB defogging image also correspondingly includes an R-channel defogging image, a G-channel defogging image, and a B-channel defogging image. After obtaining the defogging images of the r, g, and b channels respectively through the solution of Embodiment 1 of the present application, they are fused to obtain the final RGB defogging image.
[0071] As Figure 2 shown, further, in a specific implementation manner of Embodiment 1 of the present application, step S20, calculating the atmospheric light value image of the foggy image in the RGB domain based on the differential channel, includes:
[0072] S200, calculating the minimum channel image;
[0073] S201, calculating the maximum channel image;
[0074] S202, calculating the differential channel image according to the minimum channel image and the maximum channel image;
[0075] S203, obtaining the atmospheric light value image according to the foggy image in the RGB domain and the differential channel image.
[0076] Furthermore, in a specific implementation manner of Embodiment 1 of the present application, both the minimum channel image and the maximum channel image are obtained through comparison operations on the R-channel image, G-channel image, and B-channel image of the foggy image in the RGB domain, that is, comparing the minimum pixel set or the maximum pixel set in the R-channel image, G-channel image, and B-channel image and outputting.
[0077] Specifically, in Embodiment 1 of the present application, step S200, calculating the minimum channel image of the foggy image in the RGB domain, the calculation formula is as follows:
[0078]
[0079] wherein, Indicates the minimum channel image, c indicates the channel flag of the foggy image in the RGB domain, including the r, g, and b channels, x indicates the xth pixel in the foggy image in the RGB domain, and min indicates the minimum value among the r, g, and b channels of pixel x.
[0080] Specifically, in this Embodiment 1, in step S201, calculate the maximum channel map of the RGB-domain foggy image, and the calculation formula is as follows:
[0081]
[0082] Wherein, represents the maximum channel map, represents the c-channel map, c represents the channel flag of the RGB-domain foggy image, including three channels of r, g, and b, x represents the x-th pixel in the RGB-domain foggy image, and max represents the maximum value of pixel x in the three channels of r, g, and b.
[0083] Specifically, in this Embodiment 1, in step S202, calculate the differential channel map of the RGB-domain foggy image according to the minimum channel map and the maximum channel map, and the calculation formula is as follows:
[0084]
[0085] Wherein, represents the differential channel map, represents the minimum channel map, represents the maximum channel map.
[0086] As Figure 3 shown, further, in a specific implementation manner of this Embodiment 1, in step S203, obtain the atmospheric light value map according to the RGB-domain foggy image and the differential channel map, including:
[0087] S2030, obtain the R-channel map, G-channel map, and B-channel map of the RGB-domain foggy image;
[0088] S2031, by using the R-channel map as the guidance map and the differential channel map as the processing map, perform guided filtering processing to obtain the corresponding R-channel atmospheric light value map;
[0089] S2032, by using the G-channel map as the guidance map and the differential channel map as the processing map, perform guided filtering processing to obtain the corresponding G-channel atmospheric light value map;
[0090] S2033, by using the B-channel map as the guidance map and the differential channel map as the processing map, perform guided filtering processing to obtain the corresponding B-channel atmospheric light value map.
[0091] Specifically, in this embodiment, in step S203, obtain the atmospheric light value map according to the RGB-domain foggy image and the differential channel map, and the specific process is as follows:
[0092] For the r, g, and b channel maps of the RGB-domain foggy image I k As the guiding diagrams respectively, the differential channel diagrams As the processing diagrams, perform guided filtering processing, and respectively output to obtain three-channel atmospheric light value diagrams
[0093] In addition, it should be particularly noted that the output diagram of the guided filtering and the guiding diagram are linearly related, and their linear relationship is:
[0094]
[0095] Among them, q i represents the output value of the i-th pixel, I i represents the input value, ω k represents the window centered on k, a k and b k both represent the function coefficients with the window center at k. Secondly, the guided filtering in Embodiment 1 of the present application is a prior art and will not be elaborated here. Those skilled in the art can implement all steps of obtaining the atmospheric light value diagram through guided filtering according to the solution of this Embodiment 1 and the conventional technical means of guided filtering in this field.
[0096] As Figure 4 shown, further, in a specific implementation manner of this Embodiment 1, in step S30, calculating the transmission rate image of the foggy-day image in the RGB domain includes:
[0097] S300, calculating the minimum channel transmission rate image;
[0098] S301, calculating the maximum channel transmission rate image;
[0099] S302, according to the preset fusion weight relationship, fusing the minimum channel transmission rate image and the maximum channel transmission rate image into a transmission rate image.
[0100] Furthermore, in a specific implementation manner of this Embodiment 1, both the minimum channel transmission rate image and the maximum channel transmission rate image are obtained by calculating and comparing the foggy-day image in the RGB domain and the atmospheric light value diagram, that is, first calculate and then compare the output of the minimum pixel set or the maximum pixel set in the r, g, and b channels. The minimum pixel set needs to be calculated again for output, and the maximum pixel set can be directly output, but the calculation formulas of the minimum pixel set and the maximum pixel set are different.
[0101] Specifically, in this embodiment, in step S300, calculating the minimum channel transmission rate image, the calculation formula is as follows:
[0102]
[0103] Among them, Represents the minimum channel transmission rate image, Represents the c-channel image, where c represents the channel flag of the foggy image in the RGB domain, including the r, g, and b channels, and x represents the x-th pixel in the foggy image in the RGB domain. Represents the c-channel atmospheric light value image, and min represents the minimum value among the r, g, and b channels of pixel x.
[0104] Specifically, in this embodiment, in step S301, calculate the maximum channel transmission rate image, and the calculation formula is as follows:
[0105]
[0106] Wherein, Represents the maximum channel transmission rate image, Represents the c-channel image, where c represents the channel flag of the foggy image in the RGB domain, including the r, g, and b channels, and x represents the x-th pixel in the foggy image in the RGB domain. Represents the c-channel atmospheric light value image, and max represents the maximum value among the r, g, and b channels of pixel x.
[0107] Furthermore, in a specific implementation manner of this Embodiment 1, the fusion weight relationship in step S302 includes a linear weight relationship and a non-linear weight relationship. There is a fusion weight coefficient in the fusion weight relationship, and the fusion weight coefficient includes a first weight coefficient and a second weight coefficient. The first weight coefficient is the coefficient of the minimum channel transmission rate image, and the second weight coefficient is the coefficient of the maximum channel transmission rate image.
[0108] Exemplarily, in this Embodiment 1, the linear weight relationship is adopted as the fusion weight relationship, and the calculation formula is as follows:
[0109]
[0110] Wherein, w1 represents the first weight coefficient, and w2 represents the second weight coefficient. In addition, the change relationship between the first weight coefficient w1 and the second weight coefficient w2 is as follows: the first weight coefficient w1 needs to be increased during the day, and the second weight coefficient w2 needs to be increased in the evening. The relational expression of the fusion weight coefficient of the linear weight relationship is w1 + w2 = 1. For example: during the day, the first weight coefficient w1 in the fusion weight coefficient is set to 0.7, and the second weight coefficient w2 is set to 0.3; on a cloudy day, the first weight coefficient w1 in the fusion weight coefficient is set to 0.5, and the second weight coefficient w2 is set to 0.5; in the evening, the first weight coefficient w1 in the fusion weight coefficient is set to 0.3, and the second weight coefficient w2 is set to 0.7.
[0111] It should be particularly noted that the above fusion weight coefficients are all examples. The fusion weight coefficients in actual applications can be preset values or weight coefficients adaptively generated according to certain features in the foggy image in the GB domain.
[0112] Specifically, in Embodiment 1 of the present invention, the formula after adopting the linear weight relationship for the fusion weight relationship in step S302 is as follows:
[0113]
[0114] Among them, w1 is the first weight coefficient of the image with the minimum channel transmission rate and w2 is the second weight coefficient of the image with the maximum channel transmission rate , where x represents the x-th pixel in the foggy image in the RGB domain.
[0115] Furthermore, in a specific implementation manner of Embodiment 1 of the present invention, in step S40, the foggy image in the RGB domain is processed into an RGB defogged image through the atmospheric scattering imaging model, and the calculation formula is as follows:
[0116]
[0117] Among them, represents the defogged image of channel c, represents the c-channel image, represents the atmospheric light value map of channel c, represents the transmission rate image of channel c, c represents the channel flag of the foggy image in the RGB domain, including three channels r, g, and b, and x represents the x-th pixel in the foggy image in the RGB domain.
[0118] It should be particularly noted that in Embodiment 1 and Embodiment 2 of the present application, in actual applications, it can be determined according to specific requirements, that is, whether the solution of the present application is applied to real-time processing of foggy images in the RGB domain by a camera or to processing of foggy images in the RGB domain in a stored video stream. When the specific requirements are different, the solution of the present application can output the RGB defogged image after fog penetration processing frame by frame according to the camera attributes. Among them, the camera attributes include the frame rate, that is, how many frames of RGB defogged images can be output per second.
[0119] Embodiment 2
[0120] Corresponding to Embodiment 1 of the above-mentioned fog penetration processing method based on differential channel images, the present application also provides Embodiment 2 of a fog penetration processing system based on differential channel images. The system includes: a collection unit, a differential unit, a fusion weight relationship unit, and a defogging unit that are communicatively connected to each other;
[0121] Among them, the collection unit is configured to:
[0122] Obtain the RGB domain foggy image of the current frame;
[0123] The difference unit is configured to:
[0124] Calculate the atmospheric light value map of the RGB domain foggy image based on the difference channel;
[0125] The fusion weight relationship unit is configured to:
[0126] Calculate the transmission rate image of the RGB domain foggy image through the fusion weight relationship, and the fusion weight relationship is calculated based on the RGB domain foggy image and the atmospheric light value map;
[0127] The defogging unit is configured to:
[0128] Process the RGB domain foggy image of the current frame into a corresponding RGB defogged image through the atmospheric scattering imaging model, and the atmospheric scattering imaging model is established according to the RGB domain foggy image, the atmospheric light value map, and the transmission rate image.
[0129] Embodiment 3
[0130] Embodiment 3 of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of a fog penetration processing method based on a difference channel image in Embodiment 1 are implemented.
[0131] Embodiment 4
[0132] Embodiment 4 of the present application provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of a fog penetration processing method based on a difference channel image in Embodiment 1 are implemented.
[0133] Application Example
[0134] As Figure 5 shown, it is the RGB domain foggy image of the current frame collected by the camera device in the camera imaging system. The image resolution of the RGB domain foggy image is 2040*1200, 8-bit data, and its gray value range is [46, 254], and the average gray value is 150.
[0135] Adopt the technical solution in the embodiment of the present application to Figure 5 shown RGB domain foggy image for fog penetration processing. First, calculate the minimum pixel in each channel map of the RGB domain foggy image, and output the set of all minimum pixels to obtain the minimum channel map as Figure 6 shown; secondly, calculate the maximum pixel in each channel map of the RGB domain foggy image, and output the set of all maximum pixels to obtain asFigure 7 The maximum channel map shown; then, Figure 6 the minimum channel map shown and Figure 7 the maximum channel map shown are subjected to a difference operation to obtain a difference channel map as shown in Figure 8 ; further, based on the foggy image in the RGB domain shown in Figure 5 and the difference channel map shown in Figure 8 , an atmospheric light value map as shown in Figure 9 is calculated; even further, based on the foggy image in the RGB domain shown in Figure 5 and the atmospheric light value map shown in Figure 9 , a minimum channel transmission rate image as shown in Figure 10 and a maximum channel transmission rate image as shown in Figure 11 are calculated, and based on the minimum channel transmission rate image, the maximum channel transmission rate image, and the fusion weight relationship, a transmission rate image as shown in Figure 12 is calculated; finally, the foggy image in the RGB domain shown in Figure 5 , the atmospheric light value map shown in Figure 9 , and the transmission rate image shown in Figure 12 are substituted into the atmospheric scattering imaging model (known) for calculation and processing, and then the RGB defogged image of the current frame as shown in Figure 13 can be obtained. The gray value range of the RGB defogged image is [0, 255], and the average gray value is 143.
[0136] In summary, by comparing the Figure 5 and Figure 13 before and after the haze-penetrating processing, it can be clearly seen that the RGB defogged image after the haze-penetrating processing by the technical solution of the present application is clearer, the gray value distribution is more uniform, the overall permeability of the image is better, more object information is shown in the image, the contrast is higher, and the haze-penetrating effect is better.
[0137] For the similar parts between the embodiments provided in the present application, reference can be made to each other. The specific embodiments provided above are only several examples under the general concept of the present application and do not constitute a limitation on the protection scope of the present application. For those skilled in the art, any other embodiments extended based on the solution of the present application without creative efforts belong to the protection scope of the present application.
Claims
1. A haze removal method based on differential channel images, characterized in that Including: Obtain the RGB-domain foggy image of the current frame; Calculate the atmospheric light value map of the RGB-domain foggy image based on the differential channel, including: Calculate the minimum channel map; Calculate the maximum channel map; Calculate the differential channel map according to the minimum channel map and the maximum channel map; Obtain the atmospheric light value map according to the RGB-domain foggy image and the differential channel map, including: Obtain the R-channel map, G-channel map, and B-channel map of the RGB-domain foggy image; By using the R-channel map as the guidance map and the differential channel map as the processing map, after performing guided filtering processing, obtain the corresponding R-channel atmospheric light value map; By using the G-channel map as the guidance map and the differential channel map as the processing map, after performing guided filtering processing, obtain the corresponding G-channel atmospheric light value map; By using the B-channel map as the guidance map and the differential channel map as the processing map, after performing guided filtering processing, obtain the corresponding B-channel atmospheric light value map; The minimum channel map is obtained through comparison operations on the R-channel map, G-channel map, and B-channel map of the RGB-domain foggy image; The maximum channel map is obtained through comparison operations on the R-channel map, G-channel map, and B-channel map of the RGB-domain foggy image; Calculate the transmission rate image of the RGB-domain foggy image through the fusion weight relationship, and the fusion weight relationship is calculated according to the RGB-domain foggy image and the atmospheric light value map; Calculate the transmission rate image of the RGB-domain foggy image through the fusion weight relationship, including: Calculate the minimum channel transmission rate image; Calculate the maximum channel transmission rate image; Fuse the minimum channel transmission rate image and the maximum channel transmission rate image into the transmission rate image according to the preset fusion weight relationship; The minimum channel transmission rate image is obtained through calculation and comparison according to the RGB-domain foggy image and the atmospheric light value map; The maximum channel transmission rate image is obtained through calculation and comparison according to the RGB-domain foggy image and the atmospheric light value map; Process the RGB-domain foggy image of the current frame into the corresponding RGB defogged image through the atmospheric scattering imaging model, and the atmospheric scattering imaging model is established according to the RGB-domain foggy image, the atmospheric light value map, and the transmission rate image.
2. According to the method for fog penetration processing based on differential channel images described in claim 1, characterized in that The fusion weight relationship includes a linear weight relationship and a non-linear weight relationship. There is a fusion weight coefficient in the fusion weight relationship. The fusion weight coefficient includes a first weight coefficient and a second weight coefficient. The first weight coefficient is the coefficient of the minimum channel transmission rate image, and the second weight coefficient is the coefficient of the maximum channel transmission rate image.
3. A fog penetration processing system based on differential channel images, characterized in that, Applied to the method for fog penetration processing based on differential channel images described in claim 1 or 2, the system includes: an acquisition unit, a differential unit, a fusion weight relationship unit, and a defogging unit that are communicatively connected to each other; Among them, the acquisition unit is configured to: Obtain the RGB-domain foggy image of the current frame; The differential unit is configured to: Calculate the atmospheric light value map of the RGB-domain foggy image based on the differential channel; The fusion weight relationship unit is configured to: Calculating a transmission rate image of the foggy image in the RGB domain through a fusion weight relationship, where the fusion weight relationship is calculated based on the foggy image in the RGB domain and the atmospheric light value map; The defogging unit is configured to: Processing the foggy image in the RGB domain of the current frame into a corresponding RGB defogged image through an atmospheric scattering imaging model, where the atmospheric scattering imaging model is established based on the foggy image in the RGB domain, the atmospheric light value map, and the transmission rate image.
4. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, the steps of a fog penetration processing method based on a differential channel image as described in claim 1 or 2 are implemented.
5. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, the steps of a fog penetration processing method based on a differential channel image as described in claim 1 or 2 are implemented.
Citation Information
Patent Citations
Rapid wavelet transformation and weighted image fusion single-image defogging method
CN103955905A
Image defogging method based on dark channel prior and bright channel prior
CN109919879A