Intelligent water level monitoring method and system
Through the intelligent water level monitoring system, water level monitoring is performed using binocular cameras and deep neural networks, which solves the problems of high cost and poor environmental stability of the existing system, and realizes low-cost and high-precision water level monitoring, which is suitable for a variety of scenarios.
Patent Information
- Application Number
- CN202410601887.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-15
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2044-05-15
AI Technical Summary
The existing water level monitoring system is costly and has poor environmental stability, making it difficult to adapt to complex and changeable environmental conditions.
An intelligent water level monitoring system is adopted, which includes an image acquisition end and an image processing end. Water images are collected in real time through a binocular camera, and semantic segmentation, depth estimation and three-dimensional reconstruction are used to achieve real-time monitoring and change analysis of water levels.
It realizes low-cost and high-precision water level monitoring, eliminates contact restrictions and safety hazards, is suitable for various scenarios and application fields, and has a wide application potential.
Smart Images

Figure CN118411672B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of digital terrain analysis, and in particular to an intelligent water level monitoring method and system. Background Art
[0002] At present, with the construction of water conservancy informatization and the promotion of the river chief system, video surveillance equipment has become a standard configuration for rivers, providing a data basis for the research of water level image recognition methods. The basic process of water level image recognition methods is: first, the water surface and non-water surface parts in the image are segmented, then the water level line is identified, and the water level value is calculated by combining the elevation information of the water gauge or other reference objects, including: a. Using edge detection operators to locate the water gauge, using morphological opening operations to obtain the water gauge scale line, and establishing a pixel height lookup table to infer the water level; b. Matching the water gauge image with the standard water gauge template control points for water level recognition; c. Using the image grayscale difference method to extract the water surface area, and using the camera calibration results to perform curve fitting to identify the water level. It can be seen that the calculation of the water level value depends on the recognition of the water level line. When the traditional image processing method locates the water gauge to identify the water level line, it usually processes the single grayscale feature manually selected in the image, but it is difficult to adapt to complex and changing environmental conditions when applied. Deep learning algorithms can extract generalized features of images driven by a large amount of water scene data. Compared with traditional image processing algorithms, they are more environmentally stable. The water gauge area is obtained by training the SSD (Single Shot MultiBox Detector) target detection model, and the water level value is calculated based on the pixel elevation relationship. In addition, a deep semantic segmentation network is introduced to identify water levels, and the water level can be directly obtained without positioning and identifying the water gauge. However, this type of equipment has high cost investment and is easily affected by the environment. Therefore, it is urgent to propose a low-cost and high-accuracy water level monitoring system. Summary of the invention
[0003] The main purpose of the present invention is to provide an intelligent water level monitoring method and system, aiming to solve the technical problem that the existing water level monitoring system has low cost performance.
[0004] To achieve the above object, the present invention provides an intelligent water level monitoring system, the system comprising an image acquisition end and an image processing end;
[0005] The image acquisition end includes a device for real-time acquisition of water area images of the target area and transmission to the image processing end, wherein the water area images include images of the water surface and the surrounding environment;
[0006] The image processing end is used to perform image segmentation processing, obtain depth images, reconstruct horizontal plane images, and fit horizontal plane images on the images received in real time, so as to determine the horizontal plane image of the target area at the corresponding moment, and determine the water surface changes of the target area based on the horizontal plane images of the target area at adjacent moments.
[0007] Optionally, the image acquisition uses a binocular camera to obtain images of the water surface and surrounding environment of the target area.
[0008] In addition, in order to achieve the above-mentioned purpose, the present invention also provides an intelligent water level monitoring method, which is applied to an intelligent water level monitoring system, and the intelligent water level monitoring method comprises the following steps:
[0009] Step 1: The image acquisition end acquires the water area image of the target area in real time through the binocular camera and transmits it to the image processing end, wherein the water area image acquired by the binocular camera at the same time includes the left eye image and the right eye image;
[0010] Step 2: The image processing end performs image segmentation processing, obtains depth images, reconstructs horizontal plane images, and fits horizontal plane images on the images received in real time to determine the horizontal plane images of the target area at the corresponding moment, and determines the water surface changes of the target area based on the horizontal plane images of the target area at adjacent moments.
[0011] Optionally, in step 2, the steps of performing image segmentation processing, acquiring a depth image, reconstructing a water surface image, and fitting a water surface image on the image received in real time by the image processing end specifically include:
[0012] Step 21, the left and right eye images at the same moment are respectively subjected to semantic segmentation processing using an open language segmentation-OVSeg model to obtain left and right semantic images at the same moment;
[0013] Step 22, the left and right eye images at the same time are respectively used to determine the horizontal plane depth image at the corresponding time according to the CREStereo model, the triangulation principle and the parameters of the binocular camera;
[0014] Step 23, using the horizontal plane depth image obtained in step 22 and the left and right semantic images obtained in step 21 to determine a horizontal plane three-dimensional reconstruction image at a corresponding moment using a pinhole camera model;
[0015] Step 24, performing least squares fitting on the horizontal plane three-dimensional reconstruction image obtained in step 23 to obtain a horizontal plane image at a corresponding moment.
[0016] Optionally, the step 22 specifically includes:
[0017] The CREStereo model is used to obtain the disparity values of the left and right eye images at the same time;
[0018] According to the parallax value of the left and right eye images, the parameters of the binocular camera and the principle of triangulation, the horizontal plane depth value at the corresponding time is obtained. The horizontal plane depth value includes the depth values corresponding to all pixel points.
[0019] The depth value of each pixel is mapped to the corresponding position in the image to obtain the horizontal plane depth image at the corresponding moment.
[0020] Optionally, in step 23,
[0021] The formula of the pinhole camera model is
[0022]
[0023] Among them, (u, v) represents the pixel coordinates on the image plane, (X, Y, Z) represents the three-dimensional coordinates of the object in the camera coordinate system, Zc is the pixel depth, and the third-order matrix on the right is the camera intrinsic parameter.
[0024] Optionally, step 24 specifically includes:
[0025] The horizontal plane 3D reconstruction image is represented by the plane equation Ax+By+Cz+D=0, where (x, y, z) is any point on the plane;
[0026] And calculate the coefficients A, B, C and D in Ax+By+Cz+D=0.
[0027] Optionally, the step of calculating coefficients A, B, C and D in Ax+By+Cz+D=0 comprises:
[0028] Calculate the mean of the given N points (x_mean, y_mean, z_mean);
[0029] Calculate the deviation of each point (x_i, y_i, z_i) relative to the mean, that is, dx_i = x_i-x_mean, dy_i = y_i-y_mean, dz_i = z_i-z_mean;
[0030] Construct an Nx3 matrix A where each row is a bias vector [dx_i,dy_i,dz_i].
[0031] Perform singular value decomposition (SVD) on the matrix A to obtain the U, S, and V matrices, where the coefficients of the plane normal vector are [A, B, C] which is the right singular vector corresponding to the last column of the V matrix. The D coefficient of the plane can be obtained by substituting the normal vector into the plane equation and using the coordinates of any point.
[0032] Optionally, in step 2, the step of determining the water surface change of the target area according to the horizontal plane images of the target area at adjacent moments includes:
[0033] The following formula is used to obtain the actual water surface change distance:
[0034] Where Dt is the horizontal plane coefficient corresponding to time t, Dt+1 is the horizontal plane coefficient corresponding to time t+1, and the average value of A, B, and C is the mean value of the horizontal plane equation coefficients corresponding to time t and time t+1.
[0035] Optionally, step 1 also includes:
[0036] The water surface image of the target area acquired by the binocular camera in real time is compressed and transmitted to the image processing end
[0037] Beneficial effects:
[0038] The intelligent water level monitoring system of the present invention eliminates the contact restrictions and safety hazards in traditional methods by non-contact measurement, that is, by using a binocular camera to monitor the water level. And only one binocular camera and one 4G communication module are required, with low hardware cost and installation complexity. In addition, by uploading images to the cloud for calculation, large-scale deployment can be achieved and the computing cost can be significantly reduced. This is consistent with the concept of intelligent digital management. At the same time, a deep neural network is used, that is, through semantic segmentation, depth estimation and three-dimensional reconstruction steps to achieve real-time monitoring of water levels, so that water level changes can be measured in real time and high-precision measurement results can be provided. In addition, automated monitoring is achieved through binocular cameras, reducing the need for manual operation and improving monitoring efficiency and accuracy. Therefore, the present invention provides a universal water level monitoring solution, which is suitable for various scenarios and application fields, and has broad application potential from water resource management to environmental monitoring. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 It is a system block diagram of an embodiment of an intelligent water level monitoring system of the present invention;
[0040] Figure 2 It is a flow chart of the first embodiment of the intelligent water level monitoring method of the present invention;
[0041] Figure 3 Schematic diagram before and after semantic segmentation processing;
[0042] Figure 4 This is a schematic diagram of the triangulation principle;
[0043] Figure 5 Depth map for different heights;
[0044] Figure 6 Schematic diagram of three-dimensional reconstruction results;
[0045] Figure 7 This is a schematic diagram of the pseudo code used in solving water surface changes.
[0046] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0047] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0048] like Figure 1 As shown, Figure 1 This is a system block diagram of an embodiment of an intelligent water level monitoring system of the present invention. The system includes an image acquisition end and an image processing end; the image acquisition end includes a module for real-time acquisition of the water surface and surrounding environment images of the target area, and transmits them to the image processing end; specifically, the image acquisition end also includes a local processor MCU, an image compression and encoding module, a communication module and a binocular camera. The binocular camera is used to acquire water area images of the target area, and the water area images include water surface and surrounding environment images; the image compression and encoding module is used to compress the water area images acquired by the binocular camera. Compressing the image can reduce the network transmission cost, and reduce the calculation amount of the subsequent algorithm under the premise of ensuring the image accuracy, thereby facilitating the improvement of the efficiency and response speed of the entire system. The communication module is used to transmit the compressed image to the image processing end. Preferably, the communication module is a commonly used network module, such as a 4G network or a 5G network.
[0049] The image processing end is used to perform image segmentation processing, obtain depth images, reconstruct horizontal plane images, and fit horizontal plane images on the real-time received images, so as to determine the horizontal plane images of the target area at the corresponding time, and determine the water surface changes of the target area according to the horizontal plane images of the target area at adjacent times. The image acquisition end of this system is generally set locally and is only responsible for image acquisition. It does not need to perform high-computing image processing tasks, so the power consumption is low. The cost of each local device can be controlled at around 200 yuan, which means that the cost of using the system is relatively low. The image processing end is responsible for the calculation and processing of the image. Generally, the image processing end is a cloud server, and the image uploaded to the cloud server can be processed in a complex manner because the cloud can use powerful computing resources, such as cloud GPU, to perform high-computing image processing. Such a design brings the following advantages: (1) Convenient data storage: After uploading the image to the cloud, data can be easily stored and managed. Cloud servers usually provide reliable storage solutions to ensure the security and persistence of data. (2) High-computing processing: Relying on powerful computing resources such as cloud GPU, complex image processing tasks such as image recognition, segmentation, feature extraction, etc. can be performed. Cloud computing provides a high-performance computing environment that can accelerate the speed and effect of image processing. In addition, the more acquisition devices there are, the lower the cost of cloud computing. This is because multiple acquisition devices can share computing resources in the cloud, thereby improving the utilization of computing resources and reducing the cost of each device. It can be seen that the system uses the high computing power resources in the cloud to perform complex image processing tasks by assigning image acquisition and transmission tasks to local devices. In turn, the setting of this system reduces the power consumption and cost of local devices and provides high-performance image processing capabilities.
[0050] Furthermore, the present invention also provides an intelligent water level monitoring method applied to an intelligent water level monitoring system, such as Figure 2 As shown, the intelligent water level monitoring method comprises the following steps:
[0051] Step 1, the image acquisition end acquires the water image of the target area in real time through the binocular camera and transmits it to the image processing end, wherein the water image acquired by the binocular camera at the same time includes the left eye image and the right eye image. Among them, two cameras are used to form a binocular camera system, and the distance between the cameras can be adjusted according to the needs. In this embodiment, the pixel coordinate system of the right eye camera is used as the base coordinate system for calculation. In general, the greater the distance between the cameras, the higher the accuracy of obtaining the depth information. And the binocular camera simultaneously acquires images of two perspectives, such as the left eye image and the right eye image, based on the fact that these two images are taken from different camera positions, so they are different in perspective and distortion. Then the image processing end needs to further process the acquired image.
[0052] Step 2: The image processing end performs image segmentation processing, obtains depth images, reconstructs horizontal plane images, and fits horizontal plane images on the images received in real time to determine the horizontal plane images of the target area at the corresponding moment, and determines the water surface changes of the target area based on the horizontal plane images of the target area at adjacent moments.
[0053] Specifically, the steps of performing image segmentation processing, obtaining a depth image, reconstructing a water surface image, and fitting a horizontal plane image on the image received in real time by the image processing end specifically include:
[0054] Step 21, the left and right images at the same time are processed by semantic segmentation using the open language segmentation-OVSeg model to obtain the left and right semantic images at the same time. Among them, semantic segmentation is an image segmentation method that combines image classification, target detection and image segmentation. It divides the image into regional blocks with certain semantic meanings by a certain method, and identifies the semantic category of each regional block, realizes the semantic reasoning process from the bottom to the top, and finally obtains a segmented image with pixel-by-pixel semantic annotation. In this embodiment, an open language style model (open-vocabulary segmentation, OVSeg) based on Segment Anything is adopted. The OVSeg model aims to divide the image into corresponding semantic regions as needed, which may not be seen during training, and can also be used to segment objects that the model has not seen before. Furthermore, the use of the OVSeg model can achieve the need for training for specific scenes, and the model has a higher generalization ability. For example, the OVSeg model can segment water surfaces of different colors and water surfaces with floating waste, while other models need to be trained in a targeted manner to achieve this. Therefore, in this embodiment, the segmentation results of the received left and right images are made more accurate by using Segment Anything. The reason for this is that Segment Anything’s capabilities are the result of training on millions of images and masks collected using Data Engine. The result is a dataset of over 1 billion segmentation masks — 400 times larger than any previous segmentation dataset.
[0055] The Segment Anything model differs from traditional semantic segmentation algorithms in the following ways:
[0056] 1) Any object in the image can be segmented, while traditional image segmentation methods can only segment specific types of objects.
[0057] 2) Compared with traditional image segmentation methods, the Segment Anything model can segment objects in images more accurately.
[0058] 3) The Segment Anything model can train the model without the need for a large amount of labeled data.
[0059] like Figure 3 As shown in the figure, the right image is imported into the model, the segmentation object is specified as water, and the water surface in the image is segmented to obtain the semantic image of the water surface. In addition, in order to facilitate subsequent calculations, a mask is used to represent the water surface, that is, if the pixel is the water surface, it is 1, indicating that it participates in subsequent calculations, otherwise it is 0 and does not participate in the calculation of water surface reconstruction.
[0060] Step 22, the left and right eye images at the same moment are respectively used to determine the horizontal plane depth images at the corresponding moment according to the CREStereo model, the triangulation principle and the parameters of the binocular camera.
[0061] Specifically, the CREStereo model is used to obtain the disparity values of the left and right eye images at the same time. Among them, the disparity calculation is based on the reflection and refraction of light by the object, as well as the uneven illumination, which is likely to cause a large area of mismatch between the two images. And the traditional disparity estimation matching methods can be mainly divided into two categories: local matching methods and global matching methods. Among them, the local matching method only considers the similarity of the current pixel and its surrounding neighborhood to find its matching point in another image. Commonly used local matching methods include: matching based on pixel gray value, feature-based matching, and matching based on statistical methods. This type of local matching method is simple to calculate and efficient, but it is easily affected by noise and illumination changes, and the matching accuracy is not high. The global matching method considers the matching consistency of the entire image and uses an optimization algorithm to find the optimal disparity map. Commonly used global matching methods include dynamic programming, graph cuts, and belief propagation. The global matching method can obtain a more detailed disparity map, but it has high computational complexity and takes a long time. Traditional matching methods mostly rely on manually designed features. The extraction process of these features is complicated and has poor generalization ability. In addition, traditional matching methods are mostly designed for simple scenes and have difficulty handling complex scenes such as lighting changes (especially the water surface has the characteristics of reflection, projection and refraction) and occlusion.
[0062] Furthermore, the CREStereo model used in this embodiment adopts technologies such as multi-scale feature fusion and residual learning, which can effectively improve the accuracy and robustness of disparity estimation. As a deep learning method, the CREStereo model can automatically learn image features and can learn the matching relationship of complex scenes from a large amount of data, so it has better robustness and generalization ability. Specifically, the deep learning method can automatically learn image features from a large amount of data, and these features have stronger discrimination ability and robustness. It can also be trained end-to-end, that is, end-to-end training can be performed, and image pairs can be directly mapped to disparity maps, avoiding the complex process of manual feature extraction. At the same time, multi-scale information fusion can also be achieved, that is, information of different scales can be fused to obtain a more refined disparity map.
[0063] Furthermore, parallax only describes the offset of related pixels in the binocular image, and depth refers to the distance from the object to the camera. In the binocular vision system, there is a certain distance between the optical centers of the left and right cameras, which is called the baseline. When there is a parallax between the image points of a point in the scene on the imaging planes of the left and right cameras, the distance from the point to the optical center of the camera can be calculated based on the principle of triangulation, which is the depth. It is then necessary to obtain the corresponding horizontal plane depth value at the corresponding moment based on the parallax values of the left and right images, the parameters of the binocular camera, and the principle of triangulation. The horizontal plane depth value includes the depth values corresponding to all pixel points. Among them, the triangulation principle, such as Figure 4 As shown, O1 and O2 are the optical centers of the left and right cameras, b is the baseline length, P is a point in the scene, P1 and P2 are the image points of P on the imaging planes of the left and right cameras, d is the parallax between P1 and P2, f is the focal length of the camera, and Z is the distance from P to the optical center of the camera. According to the principle of triangulation, the following formula can be obtained:
[0064] Z = bf / d;
[0065] Where Z is the depth, b is the baseline length, f is the focal length, and d is the parallax. Finally, the depth value of each pixel is mapped to the corresponding position in the image to obtain the horizontal plane depth image at the corresponding time. The depth image is represented in grayscale or color, and the farther the depth value is, the darker or lighter the color is. The final time difference map is as follows: Figure 5 shown.
[0066] In step 23, the horizontal plane depth image obtained in step 22 and the left and right semantic images obtained in step 21 are used to determine the horizontal plane 3D reconstruction image at the corresponding moment using a pinhole camera model. The pinhole camera model is a simplified camera model used to describe the projection process of light in a camera. It is based on the principle of geometric optics and assumes that the camera has a very small hole or pinhole through which light enters the camera from the outside. This model is applicable to most modern cameras, including mobile phone cameras and professional cameras.
[0067] The formula of the pinhole camera model is based on the relationship between similar triangles and is called the pinhole camera model formula or perspective projection formula. It describes the relationship between the projection position of an object in the camera coordinate system and the three-dimensional coordinates of the object. The following is the formula of the pinhole camera model:
[0068]
[0069] Where (u, v) represents the pixel coordinates on the image plane, (X, Y, Z) represents the three-dimensional coordinates of the object in the camera coordinate system, Zc is the pixel depth, and the third-order matrix on the right is the camera intrinsic parameter (constant). Then, when the depth corresponding to the pixel (u, v) is known, the specific position of the pixel in space can be calculated by the above equation. By performing the above calculation on all pixels, the original three-dimensional scene can be reconstructed, such as Figure 6 shown.
[0070] Step 24, performing least squares fitting on the horizontal plane three-dimensional reconstruction image obtained in step 23 to obtain a horizontal plane image at a corresponding moment.
[0071] Specifically, the horizontal plane 3D reconstruction image is represented by the plane equation Ax+By+Cz+D=0, where (x, y, z) is any point on the plane;
[0072] And calculate the coefficients A, B, C and D in Ax+By+Cz+D=0. The specific steps include:
[0073] Calculate the mean of the given N points (x_mean, y_mean, z_mean);
[0074] Calculate the deviation of each point (x_i, y_i, z_i) relative to the mean, that is, dx_i = x_i-x_mean, dy_i = y_i-y_mean, dz_i = z_i-z_mean.
[0075] Construct an Nx3 matrix A where each row is a bias vector [dx_i,dy_i,dz_i].
[0076] Perform singular value decomposition (SVD) on the matrix A to obtain the U, S, and V matrices, where the coefficients of the plane normal vector are [A, B, C] which is the right singular vector corresponding to the last column of the V matrix. The D coefficient of the plane can be obtained by substituting the normal vector into the plane equation and using the coordinates of any point.
[0077] Furthermore, in S2, the step of determining the water surface change of the target area according to the horizontal plane images of the target area at adjacent moments includes:
[0078] The following formula is used to obtain the actual water surface change distance:
[0079]
[0080] Where D t is the horizontal plane coefficient corresponding to time t, D t+1 is the horizontal plane coefficient corresponding to time t+1, and the average value of A, B, and C is the average value of the horizontal plane equation coefficient corresponding to time t and time t+1. The entire calculation process is represented by pseudo code, as follows Figure 7 shown.
[0081] The present invention uses a binocular camera to monitor the water level through non-contact measurement, eliminating the contact restrictions and safety hazards in traditional methods. And only one binocular camera and one 4G communication module are required, with low hardware cost and installation complexity. In addition, by uploading images to the cloud for calculation, large-scale deployment can be achieved and the computing cost can be significantly reduced. This is consistent with the concept of intelligent digital management. At the same time, a deep neural network is used, that is, real-time monitoring of the water level is achieved through semantic segmentation, depth estimation and three-dimensional reconstruction steps, so that the water level changes can be measured in real time and high-precision measurement results can be provided. In addition, automated monitoring is achieved through binocular cameras, reducing the need for manual operation and improving monitoring efficiency and accuracy. Therefore, the present invention provides a universal water level monitoring solution, which is suitable for various scenarios and application fields, and has broad application potential from water resource management to environmental monitoring.
[0082] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0083] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0084] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. An intelligent water level monitoring system, characterized in that: The system includes an image acquisition end and an image processing end; The image acquisition end includes a device for real-time acquisition of water area images of the target area and transmission to the image processing end, wherein the water area images include images of the water surface and the surrounding environment; The image processing end is used to perform image segmentation processing, obtain depth images, reconstruct horizontal plane images, and fit horizontal plane images on the images received in real time, so as to determine the horizontal plane images of the target area at the corresponding time, and determine the water surface changes of the target area according to the horizontal plane images of the target area at adjacent times; The steps of performing image segmentation processing, obtaining depth images, reconstructing water surface images, and fitting water surface images on the image received in real time by the image processing end specifically include: Step 21, the left and right eye images at the same moment are respectively subjected to semantic segmentation processing using an open language segmentation-OVSeg model to obtain left and right semantic images at the same moment; Step 22, the left and right eye images at the same time are respectively used to determine the horizontal plane depth image at the corresponding time according to the CREStereo model, the triangulation principle and the parameters of the binocular camera; Step 23, using the horizontal plane depth image obtained in step 22 and the left and right semantic images obtained in step 21 to determine a horizontal plane three-dimensional reconstruction image at a corresponding moment using a pinhole camera model; Step 24, performing least squares fitting on the horizontal plane three-dimensional reconstruction image obtained in step 23 to obtain a horizontal plane image at a corresponding moment; And the image processing end is a cloud server.
2. The intelligent water level monitoring system according to claim 1, characterized in that: The image acquisition end uses a binocular camera to acquire a water area image of a target area, and the water area image includes a left-eye image and a right-eye image.
3. An intelligent water level monitoring method, characterized in that: The intelligent water level monitoring method is applied to an intelligent water level monitoring system, and the intelligent water level monitoring method comprises the following steps: Step 1: The image acquisition end acquires the water area image of the target area in real time through the binocular camera and transmits it to the image processing end, wherein the water area image acquired by the binocular camera at the same time includes the left eye image and the right eye image; Step 2: The image processing end performs image segmentation processing, obtains depth images, reconstructs horizontal plane images, and fits horizontal plane images on the real-time received images to determine the horizontal plane images of the target area at the corresponding time, and determines the water surface changes of the target area based on the horizontal plane images of the target area at adjacent times; The steps of performing image segmentation processing, obtaining depth images, reconstructing water surface images, and fitting water surface images on the image received in real time by the image processing end specifically include: Step 21, the left and right eye images at the same moment are respectively subjected to semantic segmentation processing using an open language segmentation-OVSeg model to obtain left and right semantic images at the same moment; Step 22, the left and right eye images at the same time are respectively used to determine the horizontal plane depth image at the corresponding time according to the CREStereo model, the triangulation principle and the parameters of the binocular camera; Step 23, using the horizontal plane depth image obtained in step 22 and the left and right semantic images obtained in step 21 to determine a horizontal plane three-dimensional reconstruction image at a corresponding moment using a pinhole camera model; Step 24, performing least squares fitting on the horizontal plane three-dimensional reconstruction image obtained in step 23 to obtain a horizontal plane image at a corresponding moment; And the image processing end is a cloud server.
4. The intelligent water level monitoring method according to claim 3, characterized in that: The step 22 specifically includes: The CREStereo model is used to obtain the disparity values of the left and right eye images at the same time; According to the parallax value of the left and right eye images, the parameters of the binocular camera and the principle of triangulation, the horizontal plane depth value at the corresponding time is obtained. The horizontal plane depth value includes the depth values corresponding to all pixel points. The depth value of each pixel is mapped to the corresponding position in the image to obtain the horizontal plane depth image at the corresponding moment.
5. The intelligent water level monitoring method according to claim 3, characterized in that: In step 23, the formula of the pinhole camera model is Among them, (u, v) represents the pixel coordinates on the image plane, (X, Y, Z) represents the three-dimensional coordinates of the object in the camera coordinate system, and Zc is the pixel depth.
6. The intelligent water level monitoring method according to claim 3, characterized in that: Step 24 specifically includes: The horizontal plane 3D reconstruction image is represented by the plane equation Ax+By+Cz+D=0, where (x, y, z) is any point on the plane; And calculate the coefficients A, B, C and D in Ax+By+Cz+D=0.
7. The intelligent water level monitoring method according to claim 6, characterized in that: The step of calculating coefficients A, B, C and D in Ax+By+Cz+D=0 comprises: Calculate the mean of the given N points (x_mean, y_mean, z_mean); Calculate the deviation of each point (x_i, y_i, z_i) relative to the mean, that is, dx_i = x_i-x_mean, dy_i = y_i-y_mean, dz_i = z_i-z_mean; Construct an Nx3 matrix A, where each row is a bias vector [dx_i, dy_i, dz_i]; Singular value decomposition (SVD) is performed on the matrix A to obtain the U, S, and V matrices, where the coefficients of the plane normal vector are [A, B, C] which is the right singular vector corresponding to the last column of the V matrix, and the D coefficient of the plane is obtained by substituting the normal vector into the plane equation using the coordinates of any point.
8. The intelligent water level monitoring method as claimed in claim 7, characterized in that: In step 2, the step of determining the water surface change of the target area according to the horizontal plane images of the target area at adjacent moments includes: The following formula is used to obtain the actual water surface change distance: Where D t is the horizontal plane coefficient corresponding to time t, D t+1 is the horizontal plane coefficient corresponding to time t+1, It is the mean of the horizontal plane equation coefficients A, B, and C corresponding to time t and time t+1.
9. The intelligent water level monitoring method according to any one of claims 3 to 6, characterized in that: Also included in step 1: The water surface image of the target area acquired in real time by the binocular camera is compressed and transmitted to the image processing end.
Citation Information
Patent Citations
Treatment device for domestic sewage and treatment method thereof
CN113277676A
Substation water level monitoring method and system based on semantic segmentation
CN115546713A