A dam crack extraction method and system based on unmanned aerial vehicle image

CN122799367APending Publication Date: 2026-09-22ANHUI PROVINCIAL EMERGENCY MANAGEMENT RES INST (ANHUI PROVINCIAL HAZARDOUS CHEM REGISTRATION CENT ANHUI PROVINCIAL SAFETY ACCIDENT INVESTIGATION & ANALYSIS TECH CENT) +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611249544.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-18
Publication Date
2026-09-22

AI Technical Summary

Technical Problem

[0005]本申请提供一种基于无人机影像的堤坝裂缝提取方法及系统,旨在解决基于无人机影像进行堤坝裂缝识别时,巡检影像差异较大、细小弱特征裂缝识别准确性和完整性不足、复杂堤面环境易造成识别干扰以及识别结果难以满足工程应用需求的技术问题

Benefits of technology

[0019]本申请实施例提供一种基于无人机影像的堤坝裂缝提取方法及系统,该方法通过根据无人机巡检影像的影像分辨特征、预设裂缝识别尺度及堤坝目标识别区域的场景复杂度,对堤坝目标识别区域进行自适应重叠切分,使不同巡检条件下的裂缝能够在待识别影像单元中保持适宜的图像表达;通过对待识别影像单元进行裂缝结构增强处理并利用裂缝识别模型获得局部裂缝候选结果,增强细小、断续及弱特征裂缝与堤面背景之间的可区分性;通过将局部裂缝候选结果映射至统一影像坐标系,对重叠区域的识别结果进行融合,并依据裂缝结构连续关系合并属于同一裂缝的局部结果,减少裂缝重复、错位及断裂现象;再通过堤坝场景约束信息对候选裂缝对象进行误检抑制,降低复杂堤面环境中相似干扰目标造成的误检,最后对目标裂缝对象进行工程属性量测和堤段空间定位,从而提高堤坝裂缝提取结果的准确性、完整性和工程可用性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122799367A_ABST
    Figure CN122799367A_ABST
Patent Text Reader

Abstract

The application provides a dam crack extraction method and system based on unmanned aerial vehicle images, and relates to the technical field of unmanned aerial vehicle image processing. The method comprises the following steps: acquiring unmanned aerial vehicle inspection images and associated inspection information, and determining a dam target recognition area; performing adaptive overlapping segmentation according to image resolution characteristics, a preset crack recognition scale and scene complexity; performing crack structure enhancement and model recognition on the to-be-recognized image unit to obtain a local crack candidate result; mapping the local crack candidate result to a unified image coordinate system, and performing overlapping area fusion and crack object merging; performing false detection suppression based on dam scene constraint information, and performing engineering attribute measurement and dam section spatial positioning on the target crack object. Through the method provided by the application, the image expression of small and weak feature cracks can be enhanced, false detection caused by crack breaking, repeated recognition and complex dam surface interference can be reduced, and the accuracy, completeness and engineering usability of the crack extraction result can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of UAV image processing technology, and in particular to a method and system for extracting dam cracks based on UAV images. Background Technology

[0002] Dikes are an important component of water conservancy engineering systems, serving functions such as water retention, flood control, and ensuring the safety of areas along their course. During long-term operation, dikes are affected by various factors including water level changes, rainfall erosion, temperature variations, foundation settlement, and external loads, which can lead to varying degrees of cracks appearing on their surfaces. The formation and development of these cracks can impact the structural stability and operational safety of the dike; therefore, daily inspections are necessary to promptly monitor the location, morphology, and development of cracks. Traditional dike inspections primarily rely on manual on-site observation, and their efficiency and coverage are easily limited by factors such as dike length, terrain conditions, weather conditions, and personnel accessibility. With the development of drones and image processing technology, the use of drones to acquire dike images and automatically identify cracks within those images is increasingly being applied to dike safety inspections.

[0003] Existing methods for identifying dam cracks typically involve image processing of dam images captured by drones, followed by image feature analysis or machine learning models to identify suspected crack areas. However, the clarity and target representation of drone images are easily affected by factors such as flight altitude, shooting angle, lighting conditions, dam surface material, and the surrounding environment, resulting in significant differences in crack images obtained under different inspection conditions. Furthermore, dam cracks are often characterized by narrow width, elongated shape, irregular edges, local discontinuity, and low contrast with the surrounding area. Additionally, the dam surface may contain vegetation, shadows, watermarks, soil textures, and slope protection structures that resemble cracks, leading to missed detections, false detections, or discontinuous identification results. Moreover, existing identification results often fail to fully reflect the actual morphology and engineering location information of cracks, hindering subsequent crack verification, hazard recording, and dam safety status analysis. These issues make it difficult for existing technologies to simultaneously meet the accuracy, completeness, and engineering application requirements of crack identification in complex inspection environments.

[0004] Therefore, in the identification of dam cracks based on UAV imagery, the large differences in inspection images, the insufficient accuracy and completeness in identifying small and weak cracks, the easy interference caused by complex dam surface environments, and the difficulty in meeting the requirements of engineering applications have become urgent problems to be solved. Summary of the Invention

[0005] This application provides a method and system for extracting dam cracks based on UAV imagery, aiming to solve the technical problems of large differences in inspection images, insufficient accuracy and completeness in identifying small and weak cracks, easy interference caused by complex dam surface environment, and difficulty in meeting the requirements of engineering applications when identifying dam cracks based on UAV imagery.

[0006] In a first aspect, this application provides a method for extracting dam cracks based on UAV imagery, the method comprising: Acquire drone inspection images and related inspection information of the dam area to be inspected; Based on the associated inspection information, the target identification area of ​​the dam is determined in the UAV inspection image; Based on the image resolution features of the UAV inspection images, the preset crack recognition scale, and the scene complexity of the dam target recognition area, the dam target recognition area is adaptively overlapped and segmented to obtain multiple image units to be recognized. Each of the image units to be identified is subjected to crack structure enhancement processing to obtain the corresponding enhanced recognition data; The enhanced recognition data is processed using a crack recognition model to obtain local crack candidate results corresponding to each of the image units to be identified; The candidate results of each local crack are mapped to a unified image coordinate system. The candidate results of local cracks with spatial correspondence in the overlapping area are fused to obtain the crack fusion result. Based on the crack fusion result and the crack structure continuity relationship between each candidate result of local cracks, the candidate results of local cracks belonging to the same crack are merged into a candidate crack object. Based on the constraint information of the dam scene, the candidate crack objects are subjected to false detection suppression processing to obtain the target crack object; The target crack object is subjected to crack engineering attribute measurement and embankment segment spatial positioning to obtain the embankment crack extraction results.

[0007] In one possible design, the associated inspection information includes the spatial location, attitude parameters, camera parameters, and embankment chainage corresponding to the UAV inspection image; The step of determining the target identification area of ​​the dam in the UAV inspection image based on the associated inspection information includes: Based on the spatial location, the attitude parameters, and the camera parameters, determine the mapping relationship between the UAV inspection image and the dam spatial reference system; Based on the mapping relationship, the preset dam boundary information is mapped to the UAV inspection image to obtain the dam boundary range in the UAV inspection image. The preset dam boundary information includes at least one of the following: dam axis buffer zone, dam top line, slope toe line, slope protection boundary, and geographic information vector boundary. The target identification area of ​​the dam is determined based on the boundary range of the dam and the image coverage of the UAV inspection image, and a correspondence is established between the target identification area of ​​the dam and the dam segment station number.

[0008] In one possible design, the image resolution features include the ground resolution of the UAV inspection image, and the preset crack identification scale is used to characterize the minimum physical width of the crack to be identified. Based on the image resolution features of the UAV inspection images, the preset crack identification scale, and the scene complexity of the dam target identification area, the dam target identification area is adaptively overlapped and segmented to obtain multiple image units to be identified, including: Based on the preset crack identification scale and the ground resolution, the crack pixel characterization value of the crack to be identified in the UAV inspection image is determined; The image unit scale of the image unit to be identified is determined based on the crack pixel characterization value, the ground resolution, and the input scale of the crack identification model. The overlap rate between adjacent image units to be identified is determined based on the crack pixel characterization value and the scene complexity. The target recognition region of the dam is segmented according to the image unit scale and the overlap rate to obtain the plurality of image units to be recognized.

[0009] In one possible design, the scene complexity includes the complexity of the dam surface texture and the degree of lighting interference in the dam target recognition area; The step of determining the overlap rate between adjacent image units to be identified based on the crack pixel characterization value and the scene complexity includes: The texture complexity of the embankment surface is determined based on the texture distribution in the target recognition area of ​​the embankment. The degree of light interference is determined based on the light distribution in the target identification area of ​​the dam. Based on the crack pixel characterization value, the embankment texture complexity, and the degree of illumination interference, the preset basic overlap rate is adjusted to obtain the candidate overlap rate; The candidate overlap rate is limited to a preset overlap rate range to obtain the overlap rate between adjacent image units to be identified.

[0010] In one possible design, the step of performing crack structure enhancement processing on each of the image units to be identified to obtain corresponding enhanced identification data includes: Extract crack structure response information from the image unit to be identified to characterize at least one of linear structure, edge structure, local contrast and directional texture; Based on the crack structure response information, crack morphology enhancement information corresponding to the image unit to be identified is generated; The enhanced crack morphology information is combined with the image unit to be identified to obtain the enhanced identification data.

[0011] In one possible design, the local crack candidate results include crack candidate probability information, crack candidate mask, and identification confidence information; The process of mapping each of the local crack candidate results to a unified image coordinate system, fusing local crack candidate results with spatial correspondence within overlapping areas to obtain a crack fusion result, and merging local crack candidate results belonging to the same crack into a candidate crack object based on the crack fusion result and the crack structure continuity relationship between each of the local crack candidate results, includes: The fusion weight of each local crack candidate result is determined based on at least two of the following: the identification confidence information of each local crack candidate result, the positional relationship of candidate pixels in the overlapping area relative to the center of the corresponding image unit to be identified, the overlap relationship between crack candidate masks, and the continuity of crack structure and the consistency of crack boundary. The crack candidate probability information within the overlapping region is fused according to the fusion weight to obtain the crack fusion result; Based on the crack fusion result, and the mask overlap relationship, endpoint proximity relationship and extension direction relationship between different local crack candidate results, it is determined whether different local crack candidate results meet the preset object merging condition, and the local crack candidate results that meet the preset object merging condition are merged into the candidate crack object.

[0012] In one possible design, the dam scene constraint information includes target area location constraints, crack morphology constraints, local texture constraints, and scene interference area constraints. The process of performing false detection suppression on the candidate crack objects based on dam scene constraint information to obtain the target crack object includes: Determine the crack morphology characterization information of the candidate crack object, and the positional relationship between the candidate crack object and the dam target identification area; Determine the texture similarity relationship between the local texture of the candidate crack object and the preset interference texture, as well as the spatial overlap relationship between the candidate crack object and the predetermined scene interference region; Based on the crack morphology characterization information, the positional relationship, the texture similarity relationship, and the spatial overlap relationship, the false detection suppression evaluation result of the candidate crack object is determined; Based on the false detection suppression evaluation results, the candidate crack objects are retained, the object confidence of the candidate crack objects is reduced, or the candidate crack objects are removed to obtain the target crack object.

[0013] In one possible design, the associated inspection information includes the embankment section station number, and the crack engineering attributes include crack length, crack width, crack area, crack direction, and crack penetration degree. The process of measuring the engineering attributes of the target crack object and spatially locating the embankment segment to obtain the embankment crack extraction results includes: The target crack object is subjected to connectivity structure analysis and centerline extraction to obtain the crack centerline, crack endpoints and crack boundaries of the target crack object; Based on the crack centerline, crack endpoints, crack boundaries, and the scale transformation relationship corresponding to the UAV inspection image, the crack length, crack width, crack area, and crack orientation of the target crack object are determined. Based on the positional relationship between the crack centerline and the preset dam boundary information, the crack penetration degree of the target crack object is determined; Based on the embankment segment station number, a mapping relationship is established between the target crack object and the corresponding embankment segment station number to obtain the embankment segment spatial location of the target crack object, and the embankment crack extraction result is generated according to the crack engineering attributes and the embankment segment spatial location.

[0014] In one possible design, the method further includes: Acquire multiple UAV inspection images corresponding to the same embankment section, and map the UAV inspection images of each period and the corresponding embankment crack extraction results to a unified embankment spatial reference system; Based on the spatial positional relationship and crack morphology correspondence between target crack objects in different inspection periods, target crack objects in different inspection periods are matched to obtain a time-series crack object group corresponding to the same crack. Based on the crack engineering attributes of each target crack object in the time-series crack object group, determine the attribute change information and crack propagation direction of the corresponding crack; A correlation analysis region is determined around the cracks corresponding to the time-series crack object group, and image displacement matching is performed on the correlation analysis region at different inspection periods to obtain the slope displacement characteristics of the correlation analysis region. Based on the attribute change information, the spatial proximity between the crack location corresponding to the temporal crack object group and the area corresponding to the slope displacement feature, and the directional consistency between the crack propagation direction and the main displacement direction in the slope displacement feature, the crack development state of the corresponding crack is determined.

[0015] Secondly, this application provides a dam crack extraction system based on UAV imagery, the system comprising: The image acquisition module is used to acquire drone inspection images and related inspection information of the dam area to be inspected; The target area determination module is used to determine the target identification area of ​​the dam in the UAV inspection image based on the associated inspection information. An adaptive segmentation module is used to adaptively overlap and segment the target recognition area of ​​the dam based on the image resolution features of the UAV inspection image, the preset crack recognition scale, and the scene complexity of the target recognition area of ​​the dam, to obtain multiple image units to be recognized. The structural enhancement module is used to perform crack structure enhancement processing on each of the image units to be identified, so as to obtain the corresponding enhanced recognition data. The crack recognition module is used to process the enhanced recognition data using a crack recognition model to obtain local crack candidate results corresponding to each of the image units to be recognized. The fusion and merging module is used to map each of the local crack candidate results to a unified image coordinate system, fuse local crack candidate results with spatial correspondence in the overlapping area to obtain crack fusion results, and merge local crack candidate results belonging to the same crack into a candidate crack object based on the crack fusion results and the crack structure continuity relationship between each of the local crack candidate results. The false detection suppression module is used to perform false detection suppression processing on the candidate crack objects based on the dam scene constraint information to obtain the target crack object; The measurement and positioning module is used to measure the engineering attributes of the cracks and locate the spatial position of the embankment segment on the target crack object, so as to obtain the crack extraction results of the embankment.

[0016] Thirdly, this application provides an electronic device, including: a memory and at least one processor; The memory stores computer-executed instructions; The at least one processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the method described in the first aspect or various possible designs of the first aspect.

[0017] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed, implement the method described in the first aspect or various possible designs of the first aspect.

[0018] Fifthly, this application provides a computer program product, which includes computer program code that, when run on a computer, causes the computer to implement the method described in the first aspect or various possible designs of the first aspect.

[0019] This application provides a method and system for extracting dam cracks based on UAV imagery. The method adaptively overlaps and segments the dam target recognition area according to the image resolution features of the UAV inspection images, a preset crack recognition scale, and the scene complexity of the dam target recognition area. This ensures that cracks under different inspection conditions maintain appropriate image representation within the image units to be identified. The method enhances the crack structure of the image units to be identified and obtains local crack candidate results using a crack recognition model, improving the distinguishability between small, discontinuous, and weakly featured cracks and the dam background. By mapping the local crack candidate results to a unified image coordinate system, the recognition results of overlapping areas are fused, and local results belonging to the same crack are merged based on the continuity of the crack structure, reducing crack duplication, misalignment, and breakage. Furthermore, false detections of candidate crack objects are suppressed using dam scene constraint information, reducing false detections caused by similar interfering targets in complex dam environments. Finally, engineering attribute measurements and spatial positioning of dam segments are performed on the target crack objects, thereby improving the accuracy, completeness, and engineering usability of the dam crack extraction results. Attached Figure Description

[0020] Figure 1 A flowchart illustrating a method for extracting dam cracks based on UAV imagery, provided in an embodiment of this application; Figure 2 A flowchart illustrating another method for extracting dam cracks based on UAV imagery provided in this application embodiment; Figure 3 This is a flowchart illustrating another method for extracting dam cracks based on UAV imagery, provided in an embodiment of this application. Detailed Implementation

[0021] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0022] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein in the specification of the application is for the purpose of describing particular embodiments only and is not intended to limit the application; the terms “comprising” and “having”, and any variations thereof, in the specification, claims and drawings of this application are intended to cover non-exclusive inclusion.

[0023] The term "embodiment" as used herein means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of the phrase "embodiment" in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0024] In this article, the term "and / or" simply describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists, A and B can exist simultaneously, and B exists. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.

[0025] Furthermore, the terms "first," "second," etc., in the specification and claims of this application or in the aforementioned drawings are used to distinguish different objects rather than to describe a specific order, and may explicitly or implicitly include one or more of the features.

[0026] In the description of this application, unless otherwise stated, "multiple" and "at least two" mean two or more (including two), and similarly, "multiple groups" and "at least two groups" mean two or more (including two groups).

[0027] In the description of this application, it should be noted that, unless otherwise explicitly specified and limited, the terms "connected" and "linked" should be interpreted broadly. For example, "connected" or "linked" can refer not only to a physical connection, but also to an electrical connection or a signal connection. For instance, it can be a direct connection, i.e., a physical connection, or an indirect connection through at least one intermediate component, as long as the circuit is connected. It can also refer to the internal connection between two components. A signal connection can refer not only to a signal connection through a circuit, but also to a signal connection through a medium, such as radio waves. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.

[0028] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. It should be noted that, unless otherwise specified, different technical features in this application can be combined with each other.

[0029] Cracks, partial collapses, slope deformation, and the entry of personnel or vehicles during the flood season can all affect the operational safety of dams. Traditional dam inspections are mainly conducted by inspectors through on-site observation, manual recording, and fixed-point measurements. However, in areas with high water levels, heavy rainfall, dense vegetation cover, or inaccessible areas, manual inspections have limitations in terms of inspection range, efficiency, and information continuity. With the development of drone aerial photography and high-resolution imaging technology, drone inspection images are increasingly being used for recording the surface condition of dams and identifying abnormal targets.

[0030] Existing methods for identifying dam cracks based on UAV imagery typically include processing steps such as UAV image acquisition, image correction, image enhancement, image segmentation, and model recognition. Crack recognition models can employ Mask Region-based Convolutional Neural Networks (Mask R-CNN), U-Net, image segmentation models based on the "You Only Look Once" (YOLO) framework, or SegFormer (Simple and EfficientDesign for Semantic Segmentation with Transformers). For large UAV inspection images, the image can generally be divided into multiple image blocks, with crack detection or segmentation performed on each block separately. The recognition results are then reconstructed based on the position of each block in the original image. The recognition results are typically represented as crack detection boxes, crack segmentation masks, crack probability maps, or pixel classification results.

[0031] In other dam image analysis tasks, Particle ImageVelocimetry (PIV) or Large-Scale Particle ImageVelocimetry (LSPIV) can be used to analyze surface displacement between images from different time periods. Background subtraction methods can be used to identify changing regions in the images, YOLO-based target detection models can be used to identify personnel and vehicles, and image processing techniques such as connected component analysis, centerline extraction, or skeleton extraction can be used to obtain geometric information of crack targets. These techniques can be applied to the identification and analysis of cracks, deformations, collapses, or intrusion targets.

[0032] However, drone inspection images are easily affected by factors such as flight altitude, shooting angle, imaging resolution, lighting conditions, embankment materials, vegetation cover, and environmental shadows. The pixel width, grayscale contrast, and structural integrity of the same crack may vary in different inspection images. Furthermore, image content such as grass cracks, watermarks, shadow edges, bare soil textures, and slope protection structure joints may also exhibit visual features similar to cracks. Therefore, when using conventional image segmentation and general recognition models for processing, the recognition results may suffer from missed detections, false detections, partial interruptions, duplication, or boundary deviations. In addition, existing recognition results are usually represented by image coordinates or pixel results. When used for embankment inspection and management, it is necessary to further organize the data by combining embankment section location and image scale information to form crack location and attribute information that is easy for engineers to view and use.

[0033] To address the aforementioned issues, this application provides a method and system for extracting dam cracks based on UAV imagery. This method uses UAV inspection images and associated inspection information as a foundation. First, it determines the target recognition region corresponding to the dam structure. Then, it integrates image resolution features, a preset crack recognition scale, and the scene complexity of the dam target recognition region to adaptively overlap and segment the target recognition region, ensuring that cracks can obtain pixel representations suitable for model recognition under different imaging conditions. Furthermore, by enhancing the crack structure information in the image units to be identified, the distinguishability between small, low-contrast, and locally discontinuous cracks and background textures is improved. A crack recognition model is then used to obtain local recognition results for each image unit. Subsequently, the local recognition results are restored to a unified image coordinate system. Through overlapping region result fusion and crack structure continuity correlation, the scattered local results are integrated into a relatively complete crack object. Combined with dam scene constraints, false detections caused by similar targets such as vegetation, shadows, watermarks, and structural joints are suppressed. Finally, the identified crack object is converted into a dam crack extraction result containing crack engineering attributes and the spatial location of the dam section, thus forming a complete processing flow from image recognition to engineering inspection results.

[0034] Figure 1 This is a schematic flowchart illustrating a method for extracting dam cracks based on UAV imagery, provided as an embodiment of this application. Figure 1 As shown, the method includes S101 to S108, and S101 to S108 are described in detail below.

[0035] It should be noted that the method provided in this application can be executed by an electronic device with image processing and data computing capabilities. The electronic device can be a server, a cloud computing platform, an edge computing device, a UAV ground station, an inspection management terminal, or a system comprising at least two of the above. The electronic device can communicate with UAV image acquisition equipment, a Geographic Information System (GIS), and a dam inspection management platform to receive UAV inspection images and associated inspection information, and process, store, and output the received data.

[0036] S101. Obtain drone inspection images and related inspection information of the dam area to be inspected.

[0037] In this embodiment, the drone can be controlled to fly along the dam axis, dam crest road, water-facing slope, back slope, or revetment area of ​​the dam to be inspected, and images of the dam surface can be acquired using visible light imaging equipment mounted on the drone. The drone inspection images can be high-resolution images directly acquired by the drone, at least one frame from a series of images, or orthophotos formed by stitching and orthorectifying multiple images acquired by the drone. Electronic devices can acquire drone inspection images from the drone, drone ground station, image storage device, or inspection management platform.

[0038] The associated inspection information refers to information related to the acquisition process, imaging status, and inspection location of the UAV inspection images. This associated inspection information may include at least one of the following: acquisition time, spatial location, flight altitude, attitude parameters, camera parameters, ground resolution, embankment segment chainage, and image number. Specifically, spatial location may include the longitude, latitude, and altitude at which the UAV acquired the image; attitude parameters may include heading angle, pitch angle, and roll angle; camera parameters may include intrinsic and extrinsic camera parameters; and the image number is used to establish the correspondence between the UAV inspection images and the associated inspection information.

[0039] In one optional implementation, after obtaining the original image, at least one of the following processing methods can be applied: distortion correction, orthorectification, brightness equalization, contrast-limited adaptive histogram equalization, high-pass filtering, low-pass filtering, Wiener denoising, contrast stretching, and background suppression, to reduce the impact of lens distortion, UAV attitude changes, local illumination differences, and imaging noise on subsequent crack identification. The images obtained after the above processing are still collectively referred to as UAV inspection images.

[0040] S102. Based on the associated inspection information, determine the target identification area of ​​the dam in the UAV inspection image.

[0041] In this embodiment, a mapping relationship between the image coordinates of the UAV inspection image and the dam spatial reference system can be established based on the spatial location, attitude parameters and camera parameters corresponding to the UAV inspection image. Based on this mapping relationship, the pre-obtained dam boundary information can be converted into the UAV inspection image, thereby determining the image range that needs to be identified for cracks.

[0042] The dam boundary information can originate from dam design data, surveying data, geographic information systems, inspection flight route information, or manual annotation results, and may include at least one of the following: dam axis buffer zone, dam crest line, slope toe line, slope protection boundary, inspection flight route coverage area, geographic information vector boundary, and preset area masking. Based on the spatial correspondence between the dam boundary information and the coverage area of ​​the UAV inspection imagery, the dam target identification area can be determined.

[0043] The dam target identification region is used to define the effective processing range for subsequent crack identification. For example, areas such as water surfaces, buildings near the dam, the outer side of roads, farmland, woodlands, and areas not effectively covered by drone inspection routes can be excluded from the dam target identification region, thereby reducing the impact of linear textures in non-dam areas on subsequent identification results. The dam target identification region can also be associated with the corresponding dam segment station number, providing a spatial reference for the false detection suppression of subsequent candidate crack objects and the spatial positioning of dam segments.

[0044] S103. Based on the image resolution features of UAV inspection images, the preset crack recognition scale, and the scene complexity of the dam target recognition area, adaptive overlapping segmentation is performed on the dam target recognition area to obtain multiple image units to be recognized.

[0045] In this embodiment, image resolution features are used to characterize the correspondence between pixels in the UAV inspection image and the actual physical dimensions of the ground, such as the ground resolution of the UAV inspection image. A preset crack recognition scale is used to characterize the physical scale of cracks that the engineering inspection requires to be identified, such as the minimum physical width of the crack to be identified. Scene complexity is used to characterize the degree to which the surface texture and lighting interference in the dam target recognition area affect crack recognition.

[0046] Electronic devices can determine the pixel representation level of a crack in a drone inspection image based on image resolution features and a preset crack recognition scale. Combined with the input scale that the crack recognition model can receive, the device can determine the image unit scale of the image unit to be identified. Simultaneously, the overlap rate between adjacent image units to be identified can be determined based on the pixel representation level of the crack and the scene complexity of the dam target recognition area.

[0047] When the pixel representation of the crack to be identified is weak, the embankment texture is complex, or the lighting interference is significant, the overlap range between adjacent image units to be identified can be increased to reduce the probability that the crack is located at the edge of the image unit and is truncated. When the pixel representation of the crack is sufficient and the embankment scene is relatively simple, the overlap range can be appropriately reduced to reduce redundant calculations. After segmenting the embankment target identification area according to the determined image unit scale and overlap rate, multiple image units to be identified with overlapping areas are obtained.

[0048] Each image unit to be identified can record its corresponding image unit number, starting coordinates in the UAV inspection image, image unit scale, adjacent overlapping range, and source image number, so as to restore the subsequently obtained local crack candidate results to the UAV inspection image.

[0049] S104. Perform crack structure enhancement processing on each image unit to be identified to obtain the corresponding enhanced recognition data.

[0050] In this embodiment, considering the characteristics of dam cracks—long, narrow, locally discontinuous, with variable orientation, and low contrast with the surrounding dam surface—response information that characterizes the crack structure is extracted from each image unit to be identified. The response information can be used to characterize at least one of linear structure, edge structure, local contrast, and directional texture.

[0051] Electronic devices can normalize or combine the obtained crack structure response information to generate crack morphology enhancement information, and then combine this enhancement information with the corresponding image unit to be identified. For example, the crack morphology enhancement information can be set as an additional data channel, which, together with the original color channel or grayscale channel of the image unit to be identified, forms enhanced recognition data. This allows the enhanced recognition data to retain both the original image information of the dam surface and the enhancement information that has a prominent effect on the slender crack structure.

[0052] The above processing can improve the distinguishability of weak texture cracks, low contrast cracks, and locally discontinuous cracks in enhanced recognition data.

[0053] S105. The enhanced recognition data is processed using the crack recognition model to obtain the local crack candidate results corresponding to each image unit to be identified.

[0054] In this embodiment, the enhanced recognition data corresponding to each image unit to be identified can first be adjusted to the input scale of the crack recognition model, and numerical normalization processing can be performed on different data channels. For enhanced recognition data whose size is smaller than the input scale of the crack recognition model, edge filling can be performed; for enhanced recognition data whose size is inconsistent with the model input scale, scaling or partitioning input can be performed, while saving the corresponding scale conversion information.

[0055] Crack recognition models can be instance segmentation models, semantic segmentation models, or joint models of object detection and mask generation that can output crack pixel probabilities, crack segmentation regions, or crack target locations. For example, crack recognition models can employ Mask R-CNN, U-Net, DeepLab semantic segmentation networks, YOLO-based segmentation models, or Transformer-based semantic segmentation models. These models are merely optional implementations and do not constitute a limitation on the type of crack recognition model.

[0056] Before deploying the crack recognition model, training images containing dam cracks and the dam surface background can be acquired, and the crack regions in the training images can be annotated at the pixel level or object level. Subsequently, enhanced recognition data for training can be generated using the same processing method as the image units to be recognized. This enhanced recognition data, along with the corresponding crack annotations, is then used to train the crack recognition model, enabling it to learn the feature differences between the crack structure and the dam surface background. After training, validation images can be used to verify and adjust the model parameters.

[0057] After processing the enhanced recognition data, the crack recognition model can output candidate probability information for each pixel belonging to a crack, and form a crack candidate mask, boundary information, and recognition confidence information based on the candidate probability information. The local crack candidate results can include at least one of the above information, and are associated with and stored with the corresponding image unit number to be identified, source image number, image unit coordinates, and scale transformation information for subsequent coordinate mapping and fusion processing.

[0058] S106. Map each local crack candidate result to a unified image coordinate system, fuse the local crack candidate results with spatial correspondence in the overlapping area to obtain crack fusion results, and based on the crack fusion results and the crack structure continuity relationship between each local crack candidate result, merge the local crack candidate results belonging to the same crack into a candidate crack object.

[0059] In this embodiment, based on the starting coordinates, image unit scale, and scale transformation information of each image unit to be identified in the UAV inspection image, the candidate results of each local crack are transformed from the local coordinates of the corresponding image unit to a unified image coordinate system. The unified image coordinate system can be the UAV inspection image coordinate system, the orthophoto image coordinate system, or other unified coordinate system corresponding to the dam area to be inspected.

[0060] For overlapping regions formed by adjacent image units to be identified, the same crack may correspond to multiple local crack candidate results. The electronic device can fuse candidate probability information, candidate mask, or boundary information within the overlapping region based on the recognition quality of each local crack candidate result, its position in the image unit to be identified, and the spatial correspondence between different local crack candidate results, in order to reduce the result deviation caused by the instability of image unit edge prediction and obtain the crack fusion result.

[0061] After obtaining the crack fusion results, the spatial overlap, endpoint proximity, extension direction, and structural continuity between different local crack candidate results can be further analyzed. For local crack candidate results that correspond to each other spatially and have a continuous relationship in the crack extension structure, they can be identified as belonging to the same crack and merged into a candidate crack object with a unified object identifier. Thus, object-level association can be achieved on the basis of pixel-level result fusion, reducing the situation where the same crack is repeatedly output in different image units to be identified, local boundary misalignment, or overall structural interruption.

[0062] S107. Based on the constraint information of the dam scene, perform false detection suppression processing on the candidate crack objects to obtain the target crack object.

[0063] In this embodiment, the dam scene constraint information is constraint information established based on the dam structure distribution, crack morphology characteristics and common interference targets on the dam surface, and may include at least one of target area location constraints, crack morphology constraints, local texture constraints and scene interference area constraints.

[0064] Electronic devices can determine the shape, location, and local texture of candidate crack objects, and determine whether the candidate crack objects are located within the dam target recognition area, and whether there is overlap between the candidate crack objects and scene interference areas such as vegetation, water surface, shadows, grass cracks, watermarks, road edges, bare soil textures, or slope block cracks. Candidate crack objects that conform to crack characteristics in shape, are located within the dam target recognition area, and have a low degree of overlap with scene interference areas can be retained; candidate crack objects that are similar to typical interference targets or highly overlap with scene interference areas can have their crack confidence reduced or be eliminated.

[0065] After false detection suppression, the candidate crack objects retained are identified as the target crack objects. Therefore, dam scene information can be incorporated into the crack recognition model output to reduce the misidentification of grass cracks, shadows, watermarks, slope protection block cracks, and other linear dam surface textures as cracks.

[0066] S108. Measure the engineering attributes of the cracks and locate the spatial position of the embankment segment on the target crack object to obtain the crack extraction results of the embankment.

[0067] In this embodiment, connectivity analysis and centerline extraction can be performed on the crack mask corresponding to the target crack object to obtain the crack centerline, crack endpoints, and crack boundaries of the target crack object. Subsequently, based on the pixel geometry information of the target crack object and the scale transformation relationship corresponding to the UAV inspection image, the pixel measurement results in the image coordinate system are converted into crack engineering attributes in the actual engineering scale.

[0068] Crack engineering attributes can include at least one of the following: crack length, crack width, crack area, crack direction, and crack penetration degree. Specifically, crack length can be determined based on the extension path of the crack centerline; crack width can be determined based on the distance between the crack centerline and the crack boundary; crack area can be determined based on the number of pixels contained in the crack mask and the scale transformation relationship; crack direction can be determined based on the extension direction of the crack centerline or crack endpoints; and crack penetration degree can be determined based on the positional relationship between the crack centerline and the top line, toe line, slope protection boundary, or the boundary of the target identification area of ​​the dam.

[0069] Furthermore, based on the associated inspection information, the target crack object can be transformed from a unified image coordinate system to the dam spatial reference system, and the corresponding dam segment station number and spatial location can be determined. The final dam crack extraction results can include the target crack object's object identifier, crack mask, crack centerline, crack endpoint, crack engineering attributes, spatial coordinates, dam segment station number, and crack confidence level. These results can be output in the form of image overlay maps, crack vector data, attribute data tables, or inspection reports for inspection personnel to conduct on-site verification, establish a hazard log, and carry out subsequent handling.

[0070] In this embodiment, the target recognition area of ​​the embankment is determined based on the associated inspection information. Adaptive overlapping segmentation is performed by integrating the image resolution features of the UAV inspection images, the preset crack recognition scale, and the scene complexity. This ensures that cracks under different inspection conditions maintain pixel representation suitable for model recognition in the image units to be identified. Local crack candidate results are obtained through crack structure enhancement processing and crack recognition model, enhancing the distinguishability between small, weak texture, and locally discontinuous cracks and the embankment background. By unifying coordinate mapping, overlapping area fusion, and crack object merging, repeated crack recognition, boundary misalignment, and structural interruption are reduced. Furthermore, embankment scene constraint information is used to suppress similar interference targets in complex embankment environments, and the recognition results are converted into crack engineering attributes and embankment segment spatial locations. This improves the accuracy, completeness, and engineering usability of the embankment crack extraction results, solving the problems of large differences in UAV inspection images, insufficient accuracy and completeness in identifying small and weak feature cracks, easy recognition interference caused by complex embankment environments, and recognition results that are difficult to meet the needs of engineering applications.

[0071] In one possible embodiment, the method steps shown in S102 are implemented by S1021 to S1025, which are described in detail below.

[0072] S1021. Obtain the spatial location, attitude parameters, camera parameters, and embankment chainage number corresponding to the UAV inspection images from the associated inspection information.

[0073] In this embodiment, the spatial location may include the longitude, latitude, and flight altitude of the UAV when acquiring UAV inspection images, or the planar coordinates and elevation obtained after coordinate transformation; the attitude parameters may include the heading angle, pitch angle, and roll angle of the UAV or imaging device when acquiring images; the camera parameters may include intrinsic camera parameters such as focal length, principal point position, pixel size, and lens distortion parameters, as well as extrinsic camera parameters such as the camera's installation position and installation attitude relative to the UAV body; the embankment segment station number is used to characterize the engineering location of the image coverage area along the length of the embankment.

[0074] Electronic devices can associate spatial location, attitude parameters, camera parameters, and embankment chainage with corresponding UAV inspection images based on image ID or acquisition timestamp. For UAV inspection images lacking certain parameters, the corresponding parameters can be supplemented based on the associated inspection information of adjacent images, inspection flight path data, or orthophoto results.

[0075] S1022. Based on the spatial location, attitude parameters, and camera parameters, determine the mapping relationship between the UAV inspection images and the dam spatial reference system.

[0076] In this embodiment, the dam spatial reference system can be a plane coordinate system, a geographic coordinate system, or a local engineering coordinate system corresponding to the dam axis and dam segment stationings used in the dam project. The electronic device can determine the position of the imaging device in the dam spatial reference system based on its spatial location, determine the imaging device's shooting direction based on its attitude parameters, and establish a correspondence between image pixels and spatial rays based on camera parameters, thereby obtaining the mapping relationship between pixel positions in the UAV inspection image and spatial positions in the dam spatial reference system.

[0077] When the UAV inspection imagery is orthophoto, the georeferenced information carried by the orthophoto can be read to directly establish the conversion relationship between the image coordinates and the dam's spatial reference system. When the UAV inspection imagery is a single raw aerial image, the initial mapping relationship can be corrected by combining terrain elevation data, ground control points, or known dam feature points to reduce positional deviations caused by changes in UAV attitude, terrain undulations, or lens distortion.

[0078] S1023. Based on the mapping relationship, the preset dam boundary information is mapped to the UAV inspection image to obtain the dam boundary range in the UAV inspection image.

[0079] In this embodiment, the preset embankment boundary information can be pre-stored in the embankment inspection management platform, geographic information system, or engineering database, or it can be obtained based on embankment design data, surveying data, historical inspection results, or manual annotation results. The preset embankment boundary information includes at least one of the following: embankment axis buffer zone, embankment top line, slope toe line, slope protection boundary, and geographic information vector boundary.

[0080] Electronic devices can convert spatial coordinates in the preset dam boundary information into image coordinates in the UAV inspection imagery based on mapping relationships, and form corresponding linear or planar boundaries according to the connection relationships between these image coordinates. Specifically, the dam axis buffer zone can be formed based on the dam axis and a preset buffer distance; the dam crest line and slope toe line can be used to define the dam crest and slope areas; the slope protection boundary can be used to define the area where the slope protection structure is located; and the geographic information vector boundary can be used to define the pre-delineated dam inspection space. Thus, the dam boundary range in the UAV inspection imagery is obtained.

[0081] S1024. Determine the target identification area of ​​the dam based on the boundary range of the dam and the image coverage of the UAV inspection images.

[0082] In this embodiment, the image coverage area is the actual ground space area included in the UAV inspection image, which can be determined based on the coordinates of the four corner points, the outer boundary, or the effective imaging area of ​​the UAV inspection image. The electronic device can perform spatial intersection between the dam boundary area and the image coverage area, and determine the overlapping area as the candidate recognition area.

[0083] When the boundary of a dam includes multiple types of boundary information, the candidate identification area can be cropped based on the inclusion, overlap, or combination relationships between these types of boundary information. For example, the union of the dam axis buffer zone and the slope protection boundary can be limited to the area enclosed by the dam crest line and the slope toe line. Areas within the candidate identification area that include water surfaces, buildings, roadsides, farmland, woodland, or areas without valid image data can be excluded using preset area masking, with the remaining area determined as the dam target identification area. By limiting the dam target identification area, interference from non-dam areas on subsequent crack identification can be reduced.

[0084] S1025. Establish the correspondence between the target identification area of ​​the embankment and the station number of the embankment section.

[0085] In this embodiment, the target recognition area of ​​the embankment can be transformed from image coordinates to the embankment spatial reference system, and the projected position of the target recognition area of ​​the embankment along the length of the embankment axis can be determined. The electronic device can convert the projected position into the corresponding embankment segment station number according to the pre-established conversion relationship between the spatial coordinates of the embankment axis and the embankment segment station number.

[0086] Specifically, multiple reference points with known spatial coordinates and embankment segment station numbers can be set along the embankment axis. The station numbers corresponding to the target identification area of ​​the embankment can be interpolated based on the embankment axis length between adjacent reference points. For a target identification area covering multiple embankment segment station numbers, its starting station number, ending station number, and covered station number interval can be recorded. Furthermore, the target identification area can be divided into multiple target identification sub-regions according to the embankment segment station numbers. The established correspondence can be stored together with the regional identifier of the target identification area for subsequent use in the spatial positioning of target crack objects within the embankment segment.

[0087] In this embodiment, the spatial location, attitude parameters, and camera parameters corresponding to the UAV inspection images are used to establish a mapping relationship between image coordinates and the dam spatial reference system. Based on this, the dam axis buffer zone, dam top line, slope toe line, slope protection boundary, or geographic information vector boundary are mapped to the UAV inspection images, thereby accurately defining the dam target identification area in combination with the actual image coverage. Furthermore, a correspondence between the dam target identification area and the dam segment station number is established, so that subsequent crack identification is carried out within the actual dam space, and a unified spatial benchmark is provided for the association between crack engineering attributes and engineering location. This can reduce identification interference caused by non-inspection areas and improve the spatial positioning accuracy and engineering usability of dam crack extraction results.

[0088] In one possible embodiment, the method steps shown in S103 are implemented by S1031 to S1034, which are described in detail below.

[0089] S1031. Determine the crack pixel characterization value of the crack to be identified in the UAV inspection image based on the preset crack identification scale and ground resolution.

[0090] In this embodiment, the image resolution features include the ground resolution of the UAV inspection image, which characterizes the physical size of a single pixel in the UAV inspection image on the actual ground. The ground resolution can be obtained from image metadata recorded when the UAV acquires the image, georeferenced information of the orthophoto, or image processing parameters, or it can be calculated based on flight altitude, camera focal length, image sensor parameters, and image pixel size.

[0091] The preset crack identification scale is used to characterize the minimum physical width of cracks that need to be identified during dam inspection. It can be preset according to dam type, dam surface material, inspection specifications, historical hazard data, or inspection task requirements. Different preset crack identification scales can be set for different dam sections or different inspection tasks.

[0092] The electronic device can calculate the ratio between the preset crack identification scale and the ground resolution to obtain the crack pixel characterization value.

[0093] In one implementation, the crack pixel characterization value can be determined according to the formula. Determined; among them, This represents the pixel characterization value of the crack. This indicates the preset crack identification scale. This indicates the ground resolution of the drone inspection images. and Using the same physical unit of length, thus The number of pixels in the UAV inspection image that represents the minimum physical width of the crack to be identified.

[0094] The smaller the crack pixel representation value, the weaker the pixel representation of the crack to be identified in the UAV inspection image, and the more likely the crack details will be lost during image scaling, segmentation, or model processing. Conversely, the larger the crack pixel representation value, the more sufficient the pixel representation of the crack to be identified. Therefore, the crack pixel representation value can be used as a basis for determining the scale of subsequent image units and the overlap rate between adjacent image units to be identified.

[0095] S1032. Determine the image unit scale of the image unit to be identified based on the crack pixel characterization value, ground resolution, and input scale of the crack identification model.

[0096] In this embodiment, the input scale of the crack recognition model is used to characterize the number of pixels in the corresponding direction of the input image that the crack recognition model can receive. The input scale can be determined according to the network structure of the crack recognition model and the size of the input image used during model training. The electronic device can determine the pixel representation degree of the crack to be identified in the UAV inspection image based on the crack pixel representation value, and determine the candidate physical scale of the image unit to be identified based on the input scale of the crack recognition model, the ground resolution, and the preset effective pixel utilization coefficient.

[0097] In one implementation, the candidate physical scale of the image unit to be identified can be determined according to the formula... Determined; among them, This represents the candidate physical side length corresponding to the image unit to be identified. Indicates the effective pixel utilization factor. This represents the number of input pixels for the crack detection model in the corresponding direction. This indicates the preset lower limit of the physical side length. This indicates the preset upper limit of the physical side length. This means that the calculated value is limited to a preset range consisting of a preset lower limit for the physical side length and a preset upper limit for the physical side length.

[0098] Specifically, when Less than the preset lower limit of physical side length At that time, the lower limit of the preset physical side length will be set. Determined as a candidate physical side length; when Greater than the preset physical side length limit At that time, the upper limit of the physical side length will be preset. Determined as a candidate physical side length; when When within the preset range, The candidate physical side length is determined. By setting a preset lower limit and a preset upper limit for the physical side length, it is possible to avoid the physical range corresponding to the image unit to be identified being too small, resulting in an excessive number of image units to be identified, and also to avoid the physical range being too large, resulting in excessive compression of small cracks at the model input scale.

[0099] The effective pixel utilization factor is used to reserve edge regions within the input range of the crack recognition model, or to prevent the crack to be identified from being adjacent to the input boundary of the crack recognition model. The value of the effective pixel utilization factor can be preset according to the network structure of the crack recognition model, the model training data, and the crack recognition accuracy requirements.

[0100] After determining the candidate physical side length, it can be converted into the corresponding candidate pixel side length based on the ground resolution, and then verified against the crack pixel characterization value. When the crack pixel characterization value indicates that the pixel representation of the crack to be identified is insufficient, the candidate physical side length can be reduced within a preset range so that the image unit to be identified, after being adjusted to the input scale of the crack identification model, still has pixel representation that meets the identification requirements. When the crack pixel characterization value indicates that the crack to be identified has sufficient pixel representation, the candidate physical side length can be directly determined as the image unit scale.

[0101] The image unit scale can be represented using the actual physical scale or the pixel scale converted from the ground resolution. For UAV inspection images with different ground resolutions at different locations, the corresponding image unit scale can be determined according to the ground resolution of each local area, so that the cracks to be identified in different local areas maintain a relatively stable pixel representation when inputting into the crack identification model.

[0102] S1033. Determine the overlap rate between adjacent image units to be identified based on the crack pixel characterization value and scene complexity.

[0103] In this embodiment, scene complexity is used to characterize the degree to which dam surface texture, lighting changes, and other environmental factors interfere with crack recognition in the dam target recognition area. Scene complexity can be determined for the entire dam target recognition area, or it can be determined separately for different local areas within the dam target recognition area.

[0104] Electronic devices can pre-set a basic overlap rate and adjust it based on crack pixel representation values ​​and scene complexity. When crack pixel representation values ​​are low, it indicates that the pixel representation of the crack to be identified is weak. In this case, the overlap rate can be increased so that cracks located at the edge of a certain image unit to be identified can obtain a more complete image representation in adjacent image units. When scene complexity is high, the overlap rate can be increased so that the same crack or suspected crack can be repeatedly identified in multiple image units to be identified, providing redundant identification information for subsequent overlapping area fusion and crack object merging.

[0105] When the crack pixel representation value is large and the scene complexity is low, a basic overlap rate or an appropriately reduced overlap rate can be used to reduce the amount of data repeatedly input into the crack recognition model. The adjusted candidate overlap rate can also be limited to a preset overlap rate range to avoid the crack being truncated at the image unit boundary due to an excessively small overlap rate, or the overlap rate being too large, which would significantly increase the amount of repeated computation.

[0106] The overlap rate can be applied uniformly to all image units to be identified, or it can be dynamically determined based on the crack pixel representation values ​​and scene complexity of different local regions. For example, a lower overlap rate can be used for regions with simple textures and uniform illumination; a higher overlap rate can be used for regions with complex textures, obvious shadows, or cracks with a minimum physical width corresponding to only a few pixels.

[0107] S1034. The target recognition area of ​​the dam is segmented according to the image unit scale and overlap rate to obtain multiple image units to be recognized.

[0108] In this embodiment, the electronic device can establish a sliding segmentation window in the dam target recognition area according to the image unit scale, and determine the movement step size between adjacent sliding segmentation windows according to the overlap rate. When the image unit scale is represented by the pixel scale, the movement step size in any segmentation direction can be determined by the product of the image unit scale in that direction and a factor minus the overlap rate; when the image unit scale is represented by the physical scale, the physical scale can be converted into the pixel scale according to the ground resolution before the segmentation process is performed.

[0109] The electronic device can start from a preset starting position in the target recognition area of ​​the embankment, and move a sliding segmentation window in a direction that is horizontal, vertical, or adapted to the embankment axis according to the movement step size, and capture image data within the coverage area of ​​the window to obtain multiple image units to be identified. Adjacent image units to be identified have overlapping areas formed according to the overlap rate.

[0110] For the edge location of the dam target recognition area, when the remaining image range is smaller than the image unit scale, the last sliding segmentation window can be moved to the boundary position of the dam target recognition area to ensure it overlaps with the previous image unit to be recognized; alternatively, edge filling can be performed on the insufficient part to ensure that the boundary area is completely covered. Edge filling can be performed using zero-value filling, mirror filling, neighboring pixel filling, or background value filling, and the filled area can be marked with corresponding invalid area markers to prevent the filled content from being identified as cracks.

[0111] For each image unit to be identified, the image unit number, source image number, starting coordinates in the unified image coordinate system, image unit scale, overlap range, corresponding dam target identification area, and scale transformation information can be recorded simultaneously. This information is used to accurately map each local crack candidate result to the unified image coordinate system after the crack identification model outputs local crack candidate results.

[0112] In one example, the ground resolution of the UAV inspection image is 1.5 cm / pixel, and the preset crack recognition scale is 3 cm, so the crack pixel representation value is 2. When the input scale of the crack recognition model is 1280 pixels and the effective pixel utilization coefficient is 0.8, the calculated candidate physical side length is 15.36 meters. If the preset scale range is 10 meters to 30 meters, then 15.36 meters can be determined as the image unit scale. When the embankment texture is complex and there is local shadow interference, the overlap rate between adjacent image units to be identified can be adjusted to 35%, and the embankment target recognition area can be segmented according to this image unit scale and overlap rate.

[0113] In this embodiment, the minimum physical width of the crack to be identified is correlated with the ground resolution of the UAV inspection image to obtain a crack pixel characterization value that reflects the degree of pixel expression of the crack to be identified. The image unit scale of the image unit to be identified is determined in combination with the input scale of the crack identification model, so that the crack to be identified under different flight altitudes or different ground resolutions can maintain appropriate pixel expression in the model input data. Furthermore, the overlap rate between adjacent image units to be identified is adjusted according to the crack pixel characterization value and scene complexity, so that areas with weak pixel expression or complex scene interference can obtain more overlapping identification information. This can reduce the risk of loss of fine crack features and boundary truncation caused by fixed scale and fixed overlap rate segmentation, and improve the stability and completeness of crack identification while taking into account computational efficiency.

[0114] In one possible embodiment, the method steps shown in S1033 are implemented by S10331 to S10334, which are described in detail below.

[0115] S10331. Determine the texture complexity of the embankment surface based on the texture distribution in the target recognition area of ​​the embankment.

[0116] In this embodiment, the embankment texture complexity is used to characterize the degree to which the textures of embankment materials, vegetation, slope protection structure joints, bare soil, and other local texture variations in the embankment target recognition area interfere with crack recognition. The electronic device can divide the embankment target recognition area into multiple texture analysis areas, or use a sliding window to traverse the embankment target recognition area and perform statistical analysis on the pixel grayscale, gradient, or texture distribution in each texture analysis area.

[0117] Specifically, the texture complexity characteristics of the corresponding texture analysis region can be determined based on at least one of the following: local gray-level variance, gradient energy, gray-level co-occurrence matrix texture entropy, and local binary pattern statistics. Local gray-level variance characterizes the dispersion of pixel gray levels within the region; a larger local gray-level variance indicates more pronounced changes in brightness on the surface. Gradient energy characterizes the density of edge and texture variations within the region; a larger gradient energy indicates more complex linear or edge structures within the region. Gray-level co-occurrence matrix texture entropy characterizes the randomness of different gray-level combinations; a larger texture entropy indicates more irregular texture distribution. Local binary pattern statistics characterize the micro-texture structure within the local neighborhood.

[0118] When using multiple texture complexity features, each feature can be normalized separately, and then weighted and combined according to preset texture weights to obtain the embankment texture complexity. The embankment texture complexity can be normalized to a value between 0 and 1, where a larger value indicates a more complex embankment texture and more interfering structures similar to crack morphology in the corresponding region. For multiple texture analysis regions, the corresponding embankment texture complexity can be retained separately to support subsequent determination of the overlap rate based on the scene conditions of different regions.

[0119] S10332. Determine the degree of light interference based on the light distribution in the target identification area of ​​the dam.

[0120] In this embodiment, the degree of illumination interference is used to characterize the extent to which shadows, localized darkness, localized brightness, and uneven illumination affect the features of crack images. Due to variations in embankment slope, vegetation cover, slope protection structure cover, and different drone shooting times, shadow edges or significant brightness differences may form in the target recognition area of ​​the embankment. Shadow edges may appear as elongated structures similar to cracks in the image.

[0121] Electronic devices can convert drone inspection images from the original color space to a hue, saturation, and lightness color space, and identify low-brightness areas, areas with abnormal brightness, or shadow areas based on the lightness and saturation components. For example, pixels with lightness below a preset lightness threshold and saturation meeting a preset saturation condition can be identified as shadow candidate pixels, and the degree of illumination interference can be determined based on the proportion of shadow candidate pixels in the corresponding texture analysis area.

[0122] In another implementation, a pre-trained shadow segmentation model can be used to process the target recognition area of ​​the dam to obtain a shadow area mask. The degree of illumination interference can then be determined based on the ratio of the shadow area to the corresponding analysis area. Furthermore, the shadow area proportion can be corrected based on the average brightness, brightness variance, brightness gradient, and the proportion of excessively bright and dark pixels within the area to characterize the degree of local illumination unevenness.

[0123] The degree of illumination interference can be normalized to a value range of 0 to 1, where a larger value indicates a more pronounced shadow coverage, brightness abrupt change, or uneven illumination in the corresponding area. The degree of illumination interference can be determined uniformly for the entire dam target recognition area, or it can be determined separately for texture analysis areas or sliding window areas to accommodate illumination differences at different locations.

[0124] S10333. Based on the crack pixel characterization value, the embankment texture complexity and the degree of illumination interference, the preset basic overlap rate is adjusted to obtain the candidate overlap rate.

[0125] In this embodiment, the preset basic overlap rate is the initial overlap ratio used by adjacent image units to be identified when the crack to be identified has normal pixel representation and the texture interference and illumination interference in the target identification area of ​​the dam are within a preset normal range. The preset basic overlap rate can be preset according to the recognition capability of the crack recognition model, the image unit scale of the image unit to be identified, historical inspection data, and available computing resources.

[0126] Electronic devices can determine the texture complexity correction amount based on the embankment texture complexity, the illumination interference correction amount based on the illumination interference level, and the crack pixel representation correction amount based on the crack pixel characterization value.

[0127] Specifically, the candidate overlap rate can be calculated using the formula... Determined; among them, Indicates the candidate overlap rate. Indicates the preset basic overlap rate. Indicates the complexity of the embankment surface texture. Indicates the degree of light interference. , and These represent the weighting coefficients corresponding to the complexity of the embankment texture, the degree of illumination interference, and the pixel representation value of the crack, respectively. This represents a preset constant to prevent division by zero. This indicates that the larger value between the crack pixel representation value and the preset constant is selected.

[0128] The degree of illumination interference can be determined by the proportion of shadow pixels in the corresponding analysis area. It can represent the proportion of shadow interference; the degree of light interference can also be determined based on at least one of the following: the proportion of shadow coverage, the difference in brightness distribution, and the degree of local light unevenness.

[0129] As the complexity of the embankment texture increases, the texture complexity correction amount also increases to increase the repeated coverage of complex embankment texture areas; as the degree of illumination interference increases, the illumination interference correction amount also increases to increase the repeated recognition information of shadow areas or unevenly illuminated areas; when the crack pixel representation value decreases, The corresponding crack pixel expression correction amount is increased to reduce the probability that small cracks will be truncated or missed because they are located at the edge of the image unit to be identified.

[0130] The weighting coefficients can be predetermined based on historical embankment inspection images, the completeness of crack identification under different overlap rates, the validation results of crack identification models, or human experience. The complexity of embankment texture and the degree of illumination interference can be normalized to the same numerical range so that different correction terms can jointly participate in the determination of candidate overlap rates.

[0131] S10334. Limit the candidate overlap rate to a preset overlap rate range to obtain the overlap rate between adjacent image units to be identified.

[0132] In this embodiment, the preset overlap rate range includes a lower limit and an upper limit. The lower limit ensures that adjacent image units to be identified have a common coverage area that meets the requirement of continuous crack identification, while the upper limit limits the amount of data and computation required for repeated processing.

[0133] Electronic devices can limit the candidate overlap rate to a preset overlap rate range through amplitude limiting processing, thereby obtaining the overlap rate between adjacent image units to be identified. Combined with S10333, the overlap rate can be calculated using the formula... Determined; among them, This indicates the overlap rate between adjacent image units to be identified. This indicates the lower limit of the overlap rate. This indicates the upper limit of the overlap rate. This means that the calculated value is limited to a preset overlap rate range consisting of a lower overlap rate limit and an upper overlap rate limit.

[0134] Specifically, when the candidate overlap rate is less than the lower limit of the overlap rate, the lower limit of the overlap rate is determined as the overlap rate between adjacent image units to be identified; when the candidate overlap rate is greater than the upper limit of the overlap rate, the upper limit of the overlap rate is determined as the overlap rate between adjacent image units to be identified; when the candidate overlap rate is within the preset overlap rate range, the candidate overlap rate is determined as the overlap rate between adjacent image units to be identified.

[0135] Therefore, when the embankment texture is complex, the light interference is obvious, or the crack pixel expression is insufficient, the overlap rate can be increased accordingly, so that the same crack can obtain more repeated coverage information in adjacent image units to be identified, reducing the risk of cracks being truncated when they are located at the boundary of the image unit to be identified; at the same time, the calculation results are constrained by the lower limit and upper limit of the overlap rate to avoid the overlap rate being too low and affecting the integrity of crack identification, or the overlap rate being too high and causing excessive repeated calculations.

[0136] In this embodiment, the texture complexity and illumination interference of the embankment surface are determined based on the texture distribution and illumination distribution in the target recognition area of ​​the embankment. Combined with the crack pixel characterization value that reflects the strength of the crack pixel expression to be identified, the preset basic overlap rate is adaptively adjusted so that areas with complex textures, obvious illumination interference, or insufficient crack pixel expression can obtain a greater overlap rate. Then, the candidate overlap rate is restricted by the preset overlap rate range. While ensuring that the crack boundary area has sufficient repeated coverage information, the amount of repeated calculation is controlled. This can reduce the crack truncation, missed detection, and unstable recognition problems caused by the fixed overlap rate not being able to adapt to different embankment surface scenarios, and provide more sufficient redundant recognition data for the subsequent fusion of local crack candidate results and object merging.

[0137] In one possible embodiment, the method steps shown in S104 are implemented by S1041 to S1043, which are described in detail below.

[0138] S1041. Extract crack structure response information from the image unit to be identified, which is used to characterize at least one of linear structure, edge structure, local contrast and directional texture.

[0139] In this embodiment, crack structure response information is used to highlight the image structure in the image unit to be identified that corresponds to the elongated, discontinuous, weakly textured, and irregularly extended shape of the crack. The electronic device can first perform grayscale conversion, numerical normalization, or local brightness adjustment on the image unit to be identified, and then perform response calculations on at least one of the linear structure, edge structure, local contrast, and directional texture in the image unit to be identified.

[0140] The crack structure response information used to characterize the linear structure can be determined based on the elongated ridge or valley features of the crack relative to the surrounding embankment. For example, the Hessian matrix operator, Frangi filter, Gabor filter, or structure tensor can be used to process the image unit to be identified at one or more scales, and the linear structure response can be obtained based on the feature values, principal curvature, or directional response intensity of each pixel's neighborhood. For cracks of different widths, multiple processing scales can be used to obtain the linear structure response, and the maximum or weighted response can be used as the linear structure characterization of the corresponding pixel.

[0141] The crack structure response information used to characterize the edge structure can be obtained by detecting the grayscale or color changes between the two sides of the crack and the surrounding embankment. For example, the Sobel operator, Canny edge detector, or Laplacian operator can be used to calculate the gradient magnitude, gradient direction, or second-order change information of the image unit to be identified, thus obtaining the edge structure response. To avoid a large number of isolated edges caused by the rough texture of the embankment, small connected regions can be removed, non-maximum suppression can be performed, or directional continuity processing can be applied to the edge structure response.

[0142] The crack structure response information used to characterize local contrast can be determined based on the brightness difference between the central pixel region and its neighboring background region. For example, the difference between the pixel value within a local window and the local mean can be calculated, or top-hat transform and bottom-hat transform can be used to extract local structures that are brighter or darker than the surrounding background. For cracks to be identified that typically appear as dark lines, local structures with lower brightness relative to the surrounding embankment can be extracted; for cracks to be identified that appear as bright lines due to illumination reflection, the corresponding bright line response can also be preserved.

[0143] The crack structure response information used to characterize directional texture can be determined based on the texture energy or grayscale arrangement relationship of the pixel neighborhood in different directions. For example, filter banks in different directions can be used to process the image unit to be identified to obtain the texture response in each preset direction, and the directional texture response can be generated based on the maximum directional response and its corresponding direction; alternatively, a local binary mode can be used to encode the texture structure of the pixel neighborhood to obtain local texture distribution information.

[0144] The electronic device can extract any one of the above-mentioned crack structure response information, or it can extract multiple crack structure response information simultaneously. Each crack structure response information can use the same pixel size as the image unit to be identified, and correspond one-to-one with the pixel position in the image unit to be identified.

[0145] S1042. Based on the crack structure response information, generate crack morphology enhancement information corresponding to the image unit to be identified.

[0146] In this embodiment, the electronic device can normalize the extracted response information of each crack structure separately to convert different response information into the same or comparable numerical range. For example, linear normalization can be performed based on the minimum and maximum response values ​​in each crack structure response information, or normalization can be performed after quantile truncation to reduce the impact of a small number of abnormal response values ​​on the overall data distribution.

[0147] When extracting only one type of crack structure response information, the crack structure response information can be normalized, smoothed, or its response threshold adjusted, and the processing result can be used as crack morphology enhancement information. When extracting multiple types of crack structure response information simultaneously, the crack structure response information can be weighted and combined according to preset weights to generate crack morphology enhancement information.

[0148] In one implementation, the crack morphology enhancement information can be derived from a formula. Determined; among them, This indicates the enhancement information of crack morphology at the pixel location. The response value at the location; Indicates the response of a linear structure; Indicates the response of the edge structure; Indicates local contrast response; Indicates directional texture response; , , and These represent the preset weights of the corresponding crack structure response information.

[0149] The preset weights can be determined in advance based on the dam surface material, typical crack morphology, historical inspection images, or the verification results of the crack identification model for the dam area to be inspected. Each preset weight can be a non-negative number, and each preset weight can be normalized so that the sum of the preset weights is 1. When no response information for a certain type of crack structure is extracted, the preset weight corresponding to that type of crack structure response information can be set to 0.

[0150] In another implementation, multiple crack morphology enhancement information can be generated according to different crack scales or different crack extension directions, and these multiple crack morphology enhancement information can be retained as different data channels. Through the above processing, pixels that match the linear, edge, local grayscale difference, and directional continuity features of the crack to be identified receive a higher response, while pixels in the background that lack crack structural features receive a lower response.

[0151] S1043. Combine the crack morphology enhancement information with the image unit to be identified to obtain enhanced identification data.

[0152] In this embodiment, the image unit to be identified may include a red channel, a green channel, and a blue channel, or a grayscale channel converted from the image unit to be identified. The electronic device may use the crack morphology enhancement information as an additional data channel and combine it with the original image channel of the image unit to be identified according to pixel position to obtain enhanced recognition data.

[0153] For example, when the image unit to be identified is a color image including red, green, and blue channels, and a crack morphology enhancement information is generated, the three original image channels can be combined with the crack morphology enhancement information channel to form four-channel enhanced recognition data. When the linear structure response, edge structure response, local contrast response, and directional texture response are retained respectively, each crack structure response information can also be used as an additional channel to form multi-channel enhanced recognition data together with the image unit to be identified.

[0154] Before combining the data, the crack morphology enhancement information can be adjusted to the same pixel size as the image unit to be identified, and a numerical range and data format adapted to the image unit to be identified can be used. For the image unit to be identified that has been scaled, padded, or cropped, the crack morphology enhancement information should be subjected to the corresponding spatial transformation to ensure that each pixel in the crack morphology enhancement information maintains spatial correspondence with each pixel in the image unit to be identified.

[0155] The enhanced recognition data includes both image information such as the color, brightness, and original texture of the embankment surface in the image unit to be identified, and enhanced information on crack morphology to highlight the crack structure. The subsequent crack recognition model can perform joint feature extraction on different data channels, thereby using the original image information to distinguish the real embankment environment and using the enhanced crack morphology information to perceive small, discontinuous, or low-contrast cracks to be identified. The specific processing method of the enhanced recognition data by the crack recognition model will be described in subsequent embodiments.

[0156] In this embodiment, crack structure response information that can characterize linear structure, edge structure, local contrast, and directional texture is extracted from the image unit to be identified. Crack morphology enhancement information is generated based on the crack structure response information, so that the slender, discontinuous, low-contrast, and irregularly oriented cracks to be identified can obtain a more obvious structural expression in the image data. Furthermore, the crack morphology enhancement information is combined with the image unit to be identified, so that the enhanced identification data retains both the original image features of the embankment and the crack structure features, thereby improving the distinguishability between the cracks to be identified and the complex embankment background, and providing a data foundation for the subsequent crack identification model to obtain more complete and accurate local crack candidate results.

[0157] In one possible embodiment, the method steps shown in S106 are implemented by S1061 to S1064, which are described in detail below.

[0158] S1061. Map each local crack candidate result to a unified image coordinate system.

[0159] In this embodiment, the local crack candidate results include crack candidate probability information, crack candidate mask, and identification confidence information. Specifically, the crack candidate probability information characterizes the probability that each candidate pixel in the image unit to be identified belongs to a crack; the crack candidate mask characterizes the candidate crack region determined based on the crack candidate probability information; and the identification confidence information characterizes the credibility of the crack identification model for the corresponding local crack candidate results. The local crack candidate results may also include at least one of crack boundary information, crack skeleton information, and local crack object identifier.

[0160] The electronic device can read the starting coordinates, image unit scale, scaling ratio, and fill range of each image unit to be identified in the UAV inspection image, and establish the coordinate transformation relationship between the local coordinate system and the unified image coordinate system of the image unit to be identified based on the above information. The unified image coordinate system can be the original image coordinate system of the UAV inspection image, or it can be the orthorectified image coordinate system formed after orthorectification.

[0161] For example, for the i-th image unit to be identified, the candidate pixels, crack candidate masks, and crack boundaries in its local coordinate system can be transformed to the unified image coordinate system based on the starting coordinates of the image unit in the unified image coordinate system. When the image unit to be identified is scaled before being input into the crack recognition model, the local crack candidate results are first restored to the original scale of the corresponding image unit according to the scaling ratio, and then the coordinate transformation is performed; when the image unit to be identified contains filled regions, the prediction results corresponding to the filled regions can be removed according to the invalid region identifier.

[0162] For crack candidate probability information, scale recovery can be achieved using interpolation. For crack candidate masks, a scale transformation method that preserves the class value can be used to avoid generating unexpected class values ​​at the mask boundaries. After mapping, the local crack candidate results generated by different image units to be identified are located under the same coordinate reference. This allows us to determine the overlapping areas of adjacent image units to be identified, as well as the local crack candidate results with spatial correspondence within the overlapping areas.

[0163] S1062. Determine the fusion weight of each local crack candidate result based on at least two of the following: the identification confidence information of each local crack candidate result, the positional relationship of the candidate pixels in the overlapping area relative to the center of the corresponding image unit to be identified, the overlap relationship between crack candidate masks, the continuity of crack structure, and the consistency of crack boundary.

[0164] In this embodiment, for any candidate pixel within the overlapping region, multiple image units to be identified covering the candidate pixel can be determined, and local crack candidate results corresponding to each image unit to be identified can be obtained respectively. The electronic device can determine the corresponding fusion weight based on the identification confidence information and spatial structure information of each local crack candidate result, so that the prediction results with higher identification confidence, closer to the center of the image unit to be identified, and with higher structural consistency with other local crack candidate results have greater weight in the fusion process.

[0165] The positional relationship of candidate pixels relative to the center of the corresponding image unit to be identified can be characterized by the distance between the candidate pixel and the center of the corresponding image unit to be identified. Since the prediction results of the crack recognition model for the edge region of the image unit to be identified may be affected by filling, truncation or insufficient contextual information, candidate pixels that are closer to the center of the image unit to be identified can be assigned a higher center position weight.

[0166] The overlap relationship between crack candidate masks can be characterized by the Intersection over Union (IoU), which is the ratio between the intersection area and the union area of ​​two crack candidate masks located in a unified image coordinate system. The larger the IoU, the more consistent the corresponding local crack candidate results are in terms of spatial location and coverage.

[0167] Crack structure continuity can be determined based on the endpoint distance between crack skeletons corresponding to different local crack candidate results, the extension direction of the skeletons, and the degree of connectivity between adjacent skeletons. When the endpoint distance between two crack skeletons is small and their extension directions are similar, it can be determined that they have high crack structure continuity. Crack boundary consistency can be determined based on the average distance between the boundaries of different crack candidate masks, the degree of boundary overlap, or the matching ratio of corresponding boundary points.

[0168] In one implementation, the fusion weight of the i-th image unit to be identified at candidate pixel p can be determined according to the formula... Determined; among them, This represents the fusion weight of the i-th image unit to be identified at candidate pixel p. This represents the identification confidence information for the corresponding local crack candidate results. This represents the distance between candidate pixel p and the center of the i-th image unit to be identified. This represents the overlap index of the corresponding crack candidate masks. This represents the crack structure continuity index corresponding to the local crack candidate results. This represents the crack boundary consistency index corresponding to the local crack candidate results. This represents the parameter used to control the rate of decay of the center distance weight. , and These represent the weight parameters corresponding to the overlap index, crack structure continuity index, and crack boundary consistency index, respectively.

[0169] Confidence information, overlap index, crack structure continuity index, and crack boundary consistency index can be normalized to the same numerical range before being included in the fusion weight calculation. The above formula is one implementation method for determining fusion weights using multiple pieces of information simultaneously; in other implementation methods, at least two of the following can be selected from confidence information, center position relationship, overlap relationship between crack candidate masks, crack structure continuity, and crack boundary consistency to participate in the fusion weight calculation, and the corresponding weight parameters not involved in the calculation can be set to zero, or the corresponding correction terms can be deleted from the fusion weight expression.

[0170] S1063. Based on the fusion weight, the candidate probability information of cracks in the overlapping area is fused to obtain the crack fusion result.

[0171] In this embodiment, the electronic device can obtain the crack candidate probability information output by each image unit to be identified covering the candidate pixel for each candidate pixel in the overlapping area, and perform weighted fusion according to the fusion weight corresponding to each local crack candidate result.

[0172] In one implementation, the fusion gap probability at candidate pixel p can be calculated using the formula... Determined; among them, This represents the probability of a fusion crack at candidate pixel p. This represents the crack candidate probability information at candidate pixel p after the local crack candidate result corresponding to the i-th image unit to be identified is mapped to the unified image coordinate system. The summation range covers all image units to be identified that are candidate pixel p.

[0173] When a candidate pixel is covered by only one image unit to be identified, the crack candidate probability information of that image unit at the candidate pixel can be directly used as the corresponding fused crack probability. When a candidate pixel is covered by multiple image units to be identified, the local crack candidate results with higher identification confidence, closer to the center of the image unit to be identified, and higher structural consistency have a greater impact on the fused crack probability.

[0174] The electronic device can compare the fusion crack probability with a preset crack probability threshold, identify candidate pixels whose fusion crack probability reaches the preset crack probability threshold as crack pixels, and form a fusion crack mask accordingly. The crack fusion result can include at least one of fusion crack probability, fusion crack mask, fusion crack boundary, and fusion crack skeleton.

[0175] By using the above-mentioned probabilistic fusion, the prediction abruptness caused by directly covering the results of a single local crack candidate or selecting only the maximum recognition confidence information can be reduced, so that the crack candidate probability information of different image units to be identified in the overlapping area can be comprehensively utilized.

[0176] S1064. Based on the crack fusion results and the mask overlap relationship, endpoint proximity relationship and extension direction relationship between different local crack candidate results, determine whether different local crack candidate results meet the preset object merging conditions, and merge the local crack candidate results that meet the preset object merging conditions into candidate crack objects.

[0177] In this embodiment, probabilistic fusion is used to eliminate pixel prediction differences in overlapping regions, but the same actual crack may still be represented as multiple local crack candidate results because it spans multiple image units to be identified. Therefore, the electronic device can also perform object-level merging based on the degree of spatial overlap and crack structure continuity between different local crack candidate results.

[0178] Specifically, the electronic device can perform connectivity structure analysis and skeleton extraction on the crack fusion results and each crack candidate mask to obtain the skeleton endpoints and extension directions corresponding to each local crack candidate result. Subsequently, the mask overlap relationship, endpoint proximity relationship, and extension direction relationship between two local crack candidate results are determined respectively.

[0179] Mask overlap can be determined by the cross-union ratio between two crack candidate masks; endpoint proximity can be determined by the minimum distance between adjacent endpoints of two crack skeletons; extension direction can be determined by the angle between the tangent direction, principal axis direction, or endpoint connection direction of two crack skeletons at adjacent endpoints.

[0180] In one implementation, when the crossover ratio between the crack candidate masks of two local crack candidate results is greater than a preset overlap threshold, the two local crack candidate results are determined to meet the preset object merging condition. Alternatively, when the distance between the crack skeleton endpoints of two local crack candidate results is less than a preset endpoint distance threshold, and the included angle of the corresponding extension directions is less than a preset direction angle threshold, the two local crack candidate results are determined to meet the preset object merging condition.

[0181] The preset endpoint distance threshold can be represented by pixel distance, or it can be calculated based on the preset physical distance and the scale conversion relationship between the UAV inspection images. For example, the actual endpoint distances that can be merged can be converted into corresponding pixel distances based on the ground resolution of the UAV inspection images to accommodate UAV inspection images with different image resolutions.

[0182] For multiple local crack candidate results that meet the preset object merging conditions, an object association set can be established based on their pairwise relationships. Crack candidate masks, crack probabilities, crack boundaries, and crack skeletons in the same object association set can then be merged. During the merging process, overlapping mask regions can be processed by union, and adjacent skeleton endpoints with the same extension direction can be processed by continuous connection. Crack boundaries and crack skeletons can then be redefined based on the merged crack probabilities.

[0183] After merging, a unified crack object identifier is assigned to each merged result, and the corresponding candidate crack mask, crack skeleton, crack endpoint, crack boundary, fused crack probability, and object confidence are recorded to obtain candidate crack objects. Local crack candidate results that do not meet the preset object merging conditions can be retained as different candidate crack objects. The above processing achieves pixel-level probability-weighted fusion and object-level continuous crack merging.

[0184] In this embodiment, local crack candidate results corresponding to different image units to be identified are mapped to a unified image coordinate system. The fusion weight is determined by comprehensively considering the identification confidence information, the positional relationship of candidate pixels relative to the center of the image unit to be identified, the crack candidate mask overlap relationship, the crack structure continuity, and the crack boundary consistency. This allows high-quality and structurally consistent local identification results in the overlapping area to play a greater role in probabilistic fusion. Furthermore, the mask overlap relationship, endpoint proximity relationship, and extension direction relationship are used to merge local crack candidate results belonging to the same actual crack at the object level. This reduces the repeated crack identification, boundary misalignment, and structural interruption caused by simple splicing or maximum identification confidence information coverage, and improves the continuity, integrity, and positional accuracy of candidate crack objects.

[0185] In one possible embodiment, the method steps shown in S107 are implemented by S1071 to S1074, which are described in detail below.

[0186] S1071. Determine the crack morphology representation information of the candidate crack objects, as well as the positional relationship between the candidate crack objects and the dam target identification area.

[0187] In this embodiment, crack morphology characterization information is used to characterize whether candidate crack objects have crack morphology characteristics such as elongated extension, local continuity, and limited width. The electronic device can extract at least one of the following from the candidate crack object: aspect ratio, area, connectivity, skeleton direction, width change rate, and endpoint morphology, based on the corresponding crack candidate mask, crack skeleton, crack boundary, and crack endpoint, to form crack morphology characterization information.

[0188] The aspect ratio can be determined based on the ratio of the dimensions of the circumscribed region of the candidate crack object in the major axis direction to the minor axis direction; the area can be determined based on the number of candidate pixels contained in the crack candidate mask; the connectivity can be determined based on the number of connected regions in the crack candidate mask, the continuity of the crack skeleton, or the number of skeleton breakpoints; the skeleton direction can be determined based on the statistical results of the main axis direction of the crack skeleton, the direction of the connection between the skeleton endpoints, or the direction of each skeleton segment; the width variation rate can be determined based on the degree of variation between the crack widths corresponding to different positions on the crack skeleton; and the endpoint morphology can be determined based on the number of branches, the degree of curvature, and the extension direction of the skeleton near the crack endpoint.

[0189] The electronic device can normalize the above morphological features individually and determine the corresponding crack morphology score based on the degree of conformity between each morphological feature and the preset crack morphology conditions. The higher the crack morphology score, the more the overall morphology of the candidate crack object conforms to the morphological characteristics of the crack to be identified.

[0190] The positional relationship between the candidate crack object and the embankment target identification area can be determined based on their spatial positions in a unified image coordinate system. Specifically, the area proportion of the candidate crack object within the embankment target identification area, the distance between the candidate crack object and the boundary of the embankment target identification area, and the positional relationship between the candidate crack object and the embankment axis buffer zone, embankment top line, slope toe line, or slope protection boundary can be determined.

[0191] When a candidate crack object is entirely located within the target identification area of ​​the dam and within the inspection range defined by the preset dam boundary information, it can be determined that it meets the target area location constraints. When all or most of the candidate crack object is located outside the target identification area of ​​the dam, it can be determined that it does not meet the target area location constraints. The electronic device can determine the target area location score based on the positional relationship. The higher the target area location score, the more the location of the candidate crack object matches the location requirements of the dam crack inspection.

[0192] S1072. Determine the texture similarity relationship between the local texture of the candidate crack object and the preset interference texture, as well as the spatial overlap relationship between the candidate crack object and the preset scene interference area.

[0193] In this embodiment, a local texture analysis region can be set inside and around the crack candidate mask of the candidate crack object, and local texture features can be extracted from the local texture analysis region. The local texture features may include at least one of gray-level co-occurrence matrix features, local binary pattern histogram, and directional texture energy.

[0194] Among them, the gray-level co-occurrence matrix features can include texture contrast, texture entropy, texture energy, and texture homogeneity; the local binary pattern histogram is used to characterize the local gray-level arrangement structure in the pixel neighborhood; and the directional texture energy is used to characterize the texture response intensity of the local texture analysis region in different directions.

[0195] The preset interference textures can be derived from a typical interference sample library, which can store at least one of the following: grass crack texture, slope protection block crack texture, watermark texture, shadow texture, road edge texture, bare soil texture, and vegetation boundary texture. The electronic device can compare the local texture features of the candidate crack object with the texture features corresponding to each preset interference texture in the typical interference sample library, and determine the texture similarity relationship between the two using feature distance, correlation, histogram similarity, or cosine similarity.

[0196] When the local texture of a candidate crack object has a high similarity to any preset interference texture, it indicates that the candidate crack object may originate from the corresponding scene interference target; when the similarity is low, it indicates that the candidate crack object and the preset interference texture have a large difference. Electronic devices can determine a local texture score based on texture similarity relationships. For example, the maximum similarity between the candidate crack object and each preset interference texture can be inversely normalized, so that a higher local texture score indicates a lower degree of similarity between the candidate crack object and the preset interference texture.

[0197] Scene interference regions can include at least one of the following: vegetation regions, water surface regions, shadow regions, grass gaps, water stains, slope protection block gaps, road edge regions, bare soil texture regions, and vegetation boundary regions. Scene interference regions can be pre-determined through preset region masking, color or brightness conditional segmentation, texture recognition, or scene segmentation models, and stored in the form of scene interference region masks.

[0198] Electronic devices can map the candidate crack mask of a candidate crack object to the masks of various scene interference regions onto the same coordinate system, and determine the spatial overlap relationship based on the intersection-union ratio or overlap area ratio between the two. The overlap area ratio can be determined by the ratio between the intersection area of ​​the two masks and the area of ​​the crack candidate mask. A larger overlap area ratio indicates that the candidate crack object is more likely to belong to the corresponding scene interference target.

[0199] Electronic devices can determine scene interference region scores based on spatial overlap relationships. For example, the overlap area ratio can be inversely normalized so that a higher scene interference region score indicates a lower degree of overlap between the candidate crack object and the scene interference region. By analyzing local texture and spatial overlap separately, it is possible to avoid making a single judgment based solely on whether the candidate crack object is located within a certain interference region.

[0200] S1073. Based on crack morphology characterization information, positional relationship, texture similarity relationship and spatial overlap relationship, determine the false detection suppression evaluation result of candidate crack objects.

[0201] In this embodiment, the electronic device can determine the crack morphology score, target area position score, local texture score, and scene interference area score based on crack morphology characterization information, positional relationship, texture similarity relationship, and spatial overlap relationship, and then perform a weighted combination of the above scores to obtain the false detection suppression score of the candidate crack object.

[0202] In one implementation, the false detection suppression score can be calculated using the formula... It is confirmed that, among them, This represents the false detection suppression score for candidate crack objects; This represents the crack morphology score determined based on crack morphology characterization information. This represents the target area location score determined based on the positional relationship between the candidate crack object and the dam target identification area; This represents the local texture score determined based on texture similarity. This indicates the score for the scene interference area determined based on spatial overlap. , , and These represent the weighting coefficients for the corresponding scores.

[0203] Crack morphology scores, target area location scores, local texture scores, and scene interference area scores can be normalized to the same numerical range before weighted combination. The weighting coefficients can be predetermined based on the embankment material type, typical interference target distribution, historical inspection samples, and false detection suppression verification results, and each weighting coefficient can be a non-negative number.

[0204] To ensure consistent evaluation across different scores, all scores can be uniformly set as follows: the higher the score, the more closely the candidate crack object matches the characteristics of a real crack. For example, when directly calculating the similarity to a preset interference texture or the overlap ratio with a scene interference region, a reverse transformation can be performed first to obtain the local texture score and the scene interference region score respectively.

[0205] Electronic devices can combine the false detection suppression score and other scores used in the evaluation to form the false detection suppression assessment result. The false detection suppression assessment result can also include the primary interference type corresponding to the candidate crack object. For example, when a candidate crack object highly overlaps with a shadow area and its local texture is similar to a preset shadow texture, the shadow can be identified as the primary interference type corresponding to that candidate crack object; when it highly overlaps with the slope protection block joint area and its extension direction is consistent with the slope protection block joint direction, the slope protection block joint can be identified as the primary interference type.

[0206] S1074. Based on the false detection suppression evaluation results, retain candidate crack objects, reduce the object confidence of candidate crack objects, or remove candidate crack objects to obtain the target crack object.

[0207] In this embodiment, a first evaluation threshold and a second evaluation threshold can be preset, with the first evaluation threshold being less than the second evaluation threshold. The electronic device can compare the false detection suppression score with the first evaluation threshold and the second evaluation threshold respectively to determine the false detection suppression processing to be performed on the candidate crack object.

[0208] When the false detection suppression score is greater than or equal to the second evaluation threshold, it indicates that the candidate crack object has a high degree of crack confidence in terms of crack morphology, target area location, local texture and scene interference area overlap. The candidate crack object can be retained and identified as the target crack object.

[0209] When the false detection suppression score is greater than or equal to the first evaluation threshold and less than the second evaluation threshold, it indicates that the candidate crack object has certain crack characteristics but is still affected by local textures or scene interference areas. The object confidence of the candidate crack object can be reduced, and when the reduced object confidence reaches a preset object confidence threshold, the candidate crack object is identified as the target crack object. The reduction in object confidence can be determined based on the difference between the false detection suppression score and the second evaluation threshold, or based on the degree of interference corresponding to the main interference type.

[0210] When the false detection suppression score is less than the first evaluation threshold, it indicates that the candidate crack object has a low degree of conformity with the real crack features, or has a high degree of texture similarity and spatial overlap with the scene interference target, and the candidate crack object can be removed.

[0211] In another implementation, only an evaluation threshold can be set. Candidate crack objects below the threshold are eliminated or their confidence is reduced, while candidate crack objects above the threshold are retained. When a candidate crack object highly overlaps with a scene interference area, and its shape, orientation, and local texture are similar to the corresponding preset interference texture, the candidate crack object can be directly identified as a false crack and eliminated. The candidate crack objects retained after false detection suppression processing constitute the target crack object set.

[0212] In this embodiment, candidate crack objects are jointly evaluated from four dimensions: crack morphology, target area location, local texture, and overlapping of scene interference areas. This determines whether the candidate crack objects conform to the morphological and location characteristics of real cracks, and whether they are similar to interference targets in the embankment scene such as grass cracks, shadows, watermarks, slope protection block cracks, road edges, bare soil textures, or vegetation boundaries. Furthermore, based on the false detection suppression evaluation results, candidate crack objects are retained, their confidence is reduced, or they are eliminated. This enables targeted suppression of unique pseudo-crack targets in the embankment inspection scene, reducing false detections caused by relying solely on the crack recognition model output, improving the credibility of target crack objects, and enhancing the accuracy of subsequent crack engineering attribute measurement results.

[0213] In one possible embodiment, the method steps shown in S108 are implemented by S1081 to S1084, which are described in detail below.

[0214] S1081. Perform connectivity analysis and centerline extraction on the target crack object to obtain the crack centerline, crack endpoints and crack boundaries of the target crack object.

[0215] In this embodiment, the target crack object can be characterized by the crack mask and its object identifier retained after false detection suppression processing. The electronic device can perform connectivity analysis on the crack mask corresponding to the target crack object, divide spatially interconnected crack pixels into the same connected region, and remove isolated pixel regions with an area smaller than a preset area threshold. For a target crack object containing multiple mutually separated connected regions, it can be determined whether to retain it as the same target crack object or divide it into multiple target crack objects based on the distance and extension direction between each connected region.

[0216] Electronic devices can perform skeletonization processing on crack masks after connectivity analysis, gradually refining the crack mask along its width into linear structures of single-pixel width or a preset pixel width, and defining these linear structures as the crack centerline. During skeletonization, the connectivity and main extension morphology of the crack mask are preserved, and skeleton burrs shorter than a preset branch length are further removed to reduce the impact of mask boundary noise on subsequent crack length and direction measurements.

[0217] For any centerline pixel within a crack centerline, the number of its eight neighboring centerline pixels can be counted. When there is only one neighboring centerline pixel, it can be identified as a crack endpoint; when there are more than two neighboring centerline pixels, it can be identified as a crack branch point. For a target crack object with multiple branches, the crack endpoints corresponding to each branch can be retained, and the main crack centerline can be determined based on the longest connected path of the crack centerline.

[0218] The crack boundary can be obtained by extracting the boundary pixels between the crack mask and the background area, or by performing morphological erosion on the crack mask and subtracting the original crack mask from the eroded crack mask. Thus, the crack centerline is used to characterize the extension path of the target crack object, the crack endpoints are used to characterize the start and end positions or expansion positions of the target crack object, and the crack boundary is used to characterize the contour and width range of the target crack object.

[0219] S1082. Based on the crack centerline, crack endpoints, crack boundaries, and the scale transformation relationship with the UAV inspection images, determine the crack length, crack width, crack area, and crack direction of the target crack object.

[0220] In this embodiment, the scale transformation relationship is used to characterize the correspondence between pixel size in UAV inspection images and actual ground physical size. When all pixels in the UAV inspection image correspond to the same ground physical size, the scale transformation relationship can be represented by the ground resolution of the UAV inspection image; when there are differences in the ground physical size corresponding to different locations or directions, the local ground resolution of the corresponding location or direction can be used for scale transformation.

[0221] The electronic device can determine the connection path between adjacent crack centerline pixels according to the eight-neighborhood connection relationship along the crack centerline, and determine the crack length according to the path weight corresponding to each connection path and the ground resolution.

[0222] In one implementation, the crack length is determined according to the formula... Determined; among them, Indicates the crack length of the target crack object. This represents the path weight between adjacent crack centerline pixels in the k-th group; when two adjacent crack centerline pixels are connected along the horizontal or vertical direction... Set to 1; when two adjacent crack centerline pixels are connected along a diagonal direction, Pick .

[0223] The crack length of the target crack object is obtained by summing the actual path lengths between adjacent pixels along the crack centerline. For a target crack object with multiple branches, the total crack length can be determined by the sum of the path lengths of each branch, or the length corresponding to the longest connected path can be determined as the main crack length.

[0224] Electronic devices can perform distance transformation on the crack mask corresponding to the target crack object to determine the distance from each pixel in the crack mask to the nearest background pixel, and extract the distance transformation value corresponding to each crack centerline pixel on the crack centerline.

[0225] The average crack width and maximum crack width of the target crack object can be determined by the formula. and Determined; among them, This represents the average crack width of the target crack object. This indicates the maximum crack width of the target crack object. Let m represent the set of crack centerline pixels contained within the crack centerline pixel set, m represent the number of pixels in the crack centerline pixel set, and p represent any crack centerline pixel in the crack centerline pixel set. This represents the distance transformation value from pixel p at the crack centerline to the nearest background pixel. Twice the distance transformation value is used to characterize the crack pixel width at the corresponding crack centerline position, and then the crack pixel width is converted to the actual physical width using ground resolution.

[0226] The crack area can be determined based on the number of crack pixels contained in the crack mask corresponding to the target crack object and the scale transformation relationship. Specifically, the number of crack pixels in the crack mask can be counted, and the number of pixels can be converted into the actual crack area based on the actual ground area corresponding to a single pixel. When the horizontal scale and the vertical scale are different, the actual ground area corresponding to a single pixel can be determined separately based on the horizontal scale and the vertical scale.

[0227] The crack orientation can be determined based on the image moments of the crack centerline or the direction of the crack endpoints. In one implementation, the image moments can be calculated based on the coordinates of each pixel along the crack centerline to obtain the principal axis direction of the crack centerline, which is then used to determine the crack orientation. In another implementation, the crack orientation can be determined based on the direction of the line connecting the crack endpoints at both ends of the crack centerline. The crack orientation can be represented as the angle relative to true north, the embankment axis, or the embankment slope. For target cracks with high curvature, the crack centerline can be divided into multiple centerline segments, and the local orientation of each segment can be determined. The local orientations can then be synthesized based on the length of each centerline segment to obtain the overall crack orientation of the target crack object.

[0228] S1083. Based on the positional relationship between the crack centerline and the preset dam boundary information, determine the crack penetration degree of the target crack object.

[0229] In this embodiment, the preset embankment boundary information may include at least one of the following: embankment axis buffer zone, embankment top line, slope toe line, slope protection boundary, and geographic information vector boundary. The preset embankment boundary information and the preset embankment boundary information used to determine the embankment target identification area in S102 can use the same spatial coordinate reference and can be mapped to a unified image coordinate system.

[0230] Electronic equipment can determine the intersection, proximity, and crossing relationships between the crack centerline or crack endpoints and the pre-defined embankment boundary information. For example, it can determine whether the crack centerline intersects with the embankment crest line, slope toe line, or slope protection boundary; whether it extends from one embankment structure area to another; and whether the two crack endpoints of the crack centerline are located on opposite sides of the pre-defined embankment boundary.

[0231] In one implementation, the degree of crack penetration can be determined based on the number of embankment boundaries crossed by the crack centerline, the types of intersecting embankment boundaries, and the extension ratio of the crack centerline within the embankment target identification area. When the crack centerline is located only in a single local area and does not approach a preset embankment boundary, it can be determined to have a low degree of crack penetration. When the crack centerline intersects with at least one of the embankment crest line, slope toe line, slope protection boundary, or embankment target identification area boundary, the degree of crack penetration can be correspondingly increased. When the crack centerline penetrates a embankment structure area defined by two preset embankment boundaries, or when the two crack endpoints reach different preset embankment boundaries, it can be determined to have a high degree of crack penetration.

[0232] The degree of crack penetration can be represented by penetration category, penetration level, or normalized penetration value. For example, it can be divided into non-penetrated, partially penetrated, and cross-regional penetrated; or it can be calculated according to a preset scoring rule based on the spatial relationship between the crack centerline and each preset embankment boundary. Thus, the degree of crack penetration reflects not only the length of the target crack itself, but also its spatial extension relative to the critical structural boundaries of the embankment.

[0233] S1084. Based on the embankment segment station number, establish a mapping relationship between the target crack object and the corresponding embankment segment station number to obtain the embankment segment spatial location of the target crack object, and generate embankment crack extraction results according to the crack engineering attributes and embankment segment spatial location.

[0234] In this embodiment, the associated inspection information includes the embankment segment station number. The electronic device can convert the crack centerline, crack endpoint, or crack center position of the target crack object from the unified image coordinate system to the embankment spatial reference system based on the mapping relationship between the UAV inspection image and the embankment spatial reference system, and project the converted spatial position onto the embankment axis or the preset station number baseline.

[0235] Electronic equipment can determine the projected distance of a target crack object along the dike axis based on known station reference points on the dike axis and the spatial coordinates corresponding to each station reference point, and convert the projected distance into the corresponding dike segment station number. For a target crack object located between two station reference points, interpolation can be performed based on the distance along the line between the target crack object and the adjacent station reference point to obtain the dike segment station number corresponding to the target crack object.

[0236] For target cracks extending significantly along the embankment axis, the starting and ending station numbers of the crack centerline can be determined separately, and the station interval formed by these two numbers can be used as the spatial location of the target crack segment within the embankment. For target cracks with a smaller extension range, the station number corresponding to the crack centerline or the midpoint of the crack centerline can be used as the spatial location of the embankment segment. The spatial location of the embankment segment can also include the lateral position of the target crack on the water-facing slope, back slope, embankment crest, or revetment area, as well as the corresponding spatial coordinates.

[0237] Electronic devices can associate and store the object identifier, crack centerline, crack endpoints, crack boundaries, crack length, crack width, crack area, crack direction, crack penetration degree, object confidence level, and spatial location of the embankment segment of the target crack object, generating embankment crack extraction results. The embankment crack extraction results can be output in at least one of the following forms: crack vector layer, attribute data table, image overlay, embankment segment hidden danger ledger, or inspection report.

[0238] For example, the center line and endpoints of cracks can be overlaid on drone inspection images, and the crack length, average crack width, maximum crack width, crack direction, crack penetration degree and dike section number can be marked at the corresponding positions. Multiple target crack objects can also be sorted or summarized according to dike section number, so that inspection personnel can conduct on-site verification, compare historical hidden dangers and manage dike inspection records.

[0239] In this embodiment, by performing connectivity analysis and centerline extraction on the target crack object, the crack centerline, crack endpoints, and crack boundaries that reflect the crack extension path and contour range are obtained. Based on the above structural information and scale conversion relationship, the pixel-level crack recognition results are converted into crack length, crack width, crack area, and crack direction. The crack penetration degree is determined by combining the positional relationship between the crack centerline and the preset embankment boundary information. Furthermore, the target crack object is mapped to the embankment segment station number to form the embankment crack extraction result that simultaneously contains the crack engineering attributes and the spatial location of the embankment segment. This realizes the conversion from image recognition results to measurable, locatable, and verifiable engineering inspection results, which facilitates the review of hidden dangers, ledger management, and subsequent crack development analysis.

[0240] like Figure 2 As shown, in one possible embodiment, the method further includes S1091 to S1095, which are described in detail below.

[0241] S1091. Acquire multiple UAV inspection images corresponding to the same embankment section, and map the UAV inspection images of each period and the corresponding embankment crack extraction results to a unified embankment spatial reference system.

[0242] In this embodiment, the multi-phase UAV inspection images are UAV inspection images collected on the same embankment section at different inspection periods. They may include orthophotos collected at different times, single high-resolution images, or inspection images generated from consecutive frame images. Each phase of UAV inspection images corresponds to relevant inspection information such as acquisition time, spatial location, attitude parameters, camera parameters, ground resolution, and embankment section station number.

[0243] To enable spatial comparison of images and crack objects from different inspection periods, the electronic equipment can select the dam spatial reference system corresponding to one of the UAV inspection images as the benchmark reference system, or it can use the plane coordinate system, geographic coordinate system or dam segment station coordinate system uniformly used in dam engineering as the unified dam spatial reference system.

[0244] Electronic equipment can convert UAV inspection images from different periods into a unified dam spatial reference system based on the georeferenced information carried by each period's images. For situations where there are still positional, rotational, or scale deviations between images from different periods, registration and correction of the UAV inspection images from different periods can be performed using dam crest lines, slope toe lines, slope protection boundaries, fixed structures, ground control points, or stable image feature points.

[0245] After the registration of each UAV inspection image is completed, the electronic equipment synchronously maps the crack centerline, crack endpoints, crack boundaries, crack engineering attributes, and spatial location of the target crack object to a unified dam spatial reference system based on the image coordinates and spatial mapping relationships corresponding to the crack extraction results of each phase. For cases where the ground resolution of the UAV inspection images differs between phases, the scale transformation relationship between the images can be retained, or the images can be resampled to a unified ground resolution for subsequent crack morphology comparison and slope displacement analysis.

[0246] S1092. Based on the spatial positional relationship and crack morphology correspondence between target crack objects in different inspection periods, target crack objects in different inspection periods are matched to obtain a time-series crack object group corresponding to the same crack.

[0247] In this embodiment, the electronic device can perform preliminary screening of target crack objects in different inspection periods according to the dike section station number or preset spatial grid, and determine the target crack objects located in the same dike section or adjacent dike sections as crack objects to be matched.

[0248] Spatial relationships can be determined based on at least one of the following: distance between crack centerlines, distance between crack endpoints, distance between crack centerlines, degree of overlap of crack boundaries, and differences in corresponding embankment station numbers between target crack objects at different inspection periods. Crack morphology correspondences can be determined based on at least one of the following: differences in crack orientation, similarity in crack centerline shape, crack length ratio, similarity in crack width distribution, degree of overlap in crack area, and similarity in crack branch structure between target crack objects at different inspection periods.

[0249] Electronic equipment can comprehensively evaluate the spatial relationship and the correspondence between crack morphology to obtain the degree of matching between target crack objects at different times. For example, when the crack centerlines of two target crack objects are spatially adjacent, the corresponding embankment chainages are the same or similar, and the crack direction and crack shape meet the preset matching conditions, it can be determined that the two correspond to the same actual crack.

[0250] For the same actual crack corresponding to target crack objects in different inspection periods, an association can be established according to the acquisition time sequence, and the same temporal crack identifier can be configured to obtain a temporal crack object group. The temporal crack object group can include target crack objects in two or more inspection periods, as well as their corresponding acquisition time, crack engineering attributes, and embankment spatial location.

[0251] When a target crack object only appears in the later phase of dam crack extraction results, and no target crack object is matched at the corresponding position in the previous phase image, it can be marked as a newly added crack; when the corresponding target crack object exists in different inspection periods, it can be marked as a persistent crack, and its expansion can be further determined; for target crack objects that exist in the previous phase but are not identified in the later phase, they can be retained as objects to be reviewed, so as to reduce the erroneous disappearance judgment caused by imaging differences or occlusion.

[0252] S1093. Based on the crack engineering attributes of each target crack object in the time-series crack object group, determine the attribute change information and crack propagation direction of the corresponding crack.

[0253] In this embodiment, the electronic device can read the crack length, crack width, crack area, crack direction, crack penetration degree, crack center line and crack endpoint of each target crack object in the time-series crack object group according to the inspection time sequence, and compare the crack engineering attributes of adjacent inspection periods.

[0254] The attribute change information can include at least one of the following: changes in crack length, crack width, crack area, crack penetration, crack orientation, and corresponding change rates. The change rate can be determined based on the attribute changes and corresponding time intervals between adjacent inspection periods. For crack width, the average crack width change and the maximum crack width change can be determined separately; for cracks with multiple branches, the attribute change information for the main crack and each crack branch can be determined separately.

[0255] Electronic devices can spatially compare the crack centerline and crack endpoints of a previous target crack object with those of a subsequent target crack object. For any new extension of the crack centerline in the subsequent phase relative to the previous phase, the direction from the original crack endpoint to the new crack endpoint of the new extension can be determined as the crack propagation direction.

[0256] When both ends of a crack extend, the direction of crack propagation corresponding to each crack endpoint can be determined separately, and the propagation distance or rate in each direction can be recorded. When the crack area or width changes but the position of the crack endpoint changes only slightly, information on changes in attributes such as width expansion, area expansion, or local cracking intensification can be retained.

[0257] Electronic devices can also compare attribute change information with corresponding preset change thresholds to determine whether the crack has changed significantly. For example, when the increase in crack length, crack width, or crack area exceeds the corresponding preset change threshold, the crack can be marked as an expanding crack; when the changes in each crack's engineering attributes do not exceed the corresponding threshold, it can be marked as a relatively stable crack.

[0258] S1094. Determine the correlation analysis area around the cracks corresponding to the time-series crack object group, and perform image displacement matching on the correlation analysis area at different inspection periods to obtain the slope displacement characteristics of the correlation analysis area.

[0259] In this embodiment, the electronic device can extend a preset physical distance around the crack centerline, crack endpoints, or crack boundaries corresponding to the time-series crack object group to obtain the correlation analysis area. The correlation analysis area can be a buffer area formed along the crack centerline, or it can include the area around the crack endpoints, the area in front of the crack propagation direction, or the embankment area adjacent to the crack.

[0260] The size of the correlation analysis region can be determined based on the crack length, ground resolution, embankment structural scale, and displacement analysis window size. For longer cracks, multiple local correlation analysis sub-regions can be set along the crack centerline; for cases where crack endpoints extend significantly, the correlation analysis range ahead of the crack extension direction can be increased.

[0261] Electronic equipment can extract spatially corresponding correlation analysis regions from UAV inspection images of adjacent inspection periods, and use at least one of the following techniques for image displacement matching: Particle Image Velocimetry (PIV), Large-Scale Particle Image Velocimetry (LSPIV), Normalized Cross-Correlation (NCC), Minimum Quadratic Difference (MQD), Fourier Cross-Correlation, Optical Flow, Feature Point Matching, or 3D Reconstruction Change Detection.

[0262] For example, multiple calculation windows can be set in the previous correlation analysis area, and the location with the highest similarity or the smallest grayscale difference can be found in the corresponding search window in the next correlation analysis area. The pixel displacement increment is obtained based on the coordinate difference between the calculation window and the matching location. The electronic device can combine the ground resolution of the UAV inspection image to convert the pixel displacement increment into the actual slope displacement, and combine the time interval between adjacent inspection periods to determine the slope displacement rate.

[0263] For the obtained displacement vectors, abnormal displacement vectors can be identified and corrected by using neighborhood median filtering, direction consistency constraints, or interpolation substitution. For example, when the displacement amount or direction of a certain displacement vector differs from that of its neighboring displacement vectors by more than a preset abnormal threshold, it can be identified as an abnormal displacement vector and replaced with the median, average, or interpolation result of the effective displacement vectors in the neighborhood.

[0264] After completing image displacement matching, displacement vectors within the correlation analysis area can be statistically analyzed to obtain slope displacement characteristics. Slope displacement characteristics can include at least one of the following: average displacement, maximum displacement, displacement rate, principal displacement direction, spatial distribution of displacement vectors, and significant displacement regions. The principal displacement direction can be determined based on the directional distribution of effective displacement vectors within the correlation analysis area or the weighted average result of displacement vectors.

[0265] S1095. Based on attribute change information, the spatial proximity between the crack location corresponding to the temporal crack object group and the area corresponding to the slope displacement feature, and the directional consistency between the crack propagation direction and the main displacement direction in the slope displacement feature, determine the crack development state of the corresponding crack.

[0266] In this embodiment, the electronic device can determine the spatial proximity relationship between the crack centerline, crack endpoint, or crack extension area corresponding to the time-series crack object group and the significant slope displacement area based on the distance, overlap ratio, or buffer area inclusion relationship.

[0267] For example, when a significant slope displacement area intersects with the crack centerline buffer area, or when the distance between a significant slope displacement area and the crack endpoint is less than a preset spatial distance threshold, it can be determined that the crack location and the area corresponding to the slope displacement feature meet the spatial proximity condition. The preset spatial distance threshold can be represented by actual physical distance and converted into pixel distance in the image based on the scale transformation relationship of the UAV inspection image.

[0268] The electronic device can further calculate the angle between the crack propagation direction and the main displacement direction, and compare the angle with a preset direction threshold. When the angle is less than or equal to the preset direction threshold, it can be determined that the two meet the condition of directional consistency. When the crack has multiple crack propagation directions, they can be compared with the main displacement direction respectively, and the crack propagation direction with the highest degree of directional consistency can be selected for judgment.

[0269] In one implementation, when the increase in crack length, crack width, or crack area exceeds the corresponding preset change threshold, the crack location and the area of ​​significant slope displacement meet the spatial proximity condition, and the crack propagation direction and the main displacement direction meet the directional consistency condition, the crack development state of the corresponding crack can be determined as a deformation-driven crack, indicating that the crack propagation may be related to the displacement of the surrounding embankment slope.

[0270] When attribute changes indicate that cracks are expanding significantly, but the slope displacement or displacement rate in the corresponding correlation analysis area does not reach the preset significant displacement threshold, the crack development state of the corresponding crack can be identified as an independent crack development type of hidden danger.

[0271] When the slope displacement or displacement rate in the correlation analysis area reaches the preset significant displacement threshold, but the attribute change information of the time-series crack object group has not yet indicated that the crack has significantly expanded, the area around the corresponding crack can be identified as a potential crack development zone to prompt that the area be carefully reviewed during subsequent inspections.

[0272] For cases where neither crack attribute changes nor slope displacement are significant, the crack development state of the corresponding crack can be defined as a relatively stable state. For cases where slope displacement is significant but its main displacement direction is inconsistent with the crack propagation direction, it can be defined as a state awaiting verification to avoid making erroneous associations based solely on spatial proximity.

[0273] Electronic devices can associate and store the crack development status with corresponding time-series crack object groups, attribute change information, crack propagation direction, slope displacement characteristics, embankment segment station number, and inspection time, and output it in the form of crack development status layers, attribute change data tables, risk warning information, or inspection reports. In one specific implementation, the crack results of the current period can be matched with the previous period's images, and the crack length, crack width, and displacement direction around the crack can be jointly analyzed. For cracks with significant length increases and whose surrounding displacement direction is consistent with the crack propagation direction, a deformation-driven crack risk warning can be output.

[0274] In this embodiment, multiple UAV inspection images and crack extraction results of the same embankment section are unified into the same embankment spatial reference system. The temporal correlation of the same crack between different inspection periods is established by the spatial location and crack morphology of the target crack object. This obtains attribute change information that reflects the crack length, width, area and endpoint expansion. Furthermore, image displacement matching is performed around the crack to obtain slope displacement characteristics such as slope displacement amount, displacement rate and main displacement direction. By combining the spatial proximity between the crack location and the slope displacement area and the directional consistency between the crack expansion direction and the main displacement direction, deformation-driven cracks, cracks with independent development, potential crack development areas and relatively stable cracks are distinguished. This links crack changes in the time dimension with embankment displacement in the spatial dimension, improving the accuracy of crack development judgment and engineering interpretability.

[0275] In one possible embodiment, the method further includes S1101 to S1105, which are described in detail below.

[0276] S1101. Acquire continuous frame UAV inspection images or multiple UAV inspection images corresponding to the dam area to be inspected, and map each UAV inspection image to a unified dam spatial reference system.

[0277] In this embodiment, continuous frame UAV inspection images can be images continuously collected by the UAV during the same inspection process, while multi-period UAV inspection images can be images collected for the same embankment section at different inspection periods. The electronic device can map each UAV inspection image to a unified embankment spatial reference system based on the spatial location, attitude parameters, and camera parameters corresponding to each UAV inspection image, and perform image registration through fixed structures, embankment top lines, slope toe lines, slope protection boundaries, or stable image feature points, so that the same embankment surface positions in different frames or different periods of images correspond to each other.

[0278] S1102. Establish and update the embankment background model based on continuous frame UAV inspection images or multi-phase UAV inspection images.

[0279] In this embodiment, UAV inspection images without obvious collapse, subsidence, or large-scale soil movement can be selected as the initial background images, and a levee background model can be established based on the initial background images. For continuous frame UAV inspection images, the levee background model can be updated based on the stable levee pixels in subsequent images, so that the levee background model can adapt to local brightness changes, slight vegetation swaying, or changes in water surface reflection.

[0280] The embankment background model can employ an average background model, a Gaussian background model, a Gaussian mixture background model, a visual background extraction model, or a foreground segmentation model based on deep learning. When using an average background model, the background image can be formed based on the average pixel values ​​of corresponding pixels from multiple historical frames. When using a Gaussian background model or a Gaussian mixture background model, a stable background can be represented using the statistical distribution of pixel values, and the statistical parameters can be updated based on newly acquired UAV inspection images.

[0281] S1103. Perform differential processing on the current UAV inspection image and the embankment background model to obtain the embankment differential result.

[0282] In this embodiment, the electronic device can calculate the pixel differences between the current UAV inspection image and the embankment background model at corresponding pixel positions to obtain a embankment differential image. Pixel differences can be grayscale differences, color differences, or differences in image features obtained after feature extraction. Pixels with larger differences are used to characterize that the current embankment state has changed significantly relative to the embankment background model.

[0283] Before performing differential processing, brightness correction, local contrast adjustment, or noise suppression can be performed on the current UAV inspection images and the embankment background model to reduce the impact of shooting illumination differences and imaging noise on the embankment differential results.

[0284] S1104. Perform block threshold binarization on the difference results of the embankment surface to obtain the foreground region of the embankment surface.

[0285] In this embodiment, the embankment differential analysis results can be divided into multiple differential analysis blocks, and the corresponding binarization threshold can be determined according to the pixel distribution in each differential analysis block. Specifically, the maximum inter-class variance method can be used to calculate the block threshold corresponding to each differential analysis block, and the block thresholds of adjacent differential analysis blocks can be averaged or smoothed to obtain the actual binarization threshold used for each differential analysis block.

[0286] The electronic device can compare the pixel difference values ​​in each differential analysis block with the corresponding binarization threshold, identify pixels whose pixel difference values ​​reach the binarization threshold as foreground pixels, and form the foreground area of ​​the embankment based on the foreground pixels. By using block thresholding, the problem of global thresholds being unable to adapt to different embankment areas due to uneven lighting on the embankment slope, local shadows, or water reflection can be reduced.

[0287] S1105. Based on the area and spatial distribution of the foreground area of ​​the embankment, determine the areas of collapse, subsidence, or soil movement, and map the determination results to the corresponding embankment segment station numbers.

[0288] In this embodiment, the electronic device can perform connectivity analysis on the foreground area of ​​the embankment to obtain one or more foreground connected regions, and statistically analyze the area, shape, duration, and spatial location of each foreground connected region. When the area of ​​a certain foreground connected region reaches a preset area threshold and persists for multiple consecutive frames or adjacent inspection periods, it can be identified as a suspected collapse, subsidence, or soil movement area.

[0289] Furthermore, suspected collapse, subsidence, or soil movement areas can be verified based on the area changes, boundary expansion direction, and positional relationship with the embankment crest line, slope toe line, or slope protection boundary of the foreground connected region. Electronic equipment can map the confirmed collapse, subsidence, or soil movement areas to the embankment spatial reference system and embankment segment stationing system to obtain the corresponding spatial location, area, and degree of change.

[0290] In this embodiment, a background model of the embankment is established based on UAV inspection images from different frames or different inspection periods. Large-scale changes in the embankment are identified through background subtraction, block threshold binarization, and foreground area statistics. This enables the identification of areas of collapse, subsidence, or soil movement in embankment slope scenarios with uneven lighting distribution or local environmental changes. The identification results are then converted into the embankment segment chainage system, providing a data foundation for subsequent spatial superposition of multiple hidden dangers and comprehensive risk assessment.

[0291] like Figure 3 As shown, in one possible embodiment, the method further includes S1111 to S1114, which are described in detail below.

[0292] S1111. Target detection is carried out on the embankment and surrounding dangerous areas to obtain the results of human and vehicle intrusion detection.

[0293] In this embodiment, dangerous areas of the embankment and its surroundings can be determined based on at least one of the following: embankment top road, slope protection area, embankment toe area, construction restriction area, and flood season restricted area. Target detection models can then be run in the drone inspection images corresponding to these dangerous areas.

[0294] The object detection model can identify at least one object among people, vehicles, construction machinery, and anglers, and output the category, location, and detection confidence of each object. The object detection model can be a YOLO-based model, a Single Shot MultiBox Detector (SSD), a Faster Region-based Convolutional Neural Network (Faster R-CNN), or an anchorless detection model. It can also incorporate multi-scale feature fusion and non-maximum suppression to reduce the repeated identification of the same object.

[0295] Electronic devices can determine whether an identified object is located in a dangerous area and generate a human or vehicle intrusion detection result based on at least one of the following: object category, dwell time, direction of movement, and detection confidence level.

[0296] S1112. Map the results of dam crack extraction, slope displacement characteristics, collapse or subsidence identification, and human and vehicle intrusion detection to a unified dam spatial reference system and dam segment stationing system.

[0297] In this embodiment, the electronic device can uniformly convert the spatial positions of the target crack object, slope displacement vector, collapse or subsidence foreground area, and intrusion objects of people and vehicles to the dam spatial reference system, and determine the corresponding dam segment station number according to the position corresponding to each result.

[0298] Electronic equipment can spatially superimpose the above-mentioned different types of safety hazards according to the embankment chainage or preset spatial grid to determine whether the target crack object is adjacent to or overlaps with the area of ​​significant slope displacement, the foreground area of ​​collapse or subsidence, or the area of ​​human and vehicle activity.

[0299] S1113. Determine the risk sub-scores based on different types of safety hazards, and obtain the comprehensive risk score for dam safety hazards.

[0300] In this embodiment, a crack risk sub-score can be determined based on the crack engineering attributes and crack development status of the target crack object; a deformation risk sub-score can be determined based on at least one of slope displacement, slope displacement rate, and area of ​​significant slope displacement region; a collapse or subsidence risk sub-score can be determined based on at least one of the area, location, and extent of expansion of the collapse or subsidence prospect area; and a human or vehicle intrusion risk sub-score can be determined based on at least one of the category, quantity, location, dwell time, and detection confidence of the intruding object.

[0301] In one implementation method, the comprehensive risk assessment of dam safety hazards can be based on a formula. It is confirmed that, among them, This indicates the comprehensive risk score for potential safety hazards of the dam. This represents the crack risk sub-score. Indicates the deformation risk sub-score. Sub-scores indicating the risk of collapse or subsidence. Indicates the risk score for human and vehicle intrusion. , , and These represent the weights corresponding to each risk sub-score.

[0302] The crack risk sub-score can be determined based on at least one of the following: crack length, crack width, crack area, crack penetration degree, crack development state, and object confidence level; the deformation risk sub-score can be determined based on at least one of the following: slope displacement, displacement rate, area of ​​significant displacement region, and main displacement direction; the collapse or subsidence risk sub-score can be determined based on at least one of the following: area, location, and degree of change of the collapse or subsidence prospective area; the pedestrian and vehicle intrusion risk sub-score can be determined based on at least one of the following: category, number, location, detection confidence level, and spatial relationship with the pre-set danger zone.

[0303] Each risk sub-score can be normalized to the same numerical range before being included in the calculation. The weights can be determined based on historical dam hazard samples, expert experience, risk level rules, model training results, or dynamic threshold calibration results to reflect the importance of various safety hazards in different dam sections, different inspection periods, or different operating conditions.

[0304] S1114. Generate comprehensive risk results at the section level based on the comprehensive risk score of safety hazards in the embankment.

[0305] In this embodiment, the electronic device can compare the comprehensive risk score of dam safety hazards with multiple preset risk level thresholds to determine the risk level of the corresponding dam section. The comprehensive risk results at the dam section level can include at least one of the following: risk level, hazard category, spatial location, crack engineering attributes, slope displacement characteristics, collapse or subsidence area, objects of human or vehicle intrusion, review recommendations, and inspection reports.

[0306] When a target crack object and a significant slope displacement area exist simultaneously in the same embankment section, the correlation information between the crack and the slope deformation can be output in the inspection report; when the target crack object is adjacent to a collapse or subsidence prospect area, the risk level of the corresponding embankment section can be increased; when the target crack object is located near a dangerous area with frequent human and vehicle activity, intrusion warnings and on-site verification suggestions can be output in the risk results.

[0307] In this embodiment, four types of safety hazards—cracks, slope deformation, collapse or subsidence, and intrusion by people and vehicles—are uniformly mapped to the same dam spatial reference system and dam segment chainage system. A comprehensive risk result at the dam segment level is generated through weighted risk scoring, thereby avoiding the problem that different types of identification results are independent of each other and difficult to form a comprehensive judgment, and improving the completeness of dam safety hazard assessment and inspection results output.

[0308] In a specific application example, a drone is used to inspect a section of a dike. The drone flies at an altitude of 50 meters, and the acquired drone inspection images are orthophotos. The ground resolution of the drone inspection images is... The resolution is 1.5 cm / pixel. Based on the inspection requirements for this section of the levee, the preset crack identification scale will be used. If the value is set to 3 cm, then the pixel representation value of the crack to be identified in the UAV inspection image is: =2.

[0309] The input scale N of the crack recognition model is 1280 pixels, and the preset effective pixel utilization coefficient is... The value is 0.8, which is the preset lower limit for the physical side length. The maximum physical side length is 10 meters. The length is 30 meters. Based on the formula for determining the candidate physical side length of the image unit to be identified, the following is calculated: =15.36 meters, therefore, 15.36 meters is determined as the image unit scale of the image unit to be identified.

[0310] This section of the embankment has numerous cracks in the revetment blocks and turf textures, as well as localized embankment slope shadows. The embankment surface texture complexity was determined based on local grayscale variance and texture entropy. Shadow pixels were statistically analyzed using preset thresholds in the Hue-Saturation-Value (HSV) color space, yielding a shadow interference ratio of approximately 15% corresponding to the degree of illumination interference. Based on crack pixel characterization values, embankment surface texture complexity, and illumination interference level, the preset basic overlap rate was adjusted, setting the overlap rate between adjacent image units to be identified to 35%.

[0311] Subsequently, linear structure response, edge structure response, local contrast response, and directional texture response are extracted from each image unit to be identified to generate corresponding crack morphology enhancement information. This crack morphology enhancement information is then combined with the image unit to be identified through channel-wise aggregation to form enhanced recognition data. The enhanced recognition data is processed using a crack recognition model to obtain crack candidate probability information, crack candidate masks, and recognition confidence information for each image unit to be identified.

[0312] During the overlapping region fusion process, probability-weighted fusion and object-level merging are performed based on the identification confidence information of each local crack candidate result, the distance of the candidate pixel relative to the center of the corresponding image unit to be identified, the intersection over union (IoU) ratio of the crack candidate mask, the distance between the crack skeleton endpoints, and the angle of the extension direction. During false detection suppression, the dam target identification area, slope protection block crack area, shadow area, and grass crack area are used to suppress false detections of candidate crack objects. Candidate crack objects that highly overlap with scene interference areas have their object confidence reduced or are removed.

[0313] After processing, a total of 12 target crack objects were obtained. The average crack width of the target crack objects was 2.8 cm, and the maximum crack length was 12.6 m. The generated dam crack extraction results include the crack centerline, crack endpoint coordinates, crack length, crack width, crack direction, crack penetration degree, and corresponding dam segment station number for each target crack object.

[0314] Furthermore, the target cracks identified in this inspection are matched with those from the previous inspection to determine changes in crack length, width, and propagation direction. Slope displacement vectors obtained using particle image velocimetry (PEV) or large-scale PEV are extracted from the correlation analysis area surrounding the corresponding cracks. For target cracks with significant length increases and whose principal displacement direction aligns with the crack propagation direction, a deformation-driven crack risk warning is output. For target cracks located near high-risk areas with frequent pedestrian and vehicular activity, pedestrian and vehicular intrusion detection results are further overlaid, ultimately forming a comprehensive risk level, inspection report, and review recommendations for the corresponding embankment section.

[0315] In other possible implementations, the crack identification model can employ any deep learning model capable of outputting crack candidate masks and identification confidence information, including instance segmentation models, semantic segmentation models, or joint object detection and mask generation models. Crack structural response information can be obtained using at least one of the following: Hessian matrix operator, Frangi filter, Gabor filter, Sobel operator, Canney edge detection operator, Laplacian operator, structural tensor, top-hat transform, bottom-hat transform, or local binary pattern.

[0316] Ground resolution can be obtained from UAV image metadata or orthophoto parameters; embankment texture complexity can be obtained from local gradient statistics, local grayscale variance, or texture entropy; illumination interference level can be obtained from shadow detection model or shadow pixel ratio; preset crack recognition scale can also be manually set according to inspection requirements.

[0317] Local crack candidate results within overlapping areas can be fused using probability weighting, distance weighting, confidence weighting, boundary consistency weighting, crack structure continuity constraints, graph cut optimization, or conditional random fields. Object-level merging of candidate crack objects can be achieved based on crack skeleton endpoint distance, extension direction angle, connected region distance, bounding box overlap relationship, or spatial proximity rules.

[0318] Correlation analysis areas at different inspection periods can be matched using methods such as Normalized Cross-Correlation (NCC), Minimum Quadratic Difference (MQD), Fourier Cross-Correlation, Optical Flow, Feature Point Matching, or 3D Reconstruction Change Detection for image displacement matching. Background subtraction methods used for collapse, subsidence, or soil movement identification can include average background models, Gaussian background models, Gaussian mixture background models, Visual Background Extractor (ViBe) models, or deep foreground segmentation models.

[0319] Intrusion detection of people and vehicles can employ target detection models based on a "look only once" framework, single-shot multi-frame detectors, fast region convolutional neural networks, or other target detection models. The weights of each component in the comprehensive risk score for dam safety hazards can be determined based on expert experience, historical hazard samples, risk level rules, machine learning models, or dynamic threshold calibration results. The above implementation methods can be selected or combined based on dam type, dam surface material, UAV inspection image quality, and computing resources.

[0320] In one possible embodiment, this application also provides a dam crack extraction system based on UAV imagery. The system includes an image acquisition module, a target region determination module, an adaptive segmentation module, a structure enhancement module, a crack identification module, a fusion and merging module, a false detection suppression module, and a measurement and positioning module.

[0321] The image acquisition module is used to acquire drone inspection images and related inspection information of the dam area to be inspected, and send the drone inspection images and related inspection information to the target area determination module.

[0322] The target area determination module is used to determine the target identification area of ​​the dam in the UAV inspection imagery based on the associated inspection information. The specific implementation method can be referred to in S102 and S1021 to S1025, and will not be repeated here.

[0323] The adaptive segmentation module is used to adaptively overlap and segment the target recognition area of ​​the dam based on the image resolution features of the UAV inspection image, the preset crack recognition scale, and the scene complexity of the target recognition area of ​​the dam, to obtain multiple image units to be recognized. The specific implementation method can be referred to S103, S1031 to S1034 and S10331 to S10334.

[0324] The structural enhancement module is used to extract crack structural response information from each image unit to be identified, generate crack morphology enhancement information based on the crack structural response information, and combine the crack morphology enhancement information with the corresponding image unit to be identified to obtain enhanced recognition data.

[0325] The crack identification module is used to process the enhanced identification data using the crack identification model to obtain the local crack candidate results corresponding to each image unit to be identified.

[0326] The fusion and merging module is used to map each local crack candidate result to a unified image coordinate system, fuse local crack candidate results with spatial correspondence in the overlapping area to obtain crack fusion results, and merge local crack candidate results belonging to the same crack into candidate crack objects based on the crack fusion results and the crack structure continuity relationship between each local crack candidate result.

[0327] The false detection suppression module is used to perform false detection suppression processing on candidate crack objects based on the constraint information of the dam scene. According to the crack shape, target area location, local texture and scene interference area overlap, it retains candidate crack objects, reduces the object confidence of candidate crack objects or removes candidate crack objects to obtain the target crack object.

[0328] The measurement and positioning module is used to perform connectivity structure analysis and centerline extraction on the target crack object, determine the crack engineering attributes of the target crack object, and map the target crack object to the corresponding embankment segment station number to obtain the embankment crack extraction results.

[0329] Each of the above modules can be implemented by an independent software program, hardware circuit, or processor functional unit, or it can be implemented by the same processor executing different program instructions. The modules can transmit UAV inspection images, intermediate processing data, and dam crack extraction results through internal data interfaces, communication buses, or network interfaces.

[0330] Furthermore, the system may also include a multi-period correlation analysis module, a collapse identification module, a pedestrian and vehicle intrusion identification module, and a risk fusion module. The multi-period correlation analysis module is used to determine the crack development status of the target crack object; the collapse identification module is used to determine the collapse, subsidence, or soil movement area based on background difference; the pedestrian and vehicle intrusion identification module is used to identify pedestrian and vehicle intrusion objects in the embankment and surrounding dangerous areas; the risk fusion module is used to uniformly map the crack, slope deformation, collapse or subsidence, and pedestrian and vehicle intrusion results to the embankment segment chainage system and generate comprehensive risk results at the embankment segment level.

[0331] In one possible embodiment, this application also provides an electronic device, which includes a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface are interconnected via the communication bus.

[0332] The memory stores computer programs, UAV inspection images, associated inspection information, crack identification models, intermediate processing data, and dam crack extraction results. The processor reads and executes the computer programs stored in the memory to implement the dam crack extraction method based on UAV images in any of the foregoing embodiments.

[0333] The communication interface can be used for data communication with drones, drone ground stations, image storage devices, dam inspection and management platforms, or geographic information systems. Electronic devices can be servers, cloud computing platforms, edge computing devices, drone ground stations, inspection and management terminals, or a system of devices comprised of the above.

[0334] In one possible embodiment, this application also provides a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the dam crack extraction method based on UAV imagery from any of the foregoing embodiments. The computer-readable storage medium may include a read-only memory, random access memory, solid-state drive, magnetic disk, optical disk, or other tangible storage medium capable of storing a computer program.

[0335] In one possible embodiment, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the method for extracting dam cracks based on UAV imagery as described in any of the foregoing embodiments.

[0336] The above are merely specific embodiments of this application, enabling those skilled in the art to understand or implement this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to these embodiments, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for extracting dam cracks based on UAV imagery, characterized in that, The method includes: Acquire drone inspection images and related inspection information of the dam area to be inspected; Based on the associated inspection information, the target identification area of ​​the dam is determined in the UAV inspection image; Based on the image resolution features of the UAV inspection images, the preset crack recognition scale, and the scene complexity of the dam target recognition area, the dam target recognition area is adaptively overlapped and segmented to obtain multiple image units to be recognized. Each of the image units to be identified is subjected to crack structure enhancement processing to obtain the corresponding enhanced recognition data; The enhanced recognition data is processed using a crack recognition model to obtain local crack candidate results corresponding to each of the image units to be identified; The candidate results of each local crack are mapped to a unified image coordinate system. The candidate results of local cracks with spatial correspondence in the overlapping area are fused to obtain the crack fusion result. Based on the crack fusion result and the crack structure continuity relationship between each candidate result of local cracks, the candidate results of local cracks belonging to the same crack are merged into a candidate crack object. Based on the constraint information of the dam scene, the candidate crack objects are subjected to false detection suppression processing to obtain the target crack object; The target crack object is subjected to crack engineering attribute measurement and embankment segment spatial positioning to obtain the embankment crack extraction results.

2. The method according to claim 1, characterized in that, The associated inspection information includes the spatial location, attitude parameters, camera parameters, and embankment chainage number corresponding to the UAV inspection images; The step of determining the target identification area of ​​the dam in the UAV inspection image based on the associated inspection information includes: Based on the spatial location, the attitude parameters, and the camera parameters, determine the mapping relationship between the UAV inspection image and the dam spatial reference system; Based on the mapping relationship, the preset dam boundary information is mapped to the UAV inspection image to obtain the dam boundary range in the UAV inspection image. The preset dam boundary information includes at least one of the following: dam axis buffer zone, dam top line, slope toe line, slope protection boundary, and geographic information vector boundary. The target identification area of ​​the dam is determined based on the boundary range of the dam and the image coverage of the UAV inspection image, and a correspondence is established between the target identification area of ​​the dam and the dam segment station number.

3. The method according to claim 1, characterized in that, The image resolution features include the ground resolution of the UAV inspection image, and the preset crack identification scale is used to characterize the minimum physical width of the crack to be identified. Based on the image resolution features of the UAV inspection images, the preset crack identification scale, and the scene complexity of the dam target identification area, the dam target identification area is adaptively overlapped and segmented to obtain multiple image units to be identified, including: Based on the preset crack identification scale and the ground resolution, the crack pixel characterization value of the crack to be identified in the UAV inspection image is determined; The image unit scale of the image unit to be identified is determined based on the crack pixel characterization value, the ground resolution, and the input scale of the crack identification model. The overlap rate between adjacent image units to be identified is determined based on the crack pixel characterization value and the scene complexity. The target recognition region of the dam is segmented according to the image unit scale and the overlap rate to obtain the plurality of image units to be recognized.

4. The method according to claim 3, characterized in that, The scene complexity includes the complexity of the dam surface texture and the degree of lighting interference in the dam target recognition area; The step of determining the overlap rate between adjacent image units to be identified based on the crack pixel characterization value and the scene complexity includes: The texture complexity of the embankment surface is determined based on the texture distribution in the target recognition area of ​​the embankment. The degree of light interference is determined based on the light distribution in the target identification area of ​​the dam. Based on the crack pixel characterization value, the embankment texture complexity, and the degree of illumination interference, the preset basic overlap rate is adjusted to obtain the candidate overlap rate; The candidate overlap rate is limited to a preset overlap rate range to obtain the overlap rate between adjacent image units to be identified.

5. The method according to claim 1, characterized in that, The step of performing crack structure enhancement processing on each of the image units to be identified to obtain corresponding enhanced recognition data includes: Extract crack structure response information from the image unit to be identified to characterize at least one of linear structure, edge structure, local contrast and directional texture; Based on the crack structure response information, crack morphology enhancement information corresponding to the image unit to be identified is generated; The enhanced crack morphology information is combined with the image unit to be identified to obtain the enhanced identification data.

6. The method according to claim 1, characterized in that, The local crack candidate results include crack candidate probability information, crack candidate mask, and identification confidence information; The process of mapping each of the local crack candidate results to a unified image coordinate system, fusing local crack candidate results with spatial correspondence within overlapping areas to obtain a crack fusion result, and merging local crack candidate results belonging to the same crack into a candidate crack object based on the crack fusion result and the crack structure continuity relationship between each of the local crack candidate results, includes: The fusion weight of each local crack candidate result is determined based on at least two of the following: the identification confidence information of each local crack candidate result, the positional relationship of candidate pixels in the overlapping area relative to the center of the corresponding image unit to be identified, the overlap relationship between crack candidate masks, and the continuity of crack structure and the consistency of crack boundary. The crack candidate probability information within the overlapping region is fused according to the fusion weight to obtain the crack fusion result; Based on the crack fusion result, and the mask overlap relationship, endpoint proximity relationship and extension direction relationship between different local crack candidate results, it is determined whether different local crack candidate results meet the preset object merging condition, and the local crack candidate results that meet the preset object merging condition are merged into the candidate crack object.

7. The method according to claim 1, characterized in that, The dam scene constraint information includes target area location constraints, crack morphology constraints, local texture constraints, and scene interference area constraints. The process of performing false detection suppression on the candidate crack objects based on dam scene constraint information to obtain the target crack object includes: Determine the crack morphology characterization information of the candidate crack object, and the positional relationship between the candidate crack object and the dam target identification area; Determine the texture similarity relationship between the local texture of the candidate crack object and the preset interference texture, as well as the spatial overlap relationship between the candidate crack object and the predetermined scene interference region; Based on the crack morphology characterization information, the positional relationship, the texture similarity relationship, and the spatial overlap relationship, the false detection suppression evaluation result of the candidate crack object is determined; Based on the false detection suppression evaluation results, the candidate crack objects are retained, the object confidence of the candidate crack objects is reduced, or the candidate crack objects are removed to obtain the target crack object.

8. The method according to claim 1, characterized in that, The associated inspection information includes the embankment section station number, and the crack engineering attributes include crack length, crack width, crack area, crack direction, and crack penetration degree. The process of measuring the engineering attributes of the target crack object and spatially locating the embankment segment to obtain the embankment crack extraction results includes: The target crack object is subjected to connectivity structure analysis and centerline extraction to obtain the crack centerline, crack endpoints and crack boundaries of the target crack object; Based on the crack centerline, crack endpoints, crack boundaries, and the scale transformation relationship corresponding to the UAV inspection image, the crack length, crack width, crack area, and crack orientation of the target crack object are determined. Based on the positional relationship between the crack centerline and the preset dam boundary information, the crack penetration degree of the target crack object is determined; Based on the embankment segment station number, a mapping relationship is established between the target crack object and the corresponding embankment segment station number to obtain the embankment segment spatial location of the target crack object, and the embankment crack extraction result is generated according to the crack engineering attributes and the embankment segment spatial location.

9. The method according to claim 1, characterized in that, The method further includes: Acquire multiple UAV inspection images corresponding to the same embankment section, and map the UAV inspection images of each period and the corresponding embankment crack extraction results to a unified embankment spatial reference system; Based on the spatial positional relationship and crack morphology correspondence between target crack objects in different inspection periods, target crack objects in different inspection periods are matched to obtain a time-series crack object group corresponding to the same crack. Based on the crack engineering attributes of each target crack object in the time-series crack object group, determine the attribute change information and crack propagation direction of the corresponding crack; A correlation analysis region is determined around the cracks corresponding to the time-series crack object group, and image displacement matching is performed on the correlation analysis region at different inspection periods to obtain the slope displacement characteristics of the correlation analysis region. Based on the attribute change information, the spatial proximity between the crack location corresponding to the temporal crack object group and the area corresponding to the slope displacement feature, and the directional consistency between the crack propagation direction and the main displacement direction in the slope displacement feature, the crack development state of the corresponding crack is determined.

10. A dam crack extraction system based on UAV imagery, characterized in that, The system includes: The image acquisition module is used to acquire drone inspection images and related inspection information of the dam area to be inspected; The target area determination module is used to determine the target identification area of ​​the dam in the UAV inspection image based on the associated inspection information. An adaptive segmentation module is used to adaptively overlap and segment the target recognition area of ​​the dam based on the image resolution features of the UAV inspection image, the preset crack recognition scale, and the scene complexity of the target recognition area of ​​the dam, to obtain multiple image units to be recognized. The structural enhancement module is used to perform crack structure enhancement processing on each of the image units to be identified, so as to obtain the corresponding enhanced recognition data. The crack recognition module is used to process the enhanced recognition data using a crack recognition model to obtain local crack candidate results corresponding to each of the image units to be recognized. The fusion and merging module is used to map each of the local crack candidate results to a unified image coordinate system, fuse local crack candidate results with spatial correspondence in the overlapping area to obtain crack fusion results, and merge local crack candidate results belonging to the same crack into a candidate crack object based on the crack fusion results and the crack structure continuity relationship between each of the local crack candidate results. The false detection suppression module is used to perform false detection suppression processing on the candidate crack objects based on the dam scene constraint information to obtain the target crack object; The measurement and positioning module is used to measure the engineering attributes of the cracks and locate the spatial position of the embankment segment on the target crack object, so as to obtain the crack extraction results of the embankment.