Disclosure of Invention
The invention provides a water flow speed measuring method and system based on photoelectric fusion, which are used for solving the defect of low accuracy of a measuring result caused by a plurality of limitations of measuring water flow by adopting single type non-contact equipment in the prior art, realizing complementation measurement of multiple types of equipment and greatly improving the accuracy of measuring the water flow speed.
In a first aspect, the present invention provides a method for measuring a water flow velocity based on photoelectric fusion, including:
acquiring an overlapping area to be measured, determining a plurality of grid points of the overlapping area to be measured, and unifying coordinates of a plurality of measuring devices in the overlapping area to be measured by utilizing the grid points to obtain a unified coordinate measuring area;
calculating video data in the unified coordinate measurement area to obtain a connecting line included angle between the whole flow direction of the video data and an equipment installation point of measurement equipment;
Obtaining the actual flow direction of water flow according to the connecting line included angle, and determining to obtain the surface flow velocity of the water flow by adopting a water flow velocity measurement method or a radar velocity measurement method based on the actual flow direction of the water flow;
And acquiring the water flow surface flow velocity of all grid points in the overlapping area to be measured to form a comprehensive water flow output result set.
According to the water flow velocity measurement method based on photoelectric fusion provided by the invention, an overlapping area to be measured is obtained, a plurality of grid points of the overlapping area to be measured are determined, the coordinates of a plurality of measurement devices in the overlapping area to be measured are unified by using the grid points, and before the unified coordinate measurement area is obtained, the method further comprises the steps of:
determining the water flow coverage, and arranging an ultrahigh frequency radar and a video flow rate meter at equipment installation points on a single side bank of the water flow coverage;
The ultra-high frequency radar performs side scanning on the water flow coverage area, and radar data are collected;
the video flow velocity meter shoots the water flow coverage area and collects video data.
According to the water flow velocity measurement method based on photoelectric fusion, the invention obtains an overlapping area to be measured, determines a plurality of grid points of the overlapping area to be measured, unifies coordinates of a plurality of measurement devices in the overlapping area to be measured by using the grid points to obtain a unified coordinate measurement area, and comprises the following steps:
Performing grid division on the overlapping area to be measured according to preset division density to obtain a plurality of grid points;
performing camera calibration on the video flow velocity meter, converting camera pixel coordinates of the grid points into actual geographic coordinates, and unifying a camera grid coordinate system corresponding to the camera pixel coordinates and a radar side scanning coordinate system corresponding to the actual geographic coordinates to obtain a unified coordinate system;
and aligning the unified coordinate system with the overlapping area to be measured to obtain the unified coordinate measurement area.
According to the water flow velocity measurement method based on photoelectric fusion, which is provided by the invention, video data in the unified coordinate measurement area is calculated to obtain a connecting line included angle between the whole flow direction of the video data and an equipment installation point of measurement equipment, and the method comprises the following steps:
Performing optical flow detection on the video data to obtain interval image frames among a plurality of grid points;
Calculating a two-dimensional dense flow field of the interval image frame, and acquiring a pixel average flow of a single grid point based on the two-dimensional dense flow field;
And taking the pixel average flow as the overall flow direction of the video data, and determining the included angle of the connecting line according to the overall flow direction and the connecting line between the single grid point and the equipment installation point.
According to the method for measuring the water flow velocity based on photoelectric fusion, which is provided by the invention, the actual flow direction of water flow is obtained according to the connecting line included angle, and the water flow velocity is obtained by adopting a water flow velocity measurement method or a radar velocity measurement method based on the actual flow direction of water flow, and the method comprises the following steps:
determining a flow rate angle threshold;
if the connecting line included angle is equal to the flow velocity angle threshold value, determining that the actual flow direction of the water flow is parallel to a shoreline, and calculating the water flow surface flow velocity of a single grid point by adopting the water flow velocity measurement method;
If the connecting line included angle is not equal to the flow velocity angle threshold, determining that the actual flow direction of the water flow is not parallel to the shoreline, acquiring radar speed measurement of a single grid point, and obtaining the surface flow velocity of the water flow according to the radar speed measurement and the cosine value of the connecting line included angle.
According to the water flow velocity measurement method based on photoelectric fusion, the water flow velocity measurement method comprises an optical flow velocity measurement OPV, a particle image velocity measurement PIV, a particle tracking velocity measurement PTV and a space-time image velocity measurement STIV.
In a second aspect, the present invention further provides a water flow velocity measurement system based on photoelectric fusion, including:
The unification module is used for acquiring an overlapping area to be measured, determining a plurality of grid points of the overlapping area to be measured, unifying coordinates of a plurality of measuring devices in the overlapping area to be measured by utilizing the grid points, and obtaining a unified coordinate measuring area;
The calculation module is used for calculating the video data in the unified coordinate measurement area to obtain a connecting line included angle between the whole flow direction of the video data and the equipment installation point of the measurement equipment;
the measuring module is used for measuring the actual flow direction of the water flow obtained according to the connecting line included angle, and determining to obtain the surface flow velocity of the water flow by adopting a water flow velocimetry or a radar velocimetry based on the actual flow direction of the water flow;
And the output module is used for acquiring the water flow surface flow velocity of all grid points in the overlapping area to be measured to form a comprehensive water flow output result set.
In a third aspect, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements any one of the above-mentioned methods for measuring water flow velocity based on photoelectric fusion when executing the program.
In a fourth aspect, the present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a photo fusion based water flow velocity measurement method as described in any one of the above.
In a fifth aspect, the present invention also provides a computer program product comprising a computer program which, when executed by a processor, implements a method of measuring water flow velocity based on photo-fusion as described in any one of the above.
According to the photoelectric fusion-based water flow velocity measurement method and system, the video acquisition equipment and the radar acquisition equipment are mutually supplemented in different scenes to measure the water flow velocity, so that the limitations of respective application can be avoided, the advantages of photoelectric equipment combination can be fully exerted, and the accuracy of a flow velocity calculation result can be effectively improved.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Aiming at the uncertainty of current water flow velocity measurement in complex water areas, the invention provides a water flow velocity measurement method based on photoelectric fusion, which solves the problem that single type non-contact measurement equipment has more limitations.
Fig. 1 is a schematic flow chart of a water flow velocity measurement method based on photoelectric fusion according to an embodiment of the present invention, as shown in fig. 1, including:
Step 100, acquiring an overlapping area to be measured, determining a plurality of grid points of the overlapping area to be measured, and unifying coordinates of a plurality of measuring devices in the overlapping area to be measured by utilizing the grid points to obtain a unified coordinate measuring area;
step 200, calculating video data in the unified coordinate measurement area to obtain a connecting line included angle between the whole flow direction of the video data and the equipment installation point of the measurement equipment;
Step 300, obtaining the actual flow direction of water flow according to the connecting line included angle, and determining to obtain the surface flow velocity of the water flow by adopting a water flow velocity measurement method or a radar velocity measurement method based on the actual flow direction of the water flow;
step 400, obtaining the water flow surface flow velocity of all grid points in the overlapping area to be measured to form a comprehensive water flow output result set.
It should be noted that, the photoelectric fusion system in the embodiment of the invention includes an ultra-high frequency radar, a video flow rate meter and an upright post for installation, a waterproof box is further arranged on the upright post, the waterproof box is fixed on the upright post or is arranged beside the upright post, an intelligent edge gateway, a power supply and a lightning protection device are integrated in the waterproof box, the power supply is used for supplying power to each device, a solar energy form or a power grid power supply form is adopted, the intelligent edge gateway is used for receiving and processing radar data acquired by the ultra-high frequency radar and video data acquired by the video flow rate meter, and the internal specific structure of the photoelectric fusion system comprises a calculation module, a routing module, a power conversion module, a storage module and a power supply remote control module.
The method comprises the steps of calculating video data in an overlapping area, namely carrying out optical flow detection according to grids, determining whether the flow direction of the video speed measurement is parallel to a river bank or not according to the fact that the average flow direction in a single grid and the connecting line included angle between the installation point (namely the position where an upright rod is located) of the equipment are, obtaining the flow speed of a water flow surface by adopting a water flow speed measurement method or a radar speed measurement method according to the fact that whether the flow direction of the video speed measurement is parallel to the river bank or not, and finally outputting the flow speed results of all grid points in the grid area.
According to the invention, the video acquisition equipment and the radar acquisition equipment are mutually complemented in different scenes to measure the water flow velocity, so that the limitation of respective application can be avoided, the combined advantages of the photoelectric equipment can be fully exerted, and the accuracy of the flow velocity calculation result is effectively improved.
On the basis of the above embodiment, acquiring an overlapping area to be measured, determining a plurality of grid points of the overlapping area to be measured, unifying coordinates of a plurality of measurement devices in the overlapping area to be measured by using the plurality of grid points, and obtaining a unified coordinate measurement area, including:
performing grid division on the overlapping area to be measured according to preset division density to obtain a plurality of grid points;
performing camera calibration on the video flow velocity meter, converting camera pixel coordinates of the grid points into actual geographic coordinates, and unifying a camera grid coordinate system corresponding to the camera pixel coordinates and a radar side scanning coordinate system corresponding to the actual geographic coordinates to obtain a unified coordinate system;
and aligning the unified coordinate system with the overlapping area to be measured to obtain the unified coordinate measurement area.
Specifically, in the present embodiment, as shown in fig. 2, the upper left side in the figure is the video flow rate meter, the middle left side in the figure is the ultra-high frequency radar, it can be seen that the measurement range of the video flow rate meter is larger than the measurement range of the ultra-high frequency radar, the overlapping area is gridded, and the division density is determined according to the actual situation (for example, 55、1010, Unit m), the camera converts the pixel coordinates of the grid points into actual geographic coordinates through early calibration, so that the camera grid coordinate system corresponds to coordinates in the radar side scanning coordinate system one by one.
On the basis of the above embodiment, calculating the video data in the unified coordinate measurement area to obtain a connection angle between the overall flow direction of the video data and the equipment installation point of the measurement equipment, including:
Performing optical flow detection on the video data to obtain interval image frames among a plurality of grid points;
Calculating a two-dimensional dense flow field of the interval image frame, and acquiring a pixel average flow of a single grid point based on the two-dimensional dense flow field;
And taking the pixel average flow as the overall flow direction of the video data, and determining the included angle of the connecting line according to the overall flow direction and the connecting line between the single grid point and the equipment installation point.
Specifically, in the embodiment of the invention, by performing optical flow detection on video data acquired by a camera, a two-dimensional dense flow field of an interval image frame is calculated, as shown in fig. 3, and is a flow direction distribution diagram of optical flow detection, and the horizontal and vertical coordinates are pixel coordinates to represent an optical flow detection result.
Based on the two-dimensional dense flow field result, the average pixel flow direction is used as the representative flow direction of the unit grid in the unit grid, the included angle between the representative flow direction and the connecting line is obtained, the connecting line is formed by connecting the unit grid and the vertical rod, and the connecting line is recorded as。
On the basis of the above embodiment, obtaining the actual flow direction of the water flow according to the connection angle, determining to obtain the surface flow velocity of the water flow by using a water flow velocity measurement method or a radar velocity measurement method based on the actual flow direction of the water flow, including:
determining a flow rate angle threshold;
if the connecting line included angle is equal to the flow velocity angle threshold value, determining that the actual flow direction of the water flow is parallel to a shoreline, and calculating the water flow surface flow velocity of a single grid point by adopting the water flow velocity measurement method;
If the connecting line included angle is not equal to the flow velocity angle threshold, determining that the actual flow direction of the water flow is not parallel to the shoreline, acquiring radar speed measurement of a single grid point, and obtaining the surface flow velocity of the water flow according to the radar speed measurement and the cosine value of the connecting line included angle.
Specifically, the embodiment of the invention uses the connecting line included angle calculated in the previous embodimentAs the basis of judgment, whenAt this time, river surface flow rates were calculated using optical flow velocimetry (Optical Flow Velocimetry, OPV), particle image velocimetry (PARTICLE IMAGE Velocimetry, PIV), particle tracking velocimetry (PARTICLE TACKING Velocimetry, PTV) or spatiotemporal image velocimetry (Spatiotemporal Image Velocimetry, STIV).
When (when)At the same time, the speed of radar at the grid point is adoptedCalculating the component representing the flow direction in the unit grid, wherein the component is the river surface flow velocity at the representing point of the unit gridThe formula is as follows:
As shown in fig. 4, taking any two grid points a and B, it can be seen that the velocity V A at point a is not perpendicular to the line, and the velocity V B at point B is perpendicular to the line.
Finally, the flow velocity results of all grid points in the grid area are output, and as an example, the arrows on the grid points in the upper left corner grid are average flow directions, and the arrows in the grid with messy directions are the actual flow directions of the feature points in the grid.
In conclusion, the method obtains the grid area representing flow direction by using an optical flow method, and on the premise that the flow direction is parallel to the river bank when radar flow measurement is replaced, the actual flow direction is used for replacing the theoretical flow direction, so that the accuracy of a flow velocity calculation result is improved, and when the radar cannot measure the flow velocity perpendicular to the vertical rod direction, the video flow measurement technology is adopted to supplement the flow velocity of the area.
The water flow speed measuring system based on photoelectric fusion provided by the invention is described below, and the water flow speed measuring system based on photoelectric fusion described below and the water flow speed measuring method based on photoelectric fusion described above can be correspondingly referred to each other.
Fig. 6 is a schematic structural diagram of a water flow velocity measurement system based on photoelectric fusion according to an embodiment of the present invention, as shown in fig. 6, including a unifying module 61, a calculating module 62, a measuring module 63, and an output module 64, where:
The system comprises a unifying module 61, a calculating module 62, a measuring module 63 and an output module 64, wherein the unifying module 61 is used for acquiring an overlapping area to be measured, determining a plurality of grid points of the overlapping area to be measured, unifying coordinates of a plurality of measuring devices in the overlapping area to be measured by the grid points to obtain a unified coordinate measuring area, the calculating module 62 is used for calculating video data in the unified coordinate measuring area to obtain a connecting included angle between the whole flow direction of the video data and the device mounting point of the measuring devices, the measuring module 63 is used for measuring the actual flow direction of water flow according to the connecting included angle, determining to obtain the surface flow rate of the water flow by adopting a water flow velocity measurement method or a radar velocity measurement method based on the actual flow direction of the water flow, and the output module 64 is used for acquiring the surface flow rate of the water flow of all the grid points in the overlapping area to be measured to form a comprehensive water flow output result set.
Fig. 7 illustrates a physical schematic diagram of an electronic device, which may include a processor (processor) 710, a communication interface (Communications Interface) 720, a memory (memory) 730, and a communication bus 740, where the processor 710, the communication interface 720, and the memory 730 communicate with each other via the communication bus 740, as shown in fig. 7. The processor 710 may invoke logic instructions in the memory 730 to execute a water flow velocity measurement method based on photoelectric fusion, where the method includes obtaining an overlapping area to be measured, determining a plurality of grid points of the overlapping area to be measured, unifying coordinates of a plurality of measurement devices in the overlapping area to be measured by using the grid points to obtain a unified coordinate measurement area, calculating video data in the unified coordinate measurement area to obtain a connection angle between an integral flow direction of the video data and a device mounting point of the measurement device, obtaining an actual flow direction of water flow according to the connection angle, determining a water flow velocity measurement method or a radar velocity measurement method to obtain a water flow surface velocity based on the actual flow direction of water flow, and obtaining water flow surface velocities of all grid points in the overlapping area to be measured to form a comprehensive water flow output result set.
Further, the logic instructions in the memory 730 described above may be implemented in the form of software functional units and may be stored in a computer readable storage medium when sold or used as a stand alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. The storage medium includes a U disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, an optical disk, or other various media capable of storing program codes.
In another aspect, the invention further provides a computer program product, the computer program product comprises a computer program, the computer program can be stored on a non-transitory computer readable storage medium, when the computer program is executed by a processor, the computer can execute the water flow speed measuring method based on photoelectric fusion provided by the above methods, the method comprises the steps of obtaining an overlapping area to be measured, determining a plurality of grid points of the overlapping area to be measured, unifying coordinates of a plurality of measuring devices in the overlapping area to be measured by using the grid points to obtain a unified coordinate measuring area, calculating video data in the unified coordinate measuring area to obtain a connecting angle between the whole flow direction of the video data and a device mounting point of the measuring device, obtaining the actual flow direction of water flow according to the connecting angle, determining to obtain the water flow surface flow speed by adopting a water flow speed measuring method or adopting a radar speed measuring method based on the actual flow direction of water flow, and obtaining the water flow surface flow speeds of all the grid points in the overlapping area to be measured to form a comprehensive water flow output result set.
In still another aspect, the present invention further provides a non-transitory computer readable storage medium, on which a computer program is stored, the computer program, when executed by a processor, is implemented to perform the method for measuring water flow velocity based on photoelectric fusion provided by the above methods, where the method includes obtaining an overlapping area to be measured, determining a plurality of grid points of the overlapping area to be measured, unifying coordinates of a plurality of measurement devices in the overlapping area to be measured by using the plurality of grid points to obtain a unified coordinate measurement area, calculating video data in the unified coordinate measurement area to obtain a connection angle between an overall flow direction of the video data and a device mounting point of the measurement device, obtaining an actual flow direction of water flow according to the connection angle, determining a water flow surface flow velocity based on the actual flow direction of water flow using a water flow velocity measurement method or using a radar velocity measurement method, and obtaining water flow surface flow velocities of all grid points in the overlapping area to be measured to form a comprehensive water flow output result set.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
It should be noted that the above-mentioned embodiments are merely for illustrating the technical solution of the present invention, and not for limiting the same, and although the present invention has been described in detail with reference to the above-mentioned embodiments, it should be understood by those skilled in the art that the technical solution described in the above-mentioned embodiments may be modified or some technical features may be equivalently replaced, and these modifications or substitutions do not make the essence of the corresponding technical solution deviate from the spirit and scope of the technical solution of the embodiments of the present invention.