Building defect positioning method and system based on unmanned aerial vehicle
By combining drones with artificial intelligence and laser ranging technology, high-precision three-dimensional positioning of defects on building facades has been achieved, solving the problem of large positioning errors in existing technologies and improving the stability and adaptability of the detection.
Patent Information
- Application Number
- CN202511939063.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-22
- Publication Date
- 2026-02-10
AI Technical Summary
Existing UAV building inspection technology is insufficient in terms of 3D positioning accuracy and adaptability to complex surfaces, making it difficult to meet the needs of high-precision building inspection, especially with large positioning errors on irregular surfaces such as reliefs and grids.
By acquiring images of building facades using drones, and using artificial intelligence models to identify defect areas, corrections are made by combining multiple mapping relationships, including mapping the location of defects on the building facade to the location of the drone, mapping the drone pose to the location of defects, and mapping the depth of the defect surface to the distance from the drone. Precise mapping from image pixels to three-dimensional world coordinates is used, combined with laser ranging for depth compensation.
It achieves centimeter-level defect location accuracy on complex building surfaces, improves the stability and adaptability of detection, and solves the problem of large location errors in traditional methods.
Smart Images

Figure CN121505486A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of building defect location, and in particular to a method and system for building defect location based on unmanned aerial vehicles (UAVs). Background Technology
[0002] With the acceleration of urbanization, the demand for building facade inspection is increasing. Traditional inspection methods, such as manual visual inspection and manual suspended platform inspection, suffer from low efficiency, high risk, and high cost. In recent years, UAVs combined with computer vision technology have been gradually applied to the field of building inspection. However, existing methods still face three major technical bottlenecks: first, two-dimensional image positioning cannot reflect the true three-dimensional location of defects on the building facade; second, the positioning accuracy of UAVs is unstable in complex environments, such as wind disturbances and irregular building surfaces; and third, the positioning error is large for defects on irregular surfaces such as reliefs and grilles. These limitations make it difficult for existing technologies to meet the needs of high-precision building inspection, and there is an urgent need for a three-dimensional positioning solution that integrates multi-source data and has dynamic compensation capabilities.
[0003] The increasing societal demand for higher precision in building facade inspection has driven the rapid development of related technologies. UAV-based vision-based inspection methods are currently the mainstream research approach. While these methods can identify defects, they suffer from significant shortcomings in 3D positioning accuracy and adaptability to complex surfaces. Although current AIoT automated inspection systems achieve multi-defect identification, the positioning accuracy of visual SLAM solutions is limited by the texture of the building surface, performing poorly in smooth or repetitive textured areas. While SAR-based 3D imaging technology possesses non-line-of-sight inspection capabilities, its repositioning error exceeds 0.5 meters, and the equipment cost is high. Summary of the Invention
[0004] The purpose of this invention is to solve the aforementioned problems by designing a method and system for locating building defects based on unmanned aerial vehicles (UAVs). To achieve the above objective, this invention provides the following solution:
[0005] A method for locating building defects based on unmanned aerial vehicles (UAVs) includes the following steps:
[0006] S1. Obtain images of the building facade using a drone, and determine whether the projected area of the building facade image contains defects based on an artificial intelligence model. If defects are found, proceed to step S2.
[0007] S2. Correct the location of the building facade defect based on the first mapping relationship between the location of the building facade defect and the location of the UAV;
[0008] S3. Select whether to further correct the location of the defect on the building facade. If correction is selected, further select to correct based on the second or third mapping relationship between the location of the defect on the building facade and the location of the UAV, and execute step S4; if no correction is selected, execute step S6.
[0009] S4. Correct the location of the defects on the building facade;
[0010] S5. Select whether to re-correct the location of the defects on the building facade; if you select to re-correct, repeat step S3; if you select not to correct, proceed to step S6.
[0011] S6. Determine the location of the defects on the building facade.
[0012] As a further improvement to this technical solution, the specific method for acquiring building facade images by drone and determining whether the projected area of the building facade image contains defects based on an artificial intelligence model is as follows: the drone's flight path is planned, and the flight path is parallel to the building facade; the drone flies according to the flight path and collects building facade images; the artificial intelligence model determines whether the building facade contains defects based on the building facade images, and the building facade defects include cracks, leaks, and hollow areas.
[0013] As a further improvement to this technical solution, the artificial intelligence model includes YOLO, DETR, or SSD detection models.
[0014] As a further improvement to this technical solution, the first mapping relationship is the mapping relationship between the location of the defect on the building facade and the coordinates of the UAV; the second mapping relationship is the mapping relationship between the pose of the UAV and the location of the defect on the building facade; and the third mapping relationship is the mapping relationship between the surface depth of the defect on the building facade and the distance between the UAV and the building facade.
[0015] As a further improvement to this technical solution, the specific method of selecting to correct based on the first mapping relationship is as follows: input the coordinates of the vertex of the building facade P=[Wx,Wy,Wz]T and the height H in the spatial coordinate system, obtain the coordinate position information of the UAV in the WGS-84 spherical coordinate system, and establish a transformation relationship between the WGS-84 spherical coordinate system and the spatial coordinate system.
[0016] Establish an image coordinate system. The image coordinates (u, v) of the defect area on the building facade in the image coordinate system are converted to coordinates in the spatial coordinate system using the following formula: , , ):
[0017] ;
[0018] ;
[0019] ;
[0020] in:( , ) represents the coordinates of the center point of the defect image in the image coordinate system. , , Let (u, v) be the position coordinates of the UAV in the spatial coordinate system, (u, v) be the image coordinates of the defect area on the building facade, and (fx, fy) be the camera focal length; then the coordinates in the spatial coordinate system are converted into coordinates in the wall coordinate system.
[0021] Construct the equation of the plane containing the building's facade, and calculate the computational distance from the UAV to the building's facade. The projection range Wp of the left and right directions of the building facade image and the projection range Hp of the top and bottom edges of the building facade image are obtained.
[0022] As a further improvement to this technical solution, the spatial coordinate system is the CGCS2000 geodetic coordinate system, the wall coordinate system is a coordinate system created with the wall of the building to be detected as a two-dimensional plane, the lower left corner as the origin, the X-axis to the right, and the Y-axis upward; the image coordinate system is a coordinate system established with the optical center of the camera coordinate system as the origin, and the z-axis pointing in the shooting direction.
[0023] As a further improvement to this technical solution, the mapping relationship between the UAV pose and the location of the defect on the building facade includes a vertical center mapping relationship, a horizontal center mapping relationship, a vertical boundary mapping relationship, a horizontal boundary mapping relationship, and a center rotation mapping relationship; the specific method for correcting the mapping relationship between the UAV pose and the location of the defect on the building facade is as follows:
[0024] The vertical center mapping relationship is as follows:
[0025] ;
[0026] Where h is the actual height of the center point of the defect on the building's facade, and Dp is the calculated distance between the drone and the building. The pitch angle is used to correct the actual height of the center point of the defect location on the building facade using this vertical center mapping relationship;
[0027] The horizontal center mapping relationship is as follows:
[0028] ;
[0029] ;
[0030] The actual distance of the center point of the defect on the exterior of the building to the left side of the building wall is l, and the projected distance of the center point of the defect on the exterior of the building to the left side of the wall is l. The actual distance of the center point of the defect on the exterior facade of the building to the right side of the building wall is denoted by r, and r is the projected distance of the center point of the defect on the exterior facade of the building to the right side of the building wall. Dp is the yaw angle of the UAV; Dp is the calculated distance between the UAV and the building, and this horizontal center mapping relationship is used to correct the horizontal distance of the image center.
[0031] The vertical boundary mapping relationship is as follows:
[0032] ;
[0033] The camera's tilt angle is 𝜃 𝑝 The vertical viewing angle of the gimbal is 𝛼 v , The vertical boundary of the defect location on the building facade is the actual distance of the vertical direction boundary of the building facade in the vertical direction. The vertical boundary mapping system is used to correct the vertical boundary of the defect on the building facade.
[0034] The horizontal boundary mapping relationship is as follows:
[0035] ;
[0036] Equipment yaw angle 𝜃 y Horizontal angle of the gimbal h ; The horizontal boundary of the defect location on the building facade is the actual distance of the horizontal boundary of the building facade in the horizontal direction. The horizontal boundary mapping relationship is used to correct the horizontal boundary of the defect on the building facade.
[0037] The center rotation mapping relationship is:
[0038] ;
[0039] ;
[0040] in, Let (u,v) be the roll angle, (u,v) be the coordinates of the center point of the building facade defect image before correction, and (u',v') be the coordinates of the center point of the building facade defect image after correction. The center rotation mapping relationship is used to correct the coordinates of the center point of the building facade defect image.
[0041] As a further improvement to this technical solution, the specific method for correction through the mapping relationship between the surface depth of the defect on the building facade and the distance between the UAV and the building facade is as follows: select images from consecutive frames of the building facade image, with an overlap rate of no less than 70% between each frame;
[0042] The actual coordinates of each point within the defect area of the building facade in the spatial coordinate system ( , , The mapping relationship between (x, y, z) and the calculated coordinates in the spatial coordinate system is as follows:
[0043] ;
[0044] ;
[0045] ;
[0046] ΔI = D d -D p ;
[0047] in,( ) represents the direction component of the building facade normal vector. Dd is the actual distance from the building wall measured by the drone. p This is the calculated distance between the drone and the wall of the building.
[0048] A building defect detection system based on unmanned aerial vehicles (UAVs) includes an image receiving and defect judgment module, an image positioning module, a UAV pose correction module, and a distance compensation module.
[0049] The image receiving and defect judgment module is used to receive images of the building facade taken by the drone and to judge whether the building facade contains defects based on the artificial intelligence system.
[0050] The image positioning module is used to correct the center point coordinates of the building facade defect location based on the mapping relationship between the building facade defect location and the UAV coordinates.
[0051] The UAV pose correction module is used to correct the center point of the building facade defect location, the vertical boundary of the building facade defect location, and the horizontal boundary of the building facade defect location based on the mapping relationship between the UAV pose and the location of the building facade defect.
[0052] The distance compensation module is used to correct the coordinates of each point within the defect range of the building facade based on the mapping relationship between the surface depth of the defect and the distance between the UAV and the building facade.
[0053] As a further improvement to this technical solution, if the image receiving module determines that the building facade has defects, it can choose whether to call the image positioning module to correct the location of the building defects; after choosing to call the image positioning module to correct the location of the building defects, it can choose whether to call the UAV pose correction module or the distance compensation module to correct the location of the building defects. Attached Figure Description
[0054] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention.
[0055] Figure 1 This is a flowchart illustrating a method for locating building defects based on unmanned aerial vehicles (UAVs) according to the present invention.
[0056] Figure 2 This is a schematic diagram of the structure of a building defect location system based on an unmanned aerial vehicle (UAV) according to the present invention. Detailed Implementation
[0057] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0058] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” and “described” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this specification means the presence of the described features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0059] The present invention will now be described in detail with reference to the accompanying drawings.
[0060] Example 1
[0061] like Figure 1 The diagram shows a flowchart of a method for locating building defects based on unmanned aerial vehicles (UAVs).
[0062] To achieve real-time location of detection results, a precise mapping relationship is established between the pixel coordinate system of the UAV-captured images and the 3D world coordinate system of the building. First, a spatial coordinate system is established, using the CGCS2000 geodetic coordinate system. The coordinates of the building's exterior vertex are input into this spatial coordinate system as P=[Wx,Wy,Wz]. T And height H. In the spatial coordinate system, taking the wall of the building to be inspected as a two-dimensional plane, with the lower left corner as the origin, the right as the X-axis, and the top as the Y-axis, a two-dimensional relative coordinate system for the wall of the building to be inspected is created. The UAV coordinate system is the WGS-84 spherical coordinate system, with the origin at the Earth's center of mass, its Z-axis pointing towards the Earth's poles, its X-axis pointing towards the intersection of the zero meridian and the equator, and the Y-axis perpendicular to the Z-axis and X-axis, forming a right-handed coordinate system. The mapping relationship between the UAV coordinate system, the spatial coordinate system, and the two-dimensional relative coordinate system of the wall of the building to be inspected is established.
[0063] Establish an image coordinate system. The image coordinates (u, v) of the defect area on the building facade in the image coordinate system are converted to coordinates in the spatial coordinate system using the following formula: , , ):
[0064] ;
[0065] ;
[0066] ;
[0067] in:( , ) represents the coordinates of the center point of the defect image in the image coordinate system. , , (u, v) are the position coordinates of the UAV in the spatial coordinate system, (u, v) are the image coordinates of the defect area on the building facade, and (fx, fy) are the camera focal length; the camera coordinate system is with the camera optical center as the origin, the z-axis pointing in the shooting direction, the x-axis pointing to the right of the plane perpendicular to the shooting direction, and the y-axis pointing upwards of the plane perpendicular to the shooting direction.
[0068] Plan the drone's flight path, parallel to the building facade to be inspected. The drone flies along the planned path and acquires images of the building facade. Substituting image dimensions w and h, the left-right projection range Wp and the top and bottom projection range Hp of the building facade image can be obtained. Set a judgment threshold; areas exceeding the left, right, and height of the building facade, such as the sky or other nearby building backgrounds, are classified as invalid areas. By substituting the position and size of the defect target, the actual position and size of the defect in the planar projection can be obtained, and the height of the target above the ground and the width of its left and right edges can be further calculated. Use artificial intelligence models such as YOLO, DETR, or SSD to detect whether the facade image contains defective areas, which are marked with rectangular outlines. Defects on the building facade that can be identified by the artificial intelligence model include cracks, leaks, and hollow areas.
[0069] Correction is performed by utilizing the mapping relationship between the location of defects on the building facade and the coordinates of the UAV. Image coordinates are converted to camera coordinates, UAV coordinates are converted to spatial coordinates, and spatial coordinates are converted to coordinates in a two-dimensional relative coordinate system of the building wall to be inspected. This determines the location of the defect area in the two-dimensional relative coordinate system of the building wall. The normal vector can be obtained from the coordinates P of the building facade vertex. The planar equation of the wall to be inspected is constructed, thereby enabling the calculation of the distance from the drone to the building facade. .
[0070] Choose whether to further correct the location of defects on the building facade. If correction is selected, further options are available: either use the mapping relationship between the UAV pose and the location of the defects, or use the mapping relationship between the surface depth of the defects and the distance between the UAV and the building facade. After correction is complete, you can again choose whether to further correct the location of the defects and which mapping relationship to use.
[0071] The reason for needing to use the mapping relationship between the UAV pose and the location of defects on the building facade for correction is that in actual applications, it is difficult for the UAV lens to maintain strict perpendicularity to the plane, and it will tilt in three directions: yaw, pitch, and roll. Therefore, it is necessary to use the attitude information measured by the UAV IMU to correct the location results of defects on the building facade.
[0072] When the drone or its onboard gimbal has a pitch angle, the center of the defect area image will deviate from the actual vertical direction, causing a systematic deviation in the target height measurement. To correct this, the vertical height of the defect area image center is adjusted. The following mapping relationship can be used for correction:
[0073] ;
[0074] Where h is the actual height of the center point of the defect on the building facade, and Dp is the calculated distance between the drone and the building. The pitch angle is the angle of elevation. If the pitch angle is positive, that is, the camera is tilted upwards, the height of the measurement point is underestimated and positive compensation is required; otherwise, negative compensation is required.
[0075] When a drone or its onboard gimbal has a yaw angle, the center of the image of the defective area will be shifted in the horizontal direction. This can be corrected using the following mapping relationship:
[0076] ;
[0077] ;
[0078] The actual distance of the center point of the defect on the exterior of the building to the left side of the building wall is l, and the projected distance of the center point of the defect on the exterior of the building to the left side of the wall is l. The actual distance of the center point of the defect on the exterior facade of the building to the right side of the building wall is denoted by r, and r is the projected distance of the center point of the defect on the exterior facade of the building to the right side of the building wall. Dp is the yaw angle of the drone; Dp is the calculated distance between the drone and the building; when the device yaws to the right, that is, when the yaw angle is positive, the object on the left is compressed in the image and the object on the right is stretched, so directional compensation is required for the distances on the left and right sides respectively; otherwise, negative compensation is required respectively.
[0079] The angular deviation of the building facade defect boundary can also cause the defect location boundary to shift. Based on the geometric distortion correction of the image edge pixels, the actual offset of the target boundary is corrected to achieve spatial compensation of the four boundaries (up, down, left, and right), thereby improving the accuracy of target contour extraction.
[0080] Under the combined effect of the drone's pitch angle and the gimbal's vertical viewing angle, the longitudinal projection of the vertical boundary of a building's facade defect will undergo nonlinear stretching or compression, with the following mapping relationship:
[0081] ;
[0082] The camera's tilt angle is φ, and the gimbal's vertical angle of view is φv. The vertical boundary of the building facade defect is the actual distance in the vertical direction of the building facade. This vertical boundary mapping system is used to correct the vertical boundary of the building facade defect. A positive pitch angle will cause the top of the image to appear farther away and the bottom closer; a negative pitch angle will have the opposite effect.
[0083] Under the combined effect of the UAV yaw angle yy and the gimbal's horizontal viewing angle θh, the lateral projection of the horizontal boundary of the building facade defect will undergo nonlinear stretching or compression, with the mapping relationship as follows:
[0084] ;
[0085] Equipment yaw angle 𝜃 y Horizontal angle of the gimbal h ; The horizontal boundary of the defect location on the building facade is the actual distance in the horizontal direction of the building facade. The horizontal boundary mapping relationship is used to correct the horizontal boundary of the defect on the building facade.
[0086] The boundary compensation process described above can effectively eliminate target size estimation errors caused by viewing angle tilt, ensuring the geometric consistency of the measurement frame.
[0087] When a drone rolls, the lateral tilt of the entire platform directly causes the image coordinate system to rotate, which in turn causes the target's attitude deviation in the two-dimensional plane. The center of the defect on the building facade rotates, and the mapping relationship is as follows:
[0088] ;
[0089] ;
[0090] in, Let (u,v) be the roll angle, (u,v) be the coordinates of the center point of the building facade defect image before correction, and (u',v') be the coordinates of the center point of the building facade defect image after correction. This center rotation mapping relationship is used to correct the coordinates of the center point of the building facade defect image. This correction can accurately compensate for the target's direction and position deviation caused by roll, thereby improving the stability and accuracy of target positioning and attitude estimation.
[0091] The reason for needing to use the mapping relationship between the surface depth of defects on the building facade and the distance between the UAV and the building facade for correction is that the building surface has complex facade structures, such as reliefs, grooves, and cantilevered components. To further improve the 3D positioning accuracy of defects under complex facade structures, an image center neighborhood depth compensation mechanism based on laser ranging is introduced. This step fully utilizes the spatiotemporal synchronization characteristics of the lidar ranging module and image data to achieve distance correction compensation based on the actual target surface depth, ensuring centimeter-level accuracy consistency on complex geometric surfaces.
[0092] Before performing distance compensation, sufficient spatial overlap between image sequences must be ensured to achieve effective correspondence between images and laser ranging data. The UAV's flight path and speed are controlled to maintain an overlap rate of at least 70% between image frames. A fixed frame rate and synchronous triggering with the laser radar are used to ensure that each image frame can be matched with corresponding laser ranging information. Image frames are preprocessed to select datasets with usable overlapping areas for compensation.
[0093] The target region is selected by choosing the center point of the target detection box in the image and its neighborhood. The corresponding LiDAR ranging echo points are matched, and using the principle of minimum projection error, the LiDAR point with the smallest angle and distance error relative to the center point is selected as the target depth reference value. In cases of sparse point clouds or mismatched viewing angles, an interpolation method based on neighborhood weighted average is used to estimate the depth value near the center point. The actual distance Dd measured by the UAV from the building wall is used instead of the calculated distance Dp calculated based on the facade normal and geometric model.
[0094] The actual coordinates of each point within the defect area of the building facade in the spatial coordinate system ( , , The mapping relationship between (x, y, z) and the calculated coordinates in the spatial coordinate system is as follows:
[0095] ;
[0096] ;
[0097] ;
[0098] ΔI = D d -D p ;
[0099] in,( ) represents the direction component of the building facade normal vector. Dd is the actual distance from the building wall measured by the drone. pThis calculates the distance between the drone and the building wall. For the position and size of each defect target box, the coordinates of the four corner points are converted and then corrected by depth projection to improve the overall contour positioning accuracy.
[0100] Example 2
[0101] like Figure 2 The figure shows a schematic diagram of a building defect location system based on unmanned aerial vehicles (UAVs).
[0102] A building defect detection system based on unmanned aerial vehicles (UAVs) includes an image receiving and defect judgment module, an image positioning module, a UAV pose correction module, and a distance compensation module.
[0103] The image receiving module is used to receive images of the building facade taken by the drone and to determine whether the building facade has defects based on the artificial intelligence system. If the building facade is found to have defects, the image positioning module can be selected to correct the image of the building facade with defects.
[0104] The image localization module is used to correct the center point coordinates of the building facade defects based on the mapping relationship between the location of the defects and the UAV coordinates. After the image localization module completes the correction, users can further choose whether to call the UAV pose correction module or the distance compensation module to correct the image of the building facade containing the defects. After the correction is completed, users can again choose whether to call the UAV pose correction module or the distance compensation module to correct the image of the building facade containing the defects.
[0105] The UAV pose correction module is used to correct the center point of the building facade defect location, the vertical boundary of the building facade defect location, and the horizontal boundary of the building facade defect location based on the mapping relationship between the UAV pose and the location of the building facade defect.
[0106] The distance compensation module is used to correct the coordinates of each point within the building facade defect range based on the mapping relationship between the surface depth of the building facade defect and the distance between the drone and the building facade.
[0107] In summary, this invention proposes a method and system for locating building defects based on unmanned aerial vehicles (UAVs). It constructs a complete spatial mapping system from image acquisition and attitude correction to depth compensation, comprehensively improving the detection accuracy and stability in complex building surface environments. It establishes a precise correspondence between image pixels and the three-dimensional space of the building, achieving high-precision projection of the defect target from the image plane to spatial coordinates. The system achieves centimeter-level positioning accuracy of the defect target on the building surface, effectively overcoming the shortcomings of traditional methods for locating defects on building facades, such as high cost of 3D modeling, large positioning errors, and poor adaptability to complex structures.
Claims
1. A method for locating building defects based on unmanned aerial vehicles (UAVs), characterized in that, Includes the following steps: S1. Obtain images of the building facade using a drone, and determine whether the projected area of the building facade image contains defects based on an artificial intelligence model. If defects are found, proceed to step S2. S2. Correct the location of the building facade defect based on the first mapping relationship between the location of the building facade defect and the location of the UAV; S3. Select whether to further correct the location of the defect on the building facade. If correction is selected, further select to correct based on the second or third mapping relationship between the location of the defect on the building facade and the location of the UAV, and execute step S4; if no correction is selected, execute step S6. S4. Correct the location of the defects on the building facade; S5. Select whether to re-correct the location of the defects on the building facade; if you select to re-correct, repeat step S3; if you select not to correct, proceed to step S6. S6. Determine the location of the defects on the building facade.
2. The method for locating building defects based on unmanned aerial vehicles (UAVs) according to claim 1, characterized in that, The specific method for acquiring images of a building's exterior facade using a drone and determining whether the projected area of the building's exterior facade image contains defects based on an artificial intelligence model is as follows: the drone's flight path is planned, and the flight path is parallel to the building's exterior facade; the drone flies along the flight path and acquires images of the building's exterior facade. The artificial intelligence model uses images of the building's exterior facade to determine whether the facade contains defects, including cracks, leaks, and hollow areas.
3. The method for locating building defects based on unmanned aerial vehicles (UAVs) according to claim 1, characterized in that, The artificial intelligence model includes YOLO, DETR, or SSD detection models.
4. The method for locating building defects based on unmanned aerial vehicles (UAVs) according to claim 1, characterized in that, The first mapping relationship is the mapping relationship between the location of the defect on the building facade and the coordinates of the UAV; the second mapping relationship is the mapping relationship between the pose of the UAV and the location of the defect on the building facade; the third mapping relationship is the mapping relationship between the surface depth of the defect on the building facade and the distance between the UAV and the building facade.
5. A method for locating building defects based on unmanned aerial vehicles (UAVs) according to claim 4, characterized in that, The specific method for selecting the correction based on the first mapping relationship is as follows: input the coordinates of the building's exterior vertex P=[Wx,Wy,Wz] in the spatial coordinate system. T Based on the altitude H, obtain the coordinate position information of the UAV in the WGS-84 spherical coordinate system, and establish a transformation relationship between the WGS-84 spherical coordinate system and the spatial coordinate system; Establish an image coordinate system. The image coordinates (u, v) of the defect area on the building facade in the image coordinate system are converted to coordinates in the spatial coordinate system using the following formula: , , ): ; ; ; in:( , ) represents the coordinates of the center point of the defect image in the image coordinate system. , , Let (u, v) be the position coordinates of the UAV in the spatial coordinate system, (u, v) be the image coordinates of the defect area on the building facade, and (fx, fy) be the camera focal length; then the coordinates in the spatial coordinate system are converted into coordinates in the wall coordinate system. Construct the equation of the plane containing the building's facade, and calculate the computational distance from the UAV to the building's facade. The projection range Wp of the left and right directions of the building facade image and the projection range Hp of the top and bottom edges of the building facade image are obtained.
6. The method for locating building defects based on unmanned aerial vehicles (UAVs) according to claim 5, characterized in that, The spatial coordinate system is the CGCS2000 geodetic coordinate system. The wall coordinate system is a coordinate system created with the wall of the building to be detected as a two-dimensional plane, with the lower left corner as the origin, the X-axis to the right, and the Y-axis upward. The image coordinate system is a coordinate system established with the optical center of the camera coordinate system as the origin and the z-axis pointing in the shooting direction.
7. A method for locating building defects based on unmanned aerial vehicles (UAVs) according to claim 4, characterized in that, The mapping relationship between the UAV pose and the location of the defect on the building facade includes a vertical center mapping relationship, a horizontal center mapping relationship, a vertical boundary mapping relationship, a horizontal boundary mapping relationship, and a center rotation mapping relationship; the specific method for correcting the mapping relationship between the UAV pose and the location of the defect on the building facade is as follows: The vertical center mapping relationship is as follows: ; Where h is the actual height of the center point of the defect on the building's facade, and Dp is the calculated distance between the drone and the building. The pitch angle is used to correct the actual height of the center point of the defect location on the building facade using this vertical center mapping relationship; The horizontal center mapping relationship is as follows: ; ; The actual distance of the center point of the defect on the exterior of the building to the left side of the building wall is l, and l is the projected distance of the center point of the defect on the exterior of the building to the left side of the wall. The actual distance of the center point of the defect on the exterior facade of the building to the right side of the building wall is denoted by r, and r is the projected distance of the center point of the defect on the exterior facade of the building to the right side of the building wall. Dp is the yaw angle of the UAV; Dp is the calculated distance between the UAV and the building, and this horizontal center mapping relationship is used to correct the horizontal distance of the image center. The vertical boundary mapping relationship is as follows: ; The camera's tilt angle is 𝜃 𝑝 The vertical viewing angle of the gimbal is 𝛼 v , The vertical boundary of the defect location on the building facade is the actual distance of the vertical direction boundary of the building facade in the vertical direction. The vertical boundary mapping system is used to correct the vertical boundary of the defect on the building facade. The horizontal boundary mapping relationship is as follows: ; Equipment yaw angle 𝜃 y Horizontal angle of the gimbal h ; The horizontal boundary of the defect location on the building facade is the actual distance of the horizontal boundary of the building facade in the horizontal direction. The horizontal boundary mapping relationship is used to correct the horizontal boundary of the defect on the building facade. The center rotation mapping relationship is: ; ; in, Let (u,v) be the roll angle, (u,v) be the coordinates of the center point of the building facade defect image before correction, and (u',v') be the coordinates of the center point of the building facade defect image after correction. The center rotation mapping relationship is used to correct the coordinates of the center point of the building facade defect image.
8. A method for locating building defects based on unmanned aerial vehicles (UAVs) according to claim 4, characterized in that, The specific method for correcting the surface depth of the defect on the building facade by means of the mapping relationship between the UAV and the distance between the building facade and the building facade is as follows: select images from consecutive frames of the building facade image, and the overlap rate between each frame of the image is not less than 70%; The actual coordinates of each point within the defect area of the building facade in the spatial coordinate system ( , , The mapping relationship between (x, y, z) and the calculated coordinates in the spatial coordinate system is as follows: ; ; ; Δ𝐷=D d -D p ; in,( ) represents the direction component of the building facade normal vector. Dd is the actual distance from the building wall measured by the drone. p This is the calculated distance between the drone and the wall of the building.
9. A UAV-based building defect detection system, using a UAV-based building defect localization method as described in any one of claims 1 to 8, characterized in that, Includes an image receiving and defect judgment module, an image positioning module, a UAV pose correction module, and a distance compensation module; The image receiving and defect judgment module is used to receive images of the building facade taken by the drone and to judge whether the building facade contains defects based on the artificial intelligence system. The image positioning module is used to correct the center point coordinates of the building facade defect location based on the mapping relationship between the building facade defect location and the UAV coordinates. The UAV pose correction module is used to correct the center point of the building facade defect location, the vertical boundary of the building facade defect location, and the horizontal boundary of the building facade defect location based on the mapping relationship between the UAV pose and the location of the building facade defect. The distance compensation module is used to correct the coordinates of each point within the defect range of the building facade based on the mapping relationship between the surface depth of the defect and the distance between the UAV and the building facade.
10. A building defect detection system based on unmanned aerial vehicles (UAVs) according to claim 9, characterized in that, The image receiving module determines that the building facade has defects and can choose whether to call the image positioning module to correct the location of the defects in the building. After choosing to call the image positioning module to correct the location of the defects in the building, it can choose whether to call the UAV pose correction module or the distance compensation module to correct the location of the defects in the building.