Intelligent measurement method and system for river flow, computer equipment and medium
By combining pneumatically launched fluorescent spheres with lidar and video systems, the problems of low accuracy and difficulty in rapid and continuous monitoring of river flow have been solved, achieving high-precision three-dimensional motion state monitoring of river flow.
Patent Information
- Application Number
- CN202511864185.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-11
- Publication Date
- 2026-03-03
AI Technical Summary
Existing technologies for river flow measurement suffer from problems such as low measurement accuracy, difficulty in achieving rapid and continuous monitoring, and inability to fully reflect the three-dimensional motion state of river flow.
Fluorescent spheres are horizontally launched using a pneumatic catapult. Combined with a lidar module and a video system, the three-dimensional coordinates and two-dimensional displacement coordinates of the spheres are obtained, and spatial registration is performed to calculate the instantaneous velocity along the vertical.
It enables rapid and continuous monitoring of river flow, improves the accuracy and comprehensiveness of measurements, and reduces the error of single measurement methods.
Smart Images

Figure CN121595901A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of water flow measurement technology, and in particular to an intelligent method, system, computer equipment, and medium for measuring river flow. Background Technology
[0002] In water conservancy projects, water resource management, and flood and drought control, accurate measurement of river flow velocity is always a core and fundamental aspect. For a long time, staff have relied on traditional methods such as rotor current meters and buoy methods for measurement. However, these methods often face numerous limitations in practice. For example, rotor current meters require staff to place the instrument directly into the water, which is extremely difficult and poses safety hazards in deep, fast-flowing rivers. Furthermore, the instrument itself is easily affected by sediment and floating debris, leading to inaccurate measurement data. Each measurement also requires significant manpower and time, making it difficult to achieve rapid and continuous monitoring of river flow.
[0003] With the development of technology, some electronic device-based measurement technologies have been gradually applied to river flow measurement, such as ultrasonic current meters and radar current meters. However, these technologies have also revealed many problems in practical applications. Ultrasonic current meters are greatly affected by air bubbles and impurities in the water flow, and their measurement accuracy drops significantly in rivers with poor water quality. Although radar current meters can achieve non-contact measurement, they are easily interfered with by obstructions such as buildings and trees around the river, and the measurement error is relatively large in shallow water areas or rivers with slow flow. In addition, most of these existing technologies can only obtain flow velocity data at a certain point or cross-section of the river, making it difficult to comprehensively reflect the three-dimensional motion state of the river flow and meet the needs of complex water conservancy projects for precise flow measurement. Summary of the Invention
[0004] The purpose of this invention is to at least partially solve one of the technical problems existing in the prior art.
[0005] To achieve the above objectives, the present invention provides an intelligent method for measuring river flow, comprising the following steps: Fluorescent balls are horizontally launched using a pneumatic catapult, and the moment of contact with water is marked on the launched fluorescent balls to obtain a synchronous trigger signal; wherein, the launched fluorescent balls are regarded as moving balls; Based on the synchronous trigger signal, the moving ball is scanned in three dimensions by the lidar module to obtain point cloud data, and the trajectory of the moving ball is recorded by the video system based on the synchronous trigger signal to obtain video image data. The point cloud data is subjected to a reflection intensity threshold filtering to obtain the three-dimensional coordinates of the ball. The video image data is subjected to color space conversion, threshold filtering, and pixel distance conversion to obtain the two-dimensional displacement coordinates of the ball. Spatial registration is performed between the three-dimensional coordinates of the sphere and the two-dimensional displacement coordinates of the sphere to obtain the fused horizontal displacement. The average displacement is then calculated based on the fused horizontal displacement and the preset measurement time to obtain the instantaneous velocity of the vertical line.
[0006] Furthermore, the contact time of the ejected fluorescent spheres with water is marked to obtain a synchronous trigger signal, including: The light intensity of the fluorescent microspheres after ejection was monitored to obtain the light intensity change curve before contact with water, and the abrupt change point of the light intensity change curve before contact with water was detected to obtain the abrupt change time point of light intensity. The fluorescent spheres after ejection are marked with the water contact time based on the light intensity change point, and the water contact time after marking is converted into an electrical signal to obtain a synchronous trigger signal.
[0007] Furthermore, based on the aforementioned synchronous trigger signal, the moving ball is subjected to a three-dimensional scan using a lidar module to obtain point cloud data, including: The synchronous trigger signal is parsed to obtain a scan start command, and the parameters of the lidar module are configured based on the scan start command to obtain the configured lidar parameters. Based on the configured radar parameters, the moving ball is subjected to laser emission and reception to obtain the original reflection signal. The original reflection signal is then amplified and filtered to obtain a stable reflection signal. The reflection intensity of the moving ball is calculated based on the stable reflection signal to obtain the ball's reflection intensity. Then, based on the ball's reflection intensity and the preset spatial coordinates, point cloud data containing the ball's reflection intensity is obtained.
[0008] Furthermore, based on the aforementioned synchronization trigger signal, the trajectory of the moving ball is recorded by a video system to obtain video image data, including: The synchronization trigger signal is parsed to obtain the video recording start command, and the video system is parameter-set based on the video recording start command to obtain the configured video parameters; Based on the configured video parameters, continuous image acquisition is performed on the moving ball to obtain an original video frame sequence, and inter-frame difference processing is performed on the original video frame sequence to obtain the moving ball region frame. Color features of the moving ball are extracted based on the frame of the moving ball region to obtain the ball's color information. The ball's color information is then fused with the original video frame sequence to obtain video image data containing the ball's color.
[0009] Furthermore, the point cloud data is subjected to a reflection intensity threshold filtering to obtain the three-dimensional coordinates of the sphere. The video image data is then subjected to color space conversion, threshold filtering, and pixel distance calculation to obtain the two-dimensional displacement coordinates of the sphere, including: The reflection intensity values of the point cloud data are statistically analyzed to obtain a reflection intensity distribution histogram. The reflection intensity distribution histogram is then segmented by setting a reflection intensity threshold range to obtain high reflection intensity point clusters. Based on the high reflectivity point clusters, spatial clustering analysis is performed on the point cloud data to obtain a candidate sphere point set, and the center point of the candidate sphere point set is calculated to obtain the three-dimensional coordinates of the sphere. The video image data is converted to a color space to obtain an HSV color image, and the HSV color image is segmented by a color threshold to obtain a candidate region image of the ball. Edge detection processing is performed on the candidate region image of the ball to obtain the edge contour image of the ball, and contour points are extracted and coordinates are mapped on the edge contour image of the ball to obtain the two-dimensional contour coordinates of the ball. Corner point detection is performed on the preset ruler to obtain the ruler pixel coordinate points, and the unit pixel distance is calculated based on the ruler pixel coordinate points and the preset ruler to obtain the pixel ratio coefficient. Based on the pixel scaling factor, the two-dimensional contour coordinates are spatially mapped and transformed to obtain the two-dimensional displacement coordinates of the ball.
[0010] Furthermore, the three-dimensional coordinates of the sphere and the two-dimensional displacement coordinates of the sphere are spatially registered to obtain the fused horizontal displacement, including: The three-dimensional coordinates of the ball are projected onto a horizontal plane to obtain three-dimensional coordinate projection points. The three-dimensional coordinate projection points are then transformed to obtain planar coordinate points, wherein the planar coordinate points are the equivalent representation of the three-dimensional coordinates on a two-dimensional plane. Based on the planar coordinate points, the two-dimensional displacement coordinates of the ball are aligned to obtain the aligned two-dimensional coordinates, and the coordinates are checked to see if there is any coordinate error data. If it exists, the plane coordinate points are corrected and adjusted using the coordinate error data to obtain the fused horizontal displacement points, and the trajectory is connected based on the fused horizontal displacement points to obtain the fused horizontal displacement.
[0011] Furthermore, based on the fused horizontal displacement and the preset measurement time, the average displacement is calculated to obtain the instantaneous vertical flow velocity, including: The fused horizontal displacement is segmented to obtain multiple displacement segment data, and each displacement segment data is time-stamped to obtain a displacement time tag. The average value of the multiple displacement segments is calculated based on the displacement time tag to obtain the average displacement data. The instantaneous vertical velocity is obtained by calculating the ratio of the average displacement data to the preset measurement duration.
[0012] The present invention also provides an intelligent river flow measurement system, comprising: The projectile module is used to horizontally project fluorescent balls using a pneumatic catapult and mark the moment the projectiles touch the water to obtain a synchronous trigger signal; wherein, the projectile fluorescent balls are used as moving balls; The recording module is used to perform a three-dimensional scan of the moving ball using a lidar module based on the synchronous trigger signal to obtain point cloud data, and to record the trajectory of the moving ball using a video system based on the synchronous trigger signal to obtain video image data. The filtering module is used to perform reflection intensity threshold filtering on the point cloud data to obtain the three-dimensional coordinates of the ball, and to perform color space conversion, threshold filtering, and pixel distance conversion on the video image data to obtain the two-dimensional displacement coordinates of the ball. The fusion module is used to spatially register the three-dimensional coordinates of the ball and the two-dimensional displacement coordinates of the ball to obtain the fused horizontal displacement, and to calculate the average displacement based on the fused horizontal displacement and the preset measurement time to obtain the instantaneous velocity of the vertical line.
[0013] The present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of any of the methods described above.
[0014] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of any of the methods described above.
[0015] This invention provides an intelligent method for measuring river flow, comprising the following steps: horizontally launching a fluorescent ball using a pneumatic catapult, and marking the moment the fluorescent ball touches the water after launch to obtain a synchronous trigger signal; wherein the launched fluorescent ball is considered a moving ball; based on the synchronous trigger signal, performing a three-dimensional scan of the moving ball using a lidar module to obtain point cloud data, and recording the trajectory of the moving ball using a video system based on the synchronous trigger signal to obtain video image data; performing a reflection intensity threshold filter on the point cloud data to obtain the three-dimensional coordinates of the ball, and performing color space conversion and thresholding on the video image data. The two-dimensional displacement coordinates of the ball are obtained through filtering and pixel distance conversion. The three-dimensional coordinates and the two-dimensional displacement coordinates of the ball are then spatially registered to obtain a fused horizontal displacement. Based on the fused horizontal displacement and a preset measurement duration, the displacement mean is calculated to obtain the instantaneous vertical flow velocity. This solves the technical problem that traditional methods require significant manpower and time for each measurement, making rapid and continuous monitoring of river flow difficult. The two methods—filtering point cloud data using reflection intensity thresholds to obtain the ball's three-dimensional coordinates and obtaining the ball's two-dimensional displacement coordinates from video image data through color space conversion, threshold filtering, and pixel distance conversion—each has its own focus and complements the other. The three-dimensional coordinates comprehensively reflect the ball's positional changes in space, while the two-dimensional displacement coordinates accurately capture the ball's trajectory in a plane. Through multi-dimensional data acquisition and processing, the potential errors of a single measurement method are effectively reduced, significantly improving the accuracy and comprehensiveness of the ball's motion parameters. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 This is a schematic diagram of the steps of an intelligent river flow measurement method in one embodiment of the present invention; Figure 2 This is a schematic diagram of the steps of an intelligent river flow measurement system in one embodiment of the present invention; Figure 3 This is a schematic block diagram of the structure of a computer device according to an embodiment of the present invention.
[0018] The objectives, features, and advantages of this invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0019] The embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention. The step numbers in the following embodiments are set only for ease of explanation, and there is no limitation on the order between the steps. The execution order of each step in the embodiments can be adaptively adjusted according to the understanding of those skilled in the art.
[0020] The following describes in detail, with reference to the accompanying drawings, an intelligent method for measuring river flow according to an embodiment of the present invention. First, the intelligent method for measuring river flow according to an embodiment of the present invention will be described with reference to the accompanying drawings.
[0021] Figure 1 This invention provides an intelligent method for measuring river flow in one embodiment, comprising the following steps: Step S1: A fluorescent ball is horizontally launched using a pneumatic catapult, and the moment the launched fluorescent ball touches the water is marked to obtain a synchronous trigger signal; wherein, the launched fluorescent ball is regarded as a moving ball.
[0022] Specifically, in operation, the fluorescent ball is first placed at the launch port of the pneumatic catapult. By adjusting the internal air pressure parameters of the catapult, it is ensured that the ball can be stably launched horizontally. During the launch process, the launch force must be kept consistent to avoid affecting subsequent measurements due to initial velocity deviation. After the fluorescent ball is launched from the catapult, it will form a projectile trajectory in the air. At this time, a preset water contact detection device is needed to monitor the ball's motion in real time. For example, an infrared sensing module is installed at a suitable position above the river surface. When the fluorescent ball touches the water surface, the infrared sensing module will capture the contact signal between the ball and the water surface. This signal is processed and becomes a synchronous trigger signal. The section of the fluorescent ball from the launcher until it touches the water is the moving ball used for subsequent measurements.
[0023] Step S2: Based on the synchronization trigger signal, the moving ball is scanned in three dimensions by the lidar module to obtain point cloud data, and the trajectory of the moving ball is recorded by the video system based on the synchronization trigger signal to obtain video image data.
[0024] Specifically, once the synchronization trigger signal is generated, it is simultaneously transmitted to both the lidar module and the video system to ensure that both start working synchronously. The lidar module emits a laser beam into the space where the moving ball is located. After the laser beam encounters the surface of the ball, it is reflected back to the module. The module calculates parameters such as the time difference and angle between laser emission and reception to generate point cloud data containing the spatial position information of the ball. For example, when the ball moves above the center of the river channel, the module can capture the laser signals reflected from different parts of the ball, forming a dense point cloud to accurately reflect its three-dimensional posture. At the same time, the camera of the video system is aimed at the area of the moving ball's trajectory and continuously captures images at a preset frame rate. These image sequences together constitute video image data recording the ball's trajectory. The process of the ball moving from touching the water to moving with the water flow is clearly captured by the camera and stored as video image data.
[0025] Step S3: Perform reflection intensity threshold filtering on the point cloud data to obtain the three-dimensional coordinates of the ball; perform color space conversion, threshold filtering, and pixel distance calculation on the video image data to obtain the two-dimensional displacement coordinates of the ball.
[0026] Specifically, the first step is to perform reflection intensity threshold screening on the acquired point cloud data. An intensity range consistent with the reflection characteristics of the fluorescent sphere is set. For example, the intensity of laser reflection from the fluorescent sphere is typically higher than that of the river surface or air background. Background point clouds below this range are removed, leaving only the point cloud containing the sphere. The coordinates of the sphere's center in three-dimensional space are then calculated through point cloud fitting, yielding the sphere's three-dimensional coordinates. Next, the video image data is processed. Color space conversion is performed, such as converting RGB to HSV format, making it easier to distinguish the color difference between the fluorescent sphere and the background. A threshold is then set based on the color characteristics of the fluorescent sphere for further screening, retaining the sphere area and removing background interference. Finally, combining a preset conversion ratio between pixels and actual distance, the positional difference of the sphere at different times within the image plane is calculated, thus obtaining the sphere's two-dimensional displacement coordinates.
[0027] Step S4: Spatial registration of the three-dimensional coordinates of the ball and the two-dimensional displacement coordinates of the ball is performed to obtain the fused horizontal displacement. The average displacement is calculated based on the fused horizontal displacement and the preset measurement time to obtain the instantaneous velocity of the vertical line.
[0028] Specifically, when conducting spatial registration, a unified coordinate system is first established, for example, using the scanning origin of the lidar module as the origin of the three-dimensional coordinate system. Then, the two-dimensional displacement coordinates of the ball acquired by the video system are mapped to this three-dimensional coordinate system. By comparing the spatial positional deviation between the three-dimensional coordinates of the ball and the mapped two-dimensional coordinates at the same moment, the coordinate transformation parameters are adjusted until the positional error in the horizontal direction is controlled within a preset range. After completing spatial registration, the common displacement component in the horizontal direction is extracted, which is the fused horizontal displacement. Subsequently, a preset measurement duration is determined, for example, selecting a time period of 10 seconds after the ball touches the water and moves with the water flow. The total value of the fused horizontal displacement within this time period is calculated, and then the total displacement value is divided by the preset measurement duration of 10 seconds to obtain the average displacement per unit time. This average displacement is the vertical instantaneous velocity that can reflect the vertical flow velocity characteristics of the river channel.
[0029] In a specific embodiment, the fluorescent microspheres are marked with the moment of contact with water after being ejected to obtain a synchronous trigger signal, including: The light intensity of the fluorescent microspheres after ejection was monitored to obtain the light intensity change curve before contact with water, and the abrupt change point of the light intensity change curve before contact with water was detected to obtain the abrupt change time point of light intensity. The fluorescent spheres after ejection are marked with the water contact time based on the light intensity change point, and the water contact time after marking is converted into an electrical signal to obtain a synchronous trigger signal.
[0030] Specifically, when marking the moment of contact with the water after the fluorescent ball is launched to obtain a synchronous trigger signal, the light intensity of the fluorescent ball must first be monitored. Usually, a light intensity sensor is installed at a suitable position below the ball's trajectory and above the water surface of the river. The monitoring range of the sensor needs to accurately cover the entire process from the ball falling from the air to contacting the water. For example, when the ball is launched from the pneumatic catapult and moves towards the water surface in a parabolic trajectory, the light intensity sensor will capture the light intensity signal reflected or emitted by the ball in real time and record these continuous light intensity data in chronological order to form a light intensity change curve before contact with the water. This curve usually maintains a relatively stable fluctuation before the ball contacts the water because the ball is in the air at this time, and the light intensity propagation environment is relatively stable.
[0031] Next, we need to detect abrupt change points in the light intensity change curve before the ball touches the water. This step requires the use of data processing tools to analyze the data points in the curve. For example, we can set a light intensity change threshold. When the difference in light intensity between two consecutive time points exceeds the threshold, we can initially determine that there may be abrupt change points. Then, we can further verify this by combining the overall trend of the curve. For example, when the ball is about to touch the water, the water surface will reflect and refract the light intensity, causing the light intensity signal captured by the sensor to suddenly increase or decrease. The originally stable light intensity change curve will show an obvious inflection point here. The time point corresponding to this inflection point is the moment of abrupt change in light intensity.
[0032] Next, the contact time of the launched fluorescent spheres with the water is marked based on the moment of light intensity change. Since the light intensity change is usually caused by the sphere contacting the water surface, the moment of light intensity change is directly marked as the contact time of the sphere, that is, the marked contact time. Finally, the marked contact time needs to be converted into an electrical signal. Generally, a signal converter is used to convert the time signal corresponding to the marked time into an electrical signal that the circuit can recognize. For example, the time is converted into a high-level pulse signal. This pulse signal is the synchronization trigger signal that can synchronously trigger the lidar module and the video system to work, ensuring that the two devices can start data acquisition at the same moment the sphere contacts the water.
[0033] In a specific embodiment, based on the synchronous trigger signal, a lidar module performs a three-dimensional scan of the moving ball to obtain point cloud data, including: The synchronous trigger signal is parsed to obtain a scan start command, and the parameters of the lidar module are configured based on the scan start command to obtain the configured lidar parameters. Based on the configured radar parameters, the moving ball is subjected to laser emission and reception to obtain the original reflection signal. The original reflection signal is then amplified and filtered to obtain a stable reflection signal. The reflection intensity of the moving ball is calculated based on the stable reflection signal to obtain the ball's reflection intensity. Then, based on the ball's reflection intensity and the preset spatial coordinates, point cloud data containing the ball's reflection intensity is obtained.
[0034] Specifically, when acquiring point cloud data using a lidar module based on a synchronous trigger signal, the first step is to analyze the synchronous trigger signal. This is typically done using the lidar module's built-in signal processing unit, which converts the previously obtained synchronous trigger signal (e.g., a high-level pulse signal) into a digital command that the module can recognize. This converted command is the scan start command. During this process, it's crucial to ensure the accuracy of the signal analysis to avoid delays or malfunctions in the lidar module's startup due to incorrect command recognition. After obtaining the scan start command, the lidar module's parameters are configured based on this command. The configuration mainly includes the laser emission frequency, scanning angle range, and data sampling interval. For example, based on the expected speed of the moving ball, the laser emission frequency is set to 100Hz to ensure continuous capture of the ball's position changes. Simultaneously, the scanning angle range is adjusted to cover the entire spatial area from the ball's initial contact with the water to its subsequent movement, avoiding blind spots. After completing these parameter settings, the configured lidar parameters are obtained, meeting the current measurement requirements.
[0035] Next, based on the configured radar parameters, the laser transmission and reception of the moving ball are performed. The laser radar module continuously emits a laser beam in the direction of the moving ball according to the set transmission frequency. When the laser beam hits the surface of the ball, it is reflected, forming a raw reflection signal. These signals are captured in real time by the module's receiving unit. However, the raw reflection signal is often mixed with interference signals such as air scattering and water surface reflection, resulting in unstable signal strength and even clutter. Therefore, the raw reflection signal needs to be amplified and filtered. Generally, the weak raw reflection signal is first enhanced by a signal amplifier to ensure that subsequent processing can accurately identify signal characteristics. Then, a low-pass filter is used to filter out high-frequency interference signals, such as clutter signals with frequencies higher than 500Hz. After such processing, a stable reflection signal with a significantly improved signal-to-noise ratio and stable waveform can be obtained.
[0036] Finally, the reflection intensity of the moving ball is calculated based on the stable reflection signal. According to the amplitude and phase characteristics of the stable reflection signal, combined with the inherent parameters of the lidar module (such as emitted laser power and received sensitivity), the reflectivity of the ball's surface to the laser, i.e., the ball's reflection intensity, is calculated using a preset intensity calculation model (such as a calculation equation based on signal attenuation). Simultaneously, using data such as the time difference between laser emission and reception and the emission angle measured by the lidar module, and combining this with the principle of triangulation, the position coordinates of the moving ball in three-dimensional space are calculated. The calculated ball reflection intensity is then associated with the corresponding spatial coordinates, with each coordinate point accompanied by corresponding reflection intensity information. This forms point cloud data containing the ball's reflection intensity. This point cloud data is stored in a specific format (such as PLY format) to provide a foundation for subsequent point cloud data processing.
[0037] In a specific embodiment, based on the synchronization trigger signal, the trajectory of the moving ball is recorded by a video system to obtain video image data, including: The synchronization trigger signal is parsed to obtain the video recording start command, and the video system is parameter-set based on the video recording start command to obtain the configured video parameters; Based on the configured video parameters, continuous image acquisition is performed on the moving ball to obtain an original video frame sequence, and inter-frame difference processing is performed on the original video frame sequence to obtain the moving ball region frame. Color features of the moving ball are extracted based on the frame of the moving ball region to obtain the ball's color information. The ball's color information is then fused with the original video frame sequence to obtain video image data containing the ball's color.
[0038] Specifically, when acquiring video image data through a video system based on a synchronization trigger signal, the synchronization trigger signal must first be analyzed. The control unit of the video system receives the previously generated synchronization trigger signal (such as a high-level pulse signal) and converts it into an executable operation command through the built-in signal decoding module. This converted command is the video recording start command. During this process, it is necessary to ensure the timeliness of signal analysis to avoid missing the initial motion trajectory recording of the ball after it touches the water due to delays. After receiving the video recording start command, the video system parameters are set based on this command. The configuration mainly includes camera frame rate, resolution, exposure time, and white balance. For example, considering that the speed of the ball moving with the water flow may be relatively fast, the frame rate is set to 60fps to ensure that the positional changes of the ball can be clearly captured at every moment. At the same time, according to the ambient lighting conditions, the resolution is adjusted to 1920×1080, and the exposure time is set to 1 / 1000s to avoid image ghosting or overexposure / underexposure. After completing these parameter adjustments, the configured video parameters adapted to the current measurement scenario are obtained.
[0039] Next, based on the configured video parameters, continuous image acquisition is performed on the moving ball. The camera of the video system continuously captures the process of the moving ball from touching the water to its subsequent movement according to the set frame rate and resolution. Each capture generates a still image. The collection of these still images arranged in chronological order is the original video frame sequence. For example, within a 10-second measurement period, a frame rate of 60fps will generate 600 original images. However, the original video frame sequence contains not only the moving ball but also background elements such as the river surface and shoreline scenery. To highlight the ball area, inter-frame difference processing is required on the original video frame sequence. Specifically, two adjacent frames are selected, and the grayscale value difference of corresponding pixels is calculated. When the difference exceeds a preset threshold, the pixel is determined to belong to the moving area (i.e., the area where the ball may exist). Otherwise, it is determined to be the background area. In this way, background interference is eliminated, resulting in frames that retain only the moving ball area pixels. For example, when the ball is located on the left side of the screen in a certain frame, the inter-frame difference processing will only retain the pixel area corresponding to the left side of the ball, and the rest of the background area will be filtered out.
[0040] Finally, color features of the moving ball are extracted from the frames representing the moving ball's regions. Using image processing algorithms (such as the HSV color space analysis algorithm), color parameters of the ball, including hue, saturation, and brightness, are extracted from these frames. These parameters collectively constitute the ball's color information. For example, fluorescent balls typically appear bright yellow, with hue values concentrated between 50 and 60, and saturation and brightness also having specific ranges. The extracted ball color information is then fused with the original video frame sequence. Through image overlay technology, feature markers corresponding to the ball's color information (such as using a specific color to select the ball's region) are added to the corresponding positions in the original video frames. This ensures that each original image clearly displays the ball's position and color features. These fused video frames are arranged in their original chronological order, forming video image data containing the ball's color. This data not only completely records the ball's trajectory but also allows for rapid identification of the ball's position through color features, providing a clear data foundation for subsequently obtaining the ball's two-dimensional displacement coordinates.
[0041] In a specific embodiment, the point cloud data is subjected to a reflection intensity threshold filtering to obtain the three-dimensional coordinates of the sphere. The video image data is then subjected to color space conversion, threshold filtering, and pixel distance calculation to obtain the two-dimensional displacement coordinates of the sphere, including: The reflection intensity values of the point cloud data are statistically analyzed to obtain a reflection intensity distribution histogram. The reflection intensity distribution histogram is then segmented by setting a reflection intensity threshold range to obtain high reflection intensity point clusters. Based on the high reflectivity point clusters, spatial clustering analysis is performed on the point cloud data to obtain a candidate sphere point set, and the center point of the candidate sphere point set is calculated to obtain the three-dimensional coordinates of the sphere. The video image data is converted to a color space to obtain an HSV color image, and the HSV color image is segmented by a color threshold to obtain a candidate region image of the ball. Edge detection processing is performed on the candidate region image of the ball to obtain the edge contour image of the ball, and contour points are extracted and coordinates are mapped on the edge contour image of the ball to obtain the two-dimensional contour coordinates of the ball. Corner point detection is performed on the preset ruler to obtain the ruler pixel coordinate points, and the unit pixel distance is calculated based on the ruler pixel coordinate points and the preset ruler to obtain the pixel ratio coefficient. Based on the pixel scaling factor, the two-dimensional contour coordinates are spatially mapped and transformed to obtain the two-dimensional displacement coordinates of the ball.
[0042] Specifically, when processing point cloud data to obtain the 3D coordinates of the sphere, the first step is to statistically analyze the reflection intensity values of the acquired point cloud data. Using data analysis tools, the reflection intensity information of each point in the point cloud is traversed, and the number of points corresponding to different reflection intensity values is counted, thereby generating a histogram of reflection intensity distribution. For example, the horizontal axis of the histogram represents the reflection intensity value (0-255), and the vertical axis represents the number of points corresponding to that intensity value. The histogram clearly shows that most points are concentrated in low-intensity areas (corresponding to background elements such as water surfaces and air), while a few points are concentrated in high-intensity areas (corresponding to the fluorescent sphere). Next, the histogram is segmented by setting a threshold range for reflection intensity. Considering the reflection characteristics of the fluorescent sphere, the threshold range is set between 180 and 255, filtering out all points with reflection intensity values within this range. These concentrated high-intensity points are the high-reflection-intensity point clusters, effectively eliminating interference from background points.
[0043] Next, spatial clustering analysis was performed on the original point cloud data based on high reflectivity point clusters. The K-means clustering algorithm was used to divide the high reflectivity point clusters into different clustering units according to their spatial proximity. Since the fluorescent sphere point cloud is densely clustered in space, it forms an independent clustering unit, which is the candidate sphere point set. Other potentially existing scattered high-intensity points (such as water surface reflective points) will form smaller clustering units due to their dispersion, which can be excluded by setting a minimum number of cluster points. Then, the center point of the candidate sphere point set was calculated. The average of the x, y, and z coordinates of all points in the set was calculated. The resulting average coordinate value is the sphere's three-dimensional coordinate. For example, if the x-coordinate of each point in the set is between 5.2 and 5.4 meters, with an average of 5.3 meters; the y-coordinate is between 3.1 and 3.3 meters, with an average of 3.2 meters; and the z-coordinate is between 0.5 and 0.7 meters, with an average of 0.6 meters, then the sphere's three-dimensional coordinates are (5.3, 3.2, 0.6).
[0044] When processing video image data to obtain the two-dimensional displacement coordinates of the ball, the color space of each frame in the video image data is first converted. The original RGB color space is converted to the HSV color space using image processing libraries such as OpenCV, because the HSV space has higher color discrimination and can effectively reduce the impact of light changes on color recognition. The converted image is an HSV color image. Then, color thresholding is performed on the HSV color image. Based on the hue (H), saturation (S), and lightness (V) range of the fluorescent ball in the HSV space, for example, setting the H value to 50-60 (corresponding to yellow), the S value to 80-255, and the V value to 100-255, pixels that meet the range are retained, and the remaining pixels are set to black, resulting in a candidate region image of the ball that only shows the possible areas of the ball.
[0045] Edge detection is performed on the candidate region image of the ball using the Canny edge detection algorithm. With appropriate high and low thresholds (e.g., high threshold 200, low threshold 100), the algorithm identifies regions in the image where grayscale values change drastically (i.e., the edge of the ball) and outlines them as lines, forming the ball's edge contour image and clearly showing the ball's circular outline. Then, contour point extraction and coordinate mapping are performed on the ball's edge contour image. The contour extraction function obtains the image coordinates (u, v) of all pixels on the edge contour; these coordinates are the two-dimensional contour coordinates of the ball. Simultaneously, a preliminary mapping relationship is established between the image coordinates and the actual spatial horizontal coordinates to determine the position of the contour coordinates in the image plane.
[0046] Next, we need to determine the conversion relationship between pixels and actual distance. We perform corner detection on a pre-placed ruler (e.g., a 1-meter standard ruler) within the measurement area. Using the Harris corner detection algorithm, we identify the corner positions at both ends of the ruler and obtain their pixel coordinates in the image. For example, one corner might be (200, 300), and the other (600, 300). Then, we calculate the unit pixel distance based on the ruler's pixel coordinates and the pre-placed ruler. First, we calculate the pixel distance between the two corners in the image (600 - 200 = 400 pixels). Since the actual length of the pre-placed ruler is 1 meter, the unit pixel distance is 1 meter / 400 pixels = 0.0025 meters per pixel. This value is the pixel ratio coefficient.
[0047] Finally, a spatial mapping transformation is performed on the two-dimensional contour coordinates of the ball based on the pixel scaling factor. The pixel values in the contour coordinates are multiplied by the pixel scaling factor to convert them into actual horizontal distance coordinates. For example, if the image coordinates of a point on the contour are (300, 400), the pixel scaling factor in the x-direction is 0.0025 meters / pixel, and the same applies in the y-direction, then the converted actual horizontal coordinates are (300 × 0.0025, 400 × 0.0025) = (0.75, 1.0) meters. Then, by tracking the converted actual horizontal coordinates of the ball in different frames, the coordinate differences between adjacent frames are calculated. The set of these differences is the two-dimensional displacement coordinates of the ball. For example, if the coordinates in the first frame are (0.75, 1.0) meters and the coordinates in the second frame are (0.80, 1.0) meters, then the difference in two-dimensional displacement coordinates between the two frames is (0.05, 0.0) meters.
[0048] In a specific embodiment, the reflection intensity distribution histogram is segmented by setting a reflection intensity threshold range to obtain a cluster of high reflection intensity points, including: Peak detection is performed on the reflection intensity distribution histogram to obtain multiple intensity peak points, and the noise intensity range is determined by analyzing the distribution density of the multiple intensity peak points; Based on the noise intensity range, a reflection intensity threshold range is set, and the reflection intensity distribution histogram is segmented using the reflection intensity threshold range to obtain a cluster of high reflection intensity points.
[0049] Specifically, when thresholding the reflection intensity distribution histogram to obtain high reflection intensity clusters by setting a reflection intensity threshold range, peak detection must first be performed on the reflection intensity distribution histogram. The horizontal axis of the reflection intensity distribution histogram represents the reflection intensity value (usually 0-255), and the vertical axis represents the number of points corresponding to the intensity value. During detection, a peak detection algorithm (such as a peak recognition algorithm based on a sliding window) is used to traverse the entire histogram. When the number of points corresponding to a certain intensity value is higher than the number of points of its left and right adjacent intensity values, and exceeds the preset minimum peak height (for example, set to 5% of the total number of points), that intensity value is determined to be an intensity peak point. For example, in a histogram, the number of points corresponding to an intensity value of 50 is 200, and the number of points adjacent to it, 49 and 51, is 180 and 170 respectively. Since 200 exceeds 5% (250) of the total number of points (assuming a total of 5000 points), then 50 is not a peak point. On the other hand, the number of points corresponding to an intensity value of 200 is 300, and the number of points adjacent to it, 199 and 201, is 280 and 270 respectively. Since 300 exceeds 250, then 200 is an intensity peak point. Multiple intensity peak points can be obtained in this way.
[0050] Next, the distribution density of multiple intensity peak points is analyzed. The distribution density mainly depends on the spacing between these peak points on the horizontal axis (reflection intensity value) and the concentration of the corresponding number of points. Generally, background noise (such as water surface reflection and point clouds generated by air scattering) has a low reflection intensity, and the corresponding peak points will be concentrated in the low intensity region (such as 0-100), and the spacing between these peak points is small and the number of points is relatively dispersed. On the other hand, the reflectance intensity of fluorescent spheres is high, and the corresponding peak points will appear in the high intensity region (such as 150-255), and the number of peak points in this region is small but the number of points is concentrated. For example, the low intensity region has three peak points with intensity values of 30, 50, and 70, with an interval of 20, and each peak point corresponds to 150-200 points; the high intensity region has only one peak point with an intensity value of 220, corresponding to 400 points. Therefore, it can be determined that the 30-70 range in the low intensity region is the noise intensity range, because the peak points in this region are dense and the number of points matches the noise characteristics.
[0051] Then, a reflection intensity threshold range is set based on the noise intensity range. Typically, the lower limit of the threshold range is set to 1.2-1.5 times the upper limit of the noise intensity range to ensure complete exclusion of noise points. If the noise intensity range is 30-70, a lower limit of 1.2 times would be 84. Combining this with the location of the peak point in the high-intensity region (e.g., 220), the threshold range is set to 84-255. This removes low-intensity noise points while including all high-intensity spherical point clouds. Finally, the reflection intensity distribution histogram is segmented using this threshold range, filtering out all point cloud data with reflection intensity values between 84 and 255. These point cloud sets, concentrated in the high-intensity region and free from noise interference, constitute the high-reflection-intensity point clusters.
[0052] In a specific embodiment, spatial clustering analysis is performed on the point cloud data based on the high reflectivity point clusters to obtain a candidate sphere point set, including: A neighborhood search is performed on the high reflectivity point cluster to obtain the neighborhood point set of each point, and the spatial distance of the neighborhood point set is statistically analyzed to obtain the neighborhood distance distribution; Based on the neighborhood distance distribution, a clustering distance threshold is set, and the high reflectivity point clusters are spatially clustered and segmented using the clustering distance threshold to obtain multiple independent point clusters. The number of points in each of the multiple independent point clusters is counted, and the point cluster with the most points is selected as the candidate ball point set.
[0053] Specifically, when obtaining candidate sphere sets based on high reflectivity point clusters, the first step is to perform a neighborhood search on the high reflectivity point clusters. This is typically done using the K-nearest neighbor algorithm or the radius neighborhood search method. Taking the radius neighborhood search as an example, a fixed search radius is set (e.g., 5 cm, which needs to be determined based on the actual size of the fluorescent spheres and the point cloud density). Each point in the high reflectivity point cluster is traversed, and all other points within a spherical radius of 5 cm centered on that point are found. These points together constitute the neighborhood set of that point. For example, if the 3D coordinates of point A in the point cluster are (5.3, 3.2, 0.6), eight points with coordinates (5.32, 3.21, 0.61), (5.29, 3.22, 0.59), etc., are found within a 5 cm radius. These eight points form the neighborhood set of point A. The neighborhood set of each point can be obtained in the same way. Next, spatial distance statistics are performed on each set of neighboring points. The Euclidean distance between each point in the set and the center point A is calculated. For example, the distances between the above 8 points and point A are 0.02 meters, 0.03 meters, 0.025 meters, etc. These distance values are sorted from smallest to largest to form the neighborhood distance distribution of the point. By analyzing the neighborhood distance distribution of all points, it can be found that the neighborhood distances of the small ball point cloud are mostly concentrated in a small range (such as 0.01-0.05 meters), while the neighborhood distances of sporadic noise points may be larger or the number of neighboring points may be extremely small.
[0054] Subsequently, a clustering distance threshold is set based on the neighborhood distance distribution. Typically, the median or average neighborhood distance of all points is used as a reference, and this is adjusted in conjunction with the point cloud density. For example, if the median neighborhood distance of all points is 0.03 meters, and considering the need to completely cluster adjacent points on the sphere's surface, the clustering distance threshold can be set to 0.04 meters to ensure that points less than 0.04 meters apart are grouped into the same class. Next, spatial clustering is performed on high-reflectivity point clusters using this clustering distance threshold. A density clustering algorithm (such as DBSCAN) is used to group points that meet the condition of "distance from the core point less than the threshold and the number of neighboring points meeting the standard" into the same independent point cluster. For example, if the core point B has 10 points in its neighborhood (exceeding the minimum point number threshold of 8), and these points are all less than 0.04 meters away from B, an independent point cluster centered on B is formed. Conversely, if a scattered point C has only 2 points in its neighborhood, and the distance exceeds 0.04 meters, it cannot form an independent point cluster or becomes an isolated point. Finally, the number of points in the multiple independent point clusters is counted. For example, if there are 3 independent point clusters with 200, 15 and 8 points respectively, the point cluster with the most points (200 points) has a density and spatial distribution that matches the point cloud characteristics of fluorescent microspheres (microsphere point clouds usually have concentrated points and form a complete spherical outline). Therefore, this point cluster with the most points is selected as the candidate microsphere point set.
[0055] In a specific embodiment, the three-dimensional coordinates of the sphere and the two-dimensional displacement coordinates of the sphere are spatially registered to obtain a fused horizontal displacement, including: The three-dimensional coordinates of the ball are projected onto a horizontal plane to obtain three-dimensional coordinate projection points. The three-dimensional coordinate projection points are then transformed to obtain planar coordinate points, wherein the planar coordinate points are the equivalent representation of the three-dimensional coordinates on a two-dimensional plane. Based on the planar coordinate points, the two-dimensional displacement coordinates of the ball are aligned to obtain the aligned two-dimensional coordinates, and the coordinates are checked to see if there is any coordinate error data. If it exists, the plane coordinate points are corrected and adjusted using the coordinate error data to obtain the fused horizontal displacement points, and the trajectory is connected based on the fused horizontal displacement points to obtain the fused horizontal displacement.
[0056] Specifically, when spatially registering the 3D coordinates and 2D displacement coordinates of a small ball to obtain the fused horizontal displacement, the 3D coordinates of the small ball must first be projected onto a horizontal plane. Typically, the plane containing the river surface is used as the projection reference plane. The z-axis (vertical direction) coordinate value in the 3D coordinates of the small ball is ignored, and only the x-axis and y-axis (horizontal direction) coordinate values are retained. This yields the projection point of each small ball's 3D coordinates onto the horizontal plane, which is the 3D coordinate projection point. For example, if the 3D coordinates of the small ball at a certain moment are (5.3, 3.2, 0.6), where the z-axis coordinate 0.6 represents the vertical height of the small ball from the reference plane, this value is directly discarded during projection, resulting in the 3D coordinate projection point (5.3, 3.2). Next, coordinate transformation is performed on the 3D coordinate projection points. Since the 3D coordinate system established by the LiDAR module differs from the 2D image coordinate system of the video system in terms of origin and coordinate axis direction, the x and y values of the 3D coordinate projection points need to be calculated and adjusted using a preset transformation matrix (determined by previous calibration experiments and including translation and rotation parameters) to make it consistent with the rules of the 2D coordinate system of the video system. The coordinate points obtained after transformation are planar coordinate points, which are equivalent to representing the 3D coordinates on a 2D plane. For example, after calculation by the transformation matrix, the 3D coordinate projection point (5.3, 3.2) may be transformed into the planar coordinate point (280, 350), which matches the pixel coordinate system in the video image.
[0057] Next, coordinate alignment is performed on the two-dimensional displacement coordinates of the ball based on the planar coordinate points. First, planar coordinate points and the ball's two-dimensional displacement coordinates at the same moment are selected (e.g., the coordinates at the 2nd second after the ball touches the water). Using the planar coordinate points as a reference, the position parameters of the ball's two-dimensional displacement coordinates are adjusted to minimize the horizontal positional deviation between the two in the same coordinate system. For example, if the planar coordinate point is (280, 350) and the ball's two-dimensional displacement coordinates at the same moment are (285, 352), the differences between the two in the x-axis and y-axis directions are calculated (x-axis difference 5, y-axis difference 2). These differences are then subtracted from the overall two-dimensional displacement coordinates of the ball to obtain the aligned two-dimensional coordinates (280, 350), achieving preliminary coordinate alignment. After alignment, it is necessary to check whether there is coordinate error data in the aligned two-dimensional coordinates. Usually, multiple planar coordinate points at different times are selected and compared with the corresponding aligned two-dimensional coordinates. The coordinate difference between the two at each time is calculated. If the difference at a certain time exceeds the preset error threshold (such as the difference between the x-axis or y-axis is greater than 3), it is determined that there is coordinate error data. If the difference at all times is within the threshold range, it means that the alignment effect is good and no further correction is needed.
[0058] If coordinate error data is detected, the planar coordinate points need to be corrected and adjusted using this data. For example, at the 5th second, the planar coordinate point is (320, 410), and after alignment, the 2D coordinates are (315, 408). The x-axis error is -5, and the y-axis error is -2. This set of coordinate error data reflects that the planar coordinate point is too large in the x-axis direction and too large in the y-axis direction. Based on this error data, subtract 5 from the x-axis value and 2 from the y-axis value of the planar coordinate point at the corresponding time, obtaining the corrected coordinate point (315, 408). This corrected coordinate point is the fused horizontal displacement point. Using the same method, the planar coordinate points corresponding to all times with errors are corrected to obtain a series of continuous fused horizontal displacement points. Finally, based on these fused horizontal displacement points, the trajectory is connected. The fused horizontal displacement points at different times are connected sequentially in time to form a continuous curve. This curve completely reflects the trajectory of the ball in the horizontal direction, which is the fused horizontal displacement. It integrates the spatial accuracy of three-dimensional coordinates and the trajectory continuity of two-dimensional displacement coordinates, providing a precise displacement data foundation for subsequent calculation of the instantaneous velocity of the vertical line.
[0059] In a specific embodiment, the average displacement is calculated based on the fused horizontal displacement and the preset measurement duration to obtain the instantaneous vertical flow velocity, including: The fused horizontal displacement is segmented to obtain multiple displacement segment data, and each displacement segment data is time-stamped to obtain a displacement time tag. The average value of the multiple displacement segments is calculated based on the displacement time tag to obtain the average displacement data. The instantaneous vertical velocity is obtained by calculating the ratio of the average displacement data to the preset measurement duration.
[0060] Specifically, when calculating the instantaneous vertical velocity based on the fused horizontal displacement and the preset measurement duration, the fused horizontal displacement must first be segmented. The fused horizontal displacement is essentially a continuous curve reflecting the horizontal trajectory of the ball, containing information about the ball's horizontal position at different times. Segmentation rules must be determined by considering the overall range of the preset measurement duration and the data sampling frequency. For example, if the preset measurement duration is 10 seconds and the joint sampling frequency of the lidar and video system is 10Hz (i.e., 10 data points are collected per second), then the entire fused horizontal displacement will contain 100 consecutive position data points. At this point, the measurement duration of 10 seconds can be divided into 10 displacement segments according to the time interval. Each segment corresponds to a time range of 1 second, and each segment contains 10 position data points. The resulting 10 sets of position data are multiple displacement segment data. Alternatively, dynamic segmentation can be performed according to the changes in the ball's motion state. For example, when the ball's motion speed fluctuates greatly in the initial stage of contact with water, the segment time interval can be set to 0.5 seconds, and then to 2 seconds after the motion stabilizes. This ensures that the displacement data in each segment can reflect a relatively stable motion state. However, in actual operation, uniform segmentation is more commonly used to simplify calculations and ensure data representativeness.
[0061] After completing the displacement segmentation, each segment's data must be time-stamped. The time stamp must correspond to the segmentation rules. If a uniform 1-second segmentation is used, the first segment corresponds to 0-1 seconds after the start of measurement, so the displacement time label for that segment is set to "0-1s". Simultaneously, the timestamps of the first and last data points within that segment (e.g., 0.1 seconds) are recorded to clearly define the time boundaries of the segment. If dynamic segmentation is used, for example, a segment corresponding to a time range of 2.5-4.5 seconds, the displacement time label is set to "2.5-4.5s", and the specific timestamp range is also marked. The core of time stamping is to accurately associate each displacement segment's data with its corresponding actual time interval, avoiding mismatches between time and displacement during subsequent calculations. For example, if a displacement segment contains 10 location points between the 3rd and 4th seconds, its displacement time label must clearly reflect this 1-second time span, providing a clear time basis for subsequent mean calculations.
[0062] Next, the mean value of multiple displacement segments is calculated based on the displacement time label. For each displacement segment, the horizontal displacement value of all position data points within the segment is extracted first. The horizontal displacement value is usually calculated based on a fixed reference point (such as the initial position of the ball when it touches the water). For example, the horizontal displacement values of 10 position points within a certain displacement segment (0-1s) relative to the initial position are 0.2m, 0.3m, 0.25m, 0.32m, 0.28m, 0.31m, 0.29m, 0.33m, 0.27m, and 0.3m, respectively. These 10 values are added together to obtain a total displacement of 2.95m. This is then divided by the number of data points in the segment, 10, to obtain an average displacement value of 0.295m. This average displacement value is the displacement mean data corresponding to the segment. It is important to note that if the time interval between displacement segments is not 1 second (such as a 2-second interval in dynamic segmentation), the total displacement within the segment must be calculated first, and then divided by the number of data points contained in the segment. The result is still the average displacement per unit data point, which will be converted later in conjunction with the time interval. For example, if the total displacement within a 2-second segment is 0.6m and contains 20 data points, the average displacement is 0.03m / point.
[0063] Finally, the instantaneous vertical velocity is obtained by calculating the ratio of the average displacement data to the preset measurement duration. Here, it's necessary to first determine the time length corresponding to the average displacement data. If uniform segmentation is used and the unit of each segment time interval is consistent with the preset measurement duration (e.g., the preset measurement duration is in seconds, and the segment time interval is also 1 second), then the time corresponding to the average displacement data for each segment is 1 second. In this case, simply divide the average displacement data by 1 second to obtain the instantaneous velocity within that segment. If the unit of the segment time interval is different from the preset measurement duration, or if dynamic segmentation is used, then the actual time length of each segment must first be determined based on the displacement time label before calculating the ratio. For example, if the preset measurement duration is 10 seconds, divided into 10 1-second segments, and the average displacement data of a certain segment is 0.295m, corresponding to a time length of 1 second, then the instantaneous flow velocity at that moment is 0.295m / 1s = 0.295m / s; if the displacement time label of a certain dynamic segment is "2.5-4.5s" (time length 2 seconds), the average displacement data is 0.03m / point, this segment contains 20 data points, and the total displacement is 0.6m. Dividing the total displacement of 0.6m by the time length of 2 seconds, we get the instantaneous flow velocity as 0.3m / s. The instantaneous flow velocities of all segments are integrated. If the fluctuations in the instantaneous flow velocities of each segment are small within the preset measurement time, the average value of all segment velocities can be taken as the final vertical instantaneous flow velocity. If the flow velocity fluctuates significantly within a certain period, the instantaneous flow velocity of a specific segment needs to be selected as a representative value, such as the average value of the segment flow velocity within 5-10 seconds after the ball's motion stabilizes. This yields a vertical instantaneous flow velocity that accurately reflects the vertical flow velocity characteristics of the river channel. For example, by calculating the flow velocities of 10 segments, the average vertical instantaneous flow velocity is found to be 0.3 m / s. This value can be used as the vertical instantaneous flow velocity result for that measurement section of the river channel. It should be noted that the vertical instantaneous flow velocity refers to the instantaneous velocity at a specific point on a vertical line in the water flow. Its direction is consistent with the water flow direction, usually horizontal or nearly horizontal, rather than vertical. When measuring the vertical instantaneous flow velocity, the current meter or sensor is measured along the direction of water flow, not vertically.
[0064] The above describes a method for intelligent measurement of river flow in an embodiment of the present invention. The following describes a system for intelligent measurement of river flow in an embodiment of the present invention. Please refer to [link / reference]. Figure 2 One embodiment of the intelligent river flow measurement system of the present invention includes: The projectile module 21 is used to horizontally project fluorescent balls via a pneumatic catapult and mark the contact time of the projected fluorescent balls with water to obtain a synchronous trigger signal; wherein, the projected fluorescent balls are used as moving balls; The recording module 22 is used to perform three-dimensional scanning of the moving ball using a lidar module based on the synchronous trigger signal to obtain point cloud data, and to record the trajectory of the moving ball using a video system based on the synchronous trigger signal to obtain video image data. The filtering module 23 is used to perform reflection intensity threshold filtering on the point cloud data to obtain the three-dimensional coordinates of the ball, and to perform color space conversion, threshold filtering, and pixel distance conversion on the video image data to obtain the two-dimensional displacement coordinates of the ball. The fusion module 24 is used to spatially register the three-dimensional coordinates of the ball and the two-dimensional displacement coordinates of the ball to obtain the fused horizontal displacement, and to calculate the average displacement based on the fused horizontal displacement and the preset measurement time to obtain the instantaneous velocity of the vertical line.
[0065] In this embodiment, the specific implementation of each module in the above system embodiment is described in the above method embodiment, and will not be repeated here.
[0066] Reference Figure 3 This invention also provides a computer device whose internal structure can be as follows: Figure 3 As shown, the computer device includes a processor, memory, display screen, input device, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database stores the data corresponding to this embodiment. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements the above-described method.
[0067] Those skilled in the art will understand that Figure 3 The structures shown are merely block diagrams of some structures related to the present invention and do not constitute a limitation on the computer devices on which the present invention is applied.
[0068] An embodiment of the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described method. It is understood that the computer-readable storage medium in this embodiment can be a volatile readable storage medium or a non-volatile readable storage medium.
[0069] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the present invention and embodiments can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual-rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM, etc.
[0070] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, apparatus, article, or method. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, apparatus, article, or method that includes that element.
[0071] The above description is only a preferred embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A method for intelligent measurement of river flow, characterized in that, Includes the following steps: Fluorescent balls are horizontally launched using a pneumatic catapult, and the moment of contact with water is marked on the launched fluorescent balls to obtain a synchronous trigger signal; wherein, the launched fluorescent balls are regarded as moving balls; Based on the synchronous trigger signal, the moving ball is scanned in three dimensions by the lidar module to obtain point cloud data, and the trajectory of the moving ball is recorded by the video system based on the synchronous trigger signal to obtain video image data. The point cloud data is subjected to a reflection intensity threshold filtering to obtain the three-dimensional coordinates of the ball. The video image data is subjected to color space conversion, threshold filtering, and pixel distance conversion to obtain the two-dimensional displacement coordinates of the ball. Spatial registration is performed between the three-dimensional coordinates of the sphere and the two-dimensional displacement coordinates of the sphere to obtain the fused horizontal displacement. The average displacement is then calculated based on the fused horizontal displacement and the preset measurement time to obtain the instantaneous velocity of the vertical line.
2. The intelligent river flow measurement method according to claim 1, characterized in that, The fluorescent spheres were marked at the moment of contact with water after ejection to obtain a synchronous trigger signal, including: The light intensity of the fluorescent microspheres after ejection was monitored to obtain the light intensity change curve before contact with water, and the abrupt change point of the light intensity change curve before contact with water was detected to obtain the abrupt change time point of light intensity. The fluorescent spheres after ejection are marked with the water contact time based on the light intensity change point, and the water contact time after marking is converted into an electrical signal to obtain a synchronous trigger signal.
3. The intelligent river flow measurement method according to claim 1, characterized in that, Based on the aforementioned synchronous trigger signal, the moving ball is scanned in three dimensions using a lidar module to obtain point cloud data, including: The synchronous trigger signal is parsed to obtain a scan start command, and the parameters of the lidar module are configured based on the scan start command to obtain the configured lidar parameters. Based on the configured radar parameters, the moving ball is subjected to laser emission and reception to obtain the original reflection signal. The original reflection signal is then amplified and filtered to obtain a stable reflection signal. The reflection intensity of the moving ball is calculated based on the stable reflection signal to obtain the ball's reflection intensity. Then, based on the ball's reflection intensity and the preset spatial coordinates, point cloud data containing the ball's reflection intensity is obtained.
4. The intelligent river flow measurement method according to claim 1, characterized in that, Based on the aforementioned synchronization trigger signal, the trajectory of the moving ball is recorded by a video system to obtain video image data, including: The synchronization trigger signal is parsed to obtain the video recording start command, and the video system is parameter-set based on the video recording start command to obtain the configured video parameters; Based on the configured video parameters, continuous image acquisition is performed on the moving ball to obtain an original video frame sequence, and inter-frame difference processing is performed on the original video frame sequence to obtain the moving ball region frame. Color features of the moving ball are extracted based on the frame of the moving ball region to obtain the ball's color information. The ball's color information is then fused with the original video frame sequence to obtain video image data containing the ball's color.
5. The intelligent river flow measurement method according to claim 1, characterized in that, The point cloud data is subjected to a reflection intensity threshold filtering to obtain the three-dimensional coordinates of the sphere. The video image data is subjected to color space conversion, threshold filtering, and pixel distance calculation to obtain the two-dimensional displacement coordinates of the sphere, including: The reflection intensity values of the point cloud data are statistically analyzed to obtain a reflection intensity distribution histogram. The reflection intensity distribution histogram is then segmented by setting a reflection intensity threshold range to obtain high reflection intensity point clusters. Based on the high reflectivity point clusters, spatial clustering analysis is performed on the point cloud data to obtain a candidate sphere point set, and the center point of the candidate sphere point set is calculated to obtain the three-dimensional coordinates of the sphere. The video image data is converted to a color space to obtain an HSV color image, and the HSV color image is segmented by a color threshold to obtain a candidate region image of the ball. Edge detection processing is performed on the candidate region image of the ball to obtain the edge contour image of the ball, and contour points are extracted and coordinates are mapped on the edge contour image of the ball to obtain the two-dimensional contour coordinates of the ball. Corner point detection is performed on the preset ruler to obtain the ruler pixel coordinate points, and the unit pixel distance is calculated based on the ruler pixel coordinate points and the preset ruler to obtain the pixel ratio coefficient. Based on the pixel scaling factor, the two-dimensional contour coordinates are spatially mapped and transformed to obtain the two-dimensional displacement coordinates of the ball.
6. The intelligent river flow measurement method according to claim 1, characterized in that, Spatial registration of the sphere's three-dimensional coordinates and two-dimensional displacement coordinates yields a fused horizontal displacement, including: The three-dimensional coordinates of the ball are projected onto a horizontal plane to obtain three-dimensional coordinate projection points. The three-dimensional coordinate projection points are then transformed to obtain planar coordinate points, wherein the planar coordinate points are the equivalent representation of the three-dimensional coordinates on a two-dimensional plane. Based on the planar coordinate points, the two-dimensional displacement coordinates of the ball are aligned to obtain the aligned two-dimensional coordinates, and the coordinates are checked to see if there is any coordinate error data. If it exists, the plane coordinate points are corrected and adjusted using the coordinate error data to obtain the fused horizontal displacement points, and the trajectory is connected based on the fused horizontal displacement points to obtain the fused horizontal displacement.
7. The intelligent river flow measurement method according to claim 1, characterized in that, The average displacement is calculated based on the fused horizontal displacement and the preset measurement time to obtain the instantaneous vertical flow velocity, including: The fused horizontal displacement is segmented to obtain multiple displacement segment data, and each displacement segment data is time-stamped to obtain a displacement time tag. The average value of the multiple displacement segments is calculated based on the displacement time tag to obtain the average displacement data. The instantaneous vertical velocity is obtained by calculating the ratio of the average displacement data to the preset measurement duration.
8. A smart river flow measurement system, characterized in that, The method for intelligent measurement of river flow according to any one of claims 1 to 7 includes: The projectile module is used to horizontally project fluorescent balls using a pneumatic catapult and mark the moment the projectiles touch the water to obtain a synchronous trigger signal; wherein, the projectile fluorescent balls are used as moving balls; The recording module is used to perform a three-dimensional scan of the moving ball using a lidar module based on the synchronous trigger signal to obtain point cloud data, and to record the trajectory of the moving ball using a video system based on the synchronous trigger signal to obtain video image data. The filtering module is used to perform reflection intensity threshold filtering on the point cloud data to obtain the three-dimensional coordinates of the ball, and to perform color space conversion, threshold filtering, and pixel distance conversion on the video image data to obtain the two-dimensional displacement coordinates of the ball. The fusion module is used to spatially register the three-dimensional coordinates of the ball and the two-dimensional displacement coordinates of the ball to obtain the fused horizontal displacement, and to calculate the average displacement based on the fused horizontal displacement and the preset measurement time to obtain the instantaneous velocity of the vertical line.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.