Channel flow measuring method and device based on bionic eagle eye vision

Through bionic eagle eye vision technology, the optical flow value and water level recognition model, combined with the surface section flow velocity coupling model, solve the problem of low accuracy of channel flow measurement and achieve efficient and accurate channel flow measurement.

CN118570700AActive Publication Date: 2024-08-30CHINA AGRI UNIV

Patent Information

Application Number
CN202410701616.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-31
Publication Date
2024-08-30
Estimated Expiration
2044-05-31

AI Technical Summary

Technical Problem

Existing channel flow measurement methods have problems with low accuracy, which are especially affected by weather, temperature, water quality and other factors, resulting in inaccurate data.

Method used

The channel flow measurement method based on bionic eagle eye vision is used to obtain the channel flow video, calculate the optical flow value and spatial resolution, and combine the pre-trained surface section flow velocity coupling model to calculate the channel flow, using the optical flow method and water level identification model Improve measurement accuracy.

Benefits of technology

It achieves high-precision channel flow measurement, simplifies the flow measurement process, reduces errors, and improves measurement efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118570700A
    Figure CN118570700A
Patent Text Reader

Abstract

The invention provides a channel flow measuring method and device based on bionic eagle eye vision, and the method comprises the steps: obtaining a channel flow video, and carrying out the image frame interval extraction of the channel flow video, and obtaining a target observation image; calculating to obtain an optical flow value of the target observation image, and calculating to obtain a surface layer flow velocity value of the target observation image in a world coordinate system based on position change information of the optical flow value of the target observation image between the image frames and the spatial resolution of the target observation image; acquiring section average flow velocity based on a pre-trained surface section flow velocity coupling model, and calculating channel flow based on the section average flow velocity and the section water level value; wherein the surface section flow velocity coupling model is obtained by fitting surface flow velocity values under a world coordinate system based on a flow velocity distribution formula and training according to a surface flow velocity distribution rule and a perpendicular bisector flow velocity distribution rule. The channel flow is calculated through the method, the method is simple, and the measurement precision is high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of channel flow measurement, and in particular to a channel flow measurement method and device based on bionic eagle eye vision. Background Art

[0002] Food safety is the basic guarantee of national security, and water safety is the foundation of food safety. Channel flow monitoring is the key to quantitative management of water resources. Real-time online monitoring of channel flow can provide real-time information on the water consumption of irrigation areas, which is of great significance for controlling water use or water transfer, and facilitates the overall management of irrigation areas.

[0003] At present, water measurement measures are mainly divided into five categories, mainly flow meter water measurement, standard section water measurement, culvert water measurement and inverted siphon water measurement and other building water measurement, Parshall flume and water sill and other weir water measurement, water level and flow and other instrument water measurement, but due to the gap between the actual situation of the building and the theoretical conditions, it is easy to produce flow deviation, and the cost of building water measurement equipment is high, the later maintenance cost is high, and there are requirements for the flow state during flow measurement. The existing non-contact flow measurement method may be affected by factors such as weather, temperature, objects in the river, water quality, etc., and the measurement accuracy may be affected, resulting in inaccurate data.

[0004] How to improve the measurement accuracy of channel flow is a technical problem that needs to be solved at present. Summary of the invention

[0005] The invention provides a channel flow measurement method and device based on bionic eagle eye vision, which are used to solve the defects in the prior art.

[0006] The present invention provides a channel flow measurement method based on bionic eagle eye vision, comprising: Acquire a channel flow video, and perform image frame interval extraction on the channel flow video to obtain a target observation image; The optical flow value of the target observation image is calculated, and the surface flow velocity value of the target observation image in the world coordinate system is calculated based on the position change information of the optical flow value of the target observation image between image frames and the spatial resolution of the target observation image; wherein the position change information is used to indicate the change of the pixel points in the target observation image in the time domain; The average flow velocity of the section is obtained based on the pre-trained surface section flow velocity coupling model, and the channel flow is calculated based on the average flow velocity of the section and the water level value of the section; wherein the surface section flow velocity coupling model is: based on the flow velocity distribution formula, the surface flow velocity value in the world coordinate system is fitted, and the surface water flow velocity distribution law and the median vertical line velocity distribution law are constructed, and the surface flow velocity distribution law and the median vertical line velocity distribution law are trained; the section water level value is calculated based on the pre-acquired water shoreline image.

[0007] According to a channel flow measurement method based on bionic eagle eye vision provided by the present invention, the image frame interval extraction of the channel flow video is performed to obtain a target observation image, including: Performing image frame interval extraction and image enhancement preprocessing on the channel flow video to obtain an initial observation image; Perform background segmentation processing on the initial observation image to obtain the target observation image.

[0008] According to a channel flow measurement method based on bionic eagle eye vision provided by the present invention, the optical flow value of the target observation image is calculated, and based on the position change information of the optical flow value of the target observation image between image frames and the spatial resolution of the target observation image, the surface flow velocity value of the target observation image in the world coordinate system is calculated, including: Calculate the optical flow value of the target observation image, and calculate the surface flow velocity value of the target observation image in the pixel coordinate system based on the position change information of the optical flow value of the target observation image between image frames; Based on the spatial resolution of the target observation image and the surface flow velocity value of the target observation image in the pixel coordinate system, the surface flow velocity value of the target observation image in the world coordinate system is calculated.

[0009] According to a channel flow measurement method based on bionic eagle eye vision provided by the present invention, before obtaining the average flow velocity of the section based on the pre-trained surface section flow velocity coupling model, the method further includes: Based on the surface flow velocity value in the world coordinate system, the optimal frame image and the reference line position are determined in the target observation image; based on the optimal frame image and the reference line position, the local channel flow field is obtained, and the flow velocity is fitted for the local channel flow field to obtain a flow velocity distribution formula.

[0010] According to a channel flow measurement method based on bionic eagle eye vision provided by the present invention, the average flow velocity of the section is obtained based on the pre-trained surface section flow velocity coupling model, including: Determine a plurality of target normal points based on the reference line position, and segment the channel by using a plurality of vertical lines where the plurality of target normal points are located as symmetry axes of the segmentation surface; The average flow velocity of each vertical line is calculated based on the surface cross-section flow velocity coupling model, and the average flow velocity of each vertical line is calculated by weighted average method to obtain the cross-section average flow velocity.

[0011] According to a channel flow measurement method based on bionic eagle eye vision provided by the present invention, before calculating the channel flow based on the average flow velocity of the section and the water level value of the section, the method further includes: Acquire a historical water shoreline video, and stitch and integrate images extracted from the historical water shoreline video to obtain a historical water shoreline image; The bionic eagle-eye vision model is trained by the historical water shoreline image to obtain a water level recognition model; wherein the water level recognition model includes a backbone network and a neck network, the backbone network is used to extract feature information from the water shoreline image and provide the feature information to the neck network, and the neck network is used to perform feature fusion on the feature information.

[0012] According to a channel flow measurement method based on bionic eagle eye vision provided by the present invention, before calculating the channel flow based on the average flow velocity of the section and the water level value of the section, the method further includes: A water area shoreline video is obtained, and the water area shoreline video is input into the water level recognition model to obtain the cross-sectional water level value.

[0013] The present invention also provides a channel flow measurement device based on bionic eagle eye vision, comprising: An extraction module is used to obtain a channel flow video and perform image frame interval extraction on the channel flow video to obtain a target observation image; A first calculation module is used to calculate the optical flow value of the target observation image, and calculate the surface flow velocity value of the target observation image in the world coordinate system based on the position change information of the optical flow value of the target observation image between image frames and the spatial resolution of the target observation image; wherein the position change information is used to indicate the change of the pixel points in the target observation image in the time domain; The second calculation module is used to obtain the average flow velocity of the section based on the pre-trained surface section flow velocity coupling model, and calculate the channel flow based on the average flow velocity of the section and the water level value of the section; wherein the surface section flow velocity coupling model is: based on the flow velocity distribution formula, the surface flow velocity value in the world coordinate system is fitted, and the surface water flow velocity distribution law and the median vertical line velocity distribution law are constructed, and the surface flow velocity distribution law and the median vertical line velocity distribution law are trained; the section water level value is calculated based on the pre-acquired water area shoreline image.

[0014] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a channel flow measurement method based on bionic eagle eye vision as described above is implemented.

[0015] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the channel flow measurement method based on bionic eagle eye vision as described in any one of the above is implemented.

[0016] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the channel flow measurement method based on bionic eagle eye vision as described in any one of the above is implemented.

[0017] The present invention provides a channel flow measurement method and device based on bionic eagle-eye vision, which obtains a channel flow video and extracts image frame intervals from the channel flow video to obtain a target observation image; calculates the optical flow value of the target observation image, and calculates the surface flow velocity value of the target observation image in a world coordinate system based on the position change information of the optical flow value of the target observation image between image frames and the spatial resolution of the target observation image; wherein the position change information is used to indicate the change of pixel points in the target observation image in the time domain; obtains the average flow velocity of the section based on a pre-trained surface section flow velocity coupling model, and calculates the channel flow based on the average flow velocity of the section and the water level value of the section; wherein the surface section flow velocity coupling model is: fitting the surface flow velocity value in the world coordinate system based on the flow velocity distribution formula, constructing the surface water flow velocity distribution law and the median vertical line flow velocity distribution law, and training according to the surface flow velocity distribution law and the median vertical line flow velocity distribution law; the section water level value is calculated based on the pre-acquired water shoreline image. It can be seen that the present invention acquires the average flow velocity of the cross section by collecting local channel flow videos to infer the global area, and calculates the channel flow according to the average flow velocity of the cross section. The method is simple and has high measurement accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0019] Figure 1 It is a schematic flow chart of a channel flow measurement method based on bionic eagle eye vision provided by the present invention; Figure 2 It is a schematic diagram of the bionic eagle eye vision function provided by the present invention; Figure 3 It is a schematic diagram of channel video flow measurement frame image segmentation provided by the present invention; Figure 4 It is a schematic diagram of the normal line and area segmentation of the selected points of the channel section provided by the present invention; Figure 5 It is a schematic diagram comparing the channel optical flow value speed and the measured speed provided by the present invention; Figure 6 It is a schematic diagram comparing the measured value and the calculated value of the flow velocity of the vertical line in the cross section provided by the present invention; Figure 7 It is a schematic diagram of the flow velocity distribution formula of each normal line of the cross section provided by the present invention; Figure 8 It is a schematic diagram comparing the flow velocity predicted by the optical flow method reference line provided by the present invention and the flow velocity at the actual position; Fig. 9 It is a schematic diagram comparing the global reference line flow velocity and the true value flow velocity measured by the optical flow method provided by the present invention; Fig.10 It is a schematic diagram of identifying a water level line by a water level identification model provided by the present invention; Fig.11 It is a schematic diagram for comparing the calculated value and the measured value of the channel water level based on the bionic eagle eye vision provided by the present invention; Fig.12 It is a complete flow chart of the channel flow measurement method based on bionic eagle eye vision provided by the present invention; Fig.13 It is a structural schematic diagram of a channel flow measurement device based on bionic eagle eye vision provided by the present invention; Fig.14 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0020] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are 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.

[0021] Combine the following Figure 1-Figure 14 The invention describes a channel flow measurement method and device based on bionic eagle eye vision.

[0022] Figure 1 is a flow chart of a channel flow measurement method based on bionic eagle eye vision provided in this embodiment, such as Figure 1 As shown, the channel flow measurement method based on bionic eagle eye vision provided in this embodiment includes: Step 100: Acquire channel flow video, and perform image frame interval extraction on the channel flow video to obtain a target observation image.

[0023] It should be noted that at the same time, the human eye can only pay attention to a small part of the field of vision. When the eagle's attention is divided, it can quickly find multiple targets, use its own visual advantage to lock the target at a very long distance, and estimate the distance in order to hunt. Figure 2 is a schematic diagram of the bionic eagle eye vision function provided by this embodiment, such as Figure 2 As shown, in this embodiment, the camera simulates the foveal structure of the eagle eye to collect video images, and the channel flow video obtained by the collection is a local video of the channel.

[0024] Specifically, step 100 includes: Step 110, performing image frame interval extraction and image enhancement preprocessing on the channel flow video to obtain an initial observation image; Step 120: Perform background segmentation processing on the initial observation image to obtain the target observation image.

[0025] In one embodiment, a monocular camera is used to collect local video of the channel surface flow, and the collected local channel video is preprocessed to generate a data set. Frame image extraction is performed on the local channel video obtained above, and image enhancement processing such as denoising is performed on the extracted image, and the channel water flow and background in the image are segmented. Figure 3 Schematic diagram of channel video flow frame image segmentation provided by this embodiment. Figure 3As shown in the figure, each frame of the image is segmented by dynamic thresholding to separate the channel water flow and background. Because the water flow pixels in the channel are different from the background pixels, by setting different feature thresholds, the image pixels are divided into several categories, and a set of thresholds related to the pixel position (i.e., the threshold is a function of the coordinates) is used to segment each part of the image.

[0026] Step 200, calculate the optical flow value of the target observation image, and calculate the surface flow velocity value of the target observation image in the world coordinate system based on the position change information of the optical flow value of the target observation image between image frames and the spatial resolution of the target observation image; wherein the position change information is used to indicate the change of the pixel points in the target observation image in the time domain.

[0027] Specifically, step 200 includes: Step 210: Calculate the optical flow value of the target observation image, and calculate the surface flow velocity value of the target observation image in the pixel coordinate system based on the position change information of the optical flow value of the target observation image between image frames; Step 220: Calculate the surface flow velocity value of the target observation image in the world coordinate system based on the spatial resolution of the target observation image and the surface flow velocity value of the target observation image in the pixel coordinate system.

[0028] In one embodiment, the optical flow method is used to measure the flow rate on the channel surface. The optical flow of all points in the target observation image is detected, and the flow rate is measured by using the movement of the optical flow points between the surface frame image and the second frame image. First, a Gaussian pyramid is established for each frame of the image, with the lowest resolution image at the top layer and the original image at the bottom layer. The optical flow on the top layer image of the pyramid is calculated starting from the top layer. Then, the initial value of the optical flow of the second top layer is estimated based on the calculation result of the optical flow of the top layer (Lm-1), and then the precise value of the optical flow on the image of the second top layer is calculated. Finally, the initial value of the optical flow of the next layer (Lm-2) is estimated based on the calculation result of the optical flow of the next upper layer, and its precise value is calculated and then fed back to the next layer until the optical flow of the original image of the bottom layer is calculated.

[0029] Among them, the optical flow method is used to calculate the optical flow value of the target observation image, and the flow velocity is calculated according to the movement of the optical flow value of the flow measurement image between image frames, and the flow velocity value in the pixel coordinate system is obtained as u. After that, the pixel coordinate conversion is performed. First, each frame of the collected data set is converted into the HSV format to calculate the flow velocity. The flow velocity measured by the optical flow method is converted through angles and pixels. Then, the actual flow velocity of the test point of the channel in the world coordinate is selected, and the flow velocity measured by the optical flow method is compared with the flow velocity in the world coordinate. The spatial conversion rate of the image is used to convert the channel surface flow velocity value in the pixel coordinate system into the channel surface layer flow velocity value in the world coordinate system, and the HSV format is converted into the BGR format to display the surface layer flow velocity value.

[0030] Step 300, based on the pre-trained surface section velocity coupling model, the average flow velocity of the section is obtained, and based on the average flow velocity of the section and the water level value of the section, the channel flow is calculated; wherein the surface section velocity coupling model is: based on the velocity distribution formula, the surface velocity value in the world coordinate system is fitted, and the surface water flow velocity distribution law and the median velocity distribution law are constructed, which are trained according to the surface velocity distribution law and the median velocity distribution law; the section water level value is calculated based on the pre-acquired water shoreline image.

[0031] It should be noted that, before step 300, the method further includes: Determining an optimal frame image and a reference line position in the target observation image based on the surface flow velocity value; A local channel flow field is obtained based on the optimal frame image and the reference line position, and flow velocity fitting is performed on the local channel flow field to obtain a flow velocity distribution formula.

[0032] Specifically, the optimal frame image and reference line position are extracted from all surface velocity values ​​in the world coordinate system through the formula, and the calculation formula is as follows: y=ax+b in, b = optical flow point starting array - a*real position starting one-bit array, x is the real point position, y is the predicted point position.

[0033] It should be noted that due to the different widths of different channels and the limited acquisition range of the camera, it is difficult to obtain the global flow field. Therefore, the local video flow field is output according to the optimal frame image and reference line position obtained above, and the flow velocity is fitted to obtain the flow velocity distribution model, and the global flow field is calculated according to the symmetry of the channel.

[0034] For wide and shallow channels, the velocity distribution formula of the median vertical line is the same as the velocity distribution formula obtained by fitting the surface velocity. The velocity distribution formula is as follows: u=Alny+B Where A is Au * , B is B is the correlation coefficient; u * is the local friction velocity; ν is the kinematic viscosity coefficient of water; y is the distance from each point on the vertical line of the channel to the side wall; K is the Karman coefficient.

[0035] The values ​​of correlation coefficients A and B can be determined by fitting a large number of experimental results.

[0036] Specifically, in step 300, the average flow velocity of the cross section is obtained based on the pre-trained surface cross section flow velocity coupling model, including: step 310, determining a plurality of target normal points based on the reference line position, and using a plurality of vertical lines where the plurality of target normal points are located as symmetry axes of the segmentation surface to segment the channel; Step 320: Calculate the average velocity of each vertical line based on the surface cross-section velocity coupling model, and calculate the average velocity of each vertical line by weighted average method to obtain the cross-section average velocity.

[0037] It should be noted that since the average velocity of the vertical section of the channel is equal to the average velocity from the center point to the side wall, the channel velocity distribution formula obtained at the reference line position is the same as the velocity distribution formula at the vertical section position, so the surface section velocity coupling model is established. Then the normal point is selected according to the reference line position. The measurement channel is a symmetrical channel, and the global velocity is calculated using the above velocity distribution formula to select the normal point. Figure 4 is a schematic diagram of the normal line and area segmentation of the channel section selected by this embodiment. Figure 4 The five normal point positions shown output the flow velocity at that point.

[0038] Figure 5 : is a schematic diagram comparing the channel optical flow value speed and the measured speed provided by this embodiment, Figure 6 : is a schematic diagram comparing the measured value and the calculated value of the flow velocity of the vertical line of the cross section provided in this embodiment, Figure 7 is a schematic diagram of the flow velocity distribution formula of each normal line of the cross section provided in this embodiment, Figure 8 : is a schematic diagram comparing the flow velocity predicted by the optical flow method reference line and the flow velocity at the actual position provided in this embodiment, Fig. 9 : is a schematic diagram comparing the global reference line flow velocity and the true value flow velocity measured by the optical flow method provided in this embodiment; combined with Figure 5-Figure 9, further illustrating the acquisition of the velocity of the entire flow field on the surface of the water body and the acquisition of the average flow velocity of the cross section based on the optical flow method in this embodiment. Since the vertical lines of the channel cross section have the same slope but different intercepts, the vertical velocity distribution formula at the selected normal point can be calculated based on the established surface cross section velocity coupling model. Then, the cross-sectional area of ​​the channel where the selected normal point is located is segmented, and the channel flow information is obtained based on the velocity area method. Specifically: the vertical line where the selected normal point is located is used as the symmetry axis of the segmentation surface for segmentation, and it is determined that the channel is divided into five partitions, and the flow calculation is performed to obtain the channel flow information.

[0039] Furthermore, the weighted average method is used to calculate the average flow velocity of the section, and the calculation formula is as follows: Among them, u is the average flow velocity of each vertical line, and n is the weight of the selected median vertical line.

[0040] It should be noted that, before calculating the channel flow rate based on the cross-sectional average flow velocity and the cross-sectional water level value in step 300, the method further includes: Acquire a historical water shoreline video, and stitch and integrate images extracted from the historical water shoreline video to obtain a historical water shoreline image; The bionic eagle-eye vision model is trained by the historical water shoreline image to obtain a water level recognition model; wherein the water level recognition model includes a backbone network and a neck network, the backbone network is used to extract feature information from the water shoreline image and provide the feature information to the neck network, and the neck network is used to perform feature fusion on the feature information.

[0041] In the specific implementation process, a water area shoreline video is obtained, and the water area shoreline video is input into the water level recognition model to obtain the cross-sectional water level value.

[0042] In one embodiment, a binocular camera is used to form an image of the left front field of view and an image of the right front field of view of the eagle eye for image stitching and integration, simulating the foveal structure of the eagle eye, and based on this, a data set of 2500 images is obtained, of which 2000 are randomly selected as training set images and 500 are randomly selected as test set and validation set images. The images in the training set are converted to Pascal VOC format. The length of the training set image is readjusted to 500 pixels, and the width is adjusted accordingly to maintain the original aspect ratio when creating the training set. After the images are numbered, they are manually annotated using the image annotation tool Labelme software. Draw a bounding box and manually classify the categories. Positive samples with insufficient or unclear pixel areas are not marked to prevent overfitting in deep learning. According to the bionic eagle eye vision model, the YOLO water level recognition model is built, which mainly includes two parts: Backbone network and Neck network. Backbone network is mainly used to extract information from the picture and provide it to the Neck network, which is composed of Conv module, C2f module and SPPF module. The Neck network mainly performs feature fusion and processes the features extracted from the backbone network. The water shoreline image dataset is input for training and verification, and the water shoreline weight file with higher accuracy is obtained by increasing the number of model training iterations. The distance c between the binocular camera and the water shoreline is obtained according to the PCN parallax principle. Fig.10 This is a schematic diagram of the water level recognition model provided in this embodiment for identifying water level lines, see Fig.10 According to the law of cosines, the vertical distance between the binocular camera and the shoreline is a = c × cosα, and the water level value of the canal section is h = m-a. Among them, α is the installation angle of the binocular camera, and m is the distance between the binocular camera and the bottom of the canal.

[0043] Furthermore, the channel flow is calculated by the following formula: in, is the average flow velocity of the section, A is the cross-sectional area, which is h*w, and w is the channel width. is the first normal (i.e. Figure 4 The average velocity of each point on the normal line 1) is is the second normal (i.e. Figure 4 The average velocity of each point on the normal line 2); is the third normal (i.e. Figure 4 The average velocity of each point on the normal line 3); is the third normal (i.e. Figure 4 The average velocity of each point on the normal line 4); is the third normal (i.e. Figure 4 A1, A2, A3, A4, A5 are the areas of the several partition polygons respectively.

[0044] Fig.11 is a schematic diagram of the comparison between the calculated and measured values ​​of the channel water level based on the bionic eagle eye vision provided in this embodiment, see Fig.11 It can be seen that the channel flow measurement method based on bionic eagle eye vision provided in this embodiment has high measurement accuracy.

[0045] Fig.12 is a complete flow chart of the channel flow measurement method based on bionic eagle eye vision provided by an embodiment of the present invention, such as Fig.12 As shown, the complete process of the channel flow measurement method based on bionic eagle eye vision provided by an embodiment of the present invention is illustrated by way of example.

[0046] According to the analysis of the velocity distribution law of characteristic points, the logarithmic formula was selected to fit the velocity distribution formula of the trapezoidal channel, and a velocity distribution formula suitable for the velocity distribution law from the center point to the side wall was initially established, and the correlation coefficient was determined through experimental data. Furthermore, the velocity distribution formula of the vertical line in the initial trapezoidal channel was verified. If the verification is successful, the velocity coupling model of the surface section of the trapezoidal channel is obtained.

[0047] An embodiment of the present invention also provides an intelligent flow measurement model device, including a solar panel, a monocular camera, an electric pole, an equipment installation box, a display screen, and cables. The device can measure the channel flow velocity under different hydraulic conditions according to the actual flow velocity distribution on the channel surface, thereby simplifying the flow measurement process, reducing the error, and effectively improving the measurement accuracy and efficiency.

[0048] The specific implementation process includes: firstly, collecting the flow velocity video of the wide and shallow channel, then inputting the video into the optical flow model, obtaining the flow velocity under the reference line, and using the flow meter to measure the flow velocity under the reference line, and comparing the values ​​measured by the optical flow model and the flow meter, obtaining a correlation coefficient of 95%. The results are shown in the figure. Figure 5 As shown, the velocity distribution formula is obtained by fitting the surface velocity of the collected video: u=0.4058ln(y)+3.7983 The velocity meter was used to measure the velocity at 7 points on the midline (0.4, 0.37, 0.34, 0.31, 0.28, 0.25, 0.21). The expression was fitted according to the measured data. The surface section velocity coupling model was established, and the fitting results are shown in the figure. Figure 6 shown.

[0049] At the same time, the velocity distribution formula obtained from the local velocity is used to calculate the global velocity of the reference line, and the relative error calculation yields: The actual measured flow rate refers to the flow rate displayed by the flow meter in the test, and the optical flow method predicted flow rate refers to the result calculated by the flow rate distribution formula obtained by fitting the optical flow method predicted flow rate. Figure 8 The data actually measured by the reference line is close to the data calculated using the distribution formula, and the relative errors are all within 10%, indicating that the channel velocity distribution formula can accurately describe the global true velocity distribution.

[0050] In the specific implementation process, in order to verify the law between the cross-section normal lines, 8 cross-section normal lines were selected. The theoretical value of the normal velocity representative point (u) is used as the ordinate, and the logarithmic value of the distance from the representative point to the channel bottom (lnx) is used as the abscissa. Figure 7 , the normal velocity distribution formulas of each cross section have the same slope but different intercepts.

[0051] The above is a description of the steps of the channel flow measurement method based on bionic eagle eye vision provided in this embodiment. It can be seen from the description of the above steps that according to the channel flow measurement method based on bionic eagle-eye vision provided by this embodiment, a target observation image is obtained by acquiring a channel flow video and performing image frame interval extraction on the channel flow video; the optical flow value of the target observation image is calculated, and the surface flow velocity value of the target observation image in the world coordinate system is calculated based on the position change information of the optical flow value of the target observation image between image frames and the spatial resolution of the target observation image; wherein the position change information is used to indicate the change of the pixel points in the target observation image in the time domain; the average flow velocity of the section is obtained based on the pre-trained surface section flow velocity coupling model, and the channel flow is calculated based on the average flow velocity of the section and the water level value of the section; wherein the surface section flow velocity coupling model is: the surface flow velocity value in the world coordinate system is fitted based on the flow velocity distribution formula, and the surface water flow velocity distribution law and the median vertical line flow velocity distribution law are constructed, which are trained according to the surface flow velocity distribution law and the median vertical line flow velocity distribution law; the section water level value is calculated based on the pre-acquired water shoreline image. It can be seen that the present invention acquires the average flow velocity of the cross section by collecting local channel flow videos to infer the global area, and calculates the channel flow according to the average flow velocity of the cross section. The method is simple and has high measurement accuracy.

[0052] The channel flow measurement device based on bionic eagle eye vision provided by the present invention is described below. The channel flow measurement device based on bionic eagle eye vision described below and the channel flow measurement method based on bionic eagle eye vision described above can refer to each other.

[0053] Fig.13 is a schematic diagram of the structure of a channel flow measurement device based on bionic eagle eye vision provided in this embodiment, such as Fig.13 As shown, the channel flow measurement device based on bionic eagle eye vision provided in this embodiment includes: The extraction module 1301 is used to obtain the channel flow video and perform image frame interval extraction on the channel flow video to obtain the target observation image; The first calculation module 1302 is used to calculate the optical flow value of the target observation image, and calculate the surface flow velocity value of the target observation image in the world coordinate system based on the position change information of the optical flow value of the target observation image between image frames and the spatial resolution of the target observation image; wherein the position change information is used to indicate the change of the pixel points in the target observation image in the time domain; The second calculation module 1303 is used to obtain the average flow velocity of the section based on the pre-trained surface section flow velocity coupling model, and calculate the channel flow based on the average flow velocity of the section and the water level value of the section; wherein the surface section flow velocity coupling model is: based on the flow velocity distribution formula, the surface flow velocity value in the world coordinate system is fitted, and the surface water flow velocity distribution law and the median vertical line velocity distribution law are constructed, which are trained according to the surface flow velocity distribution law and the median vertical line velocity distribution law; the section water level value is calculated based on the pre-acquired water area shoreline image.

[0054] The channel flow measurement device based on bionic eagle-eye vision provided in the present embodiment obtains a channel flow video and extracts the image frame interval of the channel flow video to obtain a target observation image; calculates the optical flow value of the target observation image, and calculates the surface flow velocity value of the target observation image in the world coordinate system based on the position change information of the optical flow value of the target observation image between image frames and the spatial resolution of the target observation image; wherein the position change information is used to indicate the change of the pixel points in the target observation image in the time domain; obtains the average flow velocity of the section based on the pre-trained surface section flow velocity coupling model, and calculates the channel flow based on the average flow velocity of the section and the water level value of the section; wherein the surface section flow velocity coupling model is: fitting the surface flow velocity value in the world coordinate system based on the flow velocity distribution formula, constructing the surface water flow velocity distribution law and the median vertical line velocity distribution law, and training according to the surface flow velocity distribution law and the median vertical line velocity distribution law; the section water level value is calculated based on the pre-acquired water area shoreline image. It can be seen that the present invention acquires the average flow velocity of the cross section by collecting local channel flow videos to infer the global area, and calculates the channel flow according to the average flow velocity of the cross section. The method is simple and has high measurement accuracy.

[0055] Based on the above embodiment, in this embodiment, the extraction module 1301 is specifically used for: Performing image frame interval extraction and image enhancement preprocessing on the channel flow video to obtain an initial observation image; Perform background segmentation processing on the initial observation image to obtain the target observation image.

[0056] Based on the above embodiment, in this embodiment, the first calculation module 1302 is specifically used for: Calculate the optical flow value of the target observation image, and calculate the surface flow velocity value of the target observation image in the pixel coordinate system based on the position change information of the optical flow value of the target observation image between image frames; Based on the spatial resolution of the target observation image and the surface flow velocity value of the target observation image in the pixel coordinate system, the surface flow velocity value of the target observation image in the world coordinate system is calculated.

[0057] Based on the above embodiment, in this embodiment, the device further includes a fitting module, which is specifically used for: Before obtaining the average flow velocity of the cross section based on the pre-trained surface cross-sectional flow velocity coupling model, determining the optimal frame image and the reference line position in the target observation image based on the surface flow velocity value in the world coordinate system; A local channel flow field is obtained based on the optimal frame image and the reference line position, and flow velocity fitting is performed on the local channel flow field to obtain a flow velocity distribution formula.

[0058] Based on the above embodiment, in this embodiment, the second calculation module 1303 is specifically used for: Determine a plurality of target normal points based on the reference line position, and segment the channel by using a plurality of vertical lines where the plurality of target normal points are located as symmetry axes of the segmentation surface; The average flow velocity of each vertical line is calculated based on the surface cross-section flow velocity coupling model, and the average flow velocity of each vertical line is calculated by weighted average method to obtain the cross-section average flow velocity.

[0059] Based on the above embodiment, in this embodiment, the device further includes a training module, which is specifically used for: Before calculating the channel flow based on the cross-sectional average flow velocity and the cross-sectional water level value, obtaining a historical water shoreline video, and splicing and integrating images extracted from the historical water shoreline video to obtain a historical water shoreline image; The bionic eagle-eye vision model is trained by the historical water shoreline image to obtain a water level recognition model; wherein the water level recognition model includes a backbone network and a neck network, the backbone network is used to extract feature information from the water shoreline image and provide the feature information to the neck network, and the neck network is used to perform feature fusion on the feature information.

[0060] Based on the above embodiment, in this embodiment, the device further includes an acquisition module, which is specifically used to: Before calculating the channel flow based on the average flow velocity and the water level value of the section, a water area shoreline video is obtained, and the water area shoreline video is input into the water level recognition model to obtain the water level value of the section.

[0061] Fig.14 An example of a physical structure diagram of an electronic device is shown in FIG. Fig.14 As shown, the electronic device may include: a processor 1410, a communication interface 1420, a memory 1430 and a communication bus 1440, wherein the processor 1410, the communication interface 1420 and the memory 1430 communicate with each other through the communication bus 1440. The processor 1410 may call the logic instructions in the memory 1430 to execute the channel flow measurement method based on bionic eagle eye vision, and the method includes: Acquire a channel flow video, and perform image frame interval extraction on the channel flow video to obtain a target observation image; The optical flow value of the target observation image is calculated, and the surface flow velocity value of the target observation image in the world coordinate system is calculated based on the position change information of the optical flow value of the target observation image between image frames and the spatial resolution of the target observation image; wherein the position change information is used to indicate the change of the pixel points in the target observation image in the time domain; The average flow velocity of the section is obtained based on the pre-trained surface section flow velocity coupling model, and the channel flow is calculated based on the average flow velocity of the section and the water level value of the section; wherein the surface section flow velocity coupling model is: based on the flow velocity distribution formula, the surface flow velocity value in the world coordinate system is fitted, and the surface water flow velocity distribution law and the median vertical line velocity distribution law are constructed, and the surface flow velocity distribution law and the median vertical line velocity distribution law are trained; the section water level value is calculated based on the pre-acquired water shoreline image.

[0062] In addition, the logic instructions in the above-mentioned memory 1430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0063] On the other hand, the present invention also provides a computer program product, the computer program product includes a computer program, the computer program can be stored in a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the channel flow measurement method based on bionic eagle eye vision provided by the above methods, the method includes: obtaining a channel flow video, and performing image frame interval extraction on the channel flow video to obtain a target observation image; The optical flow value of the target observation image is calculated, and the surface flow velocity value of the target observation image in the world coordinate system is calculated based on the position change information of the optical flow value of the target observation image between image frames and the spatial resolution of the target observation image; wherein the position change information is used to indicate the change of the pixel points in the target observation image in the time domain; The average flow velocity of the section is obtained based on the pre-trained surface section flow velocity coupling model, and the channel flow is calculated based on the average flow velocity of the section and the water level value of the section; wherein the surface section flow velocity coupling model is: based on the flow velocity distribution formula, the surface flow velocity value in the world coordinate system is fitted, and the surface water flow velocity distribution law and the median vertical line velocity distribution law are constructed, and the surface flow velocity distribution law and the median vertical line velocity distribution law are trained; the section water level value is calculated based on the pre-acquired water shoreline image.

[0064] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to perform the channel flow measurement method based on bionic eagle eye vision provided by the above methods, the method comprising: Acquire a channel flow video, and perform image frame interval extraction on the channel flow video to obtain a target observation image; The optical flow value of the target observation image is calculated, and the surface flow velocity value of the target observation image in the world coordinate system is calculated based on the position change information of the optical flow value of the target observation image between image frames and the spatial resolution of the target observation image; wherein the position change information is used to indicate the change of the pixel points in the target observation image in the time domain; The average flow velocity of the section is obtained based on the pre-trained surface section flow velocity coupling model, and the channel flow is calculated based on the average flow velocity of the section and the water level value of the section; wherein the surface section flow velocity coupling model is: based on the flow velocity distribution formula, the surface flow velocity value in the world coordinate system is fitted, and the surface water flow velocity distribution law and the median vertical line velocity distribution law are constructed, and the surface flow velocity distribution law and the median vertical line velocity distribution law are trained; the section water level value is calculated based on the pre-acquired water shoreline image.

[0065] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0066] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0067] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A channel flow measurement method based on bionic eagle eye vision, characterized in that: include: Acquire a channel flow video, and perform image frame interval extraction on the channel flow video to obtain a target observation image; The optical flow value of the target observation image is calculated, and the surface flow velocity value of the target observation image in the world coordinate system is calculated based on the position change information of the optical flow value of the target observation image between image frames and the spatial resolution of the target observation image; wherein the position change information is used to indicate the change of the pixel points in the target observation image in the time domain; The average flow velocity of the section is obtained based on the pre-trained surface section flow velocity coupling model, and the channel flow is calculated based on the average flow velocity of the section and the water level value of the section; wherein the surface section flow velocity coupling model is: based on the flow velocity distribution formula, the surface flow velocity value in the world coordinate system is fitted, and the surface water flow velocity distribution law and the median vertical line velocity distribution law are constructed, and the surface flow velocity distribution law and the median vertical line velocity distribution law are trained; the section water level value is calculated based on the pre-acquired water shoreline image.

2. The channel flow measurement method based on bionic eagle eye vision according to claim 1 is characterized in that: The step of performing image frame interval extraction on the channel flow video to obtain a target observation image includes: Performing image frame interval extraction and image enhancement preprocessing on the channel flow video to obtain an initial observation image; Perform background segmentation processing on the initial observation image to obtain the target observation image.

3. The channel flow measurement method based on bionic eagle eye vision according to claim 1 is characterized in that: The calculating and obtaining the optical flow value of the target observation image, based on the position change information of the optical flow value of the target observation image between image frames and the spatial resolution of the target observation image, calculating and obtaining the surface flow velocity value of the target observation image in the world coordinate system, includes: Calculate the optical flow value of the target observation image, and calculate the surface flow velocity value of the target observation image in the pixel coordinate system based on the position change information of the optical flow value of the target observation image between image frames; Based on the spatial resolution of the target observation image and the surface flow velocity value of the target observation image in the pixel coordinate system, the surface flow velocity value of the target observation image in the world coordinate system is calculated.

4. The channel flow measurement method based on bionic eagle eye vision according to claim 1 is characterized in that: Before obtaining the average flow velocity of the cross section based on the pre-trained surface cross section flow velocity coupling model, the method further includes: Based on the surface flow velocity value in the world coordinate system, the optimal frame image and the reference line position are determined in the target observation image; based on the optimal frame image and the reference line position, the local channel flow field is obtained, and the flow velocity is fitted for the local channel flow field to obtain a flow velocity distribution formula.

5. The channel flow measurement method based on bionic eagle eye vision according to claim 4 is characterized in that: The method of obtaining the average flow velocity of the cross section based on the pre-trained surface cross section flow velocity coupling model includes: Determine a plurality of target normal points based on the reference line position, and segment the channel by using a plurality of vertical lines where the plurality of target normal points are located as symmetry axes of the segmentation surface; The average flow velocity of each vertical line is calculated based on the surface cross-section flow velocity coupling model, and the average flow velocity of each vertical line is calculated by weighted average method to obtain the cross-section average flow velocity.

6. The channel flow measurement method based on bionic eagle eye vision according to claim 1 is characterized in that: Before calculating the channel flow based on the cross-sectional average flow velocity and the cross-sectional water level value, the method further includes: Acquire a historical water shoreline video, and stitch and integrate images extracted from the historical water shoreline video to obtain a historical water shoreline image; The bionic eagle-eye vision model is trained by the historical water shoreline image to obtain a water level recognition model; wherein the water level recognition model includes a backbone network and a neck network, the backbone network is used to extract feature information from the water shoreline image and provide the feature information to the neck network, and the neck network is used to perform feature fusion on the feature information.

7. The channel flow measurement method based on bionic eagle eye vision according to claim 6 is characterized in that: Before calculating the channel flow based on the cross-sectional average flow velocity and the cross-sectional water level value, the method further includes: A water area shoreline video is obtained, and the water area shoreline video is input into the water level recognition model to obtain the cross-sectional water level value.

8. A channel flow measurement device based on bionic eagle eye vision, characterized in that: include: An extraction module is used to obtain a channel flow video and perform image frame interval extraction on the channel flow video to obtain a target observation image; A first calculation module is used to calculate the optical flow value of the target observation image, and calculate the surface flow velocity value of the target observation image in the world coordinate system based on the position change information of the optical flow value of the target observation image between image frames and the spatial resolution of the target observation image; wherein the position change information is used to indicate the change of the pixel points in the target observation image in the time domain; The second calculation module is used to obtain the average flow velocity of the section based on the pre-trained surface section flow velocity coupling model, and calculate the channel flow based on the average flow velocity of the section and the water level value of the section; wherein the surface section flow velocity coupling model is: based on the flow velocity distribution formula, the surface flow velocity value in the world coordinate system is fitted, and the surface water flow velocity distribution law and the median vertical line velocity distribution law are constructed, and the surface flow velocity distribution law and the median vertical line velocity distribution law are trained; the section water level value is calculated based on the pre-acquired water area shoreline image.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the channel flow measurement method based on bionic eagle eye vision as described in any one of claims 1 to 7 is implemented.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the channel flow measurement method based on bionic eagle eye vision as described in any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Curved channel flow measuring method and device

    CN113074786A

  • Flow measurement method and device

    CN113532560A

  • Flow measurement method based on channel section flow velocity field reconstruction

    CN113639805A

  • River water level visual measurement method without water gauge

    CN113819974A

  • River surface flow velocity calculation method and system based on optical flow measurement and calculation

    CN115761563A

Cited By

  • Channel flow inversion method

    CN120493718A

  • Channel flow determination method and device

    CN120853075A

  • Channel flow determination method and device

    CN120853075B

  • River flow control method and system based on image measurement

    CN121785383A