Water environment monitoring method based on image vision

Through the water environment monitoring method based on image vision, combined with infrared spectral imaging and ultrasonic ranging, the rapid and accurate identification of the mutation layer of the water body and dynamic monitoring strategy adjustment are achieved, solving the problems of inflexible monitoring and large errors in traditional methods, and improving the accuracy and efficiency of water quality monitoring.

CN120558873AActive Publication Date: 2025-08-29ANHUI PAN LAKE ECOLOGICAL TECH CO LTD

Patent Information

Application Number
CN202510752353.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-06
Publication Date
2025-08-29
Estimated Expiration
2045-06-06

AI Technical Summary

Technical Problem

Traditional water quality monitoring methods are difficult to quickly and accurately identify the mutation layer in water bodies, and lack flexibility and adaptability, so they cannot adjust monitoring strategies in a timely manner to adapt to the dynamic changes in water quality.

Method used

Using a water environment monitoring method based on image vision, water body images are taken vertically by underwater cameras, color differences are calculated to identify the mutation layer, and when the turbidity exceeds the threshold, infrared spectral imaging works in concert with ultrasonic distance measurement, correct the layered positioning error, and update the monitoring plan in real time.

Benefits of technology

It improves the accuracy and efficiency of water quality stratified monitoring, can accurately identify the mutation layer of water quality, and adjust the monitoring strategy in real time according to dynamic changes in water quality, reducing the risk of resource waste and misjudgment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120558873A_ABST
    Figure CN120558873A_ABST
Patent Text Reader

Abstract

The invention discloses a water environment monitoring method based on image vision, and relates to the technical field of water environments, and the method comprises the steps: continuously shooting water body images of different depths at preset intervals in the vertical direction through an underwater camera; calculating the color difference of two adjacent pictures, and determining a water quality mutation layer; when it is detected that the turbidity in the water quality abrupt change layer interval exceeds a preset threshold value, infrared spectral imaging and ultrasonic ranging cooperative work is switched, the penetrability characteristic of an infrared image and ultrasonic depth calibration data are combined, the layering positioning error is corrected, and the water quality abrupt change layer interval is obtained. Through vertical interval shooting, color difference analysis, infrared and ultrasonic collaborative correction and a dynamic sampling strategy, the precision and efficiency of water quality layered monitoring are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of water environment, and in particular is a water environment monitoring method based on image vision. Background Art

[0002] With the development of economy and the improvement of living standards, people are paying more and more attention to environmental protection. Human production and life activities have led to changes in the physical and chemical characteristics of water bodies, causing water quality deterioration and causing serious harm to human life and health.

[0003] Traditional water quality monitoring methods rely heavily on chemical analysis, focusing primarily on changes in the chemical composition of water. However, physical properties of water, such as color, can also reveal important information about water quality. Traditional methods don't fully utilize these changes, resulting in incomplete monitoring results.

[0004] Furthermore, within water bodies, water quality can mutate at different depths or locations due to factors such as flow, temperature, and pollutant distribution, forming so-called water quality mutation zones. Due to technical limitations, traditional monitoring methods struggle to quickly and accurately identify these mutation zones, failing to capture key moments of water quality change. Furthermore, water quality is not static but constantly changes due to a variety of dynamic factors. Traditional monitoring methods often employ fixed monitoring schemes, lacking flexibility and adaptability. This makes it difficult to adjust monitoring strategies in response to dynamic changes in water quality, making them difficult to meet monitoring needs in practical applications. Summary of the Invention

[0005] The purpose of the present invention is to provide a water environment monitoring method based on image vision, which solves the technical problems of quickly and accurately identifying mutation layers in water bodies and timely adjusting monitoring strategies according to dynamic changes in water quality.

[0006] A water environment monitoring method based on image vision, comprising:

[0007] S1, continuously capturing water images at different depths along the vertical direction at preset intervals using an underwater camera;

[0008] S2. Calculate the color difference between two adjacent photos and determine the water quality mutation layer;

[0009] S3: When the turbidity in the water quality mutation layer exceeds the preset threshold, it switches to infrared spectral imaging and ultrasonic ranging to work together, combining the penetrating characteristics of the infrared image with the ultrasonic depth calibration data to correct the layered positioning error;

[0010] S4. Based on the revised stratification boundaries, the sampling depth and interval of subsequent monitoring are updated in real time to generate a monitoring plan that matches the current water quality stratification.

[0011] As a further solution of the present invention, the step S2 further includes pre-processing the water body images at each depth, specifically including:

[0012] Perform Gaussian filtering on the image to reduce noise and eliminate interference from bubbles and suspended matter;

[0013] Sobel edge detection algorithm is used to extract the area where the chromaticity value mutation occurs;

[0014] The intervals where the area overlap rate of the chromaticity mutation regions at adjacent depths is less than 80% are marked as candidate regions for stratification.

[0015] As a further solution of the present invention: after the stratified candidate regions are obtained by the markers, the following method is used for verification:

[0016] Continuously collect several groups of image data, and compare the standard deviation of the chromaticity values ​​of adjacent depth images for each group of images;

[0017] If the color value standard deviation difference exceeds the threshold value for a continuous preset number of times, the stratification is confirmed to be valid; otherwise, the stratification is confirmed to be invalid;

[0018] Timestamps are added to the confirmed layer boundaries and compared with historical data to generate a layer migration trend chart.

[0019] As a further solution of the present invention: if the colorimetric value standard deviation difference exceeds the threshold value for a continuous preset number of times, the method further includes:

[0020] If the difference in the standard deviation of the chromaticity values ​​exceeds the threshold for a preset number of times, the area overlap rate of the chromaticity mutation area of ​​each group of adjacent depth images is calculated, and the average is taken to obtain the stratification feature stability index. If the stratification feature stability index is greater than 60%, the stratification is confirmed to be valid. Otherwise, the confidence level of the stratification is reduced.

[0021] As a further solution of the present invention: the calculation formula of the layered characteristic stability index is:

[0022] Among them, S ovver,i is the overlapping area of ​​the mutation region of the i-th group of images, S area,h,i and S area,h+Δh,i are the chromaticity mutation area of ​​the depth layer h in the i-th group of images and the chromaticity mutation area of ​​the adjacent depth layer h+Δh in the i-th group of images, respectively. N is the number of continuously collected image groups, which is used to evaluate the stability of hierarchical features in a continuous time period. i is the i-th group of images, representing the image data of a certain frame or a certain moment in the time series.

[0023] As a further solution of the present invention: the turbidity measurement method in S3 is:

[0024] Compare the brightness and darkness of infrared images and calculate image contrast parameters;

[0025] When the infrared image contrast is less than 0.3, the turbidity is judged to be ≥50 NTU.

[0026] As a further solution of the present invention: the formula for calculating the color difference between two adjacent photos in S2 is:

[0027] Among them, ΔC is a multi-parameter dynamic color difference index, which is used to measure the color change amplitude. The larger the value, the more significant the color difference. k represents the color difference of the kth color channel, ω k Dynamic weights are automatically assigned according to water quality types to highlight the differences in key color channels. k is the temperature compensation coefficient, which is used to correct the influence of water temperature on color. ∈ is the denominator correction term, which is used to eliminate the interference of brightness difference on chromaticity change.

[0028] As a further solution of the present invention: the dynamically adjusted monitoring solution includes:

[0029] Expand the depth range by 10% above and below the revised stratification boundary as the key monitoring area;

[0030] Compress the sampling interval in key monitoring areas to 30%-50% of the original interval.

[0031] As a further solution of the present invention: the method for generating a monitoring plan matching the current water quality stratification in step S4 is:

[0032] A1: After calculating the multi-parameter dynamic color difference index ΔC, divide it into low difference, medium difference, and high difference intervals, and adjust the sampling interval according to the interval in which the multi-parameter dynamic color difference index ΔC is located;

[0033] A2: After calculating the stratification characteristic index SI, it is divided into high stability, medium stability, and low stability areas. The stratification boundary expansion range is determined according to the range of the stratification characteristic stability index SI;

[0034] A3: Calculate and adjust the scope of key monitoring areas and sampling intervals in real time, and record the parameters and corresponding monitoring results for each adjustment;

[0035] A4: Regularly analyze historical data, optimize parameter thresholds and adjust rules.

[0036] As a further solution of the present invention: after step A1, the following steps are further included:

[0037] When adjusting the sampling interval based on ΔC, historical data is combined for judgment. If ΔC is in the high difference range for two consecutive times, but two of the previous three times are in the low difference range, the sampling interval is compressed by 40%. If ΔC is in the low difference range, the original sampling interval is maintained. If ΔC is in the medium difference range, the sampling interval is compressed to 50% of the original interval. If ΔC is in the high difference range and does not meet the above conditions, the sampling interval is compressed to 30% of the original interval.

[0038] Compared with the prior art, the present invention has the following beneficial effects:

[0039] The present invention improves the accuracy and efficiency of water quality stratification monitoring through vertical interval shooting, color difference analysis, infrared and ultrasonic coordinated correction and dynamic sampling strategy: it can not only intuitively locate the water quality mutation layer through images, but also use infrared penetration and ultrasonic depth calibration to solve the failure problem of traditional visual monitoring in turbid environments. It can also dynamically optimize the sampling scheme according to real-time stratification to reduce resource waste, and by adding spatial stability testing of the mutation area, form a strict judgment condition of significant change + stable existence, which is conducive to reducing the risk of misjudgment. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 Schematic diagram of the framework structure of the method of the present invention. DETAILED DESCRIPTION

[0041] The technical solutions of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0042] See also Figure 1 , this application provides a water environment monitoring method based on image vision, comprising:

[0043] S1, continuously capturing water images at different depths along the vertical direction at preset intervals using an underwater camera;

[0044] It should be understood that water bodies at different depths may have different water quality characteristics. Underwater cameras can be used to obtain intuitive image information of water bodies at different depths, providing basic data for subsequent water quality analysis and stratification.

[0045] Use an underwater camera with good waterproof performance, start from the water surface and move downward in the vertical direction. The preset interval refers to the vertical distance between each camera shot. The interval can be flexibly set according to actual monitoring needs, water environment characteristics and other factors; for example, in water bodies with relatively uniform water quality, the preset interval can be set larger; and in areas where water quality changes may be more complex, such as estuaries and near industrial sewage outlets, the preset interval should be set smaller to more accurately capture water quality changes. For example, in general lake monitoring, the preset interval may be set to half a meter, that is, starting from 1 meter below the water surface, a water image is taken every half meter, and images of different depths such as 1 meter, 1.5 meters, and 2 meters are obtained in turn.

[0046] It should be further explained that when the camera is taking pictures underwater, the camera has a built-in ring fill light, and the brightness of the light is automatically adjusted according to the water depth. Specifically:

[0047] For example, at a water depth of 5 meters, the fill light intensity is 1.5 times the basic brightness.

[0048] S2. Calculate the color difference between two adjacent photos and determine the water quality mutation layer;

[0049] It should be understood that by comparing the color differences between two adjacent photos, it is possible to discover the vertical color changes of the water body. Obvious color changes often reflect a sudden change in water quality. Therefore, this color difference can be used to determine the location of the water quality sudden change layer.

[0050] For example, if the color difference between two adjacent photos in a certain depth range exceeds a certain threshold, it can be determined that there is a clear dividing line in the depth range, and this depth range can be marked as a water quality mutation layer.

[0051] S3: When the turbidity in the water quality mutation layer exceeds the preset threshold, it switches to infrared spectral imaging and ultrasonic ranging to work together, combining the penetrating characteristics of the infrared image with the ultrasonic depth calibration data to correct the layered positioning error;

[0052] It should be understood that within the water quality mutation layer, turbidity may affect the accuracy of image visual monitoring. Therefore, when the turbidity exceeds the preset threshold, relying solely on images taken by underwater cameras may not be able to accurately determine the stratification boundary. Therefore, it is necessary to switch to a monitoring technology more suitable for turbid environments, that is, to use infrared spectral imaging and ultrasonic ranging to work together to correct the stratification positioning error;

[0053] Furthermore, after detecting the water quality mutation layer, a turbidity sensor is used to monitor the turbidity in the interval in real time. When the turbidity exceeds the preset threshold, the infrared spectral imaging device and the ultrasonic rangefinder are activated. The infrared spectral imaging device uses the penetrating characteristics of infrared light to obtain relatively clear image information in turbid water bodies, helping to identify the distribution and stratification of substances in the water body; the ultrasonic rangefinder determines the distance at different depths by emitting ultrasonic waves and measuring their reflection time, providing it with accurate depth calibration data. The infrared image information and ultrasonic depth calibration data are fused and processed, and the layered positioning error previously determined based on image vision is corrected through algorithm analysis.

[0054] Furthermore, the above embodiment is achieved by equipping a suitable turbidity sensor, an infrared spectrum imaging device and an ultrasonic rangefinder, and the operating frequency of the ultrasonic ranging module is 200kHz-2MHz, and the ranging period and the camera frame rate maintain a synchronization ratio of 1:5.

[0055] S4. Based on the revised stratification boundaries, the sampling depth and interval of subsequent monitoring are updated in real time to generate a monitoring plan that matches the current water quality stratification.

[0056] It should be understood that the specific depth range of each water quality layer is determined based on the corrected stratification boundaries, and then the sampling depth and interval of subsequent monitoring are adjusted in real time based on these stratification conditions. For example, if the thickness of a water quality layer is small and the changes are more complex, the sampling interval within the layer can be appropriately reduced and the density of sampling points can be increased; for layers with more uniform water quality, the sampling interval can be appropriately increased. Finally, a new monitoring plan is generated based on the adjusted sampling depth and interval, which is conducive to ensuring that subsequent monitoring work can be carried out more targeted.

[0057] As an optional embodiment, the step S2 further includes pre-processing the water body images at each depth, specifically including:

[0058] Perform Gaussian filtering on the image to reduce noise and eliminate interference from bubbles and suspended matter;

[0059] Sobel edge detection algorithm is used to extract the area where the chromaticity value mutation occurs;

[0060] The intervals where the area overlap rate of the chromaticity mutation regions at adjacent depths is less than 80% are marked as candidate regions for stratification.

[0061] It should be understood that Gaussian filtering is first performed to reduce noise. For the noise generated by bubbles and suspended matter in underwater images, the standard deviation of the Gaussian kernel is dynamically adjusted according to the turbidity of the water body. The three RGB channels are processed separately to eliminate interference and retain the true stratification boundary. Then, the Sobel edge detection algorithm is used to calculate the image gradient through a specific convolution kernel. The threshold is adaptively determined using the Otsu algorithm. Combined with non-maximum suppression and hysteresis threshold processing, the chromaticity value mutation area is extracted. ROI limitation and color space conversion are also optimized. Finally, the area overlap rate of adjacent depth chromaticity mutation areas is calculated, and the interval with an overlap rate of less than 80% is marked as a stratification candidate area. The threshold is set according to experimental data and can be dynamically adjusted. This preprocessing link provides reliable stratification candidate areas for subsequent steps through three-level filtering, and also solves problems such as dynamic interference of bubbles and uneven illumination of the water body.

[0062] Furthermore, the threshold is set based on:

[0063] Experimental data support: By simulating a stratified scenario in a laboratory water tank (such as clear water on the upper layer and blue ink on the lower layer), it was found that the average overlap rate of adjacent depth mutation areas in real stratification was 65%±10%, while the overlap rate of fixed objects was generally >90%. Therefore, 80% was selected as the distinction threshold to balance the missed detection rate (<5%) and the false detection rate (<10%).

[0064] Dynamic adjustment mechanism: For the "dynamic turbidity layer" caused by large algal blooms, the threshold can be temporarily adjusted to 75% to increase sensitivity to weak stratification.

[0065] As an optional embodiment, after the hierarchical candidate regions are obtained by marking, the following method is used for verification:

[0066] Continuously collect several groups of image data, and compare the standard deviation of the chromaticity values ​​of adjacent depth images for each group of images;

[0067] If the color value standard deviation difference exceeds the threshold value for a continuous preset number of times, the stratification is confirmed to be valid; otherwise, the stratification is confirmed to be invalid;

[0068] Timestamps are added to the confirmed layer boundaries and compared with historical data to generate a layer migration trend chart.

[0069] It should be understood that N groups of image data are continuously collected at a fixed frequency of 1 group per second, covering a monitoring period of at least 20 seconds (adapting to the natural fluctuation period of water stratification), and the S2 preprocessing steps (Gaussian filtering → Sobel detection → overlap rate screening) are repeated for each group of images to generate a real-time stratified candidate area sequence C = {C1, C2, ..., C N}, thus being able to exclude transient interferences such as bubbles and fish schools, which randomly change positions in consecutive frames while the real layer boundaries are relatively stable;

[0070] Furthermore, the image is converted to the HSV color space, the brightness channel (V channel) is extracted to calculate the standard deviation, and the standard deviation of the V channel pixel values ​​at adjacent depths is calculated separately. The calculation method is the existing calculation method and will not be elaborated on in detail. Then, the absolute difference Δσ of the standard deviation of adjacent depths is calculated to reflect the degree of sudden change in color uniformity in the vertical direction. The threshold setting can still be collected through laboratory simulation experiments. Assume that:

[0071] Real stratified scenarios (e.g., clear-turbid water interface): Δσ has a mean of 25 and a standard deviation of 5, which conforms to the normal distribution.

[0072] Noise scenario (bubbles, suspended matter disturbance): Δσ mean 8, standard deviation 3;

[0073] The verification threshold T is set to 15 (the actual stratification mean - 1σ, ensuring the missed detection rate is less than 16%), and the stratification is confirmed to be valid only when the threshold is exceeded K times in a row (to avoid misjudgment due to a single disturbance), where K times is the preset number of times;

[0074] Effective stratification: If Δσ1>T, Δσ2>T, Δσ3>T (exceeding the limit three times in a row), it is determined to be true stratification;

[0075] Invalid layering: If any Δσ≤T or the number of times the limit is exceeded is less than K times, the candidate area is excluded. For example, if the instantaneous turbidity increases due to the passage of a ship, the Δσ of the subsequent frame falls back to the threshold;

[0076] Then, a high-precision timestamp is recorded for the confirmed layer boundary, and combined with the depth coordinate h to form a spatiotemporal data point (t, h);

[0077] The current stratification data is synchronized with the historical data points of the past 24 hours and 7 days (missing values ​​are filled using linear interpolation), and different types of stratification are marked with different colors with time on the horizontal axis and depth on the vertical axis. The depth difference between adjacent time points is calculated, and the stratification migration speed is marked. This is conducive to effectively filtering out misjudgments caused by instantaneous noise such as bubbles and water flow disturbances, thereby helping to solve the problem of how to distinguish real stratification from accidental interference.

[0078] As an optional embodiment, if the colorimetric value standard deviation difference exceeds the threshold value for a continuous preset number of times, the method further includes:

[0079] If the difference in the standard deviation of the chromaticity values ​​exceeds the threshold for a preset number of times, the area overlap rate of the chromaticity mutation area of ​​each group of adjacent depth images is calculated, and the average is taken to obtain the stratification feature stability index. If the stratification feature stability index is greater than 60%, the stratification is confirmed to be valid. Otherwise, the confidence level of the stratification is reduced.

[0080] The threshold was set based on the following: in a laboratory simulation of a clear and turbid water interface (fixed stratification), the mean stratification feature stability index for 10 consecutive frames was 78% with a standard deviation of 8%, which conforms to a normal distribution (95% confidence interval 62%-94%). In a bubble cluster scenario, the mean stratification feature stability index was 35% with a standard deviation of 20%, showing no obvious central trend. An integer value near the lower limit of the true stratification confidence interval (62%) was selected to ensure a missed detection rate of less than 2.5% while increasing the noise rejection rate to over 85%.

[0081] Further illustrating this with reference to the above embodiment, when Δσ continuously exceeds the limit but the layered feature stability index is less than 60%, the system identifies it as dynamic noise, helping to avoid misjudgments. When Δσ exceeds the limit and the layered feature stability index is greater than 60%, the layering is confirmed to be valid and a migration trend graph is generated. In summary, the preprocessing stage filters out static, non-stationary objects by using a single-frame overlap ratio less than 80%, and the newly added step filters out dynamically stable interfaces by using a multi-frame layered feature stability index greater than 60%, forming a closed loop of joint spatial and temporal filtering.

[0082] Going further, through the three-level confidence model:

[0083] Effective stratification: Δσ continuously exceeds the limit + the mean of stratification characteristic stability index is greater than 60% (confidence level ≥ 90%);

[0084] Suspected stratification: Δσ continuously exceeds the limit by +40% ≤ the mean of the stratification characteristic stability index ≤ 60% and for suspected stratification (confidence level 60%-90%), a sensor review is triggered, such as starting a turbidity meter test, for further analysis;

[0085] Invalid stratification: If Δσ does not exceed the limit or the mean value of the stratification characteristic stability index is less than 40%, this stratification is excluded.

[0086] As an optional embodiment, the calculation formula of the hierarchical feature stability index is:

[0087] Among them, S ovver,i is the overlapping area of ​​the mutation region of the i-th group of images, S area,h,i and S area,h+Δh,i are the chromaticity mutation area of ​​the depth layer h in the i-th group of images and the chromaticity mutation area of ​​the adjacent depth layer h+Δh in the i-th group of images, respectively. N is the number of continuously collected image groups, which is used to evaluate the stability of hierarchical features in a continuous time period. i is the i-th group of images (i=1,2,…,N), which represents the image data of a certain frame or a certain moment in the time series.

[0088] It should be understood that the fractional term It is the Dice similarity coefficient (value range [0,1]), which is used to measure the degree of overlap between two regions. The overlap index of a single set of images is magnified by multiplying by 2, which is more conducive to sensitively reflecting small overlap changes: if the value is 0, the two regions have no overlap; if the value is 1, the two regions completely overlap. The role of N is to avoid single-frame noise interference through the statistical average of multiple sets of image data and ensure the temporal consistency of hierarchical features. The role of i is to calculate the overlap independently for each set of images and then eliminate accidental fluctuations through averaging. S area,h,i With S area,h+Δh,i The role of is to normalize the overlapping area by the sum of the areas of the two regions in the denominator to avoid evaluation bias caused by differences in regional sizes.

[0089] As an optional embodiment, the turbidity measurement method in S3 is:

[0090] Compare the brightness and darkness of infrared images and calculate image contrast parameters;

[0091] When the infrared image contrast is less than 0.3, the turbidity is judged to be ≥50 NTU.

[0092] Specifically, the degree of brightness difference of the target area in the infrared image is calculated as follows: Among them, I max is the maximum grayscale value, the brightest pixel, reflecting the infrared light intensity, I min is the minimum grayscale value (the darkest pixel, reflecting the attenuation of infrared light);

[0093] Value range: C∈[0,1]. The larger the value, the stronger the contrast between light and dark, and the clearer the water. The smaller the value, the weaker the contrast, and the more turbid the water.

[0094] The value of 0.3 was calibrated based on the following: water samples with different turbidity levels (0-200 NTU) were placed in a laboratory tank, infrared images were collected, and contrast was calculated. The average contrast value corresponding to 50 NTU was 0.28, and the safety threshold (0.3) was adjusted upward by 10%. This ensured that when C < 0.3, the accuracy rate for turbidity ≥ 50 NTU was > 90% (missing rate < 10%).

[0095] Furthermore, by excluding the reflective area of ​​the device at the edge of the image (such as the camera housing and bracket), the contrast is calculated only for the central area of ​​the water body (occupying 70% of the image area) to avoid interference. The median filter (3x3 kernel) is used to remove the salt and pepper noise, and then the histogram equalization is used to enhance the local contrast to ensure the stability of the calculation. For the real-time judgment process, the infrared camera is triggered to capture the water image at the depth h, and the central area of ​​400x400 pixels is cropped as the analysis object; the ROI pixels are traversed to obtain I max and I min , substitute into the formula to calculate C;

[0096] Threshold determination: If C < 0.3, the turbidity is determined to be ≥ 50 NTU, triggering the infrared-ultrasonic collaborative mode of S3; otherwise, visible light image monitoring is maintained.

[0097] Furthermore, when S2 detects a water quality mutation layer, it determines whether correction is needed through turbidity measurement:

[0098] Clear water (C≥0.3, turbidity<50NTU): The visible light image is clear enough, no need to switch, just press S4 to update the monitoring plan;

[0099] Turbid water (C < 0.3, turbidity ≥ 50 NTU): Visible light images may be blurred. Infrared imaging (strong penetration) and ultrasonic ranging (precise ranging) are activated to correct layer positioning errors. Infrared images can supplement the missing information of visible light in turbid environments, while ultrasonic ranging can perform depth calibration of the layer boundaries located by infrared images, solving the problem of blurred boundaries caused by scattering in infrared imaging.

[0100] As an optional embodiment, the formula for calculating the color difference between two adjacent photos in S2 is:

[0101] Among them, ΔC is a multi-parameter dynamic color difference index, which is used to measure the color change amplitude. The larger the value, the more significant the color difference. k represents the color difference of the kth color channel, ω k Dynamic weights are automatically assigned according to water quality types to highlight the differences in key color channels. k is the temperature compensation coefficient, which is used to correct the influence of water temperature on color. ∈ is the denominator correction term, which is used to eliminate the interference of brightness difference on chromaticity change.

[0102] It should be understood that K=1, 2, 3 correspond to R / G / C channels respectively.

[0103] Furthermore, the difference between the pixel values ​​corresponding to the Kth color channel (R / G / B) in two adjacent photos is calculated. The specific formula is: in represents the pixel value of the kth channel of the i-th photo, Indicates the pixel value of the corresponding channel of the adjacent i+1th photo.

[0104] Specifically, by traversing the image pixel by pixel, calculating the difference of the R / G / B channels of each pixel, and then averaging the differences of all pixels to obtain the overall color difference of the channel.

[0105] ω kDifferent weights are assigned to the R / G / B channels based on different water quality types to highlight color channels that are sensitive to water quality changes. A machine learning model (such as a random forest or support vector machine) is trained on historical water quality data (including water quality type labels and corresponding image RGB channel changes) to establish a "water quality type-weight assignment" mapping relationship. During real-time monitoring, the corresponding weight is automatically applied based on the initial water quality type (e.g., using auxiliary parameters such as turbidity and pH).

[0106] For t k Water temperature changes will affect the absorption and scattering characteristics of water to light, thereby changing the color performance. By setting t k Correct the interference of temperature on color channel differences, the calculation formula is t k =1+α k (T-T0), where T is the current water temperature, T0 is the standard reference temperature, and α k is the temperature sensitivity coefficient of the kth channel, determined by experiments.

[0107] The brightness change of the image may cause the overall value of the RGB channel to shift, resulting in false color differences. Used to normalize color difference and eliminate brightness interference, when brightness difference causes ΔC in all channels k When it increases at the same time, the square and square root operations of the denominator will make the value of ΔC relatively stable, avoid misjudgment, ∈ a very small positive number, prevent the denominator from being 0, and ensure the stability of the formula calculation.

[0108] Judgment rules:

[0109] When the ΔC calculation results exceed the threshold for at least two consecutive times, a water quality mutation determination is triggered. This means that a water quality mutation is considered to have occurred only when the color difference reaches a certain level in two consecutive measurements. This can avoid misjudgments caused by occasional measurement errors or short-term anomalies, and improve the accuracy and reliability of the determination.

[0110] If the absolute value of the difference between two consecutive ΔC values ​​in the calculated result fluctuation is greater than 30%, the camera focus calibration is initiated. This is because a large fluctuation may indicate a problem with the camera's shooting status, such as a change in focus, resulting in unstable photo quality, which in turn affects the color difference calculation results. By timely calibrating the camera focus, it can be ensured that subsequent photos can accurately reflect the true color of the water body, making the multi-parameter dynamic color difference index calculated based on the photos more realistically reflect changes in water quality, helping to avoid misjudgments caused by equipment problems;

[0111] The setting of threshold T requires comprehensive consideration of various factors, such as different water quality types, monitoring environment, and historical data. Generally speaking, a reasonable threshold can be determined by statistically analyzing a large number of multi-parameter dynamic color difference indices under normal water quality conditions. Under normal circumstances, the ΔC value rarely exceeds this threshold, while a true sudden change in water quality will exceed the threshold and be detected. Furthermore, the threshold can be adjusted and optimized based on actual conditions to improve the accuracy and reliability of the judgment.

[0112] In summary, through the above formula through the dynamic weight ω k and temperature compensation t k , achieve adaptive adjustment for different water quality types and environmental conditions (temperature, light);

[0113] Through dynamic adjustment of multiple parameters and combination of multiple parameters such as water quality type and temperature, the color difference calculation is closely linked to the actual water quality changes, providing a more targeted and scientific basis for determining the mutation layer, and achieving high-precision and adaptive color difference calculation. It provides core technical support for the accurate identification of water quality mutation layers and significantly improves the reliability and adaptability of water environment monitoring.

[0114] As an optional embodiment, the dynamically adjusted monitoring scheme includes:

[0115] Expand the depth range by 10% above and below the revised stratification boundary as the key monitoring area;

[0116] Compress the sampling interval in key monitoring areas to 30%-50% of the original interval.

[0117] It should be understood that in water environment monitoring, the boundaries of water quality stratification are not fixed and will drift due to factors such as water flow and temperature changes. Therefore, expanding the depth range above and below the revised stratification boundary by 10% as the key monitoring area can effectively cover the natural drift range of the stratification boundary.

[0118] The sampling interval in key monitoring areas is compressed to 30%-50% of the original interval in order to more accurately capture water quality changes in stratified areas. A denser sampling point setting can obtain more detailed water quality data, greatly improving the resolution of water quality changes, helping to promptly detect sudden changes in water quality, and providing more accurate data support for pollution tracing and emergency response. On the one hand, it accurately focuses on key monitoring areas to avoid ineffective monitoring of non-critical areas and saves data storage and transmission resources; on the other hand, flexible sampling interval adjustment ensures high-sensitivity monitoring of water quality changes in key areas, and to a certain extent reduces equipment operating energy consumption, improves the operating efficiency and economy of the monitoring system, and is suitable for long-term and stable monitoring of a variety of complex water environments.

[0119] As an optional embodiment, the method for generating a monitoring plan that matches the current water quality stratification in step S4 is:

[0120] A1: After calculating the multi-parameter dynamic color difference index ΔC, divide it into low difference, medium difference, and high difference intervals, and adjust the sampling interval according to the interval in which the multi-parameter dynamic color difference index ΔC is located;

[0121] It should be understood that through statistical analysis of a large amount of historical monitoring data, combined with the color difference characteristics under different water quality change scenarios, the threshold is determined, and the corresponding water quality stable and no obvious change scenarios are divided into low difference intervals (ΔC < 0.3), and the water quality may be gradually changed. It is divided into a medium difference interval (0.3 ≤ ΔC < 0.6), and the change trend is captured in time, and the water quality undergoing significant mutations is divided into a high difference interval (ΔC ≥ 0.6).

[0122] Furthermore, by collecting water body images in real time, ΔC and SI are calculated synchronously and mapped to corresponding intervals respectively, which is helpful to provide a basis for subsequent adjustments.

[0123] A2: After calculating the stratification characteristic index SI, it is divided into high stability, medium stability, and low stability areas. The stratification boundary expansion range is determined according to the range of the stratification characteristic stability index SI;

[0124] It should be understood that according to the quantitative results of stratification stability by SI value, a threshold is set. If the stratification boundary is stable, it is divided into a high stability interval (SI ≥ 70%), and the expansion ratio is set to 10% to cover small drifts. If there is a certain fluctuation in the stratification, it is divided into a medium stability interval (60% ≤ SI < 70%), and the expansion ratio needs to be increased to 15% to ensure that the boundary changes are effectively monitored. If the stratification boundary is unstable, it is divided into a low stability interval (SI < 60%), which may be affected by water flow and environmental factors. The expansion ratio is set to 20% to expand the monitoring range.

[0125] Furthermore, in water environment monitoring, corresponding measures need to be taken according to different indicator states. Through the analysis of a large amount of historical data and comprehensive consideration of multiple factors such as monitoring accuracy and stability, different interval thresholds of the hierarchical characteristic stability index SI are determined. The same applies to other threshold values.

[0126] A3: Calculate and adjust the scope of key monitoring areas and sampling intervals in real time, and record the parameters and corresponding monitoring results for each adjustment;

[0127] It should be understood that the scope of key monitoring areas and sampling intervals should be adjusted according to the above rules, and the parameters of each adjustment (such as adjustment time, ΔC value, SI value, new sampling interval and expansion ratio) and corresponding monitoring results (such as water quality parameters, image data) should be recorded to form a complete monitoring log.

[0128] A4: Regularly analyze historical data, optimize parameter thresholds and adjust rules.

[0129] It should be understood that historical data should be analyzed regularly (e.g., weekly or monthly), and machine learning algorithms (e.g., regression analysis and reinforcement learning) should be used to explore data patterns, dynamically optimize the interval thresholds of ΔC and SI, the sampling interval compression ratio, and the stratification boundary expansion ratio, so that the monitoring plan can continuously adapt to different water environments and changing trends.

[0130] As an optional embodiment, the step A1 further includes:

[0131] When adjusting the sampling interval based on ΔC, historical data is combined for judgment. If ΔC is in the high difference range for two consecutive times, but two of the previous three times are in the low difference range, the sampling interval is compressed by 40%. If ΔC is in the low difference range, the original sampling interval is maintained. If ΔC is in the medium difference range, the sampling interval is compressed to 50% of the original interval. If ΔC is in the high difference range and does not meet the above conditions, the sampling interval is compressed to 30% of the original interval.

[0132] It should be understood that if ΔC is in the high difference range (ΔC ≥ 0.6) twice in a row, but two of the previous three times are in the low difference range (ΔC < 0.3), it means that the current high difference may be a random fluctuation. In this case, the sampling interval compression ratio is set to 40%, which not only retains sensitivity to potential changes but also avoids resource waste. This rule can prevent the system from continuously sampling at a high frequency due to short-term anomalies.

[0133] When ΔC is in the low difference range, it indicates that the water quality is stable, and the original sampling interval is maintained to reduce data redundancy and equipment energy consumption;

[0134] When ΔC is in the medium difference range (0.3≤ΔC<0.6), it suggests that there is a gradual change trend in water quality. Compressing the sampling interval to 50% of the original interval helps to ensure that the details of the changes are captured;

[0135] If ΔC is in the high difference range and does not meet the hysteresis factor conditions, it is determined to be a true water quality mutation, and the sampling interval is compressed to 30% of the original interval to achieve high-frequency monitoring;

[0136] In summary, filtering short-term fluctuations can help avoid misjudgments caused by accidental factors and make the sampling strategy more in line with actual water quality changes.

[0137] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. A water environment monitoring method based on image vision, characterized in that: include: S1, continuously capturing water images at different depths along the vertical direction at preset intervals using an underwater camera; S2. Calculate the color difference between two adjacent photos and determine the water quality mutation layer; S3: When the turbidity in the water quality mutation layer exceeds the preset threshold, it switches to infrared spectral imaging and ultrasonic ranging to work together, combining the penetrating characteristics of the infrared image with the ultrasonic depth calibration data to correct the layered positioning error; S4. Based on the revised stratification boundaries, the sampling depth and interval of subsequent monitoring are updated in real time to generate a monitoring plan that matches the current water quality stratification.

2. The water environment monitoring method based on image vision according to claim 1, characterized in that: The step S2 also includes pre-processing the water body images at each depth, specifically including: Perform Gaussian filtering on the image to reduce noise and eliminate interference from bubbles and suspended matter; Sobel edge detection algorithm is used to extract the area where the chromaticity value mutation occurs; The intervals where the area overlap rate of the chromaticity mutation regions at adjacent depths is less than 80% are marked as candidate regions for stratification.

3. The water environment monitoring method based on image vision according to claim 2, characterized in that: After the markers are obtained as candidate regions for stratification, verification is performed using the following method: Continuously collect several groups of image data, and compare the standard deviation of the chromaticity values ​​of adjacent depth images for each group of images; If the color value standard deviation difference exceeds the threshold value for a continuous preset number of times, the stratification is confirmed to be valid; otherwise, the stratification is confirmed to be invalid; Timestamps are added to the confirmed layer boundaries and compared with historical data to generate a layer migration trend chart.

4. The water environment monitoring method based on image vision according to claim 3 is characterized in that: If the color value standard deviation difference exceeds the threshold value for a continuous preset number of times, the method further includes: If the difference in the standard deviation of the chromaticity values ​​exceeds the threshold for a preset number of times, the area overlap rate of the chromaticity mutation area of ​​each group of adjacent depth images is calculated, and the average is taken to obtain the stratification feature stability index. If the stratification feature stability index is greater than 60%, the stratification is confirmed to be valid. Otherwise, the confidence level of the stratification is reduced.

5. The water environment monitoring method based on image vision according to claim 1, characterized in that: The calculation formula of the hierarchical characteristic stability index is: Among them, S ovver,i is the overlapping area of ​​the mutation region of the i-th group of images, S area,h,i and S area,h+Δh,i are the chromaticity mutation area of ​​the depth layer h in the i-th group of images and the chromaticity mutation area of ​​the adjacent depth layer h+Δh in the i-th group of images, respectively. N is the number of continuously collected image groups, which is used to evaluate the stability of hierarchical features in a continuous time period. i is the i-th group of images, representing the image data of a certain frame or a certain moment in the time series.

6. The water environment monitoring method based on image vision according to claim 1, characterized in that: The turbidity measurement method in S3 is: Compare the brightness and darkness of infrared images and calculate image contrast parameters; When the infrared image contrast is less than 0.3, the turbidity is judged to be ≥50 NTU.

7. The water environment monitoring method based on image vision according to claim 5, characterized in that: The formula for calculating the color difference between two adjacent photos in S2 is: Among them, ΔC is a multi-parameter dynamic color difference index, which is used to measure the color change amplitude. The larger the value, the more significant the color difference. k represents the color difference of the kth color channel, ω k Dynamic weights are automatically assigned according to water quality types to highlight the differences in key color channels. k is the temperature compensation coefficient, which is used to correct the influence of water temperature on color. ∈ is the denominator correction term, which is used to eliminate the interference of brightness difference on chromaticity change.

8. The water environment monitoring method based on image vision according to claim 7, characterized in that: The dynamically adjusted monitoring plan includes: Expand the depth range by 10% above and below the revised stratification boundary as the key monitoring area; Compress the sampling interval in key monitoring areas to 30%-50% of the original interval.

9. The water environment monitoring method based on image vision according to claim 8, characterized in that: The method for generating a monitoring plan that matches the current water quality stratification in step S4 is: A1: After calculating the multi-parameter dynamic color difference index ΔC, divide it into low difference, medium difference, and high difference intervals, and adjust the sampling interval according to the interval in which the multi-parameter dynamic color difference index ΔC is located; A2: After calculating the stratification characteristic index SI, it is divided into high stability, medium stability, and low stability areas. The stratification boundary expansion range is determined according to the range of the stratification characteristic stability index SI; A3: Calculate and adjust the scope of key monitoring areas and sampling intervals in real time, and record the parameters and corresponding monitoring results for each adjustment; A4: Regularly analyze historical data, optimize parameter thresholds and adjust rules.

10. The water environment monitoring method based on image vision according to claim 9, characterized in that: After step A1, the following steps are also included: When adjusting the sampling interval based on ΔC, historical data is combined for judgment. If ΔC is in the high difference range for two consecutive times, but two of the previous three times are in the low difference range, the sampling interval is compressed by 40%. If ΔC is in the low difference range, the original sampling interval is maintained. If ΔC is in the medium difference range, the sampling interval is compressed to 50% of the original interval. If ΔC is in the high difference range and does not meet the above conditions, the sampling interval is compressed to 30% of the original interval.

Citation Information

Patent Citations

  • Three-dimensional layered water quality monitoring method and three-dimensional layered water quality monitoring system

    CN106290770A

  • Water quality monitoring and water depth measuring system and monitoring method thereof

    CN117129042A

  • Water area information digital monitoring system and method based on artificial intelligence

    CN117269162A

  • Water quality index prediction system based on surface water

    CN118533759A

  • Small and micro water body water quality inversion method and system based on unmanned aerial vehicle spectrum image

    CN118937254A

Cited By

  • Water dispenser temperature control method and system based on frequency spectrum feedback

    CN121050490A

  • Water dispenser temperature control method and system based on spectrum feedback

    CN121050490B

  • Radiator performance detection device and detection method

    CN122016175A