Unmanned aerial vehicle visual target tracking method and system

Through the multi-time gradient direction distribution matrix and adaptive threshold adjustment mechanism, the misjudgment problem of bridge fracture detection under dynamic lighting conditions in traditional methods is solved, and bridge fracture recognition with high accuracy and reliability is achieved.

CN120339282AActive Publication Date: 2025-07-18ZHONGAN DATA TECHNOLOGY DEVELOPMENT (SHENZHEN) CO LTD

Patent Information

Application Number
CN202510819748.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-19
Publication Date
2025-07-18
Estimated Expiration
2045-06-19

AI Technical Summary

Technical Problem

Traditional drone bridge crack detection methods are difficult to distinguish between real cracks and stains under dynamic lighting conditions, the error judgment rate is high, and it cannot adapt to ambient light changes, which affects the accuracy and reliability of detection.

Method used

Through scanning of different solar incident angles in multiple periods, a gradient direction distribution matrix is constructed, and the consistency threshold is adjusted using variance parameters and moving averages, and combined with an adaptive mechanism driven by historical data, distinguishing cracks and stains.

Benefits of technology

It significantly reduces the misjudgment rate, improves the accuracy and reliability of bridge crack detection, adapts to ambient light changes, and provides accurate bridge health monitoring data support.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120339282A_ABST
    Figure CN120339282A_ABST
Patent Text Reader

Abstract

The invention discloses a visual target tracking method and system for an unmanned aerial vehicle, and relates to the technical field of image acquisition and processing.The method comprises the steps that firstly, a bridge area is scanned in a directional mode in multiple different sun incident angle periods (the interval is larger than or equal to 30 degrees), and stain interference is eliminated through natural light multi-angle changes; the geometric stability of the crack edge is quantified by constructing a gradient direction distribution matrix of the time dimension; secondly, dividing multiple groups of scanning data into at least six direction groups, calculating pixel proportion variances group by group, accumulating the pixel proportion variances into a total variance parameter, and effectively distinguishing cracks from surface stains by combining a direction consistency verification mechanism (the total variance lt is judged as cracks by a preset threshold value); and finally, establishing a dynamic feedback closed loop based on a historical variance parameter sample library, adaptively adjusting a threshold value through a moving average value deviation ratio formula, and solving the problem of false detection caused by material aging and environmental fluctuation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image acquisition and processing, and specifically to an unmanned aerial vehicle (UAV) vision target tracking method and system. Background Art

[0002] With the wide application of UAV technology in the field of infrastructure inspection, vision-based target tracking methods have become an important means for bridge crack detection. Traditional methods mainly achieve crack recognition through edge detection and feature matching of single aerial images. However, the following technical bottlenecks exist in practical applications: Traditional methods rely on artificial light sources or single natural light scans, and it is difficult to overcome the problem of overlapping gray-scale features between bridge surface stains (asphalt leakage, moss attachment) and real cracks under similar lighting conditions. The visual features of bridge surface cracks are easily affected by the change of the solar incident angle. It is difficult to distinguish real cracks from instantaneous shadows with images collected in a single time period. The reflection characteristics of stain areas under strong noon sunlight are highly similar to the crack edge gradients, resulting in a high misjudgment rate. Summary of the Invention

[0003] Aiming at the deficiencies of the existing technology, the present invention provides an unmanned aerial vehicle (UAV) vision target tracking method and system.

[0004] To achieve the above object, the technical solution of the present invention is as follows: In the first aspect, the present invention discloses an unmanned aerial vehicle (UAV) vision target tracking method, including the following steps: Obtain an optical image dataset containing gray values of the target bridge area scanned by the UAV in a preset time period; at least three groups of the preset time periods are set, and the difference in the solar incident angle between adjacent preset time periods is not less than 30°; Perform edge detection processing on the optical image dataset, extract continuous edge regions with a length exceeding a preset threshold as candidate regions, and merge the extraction results to form a candidate region set; For each candidate region in the candidate region set, calculate the gradient direction angle of each pixel point in the optical image dataset of each scan respectively, and construct a gradient direction distribution matrix corresponding to the time dimension; the gradient direction distribution matrix includes at least six direction groups and the proportion of the number of pixels in each group; Compare the gradient direction distribution matrices obtained from each scan, calculate the variance value of the proportion of the number of pixels in each direction group group by group, and accumulate to obtain a total variance parameter; When the total variance parameter is less than a preset consistency threshold, determine that the candidate region is a real crack; Record the total variance parameter values of the regions determined to be real cracks in historical detection tasks to form a variance parameter sample library; Calculate the moving average of the variance parameters in the variance parameter sample library. When the deviation between the variance parameter of the latest detection task and the moving average exceeds the preset feedback threshold, adjust the preset consistency threshold. The adjustment formula is: New threshold = original threshold × (1 + deviation rate × configurable weight coefficient); where the deviation rate is: (moving average - latest variance parameter) / moving average.

[0005] In a second aspect, the present invention also discloses a UAV vision target tracking system applying the above-mentioned UAV vision target tracking method, including: A flight control module, configured to obtain an optical image dataset containing grayscale values of the UAV performing directional scanning on a target bridge area within a preset time period; at least three groups of the preset time periods are set, and the difference in the solar incident angle between adjacent preset time periods is not less than 30°; A candidate area generation module, configured to perform edge detection processing on the optical image dataset, extract continuous edge areas with lengths exceeding a preset threshold as candidate areas, and merge the extraction results to form a candidate area set; A gradient modeling module, configured to calculate the gradient direction angles of each pixel point in the optical image dataset scanned each time for each candidate area in the candidate area set, and construct a gradient direction distribution matrix corresponding to the time dimension; the gradient direction distribution matrix includes at least six direction groups and the proportion of the number of pixels in each group; A variance calculation module, configured to compare the gradient direction distribution matrices obtained from each scan, calculate the variance values of the proportion of the number of pixels in each direction group group by group, and accumulate to obtain the total variance parameter; A crack verification module, configured to determine that the candidate area is a real crack when the total variance parameter is less than the preset consistency threshold; A feedback calibration module, configured to perform the following actions: Record the total variance parameter values of the areas determined to be real cracks in historical detection tasks to form a variance parameter sample library; Calculate the moving average of the variance parameters in the variance parameter sample library. When the deviation between the variance parameter of the latest detection task and the moving average exceeds the preset feedback threshold, adjust the preset consistency threshold. The adjustment formula is: New threshold = original threshold × (1 + deviation rate × configurable weight coefficient); where the deviation rate is: (moving average - latest variance parameter) / moving average.

[0006] Compared with the prior art, the beneficial effects of the present invention are: Using the scanned image data at three different solar incident angles (interval ≥ 30°), the natural light source is converted into a controllable variable, and by comparing the gradient direction distributions in the time dimension, the stain interference is eliminated; Construct a gradient direction distribution matrix to quantify the stability characteristics of the crack direction. Replace the single morphological parameter with the cumulative variance value to enhance the interpretability of physical characteristics; Establish a variance parameter sample library, and dynamically adjust the consistency threshold in combination with the moving average deviation rate to achieve algorithm self-adaptability and solve the misjudgment problem caused by material aging and environmental fluctuations. BRIEF DESCRIPTION OF THE DRAWINGS

[0007] The disclosure of the present invention will be described with reference to the accompanying drawings. It should be understood that the drawings are for illustrative purposes only and are not intended to limit the scope of protection of the present invention. In the drawings, the same reference numerals are used to refer to the same components. Among them: Figure 1 is the method flow chart of the present invention; Figure 2 is the flow chart of adjusting the preset consistency threshold according to the change of light intensity of the present invention; Figure 3 is the subsequent processing flow chart of crack detection of the present invention; Figure 4 is the priority scanning flow chart during the subsequent processing of crack detection of the present invention; Figure 5 is the flow chart when the unmanned aerial vehicle of the present invention performs directional scanning; Figure 6 is the generation flow chart of the candidate region set of the present invention; Figure 7 is the flow chart of constructing the gradient direction distribution matrix of the present invention; Figure 8 is the calculation process diagram of the total variance parameter of the present invention; Figure 9 is the flow chart of material deterioration warning of the present invention; Figure 10 is the system module diagram of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0008] It is easy to understand that according to the technical solution of the present invention, without changing the essence of the present invention, those of ordinary skill in the art can propose various interchangeable structural ways and implementation ways. Therefore, the following detailed embodiments and the accompanying drawings are only illustrative descriptions of the technical solution of the present invention, and should not be regarded as the whole of the present invention or as a limitation or restriction on the technical solution of the present invention.

[0009] APPLICATION OVERVIEW In traditional existing bridge crack detection methods, edge detection and feature matching are performed relying on optical images obtained from a single natural light scan, making it difficult to overcome the problem of feature confusion between bridge surface stains and real cracks under dynamic lighting conditions. Due to the time correlation of the gradient direction distribution at the crack edge caused by the change in the solar incident angle, and the difference in light sensitivity of the optical properties of the stain area affected by the surface material, the gradient direction distribution characteristics under multi-angle lighting conditions cannot be obtained by a single scan, resulting in a significant increase in the false positive rate. This problem directly affects the false alarm suppression ability of the crack detection system, leading to a decrease in the credibility of the maintenance decision-making basis.

[0010] For example, in the periodic inspection of the cable-stayed cable anchorage area of a cross-sea bridge, the high-angle incident light image collected by the drone at noon shows continuous edge features in a certain area, and its gradient direction is concentrated in the interval of 120° to 130°. Under the condition of low-angle incident light at dusk in the same area, the gradient direction of the stain formed by asphalt leakage is shifted to the interval of 80° to 90° due to the specular reflection effect, while the gradient direction of the real concrete crack remains in the interval of 120° to 130° due to the geometric shape stability. Since the traditional method only uses the single noon scan data and cannot identify the gradient direction difference of the dusk scan data, the stain area is wrongly classified as a crack.

[0011] If the above problems are not solved, the difference in the gradient direction distribution under dynamic lighting conditions cannot be effectively captured and analyzed, which will lead to continuous false positive results in the crack detection system. This not only causes waste of maintenance resources but also may cover up the expansion trend of real cracks. The long-term accumulated false detection data will interfere with the feature learning process of the bridge health assessment model, reduce the timeliness of structural safety warning, and increase the risk of sudden structural failure.

[0012] Facing the above problems, this application first realizes that there are essential differences in the gradient direction distribution between real cracks and surface stains under dynamic lighting conditions in the time dimension. Based on the influence of the change in the solar incident angle on the stability of the crack geometric features, this application proposes to establish a time series model of the gradient direction distribution through multi-period scanning, and use the direction consistency feature of the crack edge under different lighting conditions as the discrimination basis. Aiming at the defect that the traditional single scan cannot capture the time dimension features, this application establishes a variance calculation model of the gradient direction distribution matrix, constructs a discrimination index by quantifying the consistency degree of the multi-period direction distribution, and at the same time introduces a threshold adaptive mechanism driven by historical detection data to solve the misjudgment risk caused by long-term changes in environmental factors.

[0013] In this regard, this application proposes: As Figure 1 shown, a drone vision target tracking method includes the following steps: Obtain an optical image dataset containing grayscale values of the target bridge area scanned by the drone within a preset time period; among them, at least three groups of preset time periods are set, and the difference in the solar incident angle between adjacent preset time periods is not less than 30°; setting at least three groups of preset time periods and the difference in adjacent solar incident angles not less than 30° means data collection at at least three different time points, and the difference in the solar incident angles between adjacent time points is large enough. Specifically, it can be achieved by combining the drone mission planning system with an astronomical calculation module to ensure that bridge surface image data under different lighting conditions are collected and avoid shadow interference caused by single-angle lighting.

[0014] Perform edge detection processing on the optical image dataset, extract continuous edge regions with lengths exceeding a preset threshold as candidate regions, and merge the extraction results to form a candidate region set.

[0015] For each candidate region in the candidate region set, calculate the gradient direction angle of each pixel point in the optical image dataset for each scan, and construct a gradient direction distribution matrix corresponding to the time dimension; the gradient direction distribution matrix contains at least six direction groups and the proportion of the number of pixels in each group; the gradient direction distribution matrix contains at least six direction groups and the proportion of the number of pixels in each group means that the gradient directions of edge pixels are grouped and statistically proportioned at fixed angle intervals. Specifically, it can be achieved by using the Sobel operator to calculate the gradient direction and dividing it into direction groups at 10° intervals. By quantifying the gradient distribution characteristics in different directions, the direction consistency of the crack structure is captured.

[0016] Compare the gradient direction distribution matrices obtained from each scan, calculate the variance value of the proportion of the number of pixels in each direction group one by one, and accumulate to obtain the total variance parameter; the total variance parameter refers to the accumulated variance value of the proportion of pixels in each direction group in multiple scans. Specifically, it can be achieved by calculating and summing one by one using the statistical variance formula, and is used to measure the fluctuation degree of the gradient direction distribution at different time points and reflect the stability of the crack edge.

[0017] When the total variance parameter is less than the preset consistency threshold, determine that the candidate region is a real crack; Record the total variance parameter values of the regions determined to be real cracks in the historical detection tasks to form a variance parameter sample library; Calculate the moving average value of the variance parameters in the variance parameter sample library. When the deviation between the variance parameter of the latest detection task and the moving average value exceeds the preset feedback threshold, adjust the preset consistency threshold. The adjustment formula is: New threshold = original threshold × (1 + deviation rate × configurable weight coefficient); Among them, the deviation rate is: (moving average value - latest variance parameter) / moving average value.

[0018] The moving average of the variance parameter sample library refers to dynamically calculating the mean based on historical detection results, which can be specifically implemented using the sliding window method or the exponential smoothing method. By continuously updating the statistical benchmark, it adapts to the parameter drift caused by the aging of bridge materials or environmental changes.

[0019] The core innovation of this application lies in the stability analysis of the gradient direction distribution under different solar incidence angles in multiple time periods, combined with the dynamic threshold adjustment mechanism fed back by historical data, effectively overcoming the defect that traditional methods cannot distinguish cracks from stains or instantaneous shadows under a single lighting condition, and significantly reducing the misjudgment rate.

[0020] The working process and principle of this application are as follows: Obtain an optical image dataset of the target bridge area scanned by the drone in a preset time period. At least three groups of preset time periods are set, and the difference in the solar incidence angle between adjacent preset time periods is not less than 30° to capture image features under different lighting conditions. Perform edge detection processing on the optical image dataset, extract continuous edge regions with a length exceeding the preset threshold as candidate regions, and merge them to form a candidate region set. For each candidate region, calculate the gradient direction angle of each pixel point in each scan, and construct a gradient direction distribution matrix corresponding to the time dimension. The gradient direction distribution matrix contains at least six direction groups and the proportion of the number of pixels in each group, which is used to characterize the direction distribution of edge features. Compare the gradient direction distribution matrices of each scan, calculate the variance value of the proportion of the number of pixels in each direction group group by group, and accumulate to obtain the total variance parameter. When the total variance parameter is less than the preset consistency threshold, determine that the candidate region is a real crack. Record the total variance parameter values of the regions determined to be real cracks in the historical detection tasks to form a variance parameter sample library. Calculate the moving average of the variance parameters in the variance parameter sample library. When the deviation between the variance parameter of the latest detection task and the moving average exceeds the preset feedback threshold, adjust the preset consistency threshold. The adjustment formula is: New threshold = original threshold × (1 + deviation rate × configurable weight coefficient), where the deviation rate is (moving average - latest variance parameter) / moving average. Through multi-time period scanning and gradient direction distribution analysis, combined with the historical data-driven threshold adaptive mechanism, effective distinction between real cracks and surface stains is achieved.

[0021] As a preferred embodiment, the solution of this application is specifically implemented as follows: The drone performs directional scanning in the target bridge area and conducts three scans at 9 am, 12 noon, and 3 pm respectively to obtain an optical image dataset containing grayscale values.

[0022] Apply the Canny edge detection algorithm to the optical image dataset, and extract continuous edge regions with a length exceeding 5 cm as candidate regions.

[0023] For each candidate region, the gradient direction angle of pixel points is calculated using the Sobel operator, and the gradient direction angles are divided into 9 direction groups at 10° intervals. A 9×3 gradient direction distribution matrix is constructed, where each column represents one scan and each row represents the proportion of pixel numbers in a direction group.

[0024] Calculate the variance of the proportion of pixel numbers in each direction group during three scans, and accumulate to obtain the total variance parameter.

[0025] Set the preset consistency threshold to 0.05. When the total variance parameter is less than 0.05, determine that the candidate region is a real crack.

[0026] Record the total variance parameter values of real cracks in historical detection tasks, and calculate the moving average of the last 100 detections.

[0027] When the deviation between the variance parameter of the latest detection task and the moving average exceeds 20%, adjust the preset consistency threshold. Set the weight coefficient to 0.5, and calculate the new consistency threshold according to the adjustment formula.

[0028] Through the above scheme, the present application realizes the effective distinction between real cracks and stains on the bridge surface under dynamic lighting conditions. By capturing the time-dimensional characteristics of the gradient direction distribution through multi-period scanning, the problem that it is difficult to distinguish cracks from instantaneous shadows by single scanning is overcome. Utilizing the consistency characteristics of the gradient direction of real cracks under different lighting conditions, a discriminant model based on variance analysis is established, effectively reducing the misjudgment rate of stain areas. Introducing a threshold self-adaptive mechanism driven by historical data improves the adaptability of the system to long-term changes in environmental factors. This method significantly improves the accuracy and reliability of bridge crack detection, providing more accurate data support for bridge structure health monitoring.

[0029] In some of the above schemes of the present application, during the process of adjusting the preset consistency threshold, the drastic fluctuation of the environmental light intensity may cause the moving average of the variance parameter sample library to not match the current detection conditions, thereby causing threshold adjustment errors. For example, in the case of rapid change of light intensity within a short period of time, the moving average based on historical data cannot accurately reflect the influence of the current environment on the gradient direction distribution of cracks, resulting in the incorrect adjustment of the consistency threshold and affecting the accuracy of crack determination.

[0030] As Figure 2 shown, it is a flowchart for adjusting the preset consistency threshold according to the change of light intensity; the present application further proposes that adjusting the preset consistency threshold further includes: Synchronously collect the current environmental light intensity data, and calculate the light intensity change rate of multiple scan periods; When the light intensity change rate exceeds the preset light fluctuation threshold, freeze the threshold adjustment process and enable the backup consistency threshold set; The set of backup consistency thresholds includes multiple sets of preset consistency thresholds bound to different ambient light intensity ranges.

[0031] The ambient light intensity data is collected in real time by a light sensor, and the light intensity change rate is calculated in units of the time interval between every two scans. The calculation method of the light intensity change rate is the ratio of the difference in light intensity between adjacent scan periods to the time interval. The preset light intensity fluctuation threshold is determined by experimental data and is used to distinguish normal light intensity fluctuations from abnormal mutations. Each set of thresholds in the set of backup consistency thresholds is associated with a specific light intensity range. For example, the light intensity is divided into three ranges: 0 - 20000 lux, 20000 - 50000 lux, and 50000 - 100000 lux, and each range corresponds to different preset consistency thresholds. The trigger condition for freezing the threshold adjustment process is that the light intensity change rate in three consecutive scans exceeds the preset light intensity fluctuation threshold.

[0032] Specifically, when the drone is performing the task of bridge crack detection, the system monitors the ambient light intensity in real time. When it detects that the light intensity fluctuates violently within adjacent scan periods, for example, the light intensity drops suddenly from 50000 lux to 15000 lux within 10 seconds, and the change rate reaches 3500 lux / s, exceeding the preset light intensity fluctuation threshold of 2000 lux / s, the system immediately stops the threshold adaptive adjustment mechanism based on the variance parameter sample library. At this time, the system automatically calls the backup consistency threshold corresponding to the current light intensity range. For example, 15000 lux belongs to the 0 - 20000 lux range. This backup threshold is obtained through training crack samples under simulated different light conditions in the offline stage and can effectively avoid the problem of over-adjustment of the threshold caused by environmental mutations. When the light intensity returns to stability and the change rate is lower than the preset fluctuation threshold, the system reactivates the threshold adaptive adjustment function and continues to update the moving average value of the variance parameter sample library.

[0033] As a preferred embodiment, the solution of the present application is specifically implemented as follows: Synchronously collect the current ambient light intensity data and calculate the light intensity change rate for multiple scan periods. Specifically, a light sensor can be installed on the drone to record the light intensity values at the beginning and end of each scan. Then calculate the percentage change in light intensity between two adjacent scans as the light intensity change rate.

[0034] When the light intensity change rate exceeds the preset light intensity fluctuation threshold, freeze the threshold adjustment process and enable the set of backup consistency thresholds. For example, the light intensity fluctuation threshold can be set to 20%. If it is detected that the light intensity change rate exceeds 20%, the original threshold adaptive adjustment mechanism is paused, and instead, the pre-configured set of backup thresholds is used.

[0035] The set of backup consistency thresholds includes multiple sets of preset consistency thresholds bound to different illumination intensity intervals. Further, the illumination intensity can be divided into three intervals: low, medium, and high, corresponding to 0 - 500 lux, 500 - 2000 lux, and above 2000 lux respectively. Each interval is configured with a dedicated set of consistency thresholds to ensure the stability of detection during drastic changes in illumination.

[0036] Through the above technical solution, the present application can effectively address the impact of drastic changes in illumination conditions on the accuracy of crack detection. Thus, multiple scan results obtained at different times and weather conditions have better consistency and comparability. Specifically, by real-time monitoring of illumination changes and enabling the backup threshold mechanism, the false detection and missed detection cases caused by sudden illumination changes can be reduced, and the robustness of crack recognition can be improved. At the same time, the multiple sets of pre-configured thresholds can be optimized for different illumination intensities, further enhancing the adaptability of the detection.

[0037] In some of the above solutions of the present application, when it is determined that a candidate region is a real crack, if the extension direction of the crack cannot be effectively identified, it may lead to an unreasonable planning of the scanning range in subsequent inspection tasks, making it difficult to track the crack propagation trend, resulting in a decrease in inspection efficiency and a potential risk of missed detection.

[0038] As Figure 3 shown, it is a flowchart of subsequent processing for crack detection; the present application further proposes that after it is determined that a candidate region is a real crack, it further includes: Extracting the direction group with the largest proportion in the gradient direction distribution matrix as the main gradient direction; In subsequent inspection tasks, preferentially scan the adjacent regions extending along the main gradient direction, and adjust the scanning range to 1.2 - 1.4 times the length of the original region; The determination condition for the extension along the main gradient direction is that the difference between the gradient direction angles of at least two consecutive pixel points detected in the adjacent region and the main gradient direction is less than 5°.

[0039] Among them, the statistical result of the gradient direction distribution matrix provides basic data for the direction group division. The direction group with the largest proportion reflects the main extension trend of the crack edge. The adjustment of the scanning range is based on the physical characteristics of crack length expansion, and the expansion multiple can cover the typical increment of crack extension through experimental verification. The setting of the direction difference combines the image resolution and crack morphology characteristics to ensure the consistency of the gradient directions of adjacent pixels.

[0040] Specifically, after the crack verification module confirms the real crack, the gradient modeling module selects the direction group with the largest proportion of pixel quantity from the gradient direction distribution matrix of the corresponding area. The angle range corresponding to this direction group is used as the main gradient direction and input into the flight control module. In subsequent inspection tasks, the flight path planning module generates an extended scanning area along this direction in the space coordinate system with the main gradient direction as the reference, and the extended length is 1.3 times the median value of the original area. During the image acquisition process, the edge detection algorithm monitors the gradient direction angles of adjacent areas in real time. When it detects that the measured direction angles of two consecutive pixel points deviate from the main direction angle by less than 5°, it triggers the crack extension determination. This determination result will update the candidate area set and start a new round of construction of the gradient direction distribution matrix and variance calculation process to form a closed-loop control for crack tracking.

[0041] As a preferred embodiment, the solution of the present application is specifically implemented as follows: After determining that the candidate area is a real crack, extract the direction group with the largest proportion in the gradient direction distribution matrix as the main gradient direction. In subsequent inspection tasks, preferentially scan the adjacent areas extending along the main gradient direction, and adjust the scanning range to 1.3 times the length range of the original area. The determination condition for the extension along the main gradient direction is that at least two consecutive pixel points are detected in the adjacent area, and the difference between the gradient direction angle and the main gradient direction is less than 5°.

[0042] Specifically, first, determine the main trend of the crack through the analysis of the gradient direction distribution matrix. For example, if the main gradient direction of a detected crack is 45°, then during the next inspection, the drone will preferentially extend the scan along the 45° direction. The scanning range is extended from the original 100 meters to 130 meters to cover the possible crack extension area.

[0043] During the scanning process, the system analyzes the gradient directions of pixel points in adjacent areas in real time. When at least two pixel points are continuously detected, and the included angle between the gradient direction and 45° is less than 5°, it is determined as a potential crack extension area for key scanning and analysis.

[0044] Through the above technical solution, the present application can effectively improve the accuracy and efficiency of crack detection. Since the areas extending along the main gradient direction are preferentially scanned, the scanning time of irrelevant areas is greatly reduced. At the same time, by expanding the scanning range and setting strict determination conditions, the ability to capture the crack extension trend is improved. This method can not only timely detect new cracks but also track the development of existing cracks, providing an important basis for bridge maintenance.

[0045] In some of the above solutions of the present application, the scanning strategy for adjacent areas extending along the main gradient direction may result in insufficient detection sensitivity when the direction of the newly added crack deviates from the original crack direction, especially under the interference of complex surface stains, and it is impossible to accurately identify crack branches or intersecting cracks with different orientations.

[0046] As shown Figure 4 in the figure, it is the priority scanning flow chart for subsequent processing of crack detection; the present application further proposes that the priority scanning of adjacent regions extending along the main gradient direction includes: Real-time monitoring of the new crack detection results in the region extending along the main gradient direction; When the included angle between the main gradient direction of the newly detected crack and the original crack exceeds the preset angle tolerance, the angular interval of the direction group division is adjusted to half of the original, generating a refined gradient direction distribution matrix containing twice the number of the current direction group.

[0047] Among them, the real-time monitoring process is realized by continuously scanning the gradient direction angle data of adjacent regions. The preset angle tolerance is set as an interval value of 5° to 15°. The angular interval of the direction group division is compressed from 10° to 5°, forming a refined gradient direction distribution matrix with twice the number of the current direction group. The adjusted refined matrix can capture subtle direction differences. For example, when the included angle between the newly detected crack direction and the original crack is 20°, the direction group with a 10° interval cannot effectively distinguish the difference between the two, while the direction group with a 5° interval can map the included angle difference to four adjacent direction groups, improving the direction resolution ability.

[0048] Specifically, when the direction of the newly detected crack deviates from the main direction of the original crack by more than the preset angle tolerance, the system automatically triggers the update mechanism of the direction group division rule. Taking the main gradient direction of the original crack as the 0° reference, if the main gradient direction of the newly detected crack in the adjacent region is 22° and the preset angle tolerance is 10°, at this time, the system adjusts the direction group interval from 10° to 5°, generating a refined gradient direction group with an interval of 5° and twice the number of the current direction group.

[0049] The adjusted direction distribution matrix can classify the gradient direction angle of the newly detected crack into the direction group interval of 4° to 6° by increasing the number of direction groups, effectively distinguishing the gradient direction feature differences between the original crack and the newly detected crack, and avoiding misjudgment caused by insufficient direction resolution. This process combines the historical crack direction data and the real-time detection results to dynamically optimize the direction group division strategy, improving the recognition accuracy of multi-angle cracks.

[0050] As a preferred embodiment, the solution of the present application is specifically implemented as follows: The priority scanning of adjacent regions extending along the main gradient direction includes: real-time monitoring of the new crack detection results in the region extending along the main gradient direction. When the included angle between the main gradient direction of the newly detected crack and the original crack exceeds the preset angle tolerance, the angular interval of the direction group division is adjusted to half of the original, generating a refined gradient direction distribution matrix containing twice the number of the current direction group.

[0051] Specifically, in practical applications, the preset angle tolerance can be set to 30°. When the angle between the main gradient direction of the newly detected crack and the original crack exceeds 30°, the system will automatically adjust the angle interval of the original 10° direction group division to 5°. For example, the original gradient direction distribution matrix contains 18 direction groups (0°-10°, 10°-20°, ..., 170°-180°), and after adjustment, a refined gradient direction distribution matrix with 36 direction groups (0°-5°, 5°-10°, 10°-15°, ..., 175°-180°) will be generated.

[0052] Furthermore, the system will analyze the newly generated refined gradient direction distribution matrix and recalculate the proportion of the number of pixels in each direction group. Thus, the subtle changes in the crack extension direction can be captured more accurately, improving the accuracy of crack detection.

[0053] Through the above technical solutions, the present application can dynamically adjust the accuracy of the gradient direction distribution matrix to adapt to the possible direction changes during the crack extension process. This adaptive refinement processing mechanism improves the system's ability to identify complex crack patterns and reduces the risk of missed detection due to sudden changes in crack direction. At the same time, by only increasing the number of direction groups when necessary, unnecessary waste of computing resources is avoided, maintaining the efficient operation of the system.

[0054] In some of the above solutions of the present application, the UAV may have spatial positioning deviations during multiple scans, resulting in spatial coordinate offsets in the optical image datasets collected at different times, affecting the accuracy of the construction of the gradient direction distribution matrix and thus reducing the reliability of crack identification.

[0055] As Figure 5 shown, it is the flowchart of the UAV performing directional scanning; the present application further proposes that the UAV performs directional scanning of the target bridge area within a preset time period, including: Recording the three-dimensional spatial coordinates at the first scan through the GPS positioning device to generate reference positioning data including altitude values and planar coordinates; Based on the reference positioning data, planning the flight path for subsequent scans to ensure that the spatial coordinate deviation of the UAV during each scan is less than the preset positioning tolerance value.

[0056] Among them, the three-dimensional spatial coordinates of the first scan are obtained in real time through the GPS positioning device. The altitude value includes the vertical distance of the UAV relative to the ground, and the planar coordinates are the values after converting longitude and latitude coordinates into the Cartesian coordinate system. The reference positioning data is stored in the flight control module of the UAV and serves as the reference origin for subsequent path planning. The preset positioning tolerance value is set according to the accuracy requirements of bridge crack detection, and the typical value is 5 cm. The deviation control is achieved by comparing the Euclidean distance between the actual flight coordinates of the UAV and the reference positioning data.

[0057] Specifically, when the scanning task is executed for the first time, the GPS positioning device synchronously collects the longitude and latitude coordinates of the UAV and the altitude data measured by the barometer, and generates three-dimensional reference positioning data through coordinate conversion. Before the subsequent scanning task is started, the flight control module reads the reference positioning data and generates a rectangular inspection path with this coordinate as the origin, and the path covers the preset detection range of the target bridge area. During the flight, the current spatial coordinates of the UAV are obtained in real time, and the spatial deviation value from the reference positioning data is calculated. If the deviation exceeds the positioning tolerance value, the flight path dynamic correction mechanism is triggered. This mechanism adjusts the flight attitude of the UAV and the output power of the thruster to bring the spatial coordinate deviation back within the tolerance range. In this way, it is ensured that the UAV is in the same spatial position during multiple scans, eliminating the difference in image acquisition angles caused by the deviation of the flight path, thereby improving the cross-time consistency of the gradient direction distribution matrix.

[0058] As a preferred embodiment, the solution of the present application is specifically implemented as follows: The UAV performs directional scanning on the target bridge area within a preset time period, including: Recording the three-dimensional spatial coordinates at the first scan through the GPS positioning device to generate reference positioning data including altitude values and planar coordinates; Planning the flight path for subsequent scans based on the reference positioning data, so that the spatial coordinate deviation of the UAV during each scan is less than the preset positioning tolerance value.

[0059] Specifically, the UAV first performs the first scan in the target bridge area. During the scan, the GPS positioning device records the three-dimensional spatial coordinates of the UAV in real time, including longitude, latitude, and altitude. After the scan is completed, the system processes the recorded coordinate data into reference positioning data, which includes altitude values and planar coordinate information.

[0060] Furthermore, the system plans the subsequent scan flight path based on this reference positioning data. During each subsequent scan, the UAV will fly along the planned path as much as possible and compare the deviation between the current position and the reference position in real time. If it is detected that the spatial coordinate deviation exceeds the preset positioning tolerance value, the system will immediately perform position correction to ensure the consistency of the scan position.

[0061] Thus, by precisely controlling the spatial position of each scan, it is possible to ensure that the image data obtained from multiple scans has a good spatial correspondence relationship, providing a reliable data basis for subsequent image analysis and crack detection.

[0062] Through the above technical solutions, the present application can effectively improve the position consistency of multiple scans, reduce the image deviation caused by the position change of the unmanned aerial vehicle, and thus improve the accuracy of crack detection. At the same time, the flight path planning based on GPS positioning can achieve automated repeated scanning, reduce the error of manual operation, and improve the detection efficiency. In addition, precise position control can also ensure that the image data obtained at different time periods has good comparability, which is helpful for realizing long-term monitoring and analysis of crack changes.

[0063] In some of the above solutions of the present application, the generation of the candidate region set depends on the edge detection results of a single scan. However, stains and instantaneous shadows on the bridge surface may cause edge breaks, resulting in a large number of broken edges with insufficient length in the initial edge set. Directly merging the results of multiple scans is likely to introduce noise and affect the integrity and accuracy of the candidate region set.

[0064] As Figure 6 shown, it is the flowchart for generating the candidate region set; the present application further proposes that the generation process of the candidate region set is as follows: Perform Canny edge detection on the optical image data set of a single scan to generate an initial edge set; Perform morphological closing operations on the broken edges with a length less than 20 cm in the initial edge set to connect them and form a corrected edge set; Perform a logical OR operation on the corrected edge sets of multiple scans to generate a candidate region set.

[0065] Among them, Canny edge detection uses double-threshold hysteresis processing to retain strong edges and suppress weak edges, and gives priority to ensuring the edge positioning accuracy when generating the initial edge set. The morphological closing operation uses a rectangular structuring element, the width of which is set to 1.5 times the minimum expected width of the crack, and connects the broken edges through dilation and erosion operations to eliminate isolated broken segments with a length less than 20 cm. The logical OR operation superimposes the corrected edge sets of multiple scans at the pixel level to ensure that the valid edges detected under different lighting conditions are retained.

[0066] Specifically, due to light changes or stain interference in a single scan, local breaks may occur at the crack edges. While Canny edge detection preserves the high-gradient edges of real cracks, it may misjudge some fracture segments shorter than 20 cm as noise. Through morphological closing operation, the fractured areas of the cracks are pixel-expanded in the horizontal and vertical directions to fill the gaps and smooth the edge morphology, enabling continuous cracks to meet the merging conditions. After the logical OR operation on the corrected edge sets of multiple scans, the crack features in different time periods are superimposed, eliminating the edge missing caused by the change of the single-scan angle. For example, in a certain scan, due to the excessive solar incidence angle, local reflection of the crack occurs. After the closing operation connects the fractured parts, the logical OR operation will retain the complete edges that are not affected by the reflection in other scans. Thus, the candidate region set takes into account both the accuracy of single-scan and the integrity of multiple time dimensions, reducing the misjudgment risk caused by stains or shadows.

[0067] As a preferred embodiment, the solution of the present application is specifically implemented as follows: The generation process of the candidate region set includes the following steps: First, perform Canny edge detection on the optical image dataset of a single scan. Specifically, use the Canny operator to detect the edges of the grayscale image, generate a binary edge image, and form an initial edge set.

[0068] Second, perform morphological closing operation connection on the fractured edges in the initial edge set with a length less than 20 cm. Specifically, use the structuring element for dilation and erosion operations to fill the small gaps between the edges and form a corrected edge set.

[0069] Finally, perform a logical OR operation on the corrected edge sets of multiple scans. Specifically, perform a pixel-level logical OR operation on the corrected edge sets obtained at different time periods, merge all the detected edge information, and generate a candidate region set.

[0070] Through the above technical solution, the present application can effectively improve the accuracy and integrity of edge detection. By connecting the fractured edges, the problem of edge fracture caused by image noise or light change is reduced. The merging of multiple scan results further enhances the robustness of the detection, reducing the false detection and missed detection that may occur in a single scan. This method is particularly suitable for bridge crack detection in complex environments and can more accurately identify potential crack areas.

[0071] In some of the above solutions of the present application, when constructing the gradient direction distribution matrix, if the quantization accuracy of the gradient direction angle is insufficient or the grouping interval is too large, it will cause the confusion of gradient features of different surface textures, making it impossible to accurately distinguish the microscopic direction differences between real cracks and stain areas, affecting the accuracy of crack discrimination.

[0072] Such as Figure 7As shown in the figure, it is a flowchart for constructing a gradient direction distribution matrix; the present application further proposes to construct a gradient direction distribution matrix corresponding to the time dimension, including: Use the Sobel operator to calculate the gradient components of the pixel points in the horizontal and vertical directions; Based on the arctangent function, calculate the gradient direction angle of each pixel point, and quantize the calculation result into a discrete value with an accuracy of 1°; Divide the gradient direction angles into several direction groups at 10° intervals, and count the percentage of the number of pixels in each direction group in the total number of edge pixels.

[0073] Among them, the gradient components act on the pixel neighborhood through the horizontal convolution kernel and the vertical convolution kernel in the Sobel operator respectively, and the coefficient weights of the convolution kernels follow the optimal parameter configuration for edge detection. The gradient direction angle is obtained through the operation of the arctangent function with two parameters. The floating-point value of the calculation result is magnified 100 times and then rounded, and then reduced to an integer angle value to achieve a quantization accuracy of 1°. The division of the direction groups adopts a fixed angle interval mechanism, generating a direction interval every 10°, and each interval covers 10 consecutive discrete angle values. The total number of direction groups is obtained by dividing 360° by 10°.

[0074] Specifically, after the horizontal gradient component and the vertical gradient component are accurately calculated, the mathematical calculation of the gradient direction angle uses the formula arctan(Gy / Gx), where Gy is the vertical gradient component and Gx is the horizontal gradient component. The calculation result is reserved to two decimal places and converted to an integer value with an accuracy of 1° by rounding. The quantized angle value is assigned to the corresponding direction group. For example, angles from 5° to 14° are classified into the 10° direction group, and angles from 15° to 24° are classified into the 20° direction group. The proportion of the number of pixels in each direction group is obtained by statistically calculating the ratio of the number of pixels in the group to the total number of edge pixels in the candidate area. Thus, high-precision gradient direction quantization can effectively capture the microscopic direction characteristics of the crack edge, and the grouping method at 10° intervals reduces the calculation complexity while retaining the direction distribution trend, avoiding statistical noise interference caused by overly fine grouping.

[0075] As a preferred embodiment, the solution of the present application is specifically implemented as follows: Constructing a gradient direction distribution matrix corresponding to the time dimension includes the following steps: First, use the Sobel operator to calculate the gradient components of the pixel points in the horizontal and vertical directions. Specifically, for each pixel point (x, y) in the image, calculate its gradients Gx and Gy in the x direction and y direction respectively.

[0076] Secondly, calculate the gradient direction angle of each pixel point based on the arctangent function, and quantize the calculation result into discrete values with an accuracy of 1°. The gradient direction angle θ is calculated by the formula θ = arctan(Gy / Gx), and then θ is rounded to the nearest integer angle value.

[0077] Finally, divide the gradient direction angle into several direction groups at 10° intervals, and count the percentage of the number of pixels in each direction group in the total number of edge pixels. For example, 360° can be divided into 36 direction groups, and each direction group covers an angular range of 10°. For each direction group, calculate the number of pixels falling into this group, and divide by the total number of edge pixels to get the percentage.

[0078] Through the above technical solutions, the present application can effectively extract the direction features of cracks in the image and represent the distribution of different directions in a quantitative manner. This method can capture the main trend and branching of cracks, providing an important basis for subsequent crack identification and analysis. By constructing a gradient direction distribution matrix in the time dimension, the change of crack features at different time points can be compared, which helps to identify real cracks and exclude false positive results caused by light changes.

[0079] In some of the above solutions of the present application, traditional methods rely on single-time natural light scanning, resulting in the lack of accurate modeling of the variance calculation of the gradient direction distribution matrix for multi-time period dynamic changes, and unable to effectively distinguish the direction distribution differences between real cracks and instantaneous shadow or dirty moss areas in multiple scans.

[0080] As Figure 8 shown, it is a process diagram for calculating the total variance parameter; the present application further proposes to calculate the variance value of the proportion of the number of pixels in each direction group group by group, and the accumulated total variance parameter includes: In the optical image dataset of multiple scans, for each gradient direction group, obtain the proportion data of the number of pixels respectively, calculate the average value of multiple proportions and calculate the variance value based on this average value, and finally accumulate the variance values of each direction group to generate the technical solution of the total variance parameter.

[0081] Among them, the gradient direction distribution matrix is divided into at least six direction groups, and the proportion data of the number of pixels in each direction group is collected through three or more scan results. The variance value of the direction group is calculated using the unbiased variance formula in statistics. The specific expression is that the variance value is equal to the sum of the squares of the differences between the proportions of each scan and the average value divided by the number of scans minus one. The total variance parameter is obtained by linearly superimposing the variance values of all direction groups, ensuring that the change characteristics of different direction groups are fully quantified.

[0082] Specifically, after obtaining the gradient direction distribution data of three scans, the proportion of the pixel quantity corresponding to each three scans in each direction group at 10° intervals is extracted respectively. For example, for the 30°-40° direction group, the proportions in the three scans are 18%, 22%, and 20% respectively. The average value is calculated as 20%, and the variance value is [(18 - 20)² + (22 - 20)² + (20 - 20)²] / (3 - 1) = 4. Similarly, the variance values of all direction groups are calculated item by item and superimposed to form the total variance parameter. This calculation method strengthens the judgment of the direction distribution consistency of multi-time period data by eliminating the random error of a single scan. When the gradient direction distribution in the true crack area remains stable under different lighting conditions, its total variance parameter is significantly lower than that of the instantaneous shadow or stain area, thereby improving the discrimination accuracy of the crack verification module.

[0083] As a preferred embodiment, the solution of the present application is specifically implemented as follows: for the gradient direction distribution matrix generated for each candidate area in the candidate area set, first divide the direction groups at 10° intervals, and each group contains six scans at different time periods. Perform data extraction operations on each direction group, and obtain the proportion data of the pixel quantity of the direction group from the six scan results respectively. Establish a two-dimensional array to store the proportion values of each group of scans, and calculate the average proportion of the six scan data of the direction group by the arithmetic average method. Based on the average value, calculate the sample variance using the unbiased estimation formula. The variance value of each direction group is obtained by dividing the sum of the squared differences between the six scan data and the average value by the degrees of freedom. Finally, the variance values of the six direction groups are algebraically superimposed to generate the total variance parameter characterizing the stability of the direction distribution.

[0084] Through the above technical solution, the present application effectively overcomes the misjudgment problem caused by the instantaneous shadow and reflection interference on the bridge surface. By calculating the variance superposition of multi-time period scan data, the stability characteristics of the gradient direction distribution in the crack area can be quantified, so that the true crack still maintains the consistency of the gradient distribution when the solar incident angle changes, while the stain area has fluctuations in the direction distribution due to light sensitivity, thereby improving the accuracy and anti-interference ability of crack detection.

[0085] In some of the above solutions of the present application, when calculating the total variance parameter through the gradient direction distribution matrix, if the variance is calculated only based on the single scan data, the variance parameter may be unstable due to the instantaneous change of light or image noise, affecting the accuracy of crack determination.

[0086] As Figure 9 shown, it is the flowchart of the material deterioration early warning; the present application further proposes to further include: In continuous multiple inspection tasks, perform trend analysis on the total variance parameter of the same crack area; When it is detected that the growth rate of the total variance parameter exceeds a preset growth threshold, it is determined that material deterioration occurs in the crack area, and a material deterioration warning signal is generated.

[0087] Among them, the total variance parameter in consecutive multiple inspection tasks is obtained by periodically collecting the gradient direction distribution matrix of the same crack area and repeating the calculation; the preset growth threshold is set according to the variance parameter change law before material deterioration in historical data; trend analysis uses linear regression or moving window statistical methods to calculate the change rate of the variance parameter over time.

[0088] Specifically, in each inspection task, for the determined real crack area, its total variance parameter is recorded and stored in the historical database; by comparing the current total variance parameter with the parameter values of past several inspection tasks, its change trend curve is fitted. If the curve slope exceeds the preset growth threshold, it indicates that the gradient direction distribution of the crack area expands non-uniformly over time, and it is inferred that the internal structure of the material deteriorates. For example, when using the linear regression method, the growth threshold is set to 0.15 / time. When the average growth rate of the total variance parameter reaches 0.2 / time in three consecutive inspections, a warning signal is triggered. Thus, by dynamically monitoring the change trend of the variance parameter, potential safety hazards of bridge materials can be identified in advance, providing a quantitative basis for maintenance decisions.

[0089] As a preferred embodiment, the solution of the present application is specifically implemented as follows: In three consecutive quarterly inspection tasks of the bridge, the total variance parameter of the crack area numbered B-12 is recorded in time series, and the trend growth rate is calculated using the moving average method. Specifically, the total variance parameter obtained in the first inspection is 0.024, the second is 0.031, and the third is 0.041. Through linear regression analysis, it is found that the quarterly growth rate of this crack area reaches 19.7%, exceeding the preset quarterly growth threshold of 15%. At this time, the system automatically triggers a material deterioration warning signal, and marks this crack area as a red warning state in the 3D bridge model. After the warning signal is generated, it triggers the maintenance work order generation mechanism, and forcibly requires a special inspection to be carried out before the next regular inspection.

[0090] Through the above technical solution, the present application effectively solves the problem that traditional crack detection methods cannot dynamically monitor the degradation of material performance. By continuously tracking the optical feature stability parameter of the crack area, the phenomenon of chaotic gradient direction at the crack edge caused by the decrease in material strength can be identified in time. This technical solution realizes the early warning of material deterioration in bridge structure health monitoring, avoids structural safety hazards caused by the accelerated expansion of cracks, and at the same time reduces the probability of misjudging the image feature changes caused by material aging as environmental interference.

[0091] In some of the above solutions of the present application, traditional methods rely on artificial light sources or single - time natural light scanning, resulting in the overlap of the gray - scale features of bridge surface stains and real cracks under similar lighting conditions, with a relatively high misjudgment rate. The acquired images in a single time period are difficult to distinguish real cracks from instantaneous shadows, and the fixed consistency threshold cannot adapt to the dynamic changes in ambient light intensity, leading to a decline in the accuracy of crack detection.

[0092] As Figure 10 shown, the present application further proposes a UAV vision target tracking system, including a flight control module, a candidate region generation module, a gradient modeling module, a variance calculation module, a crack verification module, and a feedback calibration module.

[0093] The flight control module is used to obtain an optical image data set of the target bridge area within at least three preset time periods, and the difference in the solar incident angle between adjacent time periods is not less than 30°.

[0094] The candidate region generation module extracts continuous edge regions through edge detection and merges them to form a set of candidate regions.

[0095] The gradient modeling module calculates the gradient direction angles of each candidate region and constructs a gradient direction distribution matrix, which contains more than six direction groups and the proportion of the number of pixels in each group.

[0096] The variance calculation module calculates the variance values of the proportion of the number of pixels in each direction group group by group and accumulates them to obtain the total variance parameter.

[0097] The crack verification module determines real cracks based on the comparison result between the total variance parameter and the consistency threshold.

[0098] The feedback calibration module records the historical variance parameters, calculates the moving average value. When the deviation of the latest detection result exceeds the preset feedback threshold, it dynamically adjusts the consistency threshold through the formula: new threshold = original threshold × (1 + deviation rate × weight coefficient), and the deviation rate is calculated from the difference between the moving average value and the latest variance parameter.

[0099] Specifically, the flight control module ensures the coverage of image data under different solar incident angle conditions by planning scanning tasks for multiple time periods. The candidate region generation module uses morphological closing operations to connect broken edges and reduce the interference of short edges. The gradient modeling module quantifies the gradient direction angle through the Sobel operator, divides the direction groups at 10° intervals, and statistically analyzes the pixel proportion of each group. The variance calculation module accumulates the variances of multiple scanning results to reflect the stability of the gradient direction distribution. The crack verification module excludes stain interference by comparing the variance parameter with a threshold, and the feedback calibration module dynamically optimizes the threshold based on the moving average of historical data. For example, when the sudden change in ambient light intensity causes the latest variance parameter to deviate from the historical trend, the system automatically adjusts the threshold to avoid misjudgment caused by light fluctuations. By continuously updating the variance parameter sample library, the system can adapt to the long-term deterioration process of the bridge surface material and improve the robustness of crack detection.

[0100] As a preferred embodiment, the solution of the present application is specifically implemented as follows: The flight control module is configured to control the drone to perform directional scanning on the bridge surface under three different solar incident angle conditions, with a difference of 35° in the solar incident angle between adjacent scanning time periods. The scanning data includes grayscale images and corresponding GPS three-dimensional coordinates. The candidate region generation module processes the single-scan image using the Canny edge detection algorithm, extracts continuous edges with a length exceeding 50 pixels, connects the broken edges through morphological closing operations, and combines the results of multiple scans to generate a candidate region set. The gradient modeling module calculates the gradient components of each pixel in the candidate region through the Sobel operator, quantifies the gradient direction angle to 1° accuracy, divides it into direction groups at 10° intervals, statistically analyzes the pixel proportion of each group, and constructs a distribution matrix in the time dimension. The variance calculation module calculates the variance of the pixel proportion in the three scanning data for each direction group, and accumulates the variance values of the six direction groups to generate a total variance parameter. The crack verification module compares the total variance parameter with a dynamically adjusted consistency threshold. If it is lower than the threshold, it is determined as a real crack. The feedback calibration module records the variance parameters of real cracks in historical detections, calculates their 30-day moving average, and when the deviation of the latest detection value exceeds 10%, adjusts the consistency threshold based on the product of the deviation rate and the preset weight coefficient.

[0101] Through the above technical solution, the present application effectively overcomes the problem of feature confusion between bridge surface stains and cracks under dynamic light conditions. Through the variance analysis of the multi-time period gradient direction distribution matrix, the stable edge features of cracks and the random gradient features of stains changing with light are significantly distinguished, reducing the misjudgment rate. The threshold dynamic adjustment mechanism based on the moving average further improves the system's adaptability to ambient light fluctuations and material deterioration, ensuring the stability of detection accuracy under complex working conditions.

[0102] The technical scope of the present invention is not limited to the content described above. Those skilled in the art can make various deformations and modifications to the above embodiments without departing from the technical idea of the present invention, and these deformations and modifications should all fall within the protection scope of the present invention.

Claims

1. A method for visual target tracking of an unmanned aerial vehicle, characterized in that: It includes the following steps: Obtain an optical image dataset containing gray values of the target bridge area scanned by the drone within a preset time period; at least three groups of the preset time periods are set, and the difference in the solar incident angle between adjacent preset time periods is not less than 30°; Perform edge detection processing on the optical image dataset, extract continuous edge regions with lengths exceeding a preset threshold as candidate regions, and merge the extraction results to form a candidate region set; For each candidate region in the candidate region set, calculate the gradient direction angles of each pixel point in the optical image dataset of each scan respectively, and construct a gradient direction distribution matrix corresponding to the time dimension; the gradient direction distribution matrix includes at least six direction groups and the proportion of the number of pixels in each group; Compare the gradient direction distribution matrices obtained from each scan, calculate the variance value of the proportion of the number of pixels in each direction group group by group, and accumulate to obtain a total variance parameter; When the total variance parameter is less than a preset consistency threshold, determine that the candidate region is a real crack; Record the total variance parameter values of the regions determined to be real cracks in the historical detection tasks to form a variance parameter sample library; Calculate the moving average value of the variance parameters in the variance parameter sample library. When the deviation between the variance parameter of the latest detection task and the moving average value exceeds a preset feedback threshold, adjust the preset consistency threshold, and the adjustment formula is: New threshold = original threshold × (1 + deviation rate × configurable weight coefficient); where the deviation rate is: (moving average value - latest variance parameter) / moving average value.

2. The method for visual target tracking of an unmanned aerial vehicle according to claim 1, wherein: The adjustment of the preset consistency threshold further includes: Synchronously collect the current ambient light intensity data and calculate the light intensity change rate of multiple scanning periods; When the light intensity change rate exceeds a preset light intensity fluctuation threshold, freeze the threshold adjustment process and enable a set of backup consistency thresholds; The set of backup consistency thresholds includes multiple groups of preset consistency thresholds bound to different light intensity intervals.

3. A method for visual target tracking of an unmanned aerial vehicle according to claim 1, characterized in that: After determining that the candidate region is a real crack, it further includes: Extract the direction group with the largest proportion in the gradient direction distribution matrix as the main gradient direction; In subsequent inspection tasks, preferentially scan adjacent regions extending along the main gradient direction, and adjust the scanning range to 1.2 - 1.4 times the length of the original region; where the determination condition for the extension along the main gradient direction is: the difference in the gradient direction angles of at least two consecutive pixel points detected in the adjacent region and the main gradient direction is less than 5°.

4. A method for visual target tracking of an unmanned aerial vehicle according to claim 3, characterized in that: The preferential scanning of adjacent regions extending along the main gradient direction includes: Real - time monitor the detection results of new cracks in the regions extending along the main gradient direction; When the included angle between the main gradient direction of the newly detected crack and the original crack exceeds a preset angle tolerance, adjust the angular interval of the direction group division to half of the original, and generate a refined gradient direction distribution matrix with the number of direction groups being twice the current number; 5. A method for visual target tracking of an unmanned aerial vehicle according to claim 1, characterized in that: The drone's performing directional scanning of the target bridge area within a preset time period includes: Record the three - dimensional space coordinates at the first scan through a GPS positioning device to generate reference positioning data including height values and planar coordinates; Based on the reference positioning data, plan the flight path during subsequent scans so that the spatial coordinate deviation of the drone during each scan is less than the preset positioning tolerance.

6. The method for visual target tracking of an unmanned aerial vehicle according to claim 1, wherein: The generation process of the candidate region set is as follows: Perform Canny edge detection on the optical image data set of a single scan to generate an initial edge set; Perform morphological closing operation on the broken edges with a length less than 20 cm in the initial edge set to connect them and form a corrected edge set; Perform a logical OR operation on the corrected edge sets of multiple scans to generate the candidate region set.

7. A method for visual target tracking of an unmanned aerial vehicle according to claim 1, characterized in that: The construction of the gradient direction distribution matrix corresponding to the time dimension includes: Use the Sobel operator to calculate the gradient components of the pixel points in the horizontal and vertical directions; Calculate the gradient direction angle of each pixel point based on the arctangent function, and quantize the calculation result into discrete values with an accuracy of 1°; Divide the gradient direction angles into several direction groups at 10° intervals, and count the percentage of the number of pixels in each direction group in the total number of edge pixels.

8. A method for visual target tracking of an unmanned aerial vehicle according to claim 1, characterized in that: The step of calculating the variance value of the proportion of the number of pixels in each direction group group by group and accumulating to obtain the total variance parameter includes: For each direction group, respectively obtain the proportion of the number of pixels in multiple scans; Calculate the average value of the proportion of the number of pixels in multiple scans, and calculate the variance value of each direction group based on the average value; Sum the variance values of each direction to obtain the total variance parameter.

9. A method for visual target tracking of an unmanned aerial vehicle according to claim 1, characterized in that: It also includes: During consecutive multiple inspection tasks, perform trend analysis on the total variance parameter of the same crack area; When it is detected that the growth rate of the total variance parameter exceeds the preset growth threshold, it is determined that the material deterioration has occurred in the crack area, and a material deterioration warning signal is generated.

10. A drone vision target tracking system, characterized in that: Applying a drone vision target tracking method as described in any one of claims 1 to 9, including: A flight control module for obtaining an optical image data set containing gray values obtained by the drone performing directional scans on a target bridge area within a preset time period; at least three groups are set for the preset time period, and the difference in the solar incidence angle between adjacent preset time periods is not less than 30°; A candidate region generation module for performing edge detection processing on the optical image data set, extracting continuous edge regions with a length exceeding a preset threshold as candidate regions, and merging the extraction results to form a candidate region set; A gradient modeling module for calculating the gradient direction angle of each pixel point in the optical image data set of each scan for each candidate region in the candidate region set, and constructing a gradient direction distribution matrix corresponding to the time dimension; the gradient direction distribution matrix includes at least six direction groups and the proportion of the number of pixels in each group; A variance calculation module for comparing the gradient direction distribution matrices obtained from each scan, calculating the variance value of the proportion of the number of pixels in each direction group group by group, and accumulating to obtain the total variance parameter; A crack verification module for determining that the candidate region is a real crack when the total variance parameter is less than the preset consistency threshold; A feedback calibration module for performing the following actions: Record the total variance parameter values of the regions determined to be real crack regions in historical detection tasks to form a variance parameter sample library; Calculate the moving average of the variance parameters in the variance parameter sample library. When the deviation between the variance parameter of the latest detection task and the moving average exceeds the preset feedback threshold, adjust the preset consistency threshold. The adjustment formula is: New threshold = Original threshold × (1 + Deviation rate × Configurable weight coefficient); where the deviation rate is: (Moving average - Latest variance parameter) / Moving average.

Citation Information

Patent Citations

  • Bridge bottom surface crack detection method based on unmanned aerial vehicle vision

    CN109521019A

  • Novel bridge inspection method

    CN117853403A

  • Concrete building outer wall detection method and system, computer equipment and storage medium

    CN119360219A

  • Reservoir bank slope crack identification method based on unmanned aerial vehicle inspection and digital image

    CN119477904A

  • Power transmission line inspection method based on image processing

    CN119625321A

Cited By

  • Fabricated pipe gallery splicing construction intelligent monitoring method and system based on Internet of Things

    CN120700939A

  • Iot-based assembly type pipe gallery splicing construction intelligent monitoring method and system

    CN120700939B

  • AI learning system and method for reducing AVI machine false points

    CN121214179A

  • An ai learning system and method for reducing false positives of an avi machine

    CN121214179B

  • Method and system for identifying external envelope structure crack of super high-rise building

    CN121259528A