A bridge deck collapse detection method, device and medium based on probabilistic Hough line
By using the probabilistic Hough straight line method in bridge collapse detection, drawing standard lines and performing image processing, the problem of insufficient detection accuracy in complex environments is solved, the detection accuracy and generalization ability are improved, and the false alarm rate and data are reduced Collection costs.
Patent Information
- Application Number
- CN202410773814.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-17
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2044-06-17
AI Technical Summary
Existing bridge collapse detection methods have poor segmentation results in complex environments, poor model generalization capabilities, and high false alarm rates. Moreover, it is difficult for traditional image algorithms to extract the bridge deck outline, resulting in insufficient detection accuracy.
A bridge deck collapse detection method based on probabilistic Hough lines is adopted. Video images are collected through cameras, standard lines are drawn, and frame-by-frame image processing is performed. Probabilistic Hough line detection and edge detection algorithms are used to filter straight lines, project counting points, and count consecutive frames. As a result, it is determined whether the bridge deck has collapsed.
It improves the accuracy and generalization ability of detection, reduces the error rate, and reduces the cost and time of deep learning data collection and model training. It is suitable for the deployment of low-chip computing power equipment, saves data transmission bandwidth and back-end computing pressure, and detects real-time Sex is better.
Smart Images

Figure CN118366086B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of bridge monitoring, and in particular to a bridge deck collapse detection method, equipment and medium based on probabilistic Hough lines. Background Art
[0002] With the rapid development of infrastructure technology, the span and total mileage of bridges have increased rapidly, and the corresponding cost of bridge monitoring and maintenance has also increased rapidly, gradually becoming a burden that cannot be ignored. In order to reduce the cost of bridge inspection, people have gradually begun to try to apply technologies such as image recognition and deep learning to bridge monitoring scenarios, among which the detection of bridge deck collapse is the most important.
[0003] However, one of the existing solutions for monitoring bridge collapse based on deep learning methods is to segment the video of the bridge deck to obtain the bridge deck part, and then use the mask difference of the previous and next frames to determine whether the bridge deck has collapsed. The segmentation effect is highly correlated with the background environment (mainly complex background changes such as water surface ripples and lighting changes), resulting in the problem that it is not easy to determine whether there is a collapsed area in the segmented area in some ambient light scenes. There is also a bridge collapse detection based on target detection, which has the problem that the bridge collapse data set used to train the model is difficult to collect, and the collected data is relatively single, resulting in poor model generalization ability and high false alarm rate.
[0004] However, based on traditional image algorithms, the bridge edge detection algorithm obtained by only filtering and edge processing is not easy to extract useful contours and determine whether the bridge deck has collapsed due to the complex background of the scene. Summary of the invention
[0005] In order to overcome the problems that the existing visual detection method of bridge deck collapse is greatly affected by complex environmental background, the bridge deck contour is difficult to identify, and the accuracy is insufficient, the present invention provides a bridge deck collapse detection method, equipment and medium based on probabilistic Hough lines.
[0006] The present invention provides a bridge deck collapse detection method based on probabilistic Hough lines, which is used to collect a video image of the bridge deck through a camera to detect whether the bridge deck has collapsed, and includes the following steps:
[0007] Draw standard lines in the video screen;
[0008] Extract the video frame by frame to obtain a number of continuous frames, perform image processing on each frame to obtain a count collection;
[0009] In the counting set of several consecutive picture frames, whether there are consecutive m frames of n counting points whose statistical results are all zero, and n exceeds the second threshold and m exceeds the third threshold; if so, it is determined that the bridge deck collapse occurs at the position corresponding to the counting point;
[0010] The steps of performing image processing on each picture frame are as follows:
[0011] Performing image enhancement on the picture frame by using an edge detection algorithm to obtain a first image of the picture frame;
[0012] Performing probabilistic Hough line detection on the first image to obtain a line detection result;
[0013] Filter out the straight lines whose angles with the standard line are greater than a first threshold in the straight line detection results to obtain a first straight line collection;
[0014] Project each line segment in the first straight line set onto the standard line, evenly select a number of counting points on the standard line, count the number of line segment projections on each counting point, and output the count set of the picture frame.
[0015] As preferably, the steps are also included as follows:
[0016] Adjacent counting points where the bridge deck collapses are present are connected and mapped onto line segments of the first straight line set, and the mapped line segments are displayed in the video screen as a broken bridge prompt.
[0017] Preferably, the image enhancement is performed on the picture frame by using an edge detection algorithm to obtain the first image of the picture frame, and the specific implementation steps are as follows:
[0018] Convert the picture frame to grayscale;
[0019] Use Gaussian filtering to smooth and reduce noise on the grayscale image to obtain a denoised image;
[0020] The Sobel operator is used to calculate the vertical gradient of the denoised image to obtain the first edge detection image;
[0021] The Canny edge detection algorithm is used to calculate the first edge detection image to obtain a first image.
[0022] Preferably, the step of drawing a standard line in the video screen is as follows:
[0023] Draw a straight line as the standard line based on the direction of the bridge deck edge in the video image.
[0024] Preferably, in the counting set of the consecutive several picture frames, whether there are consecutive m frames of n counting points whose statistical results are all zero, and n exceeds the second threshold, and m exceeds the third threshold; if so, it is determined that the bridge deck collapse occurs at the position corresponding to the counting point, and the specific implementation steps are as follows:
[0025] Establish a global set including all counting points and their statistical results;
[0026] Use the global collection to traverse each count collection;
[0027] Traversing the global collection, recording the number of times that the statistical results of consecutive n counting points are negative and exceed a fourth threshold, and determining that a bridge deck collapse occurs at a position corresponding to the counting point; wherein the fourth threshold is greater than or equal to the second threshold;
[0028] The rules for traversing each count set using the global collection are as follows:
[0029] When the count of the current counting point in the counting set is greater than zero, and the statistical result of the current counting point in the global set is a natural number less than the second threshold, the statistical result of the current counting point in the global set is increased by one;
[0030] When the count of the current counting point in the counting set is greater than zero, and the statistical result of the current counting point in the global set is negative, the statistical result of the current counting point in the global set is zero;
[0031] When the count of the current counting point in the counting set is zero, the statistical result of the current counting point in the global set is reduced by one.
[0032] Preferably, the first threshold is 10°, the second threshold is 5, and the third threshold is 10.
[0033] Preferably, each line segment in the first straight line set is projected onto the standard line, a number of counting points are evenly selected on the standard line, the number of line segment projections included on each counting point is counted, and the output is a counting set of the picture frame, specifically:
[0034] Project the standard line onto the Y coordinate axis to obtain a series of integer coordinates {y0,...,y1}, and add a count value {y0:0,...,y1:0} with an initial value of 0 to each integer coordinate as a number of counting points;
[0035] Project each line segment in the first straight line set onto the standard line, and count the number of line segment projections on each counting point as the count value of the counting point;
[0036] The output is a count set of frames in this picture.
[0037] Preferably, a line detection model trained by a deep learning algorithm is used to replace the probabilistic Hough line detection to perform line detection on the first image to obtain a line detection result.
[0038] The present invention also provides a bridge deck collapse detection device based on probabilistic Hough lines, which is used to collect video images of the bridge deck through a camera to detect whether the bridge deck has collapsed, including: a standard line module, an image processing module and a counting detection module;
[0039] The standard line module is used to draw a standard line in the video screen;
[0040] The image processing module is used to extract the video frame by frame to obtain a number of continuous frame, and perform image processing on each frame to obtain a count collection;
[0041] The image processing module includes an edge detection unit, a probabilistic Hough line unit, an angle filtering unit and a counting unit:
[0042] The edge detection unit is used to perform image enhancement on the picture frame by using an edge detection algorithm to obtain a first image of the picture frame;
[0043] The probabilistic Hough line unit is used to perform probabilistic Hough line detection on the first image to obtain a line detection result;
[0044] The angle filtering unit is used to filter out the straight lines whose angles with the standard line are greater than a first threshold in the straight line detection results, so as to obtain a first straight line collection;
[0045] The counting unit is used to project each line segment in the first straight line set onto the standard line, evenly select a number of counting points on the standard line, count the number of line segment projections on each counting point, and output the count set of the picture frame;
[0046] The counting detection module is used to count whether there are consecutive m frames of statistical results of n consecutive counting points in a counting set of several consecutive picture frames, and n exceeds the second threshold and m exceeds the third threshold; if so, it is determined that the bridge deck collapse has occurred at the position corresponding to the counting point.
[0047] The present invention provides a terminal device, including a processor and a storage device, wherein the storage device is used to store one or more programs; when the one or more programs are executed by the processor, the processor implements the above-mentioned bridge deck collapse detection method based on probabilistic Hough lines.
[0048] The present invention provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the above-mentioned bridge deck collapse detection method based on probabilistic Hough lines.
[0049] The beneficial effects of the present invention are:
[0050] (1) The probabilistic Hough linear regression algorithm based on traditional image processing and standard lines reduces the manpower and material resources for deep learning data collection, saves the time spent on AI model training, and improves the efficiency of algorithm development;
[0051] (2) The present invention adds a standard line video stream regression method to the traditional image processing algorithm, which improves the recognition accuracy, enhances the generalization ability of the algorithm, and reduces the error rate of detection;
[0052] (3) The traditional image processing algorithm used in the present invention requires relatively low computing power for the deployed chip. It can also achieve relatively good monitoring effects by being deployed and detected on the front-end device, saving bandwidth for data transmission and computing pressure on the back-end server, and achieving better real-time detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] The present invention will be further described below in conjunction with the accompanying drawings, wherein:
[0054] Figure 1 This is a flow chart of a method according to Embodiment 1 of the present invention;
[0055] Figure 2 Schematic diagram of the image processing process of the second embodiment of the present invention. DETAILED DESCRIPTION
[0056] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0057] See also Figure 1 As a first embodiment of the present invention, a bridge deck collapse detection method based on probabilistic Hough lines is disclosed, which is used to collect a video image of the bridge deck through a camera to detect whether the bridge deck has collapsed, including the following steps:
[0058] S1. Draw a standard line: draw a standard line in the video screen;
[0059] S2, image processing: extract the video frame by frame to obtain a number of continuous frames, perform image processing on each frame to obtain a count collection;
[0060] S3. Statistical judgment: In the counting set of several consecutive picture frames, is there a situation where the statistical results of consecutive m frames of n consecutive counting points are all zero, and n is greater than 5 and m is greater than 10? If so, it is judged that the bridge deck collapse has occurred at the position corresponding to the counting point.
[0061] The implementation steps of step S2, image processing, are as follows:
[0062] S21, performing image enhancement on the picture frame by using an edge detection algorithm to obtain a first image of the picture frame;
[0063] S22, performing probabilistic Hough line detection on the first image to obtain a line detection result;
[0064] S23, filtering out the straight lines whose angles with the standard line are greater than a first threshold in the straight line detection results, to obtain a first straight line collection;
[0065] S24, projecting each line segment in the first straight line set onto the standard line, evenly selecting a number of counting points on the standard line, counting the number of line segment projections on each counting point, and outputting the count set of the picture frame.
[0066] This embodiment also discloses a bridge deck collapse detection device based on probabilistic Hough lines, which is used to collect video images of the bridge deck through a camera to detect whether the bridge deck has collapsed, including: a standard line module, an image processing module and a counting detection module;
[0067] The standard line module is used to draw a standard line in the video screen;
[0068] The image processing module is used to extract the video frame by frame to obtain a number of continuous frame, and perform image processing on each frame to obtain a count collection;
[0069] The image processing module includes an edge detection unit, a probabilistic Hough line unit, an angle filtering unit and a counting unit:
[0070] The edge detection unit is used to perform image enhancement on the picture frame by using an edge detection algorithm to obtain a first image of the picture frame;
[0071] The probabilistic Hough line unit is used to perform probabilistic Hough line detection on the first image to obtain a line detection result;
[0072] The angle filtering unit is used to filter out the straight lines whose angles with the standard line are greater than a first threshold in the straight line detection results, so as to obtain a first straight line collection;
[0073] The counting unit is used to project each line segment in the first straight line set onto the standard line, evenly select a number of counting points on the standard line, count the number of line segment projections on each counting point, and output the count set of the picture frame;
[0074] The counting detection module is used to count whether there are consecutive m frames of statistical results of n consecutive counting points in the counting set of several consecutive picture frames, and n is greater than 5 and m is greater than 10; if so, it is determined that the bridge deck collapse has occurred at the position corresponding to the counting point.
[0075] Among them, n is used to reduce the recognition errors caused by the temporary obstruction of the image at the position corresponding to a small number of counting points by debris or the interference of the image screen; m is also the delayed alarm threshold set to reduce misjudgment and increase the robustness of the system.
[0076] This embodiment is a probabilistic Hough straight line bridge edge regression algorithm based on standard lines (i.e., multiple bridge deck edge lines drawn). When the bridge deck collapses, the edge straight line is discontinuously truncated. The standard line regression data is statistically analyzed for each frame of the image. Finally, it is determined whether there is a continuous section in the standard line with a non-negative count (i.e., discontinuous edge truncation occurs) to determine whether the bridge deck has collapsed.
[0077] This embodiment uses the probabilistic Hough straight line regression detection method of the standard line on the basis of the traditional image algorithm. Since there are obvious boundaries between the two sides of the bridge and the sea surface or the green belt, and the traditional image processing method does not require a large amount of data set training, the probabilistic Hough straight line of the standard line solves a series of problems:
[0078] (1) By using the probabilistic Hough linear regression algorithm based on traditional image processing and standard lines, the manpower and material resources for deep learning data collection are reduced, as well as the time spent on AI model training, thereby improving algorithm development and efficiency;
[0079] (2) The present invention adds a standard line video stream regression method to the traditional image processing algorithm, which improves the recognition accuracy, enhances the generalization ability of the algorithm, and reduces the error rate of detection;
[0080] (3) The traditional image processing algorithm used in the present invention requires relatively low computing power for the deployed chip. It can also achieve relatively good monitoring effects by being deployed and detected on the front-end device, saving bandwidth for data transmission and computing pressure on the back-end server, and achieving better real-time detection.
[0081] See also Figure 2, is a schematic diagram of the process and results of step S2 and image processing in the second embodiment of the present invention. By performing 3×3 Gaussian filtering, Sobel vertical gradient calculation and Canny edge detection on the grayscale image, the outline of the bridge is quickly identified from the video screen. The difference between this embodiment and the first embodiment is that the specific implementation steps of sub-step S21 are as follows:
[0082] S211, converting the picture frame into a grayscale image;
[0083] S212, using Gaussian filtering to smooth and reduce noise on the grayscale image to obtain a reduced noise image;
[0084] S213, using the Sobel operator to perform vertical gradient calculation on the denoised image to obtain a first edge detection image;
[0085] S214: Using the Canny edge detection algorithm, calculate the first edge detection image to obtain a first image.
[0086] This embodiment also includes the following steps:
[0087] S4. Connect adjacent counting points where the bridge deck collapses, and map them onto line segments of the first straight line set, and display the mapped line segments on the video screen as a broken bridge prompt.
[0088] It is used to visually display the collapse of the bridge deck, so that the staff can quickly understand the dangerous situation.
[0089] Step S1 of this embodiment, drawing a standard line, is specifically as follows:
[0090] According to the direction of the bridge deck edge in the video screen, draw a straight line as the standard line. The coordinates of the two end points of the straight line are Save as coordinate data of the standard line.
[0091] The specific implementation steps of step S3, statistical judgment, of this embodiment are as follows:
[0092] S31, establishing a global set including all counting points and their statistical results;
[0093] S32, traversing each counting set using the global collection;
[0094] S33, traversing the global collection, recording the number of times that the statistical results of consecutive n counting points are negative and exceed a fourth threshold, and determining that a bridge deck collapse occurs at the position corresponding to the counting point; wherein the fourth threshold is greater than or equal to the second threshold;
[0095] The rules for traversing each count set using the global collection are as follows:
[0096] When the count of the current counting point in the counting set is greater than zero, and the statistical result of the current counting point in the global set is a natural number less than the second threshold, the statistical result of the current counting point in the global set is increased by one;
[0097] When the count of the current counting point in the counting set is greater than zero, and the statistical result of the current counting point in the global set is negative, the statistical result of the current counting point in the global set is zero;
[0098] When the count of the current counting point in the counting set is zero, the statistical result of the current counting point in the global set is reduced by one.
[0099] The sub-steps of S24 in this embodiment are specifically implemented as follows:
[0100] S241, projecting the standard line onto the Y coordinate axis to obtain a series of integer coordinates {y0, ..., y1}, and adding a count value {y0:0, ..., y1:0} with an initial value of 0 to each integer coordinate as a number of counting points;
[0101] S242, projecting each line segment in the first straight line set onto the standard line, and counting the number of line segment projections on each counting point as the count value of the counting point;
[0102] S243: Output is a count set of the picture frame.
[0103] The following is Embodiment 3 of the present invention. This embodiment is a specific application example of Embodiment 2. The specific implementation process steps and part of the algorithm program are as follows:
[0104] A1. Image enhancement of the bridge surface includes the following steps:
[0105] A11. Convert the RGB image returned by the camera into a grayscale image using formula 1.
[0106] Gray = R*0.299 + G*0.587 + B*0.114 (Formula 1)
[0107] Among them, R, G, and B represent the pixel values corresponding to the three channels of the RGB color image respectively.
[0108] A12. Use Gaussian filtering to smooth and reduce noise in the grayscale image. Since noises such as ripples on the sea surface and reflections of street lights on the bridge have a great impact on subsequent straight line detection, Gaussian filtering can solve most noise problems.
[0109] A13, Sobel operator calculates vertical gradient. In practice, the bridge deck images captured by cameras are all vertical (the bridge deck moves from bottom to top). By taking advantage of this feature, Sobel's vertical gradient is used to retain the vertical features (i.e. the contour features of the bridge edge) to improve the accuracy of straight line detection on the bridge deck edge.
[0110] A14, Canny edge detection algorithm, can effectively detect the edges in the bridge deck image and refine the edge lines, further showing the edge features of the bridge deck.
[0111] A2. Perform probabilistic Hough line detection on the image enhancement picture and draw standard lines to filter out redundant lines. The steps are as follows:
[0112] A21. Draw the standard straight line L1, expressed as (That is, the coordinates of the two ends of the straight line).
[0113] A22, performing probabilistic Hough line detection on the enhanced image generated in step A1 to obtain a series of straight line sets P;
[0114] .
[0115] A23. Filter out the required straight lines: traverse the straight line set P of the probabilistic Hough line detection, calculate the angle between the straight lines and the standard line L1 by using Formula 2 and Formula 3, and filter out the straight lines whose angle with the standard line is greater than a certain threshold (set to 10° in this embodiment).
[0116]
[0117] in, are the two end points of the standard line L1, are the two endpoints of a line in the probabilistic Hough line set P. and Represent the L1 line and a line vector in the set P, respectively, and θ is and The angle between the two corresponding lines (acute angle).
[0118] A24. Further filter the lines selected in step A23 by distance: traverse the line set P of the probabilistic Hough line detection, substitute a point (x, y) of the line in the P set into Formula 4 and Formula 5 respectively, and calculate the distance between the two endpoints and the standard line L1 (i.e. and ), determine whether the closest distance between the two endpoints and the standard line L1 is greater than a certain threshold (set to 10 in this embodiment). If it is greater than the threshold, the straight line is filtered out.
[0119]
[0120] Among them, f(x,y) is the distance between the endpoint of the line in the Hough line set P and the standard line L1.
[0121] A25. For the straight lines selected in step A24, filter out the parts whose ordinates are higher or lower than the standard line. This step is mainly used for displaying the straight line effect.
[0122] Some code examples for this step are as follows:
[0123] Function straight line length filter function (standard line SL, probability Hough line set P)
[0124] PNew = [] # New line set
[0125] FOR line traverses P: # A straight line in the P set Line
[0126] x_min, y_min, x_max, y_max = SL coordinates of the standard line # Get the 4 coordinates of the standard line
[0127] Lx_min,Ly_min,Lx_max,Ly_max = line coordinates # P sets the 4 coordinates of the line
[0128] IF the Ly_min and Ly_max of line are not in the range (y_min,y_max):
[0129] CONTINUE # skip the current loop
[0130] # If the x coordinate of a line in the set is less than the standard line coordinate, scale it to the endpoint of the standard line
[0131] IF Ly_min <y_min:
[0132] # The g function means: scale the line to the y value of one end of the standard line, substitute it into the original Line, and get the corresponding x position
[0133] Lx_min = g(Lx_min,Ly_min,Lx_max,Ly_max,y_min)
[0134] Ly_min = y_min
[0135] IF Ly_max>y_max:# Similarly, the y part that is greater than the standard line is removed here
[0136] Lx_max = f(Lx_min,Ly_min,Lx_max,Ly_max, y_max)
[0137] Ly_max = y_max
[0138] # Insert the restricted range of straight lines into the new straight line set
[0139] PNew.append({Lx_min,Ly_min,Lx_max,Ly_max})
[0140] (Through the above steps A21 to A25, a series of high-quality straight lines of the bridge deck edge and the standard line can be obtained from the bridge deck background, that is, the straight line detection result and the standard line.)
[0141] A3. Bridge deck collapse counting logic includes the following steps:
[0142] A31. Project the standard line onto the y-axis to obtain a series of temporary integer sets Q={y0,...,y1}, where each integer in Q is added with a number starting from 0, that is, Q={y0:0,...,y1:0}.
[0143] A32. Take the set of straight lines selected in step A24, which is set S. Project each line segment of set S onto the standard line L1, and count the number of projection points in the range (y0, y1) (i.e., add 1 to the yn object corresponding to set Q).
[0144] Some code examples for this step are as follows:
[0145] FOR line RL IN S collection: # Traverse the filtered line collection
[0146] y_min, y_max = point mapping function on the straight line (2 end point coordinates of the standard line, 2 end point coordinates of the straight line RL)
[0147] FOR traverses each element yn of the Q collection:
[0148] IF yn is in (y_min,y_max):
[0149] Q[yn] += 1
[0150] A4. Determination of bridge deck collapse includes the following steps:
[0151] A41. Create a set R that is the same as Q={y0:0,...,y1:0} for storing bridge deck collapse data between video frames (i.e., set R is a global set).
[0152] A42. Traverse the set Q:
[0153] If the object yn in the Q set is greater than 0 and the object yn in the R set is not negative, then the object corresponding to yn in the set R is increased by 1;
[0154] If the object yn in set Q is greater than 0 and the object yn in set R is negative, set the corresponding yn in set R to 0;
[0155] If the object yn in set Q is equal to 0, then the object corresponding to yn in set R is reduced by 1.
[0156] A43. Traverse the set R, record the starting point y0' and the ending point y1' where negative numbers exceeding a certain threshold (set to 5 in this embodiment) appear continuously, and substitute these two points into the line segments of the straight line set to obtain the corresponding coordinates x0' and x1', and finally form a set of broken bridge frames W={{x0',y0',x1',y1'},...}.
[0157] A5. Bridge deck collapse statistics: Repeat steps A1 to A4 to perform bridge deck collapse detection, and finally obtain a set W of broken bridge frames, and then obtain the location and number of broken bridges.
[0158] In some embodiments, a line detection model trained by a deep learning algorithm may be used instead of the probabilistic Hough line detection to perform line detection on the first image to obtain a line detection result, that is, to reduce the influence of background brightness on line detection and obtain a higher accuracy rate.
[0159] The present invention also discloses a terminal device, including a processor and a storage device, wherein the storage device is used to store one or more programs; when the one or more programs are executed by the processor, the processor implements the above-mentioned bridge deck collapse detection method based on the probabilistic Hough line. The processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The processor is the control center of the test equipment, and various interfaces and lines are used to connect the various parts of the entire test equipment.
[0160] The storage device can be used to store computer programs and / or modules. The processor realizes various functions of the terminal device by running or executing the computer programs and / or modules stored in the storage device and calling the data stored in the storage device. The storage device can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function, etc.; the data storage area can store data created according to the use of the terminal device, etc. In addition, the storage device can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0161] Among them, if the module / unit integrated in the bridge deck collapse detection device based on the probability Hough line is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in at least one computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc.
[0162] It should be noted that the embodiments of the devices and apparatuses described above are only illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
Claims
1. A bridge deck collapse detection method based on probabilistic Hough lines, which is used to collect video images of the bridge deck through a camera to detect whether the bridge deck has collapsed, characterized in that: The steps include: Draw standard lines in the video screen; Extract the video frame by frame to obtain a number of continuous frames, perform image processing on each frame to obtain a count collection; In the counting set of several consecutive picture frames, whether there are consecutive m frames of n counting points whose statistical results are all zero, and n exceeds the second threshold and m exceeds the third threshold; if so, it is determined that the bridge deck collapse occurs at the position corresponding to the counting point; The steps of performing image processing on each picture frame are as follows: Performing image enhancement on the picture frame by using an edge detection algorithm to obtain a first image of the picture frame; Performing probabilistic Hough line detection on the first image to obtain a line detection result; Filter out the straight lines whose angles with the standard line are greater than a first threshold in the straight line detection results to obtain a first straight line collection; Project each line segment in the first straight line set onto the standard line, evenly select a number of counting points on the standard line, count the number of line segment projections on each counting point, and output the count set of the picture frame.
2. The bridge deck collapse detection method based on probabilistic Hough line according to claim 1 is characterized in that: The following steps are also included: Adjacent counting points where the bridge deck collapses are present are connected and mapped onto line segments of the first straight line set, and the mapped line segments are displayed in the video screen as a broken bridge prompt.
3. The bridge deck collapse detection method based on probabilistic Hough line according to claim 1 is characterized in that: The image enhancement is performed on the picture frame by using the edge detection algorithm to obtain the first image of the picture frame, and the specific implementation steps are as follows: Convert the picture frame to grayscale; Use Gaussian filtering to smooth and reduce noise on the grayscale image to obtain a denoised image; The Sobel operator is used to calculate the vertical gradient of the denoised image to obtain the first edge detection image; The Canny edge detection algorithm is used to calculate the first edge detection image to obtain a first image.
4. The bridge deck collapse detection method based on probabilistic Hough line according to claim 1, characterized in that: The step of drawing a standard line in the video screen is as follows: Draw a straight line as the standard line based on the direction of the bridge deck edge in the video image.
5. The bridge deck collapse detection method based on probabilistic Hough lines according to claim 1 is characterized in that: In the counting set of the consecutive several picture frames, whether there are consecutive m frames of n counting points whose statistical results are all zero, and n exceeds the second threshold, and m exceeds the third threshold; if so, it is determined that the bridge deck collapse occurs at the position corresponding to the counting point, and the specific implementation steps are as follows: Establish a global set including all counting points and their statistical results; Use the global collection to traverse each count collection; Traversing the global collection, recording the number of times that the statistical results of consecutive n counting points are negative and exceed a fourth threshold, and determining that a bridge deck collapse occurs at a position corresponding to the counting point; wherein the fourth threshold is greater than or equal to the second threshold; The rules for traversing each count set using the global collection are as follows: When the count of the current counting point in the counting set is greater than zero, and the statistical result of the current counting point in the global set is a natural number less than the second threshold, the statistical result of the current counting point in the global set is increased by one; When the count of the current counting point in the counting set is greater than zero, and the statistical result of the current counting point in the global set is negative, the statistical result of the current counting point in the global set is zero; When the count of the current counting point in the counting set is zero, the statistical result of the current counting point in the global set is reduced by one.
6. The bridge deck collapse detection method based on probabilistic Hough line according to claim 1, characterized in that: The first threshold is 10°, the second threshold is 5, and the third threshold is 10.
7. The bridge deck collapse detection method based on probabilistic Hough lines according to claim 1 is characterized in that: The method projects each line segment in the first straight line set onto the standard line, evenly selects a number of counting points on the standard line, and counts the number of line segment projections on each counting point, and outputs the count set of the picture frame, specifically: Project the standard line onto the Y coordinate axis to obtain a series of integer coordinates {y0,...,y1}, and add a count value {y0:0,...,y1:0} with an initial value of 0 to each integer coordinate as a number of counting points; Project each line segment in the first straight line set onto the standard line, and count the number of line segment projections on each counting point as the count value of the counting point; The output is a count set of frames in this picture.
8. The bridge deck collapse detection method based on probabilistic Hough lines according to claim 1, characterized in that: By adopting a line detection model trained by a deep learning algorithm to replace the probabilistic Hough line detection, line detection is performed on the first image to obtain a line detection result.
9. A bridge deck collapse detection device based on probabilistic Hough lines, used to collect video images of the bridge deck through a camera to detect whether the bridge deck has collapsed, characterized in that: include: Standard line module, image processing module and counting detection module; The standard line module is used to draw a standard line in the video screen; The image processing module is used to extract the video frame by frame to obtain a number of continuous frame, and perform image processing on each frame to obtain a count collection; The image processing module includes an edge detection unit, a probabilistic Hough line unit, an angle filtering unit and a counting unit: The edge detection unit is used to perform image enhancement on the picture frame by using an edge detection algorithm to obtain a first image of the picture frame; The probabilistic Hough line unit is used to perform probabilistic Hough line detection on the first image to obtain a line detection result; The angle filtering unit is used to filter out the straight lines whose angles with the standard line are greater than a first threshold in the straight line detection results, so as to obtain a first straight line collection; The counting unit is used to project each line segment in the first straight line set onto the standard line, evenly select a number of counting points on the standard line, count the number of line segment projections on each counting point, and output the count set of the picture frame; The counting detection module is used to count whether there are consecutive m frames of n consecutive counting points with the statistical results of all being zero in the counting set of a plurality of consecutive picture frames, and n exceeds the second threshold and m exceeds the third threshold; If so, it is determined that the bridge deck collapse occurs at the position corresponding to the counting point.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the bridge deck collapse detection method based on probabilistic Hough lines as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Bridge crack detection method
CN110378879A
Bridge load distribution identification method based on vehicle matching deep learning in bridge monitoring video
CN113837007A
Method and device for determining three-dimensional information of detection object
CN114078246A
Road scene three-dimensional reconstruction and defect detection method based on binocular vision
CN117036641A
Collapse detection system and collapse detection method
JP2012026881A
