Hydropower station diversion tunnel incoming water variation dynamic detection method and system

Through the onboard lidar and Canny edge detection algorithm, the problem of detecting the volume of water accumulation and incoming water under irregular space and high water quality in the diversion tunnel of the hydropower station is solved, and accurate water level detection and volume calculation are achieved, which improves the Detect environmental adaptability.

CN119223387APending Publication Date: 2024-12-31CHINA YANGTZE POWER +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411129261.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-16
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

The prior art is difficult to accurately calculate the volume of water accumulation and incoming water variation in the diversion tunnel of hydropower stations. Especially under irregular space and high water quality conditions, it is impossible to overcome the limitations of spatial irregularity of diversion tunnels and the identification of water level scales. .

Method used

Three-dimensional spatial point cloud data is obtained through onboard lidar, combined with geographic information system software to calculate the elevation-water accumulation volume mathematical model, and the Canny edge detection algorithm is used to identify the water level edge, convert the pixel height to the actual water level height, and substitute it into the mathematical model for calculation The water accumulation volume of the current water level is obtained according to the preset frequency to obtain the volume difference at the next time point to achieve dynamic detection of the change in incoming water.

Benefits of technology

The accurate detection of the current water level in the diversion tunnel of the hydropower station has been achieved, the limitations caused by irregular space and high water quality have been overcome, and the adaptability in different detection environments has been improved, ensuring the accuracy of dynamic monitoring of the incoming water changes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119223387A_ABST
    Figure CN119223387A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of hydropower station diversion tunnel incoming water detection, and discloses a hydropower station diversion tunnel incoming water variation dynamic detection method and system, and the method comprises the steps: obtaining three-dimensional space point cloud data of a hydropower station diversion tunnel through an airborne laser radar; calculating pondable volumes at different elevations through geographic information system software according to the three-dimensional space point cloud data to obtain a diversion tunnel elevation-pondable volume mathematical model; identifying the water level edge in the monitoring picture of the diversion tunnel of the hydropower station through a Canny edge detection algorithm, and converting the pixel height of the water level edge into the actual water level height; the actual water level height is substituted into the diversion tunnel elevation-pondable volume mathematical model, and the ponding amount of the current water level is obtained; furthermore, the accumulated water amount of the current water level is regularly detected, so that accurate and dynamic detection of incoming water variation of the diversion tunnel of the hydropower station is realized, and the adaptability in different detection environments is improved due to the fact that limitation caused by water quality, space irregularity and the like is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of water inflow detection in a diversion tunnel of a hydropower station, and in particular to a method and system for dynamically detecting the change amount of water inflow in a diversion tunnel of a hydropower station. Background Art

[0002] The diversion tunnel is a temporary building during the construction phase of the hydropower station. After the construction of the hydropower station is completed, part of the upstream is blocked to guide the water leakage from the powerhouse. The amount of water flowing into the diversion tunnel will change with factors such as climate, rainfall, and mountain cracks. It is necessary to dynamically detect the changes in water flow to cope with possible extreme water flow conditions. When the water flow is small, it is normally drained through the drainage system of the terminal water collection tank; when the water flow is urgent and the flow rate is large, the number of units started and the operating efficiency of the drainage system can be adjusted, and portable drainage pump trucks can be temporarily put into operation for forced drainage.

[0003] The key to detecting water inflow in diversion tunnels includes the following two points: first, obtaining the water level of the diversion tunnel in real time; second, obtaining the volume of water through the current water level, and then calculating the water flow through the volume change at the previous and next time points. For the volume calculation of irregular spaces with specified elevations such as diversion tunnels, three-dimensional space scanning sensor equipment is often used to obtain spatial point cloud data, and then three-dimensional modeling software is used to build an elevation-volume model. Among them, airborne laser radar (Light Detection And Ranging, LiDAR) has the advantages of high penetration, good flexibility, and strong anti-interference ability in the field of three-dimensional imaging, and has been widely used in remote sensing reconnaissance, unmanned driving, aerospace and other fields. For example, some scholars used LiDAR technology to construct a three-dimensional spatial model of coal mine tunnels with an accuracy of centimeters; some scholars extracted peach tree structural parameters based on LiDAR point clouds, and the error rates of peach tree height, trunk diameter, etc. were all controlled within 10%; some scholars reconstructed city-level real-scene three-dimensional models based on LiDAR point clouds, effectively improving the reconstruction efficiency and quality of city-level real-scene three-dimensional models; and some scholars used a synchronous fusion solution of laser radar and inertial measurement unit to improve the accuracy of three-dimensional mapping of school campuses.

[0004] However, in terms of automatic water level measurement, the most common solution is to collect water level sensors, such as piezoresistive pressure water level meter measurement, ultrasonic water level meter measurement, split guided wave radar water level meter measurement component seismic method research measurement, etc. Water level meters with different principles have mature applications in various industries. However, in practical applications, water level sensors are easily interfered by scene factors and have high maintenance costs. With the rapid development of computer vision technology, many mature algorithms and research cases have emerged in water level recognition scenarios. For example, some scholars use the Mask RCNN algorithm to extract river and lake water scale information from video images, and the water level recognition error meets the accuracy requirements; some scholars use the U-net neural network to train water level line image samples to obtain image semantic segmentation models for water bodies and non-water areas, and the water level prediction error is less than 1cm.

[0005] However, in the actual implementation, due to the serious calcification of the water quality in the diversion tunnel, the surface of the water level scale is prone to calcium formation, resulting in the scale information being covered, making it difficult to accurately identify the water level in the diversion tunnel; at the same time, the accuracy of the existing water level detection model is highly dependent on the quality of the training samples, and the calcified water quality in the diversion tunnel does not meet the water quality requirements of the existing water level detection model. This has led to the existing water level measurement method being difficult to accurately calculate the water level of the diversion tunnel. Correspondingly, it is also difficult to accurately calculate the diversion tunnel's water volume and the amount of water change based on the current water level of the diversion tunnel. Therefore, how to overcome the difficulty of the irregular space of the diversion tunnel and the inability to accurately calculate the volume of water that can be accumulated, and at the same time overcome the limitations of the water level scale scale recognition on high water quality requirements, so as to achieve accurate detection of the volume of water that can be accumulated and the amount of water change at the current water level in the diversion tunnel of the hydropower station, and improve the adaptability under different detection environments, has become a problem that needs to be solved urgently.

[0006] The above contents are only used to assist in understanding the technical solution of the present invention and do not constitute an admission that the above contents are prior art. Summary of the invention

[0007] The main purpose of the present invention is to provide a method and system for dynamically detecting the change in inflow of water in a diversion tunnel of a hydropower station, aiming to solve the difficulty that the existing technology cannot overcome the irregular space of the diversion tunnel and cannot accurately calculate the volume of water that can be accumulated, while overcoming the limitation of the water level scale scale recognition for high water quality requirements, so as to realize the accurate detection of the volume of water that can be accumulated and the change in inflow of water of the current water level in the diversion tunnel of the hydropower station, and improve the technical problem of adaptability under different detection environments.

[0008] To achieve the above object, the present invention provides a method for dynamically detecting the change in water inflow in a diversion tunnel of a hydropower station, the method comprising the following steps:

[0009] The three-dimensional point cloud data of the diversion tunnel of the hydropower station is obtained by airborne laser radar, and the water accumulation volume at different elevations is calculated by geographic information system software according to the three-dimensional point cloud data to obtain a mathematical model of diversion tunnel elevation-water accumulation volume;

[0010] The water level edge in the diversion tunnel monitoring screen of the hydropower station is identified by the Canny edge detection algorithm, and the pixel height of the water level edge is converted into the actual water level height;

[0011] Substituting the actual water level into the diversion tunnel elevation-capacity water storage mathematical model to obtain the capacity of water storage at the current water level;

[0012] The water storage volume at the next time detection point is obtained according to a preset frequency, and the volume difference between the water storage volume at the current water level and the water storage volume at the next time detection point is calculated to realize dynamic detection of the change in water inflow to the diversion tunnel of the hydropower station.

[0013] Optionally, the step of acquiring three-dimensional point cloud data of the diversion tunnel of the hydropower station by airborne laser radar, and calculating the water-accumulated volumes at different elevations by geographic information system software according to the three-dimensional point cloud data to obtain the diversion tunnel elevation-water-accumulated volume mathematical model includes:

[0014] Acquire the three-dimensional point cloud data of the diversion tunnel of the hydropower station through the airborne laser radar, and draw the contour lines and longitudinal sections of the flooded area through the geographic information system software according to the three-dimensional point cloud data;

[0015] The water-storage volume at different elevations is calculated according to the contour lines and longitudinal sections of the submerged area, and a mathematical model of diversion tunnel elevation-water-storage volume is obtained.

[0016] Optionally, the step of identifying the water level edge in the monitoring picture of the diversion tunnel of the hydropower station by using the Canny edge detection algorithm and converting the pixel height of the water level edge into the actual water level height includes:

[0017] The original image in the monitoring screen of the diversion tunnel of the hydropower station is subjected to grayscale processing and Gaussian filtering in sequence to obtain a filtered grayscale image;

[0018] Calculating the gradient magnitude and gradient direction of the filtered grayscale image using a Sobel operator, and performing non-maximum suppression processing according to the gradient magnitude and the gradient direction to obtain a gradient maximum;

[0019] Using the Canny edge detection algorithm and the double threshold method according to the gradient maximum value to identify the water level edge;

[0020] The pixel height of the water level edge is converted into the actual water level height according to the fitting relationship between the actual water level height and the pixel height.

[0021] Optionally, the step of calculating the gradient magnitude and gradient direction of the filtered grayscale image using a Sobel operator, and performing non-maximum suppression processing according to the gradient magnitude and the gradient direction to obtain a gradient maximum value includes:

[0022] The gradient size and direction of the filtered grayscale image are calculated using the Sobel operator through the following formula;

[0023]

[0024] In the formula, the Sobel operator is two 3×3 matrices, namely S x and S y , S x Used to calculate the image x-direction gradient matrix G x , that is, G x Represents the gradient value in the horizontal direction, S y Used to calculate the image y-direction gradient matrix G y , that is, G y represents the gradient value in the vertical direction, I is the grayscale image matrix after filtering, * represents the cross-correlation operation, M(x, y) represents the gradient intensity of the pixel, G x (x, y) represents the gradient value of the pixel in the horizontal direction, G y (x, y) represents the gradient value of the pixel in the vertical direction, and θ(x, y) represents the gradient direction of the pixel;

[0025] According to the gradient magnitude and the gradient direction, non-maximum suppression processing is performed by the following formula to obtain a gradient maximum value;

[0026]

[0027] In the formula, M'(x,y) is the maximum value of the gradient, M L is the low threshold of gradient strength, δ x and δ y is the offset in the gradient direction, δ x =cosθ(x,y),δ y =sinθ(x,y).

[0028] Optionally, the step of identifying the water level edge by using a double threshold method according to the gradient maximum value through a Canny edge detection algorithm comprises:

[0029] The water level edge is identified by the following formula using the Canny edge detection algorithm and the double threshold method according to the gradient maximum value;

[0030]

[0031] In the formula, Canny(x,y) is the boundary point detected by the Canny edge detection algorithm, M'(x,y) is the maximum gradient value, and M H is the high threshold of gradient strength, M L is the low threshold of gradient strength, Strong, Weak, and Non-edge represent strong edge, weak edge, and non-edge, respectively.

[0032] Optionally, the fitting relationship between the actual water level height and the pixel height is:

[0033]

[0034] In the formula, f(x,w) is the actual water level height, x is the pixel height, M is the polynomial order, and w is the i represents the weight coefficient of each order, E(w) is the mean square error between the actual water level and the measured water level, f(x i ,w) is the actual water level height corresponding to the i-th point, x i is the pixel height of the i-th point, and w is the weight vector of the fitting polynomial, that is, w=[w 0 ,w 1 ,w 2 ,…,w M ],y i is the measured height of the ith point, and N is the number of samples.

[0035] In addition, to achieve the above-mentioned purpose, the present invention also proposes a dynamic detection system for the change in water inflow of a diversion tunnel of a hydropower station, the dynamic detection system for the change in water inflow of a diversion tunnel of a hydropower station comprising:

[0036] A model building module is used to obtain the three-dimensional point cloud data of the diversion tunnel of the hydropower station through an airborne laser radar, and calculate the water accumulation volume at different elevations through geographic information system software based on the three-dimensional point cloud data to obtain a diversion tunnel elevation-water accumulation volume mathematical model;

[0037] A water level height calculation module is used to identify the water level edge in the diversion tunnel monitoring screen of the hydropower station through the Canny edge detection algorithm, and convert the pixel height of the water level edge into the actual water level height;

[0038] A water storage volume calculation module is used to substitute the actual water level into the diversion tunnel elevation-water storage volume mathematical model to obtain the water storage volume of the current water level;

[0039] The volume difference calculation module is used to obtain the water volume that can be accumulated at the next time detection point according to a preset frequency, and calculate the volume difference between the water volume that can be accumulated at the current water level and the water volume that can be accumulated at the next time detection point, so as to realize dynamic detection of the change in water inflow to the diversion tunnel of the hydropower station.

[0040] Optionally, the model building module is further used to obtain three-dimensional space point cloud data of the diversion tunnel of the hydropower station through an airborne laser radar, and to draw the contour lines and longitudinal sections of the flooded area through geographic information system software according to the three-dimensional space point cloud data;

[0041] The model building module is also used to calculate the water-accumulated volume at different elevations according to the contour lines and longitudinal sections of the flooded area, and obtain a diversion tunnel elevation-water-accumulated volume mathematical model.

[0042] Optionally, the water level height calculation module is further used to sequentially perform grayscale processing and Gaussian filtering on the original image in the monitoring screen of the diversion tunnel of the hydropower station to obtain a filtered grayscale image;

[0043] The water level height calculation module is further used to calculate the gradient size and gradient direction of the filtered grayscale image using a Sobel operator, and perform non-maximum suppression processing according to the gradient size and the gradient direction to obtain a gradient maximum;

[0044] The water level height calculation module is also used to identify the water level edge by using a double threshold method according to the gradient maximum value through a Canny edge detection algorithm;

[0045] The water level calculation module is further used to convert the pixel height of the water level edge into the actual water level according to the fitting relationship between the actual water level and the pixel height.

[0046] Optionally, the water level height calculation module is further used to calculate the gradient size and direction of the filtered grayscale image using the following formula using a Sobel operator;

[0047]

[0048] In the formula, the Sobel operator is two 3×3 matrices, namely S x and S y , S x Used to calculate the image x-direction gradient matrix G x , that is, G x Represents the gradient value in the horizontal direction, S y Used to calculate the image y-direction gradient matrix G y , that is, G yrepresents the gradient value in the vertical direction, I is the grayscale image matrix after filtering, * represents the cross-correlation operation, M(x, y) represents the gradient intensity of the pixel, G x (x, y) represents the gradient value of the pixel in the horizontal direction, G y (x, y) represents the gradient value of the pixel in the vertical direction, and θ(x, y) represents the gradient direction of the pixel;

[0049] The water level height calculation module is further used to perform non-maximum suppression processing according to the gradient size and the gradient direction through the following formula to obtain the gradient maximum value;

[0050]

[0051] In the formula, M'(x,y) is the maximum value of the gradient, M L is the low threshold of gradient strength, δ x and δ y is the offset in the gradient direction, δ x =cosθ(x,y),δ y =sinθ(x,y).

[0052] Optionally, the water level height calculation module is further used to identify the water level edge by the following formula using a double threshold method according to the gradient maximum value through a Canny edge detection algorithm;

[0053]

[0054] In the formula, Canny(x,y) is the boundary point detected by the Canny edge detection algorithm, M'(x,y) is the maximum gradient value, and M H is the high threshold of gradient strength, M L is the low threshold of gradient strength, Strong, Weak, and Non-edge represent strong edge, weak edge, and non-edge, respectively;

[0055] Optionally, the fitting relationship between the actual water level height and the pixel height is:

[0056]

[0057] In the formula, f(x,w) is the actual water level height, x is the pixel height, M is the polynomial order, and w is the i represents the weight coefficient of each order, E(w) is the mean square error between the actual water level and the measured water level, f(x i ,w) is the actual water level height corresponding to the i-th point, x i is the pixel height of the i-th point, and w is the weight vector of the fitting polynomial, that is, w=[w 0 ,w1 ,w 2 ,…,w M ],y i is the measured height of the ith point, and N is the number of samples.

[0058] In the present invention, the three-dimensional point cloud data of the diversion tunnel of the hydropower station is obtained by an airborne laser radar, and the water-storage volume at different elevations is calculated by geographic information system software according to the three-dimensional point cloud data to obtain a diversion tunnel elevation-water-storage volume mathematical model; the water level edge in the monitoring screen of the diversion tunnel of the hydropower station is identified by the Canny edge detection algorithm, and the pixel height of the water level edge is converted into the actual water level; the actual water level is substituted into the diversion tunnel elevation-water-storage volume mathematical model to obtain the water-storage volume at the current water level; the next time detection is obtained according to a preset frequency. The water-storage volume of the measuring point is measured, and the volume difference between the water-storage volume of the current water level and the water-storage volume of the next time detection point is calculated, so as to realize the dynamic detection of the water inflow change of the diversion tunnel of the hydropower station, which solves the difficulty that the prior art cannot overcome the irregular space of the diversion tunnel and cannot accurately calculate the water-storage volume. At the same time, it overcomes the limitation of the water level scale scale recognition to high water quality requirements, and realizes the accurate detection of the water-storage volume and the water inflow change of the current water level in the diversion tunnel of the hydropower station. Moreover, because it is not limited by water quality, spatial irregularity, etc., it improves the adaptability in different detection environments. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] Figure 1 It is a flow chart of a first embodiment of a method for dynamically detecting changes in water inflow to a diversion tunnel of a hydropower station according to the present invention;

[0060] Figure 2 A three-dimensional structural diagram of a diversion tunnel involved in the first embodiment of the method for dynamically detecting the change in water inflow to a diversion tunnel of a hydropower station according to the present invention;

[0061] Figure 3 A point cloud result diagram of a diversion tunnel involved in the first embodiment of the method for dynamically detecting the change in water inflow to a diversion tunnel of a hydropower station according to the present invention;

[0062] Figure 4 A water level-capable water volume relationship diagram related to the first embodiment of the method for dynamically detecting the change in water inflow to the diversion tunnel of a hydropower station according to the present invention;

[0063] Figure 5 This is a picture of the diversion tunnel site and water level monitoring screen involved in the first embodiment of the method for dynamically detecting the change in water inflow to the diversion tunnel of a hydropower station according to the present invention;

[0064] Figure 6 A fitting relationship diagram between the actual water level height and the pixel height involved in the first embodiment of the method for dynamically detecting the change in water inflow in the diversion tunnel of a hydropower station according to the present invention;

[0065] Figure 7 This is a diagram of lower edge detection results of different double threshold combinations involved in the first embodiment of the method for dynamically detecting the change in water inflow to the diversion tunnel of a hydropower station according to the present invention;

[0066] Figure 8 This is a result diagram of mask area selection involved in the first embodiment of the method for dynamically detecting the change in water inflow to a diversion tunnel of a hydropower station according to the present invention;

[0067] Fig. 9 This is a diagram of abnormal edge filtering and water level detection results involved in the first embodiment of the method for dynamically detecting the change in water inflow to a diversion tunnel of a hydropower station according to the present invention;

[0068] Fig.10 It is a structural block diagram of the first embodiment of the dynamic detection system for water inflow change in diversion tunnel of a hydropower station according to the present invention.

[0069] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0070] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0071] The embodiment of the present invention provides a method for dynamically detecting the change in water inflow in a diversion tunnel of a hydropower station, referring to Figure 1 , Figure 1 It is a flow chart of the first embodiment of the method for dynamically detecting the change of water inflow in the diversion tunnel of a hydropower station according to the present invention.

[0072] In this embodiment, the method for dynamically detecting the change in water inflow to the diversion tunnel of a hydropower station comprises the following steps:

[0073] Step S10: acquiring three-dimensional point cloud data of the diversion tunnel of the hydropower station by airborne laser radar, and calculating the water accumulation volume at different elevations by geographic information system software according to the three-dimensional point cloud data, to obtain a mathematical model of diversion tunnel elevation-water accumulation volume;

[0074] It is easy to understand that the three-dimensional point cloud data of the diversion tunnel of the hydropower station can be obtained by airborne laser radar (Light Detection And Ranging, LiDAR), and then the contour lines and longitudinal sections of the flooded area can be drawn through the geographic information system software based on the three-dimensional point cloud data. Then, the water-accumulating volume at different elevations can be calculated based on the contour lines and longitudinal sections of the flooded area to obtain the diversion tunnel elevation-water-accumulating volume mathematical model. Among them, the geographic information system software can be understood as software that implements the above functions described in this embodiment, such as Global Mapper17 software. The diversion tunnel elevation-water-accumulating volume mathematical model can be understood as a model used to describe the mathematical relationship between the diversion tunnel elevation and the water-accumulating volume.

[0075] Reference Figure 2 , Figure 2 The 3D structure diagram of the diversion tunnel involved in the first embodiment of the method for dynamically detecting the change in water inflow in the diversion tunnel of a hydropower station according to the present invention. In the specific implementation, a 3D laser radar scanner can be used to obtain the point cloud data of the diversion tunnel, and the diversion tunnel can be drawn as follows: Figure 2 The three-dimensional structure diagram of the diversion tunnel is shown.

[0076] Reference Figure 3 , Figure 3 This is a point cloud result diagram of the diversion tunnel involved in the first embodiment of the method for dynamically detecting the change in water inflow to the diversion tunnel of a hydropower station according to the present invention. Figure 3 As shown, Global Mapper17 software can be used to import point cloud data and draw Figure 3 (a) The inundation area contours are shown in Figure 2. Figure 3 From the longitudinal section shown in (b), it can be seen that the ground of the diversion tunnel is irregular and uneven.

[0077] Reference Figure 4 , Figure 4 This is a water level-capable water storage volume relationship diagram involved in the first embodiment of the method for dynamically detecting the change in water inflow to a diversion tunnel of a hydropower station according to the present invention. Figure 4 In the following text Figure 5 (b) is used as the reference, and the volume of water that can be accumulated at the corresponding elevation is obtained every 1 cm downward. The results are as follows: Figure 4 As shown, the volume changes smoothly without sudden changes, indicating that the 1 cm height difference sampling meets the requirements. The closer to the bottom, the gentler the volume change. This is due to the small elevation area for water accumulation caused by the accumulation of soil and rocks at the bottom and the occupation of other buildings. 120 cm below the benchmark, the volume is very small and hardly changes with the elevation. These are all small pits with a depth of 20-30 cm distributed at the bottom.

[0078] Step S20: identifying the water level edge in the monitoring picture of the diversion tunnel of the hydropower station by using the Canny edge detection algorithm, and converting the pixel height of the water level edge into the actual water level height;

[0079] Reference Figure 5 , Figure 5 This is a diagram of the diversion tunnel site and water level monitoring screen involved in the first embodiment of the method for dynamically detecting the change in water inflow to the diversion tunnel of a hydropower station according to the present invention. Figure 5 In the process, by measuring the actual height of each calibration object on site and fitting it with the pixel height of the picture taken by the camera, the mathematical relationship between the actual distance and the pixel distance can be obtained, so that after the pixel height of the diversion tunnel water level line is detected in real time, it can be converted into the actual height based on the fitting relationship, and then the actual water level can be obtained. Figure 5 (a) is shown. After the camera is arranged, the captured image is as follows Figure 5 As shown in (b), Figure 5 In (b), the water level line is marked according to the current water level, and the workbench surface reference line is marked according to the workbench where the worker is working.

[0080] In this implementation, the elevation-water-accumulated volume mathematical model of the diversion tunnel can be constructed by using LiDAR technology and Global Mapper17 three-dimensional software, and then the water level of the diversion tunnel can be detected in real time by computer vision technology, converted into actual elevation, and the current amount of water accumulation can be obtained. Due to the serious calcification of water quality, calcium is easily formed on the surface of the water level scale, resulting in the scale information being covered; at the same time, in order to avoid the dependence of the accuracy of the water level detection model on the quality of the training sample, this embodiment proposes a real-time water level detection model based on the Canny algorithm, which directly identifies the edge pixels of the water level line in the collected image and converts them into the actual water level by coordinate fitting. Among them, Canny is a multi-level edge detection algorithm, which is based on three indicators and three criteria of edge detection, and aims to find the optimal edge in the image. The algorithm flow includes graying the original image, Gaussian filtering the image, calculating the gradient size and direction of the grayscale image, non-maximum suppression of the gradient value, detection with a double threshold algorithm, and connecting edges.

[0081] In a specific implementation, the original image in the monitoring screen of the diversion tunnel of the hydropower station can be subjected to grayscale processing and Gaussian filtering processing in sequence to obtain a filtered grayscale image.

[0082] It is easy to understand that the images processed by the Canny algorithm are usually grayscale images, so the color images captured by the camera need to be converted into grayscale images. Grayscale the image, that is, weighted average the sampling values ​​of each channel of the image. Taking the RGB format image as an example, the commonly used grayscale methods are as follows:

[0083] Type ①:

[0084] I gray =(I R +I G +I B ) / 3

[0085] In the formula, I gray Represents the pixel value after grayscale conversion, I R ,I G ,I B They are the pixel values ​​on the red, green, and blue channels of the corresponding pixels in the original image, respectively.

[0086] Type 2:

[0087] I gray =0.299×I R +0.587×I G +0.114×I B

[0088] In the formula, I gray Represents the pixel value after grayscale conversion, I R ,I G ,I B are the pixel values ​​on the red, green, and blue channels of the corresponding pixels of the original image, respectively. The second grayscale method is determined based on the sensitivity of the human eye to different colors. The human eye is most sensitive to green and least sensitive to blue. Therefore, the weight of the green channel in the formula is the largest, and the weight of the blue channel is the smallest. This embodiment preferably adopts the second grayscale method.

[0089] In the specific implementation, Gaussian filtering can remove noise from the image. Generally, filtering and edge detection are contradictory concepts. Suppressing noise will make the edge blurred, which will increase the uncertainty of edge positioning. Practical engineering experience shows that the kernel determined by the Gaussian function can achieve a good balance between noise resistance and edge detection accuracy. The Gaussian filtering formula is:

[0090]

[0091] Where G(x,y) represents the Gaussian function, σ represents the standard deviation of the filter, and (x,y) represents the pixel point.

[0092] In a specific implementation, the Sobel operator may be used to calculate the gradient magnitude and gradient direction of the filtered grayscale image, and non-maximum suppression processing may be performed according to the gradient magnitude and the gradient direction to obtain the gradient maximum value;

[0093] For example, the Sobel operator can be used to calculate the gradient size and direction of the filtered grayscale image by the following formula:

[0094]

[0095] In the formula, the Sobel operator is two 3×3 matrices, namely S x and S y , S x Used to calculate the image x-direction gradient matrix G x , that is, G x Represents the gradient value in the horizontal direction, S y Used to calculate the image y-direction gradient matrix G y , that is, G y represents the gradient value in the vertical direction, I is the grayscale image matrix after filtering, * represents the cross-correlation operation (the convolution operation can be regarded as the cross-correlation operation after rotating the convolution kernel by 180°), M(x, y) represents the gradient intensity of the pixel, G x (x, y) represents the gradient value of the pixel in the horizontal direction, G y (x, y) represents the gradient value of the pixel in the vertical direction, and θ(x, y) represents the gradient direction of the pixel, where the origin of the image matrix coordinate system is in the upper left corner, the positive direction of x is from left to right (i.e., horizontal direction), and the positive direction of y is from top to bottom (i.e., vertical direction).

[0096] Furthermore, non-maximum suppression processing is performed according to the gradient magnitude and the gradient direction by the following formula to obtain the gradient maximum value;

[0097]

[0098] In the formula, M'(x,y) is the maximum value of the gradient, M L is the low threshold of gradient strength, δ x and δ t is the offset in the gradient direction, such as δ x =cosθ(x,y),δ y =sinθ(x,y).

[0099] Non-maximum suppression refers to finding the local maximum value of pixels. Because the edges detected by the Sobel operator are relatively coarse, it is necessary to suppress pixels with smaller gradients and retain only the largest gradients to achieve the purpose of slimming. Along the direction of the gradient, the gradient values ​​before and after it are compared. Pixels with non-maximum gradients are likely to be transition points of the edge. After excluding non-edge points, the final result is a thinner edge line.

[0100] In a specific implementation, the water level edge can be identified by using a Canny edge detection algorithm according to the gradient maximum value using a double threshold method;

[0101] For example, the water level edge can be identified by the following formula using the double threshold method according to the gradient maximum value through the Canny edge detection algorithm:

[0102]

[0103] In the formula, Canny(x,y) is the boundary point detected by the Canny edge detection algorithm, M'(x,y) is the maximum gradient value, and M H is the high threshold of gradient strength, M L is the low threshold of gradient strength, Strong, Weak, and Non-edge represent strong edge, weak edge, and non-edge, respectively. L It can be understood as the parameters minVal, M of the dual threshold setting of the Canny algorithm. H It can be understood as the parameter maxVal of the double threshold setting of the Canny algorithm.

[0104] The Canny algorithm uses a double threshold method to reduce the number of false edges. Edges with a gradient lower than the lower threshold are considered not to be edges, edges with a gradient higher than the upper threshold are considered to be strong edges, and edges with a gradient between the upper and lower thresholds are considered to be weak edges. The image generated by a strong edge may not be closed. In this case, a point that meets the low threshold (i.e., a weak edge) will be found from the 8-neighborhood of the contour endpoint, and new edges will be collected based on this point until the entire image is closed.

[0105] In a specific implementation, the pixel height of the water level edge may be converted into the actual water level height according to a fitting relationship between the actual water level height and the pixel height.

[0106] For example, Figure 5 (b) The work surface shown in Figure 1 is used as the reference. From the work surface, a calibration point is set every 5 cm on the vertical wall. Then, based on the image captured by the camera, the pixel height from each calibration point to the work surface is extracted, and a total of 23 sets of actual height and pixel height data are obtained (based on the work surface, the same below). By previewing the data distribution and taking the minimum mean square error as the objective function, a polynomial fitting of the actual height and pixel height is performed. The fitting relationship between the actual water level height and the pixel height is:

[0107]

[0108] In the formula, f(x,w) is the actual water level height, x is the pixel height, M is the polynomial order, and w is the i represents the weight coefficient of each order, E(w) is the mean square error between the actual water level and the measured water level, f(x i ,w) is the actual water level height corresponding to the i-th point, x i is the pixel height of the i-th point, and w is the weight vector of the fitting polynomial, that is, w=[w 0 ,w 1 ,w 2 ,…,wM ],y i is the measured height of the ith point, and N is the number of samples.

[0109] Reference Figure 6 , Figure 6 This is a fitting relationship diagram between the actual water level height and the pixel height involved in the first embodiment of the method for dynamically detecting the change in water inflow in the diversion tunnel of a hydropower station of the present invention. Figure 6 This is the result of fitting based on the above sample data. It can be seen that the actual height and pixel height are in a univariate second-order polynomial relationship, and the second-order weight coefficient is low, which is close to linearity as a whole. The mean square error of the fitting result is 0.03, and the maximum absolute error is less than 0.5cm.

[0110] Step S30: Substituting the actual water level into the diversion tunnel elevation-capacity water storage mathematical model to obtain the capacity of water storage at the current water level;

[0111] Step S40: Obtain the water storage volume at the next time detection point according to the preset frequency, and calculate the volume difference between the water storage volume at the current water level and the water storage volume at the next time detection point, so as to realize dynamic detection of the change of water inflow into the diversion tunnel of the hydropower station.

[0112] In a specific implementation, the actual water level height obtained can be substituted into the above-mentioned diversion tunnel elevation-capable water volume mathematical model to obtain the current water level capacity, and then the next time detection point capacity can be obtained according to the preset frequency, and the volume difference between the current water level capacity and the next time detection point capacity can be calculated to achieve dynamic detection of the change in water inflow to the diversion tunnel of the hydropower station. Among them, the preset frequency can be set according to actual needs, and this embodiment does not limit this.

[0113] In this embodiment, LiDAR scanning can be used to obtain the three-dimensional point cloud data of the diversion tunnel, and then the GlobalMapper17 software is used to calculate the water volume at different elevations to obtain the mathematical relationship between the water level and the water volume. The Canny algorithm is then used to identify the edge of the water level in the diversion tunnel monitoring screen, and the pixel distance is converted into the actual height, which is substituted into the water level-water volume relationship to obtain the water volume at the current water level. Through this solution, regular water volume detection can be carried out to obtain information on changes in the water volume of the diversion tunnel. Through practical application, this solution overcomes the problem of irregular spatial structure of the diversion tunnel, and can accurately build a water level-water volume relationship for the diversion tunnel. At the same time, the error between Canny water level identification and the actual result is controlled within 1%, which has clear application value and practical guidance.

[0114] For example, this solution can be implemented by following the steps below:

[0115] (1) Canny edge detection

[0116] First, the image is grayed out and the Canny algorithm is used to detect the image edges. As can be seen from the above content, the image Gaussian filtering and gradient calculation are all fixed parameters and algorithm processing, and the quality of the edge detection result mainly depends on the selection of dual thresholds. This embodiment dynamically adjusts the dual thresholds through the OpenCV trackbar and selects a suitable threshold combination (i.e. minVal and maxVal, where the value range of minVal and maxVal is [0,255]). Figure 7 , Figure 7 This is a diagram showing the edge detection results of different dual threshold combinations involved in the first embodiment of the method for dynamically detecting the change in water inflow in the diversion tunnel of a hydropower station according to the present invention. Figure 7 It can be seen that the edge detection sensitivity under different dual threshold combinations is significantly different. Figure 7 (d) shows the parameter combination of the lower threshold of 200 and the upper threshold of 100.

[0117] (2) Mask area selection

[0118] from Figure 5 (b) and Figure 7 It can be seen that there are many edge lines in the picture that are irrelevant to the water level line, such as the edge of the guardrail, the edge of the circuit pipeline, the edge of the step, etc., which will cause great interference to the recognition of the water level edge. This embodiment only focuses on the edge of the work surface and the edge of the water level. Therefore, a mask is used to extract the appropriate area in the image. Figure 8 , Figure 8 This is a result diagram of mask area selection involved in the first embodiment of the method for dynamically detecting the change in water inflow to the diversion tunnel of a hydropower station according to the present invention. Figure 8 As shown, the edge of the work surface and the edge of the water level in the image are extracted using a mask.

[0119] (3) Abnormal edge filtering and water level extraction

[0120] from Figure 8 It can be seen that the results will contain abnormal edges, including the upper and lower edges of circuit pipelines, and the edges of wall traces. In order to improve robustness, the abnormal edges in the mask area are pre-filtered. The filtering rules are as follows:

[0121] ①Since the water level line is a horizontal edge, edges with large inclination angles and vertical edges can be directly filtered.

[0122] ② Because the camera is fixed, the fixed interference edges in the image are directly filtered, such as the upper and lower edges of circuit pipelines, fixed scratch edges on the wall, etc.

[0123] ③ Calculate the pixel width of the edge line, and directly filter those below the threshold. In this embodiment, the threshold is selected as 1 / 3 of the pixel width of the mask area.

[0124] Reference Fig. 9 , Fig. 9 This is a diagram of abnormal edge filtering and water level detection results related to the first embodiment of the method for dynamically detecting the change in water inflow to the diversion tunnel of a hydropower station according to the present invention. Fig. 9 As shown in the figure, there are edges of the work surface, circuit pipelines, water level, etc. After filtering the abnormal edges, there are only two edges that meet the requirements, namely the edge of the work surface and the edge of the water level.

[0125] (4) Construction of water flow model

[0126] Fig. 9 The pixel height between the edge of the work surface and the edge of the water level is 264. Substituting it into the fitting relationship between the actual water level height and the pixel height, the actual distance between the water level and the work surface is 81.3 cm, which is within 1% of the measured result (81.7 cm). Then, this distance is substituted into the above diversion tunnel elevation-capacity mathematical model, and the current capacity of water accumulation is 628 m 3 Finally, by calculating the volume difference between the two detection time points, the change in water flow can be obtained.

[0127] This embodiment adopts LiDAR three-dimensional spatial modeling technology and combines it with computer vision for water level detection. A diversion tunnel water flow detection model is built and put into practice in a hydropower station, which has certain engineering application practical value.

[0128] (1) The three-dimensional point cloud data of the diversion tunnel was obtained through LiDAR scanning technology. The GlobalMapper17 software was used to establish a mathematical model of diversion tunnel elevation-capacity for water accumulation. This method overcomes the difficulty of accurately calculating the capacity for water accumulation due to the irregularity of the diversion tunnel space.

[0129] (2) The Canny edge detection algorithm is used to quickly extract the water level line in the monitoring image, and the pixel height between the water level line and the baseline is extracted. Then, based on the polynomial fitting relationship between the pixel height and the actual height, the pixel height is converted into the actual height. Compared with the traditional water level meter measurement, this solution has stronger adaptability to the environment; at the same time, it overcomes the limitation of optical character recognition (OCR) water level scale recognition for high water quality requirements.

[0130] In this embodiment, the three-dimensional point cloud data of the diversion tunnel of the hydropower station is obtained by an airborne laser radar, and the water-storage volume at different elevations is calculated by the geographic information system software according to the three-dimensional point cloud data to obtain the diversion tunnel elevation-water-storage volume mathematical model; the water level edge in the monitoring screen of the diversion tunnel of the hydropower station is identified by the Canny edge detection algorithm, and the pixel height of the water level edge is converted into the actual water level height; the actual water level height is substituted into the diversion tunnel elevation-water-storage volume mathematical model to obtain the water-storage volume at the current water level; the next time is obtained according to the preset frequency. The water-storage volume at the detection point is determined, and the volume difference between the water-storage volume at the current water level and the water-storage volume at the next detection point is calculated to realize dynamic detection of the change in the inflow of water in the diversion tunnel of the hydropower station. This solves the difficulty that the prior art cannot overcome the irregular space of the diversion tunnel and cannot accurately calculate the water-storage volume. At the same time, it overcomes the limitation of the water level scale scale recognition to high water quality requirements, and realizes the accurate detection of the water-storage volume and the change in inflow of water at the current water level in the diversion tunnel of the hydropower station. Moreover, since it is not limited by water quality, spatial irregularity, etc., it improves the adaptability under different detection environments.

[0131] Reference Fig.10 , Fig.10 It is a structural block diagram of the first embodiment of the dynamic detection system for water inflow change in diversion tunnel of a hydropower station according to the present invention.

[0132] like Fig.10 As shown, the dynamic detection system for water inflow change of diversion tunnel of a hydropower station proposed in the embodiment of the present invention includes:

[0133] The model building module 100 is used to obtain the three-dimensional point cloud data of the diversion tunnel of the hydropower station through the airborne laser radar, and calculate the water accumulation volume at different elevations through the geographic information system software according to the three-dimensional point cloud data to obtain the diversion tunnel elevation-water accumulation volume mathematical model;

[0134] The water level height calculation module 200 is used to identify the water level edge in the monitoring picture of the diversion tunnel of the hydropower station through the Canny edge detection algorithm, and convert the pixel height of the water level edge into the actual water level height;

[0135] The water storage volume calculation module 300 is used to substitute the actual water level into the diversion tunnel elevation-water storage volume mathematical model to obtain the water storage volume of the current water level;

[0136] The volume difference calculation module 400 is used to obtain the water-accumulating volume at the next time detection point according to a preset frequency, and calculate the volume difference between the water-accumulating volume at the current water level and the water-accumulating volume at the next time detection point, so as to realize dynamic detection of the change in water inflow to the diversion tunnel of the hydropower station.

[0137] Optionally, the model building module 100 is further used to obtain three-dimensional point cloud data of the diversion tunnel of the hydropower station through an airborne laser radar, and to draw the contour lines and longitudinal sections of the flooded area through geographic information system software according to the three-dimensional point cloud data;

[0138] The model building module 100 is also used to calculate the water-accumulated volume at different elevations according to the contour lines and longitudinal sections of the flooded area, and obtain a diversion tunnel elevation-water-accumulated volume mathematical model.

[0139] Optionally, the water level height calculation module 200 is further used to sequentially perform grayscale processing and Gaussian filtering on the original image in the monitoring screen of the diversion tunnel of the hydropower station to obtain a filtered grayscale image;

[0140] The water level height calculation module 200 is further used to calculate the gradient magnitude and gradient direction of the filtered grayscale image using a Sobel operator, and perform non-maximum suppression processing according to the gradient magnitude and the gradient direction to obtain a gradient maximum;

[0141] The water level height calculation module 200 is also used to identify the water level edge by using a Canny edge detection algorithm according to the gradient maximum value using a double threshold method;

[0142] The water level calculation module 200 is further used to convert the pixel height of the water level edge into the actual water level according to the fitting relationship between the actual water level and the pixel height.

[0143] Optionally, the water level height calculation module 200 is further used to calculate the gradient size and direction of the filtered grayscale image using the following formula using a Sobel operator:

[0144]

[0145] In the formula, the Sobel operator is two 3×3 matrices, namely S x and S y , S x Used to calculate the image x-direction gradient matrix G x , that is, G x Represents the gradient value in the horizontal direction, S y Used to calculate the image y-direction gradient matrix G y , that is, G y represents the gradient value in the vertical direction, I is the grayscale image matrix after filtering, * represents the cross-correlation operation, M(x, y) represents the gradient intensity of the pixel, G x (x, y) represents the gradient value of the pixel in the horizontal direction, G y (x, y) represents the gradient value of the pixel in the vertical direction, and θ(x, y) represents the gradient direction of the pixel;

[0146] The water level height calculation module 200 is further used to perform non-maximum suppression processing according to the gradient size and the gradient direction through the following formula to obtain the gradient maximum value;

[0147]

[0148] In the formula, M'(x,y) is the maximum value of the gradient, M L is the low threshold of gradient strength, δ x and δ y is the offset in the gradient direction, δ x =cosθ(x,y),δ y =sinθ(x,y).

[0149] Optionally, the water level height calculation module 200 is further used to identify the water level edge by the following formula using a double threshold method according to the gradient maximum value through a Canny edge detection algorithm;

[0150]

[0151] In the formula, Canny(x,y) is the boundary point detected by the Canny edge detection algorithm, M'(x,y) is the maximum gradient value, and M H is the high threshold of gradient strength, M L is the low threshold of gradient strength, Strong, Weak, and Non-edge represent strong edge, weak edge, and non-edge, respectively;

[0152] Optionally, the fitting relationship between the actual water level height and the pixel height is:

[0153]

[0154] In the formula, f(x,w) is the actual water level height, x is the pixel height, M is the polynomial order, and w is the i represents the weight coefficient of each order, E(w) is the mean square error between the actual water level and the measured water level, f(x i ,w) is the actual water level height corresponding to the i-th point, x i is the pixel height of the i-th point, and w is the weight vector of the fitting polynomial, that is, w=[w 0 ,w 1 ,w 2 ,…,w M ],y i is the measured height of the ith point, and N is the number of samples.

[0155] In this embodiment, the three-dimensional point cloud data of the diversion tunnel of the hydropower station is obtained by an airborne laser radar, and the water-storage volume at different elevations is calculated by geographic information system software according to the three-dimensional point cloud data to obtain a diversion tunnel elevation-water-storage volume mathematical model; the water level edge in the monitoring screen of the diversion tunnel of the hydropower station is identified by the Canny edge detection algorithm, and the pixel height of the water level edge is converted into the actual water level height; the actual water level height is substituted into the diversion tunnel elevation-water-storage volume mathematical model to obtain the water-storage volume at the current water level; the next time is obtained according to the preset frequency. The water-storage volume at the detection point is determined, and the volume difference between the water-storage volume at the current water level and the water-storage volume at the next detection point is calculated to realize dynamic detection of the change in the inflow of water in the diversion tunnel of the hydropower station. This solves the difficulty that the prior art cannot overcome the irregular space of the diversion tunnel and cannot accurately calculate the water-storage volume. At the same time, it overcomes the limitation of the water level scale scale recognition to high water quality requirements, and realizes the accurate detection of the water-storage volume and the change in inflow of water at the current water level in the diversion tunnel of the hydropower station. Moreover, since it is not limited by water quality, spatial irregularity, etc., it improves the adaptability under different detection environments.

[0156] Other embodiments or specific implementations of the system for dynamically detecting changes in water inflow in a diversion tunnel of a hydropower station of the present invention may refer to the above-mentioned method embodiments and will not be described in detail here.

[0157] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0158] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0159] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory / random access memory, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0160] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A method for dynamically detecting the change in water inflow of a diversion tunnel of a hydropower station, characterized in that: The method for dynamically detecting the change in water inflow in the diversion tunnel of a hydropower station comprises the following steps: The three-dimensional point cloud data of the diversion tunnel of the hydropower station is obtained by airborne laser radar, and the water accumulation volume at different elevations is calculated by geographic information system software according to the three-dimensional point cloud data to obtain a mathematical model of diversion tunnel elevation-water accumulation volume; The water level edge in the diversion tunnel monitoring screen of the hydropower station is identified by the Canny edge detection algorithm, and the pixel height of the water level edge is converted into the actual water level height; Substituting the actual water level into the diversion tunnel elevation-capacity water storage mathematical model to obtain the capacity of water storage at the current water level; The water storage volume at the next time detection point is obtained according to a preset frequency, and the volume difference between the water storage volume at the current water level and the water storage volume at the next time detection point is calculated to realize dynamic detection of the change in water inflow to the diversion tunnel of the hydropower station.

2. The method for dynamically detecting the change in water inflow of a diversion tunnel of a hydropower station according to claim 1, characterized in that: The step of obtaining the three-dimensional point cloud data of the diversion tunnel of the hydropower station by airborne laser radar, and calculating the water accumulation volume at different elevations by geographic information system software according to the three-dimensional point cloud data to obtain the diversion tunnel elevation-water accumulation volume mathematical model includes: Acquire the three-dimensional point cloud data of the diversion tunnel of the hydropower station through the airborne laser radar, and draw the contour lines and longitudinal sections of the flooded area through the geographic information system software according to the three-dimensional point cloud data; The water-storage volume at different elevations is calculated according to the contour lines and longitudinal sections of the submerged area, and a mathematical model of diversion tunnel elevation-water-storage volume is obtained.

3. The method for dynamically detecting the change in water inflow of a diversion tunnel of a hydropower station according to claim 1, characterized in that: The step of identifying the water level edge in the monitoring picture of the diversion tunnel of the hydropower station by using the Canny edge detection algorithm and converting the pixel height of the water level edge into the actual water level height comprises: The original image in the monitoring screen of the diversion tunnel of the hydropower station is subjected to grayscale processing and Gaussian filtering in sequence to obtain a filtered grayscale image; Calculating the gradient magnitude and gradient direction of the filtered grayscale image using a Sobel operator, and performing non-maximum suppression processing according to the gradient magnitude and the gradient direction to obtain a gradient maximum; Using the Canny edge detection algorithm and the double threshold method according to the gradient maximum value to identify the water level edge; The pixel height of the water level edge is converted into the actual water level height according to the fitting relationship between the actual water level height and the pixel height.

4. The method for dynamically detecting the change in water inflow in the diversion tunnel of a hydropower station as claimed in claim 3, characterized in that: The step of using the Sobel operator to calculate the gradient magnitude and gradient direction of the filtered grayscale image, and performing non-maximum suppression processing according to the gradient magnitude and the gradient direction to obtain the gradient maximum value includes: The gradient size and direction of the filtered grayscale image are calculated using the Sobel operator through the following formula; In the formula, the Sobel operator is two 3×3 matrices, namely S x and S y , S x Used to calculate the image x-direction gradient matrix G x , that is, G x Represents the gradient value in the horizontal direction, S y Used to calculate the image y-direction gradient matrix G y , that is, G y represents the gradient value in the vertical direction, I is the grayscale image matrix after filtering, * represents the cross-correlation operation, M(x, y) represents the gradient intensity of the pixel, G x (x, y) represents the gradient value of the pixel in the horizontal direction, G y (x, y) represents the gradient value of the pixel in the vertical direction, and θ(x, y) represents the gradient direction of the pixel; According to the gradient magnitude and the gradient direction, non-maximum suppression processing is performed by the following formula to obtain a gradient maximum value; In the formula, M'(x,y) is the maximum value of the gradient, M L is the low threshold of gradient strength, δ x and δ y is the offset in the gradient direction, δ x =cosθ(x,y),δ y =sinθ(x,y).

5. The method for dynamically detecting the change in water inflow in the diversion tunnel of a hydropower station as claimed in claim 4, characterized in that: The step of identifying the water level edge by using a double threshold method according to the gradient maximum value through a Canny edge detection algorithm comprises: The water level edge is identified by the following formula using the Canny edge detection algorithm and the double threshold method according to the gradient maximum value; In the formula, Canny(x,y) is the boundary point detected by the Canny edge detection algorithm, M'(x,y) is the maximum gradient value, and M H is the high threshold of gradient strength, M L is the low threshold of gradient strength, Strong, Weak, and Non-edge represent strong edge, weak edge, and non-edge, respectively.

6. The method for dynamically detecting the change in water inflow in the diversion tunnel of a hydropower station as claimed in claim 3, characterized in that: The fitting relationship between the actual water level and the pixel height is: In the formula, f(x,w) is the actual water level height, x is the pixel height, M is the polynomial order, and w is the i represents the weight coefficient of each order, E(w) is the mean square error between the actual water level and the measured water level, f(x i ,w) is the actual water level height corresponding to the i-th point, x i is the pixel height of the i-th point, w is the weight vector of the fitting polynomial, that is, w=[w0,w1,w2,…,w M ],y i is the measured height of the ith point, and N is the number of samples.

7. A dynamic detection system for water inflow changes in a diversion tunnel of a hydropower station, characterized in that: The dynamic detection system for water inflow change in the diversion tunnel of the hydropower station includes: A model building module is used to obtain the three-dimensional point cloud data of the diversion tunnel of the hydropower station through an airborne laser radar, and calculate the water accumulation volume at different elevations through geographic information system software based on the three-dimensional point cloud data to obtain a diversion tunnel elevation-water accumulation volume mathematical model; A water level height calculation module is used to identify the water level edge in the diversion tunnel monitoring screen of the hydropower station through the Canny edge detection algorithm, and convert the pixel height of the water level edge into the actual water level height; A water storage volume calculation module is used to substitute the actual water level into the diversion tunnel elevation-water storage volume mathematical model to obtain the water storage volume of the current water level; The volume difference calculation module is used to obtain the water volume that can be accumulated at the next time detection point according to a preset frequency, and calculate the volume difference between the water volume that can be accumulated at the current water level and the water volume that can be accumulated at the next time detection point, so as to realize dynamic detection of the change in water inflow to the diversion tunnel of the hydropower station.

8. The dynamic detection system for water inflow change in diversion tunnel of a hydropower station as claimed in claim 7, characterized in that: The model building module is also used to obtain three-dimensional space point cloud data of the diversion tunnel of the hydropower station through an airborne laser radar, and to draw the contour lines and longitudinal sections of the submerged area through geographic information system software based on the three-dimensional space point cloud data; The model building module is also used to calculate the water-accumulated volume at different elevations according to the contour lines and longitudinal sections of the flooded area, and obtain a diversion tunnel elevation-water-accumulated volume mathematical model.

9. The dynamic detection system for water inflow change in diversion tunnel of a hydropower station as claimed in claim 7, characterized in that: The water level height calculation module is also used to sequentially perform grayscale processing and Gaussian filtering on the original image in the monitoring screen of the diversion tunnel of the hydropower station to obtain a filtered grayscale image; The water level height calculation module is further used to calculate the gradient size and gradient direction of the filtered grayscale image using a Sobel operator, and perform non-maximum suppression processing according to the gradient size and the gradient direction to obtain a gradient maximum; The water level height calculation module is also used to identify the water level edge by using a double threshold method according to the gradient maximum value through a Canny edge detection algorithm; The water level calculation module is further used to convert the pixel height of the water level edge into the actual water level according to the fitting relationship between the actual water level and the pixel height.

10. The dynamic detection system for water inflow change in diversion tunnel of a hydropower station as claimed in claim 9, characterized in that: The water level height calculation module is also used to calculate the gradient size and direction of the filtered grayscale image using the Sobel operator through the following formula; In the formula, the Sobel operator is two 3×3 matrices, namely S x and S y , S x Used to calculate the image x-direction gradient matrix G x , that is, G x Represents the gradient value in the horizontal direction, S y Used to calculate the image y-direction gradient matrix G y , that is, G y represents the gradient value in the vertical direction, I is the grayscale image matrix after filtering, * represents the cross-correlation operation, M(x, y) represents the gradient intensity of the pixel, G x (x, y) represents the gradient value of the pixel in the horizontal direction, G y (x, y) represents the gradient value of the pixel in the vertical direction, and θ(x, y) represents the gradient direction of the pixel; The water level height calculation module is further used to perform non-maximum suppression processing according to the gradient size and the gradient direction through the following formula to obtain the gradient maximum value; In the formula, M'(x,y) is the maximum value of the gradient, M L is the low threshold of gradient strength, δ x and δ y is the offset in the gradient direction, δ x =cosθ(x,y),δ y =sinθ(x,y). The water level height calculation module is also used to identify the water level edge by the following formula using a double threshold method according to the gradient maximum value through a Canny edge detection algorithm; In the formula, Canny(x,y) is the boundary point detected by the Canny edge detection algorithm, M'(x,y) is the maximum gradient value, and M H is the high threshold of gradient strength, M L is the low threshold of gradient strength, Strong, Weak, and Non-edge represent strong edge, weak edge, and non-edge, respectively; The fitting relationship between the actual water level and the pixel height is: In the formula, f(x,w) is the actual water level height, x is the pixel height, M is the polynomial order, and w is the i represents the weight coefficient of each order, E(w) is the mean square error between the actual water level and the measured water level, f(x i ,w) is the actual water level height corresponding to the i-th point, x i is the pixel height of the i-th point, w is the weight vector of the fitting polynomial, that is, w=[w0,w1,w2,…,w M ],y i is the measured height of the ith point, and N is the number of samples.