River surface flow velocity measurement method based on point diffusion estimation

文档序号:404696 发布日期:2021-12-17 浏览:12次 中文

阅读说明:本技术 一种基于点扩散估计的河流表面流速测量方法 (River surface flow velocity measurement method based on point diffusion estimation ) 是由 赵小楠 高明 王建华 尹青山 于 2021-09-17 设计创作,主要内容包括:本发明提供了一种基于点扩散估计的河流表面流速测量方法。首先通过对河流表面流动情况进行摄像头的视频采集工作,然后对采集视频进行预处理,使用表示全部图像像素运动的光流信息对河流表面流动速度及方向进行估计和基于点扩散估计的光流可视化的显示。本发明在光流场的计算与二维速度场的可视化模型展示中,采用基于点扩散估计的思想,以像素点为中心向四周扩散,将河流根据宽度垂直分段,测点按等距离分布,分别对每一垂直段的光流场中的速度矢量进行平均计算。(The invention provides a river surface flow velocity measuring method based on point spread estimation. Firstly, video acquisition work of a camera is carried out on the flowing condition of the river surface, then the acquired video is preprocessed, and optical flow information representing all image pixel motion is used for estimating the flowing speed and direction of the river surface and displaying the optical flow visualization based on point diffusion estimation. In the calculation of the optical flow field and the visualization model display of the two-dimensional velocity field, the idea based on point diffusion estimation is adopted, the pixel points are used as the centers to diffuse towards the periphery, the river is vertically segmented according to the width, the measuring points are distributed at equal intervals, and the velocity vector in the optical flow field of each vertical segment is respectively and evenly calculated.)

1. A river surface flow velocity measurement method based on point spread estimation is characterized by comprising the following steps:

1) acquiring a video image in a certain area of the river surface through an infrared camera, transmitting the video image to a laboratory operation center, processing the video image on the river surface into a static image and preprocessing the static image;

2) extracting optical flow information of the static images on the surface of the river frame by a FarneBack algorithm;

3) vertically segmenting the river according to the width, distributing measuring points at equal intervals, and respectively carrying out average calculation on the velocity vector in the optical flow field of each vertical segment;

4) and performing visual output and actual flow rate estimation calculation output on the result.

2. A river surface flow velocity measurement method based on point spread estimation according to claim 1, wherein the FarneBack algorithm is specifically as follows: performing polynomial expansion on the coordinate position of each pixel point through the neighborhood information of the pixel point to obtain an original coordinate (x)0,y0) And (3) taking the new coordinate (x, y) as an independent variable, and substituting the new coordinate (x, y) into the polynomial of the dependent variable, and solving the movement amount of the pixel point in the x and y directions by substituting the coordinate data to obtain a displacement vector of each pixel point, wherein the displacement vector comprises amplitude and phase.

3. The river surface flow velocity measurement method based on point spread estimation according to claim 2, wherein the two-dimensional flow field visualization specifically comprises: the amplitude and phase information of the displacement vector of each pixel point is converted into H, S, V three-channel information of color space, and the motion condition of an object or a scene can be qualitatively described in a video stream.

4. The river surface flow velocity measurement method based on point spread estimation according to claim 2, wherein the two-dimensional flow field visualization specifically comprises: calculating the displacement of each pixel point which changes in two frames before and after each pixel point and displaying a speed field through the Euclidean distance, wherein the displacement of each pixel point is obtained according to the following formula, wherein the direction and the size of the speed are included;

where A represents a symmetric matrix of size 2X 2 and b is a 2X 1 matrix.

Technical Field

The invention relates to a river surface flow velocity measurement method based on point spread estimation, and belongs to the technical field of computer vision, light flow estimation and river velocity measurement.

Background

In the stage of wisdom water conservancy is emerging and developing, computer vision technology combines hydrology and hydromechanics subject to constantly developing in the aspect of fluid motion research. River flow velocity is the key for acquiring hydrological information, and is more suitable for extreme environment flow measuring conditions by image method speed measurement based on visual images, and surface flow velocity estimation based on image optical flow information frees the investment of a large amount of manpower and material resources, and is favorable for realizing monitoring and analysis of hydrological information in time periods which are not easy to observe and measure manually such as at night.

In the cross section of a natural river, the flow velocity shows a non-uniform distribution trend, the flow velocity of the bottom layer water flow is small due to the existence of the friction force of the river bed, then the flow velocity of the river is increased from the water bottom to the water surface, and the flow velocity is reduced due to the contact of the water surface with air, so the maximum flow velocity of the river is positioned slightly below the water surface. In terms of transverse distribution, the water velocity of the river from the edge of the river bank to the center of the river is different on a vertical section, the flow velocity of the two banks is the minimum, and the flow velocity of the river center is the maximum. To estimate the surface motion direction and water speed more accurately.

Disclosure of Invention

The invention aims to provide a river surface flow velocity measuring method based on point diffusion estimation, which can accurately estimate the flow surface motion direction and the water velocity.

In order to achieve the purpose, the invention is realized by the following technical scheme:

a river surface flow velocity measurement method based on point spread estimation comprises the following steps:

1) acquiring a video image in a certain area of the river surface through an infrared camera, transmitting the video image to a laboratory operation center, processing the video image on the river surface into a static image and preprocessing the static image;

2) extracting optical flow information of the static images on the surface of the river frame by a FarneBack algorithm;

3) vertically segmenting the river according to the width, distributing measuring points at equal intervals, and respectively carrying out average calculation on the velocity vector in the optical flow field of each vertical segment;

4) and performing visual output and actual flow rate estimation calculation output on the result.

Preferably, the FarneBack algorithm is specifically as follows: by each timePerforming polynomial expansion on the coordinate position of the pixel point by using the neighborhood information of the pixel point to obtain an original coordinate (x)0,y0) The new coordinate (x, y) is a polynomial of a dependent variable, and is substituted into coordinate data to obtain the movement amount of the pixel point in the x and y directions to obtain a displacement vector of each pixel point, wherein the displacement vector comprises amplitude and phase;

preferably, the two-dimensional flow field visualization specifically includes: the amplitude and phase information of the displacement vector of each pixel point is converted into H, S, V three-channel information of color space, and the motion condition of an object or a scene can be qualitatively described in a video stream.

Preferably, the two-dimensional flow field visualization specifically includes: calculating the displacement of each pixel point which changes in two frames before and after each pixel point and displaying a speed field through the Euclidean distance, wherein the displacement of each pixel point is obtained according to the following formula, wherein the direction and the size of the speed are included;

where A represents a symmetric matrix of size 2X 2 and b is a 2X 1 matrix.

The invention has the advantages that: the method adopts the idea of point diffusion estimation, spreads around the pixel point as the center, vertically segments the river according to the width, distributes the measuring points at equal intervals, respectively carries out average calculation on the velocity vector in the optical flow field of each vertical segment, and accurately estimates the surface motion direction and the water velocity of the water flow.

Drawings

The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the principles of the invention and not to limit the invention.

FIG. 1 is a schematic view of the flow structure of the present invention.

Detailed Description

The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

The river surface flow velocity measurement and visual display method based on dense optical flow calculation of point diffusion estimation provided by the invention firstly needs to obtain a video image in a certain area of a river surface through an infrared camera, transmits the video image to a laboratory operation center, adopts the idea based on point diffusion estimation, takes pixel points as the center to diffuse towards the periphery, vertically segments the river according to the width, distributes measuring points at equal intervals, respectively carries out average calculation on velocity vectors in an optical flow field of each vertical segment, and realizes the result of calculating a two-dimensional flow velocity field by different weight combinations.

The FarneBack dense optical flow algorithm carries out polynomial expansion on the coordinate position of each pixel point through neighborhood information (the weight value is determined by the size and the position of the pixel value of the neighborhood pixel point) of the pixel point to obtain an original coordinate (x)0,y0) The new coordinate (x, y) is a polynomial of a dependent variable as an independent variable, and is substituted into coordinate data to calculate the movement amount of the pixel point in the x and y directions. Therefore, the displacement vector of each pixel point can be obtained, and the displacement vector comprises amplitude and phase. In general, two-dimensional flow field visualization is to convert amplitude and phase information of each pixel displacement vector into H, S, V three-channel information of color space, and qualitatively describe the motion condition of an object or a scene in a video stream, and another two-dimensional flow field visualization mode is to calculate and display a velocity field including the direction and magnitude of the velocity for each pixel displacement changed between two frames in front and back through Euclidean distance. Gradient constancy and local optical flow constancy of the image are the prerequisite for the algorithmic reasoning.

When the displacement estimation of each pixel point is carried out, the expansion of the polynomial is considered to be in the neighborhood of one pixel, and if the pixel is subjected to the moving displacement d, the whole polynomial is changed into:

f1(x)=xTA1x+b1 Tx+c1

therefore, after the pixel is moved,

f2(x)=f1(x-d)

=(x-d)TA1(x-d)+b1 T(x-d)+c1

=xTA2x+b2 Tx+c2

wherein the content of the first and second substances,

A2=A1,b2=b1-2A1d,c2=dTA1d-b1 Td+c1

if A is1Is non-singular, then it is given by the second equation:

in practical cases, A is not fully satisfied2=A1Thus using an approximation of the mean value instead of the true value, let

Then there are:

A(x)d(x)=Δb(x)

d=(ATA)-1(ATΔb)

by optimizing the constructed objective function, the displacement is solved,

e(x)=||Ad-Δb||2

the final result of this objective function is noisy in the image, so we can use the neighborhood of the pixel point of interest and then use the weighted objective function, i.e.:

therefore, the displacement of each pixel point movement is obtained.

The FarneBack optical flow calculation based on point diffusion estimation has two visualization models, firstly, each pixel point of an image is tracked and detected and an optical flow field is calculated on the basis of a FarneBack optical flow method, as an RGB color space faces a computer and an HSV color space faces a user, an optical flow vector generated by each pixel point is displayed by using the HSV color visualization model, and the color represents the direction of the optical flow vector and the size of a light and shade representative vector.

The S channel of the HSV model is assigned to be 255, namely the saturation is 100%, the radian of the optical flow vector is converted into an angle, the optical flow vector is assigned to be an H channel, namely the direction of the vector is represented by color, the V channel represents the size of the vector, and finally the optical flow vector field is converted into a visual HSV image and then converted into an RGB image.

Estimation calculation is carried out on two adjacent frames, the river surface speed of 60s video in video7_20190918 is taken as an average value of the water speed of 20 sampling points at intervals (sampling is carried out at every 3 s), the 1 st, 76 th, 151 th, 226 th, 301 th, 376 th, 451 th, 526 th, 601 th, 676 th, 751 th, 826 th, 901 th, 976 th, 1051 th, 1126 th, 1201 th, 1276 th, 1351 st and 1426 th frame time points are measured respectively, and the interval between the two frames is 0.04 s. And respectively carrying out qualitative estimation and quantitative calculation by using an HSV color space visualization model and a velocity vector field visualization model.

6页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:基于感兴趣区域的电化学扫描成像方法、装置及介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!