CN117831035B - Sluice safety identification method, sluice safety identification system and storage medium - Google Patents
Sluice safety identification method, sluice safety identification system and storage medium Download PDFInfo
- Publication number
- CN117831035B CN117831035B CN202410238471.XA CN202410238471A CN117831035B CN 117831035 B CN117831035 B CN 117831035B CN 202410238471 A CN202410238471 A CN 202410238471A CN 117831035 B CN117831035 B CN 117831035B
- Authority
- CN
- China
- Prior art keywords
- cross
- image
- correlation
- correlation window
- processed
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 38
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 claims abstract description 100
- 239000013598 vector Substances 0.000 claims description 24
- 238000004422 calculation algorithm Methods 0.000 claims description 18
- 238000004590 computer program Methods 0.000 claims description 11
- 239000002245 particle Substances 0.000 claims description 11
- 238000006243 chemical reaction Methods 0.000 claims description 8
- 238000012937 correction Methods 0.000 claims description 4
- 238000012544 monitoring process Methods 0.000 abstract description 3
- 238000010586 diagram Methods 0.000 description 14
- 238000006073 displacement reaction Methods 0.000 description 13
- 230000008859 change Effects 0.000 description 7
- 238000004891 communication Methods 0.000 description 6
- 238000003909 pattern recognition Methods 0.000 description 6
- 230000000903 blocking effect Effects 0.000 description 5
- 238000004364 calculation method Methods 0.000 description 5
- 238000011010 flushing procedure Methods 0.000 description 5
- 238000003973 irrigation Methods 0.000 description 4
- 230000002262 irrigation Effects 0.000 description 4
- 238000011144 upstream manufacturing Methods 0.000 description 4
- 238000001363 water suppression through gradient tailored excitation Methods 0.000 description 4
- 208000034699 Vitreous floaters Diseases 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 239000006185 dispersion Substances 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 239000011159 matrix material Substances 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 239000000700 radioactive tracer Substances 0.000 description 2
- 230000001105 regulatory effect Effects 0.000 description 2
- 239000004576 sand Substances 0.000 description 2
- 230000002123 temporal effect Effects 0.000 description 2
- 229910000831 Steel Inorganic materials 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 230000001276 controlling effect Effects 0.000 description 1
- 238000007405 data analysis Methods 0.000 description 1
- 230000008021 deposition Effects 0.000 description 1
- 230000003628 erosive effect Effects 0.000 description 1
- 239000003621 irrigation water Substances 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 238000010606 normalization Methods 0.000 description 1
- 238000010248 power generation Methods 0.000 description 1
- 238000004080 punching Methods 0.000 description 1
- 102000027426 receptor tyrosine kinases Human genes 0.000 description 1
- 108091008598 receptor tyrosine kinases Proteins 0.000 description 1
- 239000010959 steel Substances 0.000 description 1
- 238000010257 thawing Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/70—Labelling scene content, e.g. deriving syntactic or semantic representations
Landscapes
- Engineering & Computer Science (AREA)
- Computational Linguistics (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Theoretical Computer Science (AREA)
- Indicating Or Recording The Presence, Absence, Or Direction Of Movement (AREA)
Abstract
The application provides a sluice safety identification method, a system and a storage medium, which are applied to the field of hydraulic engineering safety monitoring and can solve the problem of weak accuracy of sluice safety identification by manually identifying water flow states.
Description
Technical Field
The application relates to the field of hydraulic engineering safety monitoring, in particular to a sluice safety identification method, a sluice safety identification system and a storage medium.
Background
In hydraulic engineering, water gates are used for flood control, drainage, tide blocking, irrigation, water supply, shipping, hydroelectric generation and the like; the gate is closed, so that flood control, tide blocking, water storage, upstream water level elevation and the like can be realized, and the requirements of upstream water taking or navigation can be met; the gate is opened, so that flood discharge, drainage, sand flushing, water taking and the like can be realized, or the flow can be regulated according to the requirement of downstream water.
After the gate of the sluice is opened, if the building of the sluice is locally damaged and aged, or the condition of flushing and silting change occurs under the sluice, the flow state of water flow can be changed, such as swirling flow, folding and flushing flow and the like. In the related art, workers mainly observe the flow state change of water flow, and judge whether the sluice has potential safety hazard or not through the observed flow state change of water flow.
However, the above-mentioned mode of judging the sluice potential safety hazard by manually identifying the water flow state is poor in accuracy and timeliness for the sluice safety identification.
Disclosure of Invention
The application provides a sluice safety identification method, a sluice safety identification system and a storage medium, which can solve the problem of weak accuracy of sluice safety identification in a mode of judging the sluice safety hidden danger by manually identifying the flow state of water flow.
Embodiments of the present application are implemented as follows:
A first aspect of an embodiment of the present application provides a method for identifying sluice safety, including:
Acquiring an image to be processed of the water flow under the gate, wherein the image to be processed contains trace particles;
Determining a planar two-dimensional flow field corresponding to the image to be processed according to a preset cross-correlation window and a cross-correlation algorithm, wherein the planar two-dimensional flow field is determined by flow velocity vectors of all cross-correlation windows in the image to be processed; determining the eddy current value of each cross-correlation window; and identifying the water flow state under the gate and the position corresponding to the water flow state based on a preset judging strategy and a vortex value.
In the method, the flow velocity vector of each cross-correlation window in the image to be processed can be determined by adopting the cross-correlation algorithm on the image to be processed of the water flow under the gate, so that the vortex value of each cross-correlation window is determined, and therefore, the positions corresponding to the water flow state under the gate and the water flow state can be identified by combining a preset judgment strategy on the basis of the vortex value, that is, the water flow state under the gate is accurately and efficiently identified through the analysis and the processing of the image, and the safety monitoring of the water gate is improved.
With reference to the first aspect, in certain implementations of the first aspect, determining the vorticity values for each cross-correlation window includes:
Decomposing the flow velocity vector of the cross-correlation window into a horizontal flow velocity and a vertical flow velocity; determining a horizontal flow velocity gradient and a vertical flow velocity gradient of the cross-correlation window; the vortex values of the cross-correlation window are determined based on the horizontal and vertical flow gradients of the cross-correlation window.
With reference to the first aspect, in certain implementation manners of the first aspect, identifying a position under the gate corresponding to the water flow state and the water flow state based on a preset determination strategy and the vortex value includes:
If the vortex value is greater than a preset vortex threshold, marking a first cross-correlation window corresponding to the vortex value as vortex, wherein the first cross-correlation window is one cross-correlation window in the image to be processed, and the preset judging strategy comprises judging the cross-correlation window with the vortex value greater than the preset vortex threshold as vortex; the position corresponding to the first cross correlation window is the position of the swirling flow.
In the method, on the basis of determining the vorticity value, different flow patterns of water flow under the gate are identified through different preset judging strategies, that is, a cross-correlation window with the vorticity value larger than a preset vorticity threshold value can be judged to be a vortex.
With reference to the first aspect, in certain implementation manners of the first aspect, identifying a position under the gate corresponding to the water flow state and the water flow state based on a preset determination strategy and the vortex value includes:
calculating an arctangent value of a flow velocity vector of a second cross-correlation window in the cross-correlation windows, wherein the second cross-correlation window is a window except the first cross-correlation window in the cross-correlation windows; determining a second included angle between each second cross-correlation window and the horizontal direction based on the arctangent value;
If the absolute value of the difference between the second included angle and the first included angle is larger than a preset angle threshold value, marking a third cross-correlation window corresponding to the second included angle as a folded stream, wherein the first included angle is the included angle between the smooth flow direction of the water flow under the gate and the horizontal direction, and the preset judging strategy comprises judging the cross-correlation window of which the absolute value of the difference between the second included angle and the first included angle is larger than the preset angle threshold value as the folded stream; the position corresponding to the third cross-correlation window is the position of the folded stream.
In the method, on the basis of determining the vorticity value, different flow patterns of the water flow under the gate are identified through different preset judging strategies, that is, a cross-correlation window with the absolute value of the difference between the second included angle and the first included angle being larger than a preset angle threshold value can be judged to be the folded and washed flow.
In addition, other flow patterns, such as cross-flow, may be further identified in combination with the identification of swirl flow and break-over flow patterns.
With reference to the first aspect, in some implementations of the first aspect, determining, according to a preset cross-correlation window and a cross-correlation algorithm, a planar two-dimensional flow field corresponding to the image to be processed includes:
dividing a first moment image in the image to be processed into a plurality of cross-correlation windows according to the size of a preset cross-correlation window;
determining cross-correlation values corresponding to cross-correlation windows in a second moment image in the images to be processed, wherein the first moment image and the second moment image are two images of adjacent moments in the images to be processed;
Determining a second position in the second moment image, which is matched with the first position in the first moment image, based on the cross-correlation value; and determining a planar two-dimensional flow field corresponding to the image to be processed according to the first position and the second position.
According to the method, the image to be processed is converted into the flow velocity vector of each cross-correlation window in the image to be processed, so that the flow state of water flow under the gate can be further identified in a subsequent flow velocity vector mode, and the image identification capability is improved. With reference to the first aspect, in some implementation manners of the first aspect, before determining a planar two-dimensional flow field corresponding to the image to be processed according to a preset cross-correlation window and a cross-correlation algorithm, the method further includes:
Establishing a conversion relation between an image coordinate system of an image to be processed and a world coordinate system; and determining world coordinates corresponding to the image to be processed based on the conversion relation.
In the method, the data in the image coordinate system is converted into the world coordinate system, so that the applicability of the sluice safety identification method in an actual sluice scene is improved.
A second aspect of the embodiments of the present application provides a sluice safety identification system, the system comprising an image acquisition module and a water flow regime identification module, wherein:
the image acquisition module is used for acquiring an image to be processed of the water flow under the gate;
The water flow state identification module is used for determining a planar two-dimensional flow field corresponding to the image to be processed according to a preset cross-correlation window and a cross-correlation algorithm, wherein the planar two-dimensional flow field is determined by flow velocity vectors of all cross-correlation windows in the image to be processed; and also for determining the eddy current value of each cross-correlation window; and the device is also used for identifying the water flow state under the gate and the position corresponding to the water flow state based on a preset judging strategy and the vortex value.
With reference to the second aspect, in certain implementations of the second aspect, the system further includes: and the correction module is used for positioning world coordinates corresponding to the image to be processed.
A third aspect of an embodiment of the present application provides a computer device comprising a memory storing a computer program and a processor implementing the steps of the sluice safety identification method of the first aspect when the processor executes the computer program.
A fourth aspect of the embodiments of the present application provides a computer-readable storage medium having a computer program stored thereon, which when executed by a processor causes the processor to perform the steps of the sluice safety identification method of the first aspect.
It will be appreciated that the advantages of the second to fourth aspects are described with reference to the related description of the first aspect, and will not be repeated here.
The application provides a sluice safety identification method, a system and a storage medium, wherein the method is characterized in that a plane two-dimensional flow field corresponding to a to-be-processed image is determined according to a preset cross-correlation window and a cross-correlation algorithm by acquiring the to-be-processed image containing trace particles of the water flow under the sluice, namely, the flow velocity vector of each cross-correlation window in the to-be-processed image is determined, the vortex value of each cross-correlation window is further determined, and the water flow state under the sluice and the position corresponding to the water flow state are identified based on a preset judgment strategy and the vortex value.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a sluice safety identification system according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a sluice safety identification system according to an embodiment of the present application;
FIG. 3 is a flow chart illustrating a method for identifying sluice safety according to an embodiment of the present application;
FIG. 4 is a view showing one of the images to be processed according to an embodiment of the present application;
FIG. 5 is a schematic flow chart of determining a planar two-dimensional flow field corresponding to an image to be processed according to an embodiment of the present application;
FIG. 6 is a schematic diagram of a first time image and a second time image according to an embodiment of the present application;
FIG. 7 is a schematic diagram showing the displacement of the positions of the cross-correlation windows in the images corresponding to the two moments in FIG. 6;
FIG. 8 is a schematic illustration showing a flow of one of the images to be processed under the gate according to an embodiment of the present application;
FIG. 9 is a schematic view of vortex shedding amount dispersion of a cross-correlation window according to an embodiment of the present application;
FIG. 10 is a schematic view of a first included angle according to an embodiment of the present application;
FIG. 11 is a schematic illustration of the locations of the identified swirling flow corresponding to the image to be processed of FIG. 8;
fig. 12 is a schematic diagram of the positions of the corresponding recognized folded streams of the image to be processed in fig. 8.
Detailed Description
For the purposes of making the objects, embodiments and advantages of the present application more apparent, an exemplary embodiment of the present application will be described more fully hereinafter with reference to the accompanying drawings in which exemplary embodiments of the application are shown, it being understood that the exemplary embodiments described are merely some, but not all, of the examples of the application.
It should be noted that the brief description of the terminology in the present application is for the purpose of facilitating understanding of the embodiments described below only and is not intended to limit the embodiments of the present application. Unless otherwise indicated, these terms should be construed in their ordinary and customary meaning.
The terms first, second, third and the like in the description and in the claims and in the above-described figures are used for distinguishing between similar or similar objects or entities and not necessarily for describing a particular sequential or chronological order, unless otherwise indicated. It is to be understood that the terms so used are interchangeable under appropriate circumstances.
The terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a product or apparatus that comprises a list of elements is not necessarily limited to all elements explicitly listed, but may include other elements not expressly listed or inherent to such product or apparatus.
In hydraulic engineering, water gates are used for flood control, drainage, tide blocking, irrigation, water supply, shipping, hydroelectric generation and the like; the water-saving type water-saving device is built in river channels, canal systems, reservoirs, lakes and coastal areas, and plays an important role in flood control, drainage, moisture blocking, irrigation, water supply, shipping, hydroelectric power generation and the like.
It should be noted that the sluice may be a estuary sluice, a canal head sluice, etc., for example, the estuary sluice is located at the junction of an urban inland river and a river such as a Yangtze river or a yellow river, is a circular arc sluice, is used for raising the inland water level in the dead period, flood-stage flood discharge, and the sluice top is divided into a plurality of thin lower hole overflows, and the canal head sluice is located in a irrigation area channel, is a flat plate vertical steel sluice, and is used for controlling irrigation water quantity.
The gate is closed, so that flood control, tide blocking, water storage, upstream water level elevation and the like can be realized, and the requirements of upstream water taking or navigation can be met; the gate is opened, so that flood discharge, drainage, sand flushing, water taking and the like can be realized, or the flow can be regulated according to the requirement of downstream water.
Due to the long-term effects of factors such as load, freeze thawing, wind, waves, rain, snow and the like, the structure of each part of the building inevitably ages; after the gate of the sluice is opened, if the building of the sluice is locally damaged and aged, the collapse of the two sides of the sluice or the erosion and deposition change under the sluice occur, the flow state of the water flow can be changed, such as swirling flow, folding and punching flow, and the like.
In the related art, workers mainly observe the flow state change of water flow, and judge whether the sluice has potential safety hazard or not through the observed flow state change of water flow. However, the above-mentioned mode of judging the sluice potential safety hazard by manually identifying the water flow state is poor in accuracy and timeliness for the sluice safety identification.
In view of the above problems, the embodiments of the present application may provide a sluice safety recognition method, a system, a computer device, and a storage medium, where the sluice safety recognition method is applied to a sluice safety recognition system, an image acquisition module in the sluice safety recognition system acquires an image to be processed containing trace particles of water flow under the sluice, and a water flow pattern recognition module in the sluice safety recognition system determines a planar two-dimensional flow field corresponding to the image to be processed according to a preset cross-correlation window and a cross-correlation algorithm, further determines a flow velocity vector of each cross-correlation window in the image to be processed, further determines a vortex value of each cross-correlation window, and then recognizes a water flow pattern under the sluice and a position corresponding to the water flow pattern based on a preset determination strategy and the vortex value.
The following describes a sluice safety identification method, system and storage medium according to the embodiments of the present application in detail with reference to the accompanying drawings.
Fig. 1 shows a schematic structural diagram of a sluice safety identification system according to an embodiment of the present application, and as shown in fig. 1, the embodiment of the present application provides a sluice safety identification system, which includes an image acquisition module 10 and a water flow pattern identification module 20.
The image acquisition module is in communication connection with the water flow state identification module, so that image data acquired by the image acquisition module can be conveniently transmitted to the water flow state identification module, and the water flow state identification module can analyze and process the image data.
The image acquisition module is arranged at a position for shooting the water flow under the gate, so that the image acquisition module can acquire the image of the water flow under the gate conveniently, and the position of the image acquisition module can be arranged on the gate, the river bank or the water flow.
The image acquisition module may be composed of a photographing device having a lens, such as a video camera, a drone, or the like, having a photographing function.
It should be noted that in some embodiments, the image acquisition module may also be referred to as a camera module, a shooting module, etc., which the embodiments of the present application do not limit.
The image acquisition module and the water flow pattern recognition module may share a power supply device, or may have respective power supplies.
The water flow state identification module can be realized through equipment with calculation energy, and can determine a planar two-dimensional flow field corresponding to the image to be processed according to a preset cross-correlation window and a cross-correlation algorithm, further determine flow velocity vectors of all cross-correlation windows in the image to be processed, further determine vortex values of all cross-correlation windows, and identify positions corresponding to the water flow states under the gate based on a preset judgment strategy and the vortex values.
For example, the water flow pattern recognition module may be a notebook computer, a desktop computer, a tablet computer, a smart television, a mobile phone, a robot, or the like.
It should be noted that, in some embodiments, the water flow pattern recognition module may also be referred to as a data processing module, a data analysis prediction module, etc., which the embodiments of the present application do not limit.
It should be noted that, for details of the implementation of the water flow pattern recognition module, detailed descriptions of the water gate safety recognition method are provided below, please refer to the descriptions of fig. 3 to fig. 12.
For convenience of description, in fig. 2, the image acquisition module is exemplified by the camera 11, and the water flow pattern recognition module is exemplified by the desktop computer 21.
The camera comprises a lens, an image sensor, a power supply, a controller and a communication sub-module, wherein the camera is in communication connection with the desktop computer through the communication sub-module, and communication data between the camera and the desktop computer can be mutual.
In some embodiments, communication between the camera and the desktop computer may be unidirectional for the camera to transmit to the desktop computer.
In some embodiments, the camera may continuously capture the image to be processed with the interval time Δt through a preset time interval, and it should be noted that the preset time interval may be set in the camera or may be issued to the camera through a desktop computer.
One or more images can be contained in the image to be processed, and along with the duration of the acquisition time, more and more image data in the image to be processed can be stored in a database or other modes, or the image data with identification characteristics can be screened out for storage, so that the data processing timeliness of the desktop computer is improved.
In some embodiments, the sluice safety identification system further comprises a correction module for correcting world coordinates corresponding to the positioning of the image to be processed.
It will be appreciated that turbulence of the water flow beneath the lock will generate bubbles or the like which are naturally occurring floats which facilitate the expression of the acquired image to be processed as trace particles.
And the correction module is used for establishing a relation between the shot image and world coordinates, so that the recognition of the water flow state recognition system in the sluice application scene is improved.
In some embodiments, the calibration module may set a plurality of calibration control points on the water surface, for example, the calibration control points may be Real-time kinematic (RTK) equipped with Real-TIME KINEMATIC.
As shown in fig. 2, 4 sensors 31 with RTKs may be deployed on the water surface, 4 sensors not on the same straight line, and adjacent lines are distributed in a quadrilateral shape.
By arranging the 4 calibration control points on the same horizontal plane, the two-dimensional coordinates of the real world plane can be determined.
In addition, if the world coordinates areThe corresponding image coordinates of the image to be processed are/>The conversion relation between world coordinates and image coordinates is established as follows:
where the coefficient λ is used to normalize the transformed coordinates, that is to say, scaling the value of the third dimension to 1, the homography matrix having 9 elements, but the degree of freedom being only 8, divided by Normalization was performed. Therefore, 8 equations can be established by 4 calibration control points to solve the parameters/>, in the homography matrixWherein i=0, 2; j=0, 2. That is, for any point/>, in the image coordinatesThe real world coordinates of the water flow scene under the sluice can be converted by the formula.
The embodiment of the application provides a sluice safety identification system, which can be used for acquiring images to be processed, containing tracer particles, of water flow under a sluice through an image acquisition module by constructing the system; the water flow state identification module can determine a planar two-dimensional flow field corresponding to the image to be processed according to a preset cross-correlation window and a cross-correlation algorithm, further determine flow velocity vectors of all cross-correlation windows in the image to be processed, further determine vortex values of all cross-correlation windows, and identify positions corresponding to water flow states under the sluice based on a preset judgment strategy and the vortex values.
Fig. 3 is a schematic flow chart of a sluice safety identification method according to an embodiment of the present application, and as shown in fig. 3, an embodiment of the present application provides a sluice safety identification method, which is applied to a sluice safety identification system.
The sluice safety identification method comprises the following steps:
S110, acquiring an image to be processed of the water flow under the gate.
The image to be processed contains trace particles, the trace particles are natural floaters generated by turbulence of water flow under the sluice, the floaters are objects floating on water and moving along with the water flow, and the natural floaters can be bubbles, leaves and the like.
It should be understood that the image to be processed refers to continuous images acquired by the image acquisition module, and the flow state change of the water flow is conveniently judged by acquiring the continuous images.
S120, determining a planar two-dimensional flow field corresponding to the image to be processed according to a preset cross-correlation window and a cross-correlation algorithm.
The plane two-dimensional flow field is determined by flow velocity vectors of all cross-correlation windows in the image to be processed.
It should be understood that the size of the image to be processed is w×h pixels, and the size of the preset cross-correlation window is m×n, where M may be equal to N or not, and M, N is less than W, H.
That is, each of the images to be processed may be divided into a plurality of cross-correlation windows.
Fig. 4 shows an image of the images to be processed in an embodiment of the present application, in which a cross-correlation window is marked, and the size of the window, it should be noted that black dots in the image represent trace particles.
In some embodiments, a planar two-dimensional flow field corresponding to an image to be processed may be determined by a cross-correlation algorithm or a fast cross-correlation algorithm, and fig. 5 is a schematic flow diagram illustrating a process of determining a planar two-dimensional flow field corresponding to an image to be processed in an embodiment of the present application, as shown in fig. 5, a process of determining a planar two-dimensional flow field corresponding to an image to be processed is as follows:
s210, dividing a first moment image in the image to be processed into a plurality of cross-correlation windows according to the size of a preset cross-correlation window.
Wherein the first time image and the second time image are two images of adjacent time, and the positions of the trace particles in the first time image and the second time image are changed. Fig. 6 shows a schematic diagram of a first time image and a second time image, where (a) in fig. 6 is the first time image, (B) in fig. 6 is the second time image, the same cross-correlation window is marked in both the first time image and the second time image, and fig. 6 shows that the position of the cross-correlation window in the image to be processed is shifted.
Fig. 7 shows the displacement of the position of the cross-correlation window in the image corresponding to the two moments in fig. 6, the movement of the coordinates corresponding to the cross-correlation window (deltax, deltay).
In some embodiments, in the first temporal image, the first temporal image is divided into a plurality of cross-correlation windows of size M x N.
S220, determining cross-correlation values corresponding to cross-correlation windows in the image at the second moment in the image to be processed.
In the second time image, a cross-correlation value R (i, j) corresponding to each cross-correlation window is calculated.
In some embodiments, the cross-correlation value may be determined by a normalized cross-correlation algorithm, whose corresponding expression is as follows:
Wherein R (i, j) is a cross-correlation value at a coordinate (i, j) in the image at the second moment, wherein i is a distance extending from the upper left corner to the right in each cross-correlation calculation window; j is the distance extending downward from the upper left corner in each cross-correlation calculation window;
(m, n) is the coordinates of each pixel in the image at the first moment in a cross-correlation window constructed by taking the motionless feature point as the corner point, wherein the motionless feature point is any pixel which can be used as the corner point of the cross-correlation window;
Is the average of the gray values of all pixels in the cross correlation window in the image at the second moment;
G (i, j) is the gray value at coordinate (i, j) in the image at the second moment;
g (i+m, j+n) is the gray value at coordinate (i+m, j+n) in the image at the second moment;
the pixel gray average value of a window constructed by taking the motionless feature points as corner points in the image at the first moment;
t (m, n) is a gray value at a coordinate (m, n) in a window constructed with (i 0, j 0) as a corner point in the first time image.
S230, determining a second position matched with the first position in the first time image in the second time image based on the cross-correlation value.
For a first position of the cross-correlation window at any position in the first time image, in the second time image, a corresponding matching second position in the second time image may be determined by the maximum value in the cross-correlation values.
S240, determining a planar two-dimensional flow field corresponding to the image to be processed according to the first position and the second position.
From the first and second positions, a displacement, e.g. corresponding (Δx, Δy) in fig. 7, can be determined, which occurs at the position of the cross correlation window.
In some embodiments, the displacement that occurs in the cross-correlation window position is determined by:
Δx=(i-i0)
Δy= (j-j0)
Δt=(T2-T1)
wherein, (i 0, j 0) is the angular point coordinates of the cross correlation window in the first moment image; (i, j) is the angular point coordinates of the cross-correlation window in the second moment image corresponding to (i 0, j 0) in the first moment image; t2 is the moment corresponding to the second moment image acquisition; t1 is the moment corresponding to the second moment image acquisition;
Δx is displacement in the horizontal direction, Δy is displacement in the vertical direction, and Δt is the time interval between the second time image and the first time image.
And then, through the displacement, determining a planar two-dimensional flow field corresponding to the image to be processed.
In some embodiments, the displacement generated by the cross-correlation window position corresponding to the above equation can be converted from the image coordinate to the displacement under the world coordinate by the conversion relationship between the world coordinate and the image coordinate, and can be converted by the following equation:
Where vx is the displacement in the horizontal direction, vy is the displacement in the vertical direction, and V is the displacement of the cross correlation window.
And further, by the displacement, determining a planar two-dimensional flow field in world coordinates corresponding to the image to be processed.
It should be understood that after the conversion relationship between the image coordinate system of the image to be processed and the world coordinate system is established, the world coordinate corresponding to the image to be processed may be determined based on the conversion relationship.
That is, the flow velocity vector of each cross-correlation window in the first moment image is determined, and the planar two-dimensional flow field is obtained after the flow velocity vector calculation of all cross-correlation windows is completed.
After step 120, as shown in fig. 3, step S130 is performed to determine the eddy current values for each cross-correlation window.
Fig. 8 shows a schematic diagram of one image in an image to be processed under a gate according to an embodiment of the present application, as shown in fig. 8, in a smooth schematic diagram corresponding to the image to be processed, the image to be processed is divided into a plurality of areas through cross-correlation windows, and flow field schematic diagrams corresponding to the cross-correlation windows are marked in the areas.
The vortex values of the cross-correlation window may be obtained by decomposing the flow velocity vector of the cross-correlation window into a horizontal flow velocity and a vertical flow velocity; determining a horizontal flow velocity gradient and a vertical flow velocity gradient of the cross-correlation window; the vortex values of the cross-correlation window are determined based on the horizontal and vertical flow gradients of the cross-correlation window.
In some embodiments, for each cross-correlation window, the eddy current value may be obtained by the following calculation:
du(i,j)=(u(i+1,j)-u(i-1,j))
dv(i,j)=(v(i,j+1)-v(i,j-1))
w(i,j)=dv(i,j)-du(i,j)
Where du (i, j) is the horizontal flow gradient at (i, j), dv (i, j) is the vertical flow gradient at (i, j), and w (i, j) is the vortex value of the corresponding cross correlation window.
FIG. 9 shows a vortex dispersion diagram of the cross-correlation window, and as shown in FIG. 9, the cross-correlation window on the cross-correlation window (i, j) is (i, j-1), the cross-correlation window on the lower side is (i, j+1), the cross-correlation window on the left side is (i-1, j), and the cross-correlation window on the right side is (i+1, j).
It should be appreciated that the flow velocity vector within each cross-correlation window (i, j) may be decomposed into a horizontal flow velocity u (i, j) and a vertical flow velocity v (i, j), and thus the vorticity value w (i, j) of the corresponding cross-correlation image may be calculated.
And S140, identifying the water flow state under the gate and the position corresponding to the water flow state based on a preset judging strategy and the vortex value.
It should be understood that the flow patterns are of different flow patterns, such as swirling flow, turbulent flow, cross-circulating flow, etc., wherein the cross-circulating flow may also be in the form of swirling flow or turbulent flow at the water flow surface. Thus, in the embodiment of the application, the recognition of swirling flow and folding flow is mainly adopted.
The preset judging strategies corresponding to the water flow patterns of different forms are different, wherein the preset judging strategies comprise judging cross-correlation windows with vorticity values larger than a preset vorticity threshold as vorticity, and the preset judging strategies also comprise judging cross-correlation windows with differences between the second included angle and the first included angle larger than a preset angle threshold as refraction and flushing flows; the first included angle is an included angle between the initial direction and the horizontal direction, and the second included angle is an included angle between the cross-correlation window and the horizontal direction.
It should be understood that, according to the position of the sluice in advance, the smooth flow direction of the water flow is selected as the initial direction of the water flow under the sluice, and an included angle θ, i.e. a first included angle, exists between the initial direction and the horizontal direction. Fig. 10 shows a schematic view of the first angle.
If the vortex value is larger than a preset vortex threshold, marking a first cross-correlation window corresponding to the vortex value as vortex, wherein the first cross-correlation window is one of the cross-correlation windows in the image to be processed, and the position corresponding to the first cross-correlation window is the position of the vortex.
And marking all cross-correlation windows with vortex values larger than a preset vortex quantity threshold Tw, namely w (i, j) > Tw, as vortex six, and identifying the position of the vortex. FIG. 11 is a schematic view showing the locations of the swirling flow corresponding to the image to be processed of FIG. 8, as shown in FIG. 11.
Further, calculating an arctangent value of a flow velocity vector of a second cross-correlation window in the cross-correlation windows, wherein the second cross-correlation window is a window except the first cross-correlation window in the cross-correlation windows; determining a second included angle between each second cross-correlation window and the horizontal direction based on the arctangent value; if the absolute value of the difference between the second included angle and the first included angle is larger than a preset angle threshold, marking a third cross-correlation window corresponding to the second included angle as a folded stream, wherein the first included angle is the included angle between the smooth flow direction of the water under the gate and the horizontal direction, the position corresponding to the third cross-correlation window is the folded stream position, and the third cross-correlation window is the cross-correlation window in the second cross-correlation window.
Wherein u (i, j) is positive and negative in the X direction, and v (i, j) is positive and negative in the Y direction.
Determining the arctangent value of the flow velocity vector of the second cross-correlation window in the cross-correlation windows can be obtained by calculating the following functions:
atan2(u(i,j),v(i,j))
when atan2 (u (i, j), v (i, j)) >0, Φ=atan2 (u (i, j), v (i, j))
When atan2 (u (i, j), v (i, j)) <0, Φ=2pi+atan2 (u (i, j), v (i, j))
Wherein phi is a second included angle.
And marking a third cross-correlation window of all |phi-theta| > Ta as a folded stream, wherein the position corresponding to the third cross-correlation window is the position of the folded stream.
Fig. 12 is a schematic diagram of the positions of the corresponding identified folded streams of the image to be processed in fig. 8, and as shown in fig. 12, the diagrams show the positions of the folded streams.
In some embodiments, the flow state of the water can be automatically identified based on the image, and a safety pre-warning is performed, wherein the safety pre-warning mode can send warning information to staff through a sluice safety identification system, warning sound can be prompted through the sluice safety identification system, and the warning sound can be the same or different warning music or voice and the like.
The embodiment of the application provides a sluice safety identification method, which comprises the steps of acquiring an image to be processed containing tracer particles of water flow under a sluice, determining a planar two-dimensional flow field corresponding to the image to be processed according to a preset cross-correlation window and a cross-correlation algorithm, namely determining a flow velocity vector of each cross-correlation window in the image to be processed, further determining the vortex value of each cross-correlation window, and identifying the water flow state under the sluice and the position corresponding to the water flow state based on a preset judgment strategy and the vortex value.
In some embodiments, the present application provides a computer device, including a memory and a processor, where the memory stores a computer program, and the processor implements the steps of the aforementioned sluice safety identification method when executing the computer program.
In some embodiments, the present application provides a computer readable storage medium, where a computer program is stored, where the computer program when executed by a processor causes the processor to perform the steps of the sluice safety identification method described above.
The following paragraphs will contrast the chinese terms referred to in the description of the present application with their corresponding english terms for ease of reading and understanding.
The foregoing description, for purposes of explanation, has been presented in conjunction with specific embodiments. The above discussion in some examples is not intended to be exhaustive or to limit the embodiments to the precise forms disclosed above. Many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles and the practical application, to thereby enable others skilled in the art to best utilize the embodiments and various embodiments with various modifications as are suited to the particular use contemplated.
Claims (8)
1. A method for identifying sluice safety, the method comprising:
Acquiring an image to be processed of the water flow under the gate, wherein the image to be processed contains trace particles;
Determining a planar two-dimensional flow field corresponding to the image to be processed according to a preset cross-correlation window and a cross-correlation algorithm, wherein the planar two-dimensional flow field is determined by flow velocity vectors of all cross-correlation windows in the image to be processed;
Determining the vorticity value of each cross-correlation window;
based on a preset judging strategy and the vorticity value, identifying the water flow state under the gate and the position corresponding to the water flow state, wherein:
If the vorticity value is greater than a preset vorticity threshold, marking a first cross-correlation window corresponding to the vorticity value as vorticity, wherein the first cross-correlation window is one of the images to be processed, and the preset judging strategy comprises judging the cross-correlation window with the vorticity value greater than the preset vorticity threshold as vorticity; the corresponding position of the first cross correlation window is the position of the swirling flow;
Calculating an arctangent value of a flow velocity vector of a second cross-correlation window in the cross-correlation windows, wherein the second cross-correlation window is a window except the first cross-correlation window in the cross-correlation windows; determining a second included angle between each second cross-correlation window and the horizontal direction based on the arctangent value;
If the absolute value of the difference between the second included angle and the first included angle is larger than a preset angle threshold, marking a third cross-correlation window corresponding to the second included angle as a folded stream, wherein the first included angle is an included angle between the smooth flow direction of the water flow under the gate and the horizontal direction, the preset judging strategy comprises judging the cross-correlation window with the absolute value of the difference between the second included angle and the first included angle larger than the preset angle threshold as the folded stream, and the third cross-correlation window is a cross-correlation window in the second cross-correlation window; and the position corresponding to the third cross-correlation window is the position of the folded stream.
2. The method of claim 1, wherein said determining the vorticity value of each of said cross-correlation windows comprises:
decomposing the flow velocity vector of the cross-correlation window into a horizontal flow velocity and a vertical flow velocity;
Determining a horizontal flow velocity gradient and a vertical flow velocity gradient of the cross-correlation window;
The vortex values of the cross-correlation window are determined based on the horizontal and vertical flow gradients of the cross-correlation window.
3. The method for identifying the sluice safety according to claim 1, wherein the determining the planar two-dimensional flow field corresponding to the image to be processed according to the preset cross-correlation window and the cross-correlation algorithm comprises:
Dividing a first moment image in the images to be processed into a plurality of cross-correlation windows according to the size of a preset cross-correlation window;
Determining cross-correlation values corresponding to cross-correlation windows in a second moment image in the image to be processed, wherein the first moment image and the second moment image are two images of adjacent moments in the image to be processed;
determining a second position in the second moment image, which is matched with the first position in the first moment image, based on the cross-correlation value;
And determining a planar two-dimensional flow field corresponding to the image to be processed according to the first position and the second position.
4. The method for identifying the sluice safety according to claim 1, further comprising, before the determining the planar two-dimensional flow field corresponding to the image to be processed according to a preset cross-correlation window and a cross-correlation algorithm:
establishing a conversion relation between an image coordinate system of the image to be processed and a world coordinate system;
and determining world coordinates corresponding to the image to be processed based on the conversion relation.
5. A floodgate safety recognition system, the system comprising:
the image acquisition module is used for acquiring an image to be processed of the water flow under the gate;
The water flow state identification module is used for determining a planar two-dimensional flow field corresponding to the image to be processed according to a preset cross-correlation window and a cross-correlation algorithm, wherein the planar two-dimensional flow field is determined by flow velocity vectors of all cross-correlation windows in the image to be processed;
The water flow state identification module is further used for determining the vortex value of each cross-correlation window;
The water flow state identification module is further configured to identify a position of the water flow state under the gate corresponding to the water flow state based on a preset determination policy and the vorticity value, where if the vorticity value is greater than a preset vorticity threshold, a first cross-correlation window corresponding to the vorticity value is marked as a vorticity, and the first cross-correlation window is one of the images to be processed, and the preset determination policy includes determining the cross-correlation window with the vorticity value greater than the preset vorticity threshold as a vorticity; the corresponding position of the first cross correlation window is the position of the swirling flow;
And further for calculating an arctangent value of a flow velocity vector of a second one of the cross-correlation windows, the second cross-correlation window being a window of the cross-correlation windows other than the first cross-correlation window; determining a second included angle between each second cross-correlation window and the horizontal direction based on the arctangent value;
If the absolute value of the difference between the second included angle and the first included angle is larger than a preset angle threshold, marking a third cross-correlation window corresponding to the second included angle as a folded stream, wherein the first included angle is an included angle between the smooth flow direction of the water flow under the gate and the horizontal direction, the preset judging strategy comprises judging the cross-correlation window with the absolute value of the difference between the second included angle and the first included angle larger than the preset angle threshold as the folded stream, and the third cross-correlation window is a cross-correlation window in the second cross-correlation window; and the position corresponding to the third cross-correlation window is the position of the folded stream.
6. The floodgate safety recognition system according to claim 5, further comprising:
And the correction module is used for positioning world coordinates corresponding to the image to be processed.
7. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the sluice safety identification method of any of claims 1 to 4.
8. A computer readable storage medium having stored thereon a computer program, characterized in that the computer program, when executed by a processor, causes the processor to perform the steps of the sluice safety identification method according to any of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410238471.XA CN117831035B (en) | 2024-03-04 | 2024-03-04 | Sluice safety identification method, sluice safety identification system and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410238471.XA CN117831035B (en) | 2024-03-04 | 2024-03-04 | Sluice safety identification method, sluice safety identification system and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN117831035A CN117831035A (en) | 2024-04-05 |
CN117831035B true CN117831035B (en) | 2024-05-03 |
Family
ID=90517597
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410238471.XA Active CN117831035B (en) | 2024-03-04 | 2024-03-04 | Sluice safety identification method, sluice safety identification system and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117831035B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH10123163A (en) * | 1996-10-22 | 1998-05-15 | Toyota Central Res & Dev Lab Inc | Flow rate distribution measuring method |
CN110988391A (en) * | 2019-12-12 | 2020-04-10 | 北京机电工程研究所 | Experimental method for measuring unsteady cavitation flow field velocity |
CN115828783A (en) * | 2022-12-06 | 2023-03-21 | 水利部南京水利水文自动化研究所 | Intelligent avoiding method and system for sluice flow induced vibration |
CN117434529A (en) * | 2023-10-20 | 2024-01-23 | 龙岩学院 | Swimming movement real-time speed measuring method, system and storage medium based on image processing |
-
2024
- 2024-03-04 CN CN202410238471.XA patent/CN117831035B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH10123163A (en) * | 1996-10-22 | 1998-05-15 | Toyota Central Res & Dev Lab Inc | Flow rate distribution measuring method |
CN110988391A (en) * | 2019-12-12 | 2020-04-10 | 北京机电工程研究所 | Experimental method for measuring unsteady cavitation flow field velocity |
CN115828783A (en) * | 2022-12-06 | 2023-03-21 | 水利部南京水利水文自动化研究所 | Intelligent avoiding method and system for sluice flow induced vibration |
CN117434529A (en) * | 2023-10-20 | 2024-01-23 | 龙岩学院 | Swimming movement real-time speed measuring method, system and storage medium based on image processing |
Also Published As
Publication number | Publication date |
---|---|
CN117831035A (en) | 2024-04-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Ranasinghe et al. | Shoreline response to multi-functional artificial surfing reefs: A numerical and physical modelling study | |
CN114782905B (en) | Ship draft detection method based on video monitoring | |
Stolle et al. | Optical tracking of floating shipping containers in a high-velocity flow | |
CN101214851A (en) | Intelligent all-weather actively safety early warning system and early warning method thereof for ship running | |
CN104200485A (en) | Video-monitoring-oriented human body tracking method | |
CN110060508A (en) | A kind of ship automatic testing method for inland river bridge zone | |
CN113989510B (en) | River drainage outlet overflow detection method and device and related equipment | |
CN117078953B (en) | Bridge ship collision prevention lightweight multi-stage early warning method based on visual images | |
CN109242019A (en) | A kind of water surface optics Small object quickly detects and tracking | |
Wu et al. | A new multi-sensor fusion approach for integrated ship motion perception in inland waterways | |
CN114596536A (en) | Unmanned ship coastal inspection method and device, computer equipment and storage medium | |
Zhou et al. | YOLO-ship: a visible light ship detection method | |
Zhang et al. | A warning framework for avoiding vessel‐bridge and vessel‐vessel collisions based on generative adversarial and dual‐task networks | |
CN115171336B (en) | Beach control drowning protection system | |
CN107169412B (en) | Remote sensing image harbor-berthing ship detection method based on mixed model decision | |
CN117831035B (en) | Sluice safety identification method, sluice safety identification system and storage medium | |
Lee et al. | Application of vision-based safety warning system to Haeundae beach, Korea | |
CN117218546A (en) | River channel surface water flow speed detection method based on video stream image processing | |
CN117576168A (en) | Water flow speed estimation method and system based on traditional optical flow calculation | |
CN117437543A (en) | Method, system, electronic equipment and storage medium for identifying offshore floating ice | |
Valčić et al. | Hybrid method for estimating wind loads on ships based on elliptic Fourier analysis and radial basis neural networks | |
CN108182320B (en) | Inland waterway-oriented free drift object stranding probability distribution calculation method | |
Fenical et al. | Numerical modeling of passing vessel impacts on berthed vessels and shoreline | |
Malavasi et al. | Wall effects on the flow structure around a rectangular cylinder | |
CN108198214A (en) | The extraction of sea drift rubbish and area computation method based on video monitoring |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |