Water body inundation area warning method based on image recognition
Through the early warning method of water submersion area based on image recognition, combined with the three-dimensional imaging technology of drone radar and semantic segmentation model, the accuracy and coverage problems of traditional early warning systems in extreme weather conditions are solved, and fast and accurate monitoring and early warning of submersion area is achieved.
Patent Information
- Application Number
- CN202411935367.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2044-12-26
AI Technical Summary
Traditional water submersion warning systems have limited prediction accuracy, delayed data updates, and it is difficult to cover all potential submerged areas, especially in rapidly changing extreme weather conditions, which is difficult to quickly and accurately reflect the actual submersion situation.
The water submersion area early warning method based on image recognition is used, and three-dimensional reconstruction is carried out through drone radar three-dimensional imaging technology to determine the corresponding relationship list of different water levels and submersion areas. The water level monitoring and submersion area calculation are carried out in combination with semantic segmentation model and homography matrix, and data cleaning and early warning are carried out in real time.
It has achieved rapid and accurate calculation and early warning of the flooded area of water bodies, improved the accuracy of early warning, expanded the monitoring coverage, reduced the losses of extreme weather disasters, and ensured the safety of people's lives and property.
Smart Images

Figure CN119360315B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of image processing, and particularly relates to a water body inundation area early warning method based on image recognition. Background Art
[0002] As one of the most direct and widely influential disaster forms in extreme weather events, the rapid and accurate early warning of water body inundation is of crucial significance for reducing casualties, protecting property safety, guiding emergency responses, and post-disaster reconstruction.
[0003] Traditional water body inundation early warning systems mostly rely on meteorological forecasts, hydrological monitoring station data, and historical flood data analysis. However, these methods have deficiencies such as limited prediction accuracy, lagging data updates, and difficulty in covering all potential inundation areas. Especially in the face of rapidly changing extreme weather conditions, traditional early warning means often struggle to quickly and accurately reflect the actual inundation situation, resulting in a significant reduction in the early warning effect. Summary of the Invention
[0004] The present invention provides a water body inundation area early warning method based on image recognition to solve the technical problem of the inaccuracy of the above-mentioned traditional early warning means, and specifically adopts the following technical solutions:
[0005] A water body inundation area early warning method based on image recognition, comprising:
[0006] S1: Perform three-dimensional reconstruction on a specified area;
[0007] S2: Determine a correspondence list WL of different water levels and inundation areas based on the three-dimensional reconstruction data;
[0008] S3: Determine the monitoring location and the water level monitoring plane photographed at the monitoring location;
[0009] S4: Perform on-site spatial calibration on the determined water level monitoring plane to obtain the homography matrix SM of the water level monitoring plane;
[0010] S5: Collect an image containing the water level monitoring plane, use a semantic segmentation model to identify the water body in the image of the collected water level monitoring plane to obtain a water body segmentation map, perform an intersection calculation using the water body segmentation map and the image of the water level monitoring plane to obtain a pixel coordinate point set PS of the intersection line obtained from the intersection calculation, and convert the pixel coordinate point set PS through the homography matrix SM to obtain an original water level line point set WS in the physical world corresponding to the pixel coordinate point set PS;
[0011] S6: Clean abnormal data from the original water level line point set WS to obtain a water level line point set CWS;
[0012] S7: Obtain the regional water level according to the water level line point set CWS;
[0013] S8: Obtain the inundated area based on the regional water level and the correspondence list WL, and issue a warning when the inundated area is greater than a preset value.
[0014] Further, in the step S1, the specific method for three-dimensional reconstruction of a specified area is as follows:
[0015] Use a drone equipped with a lidar to perform aerial scanning operations on the specified area, collect a three-dimensional point cloud data set, and through the drone radar three-dimensional imaging algorithm, analyze and reconstruct the three-dimensional topographic and geomorphic model data of the specified area.
[0016] Further, in the step S2, when determining the correspondence list WL of different water levels and inundated areas, set the water level step to 0.01 meters.
[0017] Further, in the step S4, the specific method for on-site spatial calibration of the determined water level monitoring surface to obtain the homography matrix SM of the water level monitoring surface is as follows:
[0018] Use a total station to calibrate the four vertex areas of the water level monitoring surface, namely the four position points of upper left A, lower left B, lower right C, and upper right D, obtain the coordinates of the four calibration points in the physical world, and at the same time associate the pixel coordinates of the four calibration points in the collected image, establish the correspondence between the pixel values of the monitoring surface image and the actual values in the physical world, so as to obtain the homography matrix SM of the monitoring surface.
[0019] Further, in the step S6, the specific method for cleaning abnormal data from the original water level line point set WS to obtain the water level line point set CWS is as follows:
[0020] S61: Determine the virtual water level straight line F;
[0021] S62: Use the homography matrix SM to transform the virtual water level straight line F to obtain the physical virtual water level straight line PA in the physical world;
[0022] S63: Fit the water level line point set CWS to obtain the real-time water level straight line F1;
[0023] S64: Calculate the included angle between the real-time water level straight line F1 and the physical virtual water level straight line PA;
[0024] S65: Calculate the difference between the water level mean value of the original water level line point set WS and the regional water level before the preset time;
[0025] S66: If the angle is less than the preset angle threshold M, and the difference between the water level mean of the original water level line point set WS and the regional water level before the preset time is within the preset water level normal variation range N, then the data of the original water level line point set WS is normal, and there is no need to remove abnormal data, and the water level line point set CWS is directly obtained, otherwise execute S67;
[0026] S67: If the data of the original water level point set WS is abnormal, the DBSCAN algorithm is used to cluster the original water level point set WS to obtain multiple clusters, and steps S63 to S65 are executed in sequence for each cluster, and the cluster data with abnormal data are completely eliminated, and the normal cluster data are merged to obtain the water level point set CWS.
[0027] Furthermore, in step S65, the difference between the water level mean of the original water level line point set WS and the regional water level one minute ago is calculated.
[0028] Furthermore, in step S65, the specific method for calculating the water level mean of the original water level line point set WS is:
[0029] The water levels in the original water level line point set WS are sorted, the 10% of the highest water level and the 10% of the lowest water level data are eliminated, and the remaining water levels are averaged to obtain the water level mean.
[0030] Furthermore, when the DBSCAN algorithm is used to cluster the original water level point set WS, the domain radius eps is set to 0.03 meters in the DBSCAN algorithm, and the minimum number of points in the cluster MinPts is max(n / 5, 30), where n represents the number of points in the original water level point set WS.
[0031] Furthermore, in step S7, the specific method for calculating the regional water level according to the water level point set CWS is:
[0032] Identify and clean the data once per second to obtain 60 groups of water level point sets CWS within 1 minute. The one-minute regional water level point set AWS is obtained by calculating the spatial water level mean. The water level mean is calculated for the regional water level point set AWS to obtain the regional water level.
[0033] Furthermore, in step S7, the spatial water level mean value calculation method is:
[0034] The 60 water level point sets CWS within 1 minute are sorted according to the horizontal coordinate direction of the water level space, and the average of the 60 water level data at the same point position is calculated in turn to obtain the one-minute regional water level point set AWS.
[0035] The water body flooding area early warning method based on image recognition provided by the present invention can quickly and accurately calculate and warn of the water body flooding area.
[0036] The water body inundation area early warning method based on image recognition provided by the present invention integrates advanced technologies such as UAV radar three-dimensional imaging technology, digital twin technology, image recognition, and artificial intelligence prediction, realizes real-time monitoring, accurate prediction, and timely early warning of the water body inundation area under extreme weather conditions, and provides strong technical support for disaster prevention and mitigation work. Compared with the traditional water level monitoring, which may have insufficient accuracy in monitoring a single point, the monitoring method of this application monitors the water level of an area, which can not only improve the accuracy of early warning, but also effectively expand the monitoring coverage, and make important contributions to reducing the losses caused by extreme weather disasters and ensuring the safety of people's lives and property. Moreover, it solves the problem of abnormal recognition caused by the occlusion of the monitoring position by vehicles and personnel. Brief Description of the Drawings
[0037] In order 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.
[0038] Figure 1 It is a schematic diagram of a water body inundation area early warning method based on image recognition of the present invention;
[0039] Figure 2 It is a schematic diagram of the spatial calibration of the water level monitoring surface of the present invention;
[0040] Figure 3 It is a schematic diagram of water level recognition of the present invention;
[0041] Figure 4 It is a schematic diagram of water level linear fitting of the present invention.
[0042] Reference Signs: 1, water level monitoring surface; 2, obstacle; 3, water body. Detailed Description of the Embodiments
[0043] The following will describe in detail the embodiments of the present application. The examples of the embodiments are shown in the drawings, where the same or similar reference numerals indicate the same or similar elements or elements with the same or similar functions from beginning to end. The embodiments described below with reference to the drawings are exemplary and are intended to explain the present application, but should not be construed as a limitation to the present application.
[0044] Such as Figure 1The following shows a water body inundation area warning method based on image recognition according to the present application, including: S1: Conduct 3D reconstruction on a specified area. S2: Determine a correspondence list WL between different water levels and inundation areas based on the 3D reconstruction data. S3: Determine the monitoring location and the water level monitoring surface. S4: Perform on-site spatial calibration on the determined water level monitoring surface to obtain the homography matrix SM of the water level monitoring surface. S5: Collect an image containing the water level monitoring surface, use a semantic segmentation model to identify the water body in the collected image containing the water level monitoring surface to obtain a water body segmentation map, perform an intersection calculation using the water body segmentation map and the image of the water level monitoring surface to obtain a pixel coordinate point set PS of the intersection line obtained from the intersection calculation, and convert the pixel coordinate point set PS through the homography matrix SM to obtain the original water level line point set WS in the physical world corresponding to the pixel coordinate point set PS. S6: Clean abnormal data from the original water level line point set WS to obtain a water level line point set CWS. S7: Obtain the regional water level based on the water level line point set CWS. S8: Obtain the inundation area according to the regional water level and the correspondence list WL, and issue a warning when the inundation area is greater than a preset value. Through the water body inundation area warning method based on image recognition of the present application, the current water body inundation area can be detected in a timely and accurate manner. The following specifically introduces the above steps.
[0045] For step S1: Conduct 3D reconstruction on a specified area.
[0046] In an embodiment of the present application, 3D reconstruction is performed by means of lidar scanning.
[0047] The specific method for conducting 3D reconstruction on a specified area is as follows: Use a drone equipped with lidar to perform aerial scanning operations on the specified area, collect a 3D point cloud data set, and through the drone radar 3D imaging algorithm, analyze and reconstruct the 3D terrain and landform model data of the specified area.
[0048] For step S2: Determine a correspondence list WL between different water levels and inundation areas based on the 3D reconstruction data.
[0049] Specifically, using the 3D terrain and landform model data, the inundation area of the water body at different elevations can be calculated through the triangulated irregular network method, that is, the correspondence between the inundation areas under different water level conditions is obtained. As shown in Table 1, a partial relationship table is listed. In an embodiment of the present application, when determining the correspondence list WL between different water levels and inundation areas, the water level step is set to 0.01 m.
[0050] Table 1 Correspondence table of different water levels and inundation areas
[0051] Serial number Water level (m) Flooded area (m2) 1 6.11 0.0148 2 6.12 0.0457 3 6.13 0.0937 4 6.14 0.1587 5 6.15 0.2408 6 6.16 0.3445 7 6.17 0.5295 8 6.18 0.9748
[0052] For step S3: Determine the monitoring location and the water level monitoring surface.
[0053] Combined with the three-dimensional topographic and geomorphic model data, determine the monitoring position of the camera and determine the water level monitoring surface. Specifically, the monitoring position is to select the area with low terrain in the three-dimensional topographic and geomorphic model data. Install a camera near the monitoring position and adjust the camera angle to ensure that the camera can capture the water level monitoring surface.
[0054] The camera collects images in real time at a certain period. In this application, one image is set to be collected per second for image data collection. The camera uses a high-sensitivity black spherical camera and is equipped with an intelligent fill light, which can achieve all-weather high-quality image data collection.
[0055] The water level monitoring surface is to find a flat wall surface in the monitoring range corresponding to the monitoring position for water level monitoring reference, and the wall surface needs to include the lowest place of the terrain.
[0056] For step S4: Perform on-site spatial calibration on the determined water level monitoring surface to obtain the homography matrix SM of the water level monitoring surface.
[0057] As Figure 2 shown, in the implementation manner of this application, the specific method for performing on-site spatial calibration on the determined water level monitoring surface to obtain the homography matrix SM of the water level monitoring surface is:
[0058] Use a total station to calibrate the four vertex areas of the water level monitoring surface, namely the four position points of upper left A, lower left B, lower right C, and upper right D, obtain the coordinates of the four calibration points in the physical world, and at the same time associate the pixel coordinates of the four calibration points in the collected image to establish the corresponding relationship between the pixel values of the monitoring surface image and the actual values in the physical world, so as to obtain the homography matrix SM of the monitoring surface.
[0059] For step S5: Collect the image containing the water level monitoring surface, use a semantic segmentation model to identify the water body in the collected image to obtain a water body segmentation map, perform an intersection calculation using the water body segmentation map and the image of the water level monitoring surface, obtain the pixel coordinate point set PS of the intersection line obtained from the intersection calculation, and convert the pixel coordinate point set PS through the homography matrix SM to obtain the original water level line point set WS in the physical world corresponding to the pixel coordinate point set PS.
[0060] As Figure 3 shown, in the captured image, it includes the water level monitoring surface 1, the obstacle 2, and the water body 3. Use a semantic segmentation model to identify the water body in the collected image to obtain a water body segmentation map. The water body semantic segmentation model is a model for identifying water bodies obtained through data collection, annotation, and training of images containing water bodies.
[0061] For step S6: Clean the abnormal data of the original water level line point set WS to obtain the water level line point set CWS.
[0062] The obtained original water level point set WS has some abnormal data due to obstacles, water body fluctuations and other factors. In the implementation mode of this application, based on the historical regional water level data, a data cleaning algorithm is used to clean the data of the original water level point set WS, eliminate the abnormal data, and obtain the water level point set CWS.
[0063] The specific method for cleaning the abnormal data of the original water level point set WS to obtain the water level point set CWS is as follows:
[0064] S61: Determine the virtual water level line F. Specifically, the virtual water level line A is a pre-set virtual line that is parallel to the ground line and serves as a horizontal reference.
[0065] S62: Use the homography matrix SM to transform the virtual water level line F to obtain the physical virtual water level line PA in the physical world.
[0066] S63: Fit the water level point set CWS to obtain the real-time water level line F1.
[0067] Specifically, through the fitting method, a water level line is found such that the sum of the squares of the perpendicular distances from all data points in the original water level point set WS ( , ) to this line is the smallest, as shown in Figure 4 , where the calculation formulas for m and b are as follows:
[0068] ;
[0069] ,
[0070] In the formula: n represents the number of points in the original water level point set WS; represents the x physical coordinate of the original water level point set WS on the water level monitoring surface; represents the y physical coordinate of the original water level point set WS on the water level monitoring surface; m represents the slope of the fitted water level line, and b represents the intercept of the fitted water level line on the y-axis.
[0071] S64: Calculate the included angle between the real-time water level line F1 and the physical virtual water level line PA.
[0072] In this application, the included angle between the real-time water level line F1 and the physical virtual water level line PA is calculated by the following formula :
[0073]
[0074] Where: k represents the slope of the physical virtual water level straight line PA; m represents the slope of the fitted real-time water level straight line F1; Represents the angle between the real-time water level line F1 and the physical virtual water level line PA.
[0075] S65: Calculate the difference between the water level mean of the original water level line point set WS and the regional water level before a preset time.
[0076] In the implementation of the present application, the specific method for calculating the mean water level of the original water level line point set WS is: sort the water levels in the original water level line point set WS, remove 10% of the highest water level and 10% of the lowest water level, average the remaining water levels, and obtain the mean water level. Specifically, the difference between the mean water level of the original water level line point set WS and the regional water level one minute ago is calculated. The difference in the regional water level one minute ago is a known value obtained in the previous cycle.
[0077] S66: If the angle is less than the preset angle threshold M, and the difference between the water level mean of the original water level line point set WS and the regional water level before the preset time is within the preset normal water level change range N, then the data of the original water level line point set WS is normal, and there is no need to eliminate abnormal data. The water level line point set CWS is directly obtained, otherwise execute S67.
[0078] Specifically, in the present application, the angle threshold M is set to 3°, and the normal range of water level variation N is set to plus or minus 5 cm. It is understandable that the angle threshold M and the normal range of water level variation N can be specifically set as needed.
[0079] S67: If the data of the original water level point set WS is abnormal, the DBSCAN algorithm is used to cluster the original water level point set WS to obtain multiple clusters, and steps S63 to S65 are executed in sequence for each cluster, and the cluster data with abnormal data are completely eliminated, and the normal cluster data are merged to obtain the water level point set CWS.
[0080] In an embodiment of the present application, in step S65, in an embodiment of the present application, when the DBSCAN algorithm is used to cluster the original water level line point set WS, the domain radius eps is set to 0.03 meters in the DBSCAN algorithm, and the minimum number of points MinPts of the clustering cluster is max(n / 5, 30), where n represents the number of points in the original water level line point set WS.
[0081] For step S7: the regional water level is obtained according to the water level point set CWS.
[0082] In an embodiment of the present application, the specific method for calculating the regional water level based on the water level line point set CWS is as follows: Identify and clean the data once per second to obtain 60 groups of water level line point sets CWS within 1 minute. Calculate the regional water level line point set AWS for one minute through the spatial water level average value calculation. Then calculate the average value of the water level for the regional water level line point set AWS to obtain the regional water level.
[0083] Among them, the spatial water level average value calculation method is: Sort the 60 groups of water level line point sets CWS within 1 minute in the horizontal coordinate direction of the water level line. Calculate the average value of the 60 groups of water level data at the same point position in sequence to obtain the regional water level line point set AWS for one minute.
[0084] For step S8: Obtain the inundated area based on the regional water level and the corresponding relationship list WL, and issue a warning when the inundated area is greater than the preset value.
[0085] In an embodiment of the present application, a display device is set up to display the current regional water level and the inundated area on the display device. Optionally, a warning can be issued when the inundated area exceeds the preset value.
[0086] It can be understood that the water level warning elevation D can also be set based on the three-dimensional topographic and geomorphic model data in combination with the elevation of the important positions inundated by the water body in the specified area. When the regional water level exceeds the set water level warning elevation D, on-site acoustic, optical, and electrical warnings are issued. The regional water level data per minute can also be reported to the digital twin platform through the 4G network for three-dimensional rendering to display the changes in the current regional water level and the inundated area in real time.
[0087] The above shows and describes the basic principles, main features, and advantages of the present invention. Those skilled in the art of this industry should understand that the above embodiments do not limit the present invention in any form. Any technical solutions obtained by using equivalent replacements or equivalent transformations fall within the protection scope of the present invention.
Claims
1. A water body flooding area early warning method based on image recognition, characterized in that: Include: S1: 3D reconstruction of the specified area; S2: Determine a correspondence list WL between different water levels and flooded areas based on the three-dimensional reconstruction data; S3: Determine the monitoring location and water level monitoring surface; S4: Perform on-site spatial calibration on the determined water level monitoring surface to obtain the homography matrix SM of the water level monitoring surface; S5: collect images containing water level monitoring surfaces, use semantic segmentation models to identify water bodies in the collected images to obtain water body segmentation maps, use water body segmentation maps and images of water level monitoring surfaces to perform intersection calculations, obtain pixel coordinate point set PS of intersection lines obtained by the intersection calculations, transform pixel coordinate point set PS through homography matrix SM, and obtain original water level point set WS in the physical world corresponding to pixel coordinate point set PS; S6: Clean the original water level point set WS for abnormal data to obtain the water level point set CWS; S7: Obtain the regional water level according to the water level point set CWS; S8: Obtain the flooded area according to the regional water level and the corresponding relationship list WL, and issue an early warning when the flooded area is greater than a preset value; In step S4, the specific method of performing on-site spatial calibration on the determined water level monitoring surface to obtain the homography matrix SM of the water level monitoring surface is: The total station is used to calibrate the four position points of the upper left A, lower left B, lower right C, and upper right D in the four vertex areas of the water level monitoring surface, and the coordinates of the four calibration points in the physical world are obtained. At the same time, the pixel coordinates of the four calibration points in the collected image are associated to establish the corresponding relationship between the pixel value of the monitoring surface image and the actual value in the physical world, so as to obtain the homography matrix SM of the monitoring surface; In step S6, the specific method of cleaning the original water level point set WS for abnormal data to obtain the water level point set CWS is: S61: Determine a virtual water level straight line F; S62: transforming the virtual water level line F using the homography matrix SM to obtain a physical virtual water level line PA in the physical world; S63: Fitting the water level point set CWS to obtain a real-time water level straight line F1; S64: Calculate the angle between the real-time water level line F1 and the physical virtual water level line PA; S65: Calculate the difference between the water level mean of the original water level line point set WS and the regional water level before a preset time; S66: If the angle is less than the preset angle threshold M, and the difference between the water level mean of the original water level line point set WS and the regional water level before the preset time is within the preset water level normal variation range N, then the data of the original water level line point set WS is normal, and there is no need to remove abnormal data, and the water level line point set CWS is directly obtained, otherwise execute S67; S67: If the data of the original water level point set WS is abnormal, the DBSCAN algorithm is used to cluster the original water level point set WS to obtain multiple clusters, and steps S63 to S65 are sequentially performed on each cluster, and the cluster data with abnormal data are completely eliminated, and the normal cluster data are merged to obtain the water level point set CWS; In the step S65, the difference between the water level mean of the original water level line point set WS and the regional water level one minute ago is calculated; In step S65, the specific method for calculating the water level mean of the original water level line point set WS is: The water levels in the original water level line point set WS are sorted, 10% of the highest water level and 10% of the lowest water level data are removed, and the remaining water levels are averaged to obtain the water level mean.
2. The water body flooding area early warning method based on image recognition according to claim 1 is characterized in that: In step S1, the specific method for performing three-dimensional reconstruction on the designated area is: A drone equipped with a laser radar is used to perform aerial scanning operations on a designated area, collect a three-dimensional point cloud data set, and analyze and reconstruct the three-dimensional terrain model data of the designated area through the drone radar three-dimensional imaging algorithm.
3. The water body flooding area early warning method based on image recognition according to claim 1 is characterized in that: In step S2, when determining the correspondence list WL between different water levels and flooded areas, the water level step is set to 0.01 meters.
4. The water body flooding area early warning method based on image recognition according to claim 1 is characterized in that: When the DBSCAN algorithm is used to cluster the original water level point set WS, the domain radius eps is set to 0.03 meters in the DBSCAN algorithm, and the minimum number of points in the cluster MinPts is max(n / 5,30), where n represents the number of points in the original water level point set WS.
5. The water body flooding area early warning method based on image recognition according to claim 1 is characterized in that: In step S7, the specific method for calculating the regional water level according to the water level point set CWS is: Identify and clean the data once per second to obtain 60 groups of water level point sets CWS within 1 minute. The one-minute regional water level point set AWS is obtained by calculating the spatial water level mean. The water level mean is calculated for the regional water level point set AWS to obtain the regional water level.
6. The water body flooding area early warning method based on image recognition according to claim 5 is characterized in that: In step S7, the spatial water level mean value is calculated by: The 60 water level point sets CWS within 1 minute are sorted according to the horizontal coordinate direction of the water level space, and the average of the 60 water level data at the same point position is calculated in turn to obtain the one-minute regional water level point set AWS.
Citation Information
Patent Citations
Ship lock water level detection method based on semantic segmentation and coarse-to-fine strategy
CN116229339A
Large reservoir-oriented flood inundation object index rapid calculation method
CN118537510A
River bank virtual water gauge implementation method, equipment and medium
CN118537776A
Cited By
Submerged analysis method and system based on image recognition
CN121259622A