A method, device and electronic device for determining river surface flow velocity

By generating a spatio-temporal image and performing Fourier transformation, the direction of water flow on the river surface is determined, which solves the problem of inaccurate river flow velocity measurement in the existing technology and achieves accurate calculation of river surface flow velocity and flow value.

CN116679080BActive Publication Date: 2024-10-01广州伏羲智能科技有限公司
View PDF 22 Cites 0 Cited by

Patent Information

Application Number
CN202310631562.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-30
Publication Date
2024-10-01
Estimated Expiration
2043-05-30

AI Technical Summary

Technical Problem

The existing LSPTV method has the problem of inaccurate measurement results in river flow velocity measurement. It is especially difficult to obtain accurate and reliable measurement results in areas with complex flow patterns.

Method used

By obtaining the grayscale information of multiple sampling times of the preset search line in the river, a spatiotemporal image is generated, Fourier transform is performed to obtain a two-dimensional autocorrelation function, and the coordinate value of the target pixel point whose correlation value is greater than the preset value is determined, and the coordinates are Transform to determine flow direction and calculate river surface velocity based on flow direction and spatiotemporal images.

Benefits of technology

It achieves accurate calculation of river surface flow velocity, can obtain reliable measurement results in complex flow pattern areas, and improves measurement accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116679080B_ABST
    Figure CN116679080B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device and electronic device for determining the surface velocity of a river. The method generates a spatiotemporal image of a preset search line in a target river, performs Fourier transformation on the spatiotemporal image, obtains a two-dimensional autocorrelation function of the spatiotemporal image, determines the coordinate values ​​corresponding to a plurality of target pixel points in the spatiotemporal image whose correlation values ​​are greater than a preset value based on the two-dimensional autocorrelation function, performs coordinate transformation on the coordinate values ​​corresponding to each target pixel point, obtains the polar coordinate value corresponding to each target pixel point, determines the direction of water flow on the surface of the target river based on the polar coordinate value of each target pixel point, and calculates the surface velocity of the target river based on the direction of water flow on the surface of the target river, the spatiotemporal image of the search line and the real distance information corresponding to each pixel point in the search line. The method provided by the present invention realizes the accurate calculation of the direction of water flow, and the surface velocity of the river can be accurately calculated based on the direction of water flow.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of flow velocity measurement, and in particular to a method, device and electronic equipment for determining river surface flow velocity. Background Art

[0002] In the existing technology, large-scale particle tracking velocimetry (LSPTV) is generally used to measure river flow. The working principle of this technology is to shine a laser beam onto a fluid sample and measure the phase shift when the laser passes through the sample. This phase shift is related to the speed of particles or droplets in the fluid, which can then be used to calculate the speed and flow rate of the fluid. This means that the accuracy of the measurement depends on the distribution of tracer particles in the water, which may be affected by various factors, such as wind, turbulence and other environmental conditions.

[0003] In addition, the use of artificial tracer particles is also challenging in areas with complex flow patterns, such as rapids, waterfalls, and high turbulence areas. In areas with complex flow patterns, the distribution of tracer particles can vary greatly, making it difficult to obtain accurate and reliable measurements. Therefore, the existing LSPTV scheme for measuring river flow velocity has the defect of inaccurate measurement results. Summary of the invention

[0004] Therefore, the technical problem to be solved by the present invention is to overcome the defect that the measurement results of the existing LSPTV velocity measurement method for river flow velocity measurement are not accurate enough, thereby providing a method, device and electronic equipment for determining the surface flow velocity of a river.

[0005] In a first aspect, an embodiment of the present invention discloses a method for determining the surface velocity of a river, which includes obtaining grayscale information corresponding to multiple sampling times of a preset search line in a target river; generating a space-time image of the search line based on the grayscale information corresponding to the multiple sampling times of the preset search line, the space-time image being used to characterize the correlation between the grayscale value of each pixel point on the search line and the sampling time and the length of the search line; performing Fourier transform on the space-time image of the search line to obtain a two-dimensional autocorrelation function corresponding to the space-time image, the two-dimensional autocorrelation function of the space-time image being used to characterize the correlation between the grayscale value of each pixel point in the space-time image and the grayscale values ​​of other pixels; determining the coordinate values ​​corresponding to multiple target pixels in the space-time image whose correlation values ​​are greater than a preset value based on the two-dimensional autocorrelation function; performing coordinate conversion on the coordinate values ​​corresponding to each target pixel point to obtain the polar coordinate value of each target pixel point; determining the surface water flow direction of the target river based on the polar coordinate value of each target pixel point; and calculating the surface flow velocity of the target river according to the surface water flow direction of the target river, the space-time image of the search line, and the real distance information corresponding to each pixel point in the search line.

[0006] The method / device for determining the surface velocity of a river provided by the present invention generates a spatiotemporal image of a preset search line in a target river, performs Fourier transformation on the spatiotemporal image, obtains a two-dimensional autocorrelation function of the spatiotemporal image, determines the coordinate values ​​corresponding to a plurality of target pixel points in the spatiotemporal image whose correlation values ​​are greater than a preset value based on the two-dimensional autocorrelation function, performs coordinate transformation on the coordinate values ​​corresponding to each target pixel point, obtains the polar coordinate value corresponding to each target pixel point, determines the surface flow direction of the target river based on the polar coordinate value of each target pixel point, and calculates the surface velocity of the target river based on the flow direction of the surface flow of the target river, the spatiotemporal image of the search line, and the real distance information corresponding to each pixel point in the search line. Through the method provided by the present invention, the autocorrelation function can be obtained by performing Fourier transformation on the spatiotemporal image, the inclination of the oblique stripes in the spatiotemporal image can be calculated based on the autocorrelation function, and the inclination of the oblique stripes in the spatiotemporal image can be used to characterize the direction of the water flow, thereby realizing the accurate calculation of the water flow direction, and the surface velocity of the river can be accurately calculated based on the water flow direction.

[0007] In combination with the first aspect, in a possible implementation of the first aspect, after calculating the surface flow velocity of the target river based on the flow direction of the target river surface, the spatiotemporal image of the search line, and the real distance information corresponding to each pixel point in the search line, the method also includes: determining the flow value within a preset calculation interval based on the surface flow velocity of the target river and the preset calculation interval area of ​​the target river.

[0008] The method provided in this embodiment can accurately calculate the flow value within a preset range.

[0009] In combination with the first aspect, in a possible implementation of the first aspect, grayscale information corresponding to multiple sampling times of a preset search line in a target river is obtained, including: obtaining video data of a preset position in the target river; determining the preset search line based on the video data; and determining grayscale information corresponding to multiple sampling times of the preset search line in the target river based on the video data and the preset search line.

[0010] In combination with the first aspect, in a possible implementation of the first aspect, the surface water flow direction of the target river is determined based on the polar coordinate value of each pixel point in the target area, including: determining the inclination of stripes in the space-time image based on the polar coordinate value of each pixel point in the target area; determining the water flow direction on the search line based on the inclination of stripes in the space-time image; determining the water flow direction on the surface of the target river based on the water flow direction on the search line.

[0011] In combination with the first aspect, in a possible implementation manner of the first aspect, the two-dimensional autocorrelation function is obtained by the following formula:

[0012]

[0013] Among them, x represents the horizontal coordinate of the pixel point in the space-time image, t represents the vertical coordinate of the pixel point in the space-time image, f(x, t) represents the gray value of the pixel point in the space-time image, (τ x , τ t ) represents the offset parameter of the pixel point in the spatiotemporal image, R(τ x , τ t ) is the two-dimensional autocorrelation function.

[0014] In a second aspect, an embodiment of the present invention further discloses a device for determining the surface flow velocity of a river, comprising: an acquisition module for acquiring grayscale information corresponding to multiple sampling times of a preset search line in a target river; a generation module for generating a space-time image of the search line based on the grayscale information corresponding to multiple sampling times of the preset search line, the space-time image being used to characterize the correlation between the grayscale value of each pixel point on the search line and the sampling time and the length of the search line; a first determination module for performing Fourier transform on the space-time image of the search line to obtain a two-dimensional autocorrelation function corresponding to the space-time image, the two-dimensional autocorrelation function of the space-time image being used to characterize the correlation between the grayscale value of each pixel point in the space-time image and the sampling time and the length of the search line. a second determination module, for determining the coordinate values ​​corresponding to multiple target pixel points whose correlation values ​​are greater than a preset value in the spatiotemporal image based on a two-dimensional autocorrelation function; a coordinate conversion module, for performing coordinate conversion on the coordinate values ​​corresponding to each target pixel point to obtain the polar coordinate value of each target pixel point; a third determination module, for determining the surface water flow direction of the target river based on the polar coordinate value of each target pixel point; a first calculation module, for calculating the surface flow velocity of the target river according to the surface water flow direction of the target river, the spatiotemporal image of the search line, and the real distance information corresponding to each pixel point in the search line.

[0015] In combination with the first aspect, in a possible implementation of the first aspect, the device further includes: a second calculation module, configured to determine a flow value within a preset calculation interval according to a surface flow velocity of the target river and an area of ​​a preset calculation interval of the target river.

[0016] In combination with the first aspect, in a possible implementation of the first aspect, the acquisition module includes: an acquisition submodule, used to acquire video data of a preset position in a target river; a first determination submodule, used to determine a preset search line based on the video data; and a second determination submodule, used to determine grayscale information corresponding to multiple sampling times of a preset search line in the target river based on the video data and the preset search line.

[0017] In the third aspect, an embodiment of the present invention further discloses an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor executes a method for determining a river surface flow velocity as in the first aspect or any optional embodiment of the first aspect.

[0018] In a fourth aspect, an embodiment of the present invention further discloses a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a method for determining a river surface flow velocity as in the first aspect or any optional embodiment of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0020] Figure 1 A flowchart of a specific example of a method for determining a river surface velocity in an embodiment of the present invention;

[0021] Figure 2 A schematic diagram of the position of a search line in a method for determining a river surface velocity in an embodiment of the present invention;

[0022] Figure 3 is a schematic diagram of a spatiotemporal image in a method for determining a river surface velocity in an embodiment of the present invention;

[0023] Figure 4 is a principle block diagram of a specific example of a device for determining river surface velocity in an embodiment of the present invention;

[0024] Figure 5 FIG. 4 is a specific example diagram of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION

[0025] The technical solution of the present invention will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0026] In the description of the present invention, it should be noted that the terms "first", "second" and "third" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0027] In addition, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0028] The embodiment of the present invention discloses a method for determining the surface velocity of a river. Figure 1 As shown, the method comprises the following steps:

[0029] Step S101, obtaining grayscale information corresponding to multiple sampling times of a preset search line in a target river.

[0030] For example, the target river can be any river whose surface velocity is to be determined. The specific content of the target river is not limited in the present embodiment, and those skilled in the art can determine it according to their needs. The preset search line can be a straight line set along the flow direction of the river in the pre-collected video of the target river. In the present embodiment, the position of the preset search line can be as follows: Figure 2 As shown in the position of the middle line segment A, the length of the preset search line can be 165 pixels and the width can be one pixel. The grayscale information corresponding to the multiple sampling times of the preset search line in the target river can be selected from the video of the target river collected in advance, and the grayscale information on the search line in the 165 frames of images is extracted.

[0031] Step S102 , generating a spatiotemporal image of the search line based on the grayscale information corresponding to multiple sampling times of the preset search line, wherein the spatiotemporal image is used to characterize the correlation between the grayscale value of each pixel point on the search line and the sampling time and the length of the search line.

[0032] Exemplarily, the grayscale information corresponding to the multiple sampling times of the preset search line is arranged in time order to generate a spatiotemporal image. In the embodiment of the present application, the schematic diagram of the spatiotemporal image can be as follows: Figure 3 As shown, Figure 3 The t-axis in the figure represents time (number of frames), the x-axis represents the length of the search line, and the depth of the color in the figure represents the grayscale value of the pixel in the space-time image.

[0033] Step S103, Fourier transform the space-time image of the search line to obtain a two-dimensional autocorrelation function corresponding to the space-time image. The two-dimensional autocorrelation function of the space-time image is used to characterize the correlation between the grayscale value of each pixel point in the space-time image and the grayscale values ​​of other pixels.

[0034] Exemplarily, in an embodiment of the present application, the two-dimensional autocorrelation function of the space-time image can be calculated based on the Wiener-Hinking theorem, which states that the power spectral density of a signal is the square of the amplitude of the Fourier transform of the signal. The pixel matrix in the space-time image is Fourier transformed to obtain a two-dimensional spectrum, which characterizes the energy distribution of the space-time image at different spatial and temporal frequencies. The two-dimensional spectrum is inversely Fourier transformed to obtain a two-dimensional autocorrelation function, which can describe the similarity and predictability of the grayscale values ​​of pixels at different positions and times in the image.

[0035] Step S104, determining coordinate values ​​corresponding to a plurality of target pixel points in the spatiotemporal image whose correlation values ​​are greater than a preset value based on the two-dimensional autocorrelation function.

[0036] Exemplarily, the preset value can be any autocorrelation function value. The specific content of the preset value is not limited in the embodiment of the present application, and those skilled in the art can determine it according to the needs. In the embodiment of the present application, the preset value can include but is not limited to 0.4. In order to better determine the coordinate values ​​corresponding to multiple target pixel points whose correlation values ​​in the space-time image are greater than the preset value, the autocorrelation function image can be drawn based on the autocorrelation function, and the origin position is set to the maximum value point of the autocorrelation function, and the display is symmetrically expanded with it as the center, and different colors are used to characterize the size of the correlation value. It can better determine the multiple target pixel points in the space-time image whose correlation values ​​are greater than the preset value, and then determine the coordinate values ​​of the target pixel points. In the embodiment of the present application, the region of multiple target pixel points whose correlation values ​​in the autocorrelation function image are greater than the preset value can be called a large R value region.

[0037] Step S105 , performing coordinate conversion on the coordinate value corresponding to each target pixel point to obtain the polar coordinate value of each target pixel point.

[0038] Exemplarily, in an embodiment of the present application, in order to determine the stripe inclination angle of the large R value area corresponding to multiple target pixel points, the coordinates of each target pixel point are transformed into a coordinate system to obtain the polar coordinate value of each target pixel point.

[0039] Step S106, determining the water flow direction on the target river surface based on the polar coordinate value of each target pixel point.

[0040] As an optional implementation of the present invention, step S106 specifically includes:

[0041] Step a1, determining the inclination of the stripes in the spatiotemporal image based on the polar coordinate value of each pixel point in the target area. Exemplarily, in the embodiment of the present application, the inclination of the stripes in the spatiotemporal image can be obtained by calculating the following equations (1), (2) and (3);

[0042]

[0043] max(ρ)=min(max(τ x ), max(τ t )) (2)

[0044] Among them, R(ρ, θ) represents the polar coordinates of the target pixel, the absolute value R is the integral along the polar axis at different angles, R(ρ, θ) is the autocorrelation coefficient in polar coordinates, F(θ) is the integral of R(ρ, θ) at t different angles, τ x ,τ t Respectively represent the offset in the x and t directions in the space-time image matrix.

[0045] θ=argmax[F(θ)] (3)

[0046] Where arg represents the argument of the complex number. When θ is equal to the tilt angle of the large R value area, F(θ) reaches the maximum value P.

[0047] Step a2, determining the direction of water flow on the search line based on the inclination of the stripes in the space-time image. Exemplarily, in an embodiment of the present application, the direction of water flow on the search line is equal to the inclination of the stripes in the space-time image.

[0048] Step a3, determining the surface water flow direction of the target river based on the water flow direction on the search line.

[0049] Exemplarily, in an embodiment of the present application, the water flow direction on the target river surface is equal to the water flow direction on the search line.

[0050] Step S107, calculating the surface flow velocity of the target river according to the flow direction of the surface water of the target river, the spatiotemporal image of the search line, and the real distance information corresponding to each pixel point in the search line.

[0051] For example, in the embodiment of the present application, assuming that the distance that the water pattern flow feature moves along the search line within time T is L, and correspondingly, i pixels move within k frames in the phase plane coordinate system, the flow velocity on the search line can be calculated based on the following formula (4):

[0052]

[0053] Where θ represents the angle between the surface water flow direction of the target river and the reference direction. The reference direction can be determined based on the approximate direction of water flow. S x Indicates the real distance represented by each pixel (unit: m / pixel), and fps indicates the frame rate of the camera (unit: frame / s). The surface flow velocity of the target river can be determined based on the flow velocity on the search line.

[0054] The method for determining the surface velocity of a river provided by the present invention generates a spatiotemporal image of a preset search line in a target river, performs Fourier transformation on the spatiotemporal image, obtains a two-dimensional autocorrelation function of the spatiotemporal image, determines the coordinate values ​​corresponding to a plurality of target pixel points in the spatiotemporal image whose correlation values ​​are greater than a preset value based on the two-dimensional autocorrelation function, performs coordinate transformation on the coordinate values ​​corresponding to each target pixel point, obtains the polar coordinate value corresponding to each target pixel point, determines the surface flow direction of the target river based on the polar coordinate value of each target pixel point, and calculates the surface velocity of the target river based on the flow direction of the surface flow of the target river, the spatiotemporal image of the search line, and the real distance information corresponding to each pixel point in the search line. Through the method provided by the present invention, the autocorrelation function can be obtained by performing Fourier transformation on the spatiotemporal image, the inclination of the oblique stripes in the spatiotemporal image can be calculated based on the autocorrelation function, the inclination of the oblique stripes in the spatiotemporal image can be used to characterize the direction of the water flow, and the accurate calculation of the water flow direction is achieved, and the surface velocity of the river can be accurately calculated based on the water flow direction.

[0055] As an optional implementation of the present invention, after step 107, the method further includes: determining a flow value within a preset calculation interval according to a surface flow velocity of the target river and an area of ​​a preset calculation interval of the target river.

[0056] For example, the preset calculation interval can be an interval determined based on actual needs. The present application embodiment does not limit the specific content of the preset calculation interval, and those skilled in the art can determine it according to needs. In the present application embodiment, the flow value of the preset calculation interval in the target river can be calculated based on the velocity area method. The specific calculation process can be shown in the following formula (5):

[0057]

[0058] Where η represents the river surface velocity coefficient, V i Indicates the surface velocity of the preset calculation interval, A i Indicates the preset calculation interval area.

[0059] As an optional implementation of the present invention, step S101 specifically includes:

[0060] Step b1, obtaining video data of a preset position in a target river. Exemplarily, the video data of the preset position in the target river may be video data collected by a preset camera.

[0061] Step b2, determining a preset search line based on the video data. For example, the preset search line may be a straight line set along the flow direction of the river in the pre-collected video of the target river.

[0062] Step b3, based on the video data and the preset search line, determine the grayscale information corresponding to multiple sampling times of the preset search line in the target river. Exemplarily, the grayscale information corresponding to multiple sampling times of the preset search line in the target river can be the grayscale information of the preset search line in multiple frames of image data in the video data.

[0063] As an optional embodiment of the present invention, the two-dimensional autocorrelation function is obtained by the following formula:

[0064]

[0065] Among them, x represents the horizontal coordinate of the pixel point in the space-time image, t represents the vertical coordinate of the pixel point in the space-time image, f(x, t) represents the gray value of the pixel point in the space-time image, (τ x , τ t ) represents the offset parameter of the pixel point in the spatiotemporal image, R(τ x , τ t 0 is the two-dimensional autocorrelation function.

[0066] The embodiment of the present invention also discloses a device for determining the surface velocity of a river, such as Figure 4 As shown, the device includes: an acquisition module 201, which is used to obtain grayscale information corresponding to multiple sampling times of a preset search line in a target river. For details, please refer to the description corresponding to the above step S101, which will not be repeated here.

[0067] The generation module 202 is used to generate a spatiotemporal image of the search line based on the grayscale information corresponding to multiple sampling times of the preset search line. The spatiotemporal image is used to characterize the correlation between the grayscale value of each pixel point on the search line and the sampling time and the length of the search line. For details, please refer to the description corresponding to the above step S102, which will not be repeated here.

[0068] The first determination module 203 is used to perform Fourier transform on the space-time image of the search line to obtain a two-dimensional autocorrelation function corresponding to the space-time image. The two-dimensional autocorrelation function of the space-time image is used to characterize the correlation between the grayscale value of each pixel point in the space-time image and the grayscale values ​​of other pixels. For details, please refer to the description corresponding to the above step S103, which will not be repeated here.

[0069] The second determination module 204 is used to determine the coordinate values ​​corresponding to multiple target pixel points in the spatiotemporal image whose correlation values ​​are greater than a preset value based on the two-dimensional autocorrelation function. For details, please refer to the description corresponding to the above step S104, which will not be repeated here.

[0070] The coordinate conversion module 205 is used to perform coordinate conversion on the coordinate value corresponding to each target pixel point to obtain the polar coordinate value of each target pixel point. For details, please refer to the description corresponding to the above step S105, which will not be repeated here.

[0071] The third determination module 206 is used to determine the water flow direction on the target river surface based on the polar coordinate value of each target pixel point. For details, please refer to the description corresponding to the above step S106, which will not be repeated here.

[0072] The first calculation module 207 is used to calculate the surface flow velocity of the target river according to the flow direction of the surface water of the target river, the spatiotemporal image of the search line, and the real distance information corresponding to each pixel point in the search line. For details, please refer to the corresponding description of the above step S107, which will not be repeated here.

[0073] The river surface velocity determination device provided by the present invention generates a spatiotemporal image of a preset search line in a target river, performs Fourier transformation on the spatiotemporal image, obtains a two-dimensional autocorrelation function of the spatiotemporal image, determines the coordinate values ​​corresponding to a plurality of target pixel points in the spatiotemporal image whose correlation values ​​are greater than a preset value based on the two-dimensional autocorrelation function, performs coordinate transformation on the coordinate values ​​corresponding to each target pixel point, obtains the polar coordinate value corresponding to each target pixel point, determines the direction of water flow on the surface of the target river based on the polar coordinate value of each target pixel point, and calculates the surface velocity of the target river based on the flow direction of water flow on the surface of the target river, the spatiotemporal image of the search line, and the real distance information corresponding to each pixel point in the search line. Through the method provided by the present invention, the autocorrelation function can be obtained by performing Fourier transformation on the spatiotemporal image, the inclination of the oblique stripes in the spatiotemporal image can be calculated based on the autocorrelation function, the inclination of the oblique stripes in the spatiotemporal image can be used to characterize the direction of water flow, realizes the accurate calculation of the direction of water flow, and the surface velocity of the river can be accurately calculated based on the direction of water flow.

[0074] As an optional embodiment of the present invention, the device further includes: a second calculation module, which is used to determine the flow value within the preset calculation interval according to the surface flow velocity of the target river and the preset calculation interval area of ​​the target river.

[0075] As an optional embodiment of the present invention, an acquisition module includes: an acquisition submodule, used to acquire video data of a preset position in a target river; a first determination submodule, used to determine a preset search line based on the video data; and a second determination submodule, used to determine grayscale information corresponding to multiple sampling times of a preset search line in the target river based on the video data and the preset search line.

[0076] As an optional embodiment of the present invention, the third determination module includes: a third determination submodule, used to determine the inclination of stripes in the space-time image based on the polar coordinate value of each pixel point in the target area; determine the direction of water flow on the search line based on the inclination of stripes in the space-time image; a fourth determination submodule, used to determine the direction of water flow on the surface of the target river based on the water flow direction on the search line.

[0077] As an optional embodiment of the present invention, the two-dimensional autocorrelation function is obtained by the following formula:

[0078]

[0079] Among them, x represents the horizontal coordinate of the pixel point in the space-time image, t represents the vertical coordinate of the pixel point in the space-time image, f(x, t) represents the gray value of the pixel point in the space-time image, (τ x , τ t ) represents the offset parameter of the pixel point in the spatiotemporal image, R(τ x , τ t ) is the two-dimensional autocorrelation function.

[0080] The embodiment of the present invention further provides an electronic device, such as Figure 5 As shown, the electronic device may include a processor 401 and a memory 402, wherein the processor 401 and the memory 402 may be connected via a bus or other means. Figure 5 The example of connecting through bus is taken in the following.

[0081] The processor 401 may be a central processing unit (CPU). The processor 401 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above chips.

[0082] The memory 402 is a non-transient computer-readable storage medium that can be used to store non-transient software programs, non-transient computer executable programs and modules, such as program instructions / modules corresponding to the river surface velocity determination method in the embodiment of the present invention. The processor 401 executes various functional applications and data processing of the processor by running the non-transient software programs, instructions and modules stored in the memory 402, that is, the river surface velocity determination method in the above method embodiment is implemented.

[0083] The memory 402 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required by at least one function; the data storage area may store data created by the processor 401, etc. In addition, the memory 402 may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory 402 may optionally include a memory remotely arranged relative to the processor 401, and these remote memories may be connected to the processor 401 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0084] The one or more modules are stored in the memory 402, and when executed by the processor 401, the following is performed: Figure 1 A method for determining river surface velocity in the illustrated embodiment.

[0085] For details of the above electronic equipment, please refer to Figure 1 The corresponding related descriptions and effects in the illustrated embodiments can be understood and will not be repeated here.

[0086] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above-mentioned types of memory.

[0087] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A method for determining river surface velocity, characterized in that: include: Obtain grayscale information corresponding to multiple sampling times of a preset search line in a target river; Generate a spatiotemporal image of the search line based on the grayscale information corresponding to the multiple sampling times of the preset search line, wherein the spatiotemporal image is used to characterize the correlation between the grayscale value of each pixel point on the search line and the sampling time and the length of the search line; Performing Fourier transformation on the space-time image of the search line to obtain a two-dimensional autocorrelation function corresponding to the space-time image, wherein the two-dimensional autocorrelation function of the space-time image is used to characterize the correlation between the grayscale value of each pixel point in the space-time image and the grayscale values ​​of other pixels points; Determine, based on the two-dimensional autocorrelation function, coordinate values ​​corresponding to a plurality of target pixel points in the spatiotemporal image whose correlation values ​​are greater than a preset value; Perform coordinate conversion on the coordinate value corresponding to each target pixel point to obtain the polar coordinate value of each target pixel point; Determine the direction of water flow on the surface of the target river based on the polar coordinate value of each target pixel point; Calculate the surface flow velocity of the target river according to the surface water flow direction of the target river, the spatiotemporal image of the search line, and the real distance information corresponding to each pixel point in the search line; Determine the water flow direction on the target river surface based on the polar coordinate value of each pixel point in the target area, including: The inclination of the stripes in the spatiotemporal image is determined based on the polar coordinate value of each pixel point in the target area. The inclination of the stripes in the spatiotemporal image is determined by the following formula: in, is the autocorrelation coefficient in polar coordinates, and F(θ) is The integral over t different angles, τ x ,τ t They represent the offsets in the x and t directions in the space-time image matrix, respectively, and arg represents the argument of the complex number; Determining the direction of water flow on the search line based on the inclination of the stripes in the spatiotemporal image; Determine the surface water flow direction of the target river based on the water flow direction on the search line; Determining coordinate values ​​corresponding to a plurality of target pixel points in the spatiotemporal image whose correlation values ​​are greater than a preset value based on the two-dimensional autocorrelation function includes: Drawing an autocorrelation function image based on the autocorrelation function, wherein the autocorrelation function image is an image symmetrically unfolded with the origin as the center, and the magnitude of the correlation value is represented by different colors, and the origin is the maximum value point of the autocorrelation function; Determine a large R value region in the autocorrelation function image, wherein the large R value region is used to characterize a region of a plurality of target pixel points in the correlation function image whose correlation values ​​are greater than a preset value; Determine coordinate values ​​corresponding to a plurality of target pixel points in the spatiotemporal image whose correlation values ​​are greater than a preset value based on the large R value region; The two-dimensional autocorrelation function is obtained by the following formula: Where x represents the horizontal coordinate of the pixel point in the space-time image, t represents the vertical coordinate of the pixel point in the space-time image, and f (x, t) represents the grayscale value of the pixel point in the space-time image. Represents the offset parameter of the pixel point in the spatiotemporal image, R is the two-dimensional autocorrelation function.

2. The method according to claim 1, characterized in that After calculating the surface flow velocity of the target river according to the flow direction of the surface water of the target river, the spatiotemporal image of the search line, and the real distance information corresponding to each pixel point in the search line, the method further includes: The flow value within the preset calculation interval is determined according to the surface flow velocity of the target river and the preset calculation interval area of ​​the target river.

3. The method according to claim 1, characterized in that The step of obtaining grayscale information corresponding to a plurality of sampling times of a preset search line in the target river includes: Obtain video data of a preset position in a target river; determining a preset search line based on the video data; Grayscale information corresponding to a plurality of sampling times of a preset search line in the target river is determined based on the video data and the preset search line.

4. A device for determining river surface velocity, characterized in that: include: An acquisition module, used to acquire grayscale information corresponding to multiple sampling times of a preset search line in a target river; A generating module, for generating a spatiotemporal image of the search line based on the grayscale information corresponding to the plurality of sampling times of the preset search line, wherein the spatiotemporal image is used to characterize the correlation between the grayscale value of each pixel point on the search line and the sampling time and the length of the search line; A first determination module is used to perform Fourier transform on the space-time image of the search line to obtain a two-dimensional autocorrelation function corresponding to the space-time image, wherein the two-dimensional autocorrelation function of the space-time image is used to characterize the correlation between the grayscale value of each pixel point in the space-time image and the grayscale values ​​of other pixels; A second determination module, configured to determine coordinate values ​​corresponding to a plurality of target pixel points in the spatiotemporal image whose correlation values ​​are greater than a preset value based on the two-dimensional autocorrelation function; A coordinate conversion module, used to convert the coordinate value corresponding to each target pixel point to obtain the polar coordinate value of each target pixel point; A third determination module is used to determine the surface water flow direction of the target river based on the polar coordinate value of each target pixel point; A first calculation module is used to calculate the surface flow velocity of the target river according to the water flow direction of the target river surface, the spatiotemporal image of the search line, and the real distance information corresponding to each pixel point in the search line; Determine the water flow direction on the target river surface based on the polar coordinate value of each pixel point in the target area, including: Determine the inclination of the stripes in the space-time image based on the polar coordinate value of each pixel point in the target area, and the inclination of the stripes in the space-time image is determined by the following formula; in, is the autocorrelation coefficient in polar coordinates, and F(θ) is The integral over t different angles, τ x ,τ t Respectively represent the offset in the x and t directions in the space-time image matrix, arg represents the argument of the complex number, Indicates the inclination of stripes in the space-time image; Determining the direction of water flow on the search line based on the inclination of the stripes in the spatiotemporal image; Determine the surface water flow direction of the target river based on the water flow direction on the search line; Determining coordinate values ​​corresponding to a plurality of target pixel points in the spatiotemporal image whose correlation values ​​are greater than a preset value based on the two-dimensional autocorrelation function includes: Drawing an autocorrelation function image based on the autocorrelation function, wherein the autocorrelation function image is an image symmetrically unfolded with the origin as the center, and the magnitude of the correlation value is represented by different colors, and the origin is the maximum value point of the autocorrelation function; Determine a large R value region in the autocorrelation function image, wherein the large R value region is used to characterize a region of a plurality of target pixel points in the correlation function image whose correlation values ​​are greater than a preset value; Determine coordinate values ​​corresponding to a plurality of target pixel points in the spatiotemporal image whose correlation values ​​are greater than a preset value based on the large R value region; The two-dimensional autocorrelation function is obtained by the following formula: Where x represents the horizontal coordinate of the pixel point in the space-time image, t represents the vertical coordinate of the pixel point in the space-time image, and f (x, t) represents the grayscale value of the pixel point in the space-time image. Represents the offset parameter of the pixel point in the spatiotemporal image, R is the two-dimensional autocorrelation function.

5. The device according to claim 4, characterized in that The device also includes: The second calculation module is used to determine the flow value within the preset calculation interval according to the surface flow velocity of the target river and the preset calculation interval area of ​​the target river.

6. The device according to claim 4, characterized in that The acquisition module comprises: An acquisition submodule is used to acquire video data of a preset position in a target river; A first determining submodule, configured to determine a preset search line based on the video data; The second determining submodule is used to determine the grayscale information corresponding to multiple sampling times of the preset search line in the target river based on the video data and the preset search line.

7. An electronic device, characterized in that: include: at least one processor; And a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor executes the river surface flow velocity determination method as described in any one of claims 1-3.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for determining the river surface velocity according to any one of claims 1 to 3 is implemented.

Citation Information

Patent Citations

  • Fluid motion vector estimation method based on space-time image

    CN103996171A

  • Time-space image speed measuring system and method based on auxiliary laser calibration

    CN104777327A

  • River surface mean velocity measuring device and method

    CN106841673A

  • Scene switching detection method and device, electronic equipment and storage medium

    CN110675371A

  • River surface flow velocity estimation method based on optical flow calculation and readable storage medium

    CN113012195A