Dam structure safety detection method based on gray scale gradient method
By adopting a grayscale gradient method in the safety detection of dam structures, using polarizers to improve image quality, and filtering the target area by calculating the average grayscale gradient, the judgment error problem caused by uncertain image quality in the prior art is solved, and more accurate safety detection and adaptive detection frequency are achieved.
Patent Information
- Application Number
- CN202411878677.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-05-13
AI Technical Summary
When the existing dam structure safety detection method acquires dam images, the image quality is uncertain, resulting in large errors in the judgment results.
The detection method based on the grayscale gradient method is adopted, and the quality of the dam image is improved by installing a polarizer in front of the camera lens, and the target area is screened out by calculating the average grayscale gradient, the safety factor is calculated, and the image acquisition period is adaptively adjusted according to the changes in the safety factor.
It improves the image quality of the dam, enhances the accuracy of safety detection, reduces the system's calculation pressure, and issues alarms in a timely manner when the safety factor is less than the threshold.
Smart Images

Figure CN119991554A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of dam structure safety detection, and in particular to a dam structure safety detection method based on a grayscale gradient method. Background Art
[0002] At present, image-based safety inspection of dam structures is a more mainstream inspection method for dam structure safety. However, when conducting inspections, this existing method obtains the entire dam image and compares the displacement of each point on the dam based on pixel values, so as to achieve the purpose of judging the safety of the dam structure. However, when obtaining the dam image, the quality of the dam image is uncertain. Therefore, when making a judgment, the result of the judgment is also uncertain, resulting in a large error in the judgment result. Summary of the invention
[0003] In view of the deficiencies of the prior art, the present invention provides a dam structure safety detection method based on the grayscale gradient method, which solves the problem that the quality of the current dam image is uncertain, and therefore the result of the judgment is also uncertain when making a judgment.
[0004] To achieve the above object, the present invention provides the following technical solutions:
[0005] A dam structure safety detection method based on grayscale gradient method, the detection method comprises the following steps:
[0006] S1, periodically acquiring images of the dam containing several infrared targets on the dam;
[0007] S2, gridding the dam image, and calculating the grayscale gradient of any pixel point on the dam image in the x-axis direction and the y-axis direction and the average grayscale gradient of any grid;
[0008] S3, screening out the grid areas whose average grayscale gradient is greater than the grayscale threshold, and screening out the abnormal grid areas as the target areas;
[0009] S4. Calculate the safety factor of the target area according to the Swedish strip method;
[0010] S5, judging whether the safety factor is greater than the safety threshold;
[0011] If yes, return to step S1;
[0012] If not, an alarm is issued and process data used to calculate the safety factor is output.
[0013] Preferably, in step S1, the following method is specifically included:
[0014] S11. An infrared target lamp for emitting infrared light onto the dam is arranged in the monitoring area facing the dam, and a plurality of infrared target points are formed in the monitoring area on the dam;
[0015] S12, installing a polarizing plate on the camera lens for filtering sunlight and daily light;
[0016] S13, placing a camera facing the dam monitoring area, and periodically acquiring images of the dam containing a number of infrared target points.
[0017] Preferably, in step S2, the following steps are specifically included:
[0018] S21, gridding the dam image;
[0019] S22, calculating the grayscale gradient of any pixel point on the dam image in the x-axis direction; the calculation formula of the grayscale gradient in the x-axis direction is:
[0020]
[0021] In the above formula, I(x+1, y) represents the grayscale gradient of any pixel point (x, y) in the x-axis direction, and I(x+1, y) and I(x-1, y) represent the pixel values of the two adjacent points (x+1, y) and (x-1, y) on both sides of any pixel point (x, y) in the x-axis direction respectively;
[0022] S23, calculating the grayscale gradient of any pixel point on the dam image in the y-axis direction; the calculation formula of the grayscale gradient in the y-axis direction is:
[0023]
[0024] In the above formula, I(x, y+1) and I(x, y-1) represent the grayscale gradient of any pixel point (x, y) in the y-axis direction, and I(x, y+1) and I(x, y-1) represent the pixel values of the two adjacent points (x, y+1) and (x, y-1) on both sides of any pixel point (x, y) in the x-axis direction, respectively.
[0025] S24, calculating the average grayscale gradient of any grid according to the grayscale gradient of any pixel point in the x-axis direction and the y-axis direction; the calculation formula of the average grayscale gradient of any grid is:
[0026]
[0027] In the above formula, δ f represents the average grayscale gradient of any grid f, where the number of pixels in the x-axis and y-axis directions of the grid f are W and H respectively. and Respectively represent any pixel point (x i ,y j )The grayscale gradient in the x-axis direction and the y-axis direction, (x i ,y j ) represents the i-th pixel point in the x-axis direction and the j-th pixel point in the y-axis direction in the grid f.
[0028] Preferably, in step S3, the following steps are specifically included:
[0029] S31, setting a grayscale threshold, and screening out grid areas whose average grayscale gradient is greater than the grayscale threshold as candidate areas;
[0030] S32, calculating the average value of the average grayscale gradient of each selected area;
[0031] S33, calculating the standard deviation of the average grayscale gradient of each selected area;
[0032] S34, calculating the deviation value of each area to be selected according to the average value and standard deviation of the average gray gradient of each area to be selected; the calculation formula of the deviation value is:
[0033]
[0034] In the above formula, P f represents the deviation value of any candidate region f, δ f represents the average gray gradient of any selected region f, represents the average value of the average grayscale gradient of each candidate area, and σ represents the standard deviation of the average grayscale gradient of each candidate area;
[0035] S35. Set a deviation value threshold, and use the candidate area whose deviation value is greater than the deviation value threshold as the target area.
[0036] Preferably, in step S4, the following steps are specifically included:
[0037] S41. Divide the target area into several strips according to the Swedish strip division method;
[0038] S42. Calculate the normal force on the sliding plane at the bottom of the soil strip; the calculation formula for the normal force is:
[0039] N i =W i cosα i
[0040] In the above formula, N i represents the normal force on the sliding plane at the bottom of the i-th soil strip, W i represents the gravity of the i-th soil strip, α i The inclination angle of the i-th soil strip;
[0041] S43. Calculate the safety factor of the target area according to the anti-slip force; the calculation formula of the safety factor is:
[0042]
[0043] In the above formula, F S represents the safety factor, n represents the number of soil strips, W i represents the gravity of the i-th soil strip, α i represents the angle between the normal force direction of the i-th soil strip and the gravity direction, φ i represents the internal friction angle of the soil strip, l i represents the length of the i-th soil strip along the slope direction, C i represents the cohesion of the ith soil strip.
[0044] Preferably, step S50 is included between step S4 and step S5, obtaining the safety factor at each historical moment, and determining the acquisition period of the dam image at the next moment that is negatively correlated with the safety factor at each moment relative to the previous adjacent moment.
[0045] Preferably, in step S50, the following steps are specifically included:
[0046] S501, obtaining the safety factor at each historical moment;
[0047] S502, calculating the reduction of the safety factor at each historical moment and the safety factor at the previous adjacent moment; the calculation formula for the reduction of the safety factor is:
[0048]
[0049] In the above formula, ΔF S (m) represents the reduction of the safety factor at the mth moment in the history compared with the safety factor at the previous adjacent moment, F S (m) and F S (m-1) represents the reduction in the safety factor at the mth moment in the history and the previous adjacent moment, i.e., the m-1th moment;
[0050] S503, calculating the acquisition cycle of the dam image at the next moment according to the safety factor at each historical moment, the reduction of the safety factor at the previous adjacent moment, and the safety factor at the current moment; the calculation formula for the acquisition cycle of the dam image at the next moment is:
[0051]
[0052] In the above formula, T represents the acquisition period of the dam image at the next moment, ΔF S(m) represents the reduction of the safety factor at the mth moment in the history compared with the safety factor at the previous adjacent moment.
[0053] Compared with the prior art, the present invention provides a dam structure safety detection method based on the gray gradient method, which has the following beneficial effects:
[0054] 1. By installing a polarizing plate in front of the camera lens, the quality of the acquired dam image can be improved. Then, the image quality is reflected by calculating the average grayscale gradient. The larger the value of the average grayscale gradient, the better the image quality. Therefore, the grid area with a larger average grayscale gradient is selected as the target area to calculate the dam safety factor. The acquisition cycle of the dam image is adaptively changed according to the value and change of the dam safety factor to greatly reduce the calculation pressure of the system. At the same time, an alarm is issued when the safety factor is less than the safety threshold, so that the operation and maintenance personnel can take timely measures.
[0055] 2. The present invention grids the dam image, and then calculates the grayscale gradient of any pixel point on the dam image in the x-axis direction and the y-axis direction, and further calculates the average grayscale gradient of each grid area, so as to screen out the grid area with higher image quality through the average grayscale gradient, so as to obtain the target area and perform subsequent safety factor calculation more accurately.
[0056] 3. The present invention calculates and sets the dam image acquisition cycle at the next moment by statistically analyzing the changes in the dam safety factor and the current value of the dam safety factor. This can greatly reduce the calculation pressure of the system on the basis of ensuring the dam detection effect. At the same time, when the dam safety factor changes greatly or the safety factor is low, the detection frequency is increased, thereby greatly improving the monitoring intensity of the dam. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0058] Figure 1 It is a flow chart of the dam structure safety detection method based on the gray gradient method of the present invention;
[0059] Figure 2 This is a comparison chart of image quality obtained by the camera before and after the polarizing plate is installed in the present invention;
[0060] Figure 3 is the grayscale gradient of the grid area on the dam image of the present invention;
[0061] Figure 4 for Figure 3 A magnified image of the selected area. DETAILED DESCRIPTION
[0062] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific implementation methods, so that the implementation process of how the present application uses technical means to solve technical problems and achieve technical effects can be fully understood and implemented accordingly.
[0063] Those skilled in the art can understand that all or part of the steps in the following embodiments can be completed by instructing the relevant hardware through a program, so the present application can be in the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application can be in the form of a computer program product 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 codes.
[0064] In order to solve the problem that the quality of the current dam image is uncertain, and therefore the result of the judgment is also uncertain, the present invention provides a dam structure safety detection method based on the gray gradient method, firstly the quality of the dam image is detected, and the safety factor of the area with better quality of the dam image is judged to improve the accuracy of the judgment result, the method comprises the following steps:
[0065] S1, periodically acquiring a dam image containing a plurality of infrared target points on the dam; in order to further ensure the overall image quality of the acquired dam image, the camera lens and shooting method used for shooting the dam image are improved, and in step S1, the following method is specifically included:
[0066] S11. An infrared target lamp for emitting infrared light onto the dam is set in the monitoring area facing the dam, and a number of infrared target points are formed in the monitoring area on the dam. The infrared target points can be light spots formed by the infrared target lamp irradiating the dam, or can be the infrared target lamp itself. The infrared target points serve as reference points, and the displacement of each point on the dam can be observed through the change of pixel value of the dam image.
[0067] S12. Install a polarizing plate on the camera lens to filter sunlight and daily light; the polarizing plate enables the camera to capture only the infrared light waves emitted by the target light, thereby greatly reducing the interference of ambient light on the quality of the acquired dam image;
[0068] S13, placing a camera facing the dam monitoring area, and periodically acquiring images of the dam containing a number of infrared target points.
[0069] S2, gridding the dam image, and calculating the grayscale gradient of any pixel point on the dam image in the x-axis direction and the y-axis direction and the average grayscale gradient of any grid; in order to further illustrate the calculation method of the grayscale gradient and the average grayscale gradient, in step S2, the following steps are specifically included:
[0070] S21, gridding the dam image;
[0071] S22, calculating the grayscale gradient of any pixel point on the dam image in the x-axis direction; the calculation formula of the grayscale gradient in the x-axis direction is:
[0072]
[0073] In the above formula, I(x+1, y) represents the grayscale gradient of any pixel point (x, y) in the x-axis direction, and I(x+1, y) and I(x-1, y) represent the pixel values of the two adjacent points (x+1, y) and (x-1, y) on both sides of any pixel point (x, y) in the x-axis direction respectively;
[0074] S23, calculating the grayscale gradient of any pixel point on the dam image in the y-axis direction; the calculation formula of the grayscale gradient in the y-axis direction is:
[0075]
[0076] In the above formula, I(x, y+1) and I(x, y-1) represent the grayscale gradient of any pixel point (x, y) in the y-axis direction, and I(x, y+1) and I(x, y-1) represent the pixel values of the two adjacent points (x, y+1) and (x, y-1) on both sides of any pixel point (x, y) in the x-axis direction, respectively.
[0077] S24, calculating the average grayscale gradient of any grid according to the grayscale gradient of any pixel point in the x-axis direction and the y-axis direction; the calculation formula of the average grayscale gradient of any grid is:
[0078]
[0079] In the above formula, δ f represents the average grayscale gradient of any grid f, where the number of pixels in the x-axis and y-axis directions of the grid f are W and H respectively. and Respectively represent any pixel point (x i ,y j )The grayscale gradient in the x-axis direction and the y-axis direction, (x i ,y j ) represents the i-th pixel point in the x-axis direction and the j-th pixel point in the y-axis direction in the grid f.
[0080] S3, filter out the grid areas whose average grayscale gradient is greater than the grayscale threshold, and filter out the abnormal grid areas as the target areas; generally, it is 0. Among the grid areas whose average grayscale gradient is greater than the grayscale threshold, there may still be a small number of grid areas whose average grayscale gradient deviates from the normal value to a large extent. Therefore, in order to reduce the influence of such areas on the final detection result, in step S3, the following steps are specifically included:
[0081] S31, setting a grayscale threshold, and screening out grid areas whose average grayscale gradient is greater than the grayscale threshold as candidate areas;
[0082] S32, calculating the average value of the average grayscale gradient of each selected area;
[0083] S33, calculating the standard deviation of the average grayscale gradient of each selected area;
[0084] S34, calculating the deviation value of each area to be selected according to the average value and standard deviation of the average gray gradient of each area to be selected; the calculation formula of the deviation value is:
[0085]
[0086] In the above formula, P f represents the deviation value of any candidate region f, δ f represents the average gray gradient of any selected region f, represents the average value of the average grayscale gradient of each candidate area, and σ represents the standard deviation of the average grayscale gradient of each candidate area;
[0087] S35, setting a deviation value threshold, and taking the candidate areas whose deviation values are greater than the deviation value threshold as target areas; the deviation value threshold is generally set to -2 to eliminate abnormal candidate areas.
[0088] S4, calculating the safety factor of the target area according to the Swedish strip method; in order to further illustrate the calculation method of the safety factor, in step S4, the following steps are specifically included:
[0089] S41. Divide the target area into several strips according to the Swedish strip division method;
[0090] S42. Calculate the normal force on the sliding plane at the bottom of the soil strip; the calculation formula for the normal force is:
[0091] N i =W i cosα i
[0092] In the above formula, N i represents the normal force on the sliding plane at the bottom of the i-th soil strip, Wi represents the gravity of the i-th soil strip, α i The inclination angle of the i-th soil strip;
[0093] S43. Calculate the safety factor of the target area according to the anti-slip force; the calculation formula of the safety factor is:
[0094]
[0095] In the above formula, F S represents the safety factor, n represents the number of soil strips, W i represents the gravity of the i-th soil strip, α i represents the angle between the normal force direction of the i-th soil strip and the gravity direction, φ i represents the internal friction angle of the soil strip, l i represents the length of the i-th soil strip along the slope direction, C i represents the cohesion of the ith soil strip;
[0096] S50, obtaining the safety factor at each historical moment, and determining the acquisition cycle of the dam image at the next moment that is negatively correlated with the safety factor at each moment relative to the previous adjacent moment. When the safety factor at each moment in the dam is almost unchanged and the safety factor at the current moment is large, the acquisition cycle of the dam image can be extended to reduce the calculation pressure of the system. Otherwise, it is necessary to increase the detection frequency and shorten the acquisition cycle of the dam image to ensure the monitoring effect of the dam. In step S50, the following steps are specifically included:
[0097] S501, obtaining the safety factor at each historical moment;
[0098] S502, calculating the reduction of the safety factor at each historical moment and the safety factor at the previous adjacent moment; the calculation formula for the reduction of the safety factor is:
[0099]
[0100] In the above formula, ΔF S (m) represents the reduction of the safety factor at the mth moment in the history compared with the safety factor at the previous adjacent moment, F S (m) and F S (m-1) represents the reduction in the safety factor at the mth moment in the history and the previous adjacent moment, i.e., the m-1th moment;
[0101] S503, calculating the acquisition cycle of the dam image at the next moment according to the safety factor at each historical moment, the reduction of the safety factor at the previous adjacent moment, and the safety factor at the current moment; the calculation formula for the acquisition cycle of the dam image at the next moment is:
[0102]
[0103] In the above formula, T represents the acquisition period of the dam image at the next moment, ΔF S (m) represents the reduction of the safety factor at the mth moment in the history compared with the safety factor at the previous adjacent moment.
[0104] S5, judging whether the safety factor is greater than a safety threshold; the value of the safety threshold is generally set to 1;
[0105] If yes, return to step S1;
[0106] If not, an alarm is issued and process data used to calculate the safety factor is output.
[0107] The present invention can improve the quality of the acquired dam image by installing a polarizing plate in front of the lens of the camera, and then reflect the image quality by calculating the average grayscale gradient. The larger the value of the average grayscale gradient is, the better the image quality is, so that the grid area with a larger average grayscale gradient is selected as the target area to calculate the dam safety factor, and the acquisition cycle of the dam image is adaptively changed according to the value and change of the dam safety factor, so as to greatly reduce the calculation pressure of the system, and at the same time, an alarm is issued when the safety factor is less than the safety threshold, so that the operation and maintenance personnel can take measures in time.
[0108] The above implementation methods have been described in detail. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A dam structure safety detection method based on gray gradient method, characterized in that: The detection method comprises the following steps: S1, periodically acquiring images of the dam containing several infrared targets on the dam; S2, gridding the dam image, and calculating the grayscale gradient of any pixel point on the dam image in the x-axis direction and the y-axis direction and the average grayscale gradient of any grid; S3, screening out the grid areas whose average grayscale gradient is greater than the grayscale threshold, and screening out the abnormal grid areas as the target areas; S4. Calculate the safety factor of the target area according to the Swedish strip method; S5, judging whether the safety factor is greater than the safety threshold; If yes, return to step S1; If not, an alarm is issued and process data used to calculate the safety factor is output.
2. The detection method according to claim 1, characterized in that: In step S1, the following method is specifically included: S11. An infrared target lamp for emitting infrared light onto the dam is arranged in the monitoring area facing the dam, and a plurality of infrared target points are formed in the monitoring area on the dam; S12, installing a polarizing plate on the camera lens for filtering sunlight and daily light; S13, placing a camera facing the dam monitoring area, and periodically acquiring images of the dam containing a number of infrared target points.
3. The detection method according to claim 1, characterized in that: In step S2, the following steps are specifically included: S21, gridding the dam image; S22, calculating the grayscale gradient of any pixel point on the dam image in the x-axis direction; the calculation formula of the grayscale gradient in the x-axis direction is: In the above formula, I(x+1, y) represents the grayscale gradient of any pixel point (x, y) in the x-axis direction, and I(x+1, y) and I(x-1, y) represent the pixel values of the two adjacent points (x+1, y) and (x-1, y) on both sides of any pixel point (x, y) in the x-axis direction respectively; S23, calculating the grayscale gradient of any pixel point on the dam image in the y-axis direction; the calculation formula of the grayscale gradient in the y-axis direction is: In the above formula, I(x, y+1) and I(x, y-1) represent the grayscale gradient of any pixel point (x, y) in the y-axis direction, and I(x, y+1) and I(x, y-1) represent the pixel values of the two adjacent points (x, y+1) and (x, y-1) on both sides of any pixel point (x, y) in the x-axis direction, respectively. S24, calculating the average grayscale gradient of any grid according to the grayscale gradient of any pixel point in the x-axis direction and the y-axis direction; the calculation formula of the average grayscale gradient of any grid is: In the above formula, δ f represents the average grayscale gradient of any grid f, where the number of pixels in the x-axis and y-axis directions of the grid f are W and H respectively. and Respectively represent any pixel point (x i ,y j )The grayscale gradient in the x-axis direction and the y-axis direction, (x i ,y j ) represents the i-th pixel point in the x-axis direction and the j-th pixel point in the y-axis direction in the grid f.
4. The detection method according to claim 1, characterized in that: In step S3, the following steps are specifically included: S31, setting a grayscale threshold, and screening out grid areas whose average grayscale gradient is greater than the grayscale threshold as candidate areas; S32, calculating the average value of the average grayscale gradient of each selected area; S33, calculating the standard deviation of the average grayscale gradient of each selected area; S34, calculating the deviation value of each area to be selected according to the average value and standard deviation of the average gray gradient of each area to be selected; the calculation formula of the deviation value is: In the above formula, P f represents the deviation value of any candidate region f, δ f represents the average gray gradient of any selected region f, represents the average value of the average grayscale gradient of each candidate area, and σ represents the standard deviation of the average grayscale gradient of each candidate area; S35. Set a deviation value threshold, and use the candidate area whose deviation value is greater than the deviation value threshold as the target area.
5. The detection method according to claim 1, characterized in that: In step S4, the following steps are specifically included: S41. Divide the target area into several strips according to the Swedish strip division method; S42. Calculate the normal force on the sliding plane at the bottom of the soil strip; the calculation formula for the normal force is: N i =W i cosα i In the above formula, N i represents the normal force on the sliding plane at the bottom of the i-th soil strip, W i represents the gravity of the i-th soil strip, α i The inclination angle of the i-th soil strip; S43. Calculate the safety factor of the target area according to the anti-slip force; the calculation formula of the safety factor is: In the above formula, F S represents the safety factor, n represents the number of soil strips, W i represents the gravity of the i-th soil strip, α i represents the angle between the normal force direction of the i-th soil strip and the gravity direction, φ i represents the internal friction angle of the soil strip, l i represents the length of the i-th soil strip along the slope direction, C i represents the cohesion of the ith soil strip.
6. The detection method according to claim 1, characterized in that: The method further includes step S50 between step S4 and step S5, which is to obtain the safety factor at each historical moment, and determine the acquisition cycle of the dam image at the next moment that is negatively correlated with the safety factor at each moment according to the reduction of the safety factor at each moment relative to the previous adjacent moment.
7. The detection method according to claim 6, characterized in that: In step S50, the following steps are specifically included: S501, obtaining the safety factor at each historical moment; S502, calculating the reduction of the safety factor at each historical moment and the safety factor at the previous adjacent moment; the calculation formula for the reduction of the safety factor is: In the above formula, ΔF S (m) represents the reduction of the safety factor at the mth moment in the history compared with the safety factor at the previous adjacent moment, F S (m) and F S (m-1) represents the reduction in the safety factor at the mth moment in the history and the previous adjacent moment, i.e., the m-1th moment; S503, calculating the acquisition cycle of the dam image at the next moment according to the safety factor at each historical moment, the reduction of the safety factor at the previous adjacent moment, and the safety factor at the current moment; the calculation formula for the acquisition cycle of the dam image at the next moment is: In the above formula, T represents the acquisition period of the dam image at the next moment, ΔF S (m) represents the reduction of the safety factor at the mth moment in the history compared with the safety factor at the previous adjacent moment.