A method, system, device and storage medium for dehazing river patrol video images

Through adaptive threshold segmentation and fast guidance filtering algorithm to refine the transmittance map, the halo effect and color distortion problems in the fog removal of river-sweeping video images are solved, and the low-complexity and efficient fog removal effect is achieved to meet real-time requirements.

CN115409738BActive Publication Date: 2025-07-25GUANGDONG RES INST OF WATER RESOURCES & HYDROPOWER
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211172053.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-26
Publication Date
2025-07-25
Estimated Expiration
2042-09-26

AI Technical Summary

Technical Problem

The existing river-surveillance video image defogging technology is inaccurate in the transmission estimation at the edge of the image scene, resulting in halo effect and color distortion, and the algorithm is complex and poor real-time.

Method used

The image is divided into sky areas and non-sky areas by adaptive threshold segmentation method, and the transmittance map is calculated based on the area ratio re-estimation method or dark channel model, and the transmittance map is refined through a fast guide filtering algorithm, and the defogging image is calculated based on the tolerance mechanism and atomization model.

Benefits of technology

It improves the accuracy and accuracy of transmittance graph calculation, suppresses halo effect and color distortion, reduces the calculation complexity, and meets real-time requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115409738B_ABST
    Figure CN115409738B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, system, device and storage medium for defogging river patrol video images. The defogging method for river patrol video images divides the image to be processed by using an adaptive threshold segmentation method to obtain the sky region and the non-sky region. When the proportion of the sky region is greater than a preset value, the first transmission rate map is obtained by using the ratio re-estimation method according to the sky region and the non-sky region. When the proportion of the sky region is less than or equal to the preset value, the first transmission rate map is calculated by using the dark channel model, and the atmospheric light value is calculated based on different scenes, which improves the accuracy and precision of the calculation of the transmission rate map of the image to be processed. Subsequently, the first transmission rate map is refined by using the fast guided filter algorithm, and the problem of halo effect in the defogged image is solved; by introducing a tolerance mechanism, the defogged image is calculated by using the fogging model, and the color distortion phenomenon in the defogged image is suppressed; the defogging method for river patrol video images of the present invention has a low calculation complexity and a short processing time, meeting the real-time requirement.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technologies, and in particular to a method, system, device, and storage medium for dehazing river patrol video images. Background Art

[0002] Clouds and fog in the atmosphere will greatly reduce the visibility of the air, bringing great interference to UAV aerial photography, resulting in poor quality of the captured images, and increasing the difficulty of subsequent target detection and recognition. In scenarios such as UAV river patrol, it is inevitable to be affected by clouds and fog. To improve the anti-interference ability of UAV river patrol, it is very necessary to conduct research on dehazing for UAV aerial photography images.

[0003] Existing river patrol video image dehazing technologies mainly include the classic dark channel prior dehazing algorithm. The dark channel prior dehazing algorithm outputs a dehazed image using the global atmospheric light value and transmittance value, and can achieve good dehazing effects in most cases. However, the dark channel prior dehazing algorithm will have problems with inaccurate transmittance estimation at the edges of sudden changes in the image scene, resulting in a halo effect in the restored dehazed image at this location; since the sky region does not conform to the dark channel prior, when the dark channel prior dehazing algorithm performs dehazing processing on images with sky regions, the restored dehazed image will have obvious color distortion; in addition, the processing process of the dark channel prior dehazing algorithm takes a long time, the algorithm complexity is too high, and the real-time performance is poor. Summary of the Invention

[0004] The purpose of the present invention is to solve at least to some extent one of the technical problems existing in the prior art.

[0005] To this end, an object of an embodiment of the present invention is to provide a method, system, device, and storage medium for dehazing river patrol video images, which improves the dehazing effect of river patrol video images and reduces the algorithm complexity.

[0006] To achieve the above technical purpose, the technical solutions adopted in the embodiments of the present invention include:

[0007] On the one hand, an embodiment of the present invention provides a method for dehazing river patrol video images, including the following steps:

[0008] Segment the image to be processed using an adaptive threshold segmentation method to obtain the sky region and non-sky region of the image to be processed;

[0009] Confirm that the proportion of the sky area is greater than a preset value, take the average brightness of the target pixel area as the atmospheric light value, and calculate the first transmittance map based on the sky area and the non-sky area. The target pixel area is composed of 1% of the pixels with the maximum brightness among the pixels corresponding to the sky area, and the proportion of the sky area is the proportion of the pixels corresponding to the sky area in the total pixels of the image to be processed;

[0010] Confirm that the proportion of the sky area is less than or equal to the preset value, use the quadtree region iteration method to calculate the atmospheric light value for the image to be processed, and use the dark channel model to calculate the transmittance of the sky area and the non-sky area to obtain the first transmittance map;

[0011] Refine the first transmittance map using the fast guided filter algorithm to obtain the second transmittance map;

[0012] Based on the second transmittance map, the atmospheric light value, and the image to be processed, calculate the dehazed image based on the tolerance mechanism and the fogging model.

[0013] In addition, for a method for dehazing a river patrol video image according to the above embodiments of the present invention, the following additional technical features may also be provided:

[0014] Further, in a method for dehazing a river patrol video image according to an embodiment of the present invention, the step of using an adaptive threshold segmentation method to segment the image to be processed to obtain the sky area and the non-sky area of the image to be processed includes:

[0015] Segment the image to be processed to obtain a number of first image blocks;

[0016] Use the low point in the bimodal characteristic of the image dark channel map as the threshold to segment each of the first image blocks to obtain the sub-sky area and the sub-non-sky area in each of the first image blocks;

[0017] Integrate each of the sub-sky areas to obtain the sky area, and integrate each of the sub-non-sky areas to obtain the non-sky area.

[0018] Further, in an embodiment of the present invention, the step of calculating the first transmittance map based on the sky area and the non-sky area includes:

[0019] Use the brightness model to calculate the transmittance of the sky area to generate the transmittance map of the sky area;

[0020] Use the dark channel model to calculate the transmittance of the non-sky area to generate the transmittance map of the non-sky area;

[0021] Weightedly fuse the transmittance map of the sky region and the transmittance map of the non-sky region according to the weight ratio of the sky region and the non-sky region to generate the first transmittance map.

[0022] Further, in an embodiment of the present invention, the calculating the atmospheric light value by using the quadtree region iteration method for the image to be processed includes:

[0023] Take the image to be processed as the current image;

[0024] Quadrisect the current image to obtain four second image blocks;

[0025] Calculate the average brightness of each of the second image blocks;

[0026] Select a third image block according to the average brightness of the second image blocks, where the third image block is the image block with the largest average brightness among each of the second image blocks;

[0027] If the average brightness of the third image block is greater than or equal to a preset brightness limit value, take the third image block as the current image, and then return to the step of quadrisecting the current image to obtain four second image blocks until the average brightness of the third image block is less than the brightness limit value;

[0028] If the average brightness of the third image block is less than the brightness limit value, take the average brightness of the third image block as the atmospheric light value.

[0029] Further, in an embodiment of the present invention, after calculating the defogged image based on the second transmittance map, the atmospheric light value, and the image to be processed by using a tolerance mechanism and a fogging model, the river patrol video image defogging method further includes:

[0030] Perform image enhancement processing on the defogged image by using an automatic color level algorithm.

[0031] Further, in an embodiment of the present invention, before segmenting the image to be processed by using an adaptive threshold segmentation method to obtain the sky region and the non-sky region of the image to be processed, the river patrol video image defogging method further includes:

[0032] Obtain the image to be processed.

[0033] Further, in an embodiment of the present invention, the obtaining the image to be processed includes:

[0034] Obtain video data;

[0035] Extract the key frames of the video data;

[0036] Filter and denoise the key frame to obtain the image to be processed.

[0037] On the other hand, an embodiment of the present invention provides a fog removal system for river patrol video images, including:

[0038] A first module for segmenting the image to be processed by using an adaptive threshold segmentation method to obtain the sky region and the non-sky region of the image to be processed;

[0039] A second module for confirming that the proportion of the sky region is greater than a preset value, taking the average brightness value of the target pixel region as the atmospheric light value, and calculating a first transmittance map according to the sky region and the non-sky region, where the target pixel region is composed of 1% of the pixels with the largest brightness in the pixels corresponding to the sky region, and the proportion of the sky region is the proportion of the pixels corresponding to the sky region in the total pixels of the image to be processed;

[0040] A third module for confirming that the proportion of the sky region is less than or equal to the preset value, calculating the atmospheric light value by using a quadtree region iteration method for the image to be processed, and calculating the transmittance of the sky region and the non-sky region by using a dark channel model to obtain the first transmittance map;

[0041] A fourth module for refining the first transmittance map by using a fast guided filter algorithm to obtain a second transmittance map;

[0042] A fifth module for calculating a de-fogged image based on the second transmittance map, the atmospheric light value, and the image to be processed by using a tolerance mechanism and a fogging model.

[0043] On the other hand, an embodiment of the present invention provides a fog removal device for river patrol video images, including:

[0044] At least one processor;

[0045] At least one memory for storing at least one program;

[0046] When the at least one program is executed by the at least one processor, the at least one processor implements the fog removal method for river patrol video images as described above.

[0047] On the other hand, an embodiment of the present invention provides a storage medium, in which a program executable by a processor is stored, and the program executable by the processor is used to implement the fog removal method for river patrol video images as described above when executed by the processor.

[0048] The advantages and beneficial effects of the present invention will be partially given in the following description, partially become apparent from the following description, or be understood through the practice of the present application:

[0049] In the embodiment of the present invention, an adaptive threshold segmentation method is adopted to segment the image to be processed to obtain a sky region and a non-sky region. When the proportion of the sky region is greater than a preset value, a ratio re-estimation method is used to obtain a first transmittance map based on the sky region and the non-sky region. When the proportion of the sky region is less than or equal to the preset value, a dark channel model is used to calculate the first transmittance map, and the atmospheric light value is calculated based on different scenarios, which improves the accuracy and precision of the calculation of the transmittance map of the image to be processed. Subsequently, a fast guided filter algorithm is used to refine the first transmittance map, which solves the problem of halo effect in the defogged image; by introducing a tolerance mechanism, a defogged image is calculated based on the image to be processed, the atmospheric light value and the second transmittance map using a fogging model, which suppresses the color distortion phenomenon in the defogged image; compared with the traditional defogging method for river patrol video images, the defogging method for river patrol video images in the embodiment of the present invention has a lower computational complexity and a shorter time-consuming for defogging processing of river patrol video images, meeting the real-time requirement. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following introduces the drawings of the related technical solutions in the embodiments of the present application or the prior art. It should be understood that the drawings introduced below are only for conveniently and clearly expressing some embodiments of the technical solutions in the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative efforts.

[0051] Figure 1 It is a schematic flowchart of a specific embodiment of a method for removing fog from river patrol video images according to the present invention;

[0052] Figure 2 It is a schematic diagram of the principle of the quadtree region iteration method in a specific embodiment of a method for removing fog from river patrol video images according to the present invention;

[0053] Figure 3 It is a schematic diagram of calculating the transmittance by the dark channel model in a specific embodiment of a method for removing fog from river patrol video images according to the present invention;

[0054] Figure 4 It is a processing effect diagram of a specific embodiment of a method for removing fog from river patrol video images according to the present invention;

[0055] Figure 5 It is a schematic structural diagram of a specific embodiment of a system for removing fog from river patrol video images according to the present invention;

[0056] Figure 6This is a schematic structural diagram of a specific embodiment of a fog-removing device for river patrol video images according to the present invention. Detailed implementation manners

[0057] The embodiments of the present invention will be described in detail below. The examples of the embodiments are shown in the accompanying drawings, in which the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application and should not be construed as a limitation to the present application. For the step numbers in the following embodiments, they are only set for the convenience of explanation and illustration, and no limitation is imposed on the order between the steps. The execution order of each step in the embodiments can be adaptively adjusted according to the understanding of those skilled in the art.

[0058] The terms "first", "second", "third", "fourth", etc. in the specification, claims and drawings of the present invention are used to distinguish different objects and are not used to describe a specific order. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally further includes steps or units not listed, or optionally further includes other steps or units inherent to these processes, methods, products or devices.

[0059] Referring to "embodiments" in the present invention means that specific features, structures or characteristics described in connection with the embodiments can be included in at least one embodiment of the present invention. The phrase appears at various positions in the specification and does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art will explicitly and implicitly understand that the embodiments described herein can be combined with other embodiments.

[0060] The existing dehazing techniques for river patrol video images mainly include the classical dark channel prior dehazing algorithm. The dark channel prior dehazing algorithm outputs a dehazed image by using the global atmospheric light value and the transmittance value, and can achieve good dehazing effects in most cases. However, the dark channel prior dehazing algorithm has problems with inaccurate transmittance estimation at the edges of sudden changes in the image scene, resulting in a halo effect in the restored dehazed image at this location; since the sky region does not conform to the dark channel prior, when the dark channel prior dehazing algorithm is used to dehaze an image with a sky region, there will be obvious color distortion in the restored dehazed image; in addition, the dark channel prior dehazing algorithm has a long processing time, a high algorithm complexity, and poor real-time performance. For this reason, the present invention proposes a method, system, device and storage medium for dehazing river patrol video images. By using an adaptive threshold segmentation method to segment the image to be processed to obtain a sky region and a non-sky region, when the proportion of the sky region is greater than a preset value, a first transmittance map is obtained by using the ratio re-estimation method based on the sky region and the non-sky region, and when the proportion of the sky region is less than or equal to the preset value, a first transmittance map is calculated by using the dark channel model, and the atmospheric light value is calculated based on different scenes, improving the accuracy and precision of the calculation of the transmittance map of the image to be processed. Subsequently, the first transmittance map is refined by using a fast guided filter algorithm, solving the problem of the halo effect in the dehazed image; by introducing a tolerance mechanism, a dehazed image is calculated by using a fogging model based on the image to be processed, the atmospheric light value and the second transmittance map, suppressing the color distortion phenomenon in the dehazed image; compared with the traditional dehazing method for river patrol video images, the dehazing method for river patrol video images in the embodiments of the present invention has a lower calculation complexity, a better dehazing effect, and enhances the anti-interference ability of the dehazing of river patrol video images.

[0061] Next, a method, system, device and storage medium for dehazing river patrol video images according to an embodiment of the present invention will be described in detail with reference to the accompanying drawings. First, a method for dehazing river patrol video images according to an embodiment of the present invention will be described with reference to the accompanying drawings.

[0062] Refer to Figure 1, in the embodiments of the present invention, a method for dehazing river patrol video images is provided. The method for dehazing river patrol video images in the embodiments of the present invention can be applied to a terminal, can also be applied to a server, or can be software running on a terminal or a server, etc. The terminal can be a tablet computer, a notebook computer, a desktop computer, etc., but is not limited thereto. The server can be an independent physical server, can also be a server cluster or a distributed system composed of multiple physical servers, or can also be a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms. The method for dehazing river patrol video images in the embodiments of the present invention mainly includes the following steps:

[0063] S101. Use an adaptive threshold segmentation method to segment the image to be processed, and obtain the sky region and non-sky region of the image to be processed;

[0064] Among them, the gradient change of the sky region is small. In the embodiments of the present invention, the segmentation process is performed by detecting the edge of the sky region.

[0065] The embodiments of the present invention use an adaptive threshold segmentation method to segment the image to be processed, improve the accuracy of edge extraction of the image to be processed, and retain details.

[0066] S101 can be further divided into the following steps S1011 - S1013:

[0067] Step S1011. Segment the image to be processed to obtain a number of first image blocks;

[0068] Step S1012. Use the trough in the bimodal characteristic of the dark channel map of the image as the threshold to segment each first image block respectively, and obtain the sub-sky region and sub-non-sky region in each first image block;

[0069] Step S1013. Integrate each sub-sky region to obtain the sky region, and integrate each sub-non-sky region to obtain the non-sky region.

[0070] In the embodiments of the present invention, before step S101, it is also necessary to first obtain the image to be processed, which specifically includes the following steps:

[0071] 1) Obtain video data;

[0072] 2) Extract the key frames of the video data;

[0073] 3) Filter and denoise the key frames to obtain the image to be processed.

[0074] S102. Confirm that the proportion of the sky area is greater than a preset value, take the average brightness value of the target pixel area as the atmospheric light value, and calculate the first transmittance map using the ratio re-estimation method based on the sky area and the non-sky area;

[0075] Among them, the target pixel area is composed of 1% of the pixels with the highest brightness among the pixels corresponding to the sky area, and the proportion of the sky area is the proportion of the pixels corresponding to the sky area in the total pixels of the image to be processed.

[0076] Optionally, in an embodiment of the present invention, the preset value is 5%.

[0077] In the embodiment of the present invention, when the proportion of the sky area is greater than the preset value, it is considered that there is a sky area in the image to be processed. According to prior knowledge, the dark channel prior dehazing algorithm fails when facing the sky area. Therefore, in the embodiment of the present invention, the brightness model is used to calculate the transmittance of the sky area, the dark channel model of the dark channel prior dehazing algorithm is used to calculate the transmittance of the non-sky area, and a comprehensive transmittance map, that is, the first transmittance map, is obtained through weighted fusion.

[0078] Specifically, in the embodiment of the present invention, calculating the first transmittance map using the ratio re-estimation method based on the sky area and the non-sky area specifically includes the following steps:

[0079] 1) Calculate the transmittance of the sky area using the brightness model to generate a transmittance map of the sky area;

[0080] 2) Calculate the transmittance of the non-sky area using the dark channel model to generate a transmittance map of the non-sky area;

[0081] 3) Perform weighted fusion on the transmittance map of the sky area and the transmittance map of the non-sky area according to the weight ratio of the sky area and the non-sky area to generate the first transmittance map.

[0082] S103. Confirm that the proportion of the sky area is less than or equal to the preset value, use the quadtree region iteration method to calculate the atmospheric light value for the image to be processed, and use the dark channel model to calculate the transmittance of the sky area and the non-sky area to obtain the first transmittance map;

[0083] Specifically, referring to Figure 2 , in the embodiment of the present invention, using the quadtree region iteration method to calculate the atmospheric light value for the image to be processed specifically includes the following steps:

[0084] 1) Take the image to be processed as the current image;

[0085] 2) Divide the current image into four equal parts to obtain four second image blocks;

[0086] 3) Calculate the average brightness of each second image block;

[0087] 4) Select a third image block according to the average brightness of the second image blocks, where the third image block is the image block with the largest average brightness among the second image blocks;

[0088] 5) When the average brightness of the third image block is greater than or equal to a preset brightness limit value, use the third image block as the current image, and then return to the step of dividing the current image into four equal parts to obtain four second image blocks until the average brightness of the third image block is less than the brightness limit value;

[0089] 6) If the average brightness of the third image block is less than the brightness limit value, use the average brightness of the third image block as the atmospheric light value.

[0090] In the embodiments of the present invention, when the proportion of the sky area is less than or equal to a preset value, it can be considered that there is no sky area in the image to be processed, and the dark channel prior dehazing algorithm takes effect. Refer to Figure 3 In the embodiments of the present invention, the dark channel model of the dark channel prior dehazing algorithm is used to calculate the first transmittance map for the transmittance of the sky area and the non-sky area.

[0091] Optionally, after the superpixel extraction and segmentation of the image to be processed, the obtained irregular regions are consistent in terms of brightness, hue, and saturation attributes, and are also consistent in terms of depth of field and transmittance. Considering interference factors such as noise, in order to improve the robustness in the embodiments of the present invention, the minimum filtering in the dark channel prior dehazing algorithm is relaxed, that is, the dark channel minimum value and several subsequent values are excluded.

[0092] S104. Refine the first transmittance map using the fast guided filter algorithm to obtain a second transmittance map;

[0093] It can be understood that the first transmittance map calculated in steps S102 and S103 is a rough transmittance map, and there is a block effect. According to prior knowledge, the prior art generally uses the soft matting method to process the rough transmittance map to optimize and initialize the transmittance, which has the problems of slow speed and long time consumption.

[0094] Specifically, in the embodiments of the present invention, the first transmittance map is refined based on the fast guided filter algorithm with an adaptive window. The time complexity is not affected by the size of the filtering window, and the processing speed is accelerated while enhancing the edge details.

[0095] S105. Calculate the dehazed image based on the second transmittance map, the atmospheric light value, and the image to be processed, based on the tolerance mechanism and the fogging model.

[0096] According to prior knowledge, the fogging model:

[0097] I(x) = J(x)t(x) + A[1 - t(x)]

[0098] Wherein, I(x) represents the image to be processed, J(x) represents the dehazed image, t(x) represents the transmittance (the second transmittance map), A represents the atmospheric light value, J(x)t(x) represents the incident light attenuation term, which is used to describe the radiation component after the reflected light of the target is attenuated in the propagation medium, and A[1 - t(x)] represents the atmospheric light imaging model, which is used to describe the radiation component generated by the scattering of the environmental atmospheric light on the target.

[0099] In the embodiment of the present invention, a tolerance mechanism is introduced. The lower limit value of the transmittance is set to t0, then the dehazed image:

[0100]

[0101] In the embodiment of the present invention, after the dehazed image is obtained in step S105, an automatic color level algorithm is used to perform image enhancement processing on the dehazed image to improve the brightness of the dehazed image, so that the dehazed image has high color fidelity and rich texture details.

[0102] Figure 4 Shows the processing effect diagram of the image dehazing method of the embodiment of the present invention on the image to be processed. According to Figure 4 It can be seen that compared with the traditional dehazing algorithm based on the physical model principle - the dark channel prior dehazing algorithm, the image dehazing method of the embodiment of the present invention improves the dehazing effect of the river patrol video image.

[0103] According to the river patrol video image dehazing method described in steps S101 - S105 and Figure 4It can be seen that the present invention segments the image to be processed by using an adaptive threshold segmentation method to obtain the sky region and the non-sky region. When the proportion of the sky region is greater than a preset value, the first transmittance map is obtained by using the ratio re-estimation method according to the sky region and the non-sky region. When the proportion of the sky region is less than or equal to the preset value, the first transmittance map is calculated by using the dark channel model, and the atmospheric light value is calculated based on different scenes, which improves the accuracy and precision of the calculation of the transmittance map of the image to be processed. Subsequently, the first transmittance map is refined by using the fast guided filtering algorithm, which solves the problem of halo effect in the defogged image; by introducing a tolerance mechanism, the defogged image is calculated by using a fogging model based on the image to be processed, the atmospheric light value and the second transmittance map, which suppresses the color distortion phenomenon in the defogged image; compared with the traditional defogging method for river patrol video images, the defogging method for river patrol video images in the embodiment of the present invention has a lower calculation complexity and a shorter defogging processing time for river patrol video images, meeting the real-time requirement. The overall transmittance of the image is estimated by using a weighted fusion method of the bright channel model and the dark channel model. The transmittance of the sky domain is calculated by using the bright channel model, while the transmittance of the non-sky domain is calculated by using the dark channel prior method. The comprehensive transmittance map is calculated by the weighted fusion of the sky domain and non-sky domain objects, and finally the transmittance is finely optimized by using guided filtering.

[0104] Secondly, a defogging system for river patrol video images according to an embodiment of the present application is described with reference to the accompanying drawings.

[0105] Figure 5 FIG. is a schematic structural diagram of a defogging system for river patrol video images according to an embodiment of the present application.

[0106] The system specifically includes:

[0107] A first module 501, configured to segment the image to be processed by using an adaptive threshold segmentation method to obtain the sky region and the non-sky region of the image to be processed;

[0108] A second module 502, configured to confirm that the proportion of the sky region is greater than a preset value, take the average brightness value of the target pixel region as the atmospheric light value, and calculate a first transmittance map according to the sky region and the non-sky region, where the target pixel region is a region composed of 1% of the pixels with the largest brightness among the pixels corresponding to the sky region, and the proportion of the sky region is the proportion of the pixels corresponding to the sky region in the total pixels of the image to be processed;

[0109] A third module 503, configured to confirm that the proportion of the sky region is less than or equal to the preset value, calculate the atmospheric light value of the image to be processed by using the quadtree region iteration method, and calculate the transmittance of the sky region and the non-sky region by using the dark channel model to obtain the first transmittance map;

[0110] The fourth module 504 is configured to refine the first transmittance map by using a fast guided filtering algorithm to obtain a second transmittance map;

[0111] The fifth module 505 is configured to calculate a defogged image based on the second transmittance map, the atmospheric light value, and the image to be processed, based on a tolerance mechanism and a fogging model.

[0112] It can be seen that the content in the above method embodiments is applicable to the system embodiments of the present invention. The functions specifically implemented in the system embodiments of the present invention are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those in the above method embodiments.

[0113] Refer to Figure 6 , an embodiment of the present application provides a defogging device for a river patrol video image, including:

[0114] At least one processor 601;

[0115] At least one memory 602, configured to store at least one program;

[0116] When the at least one program is executed by the at least one processor 601, the at least one processor 601 is caused to implement a defogging method for a river patrol video image as described in steps S101 - S105.

[0117] Similarly, the content in the above method embodiments is applicable to the device embodiments of the present invention. The functions specifically implemented in the device embodiments of the present invention are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those in the above method embodiments.

[0118] In some alternative embodiments, the functions / operations mentioned in the block diagram may not occur in the order mentioned in the operation diagram. For example, depending on the functions / operations involved, two consecutive blocks shown may actually be executed substantially simultaneously or the blocks can sometimes be executed in the reverse order. In addition, the embodiments presented and described in the flowcharts of the present application are provided by way of example for the purpose of providing a more comprehensive understanding of the technology. The disclosed methods are not limited to the operations and logical flows presented herein. Alternative embodiments are expected, in which the order of various operations is changed and the sub - operations described as part of a larger operation are executed independently.

[0119] In addition, although the present application has been described in the context of functional modules, it should be understood that, unless otherwise stated to the contrary, one or more of the functions and / or features may be integrated in a single physical device and / or software module, or one or more functions and / or features may be implemented in separate physical devices or software modules. It should also be understood that a detailed discussion of the actual implementation of each module is not necessary for understanding the present application. Rather, considering the attributes, functions, and internal relationships of the various functional modules in the devices disclosed herein, the actual implementation of the modules will be understood within the ordinary skills of an engineer. Thus, those skilled in the art can implement the present application as set forth in the claims without undue experimentation. It should also be understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present application, which is determined by the full scope of the appended claims and their equivalents.

[0120] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several programs for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The foregoing storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs.

[0121] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable programs for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by a program execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other systems that can retrieve and execute programs from a program execution system, apparatus, or device), or in conjunction with these program execution systems, apparatuses, or devices. For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by or in conjunction with a program execution system, apparatus, or device.

[0122] More specific examples (nonexhaustive list) of computer-readable media include the following: an electrical connection (electronic device) having one or more wirings, a portable computer diskette (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable media can even be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other media, followed by editing, interpretation, or other suitable processing as necessary, and then stored in a computer memory.

[0123] It should be understood that various parts of the present application can be implemented by hardware, software, firmware, or a combination thereof. In the above-described embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable program execution system. For example, if implemented by hardware, as in another embodiment, any one or a combination of the following techniques well known in the art can be used: discrete logic circuits having logic gate circuits for implementing logical functions on data signals, application specific integrated circuits having appropriate combinational logic gate circuits, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.

[0124] In the foregoing description of the present specification, the description with reference to the terms "one embodiment / example", "another embodiment / example", or "certain embodiments / examples", etc. means that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0125] Although the embodiments of the present application have been shown and described, those of ordinary skill in the art can understand that various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principles and spirit of the present application, and the scope of the present application is defined by the claims and their equivalents.

[0126] The above has specifically described the preferred embodiments of the present application, but the present application is not limited to the described embodiments. Those skilled in the art can also make various equivalent deformations or substitutions without departing from the spirit of the present application, and these equivalent deformations or substitutions are all included within the scope defined by the claims of the present application.

Claims

1. A method for dehazing river patrol video images, characterized in that, Including the following steps: Using an adaptive threshold segmentation method to segment the image to be processed, obtaining the sky region and non-sky region of the image to be processed; Confirming that the proportion of the sky region is greater than a preset value, taking the average brightness value of the target pixel region as the atmospheric light value, and calculating a first transmission rate map using the ratio re-estimation method based on the sky region and the non-sky region. The target pixel region is composed of 1% of the pixels with the maximum brightness in the pixels corresponding to the sky region, and the proportion of the sky region is the proportion of the pixels corresponding to the sky region in the total pixels of the image to be processed; Confirming that the proportion of the sky region is less than or equal to the preset value, using the quadtree region iteration method to calculate the atmospheric light value for the image to be processed, and using the dark channel model to calculate the transmission rate of the sky region and the non-sky region, obtaining the first transmission rate map; Using a fast guided filtering algorithm to refine the first transmission rate map, obtaining a second transmission rate map; Based on the second transmission rate map, the atmospheric light value, and the image to be processed, calculating a dehazed image based on the tolerance mechanism and the fogging model.

2. The fog removal method for river patrol video images according to claim 1, characterized in that, The step of using an adaptive threshold segmentation method to segment the image to be processed, obtaining the sky region and non-sky region of the image to be processed, includes: Segmenting the image to be processed, obtaining a number of first image blocks; Using the trough in the bimodal characteristic of the image dark channel map as the threshold to segment each of the first image blocks, obtaining the sub-sky region and sub-non-sky region in each of the first image blocks; Integrating each of the sub-sky regions to obtain the sky region, and integrating each of the sub-non-sky regions to obtain the non-sky region.

3. A method for removing haze from river patrol video images according to claim 1, characterized in that, The step of calculating a first transmission rate map using the ratio re-estimation method based on the sky region and the non-sky region includes: Using a brightness model to calculate the transmission rate of the sky region, generating a transmission rate map of the sky region; Using the dark channel model to calculate the transmission rate of the non-sky region, generating a transmission rate map of the non-sky region; Based on the weight ratio of the sky region and the non-sky region, performing weighted fusion on the transmission rate map of the sky region and the transmission rate map of the non-sky region, generating the first transmission rate map.

4. A method for removing haze from river patrol video images according to claim 1, characterized in that The step of using the quadtree region iteration method to calculate the atmospheric light value for the image to be processed includes: Taking the image to be processed as the current image; Dividing the current image into four equal parts, obtaining four second image blocks; Calculating the average brightness value of each of the second image blocks; Selecting a third image block according to the average brightness value of the second image blocks. The third image block is the image block with the maximum average brightness value among each of the second image blocks; If the average brightness value of the third image block is greater than or equal to a preset brightness limit value, taking the third image block as the current image, and then returning to the step of dividing the current image into four equal parts to obtain four second image blocks until the average brightness value of the third image block is less than the brightness limit value; If the average brightness value of the third image block is less than the brightness limit value, the average brightness value of the third image block is used as the atmospheric light value.

5. A method for dehazing river patrol video images according to claim 1, characterized in that After calculating the defogged image based on the second transmittance map, the atmospheric light value, and the image to be processed, according to the tolerance mechanism and the fogging model, the river patrol video image defogging method further includes: Performing image enhancement processing on the defogged image by using an automatic color level algorithm.

6. A method for dehazing a river patrol video image according to claim 1, characterized in that, Before segmenting the image to be processed by using an adaptive threshold segmentation method to obtain the sky region and the non-sky region of the image to be processed, the river patrol video image defogging method further includes: Obtaining the image to be processed.

7. A method for removing fog from river patrol video images according to claim 6, characterized in that The obtaining the image to be processed includes: Obtaining video data; Extracting the key frames of the video data; Performing filtering and denoising on the key frames to obtain the image to be processed.

8. A fog-removing system for river patrol video images, characterized in that, Including: A first module, configured to segment the image to be processed by using an adaptive threshold segmentation method to obtain the sky region and the non-sky region of the image to be processed; A second module, configured to confirm that the proportion of the sky region is greater than a preset value, take the average brightness value of the target pixel region as the atmospheric light value, and calculate a first transmittance map according to the sky region and the non-sky region, where the target pixel region is composed of 1% of the pixels with the maximum brightness among the pixels corresponding to the sky region, and the proportion of the sky region is the proportion of the pixels corresponding to the sky region in the total pixels of the image to be processed; A third module, configured to confirm that the proportion of the sky region is less than or equal to the preset value, calculate the atmospheric light value by using a quadtree region iteration method for the image to be processed, and calculate the transmittance of the sky region and the non-sky region by using a dark channel model to obtain the first transmittance map; A fourth module, configured to refine the first transmittance map by using a fast guided filter algorithm to obtain a second transmittance map; A fifth module, configured to calculate a defogged image based on the second transmittance map, the atmospheric light value, and the image to be processed, according to the tolerance mechanism and the fogging model.

9. A fog-removing device for river patrol video images, characterized in that, Including: At least one processor; At least one memory, configured to store at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements a river patrol video image defogging method according to any one of claims 1-7.

10. A storage medium storing a program executable by a processor, characterized in that, The program executable by the processor, when executed by the processor, is used to implement a river patrol video image defogging method according to any one of claims 1-7.