U-shaped open channel flow measurement method and system based on space-time image method, electronic equipment and storage medium

Through the U-shaped open channel flow measurement method based on spatiotemporal image method, the flow measurement problems of equipment vulnerability and environmental factors are solved, and safe, efficient and low-cost flow monitoring is achieved, which is suitable for flow measurement in large flow and complex environments.

CN120293234APending Publication Date: 2025-07-11TAIYUAN UNIVERSITY OF TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510542030.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-28
Publication Date
2025-07-11

AI Technical Summary

Technical Problem

In the open channel flow measurement, the existing technology has problems such as easy equipment to be damaged, the measurement accuracy is greatly affected by environmental factors, and the cost is high, especially in large flow and complex environments, which are difficult to achieve efficient and accurate flow monitoring.

Method used

The U-shaped open channel flow measurement method based on the spatiotemporal image method is adopted. By obtaining channel size information, the speed measurement line is set, the coordinates are converted using the calibration plate, the spatiotemporal image is generated and the spectrum analysis is performed, the flow rate and flow rate are calculated, the equipment is avoided from contact with water flow, and non-contact measurement is realized.

Benefits of technology

It realizes safe and efficient flow monitoring in large flow and complex environments, reduces equipment costs, improves flow measurement accuracy and spatial resolution, adapts to complex environmental conditions, and is suitable for large-scale or unattended application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120293234A_ABST
    Figure CN120293234A_ABST
Patent Text Reader

Abstract

The invention provides a U-shaped open channel flow measurement method and system based on a space-time image method, electronic equipment and a storage medium, and the method comprises the steps: obtaining the size information of a U-shaped open channel, presetting a plurality of speed measurement lines, and taking one speed measurement line as a reference line; a calibration plate is adopted for calibration, and world coordinates of the starting point and the ending point of the velocity measurement line are converted into pixel coordinates; a shot image of the U-shaped open channel is collected, and a space-time image corresponding to each speed measurement line is generated based on the pixel coordinates of the starting point and the ending point of each speed measurement line; converting the generated space-time image into a frequency spectrum image, and calculating the flow velocity of each velocity measurement line based on the frequency spectrum image corresponding to each velocity measurement line; calculating the flow of the U-shaped open channel according to the size information of the U-shaped open channel and the flow velocity of each velocity measurement line; the method has the advantages that the flow measuring process is simple, the flow measuring effect is good, the influence of environmental factors is small, and large-scale application and popularization can be achieved; the method is suitable for the technical field of U-shaped open channel flow measurement.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of U-shaped open-channel flow measurement, and specifically relates to a U-shaped open-channel flow measurement method, system, electronic device, and storage medium based on the spatio-temporal image method. Background Technique

[0002] For a long time, due to the complex flow characteristics of water and the harsh natural environment, the measurement of flow velocity and flow rate has always been a difficult problem for hydrological measurement departments. The velocity-area method is the most commonly used method for calculating open-channel flow. Its principle is to select a certain cross-section after the open-channel flow is fully developed as the measurement point, calculate the average velocity of the cross-section by measuring the velocities of the characteristic points of the cross-section, then measure the cross-section water level through a water level gauge to obtain the cross-sectional area, and finally, obtain the instantaneous flow rate by multiplying the average velocity of the cross-section by the cross-sectional area. According to whether it is in contact, the methods for measuring the average velocity of the cross-section can be divided into two types: contact flow measurement and non-contact flow measurement.

[0003] The most representative methods in contact flow measurement are the propeller-type current meter, electromagnetic current meter, acoustic Doppler profiler, and ultrasonic current meter, etc. The above methods need to be fixed in the water, which may face the risk of being washed away or damaged during the measurement of large-flow open-channel flow, and there are problems such as complex measurement processes, poor measurement effects, and being greatly affected by environmental factors.

[0004] Non-contact flow measurement methods mainly include the radar current meter method, laser Doppler velocimetry method, and large-scale particle image velocimetry (LSPIV), among which:

[0005] The radar wave current meter uses the radar beam to penetrate the water surface and interact with the scatterers (such as plankton and floating objects) related to the water flow velocity, and obtains the water surface flow velocity information by measuring the Doppler frequency shift of the scattered wave. It has the characteristics of non-contact, remote monitoring, and real-time data acquisition, and can be used for the measurement of flow velocity in rivers, reservoirs, and the ocean. However, due to the high cost of radar equipment and the fact that its measurement accuracy is extremely vulnerable to influence under bad weather conditions, its promotion and application in a larger range are limited.

[0006] Laser Doppler Velocimetry (LDV) is an advanced method for measuring fluid velocity. Based on the Doppler effect, it precisely measures the fluid velocity by measuring the frequency shift of the light scattering signal. The working principle is as follows: A laser generates a beam of monochromatic laser light, which is split into two beams by a beam splitter. One beam serves as the reference beam, and the other beam irradiates the particles in the fluid through an optical system and is scattered back; the detector receives the signal of the reflected light and interferes it with the reference beam. When the fluid particles approach or move away from the laser beam, the frequency of the reflected light changes, and the frequency of the interference signal also changes, thereby obtaining the flow velocity information. It has the advantages of non-invasiveness, high precision, high sensitivity, etc., does not require contact with the measurement object, can measure without disturbing the fluid flow, and is applicable to various fluid media. However, there are problems such as limited measurement range, susceptibility of measurement accuracy to interference, and the measurement range being limited by the size of the laser beam and the density of scattering particles, which cannot meet the measurement requirements of some large-scale flow fields, and it is sensitive to environmental noise and optical interference.

[0007] Large Scale Particle Image Velocimetry (LSPIV) uses artificial particles as water flow tracers and obtains the two-dimensional flow velocity field by matching the particle images following the surface water flow in the flow region to be measured. It has the following disadvantages: First, it highly depends on the visibility of the surface tracers. Due to complex lighting conditions, the visibility of the tracers in the natural environment is poor, which is extremely likely to cause the failure of flow field reconstruction or excessive errors; Second, there are many uncertain factors in the selection of the size of the flow region to be measured. If the size of the flow region to be measured is too large, the spatial resolution of flow measurement will be reduced due to the spatial averaging effect, and if the size of the flow region to be measured is too small, it is easy to cause false matching due to lack of target information; Finally, a large amount of memory space is required to store hundreds of large-size images, and a computer with powerful performance is needed to calculate the matching coefficients of the pattern, which undoubtedly increases the cost of flow measurement. Summary of the Invention

[0008] To solve one of the above technical defects, the present application provides a U-shaped open channel flow measurement method, system, electronic device, and storage medium based on the spatio-temporal image method.

[0009] According to the first aspect of the present application, a U-shaped open channel flow measurement method based on the spatio-temporal image method is provided, including:

[0010] Obtain the size information of the U-shaped open channel, preset multiple velocity measurement lines based on the size information of the U-shaped open channel, and use one of the velocity measurement lines as the reference line;

[0011] Use a calibration plate for calibration to convert the world coordinates of the starting point and the ending point of each velocity measurement line into pixel coordinates;

[0012] Collect the captured images of the U-shaped open channel, and generate the spatio-temporal image corresponding to each velocity measurement line based on the pixel coordinates of the starting point and the ending point of each velocity measurement line;

[0013] Convert the generated spatio-temporal image into the corresponding frequency spectrum image, and calculate the flow velocity of each velocity measurement line based on the frequency spectrum image corresponding to each velocity measurement line;

[0014] Calculate the flow rate of the U-shaped open channel according to the dimension information of the U-shaped open channel and the flow velocity of each velocity measurement line.

[0015] Preferably, the calibration plate is used for calibration to convert the world coordinates of the starting point and the ending point of each velocity measurement line into pixel coordinates, which specifically includes:

[0016] Obtain the corner point information and dimension information of the calibration plate, and select any corner point on the calibration plate as the origin of the world coordinate system;

[0017] Collect the calibration images, perform calibration, and calculate the internal parameter matrix and external parameter matrix of the camera according to the corner point information and dimension information of the calibration plate;

[0018] Align the starting point of the reference line with the origin of the world coordinate system, and obtain the world coordinates of the starting point and the ending point of each velocity measurement line according to the positional relationship between the reference line and other velocity measurement lines; Based on the internal parameter matrix and external parameter matrix of the camera, use the coordinate transformation formula to convert the world coordinates of the starting point and the ending point of each velocity measurement line into pixel coordinates.

[0019] Preferably, the conversion of the generated spatio-temporal image into the corresponding frequency spectrum image specifically includes:

[0020] Convert the spatio-temporal image into a preliminary frequency spectrum image through the image conversion formula, and the image conversion formula is:

[0021]

[0022] In the formula, F(u, v) represents the preliminary frequency spectrum image, f(x, y) represents the spatio-temporal image, represents the forward transformation kernel, the size of the spatio-temporal image is M×N, u = 0, 1, …, M - 1, v = 0, 1, …, N - 1;

[0023] Move the low-frequency part in the preliminary frequency spectrum image to the center of the preliminary frequency spectrum image, and move the high-frequency part to both sides of the preliminary frequency spectrum image to obtain the drawn frequency spectrum image.

[0024] More preferably, the calculation of the flow velocity of each velocity measurement line based on the frequency spectrum image corresponding to each velocity measurement line specifically includes:

[0025] Perform frequency spectrum analysis on the frequency spectrum image, and calculate the amplitude spectrum. The calculation formula is: Wherein, R(u', v') represents the real part, and I(u', v') represents the imaginary part;

[0026] Preprocess the amplitude spectrum, and set to 0 all the amplitude values that pass through the spectrum center and have horizontal or vertical directions in the amplitude spectrum;

[0027] Calculate the corresponding energy at a given angle in the spectral image, specifically including: taking an ellipse with a major axis of a and a minor axis of b as the integration region, searching in the range of 0° - 180° with a step of Δθ = 0.1°, and calculating the corresponding energy based on the given angle θ through the energy calculation formula. The energy calculation formula is:

[0028]

[0029] Wherein, g(u', v') is the frequency amplitude at the position (u', v') in the spectral image;

[0030] Draw an angle energy distribution diagram based on the given angle in the spectral image and the calculated corresponding energy;

[0031] Take the angles corresponding to the peaks other than the DC energy angle peaks at 90° and 180° in the angle energy distribution diagram as the main direction angle values of the texture of the spectral image;

[0032] Calculate the main direction angle value α corresponding to each velocity measurement line, α = the main direction angle value of the texture of the spectral image

[0033] Calculate the flow velocity corresponding to each velocity measurement line based on the main direction angle value of the spatio-temporal image corresponding to each velocity measurement line.

[0034] More preferably, the calculating the flow velocity corresponding to each velocity measurement line based on the main direction angle value of the spatio-temporal image corresponding to each velocity measurement line specifically includes:

[0035] Use the flow velocity calculation formula to calculate the surface flow velocities of multiple velocity measurement lines respectively. The flow velocity calculation formula is:

[0036] Wherein, Δs is the scaling factor, fps is the frame rate of the video, D is the moving distance of the tracer along the velocity measurement line within time T, that is, the tracer moves d pixels in k frames in the spatio-temporal image;

[0037] Use the flow velocity conversion formula to convert the surface flow velocity of each velocity measurement line into the vertical average flow velocity respectively. The flow velocity conversion formula is: Wherein, η s is the surface flow velocity coefficient.

[0038] More preferably, calculating the flow rate of the U-shaped open channel according to the dimension information of the U-shaped open channel and the flow velocity of each velocity measurement line specifically includes:

[0039] In the cross-section of the U-shaped open channel, taking the extension line at the channel entrance of the U-shaped open channel as the abscissa and the vertical direction corresponding to the deepest water level in the U-shaped open channel as the ordinate;

[0040] Calculate the vertical distance h between the channel entrance of the U-shaped open channel and the water surface, h = -(h 渠深 -h 水深 ), where in the formula, h 水深 = H - D, H is the installation height of the ultrasonic sensor, and D is the distance from the ultrasonic sensor to the water surface;

[0041] Input the vertical distance between the channel entrance of the U-shaped open channel and the water surface into the quadratic parabola function fitted to the channel to obtain the coordinates of the contact points A and B between the water surface and the U-shaped open channel. The coordinates of point A are (x A , h), and the coordinates of point B are (x B , h);

[0042] Divide the water flow cross-section of the U-shaped open channel into n parts by multiple velocity measurement lines, and calculate the area of each part after division by the curve integral method;

[0043] Calculate the flow rate Q of the U-shaped open channel by the velocity-area method 总 , and the calculation formula is:

[0044]

[0045] where: θ represents the bank velocity coefficient, generally taking 0.7 - 0.9, n - 1 represents the number of velocity measurement lines, and A1, A2, A3,..., A n-1 , A n are the areas of each part of the water flow cross-section of the U-shaped open channel after division respectively.

[0046] More preferably, the calculating the area of each part after division by the curve integral method specifically includes:

[0047]

[0048] where a and c are the parameters for fitting the channel, and e ∈ (2, n - 1).

[0049] According to the second aspect of the present application, a U-shaped open channel flow measurement system based on the spatio-temporal image method is provided, including a module for implementing the U-shaped open channel flow measurement method based on the spatio-temporal image method as described in any one of the above.

[0050] According to the third aspect of the present application, an electronic device is provided, including:

[0051] A memory;

[0052] A processor; and

[0053] A computer program;

[0054] wherein, the computer program is stored in the memory and is configured to be executed by the processor to implement the U-shaped open-channel flow measurement method based on the spatio-temporal image method as described in any one of the above.

[0055] According to the fourth aspect of the present application, a computer-readable storage medium is provided, on which a computer program is stored; the computer program is executed by a processor to implement the U-shaped open-channel flow measurement method based on the spatio-temporal image method as described in any one of the above.

[0056] In the present application, the preset of the velocity measurement line is carried out by obtaining the dimension information of the U-shaped open channel, and then the coordinate conversion of the starting point and the ending point of the velocity measurement line is carried out. Furthermore, the non-contact flow measurement of the U-shaped open channel is carried out by using the spatio-temporal image velocity measurement method (STIV). During the whole flow measurement process, no additional equipment is added into the channel, which can ensure normal operation under large flow conditions and output the flow result in real time and accurately; it avoids the risks of the equipment being easily impacted, worn or corroded by water flow in traditional contact measurement, and realizes safe and efficient open-channel flow monitoring.

[0057] STIV constructs a spatio-temporal image (Space-Time Image, STI) by tracking the brightness change of the video image on the water surface of the U-shaped open channel along the preset velocity measurement line, estimates the main orientation angle of texture (Main Orientation of Texture, MOT) in the STI, and thus calculates the one-dimensional velocity on each velocity measurement line. The flow measurement process is simple, the equipment cost is low, the flow measurement effect is good, and it is less affected by environmental factors. It can be popularized and applied in a wider range, especially suitable for use in large-scale or long-term unmanned remote areas, solving the way that requires staff to work near the flow measurement area for a long time in traditional flow measurement technology. The staff does not need to be on-site, and the water level, flow velocity, and flow information needed can be obtained at any time through wireless communication. Moreover, the flow velocity information is directly extracted from the image sequence, independent of the trajectory of particles, which can provide higher spatial resolution and is suitable for applications with finer spatial resolution; directly processes the pixels in the image sequence, independent of the visibility of a single tracer, more adaptable to complex environmental conditions, and can be used for water bodies or rivers with obstacles such as trees and waterweeds. When the lighting conditions are not good or the water surface tracers are not obvious, STIV is more robust; since STIV does not use the matching algorithm in LSPIV, when STIV obtains the same data information, STIV is about 10 times faster than LSPIV.

[0058] In addition, the U-shaped open channel flow measurement method provided by this application transmits data in real time, which can overcome problems faced by open channel flow monitoring in the current market, such as long measurement duration, inability to monitor large flows, and low automation level, and plays a positive role in the construction of water conservancy informatization.

[0059] Other features and advantages of this application will be described in the subsequent specification, and part of them will become obvious from the specification or be understood by implementing this application. The objectives and other advantages of this application can be achieved and obtained through the content pointed out in the written specification and the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] The accompanying drawings described herein are used to provide a further understanding of this application, and constitute a part of this application. The illustrative embodiments of this application and their descriptions are used to explain this application and do not constitute an improper limitation of this application. In the drawings:

[0061] Figure 1 is a schematic flow chart of a U-shaped open channel flow measurement method based on the spatio-temporal image method provided by this application;

[0062] Figure 2 is the spatio-temporal image provided by this application;

[0063] Figure 3 is Figure 1 a schematic flow chart for calculating the flow velocity of each velocity measurement line in

[0064] Figure 4 is Figure 1 a schematic flow chart for calculating the flow rate of the U-shaped open channel in

[0065] Figure 5 is a schematic principle diagram for calculating the flow rate of the U-shaped open channel provided by this application;

[0066] Figure 6 is a schematic functional structure diagram of a U-shaped open channel flow measurement system based on the spatio-temporal image method provided by this application;

[0067] Figure 7 is Figure 6 a schematic functional structure diagram of the coordinate conversion module in

[0068] Figure 8 is Figure 6 a schematic functional structure diagram of the image conversion module in

[0069] Figure 9 is Figure 6 a schematic functional structure diagram of the flow velocity calculation module in

[0070] Figure 10 is Figure 6 a schematic functional structure diagram of the flow rate calculation module in

[0071] In the figure:

[0072] 10 is an acquisition module, 20 is a velocity measurement line setting module, 30 is a coordinate conversion module, 40 is a collection module, 50 is a spatio-temporal image generation module, 60 is an image conversion module, 70 is a flow velocity calculation module, and 80 is a flow rate calculation module;

[0073] 301 is a calibration plate acquisition unit, 302 is a calibration image acquisition unit, 303 is a calibration unit, 304 is a world coordinate acquisition unit, and 305 is a coordinate conversion unit;

[0074] 601 is a preliminary spectral image conversion unit, and 602 is a spectral image drawing unit;

[0075] 701 is an amplitude spectrum calculation unit, 702 is a preprocessing unit, 703 is an energy calculation unit, 704 is an angular energy distribution diagram drawing unit, 705 is a spectral image texture main direction angle value calculation unit, 706 is a spatio-temporal image main direction angle value calculation unit, and 707 is a flow velocity calculation unit; 7071 is a surface flow velocity calculation unit, and 7072 is a vertical average flow velocity calculation unit;

[0076] 801 is a horizontal and vertical coordinate determination unit, 802 is a distance calculation unit, 803 is a contact point coordinate calculation unit, 804 is a division unit, 805 is an area calculation unit, and 806 is a flow rate calculation unit. Specific implementation mode

[0077] In order to make the technical solutions and advantages in the embodiments of the present application clearer and more understandable, the following further details the exemplary embodiments of the present application with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than an exhaustive list of all embodiments. It should be noted that, without conflict, the embodiments in the present application and the features in the embodiments can be combined with each other.

[0078] As Figure 1 shown, in response to the above problems, the embodiments of the present application provide a U-shaped open channel flow measurement method based on the spatio-temporal image method, including:

[0079] Obtain the dimension information of the U-shaped open channel, preset multiple velocity measurement lines based on the dimension information of the U-shaped open channel, and use one of the velocity measurement lines as the reference line;

[0080] Use a calibration plate for calibration, and convert the world coordinates of the starting point and the ending point of each velocity measurement line into pixel coordinates;

[0081] Collect the captured images of the U-shaped open channel, and generate the spatio-temporal image corresponding to each velocity measurement line based on the pixel coordinates of the starting point and the ending point of each velocity measurement line;

[0082] Convert the generated spatio-temporal image into a corresponding spectral image, and calculate the flow velocity of each velocity measurement line based on the spectral image corresponding to each velocity measurement line;

[0083] Calculate the flow rate of the U-shaped open channel according to the dimension information of the U-shaped open channel and the flow velocity of each velocity measurement line.

[0084] In this application, the preset of the velocity measurement lines is carried out through the obtained dimension information of the U-shaped open channel, and then the coordinate conversion of the starting point and the ending point of the velocity measurement lines is carried out. Furthermore, the non-contact flow measurement of the U-shaped open channel is carried out by using the spatio-temporal image velocity measurement method (STIV). During the whole flow measurement process, no equipment is added into the channel, which can ensure normal operation under the condition of large flow rate and output the flow rate result in real time and accurately; it avoids the risks of the equipment being easily impacted, worn or corroded by water flow in traditional contact measurement, and realizes the safe and efficient monitoring of the open channel flow rate.

[0085] STIV constructs a spatio-temporal image (STI) by tracking the brightness change of the video image on the water surface of the U-shaped open channel along the preset velocity measurement line, estimates the main orientation angle of texture (MOT) in the STI, and thus calculates the one-dimensional velocity of each velocity measurement line. The flow measurement process is simple, the equipment cost is low, the flow measurement effect is good, and it is less affected by environmental factors. It can be popularized and applied in a wider range, especially suitable for the use in large-scale or long-term unmanned remote areas, solving the way that requires staff to be on duty near the flow measurement area for a long time in traditional flow measurement technology. The staff does not need to be on site, and the required water level, flow velocity and flow rate information can be obtained at any time through wireless communication. Moreover, the flow velocity information is directly extracted from the image sequence, does not depend on the trajectory of particles, can provide higher spatial resolution, and is suitable for applications with finer spatial resolution; directly processes the pixels in the image sequence, does not depend on the visibility of a single tracer, is more adaptable to complex environmental conditions, and can be used for water bodies or rivers with obstacles such as trees and aquatic plants. When the lighting condition is not good or the water surface tracer is not obvious, STIV is more robust; since STIV does not use the matching algorithm in LSPIV, when STIV obtains the same data information, STIV is about 10 times faster than LSPIV.

[0086] In addition, the U-shaped open channel flow measurement method provided by this application transmits data in real time, can overcome the problems faced by the open channel flow rate monitoring in the current market, such as long measurement duration, inability to monitor large flow rates, and low automation degree, and plays a positive role in the construction of water conservancy informatization.

[0087] Specifically, the dimension information of the U-shaped open channel includes the channel width; a plurality of velocity measurement lines are preset based on the dimension information of the U-shaped open channel, and one of the velocity measurement lines is used as a reference line, which specifically includes:

[0088] Determine whether high-precision speed measurement is required. If not, set the conventional speed measurement lines according to the following steps:

[0089] Determine whether the channel width is ≤ 3m. If so, preset 3 speed measurement lines, and the 3 speed measurement lines are set as follows: Set 1 speed measurement line at the center of the U-shaped open channel and use it as the reference line, and set 1 speed measurement line at the center between the reference line and the two channel walls of the U-shaped open channel respectively;

[0090] Otherwise, determine whether the channel width is (3m, 10m]. If so, preset 5 speed measurement lines, and the 5 speed measurement lines are set as follows: Set 1 speed measurement line at the center of the U-shaped open channel and use it as the reference line, and set 1 speed measurement line at each one-third position between the reference line and the two channel walls of the U-shaped open channel;

[0091] Otherwise, determine whether the channel width is > 10m. If so, preset more than 7 speed measurement lines. Set 1 speed measurement line at the center of the U-shaped open channel and use it as the reference line, and set 1 speed measurement line at each one-fourth position between the reference line and the two channel walls of the U-shaped open channel;

[0092] If high-precision speed measurement is required, new speed measurement lines are added on the basis of the conventional speed measurement lines, and the new speed measurement lines are set at the positions close to the channel walls on both sides of the U-shaped open channel.

[0093] In this application, different numbers of speed measurement lines are set according to different channel widths, which can meet the usage requirements of different environments, with higher flow measurement accuracy and better flow measurement effect. When high-precision speed measurement is required, more speed measurement lines need to be set, and the addition of new speed measurement lines effectively improves the measurement accuracy.

[0094] More specifically, in the embodiment of this application, a small U-shaped open channel with a channel width ≤ 3m is taken as an example to set three speed measurement lines for illustration, which is convenient for more clearly understanding the content of this application.

[0095] Further, calibration is performed using a calibration plate, and the world coordinates of the starting point and the ending point of each speed measurement line are converted into pixel coordinates, which specifically includes:

[0096] Obtain the corner point information and size information of the calibration plate, and select any corner point of the calibration plate as the origin of the world coordinate system; thus, the world coordinates of each corner point in the calibration plate can be obtained; specifically, the calibration plate is a checkerboard calibration plate;

[0097] Collect calibration images for calibration, and calculate the internal parameter matrix and external parameter matrix of the camera according to the corner point information and size information of the calibration plate;

[0098] Align the starting point of the reference line with the origin of the world coordinate system, and obtain the world coordinates of the starting point and the ending point of each speed measurement line according to the positional relationship between the reference line and other speed measurement lines;

[0099] Based on the internal parameter matrix and external parameter matrix of the camera, use the coordinate transformation formula to convert the world coordinates of the starting point and the ending point of each speed measurement line into pixel coordinates.

[0100] Specifically, collect calibration images, perform calibration, and calculate the internal parameter matrix and external parameter matrix of the camera according to the corner point information and size information of the calibration board. Specifically: input the world coordinates of each corner point on the calibration board, the size information of each corner point, and the calibration image of the collected calibration board into the calibrateCamera function in the OpenCV library to calculate the internal parameter matrix and external parameter matrix of the camera. Using the spatio-temporal image analysis technology of the open-source computer vision processing tool OpenCV, the data processing efficiency and system response speed are greatly improved

[0101] In this application, by inputting the world coordinates of each corner point on the calibration board, the size information of each corner point, and the calibration image of the collected calibration board into the calibrateCamera function in the OpenCV library and performing calculations, the internal parameter matrix and external parameter matrix of the camera can be obtained.

[0102] More specifically, the coordinate transformation formula specifically includes:

[0103] The rigid body transformation formula for converting the world coordinate system to the camera coordinate system:

[0104]

[0105] In the formula, R is a 3×3 orthogonal rotation matrix, T is a 3×1 translation matrix, and R and T are the external parameter matrix of the camera; specifically, both R and T are the external parameter matrix of the camera, and both are determined by the position of the spherical surveillance network camera used for calibrating the image relative to the origin of the world coordinate system. When the position of the spherical surveillance network camera remains fixed, the external parameter matrix remains unchanged.

[0106] The perspective projection formula for converting the camera coordinate system to the image coordinate system:

[0107]

[0108] In the formula, f is the camera focal length;

[0109] The affine transformation formula for converting the image coordinate system to the pixel coordinate system:

[0110]

[0111] In the formula, 1 / d x 、1 / dy respectively represent the number of pixels included in 1 mm in the x-axis direction and y-axis direction of the image coordinate system, and (x0, y0) is the pixel position of the center point coordinate (principal image point) of the image.

[0112] In practical applications, since the movement of water usually satisfies the continuity equation within a short period of time, and the influence of wind is ignored, flow characteristics such as debris, ripples, and undulations on the water surface change along with the water flow movement. Therefore, it can be considered that its movement speed is similar to the flow velocity on the river surface, and the changes in these flow characteristics will cause changes in the gray value on the river surface.

[0113] The water surface is continuously photographed by a 4G spherical network monitoring camera installed at a fixed position beside the channel. By inputting the starting point coordinates and ending point coordinates of the preset speed measurement line, the positions of three preset speed measurement lines are located in the pixel coordinate system. The pixel values of each speed measurement line are extracted from consecutive frame images, and these pixel values are arranged in chronological order to synthesize the spatio-temporal image (STI) corresponding to each speed measurement line. The change in gray scale on each speed measurement line makes strip-shaped textures appear in the spatio-temporal image (STI).

[0114] Specifically, the horizontal axis of the spatio-temporal image represents the pixel length of the speed measurement line, and the vertical axis represents the duration of consecutive frames.

[0115] In this application, a two-dimensional discrete Fourier transform is performed on the two-dimensional spatio-temporal image obtained for each preset speed measurement line to convert the image from the spatio-temporal domain to the frequency domain. Further, the conversion of the generated spatio-temporal image into the corresponding frequency spectrum image specifically includes:

[0116] The spatio-temporal image is converted into a preliminary frequency spectrum image through an image conversion formula, and the image conversion formula is:

[0117]

[0118] In the formula, F(u, v) represents the preliminary frequency spectrum image, f(x, y) represents the spatio-temporal image, represents the forward transformation kernel, the size of the spatio-temporal image is M×N, u = 0, 1, …, M - 1, v = 0, 1, …, N - 1;

[0119] The low-frequency part in the preliminary frequency spectrum image is moved to the center of the preliminary frequency spectrum image, and the high-frequency part is moved to both sides of the preliminary frequency spectrum image through the numpy.fft.fftshift function in the Numpy library to obtain the drawn frequency spectrum image.

[0120] As Figure 3 shown, further, the calculation of the flow velocity of each speed measurement line based on the frequency spectrum image corresponding to each speed measurement line specifically includes:

[0121] Perform spectral analysis on the spectral image and calculate the amplitude spectrum. The calculation formula is as follows: In the formula, R(u', v') represents the real part, and I(u', v') represents the imaginary part;

[0122] Preprocess the amplitude spectrum and set to 0 all the amplitude values that pass through the center of the spectrum and have a horizontal or vertical direction;

[0123] Calculate the corresponding energy at a given angle in the spectral image, specifically including: taking an ellipse with a major axis of a pixels, where a = N' / 8 and a minor axis of b pixels, where b = 2, as the integration region, where N' represents the height value of the spectral image. Search in the range of 0° - 180° with a step of Δθ = 0.1°. Based on the given angle θ, calculate the corresponding energy through the energy calculation formula. The energy calculation formula is as follows:

[0124]

[0125] In the formula, g(u', v') is the frequency amplitude at the position (u', v') in the spectral image;

[0126] Based on the given angle and the calculated corresponding energy in the spectral image, draw an angle-energy distribution diagram;

[0127] Take the angles corresponding to the peaks other than the DC energy angle peaks at 90° and 180° in the angle-energy distribution diagram as the main direction angle values of the texture of the spectral image;

[0128] Calculate the main direction angle value α corresponding to each velocity measurement line, where α = the main direction angle value of the texture of the spectral image

[0129] Based on the main direction angle value corresponding to each velocity measurement line, calculate the flow velocity corresponding to each velocity measurement line.

[0130] In this application, in spectral analysis, the real part and the imaginary part reflect the amplitude and phase information of different frequency components. The amplitude spectrum represents the amplitude magnitudes of different frequency components, and the brightness of the gray level reflects the magnitude of |F(u, v)|. In practical applications, the complex modulus is selected as needed to represent the amplitude spectrum. According to the self-registration property of the Fourier transform, for texture images, the spectral energy is not evenly distributed in the spectral image but concentrated on specific spectral lines, and the main direction angle value of the texture of the spectral image is orthogonal to the spectral center line. Therefore

[0131] Furthermore, the calculation of the flow velocity corresponding to each velocity measurement line based on the main direction angle value corresponding to each velocity measurement line specifically includes:

[0132] The surface velocities of multiple velocity measurement lines are calculated respectively using the flow velocity calculation formula, and the flow velocity calculation formula is:

[0133] Where Δs is the scaling factor, fps is the frame rate of the video, D is the moving distance of the tracer (ripples and ripples on the water surface) along the velocity measurement line within time T, that is, the tracer moves d pixels within k frames in the spatio-temporal image;

[0134] The surface velocities of each velocity measurement line are respectively converted into vertical average velocities using the flow velocity conversion formula, and the flow velocity conversion formula is: Where η s is the surface velocity coefficient.

[0135] Specifically, according to the ISO 748-2007 standard, an exponential distribution is selected as the flow velocity model. For natural rivers (with sandy, pebble or boulder riverbeds), the average value of its surface velocity coefficient is 0.8; for artificial concrete channels, the average value of its surface velocity coefficient is 0.9.

[0136] In this application, the surface velocities of multiple velocity measurement lines are calculated respectively using the flow velocity calculation formula, and then the surface velocities are respectively converted into vertical average velocities using the flow velocity conversion formula. The subsequent flow rate is calculated through the vertical average velocity corresponding to each velocity measurement line, and the calculation result is more accurate. It solves the problem of unstable flow rate measurement results caused by the method of using the average velocity of multiple velocity measurement lines as the cross-sectional average velocity in the existing design and calculating the flow rate based on this.

[0137] As Figure 4 , Figure 5 shown, further, calculating the flow rate of the U-shaped open channel according to the dimension information of the U-shaped open channel and the flow velocity of each velocity measurement line specifically includes:

[0138] In the cross-section of the U-shaped open channel, the extension line at the channel mouth of the U-shaped open channel is used as the abscissa, and the vertical direction corresponding to the deepest water level in the U-shaped open channel is used as the ordinate;

[0139] Calculate the vertical distance h between the channel mouth of the U-shaped open channel and the water surface, h = -(h 渠深 -h 水深 ), where h 水深 = H - D, H is the installation height of the ultrasonic sensor, and D is the distance from the ultrasonic sensor to the water surface; specifically, the ultrasonic sensor is installed vertically above the center position of the U-shaped open channel;

[0140] Input the vertical distance between the channel mouth of the U-shaped open channel and the water surface into the quadratic parabola function fitted to the channel to obtain the coordinates of the contact points A and B between the water surface and the U-shaped open channel. The coordinates of point A are (x A , h), and the coordinates of point B are (xB , h);

[0141] The water flow cross-section of the U-shaped open channel is divided into n parts by multiple velocity measurement lines, and the area of each part after division is calculated respectively by the curve integral method;

[0142] The flow rate Q of the U-shaped open channel is calculated by the velocity-area method 总 , and the calculation formula is:

[0143]

[0144] In the formula: θ represents the bank velocity coefficient, generally taking 0.7 - 0.9, n - 1 represents the number of velocity measurement lines, A1, A2, A3,..., A n-1 , A n are respectively the areas of each part of the water flow cross-section of the U-shaped open channel after division.

[0145] In this application, by setting a rectangular coordinate system in the water flow cross-section of the U-shaped open channel, the edge curve equation of the U-shaped open channel is fitted, and then the curve integral method is used to calculate the area of the U-shaped open channel, avoiding the problem of inaccurate calculation caused by vertically dividing the water flow cross-section of the U-shaped open channel into approximate triangles and trapezoids along the velocity measurement lines for area calculation in the prior art.

[0146] Furthermore, the step of calculating the area of each part after division by the curve integral method specifically includes:

[0147]

[0148] In the formula, a and c are the parameters for channel fitting, and e ∈ (2, n - 1).

[0149] It should be understood that although the steps in the flowchart are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise clearly stated in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the figure may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same moment, but can be executed at different moments. The execution order of these sub-steps or stages is not necessarily sequential either, but can be executed alternately or in turn with at least a part of other steps or sub-steps or stages of other steps.

[0150] This application also provides a U-shaped open channel flow measurement system based on the spatio-temporal image method, including a module for implementing the U-shaped open channel flow measurement method based on the spatio-temporal image method as described in any one of the above.

[0151] As Figure 6As shown, specifically, the U-shaped open channel flow measurement system includes:

[0152] An acquisition module 10, configured to acquire the dimension information of the U-shaped open channel;

[0153] A velocity measurement line setting module 20, configured to preset multiple velocity measurement lines based on the dimension information of the U-shaped open channel, and use one of the velocity measurement lines as a reference line;

[0154] A coordinate conversion module 30, configured to perform calibration using a calibration board and convert the world coordinates of the starting point and the ending point of each velocity measurement line into pixel coordinates;

[0155] An acquisition module 40, configured to acquire the captured image of the U-shaped open channel;

[0156] A spatio-temporal image generation module 50, configured to generate a spatio-temporal image corresponding to each velocity measurement line based on the pixel coordinates of the starting point and the ending point of each velocity measurement line;

[0157] An image conversion module 60, configured to convert the generated spatio-temporal image into a corresponding frequency spectrum image;

[0158] A flow velocity calculation module 70, configured to calculate the flow velocity of each velocity measurement line based on the frequency spectrum image corresponding to each velocity measurement line;

[0159] A flow rate calculation module 80, configured to calculate the flow rate of the U-shaped open channel according to the dimension information of the U-shaped open channel and the flow velocity of each velocity measurement line.

[0160] As Figure 7 shown, specifically, the coordinate conversion module 30 includes:

[0161] A calibration board acquisition unit 301, configured to acquire the corner point information and dimension information of the calibration board, and select any corner point of the calibration board as the origin of the world coordinate system;

[0162] A calibration image acquisition unit 302, configured to acquire a calibration image;

[0163] A calibration unit 303, configured to perform calibration and calculate the internal parameter matrix and external parameter matrix of the camera according to the corner point information and dimension information of the calibration board;

[0164] A world coordinate acquisition unit 304, configured to align the starting point of the reference line with the origin of the world coordinate system, and obtain the world coordinates of the starting point and the ending point of each velocity measurement line according to the positional relationship between the reference line and other velocity measurement lines;

[0165] A coordinate conversion unit 305, configured to convert the world coordinates of the starting point and the ending point of each velocity measurement line into pixel coordinates based on the internal parameter matrix and external parameter matrix of the camera by using a coordinate conversion formula.

[0166] AsFigure 8 As shown, specifically, the image conversion module 60 includes:

[0167] A preliminary spectrum image conversion unit 601 for converting a spatio-temporal image into a preliminary spectrum image through an image conversion formula, and the image conversion formula is:

[0168]

[0169] In the formula, F(u, v) represents the preliminary spectrum image, f(x, y) represents the spatio-temporal image, represents the forward transform kernel, the size of the spatio-temporal image is M×N, u = 0, 1, …, M - 1, v = 0, 1, …, N - 1;

[0170] A spectrum image drawing unit 602 for moving the low-frequency part in the preliminary spectrum image to the center of the preliminary spectrum image and moving the high-frequency part to both sides of the preliminary spectrum image to obtain a drawn spectrum image.

[0171] As Figure 9 shown, specifically, the flow velocity calculation module 70 includes:

[0172] An amplitude spectrum calculation unit 701 for performing spectrum analysis on the spectrum image and calculating the amplitude spectrum, and the calculation formula is: In the formula, R(u', v') represents the real part, and I(u', v') represents the imaginary part;

[0173] A preprocessing unit 702 for preprocessing the amplitude spectrum and setting all amplitude values passing through the spectrum center and having a horizontal or vertical direction to 0;

[0174] An energy calculation unit 703 for calculating the corresponding energy at a given angle in the spectrum image, specifically including: taking an ellipse with a major axis of a pixels, a = N' / 8, and a minor axis of b pixels, b = 2 as the integration region, where N' represents the height value of the spectrum image, searching in the range of 0° - 180° with a step of Δθ = 0.1°, and calculating the corresponding energy based on the given angle θ through the energy calculation formula, and the energy calculation formula is:

[0175]

[0176] In the formula, g(u', v') is the frequency amplitude at the position (u', v') in the spectrum image;

[0177] An angle energy distribution diagram drawing unit 704 for drawing an angle energy distribution diagram based on the given angle and the calculated corresponding energy in the spectrum image;

[0178] The spectral image texture main direction angle value calculation unit 705 is configured to use the angle corresponding to the peak value other than the DC energy angle peak values of 90° and 180° in the angle energy distribution diagram as the spectral image texture main direction angle value;

[0179] The spatio-temporal image main direction angle value calculation unit 706 is configured to calculate the spatio-temporal image main direction angle value α corresponding to each velocity measurement line, where α = the spectral image texture main direction angle value

[0180] The flow velocity calculation unit 707 is configured to calculate the flow velocity corresponding to each velocity measurement line based on the spatio-temporal image main direction angle value corresponding to each velocity measurement line.

[0181] More specifically, the flow velocity calculation unit 707 includes:

[0182] The surface flow velocity calculation unit 7071 is configured to calculate the surface flow velocities of multiple velocity measurement lines respectively by using the flow velocity calculation formula. The flow velocity calculation formula is:

[0183] In the formula, Δs is the scaling factor, fps is the frame rate of the video, D is the moving distance of the tracer along the velocity measurement line within time T, that is, the tracer moves d pixels within k frames in the spatio-temporal image;

[0184] The vertical average flow velocity calculation unit 7072 is configured to convert the surface flow velocity of each velocity measurement line into the vertical average flow velocity respectively by using the flow velocity conversion formula. The flow velocity conversion formula is: In the formula, η s is the surface flow velocity coefficient.

[0185] As Figure 10 shown, specifically, the flow rate calculation module 80 includes:

[0186] The horizontal and vertical coordinate determination unit 801 is configured to use the extension line at the mouth of the U-shaped open channel as the abscissa and the vertical direction corresponding to the deepest water level in the U-shaped open channel as the ordinate in the cross-section of the U-shaped open channel;

[0187] The distance calculation unit 802 is configured to calculate the vertical distance h between the mouth of the U-shaped open channel and the water surface, where h = -(h 渠深 -h 水深 ), and in the formula, h 水深 = H - D, H is the installation height of the ultrasonic sensor, and D is the distance from the ultrasonic sensor to the water surface;

[0188] The contact point coordinate calculation unit 803 is configured to input the vertical distance between the mouth of the U-shaped open channel and the water surface into the quadratic parabola function of the channel fitting to obtain the coordinates of the contact points A and B between the water surface and the U-shaped open channel. The coordinates of point A are (x A , h), and the coordinates of point B are (xB , h);

[0189] A dividing unit 804 for dividing the water cross-section of the U-shaped open channel into n parts by means of multiple velocity measurement lines;

[0190] An area calculation unit 805 for calculating the area of each divided part by the curve integral method;

[0191]

[0192] In the formula, a and c are the parameters of the channel fitting, and e ∈ (2, n - 1);

[0193] A flow rate calculation unit 806 for calculating the flow rate Q of the U-shaped open channel by the velocity-area method 总 , and the calculation formula is:

[0194]

[0195] In the formula: θ represents the bank velocity coefficient, generally taking 0.7 - 0.9, n - 1 represents the number of velocity measurement lines, A1, A2, A3,..., A n-1 , A n are respectively the areas of each part of the water cross-section of the U-shaped open channel after division.

[0196] This application also provides an electronic device, including:

[0197] A memory;

[0198] A processor; and

[0199] A computer program;

[0200] Wherein, the computer program is stored in the memory and is configured to be executed by the processor to implement the U-shaped open channel flow measurement method based on the spatio-temporal image method as described in any one of the above.

[0201] This application also provides a computer-readable storage medium, on which a computer program is stored; the computer program is executed by a processor to implement the U-shaped open channel flow measurement method based on the spatio-temporal image method as described in any one of the above.

[0202] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code. The solutions in the embodiments of the present application can be implemented in various computer languages, such as C language, VHDL language, Verilog language, object-oriented programming language Java, and interpreted scripting language JavaScript, etc.

[0203] The present application is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram can be implemented by computer program instructions, and the combination of the flows and / or blocks in the flowchart and / or block diagram can also be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the functions specified in Figure 1 one or more of the flows Figure 1 or one or more of the blocks.

[0204] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device, and the instruction device implements the functions specified in Figure 1 one or more of the flows Figure 1 or one or more of the blocks.

[0205] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process. Thus, the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in Figure 1 one or more of the flows Figure 1 or one or more of the blocks.

[0206] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of the present application, the meaning of "a plurality" is at least two, such as two, three, etc., unless otherwise specifically defined.

[0207] Although the preferred embodiments of the present application have been described, those skilled in the art can make additional changes and modifications to these embodiments once they learn the basic creative concept. Therefore, the appended claims are intended to be construed as including the preferred embodiments and all changes and modifications that fall within the scope of the present application.

[0208] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application is also intended to include these modifications and variations.

Claims

1. A U-shaped open channel flow measurement method based on the spatio-temporal image method, characterized in that, including: Obtain the dimension information of the U-shaped open channel, preset multiple velocity measurement lines based on the dimension information of the U-shaped open channel, and use one of the velocity measurement lines as the reference line; Perform calibration using a calibration plate, and convert the world coordinates of the starting point and the ending point of each velocity measurement line into pixel coordinates; Collect the captured image of the U-shaped open channel, and generate a spatio-temporal image corresponding to each velocity measurement line based on the pixel coordinates of the starting point and the ending point of each velocity measurement line; Convert the generated spatio-temporal image into a corresponding frequency spectrum image, and calculate the flow velocity of each velocity measurement line based on the frequency spectrum image corresponding to each velocity measurement line; Calculate the flow rate of the U-shaped open channel according to the dimension information of the U-shaped open channel and the flow velocity of each velocity measurement line.

2. The U-shaped open channel flow measurement method based on the spatio-temporal image method according to claim 1, characterized in that The step of performing calibration using a calibration plate and converting the world coordinates of the starting point and the ending point of each velocity measurement line into pixel coordinates specifically includes: Obtain the corner point information and dimension information of the calibration plate, and select any corner point on the calibration plate as the origin of the world coordinate system; Collect a calibration image, perform calibration, and calculate the internal parameter matrix and external parameter matrix of the camera according to the corner point information and dimension information of the calibration plate; Align the starting point of the reference line with the origin of the world coordinate system, and obtain the world coordinates of the starting point and the ending point of each velocity measurement line according to the positional relationship between the reference line and other velocity measurement lines; based on the internal parameter matrix and external parameter matrix of the camera, use the coordinate transformation formula to convert the world coordinates of the starting point and the ending point of each velocity measurement line into pixel coordinates.

3. The U-shaped open channel flow measurement method based on the spatio-temporal image method according to claim 1, wherein The step of converting the generated spatio-temporal image into a corresponding frequency spectrum image specifically includes: Convert the spatio-temporal image into a preliminary frequency spectrum image through an image conversion formula, and the image conversion formula is: where \(F(u, v)\) represents the preliminary spectral image, and \(f(x, y)\) represents the spatio-temporal image, represents the forward transformation kernel, the size of the spatio-temporal image is \(M\times N\), \(u = 0, 1, \cdots, M - 1\), \(v = 0, 1, \cdots, N - 1\); Move the low-frequency part in the preliminary frequency spectrum image to the center of the preliminary frequency spectrum image, and move the high-frequency part to both sides of the preliminary frequency spectrum image to obtain the drawn frequency spectrum image F'(u', v').

4. The U-shaped open channel flow measurement method based on the spatio-temporal image method according to claim 3, characterized in that The step of calculating the flow velocity of each velocity measurement line based on the frequency spectrum image corresponding to each velocity measurement line specifically includes: Perform spectral analysis on the spectral image and calculate the amplitude spectrum. The calculation formula is as follows: In the formula, R(u', v') represents the real part, and I(u', v') represents the imaginary part; Preprocess the amplitude spectrum, and set the amplitude values passing through the center of the frequency spectrum and having a horizontal or vertical direction to 0; Calculate the corresponding energy at a given angle in the frequency spectrum image, specifically including: use an ellipse with a major axis of a and a minor axis of b as the integration region, search in the range of 0° - 180° with a step of Δθ = 0.1°, and calculate the corresponding energy based on the given angle θ through an energy calculation formula, and the energy calculation formula is: where g(u', v') is the frequency amplitude at the position (u', v') in the frequency spectrum image; Draw an angle energy distribution diagram based on the given angle and the calculated corresponding energy in the frequency spectrum image; Take the angles corresponding to the peaks other than the DC energy angle peaks at 90° and 180° in the angle energy distribution diagram as the main direction angle values of the texture of the frequency spectrum image; Calculate the main direction angle value α of the spatio-temporal image corresponding to each speed measurement line, where α = the main direction angle value of the texture of the spectral image Calculate the flow velocity corresponding to each velocity measurement line based on the main direction angle value of the spatio-temporal image corresponding to each velocity measurement line.

5. The U-shaped open channel flow measurement method based on the spatio-temporal image method according to claim 4, characterized in that, The step of calculating the flow velocity corresponding to each velocity measurement line based on the main direction angle value of the spatio-temporal image corresponding to each velocity measurement line specifically includes: The surface flow velocities of multiple velocity measurement lines are calculated respectively using the flow velocity calculation formula, and the flow velocity calculation formula is: where Δs is the scaling factor, fps is the frame rate of the video, D is the moving distance of the tracer along this velocity measurement line within time T, that is, the tracer moves d pixels in k frames in the spatio-temporal image; The surface velocity of each velocity measurement line is converted into the vertical average velocity by using the flow velocity conversion formula, and the flow velocity conversion formula is as follows: In the formula, η s is the surface velocity coefficient.

6. The U-shaped open channel flow measurement method based on the spatio-temporal image method according to claim 5, characterized in that, Calculating the flow rate of the U-shaped open channel according to the dimension information of the U-shaped open channel and the flow velocity of each velocity measurement line, specifically including: In the cross-section of the U-shaped open channel, taking the extension line at the channel mouth of the U-shaped open channel as the abscissa and the vertical direction corresponding to the deepest water level in the U-shaped open channel as the ordinate; Calculate the vertical distance h between the U-shaped open channel inlet and the water surface, where h = -(h 渠深 -h 水深 ), and in the formula, h 水深 = H - D, where H is the installation height of the ultrasonic sensor and D is the distance from the ultrasonic sensor to the water surface; The vertical distance between the U-shaped open channel inlet and the water surface is input into the quadratic parabola function fitted to the channel to obtain the coordinates of the contact points A and B between the water surface and the U-shaped open channel. The coordinates of point A are (x A , h), and the coordinates of point B are (x B , h); Dividing the water flow cross-section of the U-shaped open channel into n parts by multiple velocity measurement lines, and respectively calculating the area of each part after division by the curve integral method; Calculate the flow rate Q of a U-shaped open channel by the velocity-area method 总 , and the calculation formula is as follows: In the formula: θ represents the bank velocity coefficient, generally taking 0.7 - 0.9, n - 1 represents the number of velocity measurement lines, A1, A2, A3, …, A n-1 , A n are respectively the areas of each part of the water flow cross-section of the U-shaped open channel after division.

7. The U-shaped open channel flow measurement method based on the spatio-temporal image method according to claim 6, characterized in that, The step of respectively calculating the area of each part after division by the curve integral method specifically includes: In the formula, a and c are the parameters for fitting the channel, and e ∈ (2, n - 1).

8. A U-shaped open channel flow measurement system based on the spatio-temporal image method, characterized in that, It includes a module for implementing the U-shaped open channel flow measurement method based on the spatio-temporal image method according to any one of claims 1 to 7.

9. An electronic device, characterized in that, It includes: A memory; A processor; And A computer program; Wherein, the computer program is stored in the memory and is configured to be executed by the processor to implement the U-shaped open channel flow measurement method based on the spatio-temporal image method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, A computer program is stored thereon; the computer program is executed by a processor to implement the U-shaped open channel flow measurement method based on the spatio-temporal image method according to any one of claims 1 to 7.