River flow velocity measurement method based on improved space-time image method

By improving the spatiotemporal imaging method and adopting video acquisition and index evaluation technology, the problems of difficult equipment deployment and low measurement accuracy in traditional river flow velocity measurement have been solved, and high-precision and reliable monitoring of river flow velocity has been achieved.

CN121385362APending Publication Date: 2026-01-23ZHONGBEI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511295941.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-11
Publication Date
2026-01-23

AI Technical Summary

Technical Problem

The existing technical problems are that the traditional STIV method for measuring water flow velocity has difficulties in equipment deployment, low automation, unstable measurement accuracy, and high technical requirements for operators.

Method used

A river velocity measurement method based on an improved spatiotemporal image method is adopted. By acquiring video of the river surface, decomposing it into image frames, dividing the velocity measurement sub-regions, generating spatiotemporal images, evaluating indicators, identifying the optimal velocity measurement line, and calculating the surface velocity.

Benefits of technology

It improves the accuracy and reliability of river flow velocity measurement, solves the problems of difficult equipment deployment and low measurement accuracy in traditional methods, and realizes the application potential of non-invasive hydrological monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121385362A_ABST
    Figure CN121385362A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of river flow velocity measurement, and aims to solve the problem that the main direction detection error of textures is relatively large due to a method for arranging velocity measurement lines at equal intervals. The invention provides a river flow velocity measurement method based on an improved space-time image method. The river flow velocity measurement method comprises the following steps: decomposing a to-be-measured river surface video into image frames arranged according to a time sequence; dividing the decomposed image into a plurality of equal-width speed measurement sub-regions along the width direction of the river; traversing all candidate velocity measurement lines in each velocity measurement sub-region, and generating a corresponding space-time image; performing index evaluation on all the generated space-time images; taking the candidate velocity measurement line corresponding to the space-time image with the highest index evaluation value as the optimal velocity measurement line in the velocity measurement sub-region to which the candidate velocity measurement line belongs; identifying the texture principal direction angle of the space-time image with the highest index evaluation; and determining the flow velocity of the to-be-measured river based on the texture main direction angle. By introducing a space-time image quality evaluation mechanism, the precision of texture main direction detection can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of river flow velocity measurement, and particularly relates to a river flow velocity measurement method based on an improved space-time image method. BACKGROUND

[0002] River flow velocity is a key parameter in the fields of hydrology research, water resource management, and flood control and disaster reduction. Real-time and accurate acquisition of river flow velocity information is of great importance for improving flood forecast accuracy, optimizing water resource scheduling, evaluating water environment conditions, and ensuring the safe operation of water conservancy projects. Traditional contact-type river flow velocity measurement methods are time-consuming, have low automation degree, are difficult to deploy, have high risk in working environment, and have high technical requirements for operators. Therefore, exploring and developing non-contact, automated, high-precision, and widely-covered river flow velocity measurement technology has become a research hotspot and development trend in the field of hydrological monitoring.

[0003] In recent years, non-contact flow measurement methods based on image processing technology have made great progress, providing a new solution for river flow velocity measurement. The space-time image velocity (STIV) method is a non-contact surface flow velocity measurement method based on image processing technology. It is widely used in river monitoring due to its safety, efficiency, and ease of deployment. STIV extracts pixel information of consecutive video frames through a pre-set velocity line and generates a space-time image by stacking them in time sequence. The inclined stripe texture on the space-time image reflects the trajectory of the water surface features on the velocity line moving over time. By detecting the main direction of these textures, one-dimensional time-averaged flow velocity in the direction of the velocity line can be calculated.

[0004] However, the traditional STIV method uses fixed equidistant velocity lines. When the velocity line fails to capture significant tracer information or is located in a region with turbulent flow, weak texture features, or interference, the texture of the generated space-time image is not clear, causing large detection errors of the main direction of the texture, making it difficult to extract accurate flow velocity information, and thus seriously affecting the reliability and accuracy of the final flow velocity estimation. SUMMARY

[0005] The application provides a river flow velocity measurement method based on an improved space-time image method to solve at least one of the above technical problems in the prior art.

[0006] The application adopts the following technical solution: a river flow velocity measurement method based on an improved space-time image method, comprising the following steps: acquiring a surface video of a river to be measured, and decomposing the surface video of the river to be measured into image frames arranged in time sequence; dividing the decomposed images into several equally wide velocity sub-regions along the width direction of the river; Traverse all candidate speed measurement lines in each speed measurement sub-region and generate corresponding spatiotemporal images; evaluate all generated spatiotemporal images using metrics. Obtain the spatiotemporal image with the highest index evaluation value in each speed measurement sub-region, and take the candidate speed measurement line corresponding to the spatiotemporal image with the highest index evaluation value as the optimal speed measurement line in its respective speed measurement sub-region. The gradient tensor method was used to identify the principal direction angle of the texture of the spatiotemporal image with the highest index evaluation in each velocity measurement sub-region. Based on the detected principal direction angle of the texture, the surface velocity of the optimal velocity line in each corresponding velocity measurement sub-region is determined, and the surface velocity of the optimal velocity line is used as the velocity in each velocity measurement sub-region of the river to be measured.

[0007] Preferably, before dividing the decomposed image into several equally wide velocity measurement sub-regions along the width of the river, the decomposed image is further calibrated, including the following steps: surveying the plane coordinates and elevation coordinates of ground control points in the world coordinate system; calculating the DLT transform coefficients for image distortion correction using the world coordinates and image coordinates of the ground control points; and performing geometric calibration on the image based on the DLT transform coefficients.

[0008] Preferably, the evaluation function for evaluating all generated spatiotemporal images is: In the formula, For the first The score of each sub-indicator For the first The weights corresponding to each sub-indicator It is the evaluation value of the indicator, and ; The sub-indicators include texture coherence, signal-to-noise ratio, brightness difference between adjacent pixels, texture angle stability, frequency domain energy distribution, and contrast and brightness histograms.

[0009] Preferably, before using the gradient tensor method to identify the main direction angle of the texture of the spatiotemporal image with the highest index evaluation in each velocity measurement sub-region, the method further includes filtering the spatiotemporal image with the highest index evaluation in each velocity measurement sub-region based on the STD normalization filter.

[0010] Preferably, the main direction angle of the texture is the angle between the texture direction and the vertical axis; The steps for calculating the principal direction angle of the texture include: A grayscale gradient tensor is constructed by calculating the gradient vector and gradient intensity of each pixel in the spatiotemporal image, and the local structure and edge information of the spatiotemporal image are extracted. Divide the spatiotemporal image into several windows and solve for the texture angle of each part; Based on the weights of the texture angles of each part, the weighted average of the texture angles of all parts in the spatiotemporal image is obtained, which is used as the principal direction angle of the texture in the final spatiotemporal image.

[0011] Preferably, the method for calculating the surface velocity of the optimal velocity measuring line in each velocity measuring sub-region is as follows: Assuming that in the world coordinate system, the surface flow characteristics of the river over time The distance traveled along the optimal velocity measurement line is Corresponding to the image coordinate system Intra-frame motion If the pixel is specified, the formula for calculating the surface velocity of the optimal velocity measurement line is: In the formula, The surface velocity of the optimal velocity measurement line; It's the resolution of the speed measuring line. It is the duration of each frame. , These are all fixed parameters of the camera; The principal direction angle of the texture in the spatiotemporal image.

[0012] Preferably, the step of generating a corresponding spatiotemporal image based on the speed measurement line includes: extracting the grayscale information of each speed measurement line frame by frame according to the pixel coordinate position of the speed measurement line, and stacking the grayscale information of each frame from top to bottom to synthesize the spatiotemporal image. In this spatiotemporal image, the horizontal axis represents the length of the speed measuring line, and the vertical axis represents the number of video frames. The number of frames is determined by the video recording time and the camera's frame rate.

[0013] Compared with the prior art, the beneficial effects of the present invention are: This invention introduces a spatiotemporal image quality evaluation mechanism to select the optimal velocity measurement line that can generate spatiotemporal images with clear textures. This can effectively improve the accuracy of texture main direction detection, thereby significantly improving the accuracy and reliability of river surface velocity monitoring and demonstrating its application potential and value in the field of non-invasive hydrological monitoring. Attached Figure Description

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

[0015] Figure 1 This is a flowchart of a river flow velocity measurement method based on an improved spatiotemporal image method provided in an embodiment of the present invention; Figure 2 This is a diagram of the speed measurement sub-regions divided in this embodiment of the invention; Figure 3 This is the result of index evaluation in a certain speed measurement sub-region in this embodiment of the invention; Figure 4 This is a spatiotemporal image constructed from the optimal velocity measurement line in the velocity measurement sub-region in this embodiment of the invention; Figure 5 This is the spatiotemporal image after standardized filtering in this embodiment of the invention; Figure 6 This is a schematic diagram of the position and speed of the optimal speed measuring line in an embodiment of the present invention. Detailed Implementation

[0016] The technical solutions of the embodiments of the present invention will be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other implementation methods obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0017] It should be noted that the structures, proportions, sizes, etc., shown in the accompanying drawings of this specification are only for the purpose of assisting those skilled in the art in understanding and reading the content disclosed in the specification, and are not intended to limit the conditions under which the present invention can be implemented. Therefore, they have no substantial technical significance. Any modifications to the structure, changes in the proportional relationships, or adjustments to the size, without affecting the effects and objectives that the present invention can produce, should fall within the scope of the technical content disclosed in the present invention. It should be noted that in this specification, relational terms such as "first" and "second" are only used to distinguish one entity from several other entities, and do not necessarily require or imply any actual relationship or order between these entities.

[0018] This invention provides an embodiment: like Figures 1 to 6 As shown, a method for measuring river flow velocity based on an improved spatiotemporal image method includes the following steps: S1: Install a camera with a resolution of 3840×2160 and a frame rate of 60fps on the upper right bank of the canal section along the direction of water flow to acquire video images of the river surface to be measured. Decompose the video of the river surface to be measured into image frames arranged in time sequence. Survey the plane coordinates and elevation coordinates of the ground control points in the world coordinate system. Calculate the DLT transform coefficients for image distortion correction using the world coordinates and image coordinates of the ground control points. Perform geometric calibration on the image based on the DLT transform coefficients.

[0019] S2: Divide the decomposed image into 8 equal-width velocity measurement sub-regions along the width of the river; S3: Traverse all candidate speed measurement lines in each speed measurement sub-region and generate the corresponding spatiotemporal image; the steps of generating the corresponding spatiotemporal image based on the speed measurement line include: extracting the grayscale information of each speed measurement line frame by frame according to the pixel coordinate position of the speed measurement line, and stacking the grayscale information of each frame from top to bottom to synthesize the spatiotemporal image. In this spatiotemporal image, the horizontal axis represents the length of the speed measurement line, and the vertical axis represents the number of video frames. The number of frames is determined by the video recording time and the camera's frame rate. All generated spatiotemporal images are evaluated using metrics; the evaluation function for this evaluation is: In the formula, For the first The score of each sub-indicator For the first The weights corresponding to each sub-indicator It is the evaluation value of the indicator, and ; The sub-indicators include texture coherence, signal-to-noise ratio, brightness difference between adjacent pixels, texture angle stability, frequency domain energy distribution, and contrast and brightness histograms.

[0020] Specifically, the steps for solving the texture coherence index include: The formula for calculating the tensor eigenvalues ​​is as follows: In the formula, , These are the two eigenvalues ​​of the structure tensor. The structure tensor has three components: the gradient energy in the horizontal direction, the gradient energy in the vertical direction, and the co-term of the gradients in both directions. Gaussian smoothing parameters are used. calculate.

[0021] Recalculate local coherence: In the formula, For local coherence, , used to avoid division by zero.

[0022] Finally, the texture coherence index was obtained: In the formula, is a texture coherence index, and is the global average value of the spatiotemporal image.

[0023] Specifically, the steps to solve for the signal-to-noise ratio (SNR) index include: By projecting the image onto it from different angles using Radon transform, the peak signal intensity in the most significant direction is obtained and compared with the mean and standard deviation of noise in the background region. The SNR value is then normalized using the Sigmoid function: In the formula, This is the scaling factor, with a default value of 1.0; It is the natural logarithm. Signal-to-noise ratio; The maximum signal strength peak value obtained by Radon transform in all angular projections; This represents the average noise level in the background region. is the noise standard deviation of the background region; SNR is the signal-to-noise ratio.

[0024] Specifically, the steps for calculating the brightness difference index between adjacent pixels include: By calculating the sum of brightness differences between adjacent pixels in the horizontal and vertical directions, the overall edge or texture intensity features of the image are obtained. Using the 95th percentile to control for extreme values, the final normalized expression is: in Number of pixel pairs The 95th percentile of the brightness difference This is an indicator of the brightness difference between adjacent pixels; This represents the brightness difference between adjacent pixels.

[0025] Specifically, the steps for solving the texture angle stability index include: Also based on the structure tensor, the local principal direction angle of each pixel is extracted, and its standard deviation in the entire image is calculated. The stability is defined as: In the formula, This represents the standard deviation of all principal direction angles. A larger value indicates that the texture direction is unstable. This index value is in the range of [0,1], and a larger value indicates greater stability. It is a structure tensor.

[0026] Specifically, the steps for solving the frequency domain energy distribution index include: The image spectrum is obtained using Fourier transform, and the proportion of energy at the frequency point with the highest energy (dominant frequency) is calculated: In the formula, Represents the two-dimensional Fourier transform of an image; This represents the energy distribution in the frequency domain.

[0027] Specifically, the steps for solving the contrast and luminance histogram indices include: The entropy of the gray-level histogram is used to measure the amount of gray-level information in an image; the higher the entropy, the more detail the image contains. in for The normalized frequency of the first gray level, 8 is the theoretical maximum entropy (uniform gray level distribution). Normalized entropy; This represents the entropy of the grayscale histogram.

[0028] S4: Obtain the spatiotemporal image with the highest index evaluation value in each speed measurement sub-region, and take the candidate speed measurement line corresponding to the spatiotemporal image with the highest index evaluation value as the optimal speed measurement line in its respective speed measurement sub-region. The spatiotemporal image with the highest index evaluation in each velocity measurement sub-region is filtered based on the STD normalized filter, and the calculation formula is as follows: In the formula, This represents the grayscale value of a pixel in the original STI image. The grayscale values ​​of pixels in the normalized STI image. and They represent the first The mean and standard deviation of column pixels over time are specifically defined as follows: In the formula, The total length of the time dimension; For integration variables (time index).

[0029] After normalizing the image using the standard deviation of the vertical pixel array, the texture in STI becomes clearer.

[0030] S5: The gradient tensor method is used to identify the main direction angle of the texture of the spatiotemporal image with the highest index evaluation in each velocity measurement sub-region; the main direction angle of the texture is the angle between the texture direction and the vertical axis, and the vertical axis refers to the axis in the vertical direction.

[0031] The steps for calculating the principal direction angle of the texture include: A grayscale gradient tensor is constructed by calculating the gradient vector and gradient intensity of each pixel in the spatiotemporal image, thereby extracting the local structure and edge information of the spatiotemporal image; the calculation formula is shown below: In the formula, Indicates the integration region; and They represent along direction and Gray-scale gradient in direction; The term represents the intersection of the spatial and temporal directions; The gradient energy is located in the time direction. This represents the gradient energy in the spatial direction. Divide the spatiotemporal image into several windows and solve for the texture angle of each part; Based on the weights of the texture angles of each part, the weighted average of the texture angles of all parts in the spatiotemporal image is calculated, which is used as the principal direction angle of the texture in the final spatiotemporal image. The calculation formula is as follows: In the formula, the clarity of the texture of each part is used as the basis. As the weight of each texture angle, To indicate the first The principal orientation angle of the texture of each image partition; The principal direction angle of the texture in the spatiotemporal image.

[0032] S6: Determine the surface velocity of the optimal velocity line in each velocity measurement sub-region based on the detected texture main direction angle, and use the surface velocity of the optimal velocity line as the velocity in each velocity measurement sub-region of the river to be measured.

[0033] The method for calculating the surface velocity of the optimal velocity line in each velocity measurement sub-region is as follows: Assuming that in the world coordinate system, the surface flow characteristics of the river over time The distance traveled along the optimal velocity measurement line is Corresponding to the image coordinate system Intra-frame motion If the pixel is specified, the formula for calculating the surface velocity of the optimal velocity measurement line is: In the formula, The surface velocity of the optimal velocity measurement line; It's the resolution of the speed measuring line. It is the duration of each frame. , These are all fixed parameters of the camera; The principal direction angle of the texture in the spatiotemporal image.

[0034] The above description is merely a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A river flow velocity measurement method based on an improved space-time image method, characterized by, The method comprises the following steps: Collecting a video of a river surface to be measured, and decomposing the video of the river surface to be measured into image frames arranged in time sequence; Dividing the decomposed images into a plurality of equal-width velocity-measuring sub-regions along the width direction of the river; Traversing all candidate velocity-measuring lines in each velocity-measuring sub-region, and generating corresponding space-time images; Obtaining the space-time image with the highest evaluation value in each velocity-measuring sub-region, and taking the candidate velocity-measuring line corresponding to the space-time image with the highest evaluation value as the optimal velocity-measuring line in the velocity-measuring sub-region; Identifying the texture main direction angle of the space-time image with the highest evaluation value in each velocity-measuring sub-region by using the gradient tensor method; Determining the surface flow velocity of the optimal velocity-measuring line in each velocity-measuring sub-region based on the detected texture main direction angle, and taking the surface flow velocity of the optimal velocity-measuring line as the flow velocity in each velocity-measuring sub-region of the river to be measured.

2. The river flow velocity measurement method based on the improved space-time image method according to claim 1, characterized in that: Before the decomposed images are divided into a plurality of equal-width velocity-measuring sub-regions along the width direction of the river, the decomposed images are calibrated, comprising the following steps: surveying the plane coordinates and elevation coordinates of ground control points in a world coordinate system; calculating DLT transformation coefficients for image distortion correction by using the world coordinates and image coordinates of the ground control points, and performing geometric calibration on the images based on the DLT transformation coefficients.

3. The method for measuring river flow velocity based on improved space-time image method according to claim 1, characterized in that: The evaluation function for evaluating all generated space-time images is: In the formula, For the first The score of each sub-indicator For the first The weights corresponding to each sub-indicator It is the evaluation value of the indicator, and ; The sub-indicators include texture coherence, signal-to-noise ratio, adjacent pixel intensity difference, texture angle stability, frequency energy distribution, and contrast and intensity histograms.

4. The method for measuring river flow velocity based on improved space-time image method according to claim 1, characterized in that: Before the texture main direction angle of the space-time image with the highest evaluation value in each velocity-measuring sub-region is identified by using the gradient tensor method, the space-time image with the highest evaluation value in each velocity-measuring sub-region is filtered based on an STD standardization filter.

5. The method for measuring river flow velocity based on improved space-time image method according to claim 1, characterized in that: The texture main direction angle is the included angle between the texture direction and the vertical axis; The step of calculating the texture main direction angle comprises: Constructing a gray gradient tensor by calculating the gradient vector and gradient intensity of each pixel point in the space-time image, and extracting the local structure and edge information of the space-time image; Dividing the space-time image into a plurality of windows, and solving the texture angles of each part; Based on the weights of the texture angles of each part, the weighted average value of the texture angles of all parts in the space-time image is obtained as the final texture main direction angle of the space-time image.

6. The method for measuring river flow velocity based on improved space-time image method according to claim 1, characterized in that: The calculation method of the surface flow velocity of the optimal velocity-measuring line in each velocity-measuring sub-region comprises: Assume that the river surface flow characteristics in the world coordinate system move along the optimal velocity line in time The distance is , corresponding to the image coordinate system frame motion pixel, then the calculation formula of the surface flow velocity of the optimal velocity line is: wherein, is the surface flow velocity of the optimal velocity measurement line; is the resolution of the velocity measurement line, is the time duration of each frame, , are all fixed parameters of the camera; is the texture principal direction angle of the spatio-temporal image.

7. The method for measuring river flow velocity based on improved space-time image method according to claim 1, characterized in that: The step of generating a corresponding space-time image based on the velocity-measuring line comprises: extracting the gray information of each velocity-measuring line frame by frame according to the pixel coordinate position of the velocity-measuring line, and stacking and arranging the gray information of each frame from top to bottom to synthesize the space-time image; The horizontal coordinate of the space-time image represents the length of the velocity-measuring line, and the vertical coordinate represents the frame number, which is determined by the shooting time of the video and the frame rate of the camera.