Intelligent water level detection method without a water gauge for complex and harsh environments

By using markers and cameras to acquire images in complex and harsh environments, and combining neural networks and Kalman filtering, water level detection without a water gauge is achieved. This solves the problems of high cost and poor adaptability in existing technologies, and realizes low-cost, intelligent and environmentally friendly water level detection.

CN115908780BActive Publication Date: 2026-03-03ZHONGBEI UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-29
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

Existing water level detection methods are costly, have low intelligence, and poor adaptability in complex and harsh environments. They are also greatly affected by harsh environments, making it difficult to achieve accurate water level detection.

Method used

A water level intelligent detection method without a water gauge is adopted. By marking marker one and marker two in the area to be detected, images are collected by a camera, and a target detection neural network is trained. Combined with an improved Kalman filter equation, the linear fitting and mapping of the water level line is achieved to obtain the actual water level.

Benefits of technology

It reduces costs, increases intelligence, enhances adaptability and robustness, and can accurately detect water levels in complex and harsh environments, avoiding impacts on terrain and ecology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115908780B_ABST
    Figure CN115908780B_ABST
Patent Text Reader

Abstract

This invention relates to the field of water level detection technology, specifically to an intelligent water level detection method without a water gauge for complex and harsh environments, comprising the following steps: S1, acquiring water level images; S2, selecting and labeling water level lines and markers; S3, inputting the data into a target detection neural network and extracting a training model; S4, detecting the water level lines and markers; S5, performing linear fitting to obtain a formula for expressing the water level lines; S6, calculating the pixel height of the current water level line; S7, determining the actual elevation of the current water level line. The intelligent water level detection method without a water gauge provided by this invention has the advantages of low cost, high intelligence, strong adaptability, and minimal impact from harsh environments. Furthermore, given a large sample size, it can ignore the interference of individual sample errors, making the method more robust.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of water level detection technology, and in particular to an intelligent water level detection method without a gauge for complex and harsh environments. Background Technology

[0002] Water level monitoring plays a crucial role in water conservancy projects and flood control early warning systems. Refined management and disaster early warning require real-time and accurate detection of sudden water level changes. Currently, there are three main methods for water level monitoring: manual measurement, measurement using water level monitoring devices, and measurement based on image processing that identifies water level gauges.

[0003] Manual measurement is costly, and the collected data is highly subjective and difficult to verify. Furthermore, the safety of personnel taking readings is compromised in adverse weather conditions. Water level detection devices fall into two categories: contact and non-contact. Contact devices suffer from poor accuracy and stability, and prolonged contact with the water surface can easily damage them, leading to increased maintenance costs. Non-contact devices, including those utilizing acoustic methods, radar, and infrared principles, generally have poor anti-interference capabilities, are expensive, and have stringent installation and maintenance requirements. Image processing methods for identifying water level gauges are susceptible to interference from complex and harsh environments such as nighttime, artificial lighting, rain, fog, snow, shadows, changing light and shadow, and floating debris. This results in low accuracy for current image processing methods based on water level gauge identification in these challenging environments, hindering effective detection. Moreover, the diversity of water level gauge specifications, with significant differences in models, types, and installation methods, leads to low compatibility with existing image processing algorithms.

[0004] Therefore, there is an urgent need for a water level detection method that combines the advantages of low cost, high level of intelligence, strong adaptability, and less susceptibility to harsh environments. Summary of the Invention

[0005] To overcome the technical shortcomings of existing water level detection methods, such as high cost, low level of intelligence, poor adaptability, and significant susceptibility to harsh environments, this invention provides an intelligent water level detection method without a water gauge for complex and harsh environments.

[0006] This invention provides an intelligent water level detection method without a water gauge for complex and harsh environments, comprising the following steps:

[0007] S1. Mark the location to be detected, marker one, and marker two in the area to be detected. The location to be detected and marker one are located at the same location in the area to be detected. Both marker one and marker two are higher than the water body to be measured. Collect a water level image of the area to be detected. The water level image simultaneously includes the location to be detected, marker one, and marker two. Establish a dataset of the water level image. Pre-label the actual elevation of marker one as H1 and the actual elevation of marker two as H2. The difference between the actual elevations of marker one and marker two is |H1-H2|.

[0008] S2. Select the water-shore boundary line in the water level image as the water level line for annotation, and obtain multiple water level line annotation boxes, and make the center of the water level line annotation box fit with the water level line; select landmark one and landmark two in the water level image for annotation, and obtain landmark one annotation box and landmark two annotation box.

[0009] S3. Input the labeled dataset into the object detection neural network for training and extract the training model;

[0010] S4. Detect the first marker and the second marker to obtain the prediction box of the first marker and the prediction box of the second marker. Extract the center vertical coordinate h1 of the prediction box of the first marker and the center vertical coordinate h2 of the prediction box of the second marker. Thus, the center pixel height difference between the prediction box of the first marker and the prediction box of the second marker is |h1-h2|.

[0011] S5. Detect the water level line, obtain multiple water level line prediction boxes, and sample the center coordinates of each box. Perform linear fitting based on the center coordinate samples to obtain the water level line straight line and the water level line expression formula.

[0012] S6. Extract the x-coordinate of the center of the prediction box of marker one, and substitute it into the water level expression formula to obtain the pixel height h of the current water level.

[0013] S7. Based on the actual elevation difference |H1-H2| between marker 1 and marker 2, and the pixel height difference h1-h2 between marker 1 and marker 2, determine the mapping relationship between actual elevation and pixel height as follows: Based on the pixel height difference h1-h between the current water level and marker 1, the actual elevation of the current water level is calculated as follows:

[0014] Optionally, in step S2, the marker is an object or a geometric shape.

[0015] Optionally, in step S5, the water level line is expressed by the formula y = ax + b, where a is the slope of the water level line and b is the intercept of the water level line. The linear fitting uses the least squares method, and the fitting formula is as follows: Where, xi y i Here, represents the center coordinates of the water level prediction bounding box, and n represents the number of water level prediction bounding boxes. It is the mean of the center coordinates of the water level prediction frame.

[0016] Optionally, intelligent water level detection methods without a water gauge for complex and harsh environments also include:

[0017] S8. Historical information is imported as prior knowledge using the improved Kalman filter equation to guide the identification of the water level elevation, and the final water level value is output to the water management platform. The improved Kalman filter equation is: in This is the current system output water level value. f(x) represents the water level value output by the system in the previous iteration. n ) represents the current system-measured water level value, σ n ε is the standard deviation of historical water level values. n =f(x) n )-E(X), E(X) is the expected value of the historical water level, which is selected from the most recent n water level values.

[0018] The technical solution provided by this invention has the following advantages compared with the prior art:

[0019] The intelligent water level detection method without a water gauge provided by this invention for complex and harsh environments, compared with manual measurement and methods using water level detection devices, only requires the deployment of cameras and related accessories at the observation point. It does not affect the topography, does not interfere with the aquatic ecosystem, does not pollute the water source, and is lower in cost, more intelligent, and cleaner and more environmentally friendly. Compared with measurement based on image processing of water gauges, it is free from the constraints of water gauges and has higher compatibility with detection algorithms. Furthermore, this invention obtains the water level line through linear fitting, without pursuing complete accuracy of the target detection algorithm for individual recognition results. Given a large sample size, the interference of individual sample errors can be ignored, making this method more robust. Attached Figure Description

[0020] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0021] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 This is a schematic diagram illustrating the marking of water level lines and markers in step S2 of an embodiment of the present invention;

[0023] Figure 2 This is a schematic diagram of the straight water level line in step S5 of an embodiment of the present invention.

[0024] in:

[0025] 1. Marker 1; 2. Marker 2; 3. Marker 1 label box; 4. Marker 2 label box; 5. Water level line label box; 6. Water level line straight line. Detailed Implementation

[0026] To better understand the above-mentioned objectives, features, and advantages of the present invention, the solutions of the present invention will be further described below. It should be noted that, unless otherwise specified, the embodiments of the present invention and the features thereof can be combined with each other.

[0027] Many specific details are set forth in the following description in order to provide a full understanding of the invention, but the invention may also be practiced in other ways different from those described herein; obviously, the embodiments in the specification are only some embodiments of the invention, and not all embodiments.

[0028] In one embodiment, such as Figures 1 to 2 As shown, the intelligent water level detection method without a water gauge for complex and harsh environments includes steps S1 to S7.

[0029] Wherein: S1, mark the location to be detected, marker 1 and marker 2 in the area to be detected. The location to be detected and marker 1 are located in the same position in the area to be detected. Both marker 1 and marker 2 are higher than the water body to be measured. Collect water level images of the area to be detected. The water level images simultaneously contain the location to be detected, marker 1 and marker 2. Establish a dataset of water level images. The actual elevation of marker 1 is pre-calibrated as H1, the actual elevation of marker 2 is pre-calibrated as H2, and the difference between the actual elevations of marker 1 and marker 2 is H1-H2|.

[0030] Specifically, the area to be tested can be a reservoir, dam, river, or other common areas where water levels need to be monitored.

[0031] It is easy to understand that the location to be detected is located at the same position in the area to be detected as marker 1, that is, the horizontal coordinate of the location to be detected and marker 1 on the water level image are the same.

[0032] It is easy to understand that water level images can be acquired using image acquisition tools such as cameras and photographic devices.

[0033] Wherein: S2, select the water-shore boundary line in the water level image as the water level line for annotation, and obtain multiple water level line annotation boxes 5, and make the center of the water level line annotation box 5 fit with the water level line; select marker 1 and marker 2 in the water level image for annotation, and obtain marker 1 annotation box 3 and marker 2 annotation box 4.

[0034] Easy to understand, refer to Figure 2 One side of the water level line is the water surface, and the other side is the shore.

[0035] Specifically, a marker can be an object or a geometric shape. Two markers can be different objects or geometric shapes, or different parts of the same object or geometric shape.

[0036] S3 involves inputting the labeled dataset into the object detection neural network for training and extracting the training model.

[0037] Preferably, the object detection neural network is YOLOv5. Alternatively, the object detection neural network can also be an RCNN series or an SSD series.

[0038] Wherein: S4, the marker 1 and marker 2 are detected to obtain the prediction box of marker 1 and the prediction box of marker 2, and the center vertical coordinate h1 of the prediction box of marker 1 and the center vertical coordinate h2 of the prediction box of marker 2 are extracted, so that the center pixel height difference between the prediction box of marker 1 and the prediction box of marker 2 is |h1-h2|.

[0039] Among them: S5, the water level line is detected, the water level line prediction box is obtained and the center coordinates are sampled. Linear fitting is performed based on the center coordinate samples to obtain the water level line line 6 and the water level line expression formula.

[0040] It is easy to understand that the formula for expressing the water level line is y = ax + b, where a is the slope of the water level line 6 and b is the intercept of the water level line 6.

[0041] Preferably, the least squares method is used for linear fitting, and the fitting formula is as follows: Where, x i y i Here, represents the center coordinates of the water level prediction bounding box, and n represents the number of water level prediction bounding boxes. This represents the mean center coordinates of the predicted water level bounding box. As an alternative implementation, linear fitting can also employ gradient descent.

[0042] Wherein: S6, extract the horizontal coordinate of the center of the prediction box of marker 1, and substitute it into the water level expression formula to obtain the pixel height h of the current water level.

[0043] It should be noted that since the water level line is not necessarily a horizontal line, meaning that the water level may vary at different locations, the measurement here refers to the water level at the location with the same pixel horizontal coordinate as marker 1. Therefore, if you want to measure the water level at a specific location, you need to ensure that at least one of the two markers selected in step S1 has the same pixel horizontal coordinate as the location to be measured.

[0044] Wherein: S7, based on the actual elevation difference |H1-H2| between marker 1 and marker 2, and the pixel height difference h1-h2 between marker 1 and marker 2, the mapping relationship between the actual elevation and the pixel height is determined as follows: Based on the pixel height difference h1-h between the current water level and marker 1, the actual elevation of the current water level is calculated as follows:

[0045] It should be noted that since the marker is located above the water body, the actual elevation of the current water level can be obtained by subtracting the relative offset between the marker and the water level from the actual elevation of the marker. Here, marker 1 is selected as the marker for the measurement location, but marker 1 and marker 2 can be flexibly selected according to the actual situation.

[0046] It should be noted that since H1-H2 and h1-h2 have the same sign, therefore

[0047] In practical implementation, the measurement method described in steps S1 to S7 above, compared to manual measurement and measurement using water level detection devices, only requires the placement of cameras and related accessories at the observation point. It does not affect the topography, interfere with the aquatic ecosystem, or pollute the water source, resulting in lower costs, higher intelligence, and greater environmental friendliness. Compared to measurement based on image processing using water level gauges, it is free from the constraints of water level gauges, avoids interference from complex and harsh environments, and has higher compatibility with detection algorithms. Furthermore, this method obtains the water level line through linear fitting, without pursuing complete accuracy of the target detection algorithm for individual recognition result anchor boxes. Given a large sample size, the interference of individual sample errors can be ignored, making this method more robust.

[0048] Based on the above embodiments, some embodiments further include the following after step S7:

[0049] S8. Historical information is imported as prior knowledge using the improved Kalman filter equation to guide the identification of the water level elevation. The final water level value is then output to the water management platform. The improved Kalman filter equation is: in This is the current system output water level value. f(x) represents the water level value output by the system in the previous iteration. n ) represents the current system-measured water level value, σn ε is the standard deviation of historical water level values. n =f(x) n )-E(X), E(X) is the expected value of the historical water level, which is selected from the most recent n water level values.

[0050] Preferably, n=50, that is, only the water level values ​​of the most recent 50 times are considered.

[0051] It should be noted that the water level value is calculated from the water level line, and the slope of the water level line does not change drastically in a short period of time, resulting in a small difference between the current water level measurement and the previous water level measurement. Therefore, it is assumed that this water level identification system is a static system. Based on the conventional static Kalman filter equation... As the measurement iterations proceed, the Kalman gain... The value gradually approaches 0, meaning that the influence of the measured value on the output will disappear after a certain iteration time. Therefore, this invention improves the conventional static Kalman filter equation.

[0052] The above description is merely a specific embodiment of the present invention, enabling those skilled in the art to understand or implement the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features of the invention herein.

Claims

1. A method for intelligent water level detection without a water gauge in complex and harsh environments, characterized in that, The steps are as follows: S1. Mark the location to be detected, marker one (1), and marker two (2) in the area to be detected. The location to be detected and marker one (1) are located at the same position in the area to be detected. Both marker one (1) and marker two (2) are higher than the water body to be measured. Collect the water level image of the area to be detected. The water level image simultaneously includes the location to be detected, marker one (1), and marker two (2). Establish the dataset of the water level image and pre-determine the actual elevation of marker one (1). The actual elevation of the marker two (2) was pre-marked as follows: The actual elevation difference between marker one (1) and marker two (2) is ; S2. Select the water-shore boundary line in the water level image as the water level line for annotation, and obtain multiple water level line annotation boxes (5), and make the center of the water level line annotation box (5) fit with the water level line; select marker one (1) and marker two (2) in the water level image for annotation, and obtain marker one annotation box (3) and marker two annotation box (4); the marker is an object or a geometric shape; S3. Input the labeled dataset into the object detection neural network for training and extract the training model; S4. Detect the marker one (1) and marker two (2) to obtain the prediction box of marker one (1) and the prediction box of marker two (2), and extract the center ordinate of the prediction box of marker one (1). Extract the center ordinate of the prediction box for marker 2 (2). Thus, the height difference of the center pixel of the prediction box of marker one (1) and the prediction box of marker two (2) is... ; S5. Detect the water level line, obtain multiple water level prediction boxes and sample the center coordinates of each box. Perform linear fitting based on the center coordinate samples to obtain the water level line (6) and the water level line expression formula. S6. Extract the x-coordinate of the center of the prediction box of marker 1 (1) and substitute it into the water level expression formula to obtain the pixel height of the current water level. ; S7. Based on the actual elevation difference between marker one (1) and marker two (2) The pixel height difference between marker 1 (1) and marker 2 (2) The mapping relationship between actual elevation and pixel height is determined as follows: And based on the pixel height difference between the current water level and marker 1 (1) The actual elevation of the current water level is calculated as follows: ; S8. Historical information is imported as prior knowledge using the improved Kalman filter equation to guide the identification of the water level elevation, and the final water level value is output to the water management platform. The improved Kalman filter equation is: ,in This is the current system output water level value. This is the water level value output by the system last time. The current system measures the water level. The standard deviation of historical water level values. , The expected value of the historical water level is selected, where the most recent historical water level is chosen. The water level value for this time.

2. The intelligent water level detection method without a water gauge for complex and harsh environments according to claim 1, characterized in that, In step S5, the formula for expressing the water level is: ,in, It is the slope of the straight line (6) of the water level line. It is the intercept of the straight line (6) of the water level line. The linear fitting adopts the least squares method, and the fitting formula is: , ,in, , These are the center coordinates of the water level prediction frame. It refers to the number of water level prediction boxes. , It is the mean of the center coordinates of the water level prediction frame.

Citation Information

Patent Citations

  • Water level monitoring method based on image processing, equipment, medium and water level monitoring system

    CN112085753A

  • Reservoir water level monitoring method and system, medium and electronic terminal

    CN112329644A

  • Reservoir level identification method and device based on computer vision algorithm

    CN115112199A