Accumulated water detection and early warning method based on video or sequence image
Through water accumulation detection and early warning methods based on video or serial images, the image data is recorded using smartphones and dash recorders, and combined with image processing and geographic information processing technology, efficient and real-time water accumulation monitoring and early warning under adverse environmental conditions is achieved, solving the weather dependence and high cost problems of traditional methods.
Patent Information
- Application Number
- CN202510062285.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-15
- Publication Date
- 2025-04-18
AI Technical Summary
Traditional road water accumulation detection methods have problems such as weather dependence, geometric distortion, insufficient acquisition frequency, high cost and complexity. Especially in severe weather conditions, performance is limited and it is difficult to achieve real-time monitoring and early warning.
Water accumulation detection and early warning methods based on video or sequence images are adopted, and image data is recorded using smartphones and dash recorders, and image processing software is used to align, control point addition, point cloud generation, digital elevation model construction and orthophoto generation. Elevation data comparison and analysis are carried out in combination with geographic information processing software to realize water accumulation depth detection and early warning.
It realizes efficient and real-time monitoring and early warning of water accumulation under unfavorable environmental conditions, reduces equipment thresholds and economic costs, is suitable for complex environments and terrain, and improves the response speed and efficiency of disaster prevention and mitigation.
Smart Images

Figure CN119850889A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of water accumulation detection and early warning, and in particular to a water accumulation detection and early warning method based on video or sequence images. Background Art
[0002] Traditional road water detection methods, such as synthetic aperture radar, have certain limitations, mainly in the following aspects:
[0003] Weather Dependence: SAR performance can be affected by cloud cover and other atmospheric conditions, especially during rainfall.
[0004] Geometric distortion: SAR images may be affected by terrain, resulting in geometric distortion on the images, especially on complex terrain.
[0005] In some areas, SAR data may not be acquired frequently enough, limiting the ability to monitor dynamic phenomena.
[0006] Cost and complexity: SAR systems are expensive to deploy and maintain, and data processing is relatively complex.
[0007] In addition, the performance of traditional visible light imaging technology will also be affected in adverse weather conditions such as rain clouds.
[0008] Lighting conditions: Visible light imaging relies on natural or artificial lighting, and its performance is limited in low-light or nighttime conditions. Different lighting conditions and camera settings may lead to deviations in image color, which limits its application in special areas such as under bridges and inside tunnels.
[0009] Weather effects: Weather conditions such as rain, fog, and smoke can reduce image clarity and contrast.
[0010] Insufficient real-time performance: In some cases, visible light imaging systems may not be able to achieve real-time or near real-time data acquisition and processing.
[0011] Therefore, how to provide a water accumulation detection and early warning method based on video or sequence images is an urgent problem that technicians in this field need to solve. Summary of the invention
[0012] One object of the present invention is to propose a method for water accumulation detection and early warning based on video or sequence images. The present invention can use videos or sequence images recorded by widely popular devices such as smart phones and driving recorders to detect water accumulation, so as to achieve more efficient and real-time monitoring and early warning. This method not only enhances the monitoring capability under adverse environmental conditions, but also provides a scientific basis for the accurate measurement of water accumulation depth and the establishment of an early warning system, thereby significantly improving the response speed and effectiveness of disaster prevention and mitigation.
[0013] A method for detecting and warning waterlogging based on video or sequence images according to an embodiment of the present invention comprises the following steps:
[0014] S1. Use a mobile phone camera to shoot a sequence of images or videos around the waterlogged area;
[0015] S2. Convert the captured photos or videos into a common JPG format;
[0016] S3, using image processing software to align photos, add control points, generate point clouds, build digital elevation models, and generate orthophotos;
[0017] S4. Outline the waterlogged area on the orthophoto of the waterlogged area by visual discrimination method, and construct a vector layer of the waterlogged area;
[0018] S5. Using geographic information processing software to cut out the digital elevation model of the waterlogged area and obtain elevation data of the waterlogged area;
[0019] S6. Repeat the above data collection and processing steps under the condition of no water accumulation on a sunny day at the same location and area to obtain relevant data when there is no water accumulation;
[0020] S7. Import the elevation data with and without water accumulation into geographic information processing software, conduct comparative analysis and calculate the water accumulation depth to achieve water accumulation detection and early warning.
[0021] Furthermore, the specific method of taking images and videos of the waterlogged area in S1 is:
[0022] Use a mobile phone camera to shoot around the waterlogged area to capture detailed views of the watershed. When recording a video, shoot around the waterlogged area and use professional software to extract key frames as photos.
[0023] When photographing areas with accumulated water, enable the camera's grid function as a visual aid to help maintain neat arrangement and consistency in your photos;
[0024] After you finish shooting, organize your photos into folders to prepare for subsequent image processing and analysis.
[0025] The waterlogged area has a specific geographical location, which may be a city street, low-lying area, farmland or other area prone to waterlogging. The waterlogging may be temporary, such as short-term waterlogging after a rainstorm, or it may be continuous, such as waterlogging caused by a long-term high groundwater level. A preliminary judgment is made by observing whether there is obvious water accumulation on the surface. The waterlogged area may appear in different colors in the photo, contrasting with the surrounding dry ground. Use a mobile phone camera to shoot around the waterlogged area to capture detailed scenes of the catchment area. When shooting the waterlogged area, enable the camera's grid line function, which will serve as a visual aid to help maintain the neat arrangement and consistency of the photos. At the same time, ensure that the camera remains stable during the shooting process, adopt a unified shooting angle, and avoid violent shaking or rotation. This will not only reduce possible errors in the image stitching process, but also improve the smoothness and naturalness of the final stitching effect.
[0026] Furthermore, the specific steps of image processing in S3 are:
[0027] S31. Preliminary alignment of photos. Start the image processing software and import the pictures of the waterlogged area from the device. Each of these pictures has its own coordinate data. After importing these pictures, use the photo alignment function in the software to perform photo alignment. Photo alignment can determine the precise position and direction of each picture in three-dimensional space, providing a basis for generating seamless high-quality orthophotos, three-dimensional models and terrain data.
[0028] When initially aligning the photos, start the image processing software and import pictures of the waterlogged areas. Each of these pictures has its own coordinate data. After importing these photos and aligning them, select high precision in the pop-up window and click OK. The software will intelligently complete the automatic sorting and calibration of the photos based on the coordinates, elevation and similarities between each photo, ensuring accurate alignment and seamless stitching of all images.
[0029] S32. Add control points. Use the manual selection tool in the image processing software to select three prominent and easily identifiable feature points on the photo as control points. These points should be unique and identifiable in different photos. After adding the control points, if you find that some control points in the photo are not correctly aligned, you can manually adjust their positions until a satisfactory effect is achieved. After adding the control points and checking their accuracy, run the optimize camera function to optimize the image alignment, and finally re-perform the photo alignment operation to ensure high-quality output of the final image and significantly improve the accuracy and efficiency of image stitching.
[0030] Feature points such as curbs, building edges, or other significant natural or man-made structures to ensure accurate alignment and seamless stitching of images. Try to add control points evenly in each photo and avoid concentrating them in a certain area. This ensures uniform alignment of images during the stitching process. Make sure that each control point is marked in at least two photos.
[0031] S33. Generate point cloud. Generate point cloud through the function of generating point cloud in image processing software. After the generation is completed, carefully check the quality of the point cloud to ensure that there are no obvious defects or errors. If necessary, you can go back and adjust the settings to improve the results. After the point cloud meets the expectations, you can save it in a common point cloud format.
[0032] Through the above operation process, the three-dimensional point cloud data of the catchment area can be successfully captured. These data not only enrich the geographic information of the region, but also provide a solid foundation for further analysis and application.
[0033] S34, generate a digital elevation model. In the software, enable the option of building a digital elevation model, and carefully select the coordinate system and source data suitable for the project. The data source is the point cloud data generated in the previous step. Make sure that the selected data is consistent with the geospatial data. After confirming that all settings are correct, build the digital elevation model.
[0034] Make sure that the selected data is consistent with the geospatial data to ensure the spatial accuracy of the generated digital elevation model. After the generation is completed, check the generated digital elevation model to ensure that it accurately reflects the elevation information of the terrain. This step is a key link in ensuring data quality. If the generated digital elevation model meets the requirements, it can be exported to TIFF format. In this way, the data can be used in geographic information system (GIS) software or related analysis tools for subsequent operations.
[0035] S35. Generate orthophotos. Select the Build Orthophotos function option in the software and configure the resolution, quality, projection and other parameters of the orthophotos as needed. After configuring all parameters, start the orthophoto generation process. After the generation is completed, check the quality of the orthophotos in the image processing software to ensure that there are no obvious distortions and errors. If necessary, you can manually adjust the range of the orthophotos and optimize the color and contrast to enhance the visual effect of the final image. After confirming that the orthophotos meet the quality requirements, you can export them to common image formats.
[0036] Once the orthophoto meets the quality requirements, it can be exported to a commonly used image format, such as TIFF format. The generated orthophoto can be further analyzed in geographic information processing software.
[0037] Furthermore, the specific steps of outlining the waterlogged area and constructing the vector layer of the waterlogged range in S4 are:
[0038] S41. Clip the waterlogged area and outline the water collection area on the orthophoto of the waterlogged area by visual discrimination. Specifically, you can use the add data function in the geographic information processing software to add the orthophoto of the waterlogged area to the map view, select the orthophoto layer, and then view and record the coordinate system information of the image in the coordinate system tab;
[0039] S42. Create a new vector feature. In the pop-up dialog box, name the new Shapefile "Waterlogged Area Range" and select "Surface Feature" as the feature type. When creating the Shapefile, make sure to select the same spatial reference coordinate system as the orthophoto. In the processing software, select the newly created Shapefile layer for editing. Draw the surface feature along the boundary of the waterlogged area. In the map view, use the mouse to click to determine the vertices of the polygon according to the features displayed on the orthophoto to complete the polygon drawing.
[0040] S43. After completing the drawing and editing of the surface elements, save the edited file.
[0041] Waterlogging may be temporary, such as short-term waterlogging after a rainstorm, or it may be persistent, such as waterlogging caused by long-term high groundwater levels. A preliminary judgment can be made by observing whether there is obvious water accumulation on the surface. The waterlogged area may appear in different colors in the photograph, contrasting with the surrounding dry ground.
[0042] Furthermore, the specific steps of cutting out the digital elevation model of the waterlogged area and obtaining the elevation data of the waterlogged area in S5 are:
[0043] S51, importing the waterlogged area and the digital elevation model of the waterlogged area into a map view, opening geographic information processing software and selecting the digital elevation model layer as the input raster in the Extract by Mask tool, selecting the vector surface element of the waterlogged area as the mask data and then performing a clipping operation, the geographic information processing software will automatically extract the corresponding elevation data from the digital elevation model according to the boundary defined by the waterlogged area, and generate a new clipped digital elevation model layer;
[0044] Use the "Add Data" function of the geographic information processing software to import the scope of the waterlogged area and the digital elevation model of the waterlogged area into the map view, and confirm that the coordinate system of the digital elevation model is completely consistent with the coordinate system of the vector surface elements of the waterlogged area to ensure spatial alignment of the data.
[0045] S52. The cropped digital elevation model layer is saved as a new dataset, from which the elevation difference when water is accumulated is obtained.
[0046] It provides basic data for the measurement and analysis of water depth.
[0047] Furthermore, the specific steps for obtaining the data related to no waterlogging in the same location and area in S6 are:
[0048] S61. In the same location and area, in clear weather without water accumulation, a surround shooting was conducted to obtain photos or video materials;
[0049] S62. Applying a mask extraction tool in geographic information processing software, using the waterlogging range obtained in step S5 as a mask, clipping the digital elevation model of the precise area from the digital elevation model, setting output parameters, executing a clipping operation, and generating a digital elevation model without waterlogging.
[0050] At the same location and area, under clear weather conditions without water accumulation, surround shooting was carried out to obtain photos or video materials. These photos were used to generate point cloud data, digital elevation models and orthophotos when there was no water accumulation in the image processing software. Subsequently, in the spatial analysis toolbox of the geographic information processing software, the "Extract by Mask" tool was selected, and the water accumulation range obtained in the previous step was used as a mask to crop the digital elevation model of the precise area from the DEM. The output parameters were set, and the cropping operation was performed to generate a digital elevation model under conditions without water accumulation. This method can accurately capture the surface morphology under conditions without water accumulation, generate a highly accurate digital elevation model, and calculate the elevation difference when there is no water accumulation on a sunny day. These data provide a solid scientific basis for the in-depth monitoring and early warning system of waterlogged areas.
[0051] Furthermore, the specific method of comparing, analyzing and calculating the water depth in S7 to achieve water accumulation detection and early warning is:
[0052] The clipped elevation data of the waterlogged areas and the elevation data under sunny conditions without waterlogging are imported into geographic information processing software for in-depth comparative analysis. The difference in surface elevation when there is waterlogging and when there is no waterlogging can be quantified. The difference between these two values reflects the depth of waterlogging in the waterlogged areas. Based on these data, an early warning system for waterlogging depth can be established to take preventive measures before potential disasters occur.
[0053] During this analysis, we can quantify the difference in surface elevation when there is water and when there is no water. The difference between these two values reflects the depth of water in the waterlogged area. This calculation method not only provides us with a means to measure the depth of water, but also enables us to establish an early warning system for water depth based on these data, so as to take preventive measures before potential disasters occur.
[0054] Furthermore, the specific parameters of the sequence of images and videos captured in S1 are:
[0055] The resolution of the photos is 3024×4032, and the specific camera parameters are ISO speed 50, wide-angle camera 26mm, aperture f1.8, and each photo comes with GPS coordinates including longitude and latitude information;
[0056] The video resolution is 1080×1920, including the specific date and time when the video was shot, as well as the geographical coordinates of the video shooting, including latitude and longitude, and the frame rate per second is 240.37.
[0057] Furthermore, the waterlogged area in S1 includes an area where temporary or continuous waterlogging occurs on the surface due to rainfall, rising groundwater, poor drainage or other reasons.
[0058] The beneficial effects of the present invention are:
[0059] 1. The present invention uses widely popular smart phones, driving recorders and other devices to detect water accumulation. There is no need to purchase expensive professional detection equipment. Ordinary people can easily obtain these devices in daily life, which reduces the equipment threshold and economic cost of water accumulation detection. Only existing mobile phones are needed, and there is no need to invest a large amount of extra money to purchase professional and expensive equipment such as synthetic aperture radar to carry out water accumulation detection. This has significant economic advantages for small communities, remote areas or individual users with limited resources.
[0060] 2. The present invention is applicable to various complex environments and terrains, including areas under bridges and inside tunnels where traditional water accumulation detection methods are difficult to reach or have poor effects. Under bridges, due to their special structure and obstruction, traditional detection methods may be limited, but using this method, users can easily use mobile phones to take pictures at surrounding locations to obtain water accumulation data. Inside tunnels, images can also be recorded through handheld devices, overcoming the limitations of traditional detection equipment such as insufficient light and small space, and providing the possibility for comprehensive monitoring of various water accumulation areas.
[0061] 3. The present invention can capture water accumulation in real time during rainfall and provide timely and accurate information to relevant departments and personnel. During heavy rain, citizens can quickly take pictures of waterlogged areas with their mobile phones. After rapid data processing, information such as the depth and range of waterlogging can be obtained in a short time, so that urban management departments can timely grasp the waterlogging conditions on roads and quickly make decisions such as traffic diversion and drainage facility scheduling, thereby improving the city's rapid response capabilities to flood disasters and reducing the impact of waterlogging on traffic and citizens' lives.
[0062] 4. The present invention can freely select different shooting angles and ranges according to actual needs to obtain more comprehensive and detailed water accumulation information. When shooting street water accumulation, it can shoot from different directions and heights to capture the state of water accumulation at different perspectives, and more accurately reflect the distribution and depth changes of water accumulation. This flexibility makes the monitoring of complex water accumulation areas more accurate and can meet the diverse needs of water accumulation detection in different scenarios.
[0063] 5. The orthophotos, DEM, point clouds and other data generated by the present invention are easy to analyze in geographic information processing software. These data formats are standard formats in the field of geographic information and can be easily integrated and compared with other geographic data for analysis, which facilitates in-depth exploration of the geographic characteristics and changing patterns of waterlogged areas, and provides a more scientific basis for waterlogging monitoring and early warning.
[0064] 6. The present invention can regularly monitor waterlogged areas, regularly or irregularly photograph and analyze sections and areas prone to waterlogging during the rainy season, and track changes in waterlogged areas over time, including the expansion or contraction of the scope of waterlogging, the increase or decrease in depth, etc. Through long-term data accumulation and comparison, it is possible to gain an in-depth understanding of the dynamic changes in waterlogged areas, and provide data support for urban planning, drainage system optimization, etc. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0066] Figure 1 A flowchart of a waterlogging detection and early warning method based on video or sequence images proposed by the present invention;
[0067] Figure 2 This is the orthophoto when there is water accumulation in the study area;
[0068] Figure 3 This is the orthophoto when there is no water accumulation in the study area;
[0069] Figure 4 This is the digital elevation model map when there is water accumulation in the study area before cropping;
[0070] Figure 5 This is the digital elevation model map when there is no water accumulation in the study area before cropping;
[0071] Figure 6 This is the digital elevation model map when there is water accumulation within the cropped water accumulation range;
[0072] Figure 7 This is the digital elevation model map when there is no water accumulation within the waterlogged area after cropping. DETAILED DESCRIPTION
[0073] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, which only illustrate the basic structure of the present invention in a schematic manner, and therefore only show the components related to the present invention.
[0074] refer to Figure 1-7 A method for detecting and warning waterlogging based on video or sequence images, characterized in that it comprises the following steps:
[0075] S1. Data collection: Use a mobile phone camera to shoot sequential images or videos around the waterlogged area;
[0076] Choose a suitable smartphone or dash cam and make sure it has sufficient battery, storage space, and camera function.
[0077] Among them, you need to check and set the camera parameters. When taking photos, the resolution is set to 3024×4032, the ISO speed is 50, the wide-angle camera focal length is 26mm, and the aperture is f1.8; if shooting videos, the resolution is 1080×1920, the shooting date, time and geographic coordinates are recorded, the frame rate is 240.37 per second, and the GPS positioning function of the device is turned on at the same time, so that the captured images can be accompanied by longitude and latitude information.
[0078] It should be noted that when arriving at the flooded area, plan the shooting route and scope according to the size, shape and surrounding environment of the flooded area to ensure that the shooting range can fully cover the flooded area and surrounding areas that may affect the flooding situation, such as drainage outlets, adjacent areas with higher or lower terrain, etc.
[0079] S2. Format conversion: convert the captured photos or videos into the common JPG format;
[0080] Install and launch professional photo format conversion software, such as FormatFactory, XnConvert, etc., batch import all the photos taken into the conversion software, choose to convert the photo format to JPG format in the software, set the conversion parameters, such as maintaining the original image resolution, selecting medium quality compression, etc., to improve the efficiency of subsequent processing.
[0081] It should be noted that after starting the conversion process and waiting for the conversion to be completed, the converted JPG format photos should be organized and stored in a designated folder to prepare for subsequent image processing and analysis.
[0082] S3, Image processing: Use image processing software to align photos, add control points, generate point clouds, build digital elevation models, and generate orthophotos;
[0083] Among them, start image processing software such as Agisoft Metashape, Pix4Dmapper and other software with image alignment, point cloud generation and other functions. On the software operation interface, click "Workflow" in the toolbar, select the "Add Photos" option, and import all JPG format photos of the waterlogged area into the software. During the import process, pay attention to check whether all photos have been successfully imported, and whether the order and arrangement of the photos are as expected;
[0084] Image Alignment:
[0085] After the photos are imported, click the "Workflow" menu again and select the "Align Photos" function. In the alignment settings pop-up window, select the high-precision alignment option to ensure that the software can intelligently complete the automatic sorting and calibration of photos based on the coordinates, elevation, and similarities between each photo.
[0086] After starting the alignment operation, the software will automatically analyze the photo data and calculate the position and orientation of each photo in three-dimensional space. This process may take some time, depending on the number of photos, computer performance and other factors. After the alignment operation is completed, check the alignment results to ensure that all images are accurately aligned and seamlessly stitched. The preview function provided by the software can be used to check whether there are obvious misalignments, overlaps or gaps in the image stitching. If there are any problems, you need to further check the photo data or adjust the alignment parameters.
[0087] Add control points
[0088] Use the manual selection tool in the image processing software to carefully select three prominent and easily identifiable feature points on the photo as control points. These feature points should be selected in locations that are unique and identifiable in different photos, such as specific signs on the edge of the road, corners of buildings, the bottom of telephone poles and other natural or man-made structures. Try to add control points evenly in each photo and avoid concentrating them in a certain area. Make sure there are enough control points throughout the entire shooting range to ensure the accuracy of image stitching.
[0089] During the process of adding control points, if you find that the positions of some control points in different photos are difficult to accurately match or align, you can manually adjust their positions until the corresponding positions of the control points in each photo are accurate. At this time, the symbol color of the control point changes from blue to green, indicating that the adjustment is successful. After adding the control points, run the "Optimize Camera" function in the software. This function will optimize the camera parameters according to the position information of the control points to further improve the accuracy of image alignment.
[0090] Finally, the photo alignment operation was performed again, this time with the "highest" precision setting selected to perform a final optimization on the image stitching results to ensure that the generated images had high-quality output, significantly improve the accuracy and efficiency of image stitching, and lay a solid foundation for the subsequent generation of accurate 3D models, digital elevation models (DEMs), and orthophotos.
[0091] Point cloud generation
[0092] On the operation interface of the image processing software, click "Workflow" in the toolbar and select the "Create Point Cloud" option.
[0093] In the Point Cloud Generation Settings dialog box that pops up, select the appropriate point cloud density according to the complexity of the waterlogged area and the required accuracy. Generally, for complex waterlogged areas or scenes that require high-precision analysis, you can select a higher point cloud density, but be aware that a higher density will increase processing time and computing resource consumption accordingly. In this step, set the point cloud accuracy to "High" to ensure that the generated point cloud data can accurately reflect the terrain and land features of the waterlogged area.
[0094] After confirming that all settings are correct, click the "OK" button to start the point cloud generation process. During the point cloud generation process, the software will generate three-dimensional point cloud data through complex algorithms based on the image data and previous processing results. This process may take a long time, depending on the number of photos, the selected point cloud density, and the processing power of the computer. While waiting, you can observe the progress information displayed on the software interface to understand the progress of the point cloud generation.
[0095] After the point cloud is generated, carefully check the quality of the point cloud. Use the point cloud viewing tools provided by the software to observe the point cloud data from different angles and different zoom ratios to check whether there are obvious defects or errors, such as uneven point cloud sparseness, local missing points, excessive noise, etc. If problems are found, return to the previous steps for adjustments and improvements according to the specific situation. If the point cloud quality meets expectations, it can be saved in a commonly used point cloud format such as PLY or LAS format for further analysis and application. The successfully captured three-dimensional point cloud data of the catchment area will provide rich basic data for water depth calculation and other geographic information analysis.
[0096] DEM generation
[0097] Find the "Workflow" menu in the image processing software interface, click to select, and select the "Build, DEM" (BuildDEM) option, which is a key step in starting the digital elevation model (DEM) generation process.
[0098] In the pop-up settings window, carefully select the coordinate system applicable to the current waterlogging detection project. The choice of coordinate system should ensure consistency with the actual geographic spatial data. It can usually be selected based on the geographic information standards of the area or reference to existing geographic data coordinate systems. At the same time, in the data source option, clearly select the point cloud data generated in the previous step as the basic data for constructing DEM to ensure the accuracy and completeness of the selected data.
[0099] After confirming that all settings are correct, start the DEM construction process. Since this process involves a large amount of data calculation, it may take a long time. The specific duration depends on the scale of the point cloud data and the processing power of the computer. During the construction process, you can observe the progress prompt information through the software interface to understand the progress of DEM generation.
[0100] After the DEM is generated, it must be strictly checked to ensure that it accurately reflects the elevation information of the terrain in the waterlogged area. Use the elevation viewing tool provided by the software to check whether the elevation values of each point in the DEM are reasonable and whether there are obvious outliers or error areas. This step is a key link in ensuring data quality. If problems are found in the generated DEM, the causes should be analyzed in a timely manner and corresponding measures should be taken to correct them, such as rechecking the point cloud data, adjusting the coordinate system settings, or optimizing the DEM construction parameters. If the DEM meets the requirements, it should be exported to a commonly used geographic information data format for subsequent operations in geographic information processing software or related analysis tools, such as waterlogging depth calculation, terrain analysis, etc.
[0101] S35. Orthophoto generation
[0102] Enter the "Workflow" menu of the image processing software, find and click the "Build Orthomosaic" option, and the settings window will pop up.
[0103] For resolution, the size of the waterlogged area, the accuracy required for analysis, and equipment performance must be considered comprehensively. If the waterlogged area is small and needs to be accurately viewed in detail, a higher resolution can be set. If the area is large and the focus is on the overall waterlogging situation, the resolution can be appropriately lowered to balance data processing efficiency and image clarity.
[0104] In terms of quality, if it is mainly used for qualitative analysis of the scope of waterlogging, medium quality can be selected; if you want to make accurate estimates of waterlogging depth or compare with other high-precision data, high quality should be selected. High quality can reduce image noise and improve color fidelity, but it will increase processing time.
[0105] The projection parameters should be set according to the geographical location of the waterlogged area and the project requirements. Common ones include choosing a map projection method suitable for the local area to ensure that the orthophoto accurately matches the actual geographic spatial location. At the same time, the correct parameters such as the central meridian need to be set to ensure that the direction and scale of the image are correct.
[0106] If problems are found in the orthophoto, manually adjust the image range and optimize the color and contrast to improve the visual effect. For example, if a certain area of the image is dark, increase the brightness and contrast. If there is local distortion, check the relevant data and processing steps, and try to regenerate or make local corrections.
[0107] After confirming that the orthophoto meets the quality requirements, it is exported to a commonly used image format, such as TIFF format. The generated orthophoto can be used for further geographic information analysis.
[0108] S4. Clipping of waterlogging area: Outline the waterlogging area on the orthophoto of the waterlogging area through visual discrimination method, and construct a vector layer of the waterlogging range;
[0109] Open the geographic information processing software, use the "Add Data" function to add the orthophoto of the waterlogged area to the map view, select the orthophoto layer, and view and record the coordinate system information of the image in the Coordinate System tab.
[0110] Create a new vector feature, name the new Shapefile "Waterlogged Area Range" in the pop-up dialog box, select "Surface Feature" as the feature type, and make sure to select the same spatial reference coordinate system as the orthophoto.
[0111] Select the newly created Shapefile layer, right-click and select "Start Editing", select the "Drawing" tool, use the "Polygon" or "Free Hand Drawing" option according to the boundary features of the waterlogged area on the orthophoto, and use the mouse to click to determine the polygon vertices to draw the surface feature. After completing the polygon drawing, double-click the closed figure or click the Finish Drawing button. If you need to adjust the boundary of the drawn surface feature, use the edit vertex function to move or adjust the vertices to ensure that the actual scope of the waterlogged area is accurately reflected.
[0112] After completing the drawing and editing of the surface features, click the "Save Edit" button in the "Edit" toolbar to save your work, click Stop Editing in the Edit toolbar, and choose to save or abandon the changes made. After confirmation, click Save Edit to complete the editing process. If necessary, you can use the Export Data function to export the surface features as an independent data file for further applications such as overlay analysis of the waterlogged area and other geographic features.
[0113] S5. Digital elevation model clipping: Use geographic information processing software to clip the digital elevation model of the waterlogged area to obtain the elevation data of the waterlogged area;
[0114] Using the "Add Data" function of the geographic information processing software, import the previously created "waterlogging area range" vector surface element and the elevation model DEM of the waterlogging area into the map view. Before adding the DEM, be sure to confirm that its coordinate system is completely consistent with the coordinate system of the vector surface element to ensure spatial alignment of the data. Overlay the DEM and vector surface elements to facilitate subsequent analysis and operations.
[0115] Open the "Spatial Analysis" toolbox of the geographic information processing software, find and open the "Extraction by Mask Tool" in the "Extraction Analysis" category, and in the "Extraction by Mask" tool dialog box, select the DEM layer as the input raster and the vector surface features of the waterlogged area as the mask data. Specify the save location and file name for the clipping result, and prepare to output the clipped DEM data, which will only contain the elevation information of the waterlogged area.
[0116] Click OK to execute the clipping operation. The geographic information processing software will automatically extract the corresponding elevation data from the DEM according to the boundary defined by the waterlogging range, generate a new clipped DEM layer, and finally save the clipped DEM layer as a new dataset. From it, the elevation difference of the waterlogged area when there is waterlogging can be obtained, providing basic data for subsequent calculation of waterlogging depth.
[0117] S6. Data collection under no water accumulation conditions: repeat the above collection and processing steps under no water accumulation conditions on a sunny day at the same location and area to obtain relevant data when no water accumulation occurs;
[0118] Under clear weather conditions without water accumulation, repeat the above data collection steps at the same location and area to take photos or video materials. The settings such as photo resolution, camera parameters and video parameters are the same as those when water accumulates, to ensure that the image data obtained when there is no water accumulation is comparable with the data when water accumulates.
[0119] Using these photos, the image processing software was used to generate point cloud data, digital elevation models (DEMs), and orthophotos without water accumulation according to the previous steps, including image alignment, control point addition, point cloud generation, DEM construction, and orthophoto generation, to ensure the accuracy and consistency of data processing.
[0120] In the geographic information processing software, the "Extract by Mask" tool is applied, and the "waterlogging area range" Shapefile determined during the above-mentioned waterlogging is used as a mask to crop the elevation model of the precise area from the DEM generated when there is no waterlogging. After setting the output parameters, the cropping operation is performed to generate an elevation model under non-waterlogging conditions. This model can accurately reflect the surface morphology of the waterlogging area when there is no waterlogging, and provide important comparative data for the calculation of waterlogging depth.
[0121] S7. Analysis of waterlogging depth: Import elevation data with and without waterlogging into geographic information processing software, conduct comparative analysis and calculate waterlogging depth to achieve waterlogging detection and early warning.
[0122] Import the cropped elevation data of the waterlogged area with water and the elevation data on sunny days without water into geographic information processing software or professional data analysis tools to ensure that the two sets of data accurately correspond in spatial position. This can be verified by checking the coordinate system, data range, etc.
[0123] Comparative analysis operations are performed in the software, and raster calculation, spatial analysis and other functions are used to quantify the surface elevation differences at corresponding locations in the flooded area when there is water and when there is no water. For example, the "Difference Calculation" tool in the software is used to subtract the elevation raster data when there is water from the elevation raster data when there is no water to obtain the raster data of the water depth, where the value of each grid cell represents the water depth at that location.
[0124] The calculated waterlogging depth data are collated and statistically analyzed to obtain statistical indicators such as the maximum, minimum, average, and standard deviation of the waterlogging depth, in order to fully understand the distribution and overall characteristics of the waterlogging depth in the waterlogged area and provide a basis for waterlogging situation assessment and early warning.
[0125] According to the calculation results of waterlogging depth and actual needs, a waterlogging depth warning system is established. Different waterlogging depth thresholds are set and divided into multiple warning levels, such as mild waterlogging (depth less than 10 cm), moderate waterlogging (depth 10-30 cm), severe waterlogging (depth greater than 30 cm), etc., and warning rules and trigger conditions are configured in geographic information processing software or related monitoring platforms.
[0126] When the depth of accumulated water reaches or exceeds a preset warning level threshold, the system automatically issues a warning signal of the corresponding level. The warning signal forms include sound prompts, pop-up displays, SMS notifications, etc., and these warning forms can be customized according to user needs to ensure that relevant personnel can obtain water accumulation information in a timely manner.
[0127] Establish warning information release channels, and ensure that warning information can be promptly and accurately conveyed to relevant departments, surrounding residents, passers-by and other groups that may be affected by waterlogging by integrating with the city's emergency command system, setting up electronic display screens in public places to release information, and using social media platforms to push information, so as to take effective preventive measures, such as drainage facility scheduling, traffic diversion, and personnel evacuation, to reduce the adverse effects of waterlogging on life and production and improve the city's ability to cope with waterlogging disasters. At the same time, regularly test and maintain the warning system to check the rationality of the warning threshold, the timeliness and accuracy of signal transmission, etc., and adjust the system parameters and settings in a timely manner according to the actual waterlogging situation and feedback to ensure its effective operation at all times.
[0128] Example 1: Detection of water accumulation on urban streets
[0129] Data collection
[0130] In a low-lying section of a city street, obvious water accumulation appeared after the rain. The inspectors used a smartphone, turned on the camera grid line function, and maintained a stable posture to shoot around the waterlogged area. The resolution of the photos taken was 3024×4032, the camera parameters were ISO speed 50, wide-angle camera 26mm, aperture f1.8, and the photos came with GPS coordinates. At the same time, a video was recorded with a resolution of 1080×1920, including the shooting time, geographic coordinates, and 240.37 frames per second. After shooting, the photos were converted from HEIC format to JPG format and saved in the designated folder.
[0131] Image preprocessing
[0132] Start the image processing software and import the photos. Select the "Align Photos" function in the software and select the high-precision option. The software will automatically sort and calibrate. Then manually select feature points such as curbs, the bottom of street lamp poles, and the entrances of street shops as control points, ensuring that each control point is marked and evenly distributed in at least two photos. After adding control points, run the "Optimize Camera" function and realign the photos with "highest" precision.
[0133] Point cloud generation and processing
[0134] Click the "Create Point Cloud" option, select a higher point cloud density, set the accuracy to "High", and start the generation process. After generation, check the point cloud quality to ensure that the point cloud can clearly reflect the contours of the waterlogged area and surrounding objects. Then save the point cloud in PLY format.
[0135] DEM and orthophoto generation
[0136] Select "Build DEM" in "Workflow", select a coordinate system suitable for the local area, build DEM with the generated point cloud as the data source, check its accuracy after generation and export it to TIFF format. Then select "Build Orthophoto", configure appropriate resolution, quality and projection parameters, check for distortion after generation, and export it to TIFF format after manual adjustment.
[0137] Clipping of waterlogged area
[0138] Open the geographic information processing software, import the orthophoto, and check and record the coordinate system information. Create a new "Waterlogging Area Range" vector feature, select "Surface Feature" and ensure that it is consistent with the orthophoto coordinate system. Start editing and use the "Polygon" tool to draw a surface feature based on the waterlogging boundary features. Save the edit after the editing is completed.
[0139] Clipping of elevation model of waterlogged area
[0140] Import the waterlogged area and DEM, confirm that the coordinate systems are consistent, and then overlay them. Use the "Extract by Mask" tool to clip the DEM with the waterlogged area vector surface features as a mask to obtain the waterlogged area elevation model and save it as a new dataset.
[0141] Data collection and processing without water accumulation
[0142] A few days later, when there was no water accumulation at the same street location, the above data collection steps were repeated to obtain photos and videos. The point cloud, DEM and orthophotos were generated in the same way when there was no water accumulation, and the elevation model of the water-free area was cropped out.
[0143] Calculation and early warning of water depth
[0144] Import the elevation model data with and without waterlogging into geographic information processing software to calculate the depth of waterlogging. Set the waterlogging depth warning threshold, such as 10 cm for mild waterlogging, 20 cm for moderate waterlogging, and 30 cm for severe waterlogging. When the calculated waterlogging depth reaches the corresponding threshold, the system will notify the relevant personnel of the municipal management department through pop-up display and SMS, and at the same time issue a sound alarm at the traffic command center to remind them to take drainage and traffic diversion measures in time.
[0145] Example 2: Farmland waterlogging monitoring
[0146] Data collection
[0147] A large area of water accumulates in a farmland due to heavy rain. Farmers use their mobile phones to take photos of the waterlogged area as required, and pay attention to keeping the camera stable and the viewing angle consistent during the shooting process. The photo and video parameters are the same as those in Example 1. The photos are sorted after the format conversion.
[0148] Image pre-processing and post-processing
[0149] Use image processing software to align photos, add control points, and select significant feature points such as ridges, electric poles, and farmland boundary signs as control points. Then generate point clouds, DEMs, and orthophotos in turn, and adjust parameters according to actual conditions to ensure data quality. Complete the cropping of the waterlogged area and elevation model in geographic information processing software.
[0150] Operation without water accumulation
[0151] After the water in the farmland recedes, take photos and process the data again in the same area to obtain relevant data when there is no water.
[0152] Water Depth Analysis and Application
[0153] After calculating the depth of waterlogging, the data will be provided to the agricultural department. The agricultural department will assess the damage to farmland based on the depth and scope of waterlogging and formulate corresponding drainage and replanting plans. At the same time, the waterlogging depth data will be used to establish a farmland waterlogging early warning model. Before the coming rainy season, farmers will be warned in advance based on weather forecasts and real-time monitoring data to remind them to take farmland protection measures and reduce losses.
[0154] Example 3: Water accumulation detection under bridges
[0155] Data collection
[0156] Under a city bridge, water often accumulates due to poor drainage. After the rain, the inspectors went to the area and used a dashcam to shoot videos around the waterlogged area. Then they extracted key frames as photos. The photo and video parameters met the requirements. After the format conversion, they were processed later.
[0157] Image preprocessing and model building
[0158] Image alignment was performed in the image processing software, and the corners and piers of the bridge structure were selected as control points to ensure accurate image stitching. Point clouds, DEMs, and orthophotos were generated. When constructing DEMs, special attention was paid to selecting a suitable coordinate system to accurately reflect the complex terrain under the bridge.
[0159] Determination of waterlogged areas and clipping of elevation models
[0160] The scope of the flooded area was carefully outlined in the geographic information processing software. Due to the dim light under the bridge, the boundary of the flooded area was accurately identified by adjusting the contrast on the orthophoto, and a vector layer was created and the elevation model of the flooded area was cropped out.
[0161] No water accumulation comparison and depth calculation warning
[0162] Repeat the above operation on a sunny day without water accumulation, and compare the elevation model when there is water accumulation and when there is no water accumulation to calculate the water accumulation depth. Integrate the early warning system with the monitoring system of the bridge management department. When the water accumulation depth reaches the early warning value, a pop-up window will automatically display the water accumulation information on the bridge management monitoring screen, and a text message notification will be sent to the bridge maintenance personnel so that the drainage pipes can be cleaned in time to ensure the safety of the bridge.
[0163] It can be seen from the above different embodiments that the water accumulation detection and early warning method of the present invention can be effectively implemented in different scenarios, providing a practical and reliable solution for water accumulation monitoring and disaster prevention.
[0164] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A method for detecting and warning waterlogging based on video or sequence images, characterized in that: The following steps are involved: S1. Data collection: Use a mobile phone camera to shoot sequential images or videos around the waterlogged area; S2. Format conversion: convert the captured photos or videos into the common JPG format; S3, Image processing: Use image processing software to align photos, add control points, generate point clouds, build digital elevation models, and generate orthophotos; S4. Clipping of waterlogging area: Outline the waterlogging area on the orthophoto of the waterlogging area through visual discrimination method, and construct a vector layer of the waterlogging range; S5. Digital elevation model clipping: Use geographic information processing software to clip the digital elevation model of the waterlogged area to obtain the elevation data of the waterlogged area; S6. Data collection under no water accumulation conditions: repeat the above collection and processing steps under no water accumulation conditions on a sunny day at the same location and area to obtain relevant data when no water accumulation occurs; S7. Analysis of waterlogging depth: Import elevation data with and without waterlogging into geographic information processing software, conduct comparative analysis and calculate waterlogging depth to achieve waterlogging detection and early warning.
2. The method for detecting and warning waterlogging based on video or sequence images according to claim 1, characterized in that: The specific method of shooting images and videos of the waterlogged area in S1 is: Use a mobile phone camera to shoot around the waterlogged area to capture detailed views of the watershed. When recording a video, shoot around the waterlogged area and use professional software to extract key frames as photos. When photographing areas with accumulated water, enable the camera's grid function as a visual aid to help maintain neat arrangement and consistency in your photos; After you finish shooting, organize your photos into folders to prepare for subsequent image processing and analysis.
3. The method for waterlogging detection and early warning based on video or sequence images according to claim 1, characterized in that: The specific steps of image processing in S3 are: S31. Preliminary alignment of photos. Start the image processing software and import the pictures of the waterlogged area from the device. Each of these pictures has its own coordinate data. After importing these pictures, use the photo alignment function in the software to perform photo alignment. Photo alignment can determine the precise position and direction of each picture in three-dimensional space, providing a basis for generating seamless high-quality orthophotos, three-dimensional models and terrain data. S32. Add control points. Use the manual selection tool in the image processing software to select three prominent and easily identifiable feature points on the photo as control points. These points should be unique and identifiable in different photos. After adding the control points, if you find that some control points in the photo are not correctly aligned, you can manually adjust their positions until a satisfactory effect is achieved. After adding the control points and checking their accuracy, run the optimize camera function to optimize the image alignment, and finally re-perform the photo alignment operation to ensure high-quality output of the final image and significantly improve the accuracy and efficiency of image stitching. S33. Generate point cloud. Generate point cloud through the function of generating point cloud in image processing software. After the generation is completed, carefully check the quality of the point cloud to ensure that there are no obvious defects or errors. If necessary, you can go back and adjust the settings to improve the results. After the point cloud meets the expectations, you can save it in a common point cloud format. S34, generate a digital elevation model. In the software, enable the option of building a digital elevation model, and carefully select the coordinate system and source data suitable for the project. The data source is the point cloud data generated in the previous step. Make sure that the selected data is consistent with the geospatial data. After confirming that all settings are correct, build the digital elevation model. S35. Generate orthophotos. Select the Build Orthophotos function option in the software and configure the resolution, quality, projection and other parameters of the orthophotos as needed. After configuring all parameters, start the orthophoto generation process. After the generation is completed, check the quality of the orthophotos in the image processing software to ensure that there are no obvious distortions and errors. If necessary, you can manually adjust the range of the orthophotos and optimize the color and contrast to enhance the visual effect of the final image. After confirming that the orthophotos meet the quality requirements, you can export them to common image formats.
4. The method for detecting and warning waterlogging based on video or sequence images according to claim 1, characterized in that: The specific steps of outlining the waterlogged area and constructing the vector layer of the waterlogged range in S4 are: S41. Clip the waterlogged area and outline the water collection area on the orthophoto of the waterlogged area by visual discrimination. Specifically, you can use the add data function in the geographic information processing software to add the orthophoto of the waterlogged area to the map view, select the orthophoto layer, and then view and record the coordinate system information of the image in the coordinate system tab; S42. Create a new vector feature. In the pop-up dialog box, name the new Shapefile "Waterlogged Area Range" and select "Surface Feature" as the feature type. When creating the Shapefile, make sure to select the same spatial reference coordinate system as the orthophoto. In the processing software, select the newly created Shapefile layer for editing. Draw the surface feature along the boundary of the waterlogged area. In the map view, use the mouse to click to determine the vertices of the polygon according to the features displayed on the orthophoto to complete the polygon drawing. S43. After completing the drawing and editing of the surface elements, save the edited file.
5. The method for detecting and warning waterlogging based on video or sequence images according to claim 1, characterized in that: The specific steps of cutting out the digital elevation model of the waterlogged area and obtaining the elevation data of the waterlogged area in S5 are: S51, importing the waterlogged area and the digital elevation model of the waterlogged area into a map view, opening geographic information processing software and selecting the digital elevation model layer as the input raster in the Extract by Mask tool, selecting the vector surface element of the waterlogged area as the mask data and then performing a clipping operation, the geographic information processing software will automatically extract the corresponding elevation data from the digital elevation model according to the boundary defined by the waterlogged area, and generate a new clipped digital elevation model layer; S52. The cropped digital elevation model layer is saved as a new dataset, from which the elevation difference when water is accumulated is obtained.
6. The method for detecting and warning waterlogging based on video or sequence images according to claim 1, characterized in that: The specific steps for obtaining the data related to no waterlogging in the same location and area in S6 are: S61. In the same location and area, in clear weather without water accumulation, a surround shooting was conducted to obtain photos or video materials; S62. Applying a mask extraction tool in geographic information processing software, using the waterlogging range obtained in step S5 as a mask, clipping the digital elevation model of the precise area from the digital elevation model, setting output parameters, executing a clipping operation, and generating a digital elevation model without waterlogging.
7. The method for detecting and warning waterlogging based on video or sequence images according to claim 1, characterized in that: The specific method of comparing, analyzing and calculating the water depth in S7 to achieve water accumulation detection and early warning is: The clipped elevation data of the waterlogged areas and the elevation data under sunny conditions without waterlogging are imported into geographic information processing software for in-depth comparative analysis. The difference in surface elevation when there is waterlogging and when there is no waterlogging can be quantified. The difference between these two values reflects the depth of waterlogging in the waterlogged areas. Based on these data, an early warning system for waterlogging depth can be established to take preventive measures before potential disasters occur.
8. The method for detecting and warning waterlogging based on video or sequence images according to claim 2, characterized in that: The specific parameters of the sequence images and videos captured in S1 are: The resolution of the photos is 3024×4032, and the specific camera parameters are ISO speed 50, wide-angle camera 26mm, aperture f1.8, and each photo comes with GPS coordinates including longitude and latitude information; The video resolution is 1080×1920, including the specific date and time when the video was shot, as well as the geographical coordinates of the video shooting, including latitude and longitude, and the frame rate per second is 240.
37.
9. The method for detecting and warning waterlogging based on video or sequence images according to claim 1, characterized in that: The waterlogged area in S1 includes an area where temporary or continuous waterlogging occurs on the surface due to rainfall, rising groundwater, poor drainage or other reasons.
Citation Information
Cited By
Urban ponding intelligent identification method and device based on unmanned aerial vehicle group multispectral imaging
CN120356126A