A method, device, electronic device and storage medium for monitoring water level height

By calibrating virtual reference points on the water level monitoring image and calculating intersection points, the problems of high cost and poor on-site adaptability of traditional water level monitoring methods are solved, and low-cost, intuitive and efficient water level height monitoring is achieved.

CN114140518BActive Publication Date: 2025-06-27HANGZHOU HIKVISION SYST TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111425874.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-26
Publication Date
2025-06-27
Estimated Expiration
2041-11-26

AI Technical Summary

Technical Problem

Traditional water level height monitoring methods are costly and have limited on-site adaptability, making it difficult for the prior art to provide intuitive and economical water level monitoring solutions.

Method used

By calibrating the virtual reference point on the water level monitoring image, establishing the correspondence between the virtual reference point and the actual water level height, determining the intersection point between the virtual reference line and the water area, and then calculating the water level height. This method does not require manual on-site measurements and enables monitoring without a water ruler.

Benefits of technology

It realizes low-cost water level height monitoring, has strong on-site adaptability, and can accurately obtain the actual water level height of the monitored water area.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114140518B_ABST
    Figure CN114140518B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a water level height monitoring method, device, electronic device, and storage medium, which relate to the technical field of water level monitoring. The water level height monitoring method includes: calibrating a preset number of virtual reference points on a water level monitoring image; establishing a correspondence between each virtual reference point and the actual water level height; determining the intersection points of the virtual reference line formed by the virtual reference points and the water area in the monitoring image; and determining the water level height of the water area in the monitoring image according to the intersection points, each virtual reference point, and the actual water level height corresponding to each virtual reference point.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of water level height monitoring, and particularly to a water level height monitoring method, device, electronic device, and storage medium. Background Art

[0002] There are usually two traditional methods for water level height monitoring. One is to use sensors such as float type, radar type, pressure type, ultrasonic type, etc. to automatically collect analog quantities representing the water level, and then convert them into water level data. Although the reliability of the monitoring data of this method is relatively high, it is not intuitive enough and the cost is very high. The other method is to install a water gauge and read the value manually on-site or remotely through a camera. This method is only applicable to the occasions where a water gauge is installed on-site, and the on-site adaptability is limited. Summary of the Invention

[0003] In view of this, the embodiments of this application provide a water level height monitoring method, device, electronic device, and storage medium, which have low cost and strong on-site adaptability.

[0004] In a first aspect, the embodiments of this application provide a water level height monitoring method, including: calibrating a preset number of virtual reference points on a water level monitoring image; establishing a corresponding relationship between each virtual reference point and the actual water level height; determining the intersection points of the virtual reference line formed by the virtual reference points and the water area in the monitoring image; and determining the water level height of the water area in the monitoring image according to the intersection points, each virtual reference point, and the actual water level height corresponding to each virtual reference point.

[0005] According to an implementable manner of the embodiments of this application, determining the intersection points of the virtual reference line formed by the virtual reference points and the water area in the monitoring image includes: extracting the contour of the water area in the monitoring image; and determining the intersection points of the virtual reference line formed by the virtual reference points and the contour of the water area.

[0006] According to an implementable manner of the embodiments of this application, the determining the intersection points of the virtual reference line and the contour of the water area includes: establishing a virtual straight line equation according to the coordinates of two virtual reference points in the image coordinate system; substituting the coordinate values of each pixel point on the contour of the water area into the virtual straight line equation respectively, and calculating the deviation of the numerical values on both sides of the virtual straight line equation; determining whether the calculated deviation is less than a first preset threshold, and putting the pixel points with the deviation less than the first preset threshold into an intersection point set; determining the number of pixel points in the intersection point set; if the number of pixel points in the intersection point set is 1, determining the pixel point in the intersection point set as the intersection point of the reference line and the contour of the water area; if the number of pixel points in the intersection point set is greater than 1, screening and determining the intersection point of the reference line and the contour of the water area from the intersection point set according to a preset screening rule.

[0007] According to an implementable manner of an embodiment of the present application, screening and determining the intersection points of the reference line and the contour of the water area from the intersection point set according to a preset screening rule includes: calculating the distances between each pixel point in the intersection point set and a preset virtual reference point; determining, as the intersection point of the virtual reference line formed by the virtual reference point and the contour of the water area, the pixel point with the smallest distance from the preset virtual reference point among the intersection point set.

[0008] According to an implementable manner of an embodiment of the present application, determining the water level height of the water area in the monitoring image according to the intersection points, each virtual reference point, and the actual water level height corresponding to each virtual reference point includes: determining the water level height of the water area in the monitoring image according to the abscissa and ordinate values of the intersection points and each virtual reference point in the image coordinate system, and the actual water level height corresponding to each virtual reference point.

[0009] According to an implementable manner of an embodiment of the present application, the number of virtual reference points is three; wherein, determining the water level height of the water area in the monitoring image according to the abscissa and ordinate values of the intersection points and each virtual reference point in the image coordinate system, and the actual water level height corresponding to each virtual reference point includes:

[0010] Calculating a first height value of the water area in the monitoring image according to the following formula (1); calculating a second height value of the water area in the monitoring image according to the following formula (2); determining the water level height L of the water area in the monitoring image based on the first height value and the second height value according to a preset rule D :

[0011]

[0012]

[0013] Wherein, M is the intermediate value, and M is determined according to the following formula:

[0014]

[0015] L A is the actual water level height value corresponding to the virtual reference point A; L B is the actual water level height value corresponding to the virtual reference point B; L c is the actual water level height value corresponding to the virtual reference point C; ac is the pixel distance between the virtual reference points A and C; bc is the pixel distance between the virtual reference points B and C; bd is the pixel distance between the virtual reference points B and the D point; the D point is the intersection point of the virtual reference line and the contour of the water area; ad is the pixel distance between the virtual reference point A and the intersection point D.

[0016] In an implementable manner according to an embodiment of the present application, determining the water level height of the water area in the monitoring image based on the first height value and the second height value according to a preset rule includes: determining the average value of the first water level height value and the second water level height value as the water level height of the water area in the monitoring image; or determining the water level height of the water area in the monitoring image according to the positional relationship between the intersection point and adjacent virtual reference points on the virtual reference line and the actual water level height values corresponding to the adjacent virtual reference points.

[0017] In an implementable manner according to an embodiment of the present application, determining the water level height of the water area in the monitoring image according to the intersection point, each virtual reference point, and the actual water level height corresponding to each virtual reference point includes: determining the water level height of the water area in the monitoring image according to the ordinate value of the intersection point in the image coordinate system, the ordinate values of each virtual reference point in the image coordinate system, and the actual water level height corresponding to the ordinate of each virtual reference point.

[0018] In an implementable manner according to an embodiment of the present application, the number of virtual reference points is two;

[0019] Among them, determining the water level height of the water area in the monitoring image according to the ordinate value of the intersection point in the image coordinate system, the ordinate values of each virtual reference point in the image coordinate system, and the actual water level height corresponding to the ordinate of each virtual reference point includes:

[0020] Determine the water level height L of the water area in the monitoring image according to the following formula D :

[0021]

[0022] Among them, L A is the actual water level height value corresponding to the virtual reference point A;

[0023] L B is the actual water level height value corresponding to the virtual reference point B;

[0024] y d is the ordinate value of the intersection point in the image coordinate system;

[0025] y a is the ordinate value of the virtual reference point A in the image coordinate system;

[0026] y b is the ordinate value of the virtual reference point B in the image coordinate system.

[0027] In a second aspect, an embodiment of the present application provides a water level height monitoring device, including: a reference point calibration module for calibrating a preset number of virtual reference points on a water level monitoring image; a water level relationship establishment module for establishing a corresponding relationship between each virtual reference point and the actual water level height; an intersection determination module for determining the intersection points of the virtual reference line formed by the virtual reference points and the water area in the monitoring image; and a water level height determination module for determining the water level height of the water area in the monitoring image according to the intersection points, each virtual reference point, and the actual water level height corresponding to each virtual reference point.

[0028] According to an implementable manner of an embodiment of the present application, the intersection determination module includes: a contour extraction sub-module for extracting the contour of the water area in the monitoring image; and an intersection determination sub-module for determining the intersection points of the virtual reference line and the contour of the water area.

[0029] According to an implementable manner of an embodiment of the present application, the intersection determination sub-module is specifically configured to: establish a virtual straight line equation according to the coordinates of two virtual reference points in the image coordinate system; substitute the coordinate values of each pixel point on the contour of the water area into the virtual straight line equation respectively, and calculate the deviation of the numerical values on both sides of the virtual straight line equation; determine whether the calculated deviation is less than a first preset threshold, and put the pixel points with the deviation less than the first preset threshold into an intersection set; determine the number of pixel points in the intersection set; if the number of pixel points in the intersection set is 1, determine the pixel point in the intersection set as the intersection point of the reference line and the contour of the water area; if the number of pixel points in the intersection set is greater than 1, screen and determine the intersection point of the reference line and the contour of the water area from the intersection set according to a preset screening rule.

[0030] According to an implementable manner of an embodiment of the present application, the step of screening and determining the intersection point of the reference line and the contour of the water area from the intersection set according to a preset screening rule includes: calculating the distance between each pixel point in the intersection set and a preset virtual reference point; and determining the pixel point with the minimum distance from the preset virtual reference point in the intersection set as the intersection point of the virtual reference line and the contour of the water area.

[0031] According to an implementable manner of an embodiment of the present application, the water level height determination module is specifically configured to: determine the water level height of the water area in the monitoring image according to the abscissa and ordinate values of the intersection points and each virtual reference point in the image coordinate system, and the actual water level height corresponding to each virtual reference point.

[0032] According to an implementable manner of an embodiment of the present application, the number of the virtual reference points is three;

[0033] The water level height determination module includes: a first calculation sub-module for calculating a first height value of the water area in the monitoring image according to the following formula (1);

[0034] a second calculation sub-module for calculating a second height value of the water area in the monitoring image according to the following formula (2);

[0035] a water level height determination sub-module for determining the water level height L of the water area in the monitoring image based on the first height value and the second height value according to a preset rule D :

[0036]

[0037]

[0038] where M is an intermediate value, and M is determined according to the following formula:

[0039]

[0040] L A is the actual water level height value corresponding to the virtual reference point A; L B is the actual water level height value corresponding to the virtual reference point B; L c is the actual water level height value corresponding to the virtual reference point C; ac is the pixel distance between the virtual reference points A and C; bc is the pixel distance between the virtual reference points B and C; bd is the pixel distance between the virtual reference points B and D; the point D is the intersection point of the virtual reference line and the contour of the water area; ad is the pixel distance between the virtual reference point A and the intersection point D..

[0041] According to an implementable manner of an embodiment of the present application, the water level height determination sub-module is specifically configured to: determine the average value of the first water level height value and the second water level height value as the water level height of the water area in the monitoring image; or, determine the water level height of the water area in the monitoring image according to the position of the intersection point of the virtual reference line and the contour of the water area on the virtual reference line and the actual water level height value corresponding to the virtual reference point adjacent to the intersection point.

[0042] According to an implementable manner of an embodiment of the present application, the water level height determination module is specifically configured to: determine the water level height of the water area in the monitoring image according to the ordinate value of the intersection point in the image coordinate system, the ordinate values of each virtual reference point in the image coordinate system, and the actual water level height corresponding to the ordinate of each virtual reference point.

[0043] According to an implementable manner of an embodiment of the present application, the number of virtual reference points is two; wherein, the water level height determination module is specifically configured to: determine the water level height L of the water area in the monitoring image according to the following formula D :

[0044]

[0045] wherein, L A is the actual water level height value corresponding to the virtual reference point A;

[0046] L B is the actual water level height value corresponding to the virtual reference point B;

[0047] y d is the ordinate value of the intersection point in the image coordinate system;

[0048] y a is the ordinate value of the virtual reference point A in the image coordinate system;

[0049] y b is the ordinate value of the virtual reference point B in the image coordinate system.

[0050] In a third aspect, an embodiment of the present application provides an electronic device, including: a processor and a memory; the memory is used to store executable program codes; the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, and is used to execute the water level height monitoring method described in any of the foregoing implementable manners.

[0051] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the water level height monitoring method described in any of the foregoing implementable manners.

[0052] For the water level height monitoring method, device, electronic device and storage medium according to the embodiments of the present application, by virtualizing reference points on the water area monitoring image and establishing the corresponding relationship between each virtual reference point and the actual water level height, the actual water level height of the water area in the monitoring image can be determined according to the intersection point of the virtual reference line formed by the virtual reference points and the water area in the monitoring image, each virtual reference point, and the actual water level height corresponding to each virtual reference point. In this way, the actual water level height of the monitored water area can be obtained without manual on-site measurement, and the cost is relatively low; in addition, even if there is no water gauge in the monitored water area, the actual water level height of the monitored water area can be obtained through image recognition of the water area monitoring image, which has strong on-site adaptability. Description of the Drawings

[0053] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0054] Figure 1 It is a schematic flowchart of the water level height monitoring method according to an embodiment of the present application;

[0055] Figure 2 For Figure 1 It is a schematic flowchart of step S14 in

[0056] Figure 3 It is a schematic diagram of marking training materials according to an embodiment of the present application;

[0057] Figure 4 It is a schematic diagram of superimposing virtual reference points on the binary image obtained according to an embodiment of the present application;

[0058] Figure 5 It is a schematic diagram of superimposing virtual reference points on the binary image obtained according to another embodiment of the present application;

[0059] Figure 6 For Figure 4 It is a schematic diagram of different regions divided by virtual reference points on the binary image of

[0060] Figure 7 It is a block diagram of the water level height monitoring device according to an embodiment of the present application;

[0061] Figure 8 It is a block diagram of an electronic device according to an embodiment of the present application. Detailed implementation manners

[0062] The following will describe the embodiments of the present application in detail with reference to the drawings. It should be clear that the described embodiments are only some embodiments of the present application, rather than all embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts belong to the scope of protection of the present application.

[0063] Figure 1 It is a schematic flowchart of the water level height monitoring method according to an embodiment of the present application. Refer to Figure 1 In this embodiment, the water level height monitoring method includes the steps:

[0064] S11. Calibrate a preset number of virtual reference points on the water level monitoring image.

[0065] The water level monitoring image can be a monitoring image obtained by collecting images of a certain or certain areas of rivers, lakes or other water areas through a monitoring camera. The monitoring image can be a video or a picture.

[0066] The monitoring image can be a real-time acquired monitoring image for real-time monitoring and analysis of the water level in the monitoring area. The monitoring image can also be a historical monitoring image for historical water level tracking analysis of the water level at a certain past time point in the monitoring area.

[0067] Before calibrating virtual reference points on the water level monitoring image, it is necessary for manual workers to first determine the actual reference points and the actual water level heights corresponding to each actual reference point on-site in the monitoring area.

[0068] The actual reference points can be a predetermined number of reference points calibrated on actual reference objects on-site in the monitoring area. The number of actual reference points can be two, three or other multiple numbers. Different actual reference points are set at intervals vertically.

[0069] The actual reference objects can be bridge piers, shore steps, trees and other markers, or can also be water gauges placed, or can also be actual reference lines drawn on the markers, etc.

[0070] After the actual reference points are determined, the actual water level heights of each actual reference point can be determined.

[0071] For example, on the placed water gauge, three actual reference points A0, B0, and C0 are calibrated from top to bottom, and the actual water level heights of these three actual reference points are respectively denoted as L A 、L B 、L C .

[0072] The actual water level height L A of the actual reference point A0 on this water gauge is: the sum of the 0-point reference elevation of this water gauge and the indicated height of the actual reference point A0 on this water gauge. For example, if the 0-point reference elevation of this water gauge is 10 meters and the indicated height of the actual reference point A0 on this water gauge is 9 meters, then the actual water level height L A of the actual reference point A0 is 19 meters.

[0073] Similarly, the actual water level heights of the actual reference points B0 and C0 can be determined. That is, if the indicated height of the calibrated point B0 on this water gauge is 6 meters, then the actual water level height L B of the actual reference point B0 is 16 meters; if the indicated height of the calibrated point C0 on this water gauge is 3 meters, then the actual water level height L C of the actual reference point C0 is 13 meters.

[0074] The actual reference points may all be located above the water surface at that time. The embodiments of the present application are not limited to this. In other embodiments, the lowermost one or two actual reference points may also be located below the water surface at that time.

[0075] Regarding the calibration of the virtual reference points, the monitoring images may be displayed on the display interface of an electronic device (such as a desktop computer or a handheld terminal device, etc.), and the virtual reference points may be calibrated manually on the displayed monitoring images by using a drawing tool. Specifically, the virtual reference points may be calibrated with reference to the images of the actual reference points displayed on the monitoring images.

[0076] In one example, the virtual reference points may be calibrated on the images of the actual reference points displayed on the monitoring images, that is, the virtual reference points overlap with the images of the actual reference points.

[0077] For example, the actual reference object is an actual water gauge. The actual reference point A0 is at the 9-meter scale of the actual water gauge, the actual reference point B0 is at the 6-meter scale of the actual water gauge, and the actual reference point C0 is at the 3-meter scale of the actual water gauge. The images of the three actual reference points A0, B0, and C0 are displayed on the monitoring image.

[0078] During calibration, the virtual reference point A may be calibrated at the image position of the actual reference point A0, and the virtual reference point A overlaps with the image of the actual reference point A0; similarly, the virtual reference point B may be calibrated at the image position of the actual reference point B0, and the virtual reference point B overlaps with the image of the actual reference point B0; the virtual reference point C may be calibrated at the image position of the actual reference point C0, and the virtual reference point C overlaps with the image of the actual reference point C0.

[0079] In another example, the virtual reference points may be calibrated on the sides of the images of the actual reference points displayed on the monitoring images, and the height values of the virtual reference points and the images of the actual reference points in the vertical coordinate direction in the same image coordinate system are made consistent (that is, the height of the virtual reference point from the water surface in the image is the same as the height of the image of the actual reference point from the water surface in the image).

[0080] For example, the actual reference object is an actual water gauge. The actual reference point A0 is at the 9-meter scale of the actual water gauge, the actual reference point B0 is at the 6-meter scale of the actual water gauge, and the actual reference point C0 is at the 3-meter scale of the actual water gauge. The images of the three actual reference points A0, B0, and C0 are displayed on the monitoring image.

[0081] During calibration, a virtual reference point A can be calibrated at the 9-meter scale on the water gauge image. The virtual reference point A is located on the side of the actual reference point A0 and does not overlap with the actual reference point A0. Similarly, a virtual reference point B can be calibrated at the 6-meter scale on the water gauge image. The virtual reference point B is located on the side of the image of the actual reference point B0 and does not overlap with the image of the actual reference point B0. A virtual reference point C can be calibrated at the 3-meter scale on the water gauge image. The virtual reference point C is located on the side of the image of the actual reference point C0 and does not overlap with the image of the actual reference point C0.

[0082] S12. Establish the correspondence between each virtual reference point and the actual water level height.

[0083] The actual water level height of the actual reference point corresponding to each virtual reference point is the actual water level height corresponding to each virtual reference point.

[0084] For example, if the actual water level height of the actual reference point A0 corresponding to the virtual reference point A is 19 meters, the actual water level height of the actual reference point B0 corresponding to the virtual reference point B is 16 meters, and the actual water level height of the actual reference point C0 corresponding to the virtual reference point C is 13 meters, then the actual water level height corresponding to the virtual reference point A is 19 meters, the actual water level height corresponding to the virtual reference point B is 16 meters, and the actual water level height corresponding to the virtual reference point C is 13 meters.

[0085] The actual water level heights corresponding to the virtual reference points A, B, and C can be input in the water level height input interface to establish the correspondence between each virtual reference point and the actual water level height.

[0086] For example, for the virtual reference point A, input its corresponding actual water level height of 19 meters; for the virtual reference point B, input its corresponding actual water level height of 16 meters; for the virtual reference point C, input its corresponding actual water level height of 13 meters. In this way, the correspondence between the virtual reference point A and the actual water level height of 19 meters, the correspondence between the virtual reference point B and the actual water level height of 16 meters, and the correspondence between the virtual reference point C and the actual water level height of 13 meters can be established.

[0087] S13. Determine the intersection points of the virtual reference line formed by each virtual reference point and the water area in the monitoring image.

[0088] The virtual reference line formed by each virtual reference point can be a vertical straight line (see Figure 4 ), or it can be an inclined straight line (see Figure 5 ).

[0089] Optionally, when the virtual reference line formed by each virtual reference point is an inclined straight line, the virtual reference line is perpendicular to the water-land boundary, so that the intersection point of the virtual reference line and the water surface can be determined more accurately in the subsequent process, thereby improving the accuracy of water level height monitoring.

[0090] The virtual reference line formed by each virtual reference point can be displayed on the monitoring image or not. If the virtual reference line is displayed on the monitoring image, it can be manually drawn on the monitoring image according to the positions of each virtual reference point, for example, connecting each virtual reference point to draw the virtual reference line; or it can be automatically drawn by running relevant algorithms, for example, automatically connecting each virtual reference point to generate the virtual reference line.

[0091] When the virtual reference line formed by each virtual reference point is displayed on the monitoring image, it can intersect with the water surface displayed in the monitoring image, so as to more intuitively see the intersection position of the virtual reference line and the water surface displayed in the monitoring image.

[0092] When the virtual reference line formed by each virtual reference point is displayed on the monitoring image, it may not intersect with the water surface displayed in the monitoring image. In specific calculations, the intersection position of the virtual reference line and the water surface displayed in the monitoring image can be automatically calculated according to each virtual reference point.

[0093] Through image recognition, the water area in the monitoring image can be recognized, and the intersection points of the virtual reference line formed by each virtual reference point and the water area in the monitoring image can be determined.

[0094] S14. Determine the water level height of the water area in the monitoring image according to the intersection points, each virtual reference point, and the actual water level height corresponding to each virtual reference point.

[0095] After determining the intersection points of the virtual reference line and the water area in the monitoring image, according to the mapping relationship between the image space and the actual physical space, the actual water level height corresponding to the intersection points can be obtained, which is the water level height of the water area in the monitoring image.

[0096] In the embodiment of the present application, by calibrating a preset number of virtual reference points on the monitoring image and establishing the corresponding relationship between each virtual reference point and the actual water level height, the actual water level height of the water area in the monitoring image can be determined according to the intersection points of the virtual reference line formed by the virtual reference points and the water area in the monitoring image, each virtual reference point, and the actual water level height corresponding to each virtual reference point. In this way, it is not necessary to manually measure on site, and the actual water level height of the monitored water area can also be obtained, with low cost; in addition, even if there is no water gauge in the monitored water area, the actual water level height of the monitored water area can be obtained through image recognition of the water area monitoring image, which has strong on-site adaptability.

[0097] In one embodiment, the semantic segmentation algorithm for water area extraction can be used to recognize the water area in the image, so as to determine the intersection points of the virtual reference line and the water area in the image.

[0098] Specifically, see Figure 2, determining the intersection points of the virtual reference line formed by each virtual reference point and the water area in the monitoring image (step S13) may include the steps:

[0099] S131. Extract the contour of the water area in the monitoring image.

[0100] The semantic segmentation algorithm for water area extraction can be used to identify the monitoring image, and the contour of the water area is extracted from the recognition result.

[0101] Semantic segmentation is a special classification that classifies each pixel point of the input image, and each pixel in the image has its own category. The semantic segmentation algorithm for water area extraction can be obtained based on deep learning technology through the calibration and training of a large number of water area materials. Among them, the training material markings can be as Figure 3 shown.

[0102] For example, for an image with a size of M*N (M is the number of pixel points in the width direction of the image, and N is the number of pixel points in the height direction of the image), the steps of extracting the contour of the water area from it using the semantic segmentation algorithm for water area extraction may include the steps:

[0103] S1311. Perform semantic recognition on the image to obtain a two-dimensional matrix of M*N.

[0104] S1312. Perform binarization processing on the pixel values in the image.

[0105] When performing binarization processing, the pixel values of each pixel point in the water surface area of the image are set to 255, such as the white area in the Figure 4 shown image, and the pixel values of each pixel point in the background areas such as the embankment are set to 0, such as the black area in the Figure 4 shown image.

[0106] The image obtained after performing binarization processing on the pixel values in the image can be called a binary image.

[0107] S1313. Extract the contour of the water area in the binary image.

[0108] Using the contour extraction function, extract the contour of the water area in the binary image (the boundary line surrounding the white area in the figure) to obtain a contour array P containing the coordinates of each pixel point on the contour.

[0109] S132. Determine the intersection points of the virtual reference line formed by each virtual reference point and the contour of the water area.

[0110] Overlay the calibrated virtual reference points on the binary image. In one example, as Figure 4 shown, A, B, and C are three virtual reference points overlaid on the binary image, and the straight line passing through points A, B, and C is the virtual reference line.

[0111] Determining the intersection points of the virtual reference line formed by virtual reference points and the contour of the water area may include the steps of:

[0112] S1321. Establish a virtual straight-line equation.

[0113] In one example, any two of the three virtual reference points can be selected, and based on the coordinates of the two selected points in the image coordinate system, a virtual straight-line equation in the image coordinate system is established.

[0114] Among them, the image coordinate system is a two-dimensional coordinate system in the image. The two-dimensional coordinate system can be set as needed. For example, a pixel point in the upper left corner of the image can be used as the origin of the two-dimensional coordinate system, the horizontal direction of the image is used as the x-axis direction, and the vertical direction of the image is used as the y-axis direction.

[0115] In this embodiment, a virtual straight-line equation is established based on points A and C. Since the distance between points A and C is relatively far, the virtual straight-line equation established based on points A and C is more accurate and is more convenient for fitting calculation of the pixel points on the contour of the water area on the virtual straight line.

[0116] When establishing a virtual straight-line equation based on points A and C, it is necessary to calculate the slope k and the offset b of the virtual straight-line equation according to the coordinates of points A and C in the image coordinate system, and establish the virtual straight-line equation L as: y = kx + b.

[0117] In another embodiment, when there are two virtual reference points, a virtual straight-line equation in the image coordinate system can be directly established according to the coordinates of the two points in the image coordinate system.

[0118] S1322. Calculate the deviation.

[0119] Substitute the coordinate value of a pixel point on the contour of the water area into the virtual straight-line equation, and the deviation of the numerical values on both sides of the virtual straight-line equation can be calculated.

[0120] For example, take the first pixel point from the contour array P, and substitute the coordinate value (x a , y a ) of this pixel point into the virtual straight-line equation L to calculate the deviation diff, where diff = |y a - k * x a - b|;

[0121] S1323. Establish an intersection point set.

[0122] Judge whether the calculated deviation diff is less than the first preset threshold. If it is less than the first preset threshold, put the first pixel point into the intersection point set N; the intersection point set can also be called an intersection point array.

[0123] Read other pixel points in the contour array P cyclically, substitute their coordinate values into the straight-line equation L, calculate whether the deviation is less than a first preset threshold, and save the other pixel points with the deviation less than the first preset threshold into the intersection set N until the cycle ends.

[0124] The first preset threshold can be set according to actual needs. For example, it can be 3 pixel sizes, 5 pixel sizes, 10 pixel sizes, 15 pixel sizes, 20 pixel sizes, or 30 pixel sizes, etc.

[0125] S1324. Determine the optimal intersection point.

[0126] In the intersection set obtained according to step S1323, if there is only 1 pixel point, this pixel point can be determined as the intersection point of the virtual reference line and the contour of the water area. If the number of pixel points in the intersection set is greater than 1, it is necessary to screen and determine the intersection point of the reference line and the contour of the water area from the intersection set according to a preset screening rule.

[0127] In an example, a best pixel point can be screened out from the intersection set according to the principle of the minimum distance as the intersection point of the virtual reference line and the contour of the water area. Specifically, screening and determining the intersection point of the reference line and the contour of the water area from the intersection set according to a preset screening rule may include: calculating the distances between each pixel point in the intersection set and a preset virtual reference point; determining a pixel point with the minimum distance between the intersection set and the preset virtual reference point as the intersection point of the virtual reference line and the contour of the water area.

[0128] Among them, the preset virtual reference point can be any virtual reference point above the contour of the water area. Preferably, the topmost virtual reference point (such as point A) among the virtual reference points can be used as the preset virtual reference point. In an embodiment, determining the water level height of the water area in the monitoring image according to the intersection point, each virtual reference point, and the actual water level height corresponding to each virtual reference point (step S14) may include: determining the water level height of the water area in the monitoring image according to the coordinates of the intersection point and each virtual reference point in the image coordinate system, and the actual water level height corresponding to each virtual reference point.

[0129] In an example, determining the water level height of the water area in the monitoring image according to the coordinates of the intersection point and each virtual reference point in the image coordinate system, and the actual water level height corresponding to each virtual reference point may include: determining the water level height of the water area in the monitoring image according to the abscissa and ordinate values of the intersection point and each virtual reference point in the image coordinate system, and the actual water level height corresponding to each virtual reference point.

[0130] In a specific example, the number of virtual reference points is three; among them, according to the abscissa and ordinate values of the intersection point and each virtual reference point in the image coordinate system, and the actual water level height corresponding to each virtual reference point, determining the water level height of the water area in the monitoring image includes:

[0131] Determining the water level height L of the water area in the monitoring image according to the following formulas (1) and (2) D :

[0132]

[0133]

[0134] Among them, M is the intermediate value, and M is determined according to the following formula:

[0135]

[0136] L A is the actual water level height value corresponding to the virtual reference point A; L B is the actual water level height value corresponding to the virtual reference point B; L c is the actual water level height value corresponding to the virtual reference point C; ac is the pixel distance between the virtual reference points A and C; bc is the pixel distance between the virtual reference points B and C; bd is the pixel distance between the virtual reference points B and D; the D point is the intersection point of the virtual reference line and the contour of the water area; ad is the pixel distance between the virtual reference point A and the intersection point D.

[0137] Since the virtual reference line is a straight line, the above formulas (1) and (2) can be derived by using the invariant principle of cross-ratio of linear projective transformation. The derivation process is as follows:

[0138] 1) The following relationship exists between the image and the physical space:

[0139]

[0140] Among them: a, b, c, d are four points on the virtual reference line in the image, and ac, bc, bd, ad are the pixel distances between a and c, b and c, b and d, a and d in the image respectively; AC, BC, BD, AD are the actual distances between A and B, B and C, B and D, A and D in the physical space respectively.

[0141] The calculation formula of ac:

[0142] The calculation methods of bc, bd, ad, AC, BC, and BD are the same.

[0143] 2) A flat slope section can be used as the setting area of the virtual reference line. It can be considered that the angle between the virtual reference line and the horizontal plane is fixed. Assuming it is θ, then there is:

[0144] AC = |L c -L A |÷sinθ

[0145] Among them: The calculation formulas of BC, BD, and AD are similar.

[0146] 3) Substitute AC, BC, BD, and AD. After all sinθ terms are cancelled out, we can get:

[0147]

[0148] That is:

[0149]

[0150] It is deduced that:

[0151]

[0152] 4) Let:

[0153]

[0154] Then there is L D :

[0155]

[0156] Or:

[0157]

[0158] From the above reasoning, it can be seen that the water level height of the intersection point D is only related to the pixel coordinates of points A, B, C, D and the actual water level heights of points A, B, C, and has nothing to do with the spatial physical coordinates of points A, B, C.

[0159] Using the above derivation results, substituting the pixel coordinates of points A, B, C, D and LA, LB, LC to calculate the water level height of point D has two values, and filtering processing is required to finally obtain the water level height of the water area in the monitoring image.

[0160] The two water level height values of point D calculated can be recorded as the first height value and the second height value.

[0161] The two obtained values can be further processed according to the preset rules to obtain the water level height of the water area in the monitoring image.

[0162] In an example, the average value of the first height value and the second height value is determined as the water level height of the water area in the monitoring image.

[0163] In another example, according to the positional relationship between the intersection point D and the adjacent virtual reference points on the virtual reference line, and the actual water level height values corresponding to the adjacent virtual reference points, the water level height of the water area in the monitoring image is determined.

[0164] In one example, using the vertical coordinate values of points A, B, and C, the virtual reference line is divided into 4 regions from top to bottom as follows Figure 6 as shown.

[0165] Among them, the vertical coordinate range corresponding to Region 1 is (0, y a ), the vertical coordinate range corresponding to Region 2 is (y a , y b ), the vertical coordinate range corresponding to Region 3 is (y b , y c ), and the vertical coordinate range corresponding to Region 4 is (y c , maximum value of the vertical coordinate of the image). The processing process of the calculation results is as follows:

[0166] 1) Use the calculated vertical coordinate value of point D to determine the region where point D is located. If y a < y d < y b , then point D is in Region 2;

[0167] 2) If point D is in Region 2, then there is L A > L D > L B , and there are similar relationships in other regions;

[0168] 3) Compare the calculated water level height value L D of point D with L A and L B . If the relationship L A > L D > L B in step 2 is satisfied, then the water level height value L D of point D is the water level height of the water area in the monitoring image;

[0169] 4) If both values meet the requirements, take the average value as the water level height of the water area in the monitoring image;

[0170] 5) If neither value meets the requirements, there is no calculation result;

[0171] Using the above calculation method, 100 points are actually tested. If the error between the water level calculation result and the actual height is greater than 0.02, it is considered an incorrect recognition; if it is less than 0.02, it is considered a correct recognition. Then the number of correct water level calculations is 95, and the number of incorrect calculations is 5. The calculation accuracy rate of this method is 95%. The detailed data is shown in the following table:

[0172]

[0173]

[0174]

[0175] Among them, the manual judgment identifier 0 indicates that the calculation result is correct, and the identifier 1 indicates that the calculation result is incorrect.

[0176] In the above embodiments, the water level height L of the water area in the monitoring image D is determined according to Formula (1) and Formula (2). In another embodiment, the water level height L of the water area in the monitoring image may also be determined only according to Formula (1) D ; in still another embodiment, the water level height L of the water area in the monitoring image may also be determined only according to Formula (2) D .

[0177] In the above embodiments, the water level height of the water area in the monitoring image is mainly determined according to the abscissa and ordinate values of the intersection point and each virtual reference point in the image coordinate system, and the actual water level height corresponding to each virtual reference point. In another embodiment, the water level height of the water area in the monitoring image may also be determined according to the ordinate values of the intersection point and each virtual reference point in the image coordinate system.

[0178] Specifically, determining the water level height of the water area in the monitoring image according to the coordinates of the intersection point and each virtual reference point in the image coordinate system, and the actual water level height corresponding to each virtual reference point (step S14) may include:

[0179] Determining the water level height of the water area in the monitoring image according to the ordinate values of the intersection point and each virtual reference point in the image coordinate system, and the actual water level height corresponding to the ordinate of each virtual reference point.

[0180] In one implementation manner, determining the water level height of the water area in the monitoring image according to the ordinate values of the intersection point and each virtual reference point in the image coordinate system, and the actual water level height corresponding to the ordinate of each virtual reference point may include:

[0181] Determining a linear model between the actual water level height and the ordinate values of each virtual reference point in the image coordinate system according to the ordinate values of each virtual reference point in the image coordinate system, and the actual water level height corresponding to the ordinate of each virtual reference point;

[0182] Determining the actual water level height corresponding to the intersection point according to the linear model and the ordinate value of the intersection point in the image coordinate system.

[0183] In one example, the number of virtual reference points is n, where n is a natural number greater than 1. On the virtual reference line formed by the virtual reference points, there are the following multiple sets of corresponding relationships between the ordinate y of each virtual reference point and the actual water level height L corresponding to each virtual reference point:

[0184] (y1, L1), (y2, L2),...,(y n , L n );

[0185] The water level height of the water area in the monitoring image can be determined according to the following formula (i.e., one of the linear models between the actual water level height and the ordinate values of each virtual reference point in the image coordinate system):

[0186] L = b1g1(y) + b2g2(y) +... + b n g n (y); Formula (3)

[0187] where g1(y), g2(y), g3(y)…, g n (y) are n known linearly independent continuous functions, called basis functions. Different selections of multiple g j can form various typical and commonly used linear models. In one example, polynomial basis functions can be used: g j (y) = y j . In another example, Fourier basis functions can be used:

[0188]

[0189] The parameter b can be determined by solving a system of linear equations with respect to b1,…,b n .

[0190] Substituting the ordinate value of the intersection point in the image coordinate system into the above formula, the actual water level height can be calculated.

[0191] In a specific example, the number of virtual reference points is two;

[0192] where determining the water level height of the water area in the monitoring image according to the ordinate values of the intersection point and each virtual reference point in the image coordinate system, and the actual water level height corresponding to the ordinate of each virtual reference point may include:

[0193] Determining the water level height L of the water area in the monitoring image according to the following formula (i.e., one of the linear models between the actual water level height and the ordinate values of each virtual reference point in the image coordinate system) D :

[0194]

[0195] Among them, L A is the actual water level height value corresponding to the virtual reference point A; L B is the actual water level height value corresponding to the virtual reference point B; y d is the ordinate value of the intersection point in the image coordinate system; y a is the ordinate value of the virtual reference point A in the image coordinate system; y b is the ordinate value of the virtual reference point B in the image coordinate system.

[0196] Among them, formula (4) can be derived according to the following method:

[0197] 1) Let the ordinate of the virtual reference point be the independent variable y, and the corresponding actual water level height be the dependent variable L. The relationship between the two is as follows:

[0198] L = ky + b; Formula (5)

[0199] 2) The corresponding relationship between the ordinates of points A and B and the actual water level height is as follows:

[0200] y L A ya LA B yb LB D yd ?

[0201] 3) Substitute the values of points A and B into formula 5 to obtain the values of k and b:

[0202]

[0203] 4) Substitute y d into formula 5 to obtain the water level height of the intersection point D as:

[0204]

[0205] Refer to Figure 7 , the embodiment of the present application also provides a water level height monitoring device 20, including: a reference point calibration module 22, a water level relationship establishment module 23, an intersection determination module 24, and a water level height determination module 25; among them, the reference point calibration module 22 is used to calibrate a preset number of virtual reference points on the water level monitoring image; the water level relationship establishment module 23 is used to establish the corresponding relationship between each virtual reference point and the actual water level height; the intersection determination module 24 is used to determine the intersection point of the virtual reference line formed by each virtual reference point and the water area in the monitoring image; the water level height determination module 25 is used to determine the water level height of the water area in the monitoring image according to the intersection point, each virtual reference point, and the actual water level height corresponding to each virtual reference point.

[0206] The device of this embodiment can be used to execute Figure 1 the technical solution of the method embodiment shown, and its implementation principle and technical effect are similar, and will not be elaborated here.

[0207] In one embodiment, the intersection determination module 24 includes: a contour extraction sub-module for extracting the contour of the water area in the monitoring image; an intersection determination sub-module for determining the intersection of the virtual reference line and the contour of the water area.

[0208] Specifically, the intersection determination sub-module is configured to: establish a virtual straight line equation according to the coordinates of two virtual reference points in the image coordinate system; substitute the coordinate values of each pixel point on the contour of the water area into the virtual straight line equation, and calculate the deviation of the numerical values on both sides of the virtual straight line equation; determine whether the calculated deviation is less than a first preset threshold, and put the pixel points with the deviation less than the first preset threshold into an intersection set; determine the number of pixel points in the intersection set; if the number of pixel points in the intersection set is 1, determine the pixel point in the intersection set as the intersection of the reference line and the contour of the water area; if the number of pixel points in the intersection set is greater than 1, screen and determine the intersection of the reference line and the contour of the water area from the intersection set according to a preset screening rule.

[0209] In this embodiment, the process of determining the intersection of the virtual reference line and the contour of the water area is similar to the implementation principle and technical effect of the technical solution in the foregoing method embodiment, and will not be elaborated here.

[0210] In one embodiment, the screening and determining the intersection of the reference line and the contour of the water area from the intersection set according to a preset screening rule includes: calculating the distance between each pixel point in the intersection set and a preset virtual reference point; determining the pixel point with the smallest distance from the preset virtual reference point in the intersection set as the intersection of the virtual reference line and the contour of the water area.

[0211] In this embodiment, the process of screening and determining the intersection of the reference line and the contour of the water area from the intersection set according to a preset screening rule is similar to the implementation principle and technical effect of the technical solution in the foregoing method embodiment, and will not be elaborated here.

[0212] In one embodiment, the water level height determination module 25 is specifically configured to: determine the water level height of the water area in the monitoring image according to the coordinates of the intersection and each virtual reference point in the image coordinate system, and the actual water level height corresponding to each virtual reference point.

[0213] In an example, the water level height determination module 25 is specifically configured to: determine the water level height of the water area in the monitoring image according to the abscissa and ordinate values of the intersection and each virtual reference point in the image coordinate system, and the actual water level height corresponding to each virtual reference point.

[0214] In this embodiment, the process of determining the water level height of the water area in the monitoring image based on the abscissa and ordinate values of the intersection point and each virtual reference point in the image coordinate system, and the actual water level height corresponding to each virtual reference point is similar to the implementation principle and technical effect of the technical solution in the foregoing method embodiment, and will not be elaborated here.

[0215] In one embodiment, the number of the virtual reference points is three; the water level height determination module 15 is specifically configured to: determine the water level height L of the water area in the monitoring image according to the following formula (1) and / or formula (2) D :

[0216]

[0217]

[0218] where M is the intermediate value, and M is determined according to the following formula:

[0219]

[0220] L A is the actual water level height value corresponding to the virtual reference point A; L B is the actual water level height value corresponding to the virtual reference point B; L c is the actual water level height value corresponding to the virtual reference point C; ac is the pixel distance between the virtual reference points A and C; bc is the pixel distance between the virtual reference points B and C; bd is the pixel distance between the virtual reference points B and D; the point D is the intersection point of the virtual reference line and the contour of the water area; ad is the pixel distance between the virtual reference point A and the intersection point D.

[0221] In one embodiment, the water level height determination module includes: a first calculation sub-module, configured to calculate a first height value of the water area in the monitoring image according to the formula (1); a second calculation sub-module, configured to calculate a second height value of the water area in the monitoring image according to the formula (2); a water level height determination sub-module, configured to determine the water level height of the water area in the monitoring image based on the first height value and the second height value according to a preset rule.

[0222] In one embodiment, the water level height determination sub-module is specifically configured to: determine the average value of the first water level height value and the second water level height value as the water level height of the water area in the monitoring image; or, determine the water level height of the water area in the monitoring image according to the position of the intersection point of the virtual reference line and the contour of the water area on the virtual reference line, and the actual water level height value corresponding to the virtual reference point adjacent to the intersection point.

[0223] In this embodiment, according to Formula (1) and Formula (2), the water level height L of the water area in the monitoring image is determined. D The process is similar to the implementation principle and technical effect of the technical solution in the foregoing method embodiment, and will not be elaborated here.

[0224] In another embodiment, the water level height L of the water area in the monitoring image may also be determined only according to Formula (1). D In still another embodiment, the water level height L of the water area in the monitoring image may also be determined only according to Formula (2). D .

[0225] In one embodiment, the intersection point determination sub-module 14 is specifically configured to: determine the water level height of the water area in the monitoring image according to the ordinate value of the intersection point in the image coordinate system, the ordinate values of each virtual reference point in the image coordinate system, and the actual water level height corresponding to the ordinate of each virtual reference point.

[0226] In one embodiment, the number of virtual reference points is two; wherein, the intersection point determination sub-module 14 is specifically configured to: determine the water level height L of the water area in the monitoring image according to the following formula D :

[0227]

[0228] wherein, L A is the actual water level height value corresponding to the virtual reference point A; L B is the actual water level height value corresponding to the virtual reference point B; y d is the ordinate value of the intersection point in the image coordinate system; y a is the ordinate value of the virtual reference point A in the image coordinate system; y b is the ordinate value of the virtual reference point B in the image coordinate system.

[0229] For the derivation process of the above formula, reference may be made to the foregoing method embodiment, and details will not be elaborated here.

[0230] Figure 8 This is a block diagram of an electronic device according to an embodiment of the present application. Refer to Figure 8 , the electronic device in this embodiment includes: a processor 81 and a memory 82; the memory 81 is used to store executable program code; the processor 82 runs a program corresponding to the executable program code by reading the executable program code stored in the memory 81, and is used to execute the water level height monitoring method described in the foregoing method embodiment. The implementation principle and technical effect are similar, and details will not be elaborated here.

[0231] This electronic device exists in various forms, including but not limited to: desktop computers, mobile terminal devices, servers, etc.

[0232] The embodiments of the present application also provide a computer-readable storage medium storing one or more programs, which can be executed by one or more processors to implement the water level height monitoring method described in any of the foregoing embodiments. The implementation principle and technical effects are similar and will not be elaborated herein.

[0233] It should be noted that, in this document, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the element.

[0234] Each embodiment in this specification is described in a related manner. The same or similar parts among the embodiments can be referred to each other, and the differences between each embodiment and other embodiments are emphasized.

[0235] For the convenience of description, the above device is described by dividing it into various units / modules according to functions. Of course, when implementing the present application, the functions of the units / modules can be implemented in the same or multiple software and / or hardware.

[0236] The above is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed by the present application should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A water level height monitoring method, characterized in that, Including: Calibrating a preset number of virtual reference points on the water level monitoring image; Establishing the corresponding relationship between each virtual reference point and the actual water level height; Determining the intersection points of the virtual reference line formed by the virtual reference points and the water area in the monitoring image; Determining the water level height of the water area in the monitoring image according to the intersection points, each virtual reference point, and the actual water level height corresponding to each virtual reference point; Determining the intersection points of the virtual reference line formed by the virtual reference points and the water area in the monitoring image, including: Extracting the contour of the water area in the monitoring image; Establishing a virtual straight line equation according to the coordinates of two virtual reference points in the image coordinate system; Substituting the coordinate values of each pixel point on the contour of the water area into the virtual straight line equation respectively, and calculating the deviation of the numerical values on both sides of the virtual straight line equation; Judging whether the calculated deviation is less than a first preset threshold, and putting the pixel points with the deviation less than the first preset threshold into the intersection point set; Determining the number of pixel points in the intersection point set; If the number of pixel points in the intersection point set is 1, determining the pixel point in the intersection point set as the intersection point of the reference line and the contour of the water area; If the number of pixel points in the intersection point set is greater than 1, screening and determining the intersection point of the reference line and the contour of the water area from the intersection point set according to a preset screening rule.

2. The water level height monitoring method according to claim 1, characterized in that, The screening and determining the intersection point of the reference line and the contour of the water area from the intersection point set according to the preset screening rule includes: Calculating the distance between each pixel point in the intersection point set and a preset virtual reference point; Determining the pixel point with the minimum distance from the preset virtual reference point in the intersection point set as the intersection point of the virtual reference line formed by the virtual reference points and the contour of the water area.

3. The water level height monitoring method according to claim 1, characterized in that, The determining the water level height of the water area in the monitoring image according to the intersection points, each virtual reference point, and the actual water level height corresponding to each virtual reference point includes: Determining the water level height of the water area in the monitoring image according to the abscissa and ordinate values of the intersection points and each virtual reference point in the image coordinate system, and the actual water level height corresponding to each virtual reference point.

4. The water level height monitoring method according to claim 3, wherein The number of the virtual reference points is three; Among them, the determining the water level height of the water area in the monitoring image according to the abscissa and ordinate values of the intersection points and each virtual reference point in the image coordinate system, and the actual water level height corresponding to each virtual reference point includes: Calculating the first height value of the water area in the monitoring image according to the following formula (1); Calculating the second height value of the water area in the monitoring image according to the following formula (2); Based on the first height value and the second height value, determining the water level height of the water area in the monitoring image according to a preset rule; ; Formula (1) ; Formula (2) Among them, M is the intermediate value, and M is determined according to the following formula: ; is the actual water level height value corresponding to the virtual reference point A; is the actual water level height value corresponding to the virtual reference point B; is the actual water level height value corresponding to the virtual reference point C; ac is the pixel distance between virtual reference points A and C; bc is the pixel distance between virtual reference points B and C; bd is the pixel distance between virtual reference points B and point D; point D is the intersection point of the virtual reference line and the contour of the water area; ad is the pixel distance between virtual reference point A and the intersection point D.

5. The water level height monitoring method according to claim 4, wherein Based on the first height value and the second height value, determining the water level height of the water area in the monitoring image according to a preset rule, includes: Determining the average value of the first height value and the second height value as the water level height of the water area in the monitoring image; or, Determining the water level height of the water area in the monitoring image according to the positional relationship between the intersection point and adjacent virtual reference points on the virtual reference line, and the actual water level height values corresponding to the adjacent virtual reference points.

6. The water level height monitoring method according to claim 1, characterized in that The determining the water level height of the water area in the monitoring image according to the intersection point, each virtual reference point, and the actual water level height corresponding to each virtual reference point, includes: Determining the water level height of the water area in the monitoring image according to the ordinate value of the intersection point in the image coordinate system, the ordinate values of each virtual reference point in the image coordinate system, and the actual water level height corresponding to the ordinate of each virtual reference point.

7. A water level height monitoring device, characterized in that, Includes: A reference point calibration module, configured to calibrate a preset number of virtual reference points on the water level monitoring image; A water level relationship establishment module, configured to establish a correspondence between each virtual reference point and the actual water level height; An intersection point determination module, configured to determine the intersection point of the virtual reference line formed by the virtual reference points and the water area in the monitoring image; A water level height determination module, configured to determine the water level height of the water area in the monitoring image according to the intersection point, each virtual reference point, and the actual water level height corresponding to each virtual reference point; The intersection point determination module includes: a contour extraction sub-module, configured to extract the contour of the water area in the monitoring image; an intersection point determination sub-module, configured to determine the intersection point of the virtual reference line formed by the virtual reference points and the contour of the water area; specifically, the intersection point determination sub-module: establishes a virtual straight line equation according to the coordinates of two virtual reference points in the image coordinate system; substitutes the coordinate values of each pixel point on the contour of the water area into the virtual straight line equation respectively, and calculates the deviation of the numerical values on both sides of the virtual straight line equation; determines whether the calculated deviation is less than a first preset threshold, and puts the pixel points with the deviation less than the first preset threshold into an intersection point set; determines the number of pixel points in the intersection point set; if the number of pixel points in the intersection point set is 1, determines the pixel point in the intersection point set as the intersection point of the reference line and the contour of the water area; if the number of pixel points in the intersection point set is greater than 1, filters and determines the intersection point of the reference line and the contour of the water area from the intersection point set according to a preset filtering rule.

8. The water level height monitoring device according to claim 7, characterized in that, Filtering and determining the intersection points of the reference line and the contour of the water area from the set of intersection points according to the preset filtering rules includes: calculating the distances between each pixel point in the set of intersection points and a preset virtual reference point; determining the pixel point with the minimum distance between the set of intersection points and the preset virtual reference point as the intersection point of the virtual reference line and the contour of the water area; the water level height determination module is specifically configured to: determine the water level height of the water area in the monitoring image according to the abscissa and ordinate values of the intersection points and each virtual reference point in the image coordinate system, and the actual water level height corresponding to each virtual reference point; the number of virtual reference points is three; The water level height determination module is specifically configured to: determine the water level height of the water area in the monitoring image according to the following formula (1) and / or formula (2). : ; Formula (1) ; Formula (2) where M is the median value, and M is determined according to the following formula: ; is the actual water level height value corresponding to the virtual reference point A; is the actual water level height value corresponding to the virtual reference point B; is the actual water level height value corresponding to the virtual reference point C; ac is the pixel distance between the virtual reference points A and C; bc is the pixel distance between the virtual reference points B and C; bd is the pixel distance between the virtual reference point B and the point D; the point D is the intersection point of the virtual reference line and the contour of the water area; ad is the pixel distance between the virtual reference point A and the intersection point D; the water level height determination module includes: a first calculation sub-module, configured to calculate a first height value of the water area in the monitoring image according to the formula (1); The second calculation sub-module is configured to calculate the second height value of the water area in the monitoring image according to the formula (2); the water level height determination sub-module is configured to determine the water level height of the water area in the monitoring image based on the first height value and the second height value according to a preset rule; the water level height determination sub-module is specifically configured to: determine the average value of the first height value and the second height value as the water level height of the water area in the monitoring image; or, determine the water level height of the water area in the monitoring image according to the positional relationship between the intersection point and adjacent virtual reference points on the virtual reference line, and the actual water level height values corresponding to the adjacent virtual reference points; The water level height determination module is specifically configured to: determine the water level height of the water area in the monitoring image according to the ordinate value of the intersection point in the image coordinate system, the ordinate values of each virtual reference point in the image coordinate system, and the actual water level height corresponding to the ordinate of each virtual reference point.

9. An electronic device, characterized in that, including: a processor and a memory; The memory is used to store executable program codes; The processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, and is used to execute the water level height monitoring method according to any one of the foregoing claims 1-6.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the water level height monitoring method according to any one of the foregoing claims 1-6.

Citation Information

Patent Citations

  • A seepage water level identification method for subsea tunnel based on monocular vision

    CN109035335A

  • Method for determining parameters of water surface observation by imaging

    WO2014013064A1