A method, apparatus, equipment and storage medium for identifying the depth of water accumulation in bridges and culverts.

By constructing a virtual scale and segmenting the target, the depth of water accumulation in bridges and culverts can be accurately identified, solving the problems of low accuracy and low automation in identifying the depth of water accumulation in bridges and culverts, ensuring the safety of vehicle passage and reducing operation and maintenance costs.

CN116109995BActive Publication Date: 2026-05-26CHINA TELECOM CLOUD TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA TELECOM CLOUD TECH CO LTD
Filing Date
2023-02-02
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

In existing technologies, it is difficult to accurately identify the depth of water accumulation in bridges and culverts, which poses a safety risk to vehicles. Furthermore, existing equipment has a low degree of automation, high maintenance costs, and is greatly affected by the environment.

Method used

By acquiring bridge and culvert images, determining the scale image and constructing a virtual scale, target segmentation is performed. The water depth value is determined using the top edge of the water accumulation area and the virtual scale markings, and accurate water depth information is output.

Benefits of technology

It enables accurate identification of water depth in bridges and culverts, reduces operation and maintenance costs, has a wide range of applications, reduces the impact of environmental factors, and ensures driving safety for drivers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116109995B_ABST
    Figure CN116109995B_ABST
Patent Text Reader

Abstract

This invention discloses a method, apparatus, device, and storage medium for identifying the depth of water accumulation in bridges and culverts, relating to the field of intelligent transportation technology. The invention includes first acquiring an image of the bridge or culvert; then identifying a scale image within the bridge or culvert image and constructing a virtual scale based on the scale image; next, performing target segmentation on the bridge or culvert image; and, upon identifying the corresponding water accumulation area, determining the water depth value based on the top edge of the water accumulation area and the scale markings on the virtual scale; finally, outputting the water depth value. This method, by constructing a virtual scale, accurately identifies the water depth in bridges and culverts, enabling drivers to obtain precise water depth information and providing driving safety reminders.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent transportation technology, and in particular to a method, device, equipment, and storage medium for identifying the depth of water accumulation in bridges and culverts. Background Technology

[0002] Underpasses are a common structural feature in urban transportation, and their locations are typically lower than other parts of the road. In such cases, heavy rainfall or poor road drainage can easily cause significant water accumulation under the underpass, and the depth of the water can be difficult to determine. If vehicles attempt to pass through, the deep water could pose a danger.

[0003] In existing technologies, the common practice is to install measuring scales on the walls of bridges and culverts and manually read the water depth. However, this method lacks corresponding water depth reading equipment and prompts, making it impossible to determine the water depth before vehicles pass. Another approach is to install water depth sensors under the bridge or culvert and connect them to external microcontrollers or other devices. However, this method suffers from low automation, high maintenance costs, and is highly susceptible to environmental influences. Using modern computer vision methods, existing cameras and measuring scales installed on the bridge or culvert walls can be fully utilized. Deep learning methods can be used to detect the presence of water and read the scales. However, in practical applications, this method can lead to scale marking errors due to dirt, thus affecting the accuracy of water depth readings. Summary of the Invention

[0004] In view of the above problems, the present invention is proposed to provide a method, apparatus, device and storage medium for identifying the depth of water accumulation in bridges and culverts that overcomes the above problems.

[0005] Based on a first aspect of the present invention, a method for identifying the depth of water accumulation in bridges and culverts is provided, the method comprising:

[0006] Acquire bridge and culvert images;

[0007] Identify the scale image in the bridge and culvert image, and construct a virtual scale based on the scale image;

[0008] Perform target segmentation on the bridge and culvert image;

[0009] Once the water accumulation area corresponding to the bridge and culvert is segmented out, the water depth value is determined based on the top edge of the water accumulation area and the scale markings in the virtual ruler.

[0010] Output the water depth value.

[0011] Based on a second aspect of the present invention, a device for identifying the depth of water accumulation in bridges and culverts is also provided, the device comprising:

[0012] Bridge and culvert image acquisition module, used to acquire bridge and culvert images;

[0013] The scale image processing module is used to determine the scale image in the bridge and culvert image and construct a virtual scale based on the scale image;

[0014] An image segmentation module is used to perform target segmentation on the bridge and culvert image;

[0015] The depth value determination module is used to determine the water depth value based on the top edge of the water accumulation area and the scale markings in the virtual scale when the water accumulation area corresponding to the bridge and culvert is segmented out.

[0016] The depth information output module is used to output the water depth value.

[0017] Based on a third aspect of the present invention, an electronic device is also provided, comprising:

[0018] One or more processors;

[0019] Memory;

[0020] One or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs being configured to perform any of the methods described above.

[0021] Based on a fourth aspect of the invention, a computer-readable storage medium is also provided for storing a computer program for use in conjunction with an electronic device, the computer program being executable by a processor to perform any of the methods described above.

[0022] Compared with existing technologies, this invention includes first acquiring an image of a bridge or culvert, then identifying a scale image within the bridge or culvert image, and constructing a virtual scale based on the scale image. Next, the bridge or culvert image is segmented, and after segmenting the corresponding waterlogged area, the water depth value is determined based on the top edge of the waterlogged area and the scale markings on the virtual scale. Finally, the water depth value is output. This method, by constructing a virtual scale, accurately identifies the water depth of bridges and culverts, enabling drivers to obtain precise water depth information and providing driving safety reminders.

[0023] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description

[0024] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings.

[0025] In the attached diagram:

[0026] Figure 1 This is a flowchart illustrating the steps of a method for identifying the depth of water accumulation in bridges and culverts provided in an embodiment of the present invention.

[0027] Figure 2 This is a schematic diagram of the shooting environment for a bridge and culvert image provided in an embodiment of the present invention;

[0028] Figure 3 This is a flowchart illustrating the steps of another method for identifying the depth of water accumulation in bridges and culverts provided in an embodiment of the present invention.

[0029] Figure 4 This is a schematic diagram of the structure of a measuring scale provided in an embodiment of the present invention;

[0030] Figure 5 This is a schematic diagram of a measurement scale after edge feature extraction provided in an embodiment of the present invention;

[0031] Figure 6 This is a schematic diagram of adding a vertical dotted line to the right side of the measuring scale according to an embodiment of the present invention;

[0032] Figure 7 This is a schematic diagram of adding a vertical dotted line to the left side of the measuring scale according to an embodiment of the present invention;

[0033] Figure 8 This is a schematic diagram of the structure of a bridge and culvert water depth identification device provided in an embodiment of the present invention. Detailed Implementation

[0034] Exemplary embodiments of the invention will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this invention will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.

[0035] Reference Figure 1 This invention illustrates a method for identifying the depth of water accumulation in bridges and culverts, according to an embodiment of the present invention. The method may include:

[0036] S101. Obtain bridge and culvert images.

[0037] In this embodiment of the invention, the bridge and culvert image is obtained by a camera device from the opposite side of the bridge and culvert wall, where a measuring scale is set. (Refer to...) Figure 2 As shown, the dashed line on the left represents the bridge / culvert wall, the strip-shaped area below the bridge / culvert wall is the measuring scale, and the dashed line at the bottom represents the road surface. The bridge / culvert image includes at least the road surface, the measuring scale, and the bridge / culvert wall. For example, the measuring scale can occupy 70% to 90% of the height of the bridge / culvert image to ensure the accuracy of subsequent water depth identification.

[0038] In one example, the camera device can also be a rotatable camera. If a rotatable camera is selected, the camera device can be used for other purposes during non-rainy periods. In rainy conditions, the PTZ value corresponding to the captured bridge and culvert image can be restored. Here, P (pan) represents the horizontal rotation angle of the camera device; T (Tilt) represents the vertical pitch angle of the camera device; and Z (Zoom) represents the focal length of the camera device.

[0039] S102. Determine the scale image in the bridge and culvert image, and construct a virtual scale based on the scale image.

[0040] In this embodiment of the invention, the scale image can be understood as an image containing a measuring scale. The scale image can be cropped from a bridge or culvert image. For example, a preset scale detection model can be used to detect the measuring scale in the bridge or culvert image and determine the corresponding scale area. Then, based on the scale area, a virtual scale is constructed, thereby avoiding the problem that directly reading the scale reading visually may be inaccurate due to dirt on the scale.

[0041] S103. Perform target segmentation on the bridge and culvert image.

[0042] In this embodiment of the invention, target segmentation refers to dividing the bridge and culvert image into target regions according to different detection targets. For example, the detection targets could be road surface and water accumulation. Therefore, after target segmentation of the bridge and culvert image, it can be determined whether there is a water accumulation area in the current bridge and culvert. If no water accumulation area is segmented, it indicates that there is no water accumulation in the current bridge and culvert.

[0043] S104. After segmenting the water accumulation area corresponding to the bridge and culvert, determine the water depth value based on the top edge of the water accumulation area and the scale markings in the virtual ruler.

[0044] S105, Output the water depth value.

[0045] In this embodiment of the invention, if a waterlogged area corresponding to a bridge or culvert is segmented, it is determined that the bridge or culvert currently has water accumulation. The water depth can then be determined based on the top edge of the waterlogged area and the scale markings on the virtual scale. For example, the water depth can be determined by the vertical coordinate of the top edge on the virtual scale and the scale reading of each marking on the virtual scale. The water depth value is then output and displayed. For example, an electronic display device can be installed outside the bridge or culvert to display the water depth, thereby accurately identifying the water depth. This allows drivers to obtain accurate water depth information and provides driving safety reminders. Furthermore, this invention does not require additional on-site equipment, has low maintenance costs, is less affected by environmental factors, and has a wide range of applications.

[0046] Reference Figure 3 This invention illustrates another method for identifying the depth of water accumulation in bridges and culverts, provided by an embodiment of the present invention. The method may include:

[0047] S301. Obtain bridge and culvert images.

[0048] In this embodiment of the invention, the description of step S301 is the same as that of step S101.

[0049] S302. Determine the scale area in the bridge and culvert image.

[0050] S303. Expand the scale area according to the preset expansion conditions.

[0051] S304. The scale region after region expansion is cropped from the bridge and culvert image to obtain the scale image, and a virtual scale is constructed based on the scale image.

[0052] In this embodiment of the invention, the ruler image can be understood as an image containing a measuring ruler. The ruler image can be cropped from a bridge / culvert image. For example, a preset ruler detection model can be used to detect the measuring ruler in the bridge / culvert image and determine the corresponding ruler region. Then, based on the ruler region, the corresponding ruler image is obtained. To ensure that the scale values ​​on the ruler are completely within the ruler region, the detected ruler region is expanded according to preset expansion conditions. For example, the preset expansion conditions can be to expand the ruler region by a target pixel distance in all directions. The target pixel distance can be preset, such as 5 pixels, 10 pixels, or 15 pixels, etc., without further limitation. Finally, the expanded ruler region is cropped from the bridge / culvert image, thus obtaining the cropped ruler image.

[0053] In one example, the scale detection model can be a target detection model, which may include a feature extraction network and a target detection network. The feature extraction network is used to extract image feature information from the bridge and culvert image. The bridge and culvert image is input into the feature extraction network for feature extraction to obtain the corresponding image feature information. The target detection network is used to determine the scale feature information corresponding to the measuring scale and its location information in the bridge and culvert image from the image features. Thus, the corresponding scale region can be determined from the bridge and culvert image based on the location information.

[0054] In one embodiment, the training images for the scale detection model may include sample bridge and culvert images under different scenarios. For example, different scenarios may be sample bridge and culvert images taken under various weather and lighting conditions, with or without standing water, after the water has receded, and with various types of vehicles passing by one side of the measuring scale. The sample bridge and culvert images may include pre-set bounding boxes containing the measuring scale.

[0055] The ruler detection model is trained using the aforementioned training images. These training images are then input into the model to detect the ruler and predict its location information. Based on the predicted and actual location information, the loss function value of the model is determined, and the model parameters are adjusted accordingly to obtain the trained ruler detection model. For example, when adjusting the model parameters, if the loss function value decreases very little (e.g., less than 0.5%), parameter tuning is stopped, and the ruler detection model is considered to have completed training.

[0056] The measuring scale in the scale image includes graduation markings, for reference. Figure 4 As shown, the scale markings can be sequentially labeled using positive and negative E symbols. Positive and negative E symbols are located on opposite sides of the measuring scale. The scale reading corresponding to each marking is predetermined based on the measuring scale. For example, for a 1m measuring scale, each marking corresponds to a reading of 5cm; for a 2m measuring scale, each marking corresponds to a reading of 10cm.

[0057] To determine the position of the measuring scale within the virtual scale, after acquiring the scale image, a grayscale conversion can be performed to obtain a grayscale scale image. Next, a Cartesian coordinate system can be established within the virtual scale, and edge features can be extracted from the grayscale scale image, referring to... Figure 5 As shown, the complete scale outline, numerical outline, and graduation mark outline of the measuring scale are obtained. Based on this rectangular coordinate system and the corresponding outline, the ordinate of the graduation mark at the top and bottom of the measuring scale can be determined.

[0058] In another example, refer to Figure 6 and Figure 7 As shown, at least one vertical dashed line can be added to the measuring scale based on the vertical distribution of the scale markings. This allows the pixel position range of all scale markings (positive E or negative E) on the measuring scale to be calculated based on the intersections of the vertical dashed line and the scale markings. For example, a vertical dashed line can be added to the right side of the measuring scale to determine the pixel position range of the negative E scale marking. Then, a vertical dashed line can be added to the left side of the original measuring scale to determine the pixel position range of the positive E scale marking. This process continues, constructing a virtual scale corresponding to the measuring scale, thus avoiding the problem of inaccurate readings due to dirt on the scale when directly reading the scale visually.

[0059] S305. Perform target segmentation on the bridge and culvert image.

[0060] In this embodiment of the invention, target segmentation refers to dividing the bridge and culvert image into target regions according to different detection targets. For example, the detection targets could be road surface and water accumulation. Therefore, after target segmentation of the bridge and culvert image, it can be determined whether there is a water accumulation area in the current bridge and culvert. If no water accumulation area is segmented, it indicates that there is no water accumulation in the current bridge and culvert.

[0061] In one example, a pre-defined segmentation model can be used to segment the bridge and culvert image. Because road surface wetness, darkness, and watermarks / silt are similar to features of standing water, it is easy to misidentify them as waterlogged areas. Therefore, the segmentation model can be trained using a center loss function. The center loss function reduces the false detection of waterlogged areas.

[0062] The segmentation model can be an instance segmentation model, wherein the training images for the instance segmentation model can include sample bridge and culvert images under different scenarios. For example, different scenarios can be sample bridge and culvert images taken under various weather and lighting conditions, with or without standing water, after the water has receded, and with various types of vehicles passing by on one side of a measuring scale. The training images for the instance segmentation model can be pre-defined with bounding boxes for each region category. For example, region categories can include: waterlogged areas, road surfaces, wet road surfaces, dark road surfaces, and water-marked / muddy road surfaces. Furthermore, the bounding boxes for each of the above region categories are labeled using polygons.

[0063] The segmentation model is trained using the aforementioned training images. The training images are input into the segmentation model for target segmentation, determining the corresponding region category and location information. Based on the region category and location information, and the true difference between them and the training images, the center loss function value of the model is determined. The model parameters are then adjusted based on the center loss function value to obtain the trained segmentation model. For example, when adjusting the model parameters, if the center loss function value decreases very little, for example, by no more than 0.5%, parameter tuning is stopped, and the segmentation model training is considered complete.

[0064] S306. After segmenting the water accumulation area corresponding to the bridge and culvert, determine whether the bridge and culvert need to undergo depth detection based on the size information of the water accumulation area.

[0065] In this embodiment of the invention, when the water accumulation area corresponding to the bridge or culvert is segmented, considering that the water accumulation area of ​​the bridge or culvert is too small (i.e., a small area of ​​water accumulation will not affect vehicle traffic), it can be determined whether further depth detection is needed based on the size information of the water accumulation area.

[0066] In one example, the minimum bounding rectangle corresponding to the water accumulation area can be determined. A first threshold corresponding to the width and a second threshold corresponding to the height can be preset. If the width of the minimum bounding rectangle is less than the first threshold, or if the height of the minimum bounding rectangle is less than the second threshold, then it is determined that the bridge does not need depth detection. In this case, the water accumulation status can be output as "no water accumulation".

[0067] In another example, if the width of the minimum bounding rectangle is greater than or equal to a first threshold and the height of the minimum bounding rectangle is greater than or equal to a second threshold, it is determined that the bridge culvert needs to undergo depth detection.

[0068] S307. If it is determined that the bridge or culvert needs to be depth-tested, compare the top vertical coordinate corresponding to the top edge of the water accumulation area with the vertical coordinate corresponding to the scale mark in the virtual ruler.

[0069] S308. Determine the water depth value based on the comparison results.

[0070] In this embodiment of the invention, when it is determined that depth detection is required for the bridge or culvert, the positional relationship between the top ordinate and the marker ordinate can be obtained by comparing the top ordinate corresponding to the top edge of the water accumulation area with the marker ordinate corresponding to the scale markings on the virtual ruler. Considering that the top edge of the water accumulation area may be irregular, multiple edge ordinates can be selected along the top edge of the water accumulation area. For example, multiple edge pixels located on the top edge can be selected from the left and right ranges of the measuring ruler, and the edge ordinates corresponding to these edge pixels can be determined. Finally, the average of the multiple edge ordinates is taken to obtain the top ordinate corresponding to the top edge.

[0071] In one example, if the top vertical coordinate is less than the vertical coordinate of the mark corresponding to the bottom mark in the virtual scale, it means that the water depth is too shallow and has not reached the lowest mark of the measuring scale. Therefore, it will not have any impact on driving safety. Thus, the water depth value can be determined to be zero.

[0072] In another example, if the top ordinate is greater than or equal to the ordinate of the marker corresponding to the bottommost scale mark in the virtual ruler, and less than or equal to the ordinate of the marker corresponding to the topmost scale mark in the virtual ruler, then the water depth value needs to be determined based on the position of the top ordinate on the measuring scale. For example, the water depth value can be calculated based on the scale readings in the virtual ruler and the number of markers corresponding to the scale marks below the top edge of the water accumulation area.

[0073] Considering that the top edge of the water accumulation area may break up the scale markings on the measuring scale, when calculating the number of markings, we can first determine the number of markings corresponding to the complete scale markings below the top edge of the water accumulation area. After determining the number of markings, we then determine the proportion of the incomplete scale markings below the top edge based on the pixel position range of the corresponding scale markings. The proportion refers to the percentage of an incomplete scale marking below the top relative to a complete scale marking. Therefore, we add the number of markings and the proportion to obtain the corresponding number of markings. This number of markings can then be multiplied by the scale reading on the virtual scale to obtain the water accumulation depth value.

[0074] In another example, if the top vertical coordinate is greater than the vertical coordinate of the mark corresponding to the topmost scale mark in the virtual ruler, it indicates that the water depth is too deep, exceeding the highest scale mark of the measurement mark, which seriously affects driving safety. Therefore, the water depth value is determined to be the upper limit scale reading in the virtual ruler.

[0075] S309. Output the water depth value.

[0076] In this embodiment of the invention, the water depth value is displayed. For example, an electronic display device showing the water depth value can be installed outside the bridge or culvert to accurately identify the water depth. This allows drivers to obtain precise water depth information and provides them with driving safety reminders. Furthermore, this invention requires no additional equipment on-site, has low maintenance costs, is less affected by environmental factors, and has a wide range of applications.

[0077] In an optional embodiment of the invention, the method may further include:

[0078] Detect whether there are vehicles in the bridge and culvert image.

[0079] If a vehicle is present in the bridge or culvert image, the step of determining the scale image is terminated.

[0080] In this embodiment of the invention, a preset vehicle detection model can be used to detect whether a vehicle exists in the bridge and culvert image. When a vehicle is present in the bridge and culvert image, the corresponding water accumulation area may be obscured by the vehicle, thus affecting the accuracy of identifying whether there is water accumulation or the depth of water accumulation. Therefore, when a vehicle is detected passing through the bridge and culvert, the next processing operation on the bridge and culvert image is terminated, that is, the step of determining the scale image from the bridge and culvert image is terminated. When acquiring the next frame of the bridge and culvert image, the detection of whether a vehicle exists in the bridge and culvert image is then performed again.

[0081] In one example, the vehicle detection model can be reused with the model of the ruler detection model. That is, the training images of the ruler detection model can simultaneously contain vehicle images of various vehicles, and pre-set bounding boxes including the vehicles.

[0082] In summary, this invention discloses a method for identifying the depth of water accumulation in bridges and culverts. The method includes first acquiring an image of the bridge or culvert; then identifying a scale image within the bridge or culvert image and constructing a virtual scale based on the scale image. Next, the bridge or culvert image is segmented, and after segmenting the corresponding water accumulation area, the water depth value is determined based on the top edge of the water accumulation area and the scale markings on the virtual scale. Finally, the water depth value is output. This method accurately identifies the water depth of bridges and culverts by constructing a virtual scale, enabling drivers to obtain precise water depth information and providing safety reminders.

[0083] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of this application are not limited to the described order of actions, because according to the embodiments of this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of this application.

[0084] Reference Figure 8 This invention illustrates a bridge / culvert water depth identification device according to an embodiment of the present invention. The device may include:

[0085] The bridge and culvert image acquisition module 801 is used to acquire bridge and culvert images.

[0086] The scale image processing module 802 is used to determine the scale image in the bridge and culvert image and construct a virtual scale based on the scale image.

[0087] The image segmentation module 803 is used to perform target segmentation on the bridge and culvert image.

[0088] The depth value determination module 804 is used to determine the water depth value based on the top edge of the water accumulation area and the scale markings in the virtual scale when the water accumulation area corresponding to the bridge and culvert is segmented.

[0089] The depth information output module 805 is used to output the water depth value.

[0090] In an optional embodiment of the invention, the depth value determination module 804 may include:

[0091] The depth detection determination submodule is used to determine whether the bridge or culvert needs to undergo depth detection based on the size information of the water accumulation area after the corresponding water accumulation area has been segmented.

[0092] The depth value determination submodule is used to determine the water depth value based on the top edge of the water accumulation area and the scale markings in the virtual ruler when it is determined that the bridge or culvert needs to be tested for depth.

[0093] In an optional embodiment of the invention, the depth detection and determination submodule may include:

[0094] The rectangle determination unit is used to determine the minimum bounding rectangle corresponding to the water accumulation area when the water accumulation area corresponding to the bridge and culvert is segmented.

[0095] The depth detection unit is used to determine whether the bridge or culvert needs to undergo depth detection based on the size information of the minimum bounding rectangle.

[0096] In an optional embodiment of the invention, the depth detection unit is further configured to:

[0097] If the width of the minimum bounding rectangle is less than the first threshold, or the height of the minimum bounding rectangle is less than the second threshold, then it is determined that the bridge culvert does not need to undergo depth detection.

[0098] If the width of the minimum bounding rectangle is greater than or equal to the first threshold, and the height of the minimum bounding rectangle is greater than or equal to the second threshold, then the bridge culvert needs to undergo depth detection.

[0099] In an optional embodiment of the invention, the depth value determination submodule may include:

[0100] The ordinate comparison unit is used to compare the top ordinate corresponding to the top edge of the water accumulation area with the marker ordinate corresponding to the scale mark in the virtual ruler when it is determined that the bridge or culvert needs to be depth detected.

[0101] A depth value determination unit is used to determine the water depth value based on the comparison result.

[0102] In an optional embodiment of the invention, the device may further include a coordinate determining module for determining the top vertical coordinate, the coordinate determining module being used for:

[0103] Multiple edge coordinates are selected along the top edge of the water accumulation area.

[0104] The average value of multiple edge ordinates is used to obtain the top ordinate corresponding to the top edge.

[0105] In an optional embodiment of the invention, the depth value determination unit may further be used for:

[0106] If the top vertical coordinate is less than the vertical coordinate of the mark corresponding to the bottommost scale mark in the virtual ruler, then the water depth value is determined to be zero.

[0107] If the top vertical coordinate is greater than or equal to the vertical coordinate of the marker corresponding to the bottommost scale mark in the virtual ruler, and less than or equal to the vertical coordinate of the marker corresponding to the topmost scale mark in the virtual ruler, then the water depth value is calculated based on the scale reading in the virtual ruler and the number of markers corresponding to the scale marks below the top edge of the water accumulation area.

[0108] If the top vertical coordinate is greater than the vertical coordinate of the mark corresponding to the topmost scale mark in the virtual scale, then the water depth value is determined to be the upper limit scale reading in the virtual scale.

[0109] In an optional embodiment of the invention, the depth value determination unit may further be used for:

[0110] The number of complete scale markings below the top edge of the water accumulation area is added to the proportional value of the incomplete scale markings below the top edge to obtain the corresponding number of markings.

[0111] The water depth value is obtained by multiplying the number of markers by the scale reading in the virtual ruler.

[0112] In one optional embodiment of the invention, the ruler image processing module may include:

[0113] The scale region determination submodule is used to determine the scale region in the bridge and culvert image.

[0114] The region expansion submodule is used to expand the scale region according to preset expansion conditions.

[0115] The scale image acquisition submodule is used to cut out the scale region after region expansion from the bridge and culvert image to obtain the scale image, and to construct a virtual scale based on the scale image.

[0116] In an optional embodiment of the invention, the scale region determination submodule can also be used for:

[0117] A preset scale detection model is used to determine the scale region in the bridge and culvert image.

[0118] In an optional embodiment of the invention, the image segmentation module 803 can also be used for:

[0119] The bridge and culvert image is segmented using a preset segmentation model, wherein the segmentation model is obtained by parameter tuning and training based on the center loss function.

[0120] In an optional embodiment of the invention, the apparatus may further include:

[0121] The vehicle detection module is used to detect whether there are vehicles in the bridge and culvert image.

[0122] The identification termination module is used to terminate the step of determining the scale image if a vehicle is present in the bridge and culvert image.

[0123] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0124] It will be readily apparent to those skilled in the art that any combination of the above embodiments is feasible, and therefore any combination of the above embodiments is an implementation scheme of the present invention. However, due to space limitations, this specification will not elaborate on each one here.

[0125] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.

[0126] Similarly, it should be understood that, in order to simplify the invention and aid in understanding one or more of the various inventive aspects, features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof in the above description of exemplary embodiments of the invention. However, this disclosure should not be construed as reflecting an intention that the claimed invention requires more features than expressly recited in each claim. Rather, as reflected in the claims, inventive aspects lie in fewer than all features of the single foregoing disclosed embodiment. Therefore, the claims following the detailed description are hereby expressly incorporated into that detailed description, wherein each claim itself is a separate embodiment of the invention.

[0127] Those skilled in the art will understand that modules in the device of the embodiments can be adaptively changed and placed in one or more devices different from that embodiment. Modules, units, or components in the embodiments can be combined into a single module, unit, or component, and further, they can be divided into multiple sub-modules, sub-units, or sub-components. Except where at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all processes or units of any method or device so disclosed. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.

[0128] An electronic device, comprising:

[0129] One or more processors;

[0130] Memory;

[0131] One or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs being configured to perform the methods described in the above embodiments.

[0132] A computer-readable storage medium stores a computer program for use in conjunction with an electronic device, the computer program being executable by a processor to perform the methods described in the embodiments above.

[0133] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0134] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0135] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0136] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0137] Although preferred embodiments of the present invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present invention.

[0138] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.

[0139] The present invention has provided a detailed description of a method and device for identifying the depth of water accumulation in bridges and culverts. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A method for identifying the depth of water accumulation in bridges and culverts, characterized in that, The method includes: Acquire bridge and culvert images; Identify the scale image in the bridge and culvert image, and construct a virtual scale based on the scale image; After obtaining the ruler image, the ruler image is converted to grayscale to obtain a grayscale ruler image; A rectangular coordinate system is established in the virtual ruler, and edge features are extracted from the grayscale ruler image to obtain the complete ruler outline, numerical outline, and scale mark outline of the measurement ruler. Based on the rectangular coordinate system and the corresponding contour, determine the vertical coordinate of the topmost scale mark and the vertical coordinate of the bottommost scale mark in the measuring scale. Based on the vertical distribution of the scale markings on the measuring scale, at least one vertical dashed line is added to the measuring scale. Based on the intersection of the vertical dashed line and the scale markings, the pixel position range of all scale markings in the measuring scale is calculated. Perform target segmentation on the bridge and culvert image; The target segmentation of the bridge and culvert image includes: The bridge and culvert image is segmented using a preset segmentation model, wherein the segmentation model is obtained by parameter tuning and training based on a center loss function; The segmentation model is an instance segmentation model. The training images of the instance segmentation model are pre-set bounding boxes with various region categories, including: water accumulation area, road surface area, wet road surface area, dark road surface area, and water ripple and silt area. Once the water accumulation area corresponding to the bridge and culvert is segmented out, the water depth value is determined based on the top edge of the water accumulation area and the scale markings in the virtual ruler. Output the water depth value.

2. The method for identifying the depth of water accumulation in bridges and culverts according to claim 1, characterized in that, The process of determining the water depth value based on the top edge of the water accumulation area and the scale markings in the virtual ruler includes: Once the water accumulation area corresponding to the bridge and culvert is segmented, it is determined whether the bridge and culvert need to undergo depth detection based on the size information of the water accumulation area. If it is determined that the bridge or culvert needs to be tested for depth, the depth of the water accumulation is determined based on the top edge of the water accumulation area and the scale markings on the virtual ruler.

3. The method for identifying the depth of water accumulation in bridges and culverts according to claim 2, characterized in that, The step of determining whether the bridge or culvert needs depth testing based on the size information of the waterlogged area includes: After segmenting the water accumulation area corresponding to the bridge and culvert, determine the minimum bounding rectangle corresponding to the water accumulation area; Based on the dimensions of the minimum bounding rectangle, determine whether the bridge or culvert needs to undergo depth detection.

4. The method for identifying the depth of water accumulation in bridges and culverts according to claim 3, characterized in that, The step of determining whether the bridge or culvert needs depth detection based on the size information of the minimum bounding rectangle includes: If the width of the minimum bounding rectangle is less than the first threshold, or the height of the minimum bounding rectangle is less than the second threshold, it is determined that the bridge does not need to undergo depth detection. If the width of the minimum bounding rectangle is greater than or equal to the first threshold, and the height of the minimum bounding rectangle is greater than or equal to the second threshold, then the bridge culvert needs to undergo depth detection.

5. The method for identifying the depth of water accumulation in bridges and culverts according to claim 2, characterized in that, The process of determining the water depth value based on the top edge of the water accumulation area and the scale markings in the virtual ruler includes: If it is determined that the bridge or culvert needs to be depth-tested, compare the top ordinate of the top edge of the water accumulation area with the ordinate of the mark corresponding to the scale mark in the virtual ruler. The water depth was determined based on the comparison results.

6. The method for identifying the depth of water accumulation in bridges and culverts according to claim 5, characterized in that, The method also includes the step of determining the top ordinate: Select multiple edge coordinates along the top edge of the water accumulation area; The average value of multiple edge ordinates is used to obtain the top ordinate corresponding to the top edge.

7. The method for identifying the depth of water accumulation in bridges and culverts according to claim 5, characterized in that, Determining the water depth value based on the comparison result includes: If the top vertical coordinate is less than the vertical coordinate of the mark corresponding to the bottommost scale mark in the virtual ruler, then the water depth value is determined to be zero. If the top vertical coordinate is greater than or equal to the vertical coordinate of the marker corresponding to the bottommost scale mark in the virtual scale, and less than or equal to the vertical coordinate of the marker corresponding to the topmost scale mark in the virtual scale, then the water depth value is calculated based on the scale reading in the virtual scale and the number of markers corresponding to the scale marks below the top edge of the water accumulation area. If the top vertical coordinate is greater than the vertical coordinate of the mark corresponding to the topmost scale mark in the virtual scale, then the water depth value is determined to be the upper limit scale reading in the virtual scale.

8. The method for identifying the depth of water accumulation in bridges and culverts according to claim 7, characterized in that, The calculation of the water depth value based on the scale readings in the virtual scale and the number of scale markings corresponding to the markings below the top edge of the water accumulation area includes: The number of complete scale markings below the top edge of the water accumulation area is added to the proportional value of the incomplete scale markings below the top edge to obtain the corresponding number of markings. The water depth value is obtained by multiplying the number of markers by the scale reading in the virtual ruler.

9. The method for identifying the depth of water accumulation in bridges and culverts according to claim 1, characterized in that, The step of determining the scale image in the bridge and culvert image and constructing a virtual scale based on the scale image includes: Determine the scale area in the bridge and culvert image; The scale area is expanded according to preset expansion conditions; The scale region after region expansion is cropped from the bridge and culvert image to obtain the scale image, and a virtual scale is constructed based on the scale image.

10. The method for identifying the depth of water accumulation in bridges and culverts according to claim 9, characterized in that, Determining the scale region in the bridge and culvert image includes: A preset scale detection model is used to determine the scale region in the bridge and culvert image.

11. The method for identifying the depth of water accumulation in bridges and culverts according to claim 1, characterized in that, The method further includes: Detect whether there are vehicles in the bridge and culvert image; If a vehicle is present in the bridge or culvert image, the step of determining the scale image is terminated.

12. A device for identifying the depth of water accumulation in bridges and culverts, characterized in that, The device includes: Bridge and culvert image acquisition module, used to acquire bridge and culvert images; The scale image processing module is used to determine the scale image in the bridge and culvert image and construct a virtual scale based on the scale image; An image segmentation module is used to perform target segmentation on the bridge and culvert image; The image segmentation module is also used for: The bridge and culvert image is segmented using a preset segmentation model, wherein the segmentation model is obtained by parameter tuning and training based on a center loss function; The segmentation model is an instance segmentation model. The training images of the instance segmentation model are pre-set bounding boxes with various region categories, including: water accumulation area, road surface area, wet road surface area, dark road surface area, and water ripple and silt area. The depth value determination module is used to determine the water depth value based on the top edge of the water accumulation area and the scale markings in the virtual scale when the water accumulation area corresponding to the bridge and culvert is segmented out. A depth information output module is used to output the water depth value; The device is also used to perform grayscale conversion on the ruler image after acquiring the ruler image to obtain a grayscale ruler image; A rectangular coordinate system is established in the virtual ruler, and edge features are extracted from the grayscale ruler image to obtain the complete ruler outline, numerical outline, and scale mark outline of the measurement ruler. Based on the rectangular coordinate system and the corresponding contour, determine the vertical coordinate of the topmost scale mark and the vertical coordinate of the bottommost scale mark in the measuring scale. Based on the longitudinal distribution of the scale markings on the measuring scale, at least one longitudinal dashed line is added to the measuring scale. Based on the intersection of the longitudinal dashed line and the scale markings, the pixel position range of all scale markings in the measuring scale is calculated.

13. An electronic device, comprising: One or more processors; Memory; One or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs being configured to perform the method of any one of claims 1-11.

14. A computer-readable storage medium storing a computer program for use in conjunction with an electronic device, said computer program being executable by a processor to perform the method of any one of claims 1-11.