Method and system for processing water area image in fog environment
Through a high-resolution camera, the data with the highest image quality is selected for RGB three-channel conversion, dark channel calculation, transmittance analysis and defogging treatment, which solves the problem of incomplete defogging treatment of water images in the prior art. A more effective fog removal effect is achieved.
Patent Information
- Application Number
- CN202411591494.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-02-18
AI Technical Summary
The prior art has a single process of defogging on water images in a fogging environment, and cannot comprehensively remove mist interference, resulting in poor defogging effect.
Through a high-resolution camera, a cloud database is built, the image data with the highest image quality is selected for RGB three-channel conversion, dark channel images are calculated, transmittance is analyzed, guide filtering and defog treatment are performed, and contrast stretching is performed to Enhance image quality.
The comprehensive defogging treatment of water images in foggy environments is achieved, and the comprehensiveness and effectiveness of the defogging image processing results are improved.
Smart Images

Figure CN119485040A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a method and system for processing water area images in a foggy environment. Background Art
[0002] Image dehazing technology aims to remove fog interference in images and improve image clarity and visibility. It analyzes the degradation model caused by fog on the image and uses physical model methods, learning-based methods, etc. The physical model method restores the image based on the principle of atmospheric scattering; the learning-based method uses a large amount of data to learn the characteristics of fog to achieve dehazing.
[0003] However, for water images, the defogging process of currently available defogging technology is single and cannot perform defogging on foggy water images in a comprehensive manner, so there is still a lot of room for improvement in the defogging effect.
[0004] To this end, we proposed a method and system for processing water images in foggy environments. Summary of the invention
[0005] In view of the above-mentioned shortcomings of the prior art, the present invention provides a method and system for processing water area images in a foggy environment, which solves the technical problems raised in the above-mentioned background technology.
[0006] To achieve the above objectives, the present invention is implemented through the following technical solutions:
[0007] In a first aspect, a method for processing a water area image in a foggy environment comprises:
[0008] Step 1: Continuously collect images of the target water area based on a high-resolution camera, build a cloud database, use the cloud database to receive the target water area image data collected by the high-resolution camera, and store the target water area image data;
[0009] Step 2: traverse the target water area image data stored in the cloud database, identify the image quality of each target water area image data stored in the cloud database, select a group of target water area images with the highest image quality as conversion targets, and convert the selected target water area images into RGB three-channel images;
[0010] Step 3: Calculate the minimum value of each pixel in the target water area image converted into an RGB three-channel image in the RGB three-channel image to obtain a single-channel dark channel image;
[0011] Step 4: Analyze the transmittance of the dark channel image corresponding to the target water area image when it is collected, and perform guided filtering operation based on the transmittance and the dark channel image corresponding to the target water area image to obtain the filtered transmittance; Step 5: Defog the target water area image according to the filtered transmittance, and output the defog target water area image;
[0012] Step 6: Perform contrast stretching on the dehazed target water area image to enhance the quality of the dehazed target water area image.
[0013] Furthermore, when the high-resolution camera in step 1 continuously collects images of the target water area, it is subject to: deploying at least two groups of wind speed sensors equidistantly at the image collection boundary position of the target water area, and when the high-resolution camera collects images of the target water area, the wind speed sensor is used to collect the real-time wind speed by riding the wind, and the average is calculated and recorded as the average wind speed in mm / s;
[0014] Among them, when the average wind speed is X mm / s, the frequency of the high-resolution camera continuously collecting the target water area image is X times / s. When the cloud database stores the target water area image data, each group of target water area image data is marked with an acquisition timestamp. Based on the acquisition timestamp marked with the target water area image data, the target water area image data is sorted in descending order based on the acquisition time in the cloud database.
[0015] Furthermore, the image quality of the target water area image data is determined by the following formula:
[0016]
[0017] Where: Q is the quality of the target water area image data; M and N are the length and width of the image; I(x, y) is the pixel value at the (x, y) position in the target water area image data; J(x, y) is the pixel value at the (x, y) position in another target water area image data collected adjacent to the target water area image data;
[0018] The quality of each target water area image data is calculated based on the above formula.
[0019] Furthermore, the dark channel image output formula of the target water area image conversion is:
[0020]
[0021] Where: J dark (x) is the value of the dark channel image at pixel x; Ω(x) is the local area centered at pixel x; c is the color channel; I c (y) is the value of the color channel c of the original input image I at pixel y.
[0022] Furthermore, the transmittance calculation formula is:
[0023]
[0024] Where: t(x) is the transmittance; ω is a constant; c is the color channel; I c (x) is the value of the color channel c of the original input image I at pixel x; A c is the atmospheric light value under color channel c;
[0025] The value of constant ω is defined by the user, and the default value of constant ω is 0.95. The transmittance after filtering is recorded as
[0026] Furthermore, the defogging logic of the target water area image is expressed as:
[0027]
[0028] Where: J(x) is the target water area image after defogging; I(x) is the original target water area image; A is the atmospheric light value; is the transmittance after filtering;
[0029] Among them, the atmospheric light value A comes from the original target water area image during the acquisition stage.
[0030] Furthermore, the contrast stretching processing operation of the target water area image after the defogging process is as follows:
[0031]
[0032] Where: J(x) new is the target water area image after contrast stretching processing and defogging; I max ,I min The maximum grayscale value and the minimum grayscale value in the target water area image J(x) after defogging;
[0033] Among them, the I max ,I min The value range is 0 to 255.
[0034] Furthermore, the target water area image obtained by processing the target water area image in steps 2 to 6 is transmitted to the cloud database in real time and iterated.
[0035] In a second aspect, a system for processing water area images in a foggy environment includes:
[0036] An acquisition module, used for acquiring image data of target waters;
[0037] A storage module, used for receiving the target water area image data collected by the collection module;
[0038] A selection module is used to traverse the target water area image data stored in the storage module and select a group of target water area image data as a processing target;
[0039] A filtering module is used to receive the target water area image data selected in the selection module, and perform filtering processing on the target water area image data to output the target water area image data after defogging;
[0040] The enhancement module is used to obtain the target water area image after the defogging process, and perform image enhancement by contrast stretching processing on the target water area image after the defogging process.
[0041] Furthermore, the acquisition module is interactively connected to the storage module via a wireless network, the storage module is interactively connected to the selection module, the filtering module and the enhancement module via a wireless network, and the filtering module and the enhancement module are interactively connected to the storage module via a wireless network.
[0042] Compared with the known public technology, the technical solution provided by the present invention has the following beneficial effects:
[0043] The present invention provides a method and system for processing water area images in a foggy environment. During the execution of the method, a group of foggy water area images with the best quality are obtained by continuously collecting foggy water area images, and the foggy water area images are further continuously processed by RGB channel image conversion, filtering, defogging and enhancement, so as to bring a more comprehensive defogging effect to the foggy water area images, improve the comprehensiveness and effectiveness of the defogging image processing results, and at the same time, through the operation of the above-mentioned system, further step execution logic support is provided for the execution of the above-mentioned method, ensuring that the technical solution composed of the method and the system brings a more stable defogging effect to the foggy water area images. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0045] Figure 1 A flowchart of a method for processing water area images in a foggy environment is shown;
[0046] Figure 2 The figure is a schematic diagram of the structure of a system for processing water images in a foggy environment. DETAILED DESCRIPTION
[0047] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0048] In the description of this application, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, "plurality" means two or more, unless otherwise clearly and specifically defined.
[0049] In the description of the present application, the term "for example" is used to mean "used as an example, illustration or description". Any embodiment described as "for example" in the present application is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is given to enable any technician in the field to implement and use the present invention. In the following description, details are listed for the purpose of explanation. It should be understood that a person of ordinary skill in the art can recognize that the present invention can be implemented without using these specific details. In other examples, well-known structures and processes will not be elaborated in detail to avoid unnecessary details to obscure the description of the present invention. Therefore, the present invention is not intended to be limited to the embodiments shown, but is consistent with the widest scope consistent with the principles and features disclosed in the present application.
[0050] Embodiment 1:
[0051] A method for processing a water area image in a foggy environment in this embodiment is as follows: Figure 1 As shown, including:
[0052] Step 1: Continuously collect images of the target water area based on a high-resolution camera, build a cloud database, use the cloud database to receive the target water area image data collected by the high-resolution camera, and store the target water area image data;
[0053] Step 2: traverse the target water area image data stored in the cloud database, identify the image quality of each target water area image data stored in the cloud database, select a group of target water area images with the highest image quality as conversion targets, and convert the selected target water area images into RGB three-channel images;
[0054] The image quality of the target water area image data is determined by the following formula:
[0055]
[0056] Where: Q is the quality of the target water area image data; M and N are the length and width of the image; I(x, y) is the pixel value at the (x, y) position in the target water area image data; J(x, y) is the pixel value at the (x, y) position in another target water area image data collected adjacent to the target water area image data;
[0057] Wherein, the quality of each target water area image data is calculated based on the above formula;
[0058] Step 3: Calculate the minimum value of each pixel in the target water area image converted into an RGB three-channel image in the RGB three-channel image to obtain a single-channel dark channel image;
[0059] The dark channel image output formula of the target water area image conversion is:
[0060]
[0061] Where: J dark (x) is the value of the dark channel image at pixel x; Ω(x) is the local area centered at pixel x; c is the color channel; I c (y) is the value of the color channel c of the original input image I at pixel y;
[0062] Step 4: Analyze the transmittance of the dark channel image corresponding to the target water area image during acquisition, and perform guided filtering operation based on the transmittance and the dark channel image corresponding to the target water area image to obtain the filtered transmittance;
[0063] The transmittance calculation formula is:
[0064]
[0065] Where: t(x) is the transmittance; ω is a constant; c is the color channel; I c (x) is the value of the color channel c of the original input image I at pixel x; A c is the atmospheric light value under color channel c;
[0066] The value of constant ω is defined by the user, and the default value of constant ω is 0.95. The transmittance after filtering is recorded as
[0067] Step 5: Defogging the target water area image according to the filtered transmittance, and outputting the defogging target water area image;
[0068] The defogging logic of the target water area image is expressed as:
[0069]
[0070] Where: J(x) is the target water area image after defogging; I(x) is the original target water area image; A is the atmospheric light value; is the transmittance after filtering;
[0071] Among them, the atmospheric light value A comes from the original target water area image during the acquisition stage;
[0072] Step 6: Perform contrast stretching processing on the dehazed target water area image to enhance the quality of the dehazed target water area image;
[0073] The contrast stretching operation of the target water area image after defogging is as follows:
[0074]
[0075] Where: J(x) new is the target water area image after contrast stretching processing and defogging; I max ,I min The maximum grayscale value and the minimum grayscale value in the target water area image J(x) after defogging;
[0076] Among them, I max ,I min The value range is 0 to 255.
[0077] In this embodiment, by executing the method steps in the above embodiment, a more comprehensive defogging effect is brought to the foggy water area image, thereby improving the comprehensiveness and effectiveness of the defogging image processing results.
[0078] Embodiment 2:
[0079] In terms of specific implementation, based on Example 1, this example refers to Figure 1 The method for processing a water area image in a foggy environment in Example 1 is further described in detail:
[0080] When the high-resolution camera continuously collects images of the target water area in step 1, the following shall be followed: at least two sets of wind speed sensors are deployed equidistantly at the image collection boundary position of the target water area; when the high-resolution camera collects images of the target water area, the wind speed sensor is used to collect the real-time wind speed and calculate the average value, which is recorded as the average wind speed in mm / s;
[0081] Among them, when the average wind speed is Xmm / s, the frequency of the high-resolution camera continuously collecting the target water area image is X times / s. When the cloud database stores the target water area image data, each group of target water area image data is marked with an acquisition timestamp. Based on the acquisition timestamp marked with the target water area image data, the target water area image data is sorted in descending order based on the acquisition time in the cloud database.
[0082] like Figure 1 As shown, the target water area image of the target water area image processing result in steps 2 to 6 is transmitted to the cloud database in real time and iterated.
[0083] In this embodiment, through the above settings, further step execution logic and data support are provided for the method in Example 1, ensuring that the method in Example 1 stably performs defogging processing on water images in a foggy environment.
[0084] Embodiment 3:
[0085] In terms of specific implementation, based on Example 1, this example refers to Figure 2 The method for processing a water area image in a foggy environment in Example 1 is further described in detail:
[0086] A system for processing water area images in a foggy environment, comprising:
[0087] An acquisition module, used for acquiring image data of target waters;
[0088] A storage module, used for receiving the target water area image data collected by the collection module;
[0089] A selection module is used to traverse the target water area image data stored in the storage module and select a group of target water area image data as a processing target;
[0090] A filtering module is used to receive the target water area image data selected in the selection module, and perform filtering processing on the target water area image data to output the target water area image data after defogging;
[0091] An enhancement module is used to obtain the target water area image after the defogging process, and perform image enhancement by contrast stretching on the target water area image after the defogging process;
[0092] The acquisition module is interactively connected with the storage module via a wireless network, the storage module is interactively connected with the selection module, the filtering module and the enhancement module via a wireless network, and the filtering module and the enhancement module are interactively connected with the storage module via a wireless network.
[0093] In this embodiment, the acquisition module operates to acquire target water area image data, the storage module synchronously receives the target water area image data acquired in the acquisition module, the selection module post-operates to traverse the target water area image data stored in the storage module, selects a group of target water area image data as processing targets, and then the filtering module receives the target water area image data selected in the selection module, performs filtering processing on the target water area image data to output the defogged target water area image data, and finally obtains the target water area image after defogging through the enhancement module, and performs image enhancement processing on the target water area image after defogging by contrast stretching.
[0094] In summary, during the execution of the method in the above embodiment, a group of foggy water area images with the best quality are obtained by continuously collecting foggy water area images, and the foggy water area images are further continuously processed by RGB channel image conversion, filtering, defogging and enhancement, so as to bring a more comprehensive defogging effect to the foggy water area images, and improve the comprehensiveness and effectiveness of the defogging image processing results. At the same time, through the operation of the above system, further step execution logic support is provided for the execution of the above method, ensuring that the technical solution composed of the method and system can bring a more stable defogging effect to the foggy water area images.
[0095] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0096] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A method for processing water area images in a foggy environment, characterized in that: include: Step 1: Continuously collect images of the target water area based on a high-resolution camera, build a cloud database, use the cloud database to receive the target water area image data collected by the high-resolution camera, and store the target water area image data; Step 2: traverse the target water area image data stored in the cloud database, identify the image quality of each target water area image data stored in the cloud database, select a group of target water area images with the highest image quality as conversion targets, and convert the selected target water area images into RGB three-channel images; Step 3: Calculate the minimum value of each pixel in the target water area image converted into an RGB three-channel image in the RGB three-channel image to obtain a single-channel dark channel image; Step 4: Analyze the transmittance of the dark channel image corresponding to the target water area image during acquisition, and perform guided filtering operation based on the transmittance and the dark channel image corresponding to the target water area image to obtain the filtered transmittance; Step 5: Defogging the target water area image according to the filtered transmittance, and outputting the defogging target water area image; Step 6: Perform contrast stretching on the dehazed target water area image to enhance the quality of the dehazed target water area image.
2. The method for processing water area images in a foggy environment according to claim 1, characterized in that: When the high-resolution camera continuously collects images of the target water area in step 1, the following is followed: at least two groups of wind speed sensors are equidistantly deployed at the image collection boundary position of the target water area; when the high-resolution camera collects images of the target water area, the wind speed sensor is used to collect the real-time wind speed and the average is calculated and recorded as the average wind speed in mm / s; Among them, when the average wind speed is X mm / s, the frequency of the high-resolution camera continuously collecting the target water area image is X times / s. When the cloud database stores the target water area image data, each group of target water area image data is marked with an acquisition timestamp. Based on the acquisition timestamp marked with the target water area image data, the target water area image data is sorted in descending order based on the acquisition time in the cloud database.
3. The method for processing water area images in a foggy environment according to claim 1, characterized in that: The image quality of the target water area image data is determined by the following formula: Where: Q is the quality of the target water area image data; M and N are the length and width of the image; I(x, y) is the pixel value at the (x, y) position in the target water area image data; J(x, y) is the pixel value at the (x, y) position in another target water area image data collected adjacent to the target water area image data; The quality of each target water area image data is calculated based on the above formula.
4. The method for processing water area images in a foggy environment according to claim 1, characterized in that: The dark channel image output formula of the target water area image conversion is: Where: J dark (x) is the value of the dark channel image at pixel x; Ω(x) is the local area centered at pixel x; c is the color channel; I c (y) is the value of the color channel c of the original input image I at pixel y.
5. The method for processing water area images in a foggy environment according to claim 1, characterized in that: The transmittance calculation formula is: Where: t(x) is the transmittance; ω is a constant; c is the color channel; I c (x) is the value of the color channel c of the original input image I at pixel x; A c is the atmospheric light value under color channel c; The value of constant ω is defined by the user, and the default value of constant ω is 0.
95. The transmittance after filtering is recorded as 6. The method for processing water area images in a foggy environment according to claim 1, characterized in that: The defogging logic of the target water area image is expressed as: Where: J(x) is the target water area image after defogging; I(x) is the original target water area image; A is the atmospheric light value; is the transmittance after filtering; Among them, the atmospheric light value A comes from the original target water area image during the acquisition stage.
7. The method for processing water area images in a foggy environment according to claim 1, characterized in that: The contrast stretching processing operation of the target water area image after the defogging process is as follows: Where: J(x) new is the target water area image after contrast stretching processing and defogging; I max ,I min The maximum grayscale value and the minimum grayscale value in the target water area image J(x) after defogging; Among them, the I max ,I min The value range is 0 to 255.
8. The method for processing water area images in a foggy environment according to claim 1, characterized in that: The target water area image of the target water area image processing result in steps 2 to 6 is transmitted and iterated in real time to the cloud database.
9. A system for processing water area images in a foggy environment, wherein the method is an implementation system of the system for processing water area images in a foggy environment as claimed in any one of claims 1 to 8, characterized in that: include: An acquisition module, used for acquiring image data of target waters; A storage module, used for receiving the target water area image data collected by the collection module; A selection module is used to traverse the target water area image data stored in the storage module and select a group of target water area image data as a processing target; A filtering module is used to receive the target water area image data selected in the selection module, and perform filtering processing on the target water area image data to output the target water area image data after defogging; The enhancement module is used to obtain the target water area image after the defogging process, and perform image enhancement by contrast stretching processing on the target water area image after the defogging process.
10. The system for processing water area images in a foggy environment according to claim 9, characterized in that: The acquisition module is interactively connected to the storage module via a wireless network, the storage module is interactively connected to the selection module, the filtering module and the enhancement module via a wireless network, and the filtering module and the enhancement module are interactively connected to the storage module via a wireless network.