Flow velocity measurement method

By detecting the fluctuations of light spots on the water surface, and using the wavelength and periodic inversion of the flow rate of the light spots, the problem of poor measurement results in the prior art under extremely low or extremely high flow velocity conditions is solved, and simultaneous measurement of multi-point flow velocity on the water surface and high tolerance flow velocity measurement are achieved.

CN120142695APending Publication Date: 2025-06-13LUDONG UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510310780.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-17
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

The existing flow rate measurement technology is highly sensitive when facing impurities and bubbles in the fluid, and the measurement effect is limited under extremely low or extremely high flow rate conditions. It is impossible to measure the multi-point flow rate on the water surface at the same time. The equipment cost is high, which limits the expansion of its application range.

Method used

By detecting the fluctuations of light spots on the water surface, the wavelength and period of the light spots are used to invert the flow velocity value of each point, the tracking light spot technology is used to measure the wave flow velocity, and the flow velocity is inverted according to the shallow water wave velocity theory.

Benefits of technology

Simultaneous measurement of multi-point flow velocity on the water surface is achieved, with a high tolerance to impurities and bubbles in the water body, and does not cause natural flow velocity interference to the water surface, and the equipment cost is low.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120142695A_ABST
    Figure CN120142695A_ABST
Patent Text Reader

Abstract

The invention relates to a flow velocity measurement method, and belongs to the technical field of application of a photogrammetry technology in the fields of fluid dynamics and hydraulic engineering. The method comprises the following steps: firstly, calibrating the actual size of a single pixel; secondly, determining the direction and wavelength of the wave flow; then, measuring the period of the water wave by tracking the light spot, and calculating the wave velocity according to the period; and finally, the influence of the shallow water wave velocity is eliminated from the measured wave velocity, and the remaining part is the solved flow velocity. The flow velocity value of each point is inverted by detecting the fluctuation condition of the light spots on the water surface, the flow velocity of multiple points on the section can be captured at the same time, high tolerance to impurities and bubbles in the water body is achieved, and no interference is generated to the natural flow velocity of the water surface.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a flow velocity measurement method, and belongs to the technical field of application of photogrammetry technology in the fields of fluid dynamics and water conservancy engineering. Background Art

[0002] In the exploration of flow velocity measurement technology in the field of fluid dynamics and water conservancy engineering, the Doppler flowmeter method and the tracking particle method are the two main methods. They each have their own advantages, but they also face considerable limitations and challenges. The ultrasonic Doppler flowmeter method, as a non-contact measurement technology, has been widely used in a variety of fluid monitoring scenarios due to its high real-time and accuracy. However, this technology is highly sensitive to impurities and bubbles in the fluid, and the measurement effect is limited under extremely low or extremely high flow conditions. In particular, it is impossible to measure the flow velocity at multiple points on the water surface at the same time. These factors limit the further expansion of its application scope. In addition, the high equipment cost also hinders its wider promotion.

[0003] On the other hand, the tracking particle method provides a new perspective for fluid dynamics research because it can accurately measure three-dimensional flow velocity and deeply analyze complex flow fields. However, this method has strict standards for the selection of tracer particles, the image acquisition and processing process is relatively complicated, and the introduction of particles will interfere with the natural flow of the fluid. These are technical problems that need to be solved in practical applications. Summary of the invention

[0004] In response to the above problems, the present invention provides a flow velocity measurement method, which detects the fluctuation of light spots on the water surface to invert the flow velocity value of each point. This method can not only capture the flow velocity of multiple points on the cross section at the same time, but also has a high tolerance for impurities and bubbles in the water body, and does not interfere with the natural flow velocity of the water surface.

[0005] The present invention provides a flow velocity measurement method, which is special in that it comprises the following steps:

[0006] Step 1: Determine the actual size of a single pixel by the number of pixels of the calibration plate in each frame and the actual size of the calibration plate;

[0007] Step 2: Determine the wave flow direction, construct a new coordinate system based on the wave flow direction vector, and determine the wavelength according to the number of light spots projected in the wave flow direction and the actual size of a single pixel;

[0008] Step 3: Determine the wave velocity by tracking the time interval that occurs at the same location and the corresponding wavelength at the location, and invert the flow velocity based on this.

[0009] Preferably, the specific steps of step 1 are:

[0010] 1) Calibrate the single-pixel size, extract images from the calibration video, and outline the contour area of the calibration plate in the image by the threshold method;

[0011] 2) Use morphological erosion technology to separate the internal texture and the contour boundary, making the contour clearer;

[0012] 3) Search for and judge the spots in the image. Use the four-neighborhood search method for the entire image to determine all pixel patches. For spots with less than 50 pixel points, directly perform filtering. For spots with 50 or more pixel points, it is necessary to further judge whether the straight lines extending in the "up, down, left, and right" four directions touch the image boundary in at least two directions. If this condition is not met, the spot is regarded as a pixel spot inside the calibration plate and is filtered. After the above processing, determine the contour of the largest pixel patch, and this contour is the contour of the calibration plate. Accordingly, calculate the number of pixels inside the calibration plate. To improve the accuracy of calibration, repeat the above processing process for each extracted image, and finally determine the average number of pixels inside the calibration plate. Finally, combine the actual area of the calibration plate and the average number of pixels inside the calibration plate to calculate the actual size of a single pixel:

[0013]

[0014] In the formula: l is the single-pixel size, unit: mm / pix; m is the number of images extracted from the calibration video; A area is the area of the calibration plate, unit: mm 2 ; N i is the number of pixels in the calibration plate in the i-th image, unit: pix.

[0015] Preferably, the specific steps of the four-neighborhood search method are as follows: First, search for noise seed points. When defined as small black spots, the pixel point with a gray value of 0 encountered for the first time during row-by-row scanning is the noise seed point. Then, with this seed point as the center, search for pixel points with a gray value of 0 in the four-neighborhood, and continue the search with the newly found pixel point as the starting point until there are no pixel points with a gray value of 0 in the four-neighborhood of the new pixel point, thus completing the search for a pixel patch. Traverse the entire image row by row according to the above method. After completing the search for all pixel patches, sort them in ascending order according to the number of pixel points in the pixel patches.

[0016] Preferably, the specific steps of determining the wave flow direction in step 2 are as follows:

[0017] First, determine the center 10 of the light spot 9 (the single-pixel size determined in step 1 is used to convert the flow velocity measured in pixels determined in step 2 into the flow velocity measured in actual size), and then perform Z-score standardization on the coordinate vectors of all center points 10 of the light spots to obtain xi (i = 1, 2, …, m);

[0018] Establish the wave-current direction vector constraint function:

[0019]

[0020] where: f(u) is the wave-current direction vector constraint function, unit: pix; u is the wave-current direction vector, unit: pix; x i is the center of the reflected light spot after standardization, unit: pix; m is the total number of all light spot center points.

[0021] Based on formula (2), establish the Lagrangian function:

[0022]

[0023] where: is the Lagrangian function, unit: pix; is the Lagrange multiplier;

[0024] Find the gradient of formula (3):

[0025]

[0026] Let Then formula (4) is:

[0027] Cu = λu (5)

[0028] From formula (5), the vector that meets the requirements is the eigenvector corresponding to the largest eigenvalue of C

[0029]

[0030] where: is the projection coordinate of the wave-current direction, unit: pix

[0031] Preferably, the specific steps of constructing the new coordinate system based on the wave-current direction vector in step 2 are:

[0032] Determine the maximum range of coordinate variation in the projection direction of the flow velocity vector:

[0033]

[0034] where: is the maximum range of coordinate variation in the projection direction of the flow velocity vector, unit: pix;

[0035] The statistical step length of adjacent light reflection points along the flow velocity direction:

[0036]

[0037] Where: Δh is the statistical step of adjacent reflection points along the flow velocity direction, unit: pix; n is the number of segments for dividing the maximum change range of coordinates in the projection direction of the flow velocity vector;

[0038] Establish a new coordinate:

[0039]

[0040] Where: is the number of reflection spots within the interval ; η j is the number of pixels within the j-th spot; is the ordinate of the established new coordinate, unit: pix.

[0041] Determine n + 1 new coordinate points according to Equation (9) where: i = 0, 1, … n.

[0042] Preferably, the specific steps for determining the wavelength in Step 2 are:

[0043] Use a spline curve to fit the new coordinate points where: i = 0, 1, … n. to determine the peak-to-peak position during the wave-current process:

[0044]

[0045] Where: m i (i = 0, 1, 2, …, n) is the first derivative value at the point.

[0046] The extreme value point corresponding to the i-th segment of the spline curve:

[0047]

[0048] Where: is the extreme value point corresponding to the j-th segment of the spline curve;

[0049] Judge whether the extreme value point falls within the interval . If it falls within this interval, then further judge whether this point is a wave peak according to Equation (12). If it is a wave peak, record this point;

[0050]

[0051] According to Equations (11) and (12), the wave peak sequence For any light spot Perform the following processing to obtain the standardized light spot position point;

[0052]

[0053] Where: is the mean estimate of all light spot positions; is the variance estimate of all light spot positions. Next, the standardized light spots need to be projected in the water flow direction;

[0054]

[0055] Where: is the projection value in the wave - current direction.

[0056] Determine the wavelength value corresponding to the coordinate point:

[0057]

[0058] Preferably, the specific steps of step 3 are as follows:

[0059] When a light spot 9 appears at a certain position in the image and then reappears at the same position after a period of time, the distance traveled by the water wave represents a wavelength 7, and the time interval experienced by the light spot 9 is exactly the period 8 of that wavelength, that is, the time interval between two frames of images where the light spot 9 appears at the same position; in order to track the subsequent light spot 9, the search range of the light spot center 10 needs to be defined. This range is aimed at accurately locating the light spot 9 at the same position in subsequent frames. The search area 13 of the light spot center is generally set to k times the size of the light spot wavelength 7, and the k value is default set to 0.2. In each subsequent frame of the video, the light spot 9 detection operation needs to be performed. If one or more light spots 9 are detected within the search range in a certain frame of the video, the light spot centers 12 within these scopes will be weighted and averaged to determine the equivalent light spot center 11;

[0060]

[0061] Where: is the new light spot center coordinate vector determined by weighted average, unit: pix; n i is the number of light spot pixels within the i - th light spot within the light spot scope, unit: pix; is the light spot center coordinate vector corresponding to the i - th light spot within the light spot center scope, unit: pix;

[0062] According to the frame number difference of the detected light spot 9 between two frames of images, the corresponding period 8 of the light spot 9 is inversely calculated. Using the aforementioned method, the wave current velocity of all capture points in each frame of image is measured. The wave current velocity of each point consists of two components: one is the wave velocity, and the other is the flow velocity. Considering that the wave current environment of the water tank can be simplified into a shallow water wave model, therefore, the calculation of the flow velocity will follow the relevant theory of shallow water waves;

[0063]

[0064] In the formula: is the wavelength corresponding to the center of the light spot, unit: pix; f ps is the frame rate, unit: frame / s; △N is the frame number difference between two frames of images captured at the same position; g is the acceleration due to gravity, unit: m / s 2 ; h is the water depth value of the water tank, unit: m.

[0065] The present invention provides a flow velocity measurement method. This method first uses the tracking light spot technology to determine the wave current velocity, and then inversely calculates the flow velocity in the water tank based on the shallow water wave velocity theory. This technology is insensitive to impurities and bubbles in the fluid. As long as the frame rate of the camera is high enough, it can be measured even under extremely low or high flow velocity conditions, and can simultaneously measure the flow velocities of multiple points on the water surface. In terms of economic benefits, this method only requires a camera for recording the flow velocity video, without expensive test equipment or tracer particles, so it has good economic benefits. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] Figure 1 It is a detection process diagram of the camera detecting the wave surface of one wavelength;

[0067] Figure 2 It is a diagram of wavelength determination in the wave current process and capturing the light spot positions between video frames;

[0068] Figure 3 It is a flow chart of a flow velocity measurement method of the present invention;

[0069] Figure 4 It is a diagram of generating a mask area;

[0070] Figure 5 It is a diagram of detecting a calibration plate area;

[0071] Figure 6 It is a tracking light spot diagram;

[0072] Figure 7 It is a diagram of determining the wave current direction and wavelength;

[0073] Figure 8 It is a velocity cloud diagram;

[0074] Figure 9This is a comparison chart of the flow velocity obtained by the method of the present invention and the measurement results of the flow meter. Detailed implementation manners

[0075] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0076] Embodiment 1

[0077] This embodiment discloses a flow velocity measurement method, which mainly covers the following core aspects: First, calibrate the actual size of a single pixel; second, determine the direction and wavelength of the wave flow; finally, measure the wave velocity by tracking the light spot and inversely calculate the flow velocity based on this (see the attached Figure 3 ), and the specific implementation steps are as follows:

[0078] See the attached Figure 1 , the attached Figure 2 . Since a part of the light rays 3 emitted by the light source 1 is reflected by the wave surface 2 on the water tank 16 to the camera 4, that is, the camera fixedly monitors all points on the wave surface 2 (see (a) in the attached Figure 1 ). When the water wave moves forward by one wavelength 7, as shown in (b)-(f) in the attached Figure 1 , the camera detects the light spot 9 again at the same position. The time interval corresponding to the camera 4 detecting the light spot 9 at the same position is the period 8 (see Figure 1 ). Since the actual situation of the wave surface 2 is not a very regular sine wave or cosine wave, the light spots on its reflection surface 17 will not be coherent light spots, but will appear as strip-shaped with alternating light and dark in the direction of the water tank axis 15 (see a in Figure 2 ). In order to more accurately represent the light spots, each light spot is replaced by its centroid position, that is, the center of the light spot) (see b in Figure 2 ). The distance between the front and rear light spot centers 10 of these light spot centers 10 on the same reflection surface 17 in the direction of the wave propagation 5 is the wavelength 7 of the water wave at that place (see c in Figure 2 ). When the water wave passes through a cycle, due to the irregularity of the wave surface, the light spot detected at the same position next time may not necessarily coincide with the light spot center 10 of the previous time. It is very likely that each fractional light spot 9 is very close to the light spot center 10 of the previous time (the default value of this very close distance is 10 pixel distances). Therefore, when determining the position of the deterministic light spot center, the average position of this similar light spot center is taken as the new light spot center 10 (see d in Figure 2 ).

[0079] The present invention mainly includes three aspects: (1) determining the actual size of a single pixel; (2) detecting reflected light spots; (3) determining the wavelength and calculating the flow velocity (see Figure 3 ).

[0080] (1) The implementation of determining the actual size of a single pixel is as follows:

[0081] 1) Calibrate the size of a single pixel. Extract images from the calibration video and outline the contour area of the calibration plate in the image by the threshold method;

[0082] 2) Use morphological erosion technology to separate the internal texture and the contour boundary to make the contour clearer;

[0083] 3) Search for and judge the spots in the image. Use the four-neighborhood search method for the entire image to determine all pixel patches. For spots with less than 50 pixel points, directly filter them. For spots with 50 or more pixel points, it is necessary to further judge whether the straight lines extending in the "up, down, left, and right" four directions touch the image boundary in at least two directions. If this condition is not met, the spot is regarded as a pixel spot inside the calibration plate and filtered. After the above processing, determine the contour of the largest pixel patch, which is the contour of the calibration plate. Accordingly, calculate the number of pixels inside the calibration plate. To improve the accuracy of calibration, repeat the above processing process for each extracted image, and finally determine the average number of pixels inside the calibration plate. Finally, combine the actual area of the calibration plate and the average number of pixels inside the calibration plate to calculate the actual size of a single pixel:

[0084]

[0085] In the formula: l is the size of a single pixel, unit: mm / pix; m is the number of images extracted from the calibration video; A area is the area of the calibration plate, unit: mm 2 ; N i is the number of pixels in the calibration plate in the i-th image, unit: pix.

[0086] (2) The implementation method of detecting reflected light spots is as follows:

[0087] To reduce noise, first, Gaussian smoothing is performed on each frame of the original image extracted from the video to convert the original image into a grayscale image. In addition, to further reduce the impact caused by the difference in shooting brightness, histogram equalization technology is used to unify the image brightness. Then, the grayscale image is binarized, and the default threshold value for this binarization is 140. Next, the entire image is divided into seed point regions. Specifically, multiple regions are divided both horizontally and vertically in the image (default value is 400). In each seed point sub-region, seed points are randomly generated. However, due to the existence of the light spot region, multiple seed points may be generated on the same light spot. Therefore, it is necessary to merge these multiple seed points belonging to the same light spot and mark the corresponding reflected patch information.

[0088] (3) The implementation methods for determining the wavelength, period, and calculating the flow velocity are as follows:

[0089] Establish a wave-current direction vector constraint function:

[0090]

[0091] In the formula: u is the wave-current direction vector, unit: pix; x i is the center of the reflected light spot after standardization, unit: pix;

[0092] Based on formula (2), establish a Lagrangian function:

[0093]

[0094] In the formula: is the Lagrange multiplier;

[0095] Find the gradient of formula (3):

[0096]

[0097] Let Then formula (4) is:

[0098] Cu = λu (5)

[0099] From formula (5), the vector that meets the requirements is the eigenvector corresponding to the largest eigenvalue of C

[0100]

[0101] In the formula: is the projection coordinate of the wave-current direction, unit: pix

[0102] Determine the maximum change range of all coordinates in the projection direction of the flow velocity vector:

[0103]

[0104] In the formula: is the maximum coordinate change range in the projection direction of the flow velocity vector, unit: pix;

[0105] Statistical step of adjacent reflection points along the flow velocity direction:

[0106]

[0107] In the formula: n is the number of segmentation segments of the maximum coordinate change range in the projection direction of the flow velocity vector;

[0108] Establish a new coordinate:

[0109]

[0110] In the formula: is the number of reflection spots in the interval ; η j is the number of pixels in the j-th spot; is the ordinate of the established new coordinate, unit: pix.

[0111] Determine n + 1 new coordinate points according to formula (9) where: i = 0, 1, … n..

[0112] Use a spline curve to fit the new coordinate points where: i = 0, 1, … n. to determine the peak-to-peak position in the wave-flow process:

[0113]

[0114] In the formula: m i (i = 0, 1, 2, …, n) is the first derivative value at the point.

[0115] The extreme point corresponding to the i-th segment of the spline curve:

[0116]

[0117] In the formula: is the extreme point corresponding to the j-th segment of the spline curve;

[0118] Judge the extreme point whether it falls within the interval ; if it falls within this interval, then further judge whether this point is a wave peak according to formula (12), and if it is a wave peak, record this point;

[0119]

[0120] According to formulas (11) and (12), it is possible to determine within a sequence of wave crests For any light spot Perform the following processing to obtain the position points of the light spots after normalization;

[0121]

[0122] Where: Is the mean estimate of the positions of all light spots; Is the variance estimate of the positions of all light spots. Next, it is necessary to project the normalized light spots in the water flow direction;

[0123]

[0124] Where: Is The projection value in the wave - current direction.

[0125] Determine The wavelength value corresponding to the coordinate point:

[0126]

[0127] According to Figure 1 As shown, when a light spot 9 appears at a certain position in the image and then reappears at the same position after a period of time, the distance traveled by the water wave represents a wavelength λ, and the time interval experienced by the light spot 9 is exactly the period T of this wavelength, that is, the time interval between two frames of images where the light spot 9 appears at the same position. As Figure 2 (d) shows, in order to track the subsequent light spot 9, it is necessary to define the search range of the light spot center 10. This range is aimed at accurately positioning the light spot 9 at the same position in subsequent frames (see Figure 2 a) in it. The search area 13 of the light spot center is generally set to k times the size of the wavelength λ of the light spot center. The k value is default set to 0.2. In each subsequent frame of the video, it is necessary to perform the light spot 9 detection operation. If one or more light spots 9 are detected within the search range in a certain frame of the video, then the light spot centers 12 within these scopes will be weighted and averaged to determine the equivalent light spot center 11 (see Figure 2 b - d) in it);

[0128]

[0129] Where: Is the new light spot center coordinate vector determined by weighted average, unit: pix; n i Is the number of light spot pixels within the i - th light spot within the light spot scope, unit: pix; Is the light spot center coordinate vector corresponding to the i - th light spot within the light spot center scope, unit: pix;

[0130] According to the frame number difference of the detected light spot 9 between two frames of images, the corresponding period 8 of the light spot 9 is inversely calculated. Using the aforementioned method, the wave current velocity of all capture points in each frame of image is measured. The wave current velocity of each point consists of two components: one is the wave velocity, and the other is the flow velocity. Considering that the wave current environment in the water tank can be simplified to a shallow water wave model, therefore, the calculation of the flow velocity will follow the relevant theory of shallow water waves;

[0131]

[0132] In the formula: is the wavelength corresponding to the center of the light spot, unit: pix; f ps is the frame rate, unit: frame / s; △N is the frame number difference between two frames of images captured at the same position; g is the acceleration due to gravity, unit: m / s 2 ; h is the water depth value of the water tank, unit: m.

[0133] Embodiment 2

[0134] This embodiment is a test case, and the specific steps are as follows:

[0135] Step 1: Calibrate the actual size of a single pixel

[0136] In the initial stage, to improve the accuracy and speed of subsequent light spot detection, the present invention requires manually selecting the water flow area 19. The manual selection method is as follows: successively pick the turning points of the boundary of the water flow area. The number of picked points is determined by the complexity of the boundary. For example, Figure 4 the green dots picked in the water flow area 19 in are the turning points of the boundary. And the closed area formed by connecting the points picked in the water flow area 19 in sequence generates the water flow area mask 20 (see Figure 4 ).

[0137] In order to ensure the calculation accuracy of the single pixel size without affecting the efficiency of image processing, the present invention extracts a certain number of calibration plate original image frames 21 from the calibration video (the default number of extracted frames is 4, such as Figure 5As shown in the figure, the method for randomly extracting the number of frames is as follows: A large random number is randomly generated and the remainder obtained by dividing it by the total number of frames of this calibrated video (the total number of frames in this example is 115 frames) is the frame image selected. Subsequently, the threshold method is used to convert these images into binary images 22, where the default value of the threshold of the threshold method is 100. Then, erosion processing 23 is performed on the binary image 22 to separate the texture connected to the edge of the calibration board. Subsequently, the four-neighborhood search method is used to filter out small noise spots. The specific operation of the four-neighborhood search method is as follows: First, search for noise seed points (when defined as small black spots, the pixel point with a gray value of 0 encountered for the first time is the noise seed point), and then, with this seed point as the center, search for pixel points with a gray value of 0 within the four neighborhoods outward, and continue the search with the newly found pixel points as the starting point until there are no longer pixel points with a gray value of 0 within the four neighborhoods of the new pixel points, thus completing the search for a pixel patch. Traverse the entire image. After completing the search for all pixel patches, arrange them in ascending order according to the number of pixel points in the pixel patch. Pixel patches smaller than the filtering threshold (default value is 200) are regarded as noise patches and are removed.

[0138] To further improve the recognition accuracy of the calibration board, it is also necessary to identify the pixel patches larger than the filtering threshold to determine whether they are the texture within the calibration board. The identification method is as follows: Extend straight lines from the "top, bottom, left, and right" four directions of these pixel patches to be detected. If less than two directions touch the image boundary, it is considered that this pixel patch is the texture within the calibration board and is removed. After completing the above operations, the filtering of small background spots 24 is completed, and the largest contour 25 after removing the noise texture is obtained.

[0139] Subsequently, find the largest contour among all the contours, that is, the contour of the calibration board, and calculate the average value of the number of pixel points contained in all the largest contours as the number of pixel points of the calibration board. Finally, determine the actual size of a single pixel according to the known actual area of the input calibration board.

[0140]

[0141] Step 2: Determine the direction and wavelength of the wave current

[0142] To reduce noise, refer to Figure 6, first, perform Gaussian smoothing processing 27 on each frame of the original image 26 extracted from the video to convert the original image 26 into a grayscale image. In addition, to further reduce the influence caused by the shooting brightness difference, the histogram equalization technique 28 is used to unify the image brightness. Then, perform binarization processing on the grayscale image to generate a binary image 29, where the default threshold value for the binarization processing is 140. Next, divide the entire image into seed point regions 30. Specifically, divide 400 regions in both the horizontal and vertical directions of the image. In each seed point sub-region, generate random seed points 31. However, due to the existence of the light spot region, multiple seed points may be generated on the same light spot. Therefore, it is necessary to merge these multiple seed points belonging to the same light spot, merge the seed points and mark the reflection patch information 32 (see Figure 6 ). Calculate the wave propagation direction 5 according to formula (6), and calculate the projection of the reflecting surface 17 on the wave propagation direction 5 according to formula (15) (see Figure 7 ). And based on the average value of the distances between two adjacent reflecting surfaces, the wavelength value at this point is obtained.

[0143] Step 3: Determine the wave speed by tracking the light spot and inversely calculate the flow velocity based on this

[0144] To determine the wave speed of the water wave, first, it is necessary to clarify two key parameters, namely the wavelength and the period. The wavelength has been determined in Step 2. Next, the focus is on determining the period. In the present invention, the period is defined as the time interval when the reflecting surface appears at the same position point. Specifically, when the reflecting surface first appears at a certain position point in the image, record the position information of the center of the reflecting surface and the corresponding frame number. Subsequently, continuously detect the same position in each frame of the image. When the reflecting point is detected again at the same position, the time difference between the appearances of these two reflecting surfaces is the water wave period at this position. To improve the robustness of the detection, set the monitoring position range to the area enclosed by 0.1 times the wavelength at this point. As long as the light spot appears again within this area, it is considered that the light spot appears again. Once the wavelength and the period are determined, the wave speed can be calculated accordingly. It should be noted that this wave speed is the wave speed superimposed with the flow velocity. For the water waves in the water tank, they belong to shallow water waves. Therefore, the shallow water wave speed can be deducted from the wave speed superimposed with the flow velocity to obtain the actual flow velocity of the water tank. From Figure 8 it can be observed that the maximum flow velocity appears at the gate outlet, and its value is as high as 756 mm / s. While the minimum flow velocity is recorded at the flow velocity boundary, which is 365 mm / s. This flow velocity distribution is highly consistent with the actual situation. To further verify the accuracy of the present invention in measuring the flow velocity, we selected a cross-section and used 4 flow meters to measure the average flow velocity, and at the same time, compared and analyzed the measurement results with the average flow velocity calculated by the method of the present invention. As Figure 9As shown, the results obtained by the method of the present invention show a high degree of consistency with the results measured by the current meter, which strongly proves the effectiveness and reliability of the method of the present invention.

[0145] The above are only the preferred embodiments of the present invention, and do not limit the patent scope of the present invention accordingly. Any equivalent structural transformation made by using the content of the specification and drawings of the present invention under the inventive concept of the present invention, or direct / indirect application in other related technical fields, is included in the patent protection scope of the present invention.

Claims

1. A flow velocity measurement method, characterized in that The following steps are involved: Step 1: Determine the actual size of a single pixel by the number of pixels of the calibration plate in each frame and the actual size of the calibration plate; Step 2: Determine the wave flow direction, construct a new coordinate system based on the wave flow direction vector, and determine the wavelength according to the number of light spots projected in the wave flow direction and the actual size of a single pixel; Step 3: Determine the wave velocity by tracking the time interval that occurs at the same location and the corresponding wavelength at the location, and invert the flow velocity based on this.

2. A flow velocity measurement method according to claim 1, characterized in that The specific steps of step 1 are: 1) Perform single-pixel calibration, extract the image from the calibration video, and use the threshold method to outline the contour area of ​​the calibration plate in the image; 2) Use morphological corrosion technology to separate internal texture and contour boundaries to make the contour clearer; 3) Search and judge the spots in the image. Use the four-neighborhood search method to determine all pixel patches in the entire image. For spots with less than 50 pixels, filter them directly. For spots with more than or equal to 50 pixels, it is necessary to further judge whether the straight lines extending in the four directions of up, down, left and right touch the image boundary in at least two directions. If this condition is not met, the spot is regarded as a pixel spot inside the calibration plate and filtered. After the above processing, the contour of the largest pixel patch is determined. This contour is the contour of the calibration plate. Based on this, the number of pixels in the calibration plate is calculated. The above processing is repeated for each extracted image, and the average number of pixels in the calibration plate is finally determined. Finally, the actual size of a single pixel is calculated by combining the actual area of ​​the calibration plate and the average number of pixels in the calibration plate: Where: l is the size of a single pixel, unit: mm / pix; m is the number of images extracted from the calibration video; A area is the area of ​​the calibration plate, unit: mm 2 ; N i is the number of pixels in the calibration plate in the i-th image, in pix.

3. A flow velocity measurement method according to claim 2, characterized in that The specific steps of the four-neighborhood search method are as follows: first search for noise seed points. When defined as small black spots, the pixel point with a grayscale value of 0 encountered for the first time during line-by-line scanning is the noise seed point. Then, with the seed point as the center, search outward for pixel points with a grayscale value of 0 in the four neighborhoods, and continue searching with the newly found pixel point as the starting point until there are no more pixel points with a grayscale value of 0 in the four neighborhoods of the new pixel point, thereby completing the search for a pixel patch. According to the above method, the entire image is traversed line by line. After completing the search of all pixel patches, the pixel patches are arranged in ascending order according to the number of pixels in the pixel patches.

4. A flow velocity measurement method according to claim 1, characterized in that The specific steps for determining the wave flow direction described in step 2 are: First, determine the center of the light spot, and then normalize the coordinate vectors of all light spot centers by Z-score to obtain x i (i=1,2,…,m); Establish the wave flow direction vector constraint function: Where: f(u) is the wave flow direction vector constraint function, unit: pix; u is the wave flow direction vector, unit: pix; x i is the center of the normalized reflected light spot, unit: pix; m is the total number of all light spot center points; The Lagrangian function is established based on formula (2): Where: is the Lagrangian function, unit: pix; is the Lagrange multiplier; Find the gradient of formula (3): set up Then formula (4) is: Cu=λu (5) From formula (5), we can conclude that the vector that meets the requirements is the eigenvector corresponding to the maximum eigenvalue of C Where: It is the projection coordinate of the wave flow direction, unit: pix.

5. A flow velocity measurement method according to claim 1 or 3, characterized in that The specific steps of constructing a new coordinate system based on the wave flow direction vector described in step 2 are: Determine the maximum range of all coordinates in the direction of the velocity vector projection: Where: The maximum range of coordinates of the velocity vector projection direction, unit: pix; Statistical step length of similar reflection points along the flow direction: Where: △h is the statistical step length of the similar reflection points along the flow velocity direction, unit: pix; n is the number of segments of the maximum range of coordinate changes in the direction of the flow velocity vector projection; Create new coordinates: Where: For the interval The number of internal reflection spots; η j is the number of pixels in the jth light spot; The vertical coordinate of the new coordinate to be established, unit: pix; According to formula (9), determine n+1 new coordinate points Where: i = 0, 1,…n.

6. A flow velocity measurement method according to claim 5, characterized in that The specific steps for determining the wavelength described in step 2 are: Use spline curve to align new coordinate points Where: i = 0, 1, ... n. Fitting is performed to determine the peak-to-peak position in the wave flow process: Where: m i (i=0,1,2,…,n) is The first derivative value at the point; The corresponding extreme point in the i-th segment of the spline curve: Where: is the extreme point corresponding to the j-th segment of the spline curve; Determine the extreme point Is it in the interval If it falls within this interval, then further determine whether the point is a peak according to formula (12). If it is a peak, record the point; According to equations (11) and (12), it can be determined that in a peak sequence For any light spot Perform the following processing to obtain the standardized spot position point; Where: is the mean estimate of all light spot positions; is the variance estimate of all light spot positions; next, the standardized light spots need to be projected in the direction of the water flow; Where: for Projection value in the direction of wave flow; Sure The wavelength value corresponding to the coordinate point:

7. A flow velocity measurement method according to claim 6, characterized in that The specific steps of step 3 are: When a light spot appears at a certain position in the image, it reappears at the same position after a period of time. The distance traveled by the water wave represents a wavelength, and the time interval experienced by the light spot is exactly the period of the wavelength, that is, the time interval between two frames of images in which the light spot appears at the same position. In order to track subsequent light spots, it is necessary to define the search range of the light spot center. This range is intended to accurately locate the light spot at the same position in subsequent frames. The search area of ​​the light spot center is generally set to k times the size of the light spot center wavelength. The k value is set to 0.2 by default. In each subsequent frame of the video, the light spot detection operation needs to be performed. If one or more light spots are detected within the search range in a certain frame of the video, the light spot centers within these scopes will be weighted averaged to determine the equivalent light spot center. Where: is the new spot center coordinate vector determined by weighted averaging, unit: pix; n i is the number of light spot pixels in the i-th light spot within the light spot scope, unit: pix; is the spot center coordinate vector corresponding to the i-th spot within the spot center scope, unit: pix; According to the difference in the number of frames where the light spot is detected between the two frames of images, the period corresponding to the light spot is inversely calculated. The wave and flow velocity of all captured points in each frame of the image is measured using the above method. The wave and flow velocity of each point consists of two components: one is the wave velocity, and the other is the flow velocity. Considering that the wave and flow environment of the water tank can be simplified as a shallow water wave model, the calculation of the flow velocity will follow the relevant theory of shallow water waves. Where: is the wavelength corresponding to the center of the light spot, unit: pix; f ps is the frame rate, unit: frame / s; △N is the frame difference between two frames captured at the same position; g is the gravitational acceleration, unit: m / s 2 ; h is the water depth of the tank, unit: m.