Water environment monitoring method based on image vision

By using an image-based water environment monitoring method that combines infrared spectral imaging and ultrasonic ranging, the system can identify water quality abrupt change layers in real time and adjust monitoring strategies accordingly. This addresses the shortcomings of traditional water quality monitoring methods and achieves high-precision and efficient dynamic water quality monitoring.

CN120558873BActive Publication Date: 2025-12-23ANHUI PAN LAKE ECOLOGICAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Traditional water quality monitoring methods are difficult to quickly and accurately identify abrupt change layers in water bodies, and lack flexibility and adaptability, making it impossible to adjust monitoring strategies in a timely manner to adapt to dynamic changes in water quality.

Method used

A water environment monitoring method based on image vision is adopted. The underwater camera captures water images vertically, calculates color differences to identify abrupt change layers, and switches to infrared spectral imaging and ultrasonic ranging in combination when the turbidity exceeds the threshold to correct the layer positioning error and update the monitoring plan in real time.

Benefits of technology

It improves the accuracy and efficiency of water quality stratification monitoring, can accurately identify water quality abrupt change layers, and can adjust monitoring strategies in real time according to dynamic changes in water quality, reducing resource waste and the risk of misjudgment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120558873B_ABST
    Figure CN120558873B_ABST
Patent Text Reader

Abstract

The application discloses a kind of water environment monitoring methods based on image vision, it is related to water environment technical field, by underwater camera, with preset interval, the image of water body of different depth is continuously photographed along vertical direction;The color difference of adjacent two photos is calculated, to determine water quality mutation layer;When detecting that turbidity in water quality mutation layer interval exceeds preset threshold, switch to infrared spectrum imaging and ultrasonic ranging collaborative work, in combination with the penetration characteristics of infrared image and ultrasonic depth calibration data, correct stratification positioning error, the present application is photographed by vertical interval, color difference analysis, infrared and ultrasonic collaborative correction and dynamic sampling strategy, it is favorable to improve the precision and efficiency of water quality stratification monitoring.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of water environment, and specifically relates to a water environment monitoring method based on image vision. BACKGROUND

[0002] With the development of economy and the increasing improvement of living standards, people pay more and more attention to environmental protection. Human production activities and living activities lead to changes in the physicochemical characteristics of water bodies, causing water quality deterioration, which seriously endangers human life and health.

[0003] Traditional water quality monitoring methods mostly rely on chemical analysis methods and mainly focus on changes in the chemical composition of water quality. However, the physical properties of water bodies, such as color differences, can also reflect some important information about water quality. Traditional methods do not fully utilize these changes in physical properties, resulting in deficiencies in the comprehensiveness of monitoring results.

[0004] In addition, due to the influence of factors such as water flow, temperature, and pollutant distribution, water quality may change abruptly at different depths or regions, forming so-called water quality mutation layers. Due to technical limitations, traditional monitoring methods are difficult to quickly and accurately identify these mutation layers, and cannot timely capture the key nodes of water quality changes. Moreover, the water quality of water bodies is not static and unchanging, but is constantly changing under the influence of various dynamic factors. Traditional monitoring methods often use fixed monitoring schemes, lack flexibility and adaptability, and are difficult to adjust monitoring strategies in a timely manner according to the dynamic changes in water quality, thus making it difficult to meet monitoring needs in practical applications. SUMMARY

[0005] The purpose of the present application is to provide a water environment monitoring method based on image vision, which solves the technical problem 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 shooting water body images at different depths along the vertical direction at a preset interval through an underwater camera;

[0008] S2, calculating the color difference between adjacent two photos to determine the water quality mutation layer;

[0009] S3, when detecting that the turbidity in the water quality mutation layer interval exceeds a preset threshold, switching to the cooperative work of infrared spectrum imaging and ultrasonic ranging, combining the penetration characteristics of infrared images and ultrasonic depth calibration data to correct the layer positioning error;

[0010] S4, according to the corrected layer boundary, real-time updating the sampling depth and interval of subsequent monitoring, and generating a monitoring scheme matched with the current water quality layering.

[0011] As a further scheme of the present application: the S2 further includes preprocessing of each depth water body image, specifically including:

[0012] Gaussian filtering is performed on the image to reduce noise and eliminate bubble and suspended matter interference;

[0013] The Sobel edge detection algorithm is used to extract the color value mutation area;

[0014] The interval where the area overlap rate of the color value mutation areas of adjacent depths is less than 80% is marked as a stratification candidate area.

[0015] As a further scheme of the present application: after the stratification candidate area is marked, the following method is used for verification:

[0016] A plurality of groups of image data are continuously collected, and the standard deviation difference of the color value of the adjacent depth images is compared for each group of images;

[0017] If the standard deviation difference of the color value exceeds the threshold value for a preset number of times, it is confirmed that the stratification is effective, otherwise it is confirmed that the stratification is ineffective;

[0018] The confirmed stratification boundary is marked with a time stamp, and a stratification migration trend graph is generated by comparing with historical data.

[0019] As a further scheme of the present application: after the standard deviation difference of the color value exceeds the threshold value for a preset number of times, before confirming that the stratification is effective, it further includes:

[0020] If the standard deviation difference of the color value exceeds the threshold value for a preset number of times, the area overlap rate of the color value mutation area of each group of adjacent depth images is calculated, the mean value is obtained to get the stratification feature stability index, if the stratification feature stability index is greater than 60%, it is confirmed that the stratification is effective, otherwise the confidence of the stratification is reduced.

[0021] As a further scheme of the present application: the calculation formula of the stratification feature stability index is:

[0022] Wherein, S ovver,i is the overlapping area of the mutation area of the i-th group of images, S area,h,i and S area,h+Δh,i are the color value mutation area of the depth layer h in the i-th group of images and the color value mutation area of the adjacent depth layer h+Δh in the i-th group of images, respectively, the color value mutation area of the adjacent depth layer h+Δh in the i-th group of images, N is the number of continuously collected image groups, used to evaluate the stability of the stratification feature in a continuous time period, i is the i-th group of images, indicating the image data of a certain frame or a certain time in the time sequence.

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

[0024] Contrast the light and dark of the infrared image, calculate the image contrast parameter;

[0025] When the infrared image contrast < 0.3, determine that the turbidity is greater than or equal to 50 NTU.

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

[0027] Wherein, ΔC is a multi-parameter dynamic color difference index, used to measure the color change amplitude, the larger the value, the more significant the color difference, ΔC k represents the color difference of the kth color channel, ω k is a dynamic weight, which is automatically assigned according to the water quality type, highlighting the difference of the key color channel, t k is a temperature compensation coefficient, used to correct the influence of water temperature on color, and ∈ is a denominator correction term, used to eliminate the interference of brightness difference on color difference.

[0028] As a further scheme of the present application: the dynamically adjusted monitoring scheme includes:

[0029] Expand the corrected layered boundary by 10% in depth range on both sides as the key monitoring area;

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

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

[0032] A1: After obtaining 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 of the multi-parameter dynamic color difference index ΔC;

[0033] A2: After obtaining the stratification feature index SI, divide it into high stability, medium stability and low stability intervals, and determine the stratification boundary expansion range according to the interval of the stratification feature stability index SI;

[0034] A3: Real-time calculation and adjustment of the key monitoring area range and sampling interval, recording the parameters and corresponding monitoring results of each adjustment;

[0035] A4: Regularly analyze historical data to optimize parameter thresholds and adjustment rules.

[0036] As a further scheme of the present application: the A1 step further includes:

[0037] When adjusting the sampling interval according to the AC, in combination with historical data, if the AC is in the high difference interval for two consecutive times, but two of the previous three times are in the low difference interval, the sampling interval compression ratio is taken as 40%, if the AC is in the low difference interval, the original sampling interval is maintained, if the AC is in the medium difference interval, the sampling interval is compressed to 50% of the original interval, if the AC is in the high difference interval 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 beneficial effects of the present application are:

[0039] The present application improves the accuracy and efficiency of water quality stratification monitoring through vertical interval shooting, color difference analysis, infrared and ultrasonic wave cooperative correction and dynamic sampling strategy: not only can the water quality mutation layer be located intuitively through images, but also the failure problem of traditional visual monitoring can be solved by using the infrared penetration and ultrasonic depth calibration in turbid environment, and the sampling scheme can be dynamically optimized according to real-time stratification, reducing resource waste, and through increasing the spatial stability test of mutation area, forming the strict judgment condition of significant change + stable existence, which is conducive to reducing the risk of misjudgment. BRIEF DESCRIPTION OF DRAWINGS

[0040] Figure 1 It is a schematic diagram of the method framework structure of the present application. DETAILED DESCRIPTION

[0041] The technical solutions of the present application will be described below in conjunction with the embodiments, obviously, the described embodiments are only part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor belong to the scope of protection of the present application.

[0042] Please refer to Figure 1 The present application provides a water environment monitoring method based on image vision, comprising:

[0043] S1, continuously shooting water body images of different depths along the vertical direction by the underwater camera at a preset interval;

[0044] It should be understood that different depths of water body may have different water quality characteristics, and the intuitive image information of different depths of water body is obtained by the underwater camera, which provides basic data for subsequent water quality analysis and stratification;

[0045] The underwater camera with good waterproof performance is used to move downward along the vertical direction from the water surface, and the preset interval refers to the vertical distance between each time of shooting of the camera. The interval can be flexibly set according to actual monitoring requirements, water body environmental characteristics and other factors. For example, in a water body with relatively uniform water quality, the preset interval can be set to be relatively large. In areas where the water quality change may be relatively complex, such as the estuary, the vicinity of industrial sewage outlets and the like, the preset interval should be set to be relatively small, so as to more accurately capture the water quality change. For example, in general lake monitoring, the preset interval can be set to half a meter, that is, starting from 1 meter below the water surface, a water body image is shot every half meter, and images at different depths of 1 meter, 1.5 meters, 2 meters and the like are sequentially obtained.

[0046] It should be further explained that when the underwater camera takes a photo, the camera is provided with a ring-shaped light supplement lamp, and the brightness of the light is automatically adjusted according to the water depth, specifically as follows:

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

[0048] S2, calculate the color difference of the adjacent two photos to determine the water quality mutation layer;

[0049] It should be understood that by comparing the color difference of the adjacent two photos, the color change of the water body in the vertical direction can be found, and the obvious change of the color often reflects the mutation of the water quality, so the color difference can be used to determine the position of the water quality mutation layer;

[0050] For example, if the color difference of the adjacent two photos in a certain depth interval exceeds a certain threshold value, it can be judged that there is an obvious boundary line in the depth interval, and the depth interval is marked as the water quality mutation layer.

[0051] S3, when it is detected that the turbidity in the water quality mutation layer interval exceeds the preset threshold value, switching to the cooperative work of infrared spectrum imaging and ultrasonic ranging, combining the penetration characteristics of the infrared image and the ultrasonic depth calibration data to correct the layering positioning error;

[0052] It should be understood that in the water quality mutation layer interval, the turbidity may affect the accuracy of the image visual monitoring, therefore, when the turbidity exceeds the preset threshold value, the image shot by the underwater camera alone may not be able to accurately determine the layering boundary, so it is necessary to switch to the monitoring technology more suitable for the turbid environment, that is, to cooperate with the infrared spectrum imaging and ultrasonic ranging to correct the layering positioning error;

[0053] Further, after detecting the water quality mutation layer, the 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 range finder are started. The infrared spectral imaging device can obtain relatively clear image information in the turbid water body by using the penetration characteristics of infrared light, helping to identify the material distribution and stratification in the water body. The ultrasonic range finder determines the distance at different depths by emitting ultrasonic waves and measuring the reflection time, providing accurate depth calibration data. The infrared image information and the ultrasonic depth calibration data are fused and processed, and the positioning error of the previous image-based stratification is corrected through algorithm analysis.

[0054] Further, the above embodiment is realized by equipping appropriate turbidity sensors, infrared spectral imaging devices and ultrasonic range finders, and the working frequency of the ultrasonic range finding module is 200 kHz-2 MHz, and the ranging period and the camera frame rate maintain a synchronization ratio of 1:5.

[0055] S4, according to the corrected stratification boundary, real-time update the sampling depth and interval of subsequent monitoring, and generate a monitoring scheme matched with the current water quality stratification.

[0056] It should be understood that according to the corrected stratification boundary, the specific depth range of each water quality stratification is determined, and then according to these stratification conditions, the sampling depth and interval of subsequent monitoring are adjusted in real time. For example, if the thickness of a certain water quality stratification is small and the change is complex, the sampling interval in the stratification can be appropriately reduced to increase the density of sampling points. For the stratification with uniform water quality, the sampling interval can be appropriately increased. Finally, according to the adjusted sampling depth and interval, a new monitoring scheme is generated, which is beneficial to ensure that the subsequent monitoring work can be carried out more targetedly.

[0057] As an optional embodiment, the S2 further includes pre-processing of the image at each depth, specifically including:

[0058] Gaussian filter denoising processing is performed on the image to eliminate bubble and suspended matter interference;

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

[0060] The interval where the area overlap rate of adjacent depth color mutation areas is less than 80% is marked as a stratification candidate area.

[0061] It should be understood that the Gaussian filter denoising is first performed, the noise generated by the bubbles and suspended matters in the underwater image is processed according to the turbidity of the water body, the standard deviation of the Gaussian kernel is dynamically adjusted, the RGB three channels are processed respectively, the interference can be eliminated, the real stratification boundary can be reserved, then the Sobel edge detection algorithm is used, the image gradient is calculated through a specific convolution kernel, the threshold value is adaptively determined by using the Otsu algorithm, the non-maximum suppression and the lag threshold value processing are combined, the color value mutation area is extracted, the ROI limitation and the color space conversion are optimized, finally, the area overlap rate of adjacent depth color value mutation areas is calculated, the interval with an overlap rate less than 80% is marked as a stratification candidate area, the threshold value is set according to experimental data and can be dynamically adjusted, the pre-processing link passes through three levels of filtering, provides reliable stratification candidate areas for subsequent steps, and solves the problems of dynamic bubble interference and uneven water body illumination.

[0062] Further, the threshold value is set according to:

[0063] Experimental data support: through simulation of stratification scenes in a laboratory water tank (such as upper clear water + lower blue ink), it is found that the average overlap rate of adjacent depth mutation areas of real stratification is 65% ± 10%, and the overlap rate of fixed objects is generally > 90%, so 80% is selected as the threshold value to balance the missed detection rate (< 5%) and the false detection rate (< 10%).

[0064] Dynamic adjustment mechanism: for the "dynamic turbidity layer" caused by the large-scale reproduction of algae, the threshold value can be temporarily adjusted to 75% to improve the sensitivity to weak stratification.

[0065] As an optional embodiment, after the stratification candidate area is marked, the following method is used for verification:

[0066] A plurality of groups of image data are continuously collected, and the standard deviation difference of the color value of adjacent depth images is compared for each group of images;

[0067] If the standard deviation difference of the color value exceeds the threshold value for a preset number of times, it is confirmed that the stratification is effective, otherwise, it is confirmed that the stratification is ineffective;

[0068] The confirmed stratification boundary is marked with a time stamp, and a stratification migration trend graph is generated by comparing with historical data.

[0069] It should be understood that N groups of image data are continuously collected at a fixed frequency of 1 group per second, covering at least a 20-second monitoring period (adapted to the natural fluctuation period of the water body stratification), and the S2 preprocessing steps (Gaussian filter → Sobel detection → overlap rate screening) are repeated for each group of images to generate a real-time stratification candidate area sequence C = {C1, C2,..., CN}, so that bubbles, fish groups and other transient interference can be excluded, such noise changes randomly in position in continuous frames, while the real stratification boundary is relatively stable, and the like; N} problems are solved;

[0070] Further, the image is converted to HSV color space, the standard deviation of the brightness channel (V channel) is extracted, the standard deviation of the V channel pixel value of adjacent depth is calculated respectively, the calculation method is the existing calculation method, and no more elaboration is made, and the absolute difference As of the standard deviation of the adjacent depth is calculated, so that the mutation degree of the color uniformity in the vertical direction can be reflected, and the threshold value is still set through laboratory simulation experiment. It is assumed that:

[0071] Real layered scene (such as clear and turbid water interface): the average value of As is 25, and the standard deviation is 5, which conforms to normal distribution;

[0072] Noise scene (bubble, suspended matter disturbance): the average value of As is 8, and the standard deviation is 3;

[0073] The verification threshold T is set to 15 (the average value of the real layering-1σ, to ensure that the false rejection rate is less than 16%), and it is required that the threshold is exceeded for K times in succession (to avoid false judgment caused by single disturbance), and K times is a preset number of times;

[0074] Valid layering: if As1>T, As2>T, and As3>T (continuous three times of over-limit), it is determined that the real layering is determined;

[0075] Invalid layering: if any time As≤T or the number of over-limit times is less than K times, the candidate area is excluded, such as the instantaneous turbidity rise caused by the passing of a ship, and the As of the subsequent frame falls back to the threshold value;

[0076] The confirmed layering boundary is recorded with high-precision time stamp, and the space-time data point (t, h) is formed in combination with the depth coordinate h;

[0077] The current layering data is time-synchronized with the historical data points in the past 24 hours and 7 days (linear interpolation is used to fill in the missing values), the horizontal axis time and the vertical axis depth are marked with different colors, the depth difference of adjacent time points is calculated, and the layering migration speed is marked, which is beneficial to effectively filter the false judgment caused by bubbles, water flow disturbance and other instantaneous noise, thereby helping to solve the problem of how to distinguish the real layering from the accidental disturbance.

[0078] As an optional embodiment, before confirming that the layering is valid, the color value standard deviation difference continuously exceeding the threshold value for a preset number of times further includes:

[0079] If the color value standard deviation difference continuously exceeds the threshold value for a preset number of times, the area overlap rate of each group of adjacent depth image color mutation area is calculated, the average value of the layering feature stability index is obtained, if the layering feature stability index is greater than 60%, the layering is confirmed to be valid, otherwise, the confidence of the layering is reduced.

[0080] The setting of threshold is based on the following: in the laboratory simulated clear and turbid water interface (fixed stratification), the average stratification feature stability index of 10 consecutive frames is 78%, with a standard deviation of 8%, which conforms to the normal distribution (95% confidence interval 62%-94%); in the bubble group scene, the average stratification feature stability index is 35%, with a standard deviation of 20%, and there is no obvious central tendency; an integer value near the lower limit of the real stratification confidence interval (62%) is taken to ensure that the false negative rate is less than 2.5%, while the noise exclusion rate is improved to more than 85%;

[0081] Further in combination with the above embodiments, when Δσ continues to exceed the limit but the stratification feature stability index is less than 60%, the system determines that it is dynamic noise, which is beneficial to avoid misjudgment; when Δσ exceeds the limit and the stratification feature stability index is greater than 60%, it is confirmed that the stratification is effective and a migration trend chart is generated. In summary, the preprocessing stage screens static non-fixed objects by single-frame overlap rate <80%, and the new step screens dynamic stable interface by multi-frame stratification feature stability index >60%, forming a closed loop of space-time joint filtering.

[0082] Further, through a three-level confidence model:

[0083] Effective stratification: Δσ continues to exceed the limit + stratification feature stability index average > 60% (confidence ≥ 90%);

[0084] Suspected stratification: Δσ continues to exceed the limit + 40%≤ stratification feature stability index average ≤ 60%, and for suspected stratification (confidence 60%-90%), a sensor review is triggered, such as starting a turbidity meter detection, for further analysis;

[0085] Invalid stratification: Δσ does not exceed the limit or stratification feature stability index average < 40%, then this stratification is excluded.

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

[0087] Wherein, 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 chroma mutation region area of the depth layer h in the i-th group of images and the chroma mutation region 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, used to evaluate the stability of the stratification feature in a continuous time period, i is the i-th group of images (i=1, 2,..., N), representing image data at a certain frame or time in the time sequence.

[0088] It should be understood that the fractional term The Dice similarity coefficient (value range [0, 1]) is used to measure the degree of overlap of two regions, the overlap index of a single group of images, and the difference is enlarged by multiplying by 2 to facilitate sensitive reflection of small overlap changes: if the value is 0, the two regions have no overlap, and if the value is 1, the two regions are completely overlapped. The role of N is to avoid single-frame noise interference through statistical averaging of multiple groups of image data, and to ensure the time consistency of the hierarchical features. The role of i is to calculate the overlap degree of each group of images independently, and then eliminate accidental fluctuations through averaging. area,h,i The role of S area,h+Δh,i is to normalize the overlap area by the sum of the areas of the two regions in the denominator, avoiding evaluation bias caused by differences in region size.

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

[0090] The light and dark of the infrared image are compared, and the image contrast parameter is calculated.

[0091] When the infrared image contrast is <0.3, it is determined that the turbidity is ≥50 NTU.

[0092] Specifically, the light and dark difference degree of the target region in the infrared image is calculated by the formula Where I max is the maximum gray value, the brightest pixel, reflecting the infrared light intensity, and I min is the minimum gray value (darkest pixel, reflecting the infrared light attenuation).

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

[0094] Where the value of 0.3 is determined according to the configuration of different turbidity water samples (0-200 NTU) in the laboratory tank, the acquisition of infrared images and the calculation of contrast, and the contrast mean value of 50 NTU is 0.28. The safety threshold (0.3) is floated by 10% to ensure that when C <0.3, the accuracy of turbidity ≥50 NTU is >90% (missed judgment rate <10%) is obtained.

[0095] Further, by excluding the device reflection area (such as camera shell, support) at the edge of the image, only the contrast of the water center area (accounting for 70% of the image area) is calculated to avoid interference. The median filter (3x3 kernel) is used to remove salt and pepper noise, and then the local contrast is enhanced through histogram equalization to ensure calculation stability. For the real-time determination process, the infrared camera is triggered to shoot the water image at a depth h, and the center area of 400x400 pixels is cropped as the analysis object. The I max and I min are obtained by traversing the ROI pixels, and C is calculated by substituting the formula.

[0096] Threshold decision: if C < 0.3, determine turbidity ≥ 50 NTU, trigger S3 infrared-ultrasonic wave cooperative mode; otherwise, maintain visible light image monitoring.

[0097] Further, when S2 detects the water quality mutation layer, it is determined whether correction is needed through turbidity measurement:

[0098] Clear water body (C ≥ 0.3, turbidity < 50 NTU): visible light image is clear enough, no switching is needed, and the monitoring scheme is directly updated according to S4;

[0099] Turbid water body (C < 0.3, turbidity ≥ 50 NTU): visible light image may be blurred, infrared imaging (strong penetration) and ultrasonic wave (accurate ranging) are started to cooperate, the layered positioning error is corrected, the information missing of visible light in turbid environment can be supplemented through infrared image, and the layered boundary of infrared image positioning is depth calibrated through ultrasonic ranging, solving the boundary blur problem of infrared imaging caused by scattering.

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

[0101] where ΔC is a multi-parameter dynamic color difference index, used to measure the color change amplitude, the larger the value, the more significant the color difference, ΔC k represents the color difference of the kth color channel, ω k is a dynamic weight, which is automatically assigned according to the water quality type, highlighting the difference of the key color channel, t k is a temperature compensation coefficient, used to correct the influence of water temperature on color, and ∈ is a denominator correction term, used to eliminate the interference of brightness difference on color difference.

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

[0103] Further, the difference between the pixel values of the kth color channel (R / G / B) in the adjacent two photos is calculated, and the specific formula is wherein represents the pixel value of the kth channel of the ith photo, represents the pixel value of the corresponding channel of the adjacent ith+1 photo.

[0104] Specifically, the difference of R / G / B channel of each pixel point is calculated by traversing the image pixel by pixel, and the difference of all pixel points is averaged to obtain the overall color difference of the channel.

[0105] ω kAccording to different water quality types, different weights are assigned to R / G / B channels to highlight the color channels sensitive to water quality changes. A machine learning model (such as 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 mapping relationship between "water quality type-weight distribution". During real-time monitoring, the corresponding weight is automatically called according to the preliminary judgment of the water quality type (such as through turbidity, pH, etc. auxiliary parameters).

[0106] For t k Water temperature changes will affect the absorption and scattering properties of water to light, thereby changing the color performance. By setting t k to 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 experiment.

[0107] The brightness change of the image may cause the overall value of the RGB channel to shift, resulting in false color differences. The denominator of the formula is used to normalize the color difference and eliminate brightness interference. When the brightness difference causes all channels to increase ΔC k at the same time, the square sum of the denominator and the square root operation will make the value of ΔC relatively stable, avoiding misjudgment. ∈ is a very small positive number to prevent the denominator from being zero, ensuring the stability of the formula calculation.

[0108] Determination rules:

[0109] When the calculation result of ΔC exceeds the threshold value at least twice in a row, the water quality mutation is triggered. This means that only when the color difference reaches a certain level in two consecutive measurements, it is considered that the water quality has undergone a mutation. This can avoid misjudgment caused by occasional measurement errors or temporary abnormalities, improving the accuracy and reliability of the judgment;

[0110] If the calculation result fluctuates, the absolute value of the difference between the adjacent two ΔC is greater than 30%, and the camera focal length calibration is started. This is because a larger fluctuation rate may indicate that there is a problem with the camera shooting state, such as a change in focal length, resulting in unstable photo quality and affecting the calculation result of color difference. By calibrating the camera focal length in a timely manner, it can ensure that the subsequent photos can accurately reflect the true color of the water body, so that the multi-parameter dynamic color difference index calculated based on the photos can more truly reflect the changes of water quality, which is conducive to avoiding false judgments caused by equipment problems;

[0111] The setting of the threshold T needs to consider various factors, such as different water quality types, monitoring environment, and historical data. Generally, a reasonable threshold can be determined by statistical analysis of the multi-parameter dynamic color difference index under normal water quality conditions, so that the value of ΔC does not exceed the threshold in normal conditions, and when the water quality truly changes, ΔC can exceed the threshold to be detected. At the same time, the threshold can be adjusted and optimized according to the actual situation 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 , adaptive adjustment is realized for different water quality types and environmental conditions (temperature, illumination);

[0113] And through multi-parameter dynamic adjustment, combined with water quality types, temperature and other parameters, the color difference calculation is closely related to the actual water quality change, providing more targeted and scientific mutation layer judgment basis, realizing high-precision, adaptive color difference calculation, providing core technical support for accurate identification of water quality mutation layer, and significantly improving the reliability and adaptability of water environment monitoring.

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

[0115] Extending 10% depth range above and below the corrected stratification boundary as a key monitoring area;

[0116] Compressing the sampling interval of the key monitoring area to 30%-50% of the original interval.

[0117] It should be understood that in water environment monitoring, the stratification boundary of water quality is not fixed and will drift due to factors such as water flow and temperature change, therefore, extending 10% depth range above and below the corrected stratification boundary as a key monitoring area can effectively cover the natural drift range of the stratification boundary;

[0118] Compressing the sampling interval of the key monitoring area to 30%-50% of the original interval is to capture the water quality change in the stratification area more accurately, and more intensive sampling point setting can obtain more detailed water quality data, greatly improving the resolution of water quality change, which helps to discover water quality mutation in time and provides more accurate data support for pollution tracing and emergency treatment. On the one hand, focusing on the key monitoring area accurately avoids ineffective monitoring of non-critical areas, saving data storage and transmission resources; on the other hand, flexible sampling interval adjustment not only ensures high sensitivity monitoring of water quality change in key areas, but also reduces equipment operating energy consumption to some extent, improving the operation efficiency and economy of the monitoring system, which is suitable for long-term and stable monitoring of various complex water environments.

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

[0120] A1: After obtaining the multi-parameter dynamic color difference index ΔC, it is divided into low difference, medium difference and high difference intervals, and the sampling interval is adjusted according to the interval of the multi-parameter dynamic color difference index ΔC;

[0121] It should be understood that by 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, no obvious change scenario is divided into a low difference interval (ΔC < 0.3), the water quality may appear gradual change is divided into a medium difference interval (0.3 ≤ ΔC < 0.6), and the change trend is captured in time, and the water quality has a significant mutation is divided into a high difference interval (ΔC ≥ 0.6).

[0122] Further, by collecting water body images in real time, ΔC and SI are calculated synchronously, which are respectively mapped to the corresponding interval, thereby facilitating the provision of basis for subsequent adjustment.

[0123] A2: After obtaining the stratification feature index SI, it is divided into high stability, medium stability and low stability zones, and the stratification boundary expansion range is determined according to the interval of the stratification feature stability index SI;

[0124] It should be understood that according to the quantization result of the SI value on the stratification stability, the threshold is set, for the stratification boundary stability, it is divided into a high stability interval (SI ≥ 70%), and the expansion ratio is set to 10% to cover the slight drift, for the stratification that suggests there is a certain fluctuation, 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 change is effectively monitored, for the stratification boundary instability, it is divided into a low stability interval (SI < 60%), which may be affected by water flow and environmental factors, and the expansion ratio is set to 20% to expand the monitoring range.

[0125] Further, in water environment monitoring, corresponding measures need to be taken according to different index states, through analysis of a large amount of historical data and comprehensive consideration of monitoring accuracy, stability and other factors, different interval thresholds of the stratification feature stability index SI are determined, and other threshold values are the same.

[0126] A3: Real-time calculation and adjustment of the key monitoring area range and sampling interval, recording the parameters of each adjustment and the corresponding monitoring results;

[0127] It should be understood that the key monitoring area range and sampling interval are 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 the corresponding monitoring results (such as water quality parameters, image data) are recorded to form a complete monitoring log.

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

[0129] It should be understood that historical data is analyzed periodically (e.g., weekly, monthly), and machine learning algorithms (e.g., regression analysis, reinforcement learning) are used to mine data patterns to dynamically optimize the interval thresholds of ΔC and SI, the sampling interval compression ratio, and the hierarchical boundary expansion ratio, so that the monitoring scheme continuously adapts to different water body environments and changing trends.

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

[0131] When adjusting the sampling interval according to ΔC, historical data is combined for judgment. If ΔC is in the high difference interval for two consecutive times, but two of the previous three times are in the low difference interval, the sampling interval compression ratio is taken as 40%. If ΔC is in the low difference interval, the original sampling interval is maintained. If ΔC is in the medium difference interval, the sampling interval is compressed to 50% of the original interval. If ΔC is in the high difference interval 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 interval (ΔC≥0.6) for two consecutive times, but two of the previous three times are in the low difference interval (ΔC<0.3), it indicates that the current high difference may be accidental fluctuation. At this time, the sampling interval compression ratio is set to 40%, which not only retains the sensitivity to potential changes, but also avoids resource waste. This rule can prevent the system from continuously sampling at high frequency due to temporary abnormalities;

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

[0134] When ΔC is in the medium difference interval (0.3≤ΔC<0.6), it implies that there is a gradual trend in water quality, and the sampling interval is compressed to 50% of the original interval, which helps to ensure the capture of change details;

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

[0136] In summary, by filtering short-term fluctuations, it is beneficial to avoid misjudgment caused by accidental factors, and the sampling strategy is more in line with the real water quality changes.

[0137] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A water environment monitoring method based on image vision, characterized in that, include: S1. Use an underwater camera to continuously capture images of water at different depths along a vertical direction at preset intervals; S2. Calculate the color difference between two adjacent photos to determine the water quality abrupt change layer; S3. When the turbidity in the water quality change zone exceeds the preset threshold, switch to infrared spectral imaging and ultrasonic ranging to work together. Combine the penetration characteristics of the infrared image with the ultrasonic depth calibration data to correct the layer positioning error. S4. Based on the corrected stratification boundary, update the sampling depth and interval of subsequent monitoring in real time to generate a monitoring scheme that matches the current water quality stratification. S2 also includes preprocessing the water images at each depth, specifically including: Gaussian filtering is applied to the image to reduce noise and eliminate interference from bubbles and suspended objects. The Sobel edge detection algorithm is used to extract regions of abrupt changes in chromaticity values; Intervals with an area overlap rate of <80% for chromatic abrupt change regions at adjacent depths are marked as hierarchical candidate regions; After identifying the hierarchical candidate regions, the following method is used for verification: Several sets of image data were continuously collected, and the difference in the standard deviation of the chromaticity values ​​of adjacent depth images was compared for each set of images. If the difference in the standard deviation of the chromaticity value exceeds the threshold for a preset number of times, the layering is confirmed to be effective; otherwise, the layering is confirmed to be invalid. Timestamps are added to the confirmed stratification boundaries, and stratification migration trend maps are generated by comparing them with historical data. If the difference in the standard deviation of the chromaticity values ​​exceeds a preset number of times, the method before confirming the effectiveness of the stratification also includes: If the difference in the standard deviation of the chromaticity value exceeds the threshold for a preset number of times, calculate the area overlap rate of the chromaticity change region of each group of adjacent depth images, and take the average value to obtain the layer feature stability index. If the layer feature stability index is greater than 60%, the layer is confirmed to be effective; otherwise, the confidence in the existence of the layer is reduced.

2. The water environment monitoring method based on image vision according to claim 1, characterized in that, The hierarchical feature stability index The calculation formula is: in, Let be the overlapping area of ​​the mutation regions in the i-th group of images. and These represent the areas of the chromaticity abrupt change regions in depth layer h of the i-th image group, and the areas of the adjacent depth layers in the i-th image group. The area of ​​the color abrupt change region, N is the number of consecutively acquired image groups, used to evaluate the stability of the hierarchical features over a continuous time period, and i is the i-th image group, representing the image data of a certain frame or a certain moment in the time series.

3. The water environment monitoring method based on image vision according to claim 1, characterized in that, The turbidity measurement method in S3 is as follows: Compare the brightness and darkness of the infrared image and calculate the image contrast parameter; When the infrared image contrast is <0.3, the turbidity is determined to be ≥50 NTU.

4. The water environment monitoring method based on image vision according to claim 2, characterized in that, The formula for calculating the color difference between two adjacent photos in S2 is as follows: ,in, This is a multi-parameter dynamic color difference index used to measure the magnitude of color change; a higher value indicates a more significant color difference. This represents the color difference of the k-th color channel. The weighting is dynamic and automatically allocated based on water quality type, highlighting the differences in key color channels. This is a temperature compensation coefficient used to correct for the effect of water temperature on color. This is a denominator correction term used to eliminate the interference of brightness differences on chromaticity changes.

5. The water environment monitoring method based on image vision according to claim 1, characterized in that, The monitoring scheme generated in S4 is implemented in the following way: The depth range above and below the revised stratification boundary is extended by 10% to designate key monitoring areas. The sampling interval in key monitoring areas will be reduced to 30%-50% of the original interval.

6. The water environment monitoring method based on image vision according to claim 5, characterized in that, The method for generating a monitoring scheme that matches the current water quality stratification in step S4 is as follows: A1: Calculated multi-parameter dynamic color difference index Then, it was divided into low-difference, medium-difference, and high-difference ranges, based on a multi-parameter dynamic color difference index. Adjust the sampling interval within the specified range; A2: Calculate the hierarchical characteristic index It is divided into high-stability, medium-stability, and low-stability regions, based on the stability index of the stratification characteristics. The range in which the layer is located determines the extent of the layer boundary extension; 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.

7. A water environment monitoring method based on image vision according to claim 6, characterized in that, The A1 step is followed by: According to When adjusting the sampling interval, historical data should be considered. If there are two consecutive... If the sample is in the high difference range, but falls in the low difference range twice out of the first three times, then the sampling interval compression ratio is set to 40%. If it is in the low difference range, maintain the original sampling interval. If the difference is within the medium range, compress the sampling interval to 50% of the original interval; if If the sample is in a high difference interval and does not meet the condition that two of the previous three samples were in a low difference interval, then the sampling interval will be 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

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

    CN118937254A