Irregular roof flatness detection method and device and computer equipment

By combining RTK positioning modules and COLMAP-MVORM technology, efficient and accurate detection of the flatness of irregular roofs is achieved, solving the problems of low efficiency and insufficient accuracy in existing technologies. It adapts to complex roof designs and improves the convenience and applicability of the detection.

CN120970541APending Publication Date: 2025-11-18TONGJI UNIV +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202511084886.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-04
Publication Date
2025-11-18

AI Technical Summary

Technical Problem

Existing technologies are inefficient and have limited accuracy in detecting the flatness of irregular roofs, making it difficult to adapt to complex and irregular roof shapes, and failing to simultaneously guarantee high efficiency, high accuracy, and good adaptability.

Method used

A drone equipped with an RTK positioning module is used to perform multi-view oblique photography. The data is processed using COLMAP-MVORM technology to generate regular quadrilateral blocks and fine-tune the boundary points. The flatness is analyzed by linearly fitting the height values ​​of the three-dimensional point coordinates, and an inspection report is generated.

Benefits of technology

It significantly improves inspection efficiency and accuracy, can flexibly adapt to various complex roof designs, provides detailed and accurate roof condition assessments, and promotes the precision and reliability of roof maintenance work.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120970541A_ABST
    Figure CN120970541A_ABST
Patent Text Reader

Abstract

The invention discloses an irregular roof flatness detection method and device and computer equipment. The method comprises the following steps: acquiring roof data shot by an unmanned aerial vehicle equipped with an RTK positioning module; wherein the roof data is data obtained by carrying out multi-view oblique photography through an unmanned aerial vehicle and processing through a COLMAP-MVORM technology; processing the roof data into regular quadrilateral blocks, finely adjusting boundary points of the blocks to enable the boundary points to accord with the appearance structure of the roof, and generating plane measurement points in boundaries; and projecting a plane measurement point to an actual model, analyzing the flatness through linearly fitting a three-dimensional point coordinate height value, and generating a detection report. By implementing the method, the detection efficiency and precision are greatly improved, various complex roof designs can be better adapted, and particularly, the method has the advantage in the aspect of solving the flatness detection problem of irregular roofs.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to a flatness detection method, more particularly to an irregular roof flatness detection method, device and computer equipment. BACKGROUND

[0002] With the rapid development of the construction industry, the maintenance and operation management of buildings have gradually become the focus. Roof flatness, as a key detection content in the operation and maintenance stage, is crucial to ensuring the safety of building structures and long-term use performance. Especially in complex roof designs, uneven roofs can lead to uneven load bearing, affect building stability under extreme weather conditions, and may cause problems such as failure of waterproof function and damage to aesthetic level. Traditionally, roof flatness detection relies on manual point-by-point measurement using tools such as rulers, calipers or levels, which is inefficient and has limited accuracy, making it difficult to meet the high standards of modern buildings.

[0003] In recent years, the application of artificial intelligence technologies such as computer vision has brought new possibilities to the construction field, providing efficient and intuitive feedback on roof conditions. However, in complex environments, existing technologies still face challenges in terms of efficiency, accuracy and adaptability. For example, US patent US10571141 achieves humidity, temperature and other parameter measurement through sensor integration, but the cost is relatively high; Korean patent KR1020210011807 provides a load detection system with a buffer recovery function, but it is mainly aimed at specific application scenarios; Japanese patent JP1996093229 uses a probe to accurately detect roof positioning during installation, which is suitable for ensuring position accuracy during installation; Chinese invention patent CN118602930A uses current changes to feedback flatness, improving measurement accuracy, but the device is relatively complex; Chinese invention patent CN119197391A uses a three-dimensional scanning technology-based wall flatness detection method, which has high accuracy but a long process, making it difficult to popularize. In addition, many academic articles discuss the application of advanced technologies such as drones and deep learning in roof monitoring, although these studies have promoted technological progress, there are still limitations in dealing with irregular roofs, mainly in that existing methods are difficult to ensure high efficiency, high accuracy and good adaptability when applied to complex and irregularly shaped roofs.

[0004] Therefore, it is necessary to design a new method that not only greatly improves detection efficiency and accuracy, but also better adapts to various complex roof designs, especially in solving the problem of irregular roof flatness detection. SUMMARY

[0005] The present application aims to overcome the shortcomings of the prior art and provide an irregular roof flatness detection method, device and computer equipment.

[0006] In order to achieve the above object, the present application adopts the following technical scheme: the irregular roof flatness detection method comprises:

[0007] Obtaining roof data photographed by a UAV equipped with an RTK positioning module; wherein the roof data is obtained by multi-view oblique photography of the UAV, and the obtained data is processed by a COLMAP-MVORM technology;

[0008] Processing the roof data into regular quadrilateral blocks, and fine-tuning the boundary points of the blocks so that the boundary points conform to the outer shape structure of the roof, and generating plane measurement points within the boundary;

[0009] Projecting the plane measurement points onto an actual model, analyzing the flatness by linear fitting the three-dimensional point coordinate height values, and generating a detection report.

[0010] Further technical schemes thereof are as follows: the forming process of the roof data comprises:

[0011] The UAV is equipped with an RTK positioning module and a camera, and the flight route is set horizontally according to the shooting area, and the UAV performs oblique photography at a fixed height to obtain a primary oblique photography result;

[0012] Based on the primary oblique photography result, the UAV flight route is re-planned, and fine photography is performed at low altitude to obtain an image;

[0013] Based on the image, a COLMAP-MVORM technology is used to perform accurate modeling to obtain the roof data.

[0014] Further technical schemes thereof are as follows: the accurate modeling based on the image to obtain the roof data comprises:

[0015] Adding a constraint condition to the image for initial screening, determining the actual field of view range, and identifying the to-be-matched image pairs and screening out irrelevant image pairs;

[0016] Applying a multi-scale bidirectional optimization algorithm to the to-be-matched image pairs to extract and match image features to obtain the roof data.

[0017] Further technical schemes thereof are as follows: the application of the multi-scale bidirectional optimization algorithm to the to-be-matched image pairs to extract and match image features to obtain the roof data comprises:

[0018] Using a SUSAN operator to simulate the sensitivity of human eyes to edge information, extracting roof groove surface details of the to-be-matched image as edge feature points, and generating a multi-scale feature descriptor adaptive to different resolutions by improving a SIFT descriptor and combining an image pyramid structure;

[0019] The multi-scale feature descriptor is matched by using a bidirectional matching method to obtain a preliminary matched point;

[0020] The preliminary matched point pairs are screened by using a RANSAC algorithm to obtain matched images;

[0021] For all matched images, two images are selected for initialization, the relative positions of the two initialization images are calculated, and a three-dimensional point is generated by using a triangulation method, global adjustment is performed on the three-dimensional point to optimize the initial pose and connection points, and inaccurate data is filtered out, when the three-dimensional point reaches the global adjustment condition, multiple global iterative refinements are performed to obtain a sparse reconstruction result;

[0022] Based on the sparse reconstruction result, depth information is estimated, a depth map and an RGB image are fused, and a final dense point cloud and a mesh model are generated to obtain roof data.

[0023] A further technical solution is that the roof data is processed into a regular quadrilateral block, and the boundary points of the block are fine-tuned so that the boundary points conform to the outer shape structure of the roof, and a plane measurement point is generated within the boundary, comprising:

[0024] A corresponding roof model is cut out from the point cloud model corresponding to the roof data according to a preset roof boundary point coordinate;

[0025] The roof model is converted into a regular quadrilateral by topological geometric calculation and a specific processing method to obtain boundary points;

[0026] The boundary points are fine-tuned, and an image processing algorithm is used to optimize the boundary point positions of the regular quadrilateral to the midlines of adjacent grooves.

[0027] A further technical solution is that the roof model is converted into a regular quadrilateral by topological geometric calculation and a specific processing method to obtain boundary points of the regular quadrilateral, comprising:

[0028] When the roof model is a regular polygon roof, it is processed according to the method of an irregular roof; when the roof model is a roof with an arc-shaped boundary, the arc-shaped region of the roof model is cut out first, and the cut-out roof model is processed according to the method of an irregular polygon; when the roof model is an irregular polygon roof, the adjacency relationship of the roof model is extracted and preprocessed, the main direction is determined through topological structure analysis, the best division line is found, and the division scheme is calculated by using a Voronoi diagram generation technology, after the sub-regions are preliminarily divided according to the division scheme, a least square method is applied for straight line fitting, the boundary is adjusted so that the boundary is arranged along the horizontal or vertical direction, and a regular quadrilateral is formed to obtain boundary points.

[0029] Further technical solutions are as follows: the boundary points of the regular quadrilateral are fine-tuned, and an image processing algorithm is used to optimize the position of the boundary points of the regular quadrilateral to the center line of the adjacent groove, including:

[0030] A certain range is selected around the boundary points of the regular quadrilateral to generate a local image;

[0031] A Canny edge detection and Hough transform algorithm is applied to identify the position of the local groove boundary line in the local image to obtain the nearest groove center line;

[0032] A multivariate scalar function minimization method is used to optimize the position of the boundary points of the regular quadrilateral, a distance cost function of the boundary points to the nearest groove center line is constructed, and the function value is minimized.

[0033] Further technical solutions are as follows: the planar measurement points are projected onto the actual model, the flatness is analyzed by linear fitting of three-dimensional point coordinate height values, and a detection report is generated, including:

[0034] A plurality of parallel slope grooves are distinguished by different colors, and are distinguished by different colors, wherein the groove spacing is adjusted according to the roof edge line angle, and the planar measurement points are projected onto the actual model to determine the three-dimensional coordinates of the measurement points on each slope groove, and the RANSAC algorithm is used to linearly fit and smooth the measurement points. Noise, calculate the flatness of each groove and draw an image, and based on a set threshold, identify and determine the height change of the slope groove and the flatness of the vertical direction groove;

[0035] According to the flatness of the vertical direction groove and the height change of the slope groove, the overall result is analyzed based on a threshold, and a detection report containing flatness, mechanical analysis and safety status is generated.

[0036] The application also provides an irregular roof flatness detection device, including:

[0037] An acquisition unit is configured to acquire roof data captured by a UAV equipped with an RTK positioning module; wherein the roof data is obtained by multi-view oblique photography of the UAV, and the data is processed by COLMAP-MVORM technology;

[0038] A processing unit is configured to process the roof data into a regular quadrilateral block, fine-tune the boundary points of the block, and make the boundary points conform to the outer shape structure of the roof, and generate planar measurement points within the boundary;

[0039] An analysis unit is configured to project the planar measurement points onto the actual model, analyze the flatness by linear fitting of three-dimensional point coordinate height values, and generate a detection report.

[0040] The application further provides a computer device including a memory and a processor, wherein the memory stores a computer program, and the processor implements the method described above when executing the computer program.

[0041] The application has the following advantages compared with the prior art: the application uses a UAV equipped with an RTK positioning module to obtain roof data through multi-view oblique photography, and uses COLMAP-MVORM technology to process the data, thereby realizing high-precision three-dimensional reconstruction of the roof. Subsequently, the obtained data is processed into regular quadrilateral blocks, and the boundary points are fine-tuned to optimize the regular quadrilateral boundary, and the measurement points are determined within the boundary, and finally the measurement points are projected onto the actual model, the flatness of the roof is analyzed by linear fitting the three-dimensional point coordinate height values, and a detailed detection report is generated. This method not only significantly improves the detection efficiency and accuracy, but also can flexibly adapt to various complex roof designs, especially in solving the problem of irregular roof flatness detection, and has unique advantages. With the help of high-precision positioning and advanced image processing technology, this method can provide detailed and accurate roof condition evaluation while ensuring efficient operation, greatly improving the accuracy and reliability of roof maintenance work.

[0042] The application will be further described below in conjunction with the drawings and specific embodiments. BRIEF DESCRIPTION OF DRAWINGS

[0043] In order to more clearly illustrate the technical solutions of the embodiments of the application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the application, and other drawings can be obtained by those skilled in the art without creative labor.

[0044] Figure 1 The application provides an application scenario diagram of the irregular roof flatness detection method.

[0045] Figure 2 The application provides a flowchart of the irregular roof flatness detection method.

[0046] Figure 3 The application provides a schematic diagram of a hotel project.

[0047] Figure 4 The application provides a schematic diagram of adding constraint conditions to the image for preliminary screening.

[0048] Figure 5 The application provides a schematic diagram of dividing the roof model into regular quadrilaterals through topology.

[0049] Figure 6 is a schematic diagram of a rule four-edge boundary point fine-tuning effect provided in an embodiment of the present application;

[0050] Figure 7 is a schematic diagram of rapid one-time output of a large number of grooves provided in an embodiment of the present application;

[0051] Figure 8 is a projection effect diagram of a planar measurement point to a three-dimensional measurement point on a Mesh model provided in an embodiment of the present application;

[0052] Figure 9 is a schematic block diagram of an irregular roof flatness detection device provided in an embodiment of the present application;

[0053] Figure 10 is a schematic block diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0054] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present application.

[0055] It should be understood that, when used in the specification and the appended claims, the terms "comprise" and "include" indicate the presence of described features, integers, steps, operations, elements, and / or components, but do not exclude one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0056] It should also be understood that the terms used in the present application specification are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in the present application specification and the appended claims, unless otherwise clearly indicated by the context, the singular forms "a", "an" and "the" are intended to include the plural forms.

[0057] It should be further understood that the term "and / or" used in the present application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes these combinations.

[0058] Please refer to Figure 1 and Figure 2 , Figure 1 is a schematic diagram of an application scenario of an irregular roof flatness detection method provided in an embodiment of the present application. Figure 2A schematic flowchart of the irregular roof flatness detection method provided by the embodiment of the present application. The irregular roof flatness detection method is applied to a server which interacts with a terminal and a drone, and performs multi-view oblique photography through a drone equipped with an RTK (Real-Time Kinematic) positioning module, and accurately models by using a COLMAP-MVORM technology, combines image processing algorithms and topological geometric calculations to convert irregular roofs into regular quadrilateral blocks to optimize the boundary point position, uses a SUSAN (Smallest Univalue Segment Assimilating Nucleus) operator and an improved SIFT (Scale-Invariant Feature Transform) descriptor to extract edge feature points, uses a RANSAC (Random Sample Consensus) algorithm to screen matching point pairs, realizes sparse reconstruction and dense point cloud generation, and then uses linear fitting three-dimensional point coordinate height value analysis flatness, solves the problem of flatness detection of complex roof design, especially irregular roof, greatly improves the detection efficiency and accuracy. This method not only can quickly adapt to various complex roof structures, but also can significantly improve the operation convenience and application range while ensuring the accuracy of the data, so that the flatness detection of irregular roof is more efficient and accurate.

[0059] Figure 2 is a flowchart of the irregular roof flatness detection method provided by the embodiment of the present application. As shown in Figure 2 , the method comprises the following steps S110 to S130.

[0060] S110, acquiring roof data photographed by a drone equipped with an RTK positioning module; wherein the roof data is obtained by multi-view oblique photography of the drone, and the data obtained is processed by a COLMAP-MVORM technology.

[0061] In this embodiment, the roof data refers to the roof images and corresponding position information obtained by multi-view oblique photography of the drone equipped with the RTK positioning module, and the point cloud and mesh model data containing the accurate three-dimensional structure and texture characteristics of the roof generated after processing by the COLMAP-MVORM technology.

[0062] First, install a high-resolution camera and an RTK positioning module on the drone. The RTK positioning technology provides centimeter-level accurate position information, which is crucial for obtaining accurate roof data. The camera is used to take high-quality images.

[0063] Next, the UAV follows the preset flight path at a fixed flight height and angle (e.g., 45 degrees tilt) to take multi-angle oblique photographs of the target roof. This photography method can capture information from multiple angles on the roof surface, helping to generate a more complete and accurate three-dimensional model. For large-area weak-textured or high-similarity roofs, this method is particularly effective, as it can provide rich visual information for subsequent modeling and analysis. Specifically, the UAV flies twice to perform rough modeling and then fine modeling.

[0064] The obtained images are then processed by the COLMAP-MVORM technology. This technology mainly includes several sub-steps:

[0065] According to the location of the shooting point, the angle of view, and the roughly established roof model, the actual field of view range of all shooting points is determined, and the images in the overlapping area are defined as image pairs to be matched. This step reduces the interference of irrelevant image pairs and improves the efficiency of subsequent image matching.

[0066] The improved SIFT descriptor is used in combination with the multi-resolution perception characteristics of the human eye to construct a multi-scale feature descriptor, and the SUSAN operator is selected as the feature detector to extract the edge feature points of the roof images. Then, a bidirectional matching algorithm is used to preliminarily match these feature descriptors to improve the uniqueness of the feature points and the matching accuracy.

[0067] Based on the above steps, after the initial image registration, local iterative refinement and global iterative refinement are performed to gradually improve the accuracy of the current reconstruction model. Finally, a complete point cloud model is obtained through incremental sparse reconstruction, and a dense point cloud is output by fusing the depth map and the RGB image to form a complete mesh model.

[0068] Through the above steps, step S110 not only ensures the high-precision acquisition of roof data, but also provides a solid foundation for subsequent regular quadrilateral block division and flatness analysis. This method significantly improves the efficiency and accuracy of irregular roof flatness detection, and is particularly suitable for complex structures and designed roofs.

[0069] In this embodiment, the formation process of the roof data includes steps S111-S113.

[0070] S111, the UAV is equipped with an RTK positioning module and a camera, and the flight route is set horizontally along the shooting area trend. The UAV performs oblique photography at a fixed height and a set angle to obtain the initial oblique photography result.

[0071] In this embodiment, the initial oblique photography result refers to a series of photos taken at a non-vertical angle, which generates a preliminary three-dimensional model or image of the target area after processing.

[0072] The UAV is equipped with an RTK positioning module and a high-resolution camera, and the flight route is set according to the direction of the shooting area. The UAV takes oblique photography at a fixed height and a set angle (for example, 45 degrees), ensuring that the entire target roof surface can be covered and sufficient image information can be obtained. The main purpose of this step is to generate a preliminary three-dimensional model as the basis for subsequent detailed modeling.

[0073] S112, based on the results of the initial oblique photography, re-planning the UAV flight path for low-altitude detailed photography to obtain images.

[0074] In this embodiment, the generated rough three-dimensional model is analyzed according to the results of the initial oblique photography, and the flight path of the UAV is re-planned accordingly. The new flight path allows the UAV to fly close to the roof surface at a lower height (usually maintaining a distance of 1-3 meters) for more detailed photography, in order to capture more detailed information and provide necessary data support for accurate modeling.

[0075] S113, based on the images, using COLMAP-MVORM technology for accurate modeling to obtain roof data.

[0076] This step can solve large-area, weak-texture, and feature-similar roof surfaces, so the applicability of the method of this embodiment is stronger. The prior art has poor applicability for roof surfaces with the above characteristics.

[0077] In an embodiment, the above step S113 can include steps S1131-S1132.

[0078] S1131, adding a constraint condition to the images for preliminary screening, determining the actual field of view range, and identifying the to-be-matched image pairs and screening out irrelevant image pairs.

[0079] In this embodiment, the detailed images obtained from step S112 are subjected to preliminary screening by applying a constraint condition, identifying the to-be-matched image pairs within the actual field of view range, and screening out irrelevant image pairs, thereby reducing the computational burden and the possibility of false matching in subsequent processing. This step helps to improve the efficiency and accuracy of image matching.

[0080] S1132, applying a multi-scale bidirectional optimization algorithm to the to-be-matched image pairs to extract and match image features to obtain roof data.

[0081] In an embodiment, the above step S1132 can include steps S11321-S11325.

[0082] S11321, the sensitivity of the human eye to edge information is simulated by using a SUSAN operator, edge feature points are extracted from the roof groove surface details of the image to be matched, and a multi-scale feature descriptor suitable for different resolutions is generated by improving the SIFT descriptor and combining an image pyramid structure.

[0083] In this embodiment, the sensitivity of the human eye to edge information is simulated by using a SUSAN operator, edge feature points are extracted from the roof groove surface details of the image to be matched, and a multi-scale feature descriptor suitable for different resolutions is generated by improving the SIFT descriptor and combining an image pyramid structure. This method enhances the adaptability to weak texture surfaces and improves the uniqueness of feature description and matching accuracy.

[0084] S11322, a bidirectional matching method is used to match the multi-scale feature descriptors to obtain preliminary matched points.

[0085] In this embodiment, the multi-scale feature descriptors are preliminarily matched by using a bidirectional matching method, which can improve the accuracy of matching and reduce the possibility of false matching.

[0086] S11323, the RANSAC algorithm is used to screen the preliminary matched point pairs to obtain successfully matched images.

[0087] In this embodiment, the RANSAC (Random Sample Consensus) algorithm is used to screen the preliminary matched point pairs to remove outliers and further improve the matching accuracy.

[0088] S11324, for all successfully matched images, two images are selected for initialization, the relative positions of the two initialization images are calculated, and a three-dimensional point is generated using triangulation method, global adjustment is performed on the three-dimensional points to optimize the initial pose and connection points, and inaccurate data is filtered out, when the three-dimensional points meet the global adjustment condition, multiple global iterative refinements are performed to obtain a sparse reconstruction result.

[0089] In this embodiment, the sparse reconstruction result refers to extracting feature points from multi-view images and performing matching and triangulation by computer vision algorithms, thereby constructing a rough three-dimensional point cloud model of the target scene.

[0090] Specifically, two successfully matched images are selected for initialization, the relative positions between them are calculated, and a three-dimensional point is generated using triangulation method. Then, global adjustment is performed on the three-dimensional points to optimize the initial pose and connection points, and inaccurate data is filtered out. When the global adjustment condition is met, multiple global iterative refinements are performed to finally obtain a sparse reconstruction result.

[0091] S11325, estimate the depth information based on the sparse reconstruction results, fuse the depth map and RGB image, and generate the final dense point cloud and mesh model to obtain the roof data.

[0092] Based on the sparse reconstruction results, estimate the depth information, fuse the depth map and RGB image, and generate the dense point cloud and mesh model to complete the accurate modeling of the roof data.

[0093] Through this series of steps, not only the speed and accuracy of roof modeling are greatly improved, but also the flatness of large-area weak-texture roof is detected and evaluated. In addition, this systematic process can also be applied to three-dimensional modeling tasks in other similar scenarios.

[0094] In this embodiment, during the acquisition process of the roof data, COLMAP-MVORM technology is used for completing the roof precise modeling. First, the acquired images are added with constraint conditions for preliminary screening: based on the position, angle of view and coarse modeling model of the shooting point, the actual field of view range of all shooting points is determined, and the images of the shooting points with overlapping field of view range are defined as image pairs to be matched, while the remaining images are regarded as irrelevant image pairs. In this way, irrelevant image pairs can be screened out in the subsequent matching process, thereby reducing interference and improving image matching efficiency. Next, multi-scale bidirectional optimization algorithm is used to complete feature extraction and matching of the images. This process combines the improvement of SIFT descriptor, simulates the multi-resolution perception characteristics of human eye, constructs a multi-scale feature descriptor with high reliability to enhance the image description ability; at the same time, SUSAN operator is selected as the feature detector to simulate the visual characteristics of human eye to realize effective extraction of edge feature points of roof images. A bidirectional matching method is used to preliminarily match the obtained multi-scale descriptors, which not only improves the uniqueness of feature point description, but also reduces the mismatching rate between dissimilar feature points, thereby improving the matching accuracy. Then, the random sample consensus algorithm is used to further screen the matched point pairs and eliminate outliers to ensure the accuracy of subsequent modeling. Finally, after registering the initial image, local iterative refinement and global iterative refinement are performed to gradually improve the accuracy of the current reconstruction until the incremental sparse reconstruction is completed. On this basis, the camera pose estimated by sparse reconstruction is used as input to perform dense reconstruction on each pixel in the image, and finally a complete point cloud model is formed. The camera shooting in this embodiment is divided into two steps: the first step is fixed-height oblique photography, and the second step is to reconfigure the flight path based on the coarse model obtained after oblique photography, considering the overall slope fluctuation of the roof, so that the unmanned aerial vehicle can maintain a distance of 1-3 meters close to the roof for low-altitude photography, thereby realizing accurate modeling. This strategy effectively combines photography data at different levels to realize a complete modeling process from coarse to fine. Here, the unmanned aerial vehicle is preferably kept at a distance of 2m for low-altitude photography.

[0095] The image modeling adopted by the roof data acquisition process of the embodiment can significantly improve the speed and accuracy at the same time. First, in the specific process of image matching, the actual field of view range of all shooting points is determined according to the position, angle of view and rough modeling model of the shooting point, and the images of the shooting points with overlapping field of view range are called image pairs to be matched, and the remaining images are marked as irrelevant image pairs. This preliminary screening method based on the degree of field of view overlap effectively screens out irrelevant image pairs that will not contribute to the final reconstruction result, thereby reducing unnecessary computational burden, improving the overall efficiency of image matching, and reducing the possibility of mismatch. Especially in the large-scale roof modeling scene, there are a large number of similar pictures. If the traditional algorithm is used to match and calculate all possible image pairs one by one, not only the computational complexity is high, but also the mismatch is likely to occur.

[0096] Secondly, the method of the embodiment adopts an improved multi-scale feature descriptor combined with a SUSAN operator as a feature detector, simulates human visual characteristics to complete roof image edge feature point extraction, and uses a bidirectional matching method to preliminarily match the obtained multi-scale descriptor. The new descriptor design aims to enhance the uniqueness of feature point description, which is particularly important when dealing with weak texture areas, because the traditional SIFT descriptor performs poorly in these cases. By adopting this bidirectional matching strategy, the mismatch rate between dissimilar feature points can be effectively reduced, further improving the accuracy of matching. In addition, in order to ensure the reliability of the matching, a random sample consensus algorithm (RANSAC) is also used to perform secondary screening on the matched point pairs, and outliers are removed, thereby ensuring the accuracy of subsequent modeling. In summary, the image modeling algorithm provided in the case not only improves the speed of image matching, but also greatly improves the accuracy of matching, ensuring the high-quality completion of roof precision modeling.

[0097] S120, processing the roof data into a regular quadrilateral block, and fine-tuning the boundary points of the block to make the boundary points conform to the outer shape structure of the roof, and generating a plane measurement point within the boundary.

[0098] In the embodiment, the regular quadrilateral boundary point refers to the vertex of the regular quadrilateral region converted from the original irregular or arc-shaped boundary roof model by a specific algorithm. These vertices are adjusted to the best position to facilitate subsequent flatness analysis and processing.

[0099] In an embodiment, the above-mentioned step S120 can include steps S121-S123.

[0100] S121, cutting out the corresponding roof model from the point cloud model corresponding to the roof data according to the preset roof boundary point coordinates.

[0101] In this embodiment, the roof model refers to the three-dimensional point cloud data taken by the unmanned aerial vehicle and preliminarily processed, which represents the actual geometric shape of the roof. This step aims to extract the data of the target area from the entire roof data for more detailed analysis and processing.

[0102] S122, converting the roof model into a regular quadrilateral through topological geometry calculation and specific processing methods to obtain boundary points.

[0103] Specifically, when the roof model is a regular polygon roof, it is processed as an irregular roof; when the roof model is a roof with arc-shaped boundaries, the arc-shaped region of the roof model is first cut off, and the cut-off roof model is processed as an irregular polygon; when the roof model is an irregular polygon roof, the adjacency relationship of the roof model is extracted and preprocessed, the main direction is determined through topological structure analysis, the best division line is found, the division scheme is calculated using Voronoi diagram generation technology, the sub-regions are preliminarily divided according to the division scheme, the least square method is applied for straight line fitting, the boundaries are adjusted to arrange the boundaries along the horizontal or vertical direction to form a regular quadrilateral to obtain boundary points.

[0104] In this embodiment, the boundary points refer to the four vertices of the regular quadrilateral formed after topological geometry calculation and optimization. Specifically:

[0105] When the roof model is a regular polygon roof, it is processed as an irregular roof; this is mainly because the regular polygon roof is relatively simple and can be directly processed as an irregular roof.

[0106] When the roof model is a roof with arc-shaped boundaries, the arc-shaped region of the roof model is first cut off, and the cut-off roof model is processed as an irregular polygon; this is because the arc-shaped boundary needs to be specially processed to simplify it into a polygon for subsequent analysis.

[0107] When the roof model is an irregular polygon roof, the adjacency relationship of the roof model is extracted and preprocessed, the main direction is determined through topological structure analysis, the best division line is found, the division scheme is calculated using Voronoi diagram generation technology, the sub-regions are preliminarily divided according to the division scheme, the least square method is applied for straight line fitting, the boundaries are adjusted to arrange the boundaries along the horizontal or vertical direction to form a regular quadrilateral to obtain boundary points.

[0108] S123, fine-tuning the boundary points of the regular quadrilateral and optimizing the position of the boundary points of the regular quadrilateral to the midline of the adjacent groove using image processing algorithms.

[0109] In an embodiment, the step S123 described above can include steps S1231-S1233.

[0110] S1231, select a certain range around the boundary points of the regular quadrilateral to generate a local image;

[0111] In this embodiment, the local image refers to a small part of the image around each boundary point, which contains important feature information that may affect the positioning of the boundary point, such as the groove boundary line, etc.

[0112] S1232, apply Canny edge detection and Hough transform algorithm to identify the position of the local groove boundary line in the local image to obtain the nearest groove center line.

[0113] In this embodiment, the nearest groove center line refers to the two adjacent groove center lines closest to the boundary point identified by the image processing algorithm. This step ensures that the boundary point can be accurately placed on the groove center line, improving the accuracy of subsequent flatness analysis.

[0114] S1233, optimize the position of the boundary points of the regular quadrilateral using a multivariate scalar function minimization method, by constructing a distance cost function of the boundary points to the nearest groove center line and minimizing the function value.

[0115] This step further optimizes the position of the boundary points to ensure that they are as accurately as possible located on the groove center line. By constructing a cost function that describes the distance between the boundary points and the nearest groove center line, and finding the minimum value of the cost function, the optimal positioning of the boundary points can be achieved. This method not only improves the accuracy, but also ensures the authenticity and reliability of the measurement results.

[0116] In this embodiment, different types of roofs will be automatically processed into regular quadrilateral blocks. The specific process is as follows: first, according to the pre-defined roof boundary point coordinates, cut and reconstruct the complete point cloud model to obtain the roof model. Next, use topological geometry calculation to segment different types of roof models to generate regular quadrilaterals that are convenient for subsequent flatness measurement work. Finally, fine-tune the boundary points of these regular quadrilaterals to ensure they fall on the groove center line, so that subsequent measurements can be strictly according to the groove direction.

[0117] Processing solutions are provided for the following types of roofs: regular polygonal roof, irregular quadrilateral roof, roof with arc-shaped boundary, and overall arc-shaped roof. For regular polygonal and arc-shaped boundary roofs, the processing can be simplified as for irregular roofs; while for overall arc-shaped roofs, comparative analysis based on BIM is needed to consider the consistency of curvature, and ideal arc surfaces are generated according to design parameters. The deviation value between the actual measurement points and the ideal curved surface is used for flatness analysis.

[0118] Input irregular polygon, extract adjacency relationship and other key topological features, remove self-intersection and redundant points, if the vector cross product of three points A, B, C is zero, then B is a redundant point; topological structure analysis, identify corner points and construct skeleton structure, calculate the included angle of adjacent edges at the vertex, u and v are adjacent edge vectors, if θ is less than the threshold value 150° (the threshold value is determined according to the image used in this embodiment), it is determined as a corner point; calculate the covariance matrix, and the eigenvector corresponding to the largest eigenvalue is the main direction; find the best division line after determining the main direction, and calculate the division scheme according to Voronoi; preliminarily divide the sub-regions, and ensure that the divided regions still satisfy the topological connectivity (Euler formula), V-E+F=2-2g, where V represents the number of vertices, E represents the number of edges, and F represents the number of faces; use the least square method to fit a straight line, adjust the boundary to align it to the horizontal / vertical direction as much as possible, and form a regular quadrilateral. The specific process of Voronoi diagram generation is as follows: generate its dual element Delaunay triangular net; find the circumcircle center of each triangle of the triangular net; connect the circumcircle centers of adjacent triangles to form a polygon net with each triangle vertex as the generating element.

[0119] Fine-tune the boundary points of the regular quadrilateral to fall on the center line of the groove, and the specific process is as follows: select each boundary point within a 1m radius range to generate a local image; complete the groove boundary line detection based on the Canny and Hough straight line detection algorithm; use the minimization method of multivariate scalar function to optimize the position of each boundary point, that is, construct a distance cost function L of the boundary point to the adjacent groove center line Wherein, pi is the boundary point, and lj is the candidate groove center line. The goal is to minimize the function, so as to ensure that the boundary point is accurately aligned to the center line of the groove, and to provide accurate data support for subsequent flatness analysis. In this way, through automatic processing and boundary point fine-tuning of different types of roof models, efficient and accurate flatness analysis preparation work is realized.

[0120] In particular, the generation of Voronoi diagram involves the following steps: generating Delaunay triangular net, finding the circumcircle center of each triangle, connecting the circumcircle centers of adjacent triangles to form a polygon net.

[0121] S130, project the plane measurement points onto the actual model, analyze the flatness by linear fitting three-dimensional point coordinate height values, and generate a detection report.

[0122] In an embodiment, the above-mentioned step S130 can include steps S131-S132.

[0123] S131, different colors are used to distinguish the multiple parallel slope grooves, wherein the groove spacing is adjusted according to the roof edge line angle, and the planar measurement points are projected onto the actual model to determine the three-dimensional coordinates of the measurement points on each slope groove, and the RANSAC algorithm is used for linear fitting and smoothing denoising of the measurement points, the flatness of each groove is calculated and an image is drawn, and based on the set threshold, the height change of the slope groove and the flatness of the vertical direction groove are identified and determined.

[0124] In this embodiment, grid encryption measurement points are generated inside the regular quadrilateral boundary points to obtain the planar measurement point positions of the multiple parallel slope grooves. These grooves are distinguished by different colors for subsequent processing and analysis. The groove spacing needs to be adjusted according to the angle of the roof edge line, that is, α / cosβ (where α is the planar distance between grooves, and β is the angle between the roof edge line and the horizontal line). This process ensures uniform measurement density even on inclined roofs.

[0125] In this embodiment, the flatness of the vertical direction groove refers to the smoothness of the groove area surface and whether it meets the predetermined threshold standard after linear fitting and smoothing denoising of the height values of the measurement points in the direction perpendicular to the roof slope. In short, it measures the surface consistency and flatness of the roof in the vertical slope direction.

[0126] The height change of the slope groove belongs to the flatness of the slope groove, which measures the surface consistency and flatness of the roof in the slope direction.

[0127] In this embodiment, the measurement of the slope and the measurement of the flatness of the vertical direction groove can be performed simultaneously.

[0128] Project the planar measurement points generated in the above steps onto the actual mesh model to determine the three-dimensional coordinates of the measurement points on each slope groove. This step needs to calculate the transformation matrix T between the plane and the world coordinate system, which is composed of a rotation matrix R and a translation vector t. In this way, the world coordinates of each measurement point can be calculated by the formula P world = R·P local +t.

[0129] Connect the three-dimensional measurement points on each groove and use the RANSAC algorithm for linear fitting to complete the smoothing denoising process. This process can effectively remove outliers and ensure that the obtained data is more accurate and reliable. Based on the fitting result, the flatness of each slope groove is calculated and the corresponding groove flatness image is drawn.

[0130] The height variation of the slope-following trench is identified and determined based on a set threshold. For vertical trenches, the above steps are repeated to obtain their flatness information.

[0131] It is important to note that after generating the planar measurement points, they should be projected onto the 3D model, and the smoothness of the slope and vertical slope should be calculated separately. The trenches are merely drainage components on the roof; to avoid the influence of these ancillary structures, linear smoothness measurements are used. Furthermore, the treatment of the vertical trenches is the same as that for the slope, and vertical smoothness calculations are performed accordingly.

[0132] S132. Based on the flatness of the vertical trench and the height variation of the slope trench, perform an overall analysis based on the threshold and generate an inspection report that includes flatness, mechanical analysis and safety status.

[0133] By synthesizing the smoothness data of all trenches and analyzing it based on a set threshold, areas that do not meet the requirements are identified. This step helps to quickly locate problem areas and provide targeted solutions.

[0134] Inspection Report Generation: Based on the above analysis results, a detailed roof flatness inspection report will be generated. This report includes, but is not limited to, the following:

[0135] Overall flatness analysis and explanation;

[0136] Local flatness issues are output one by one, including information such as local location, flatness issue image, and specific flatness value;

[0137] Relevant repair suggestions, such as the number of workers, estimated repair time, and repair costs, help owners quickly assess the health status of the roof and achieve efficient operation and maintenance management.

[0138] Furthermore, to improve inspection efficiency, areas with flatness exceeding the threshold are marked as defect areas and annotated as component attributes on the BIM design model through Revit secondary development. This allows on-site construction personnel to easily locate and accurately repair defect areas. Simultaneously, utilizing an open-source multimodal large model, roof flatness inspection reports conforming to standards can be automatically generated, significantly improving work efficiency and accuracy.

[0139] For example, such as Figure 3 As shown, the project's facade covers an area of ​​approximately 31,500 m2, and the roof covers an area of ​​approximately 26,800 m2. The irregular roof is in the shape of a ring, which consists of 15 small roof sections. In addition, there are 3 small roof sections next to it, making a total of 18 buildings' roofs.

[0140] The DJI M300 RTK drone is used to collect images with a Zenith P1 optical lens. The size of the drone is 810x670x430mm, and the weight is 3.6kg. The optical lens has a resolution of 8192x5460 pixels, ensuring that high-quality images of the roof can be obtained completely. First, the flight path is set according to the direction of the shooting area, and the drone is tilted at 45 degrees to collect about 15,000 roof images. Based on the rough modeling results obtained by the first tilt photography, the slope of the roof is analyzed, and the flight path of the drone is re-planned to keep a distance of 2 meters close to the roof for low-altitude precise photography, realizing fine modeling.

[0141] In order to complete the fine modeling of the roof, COLMAP-MVORM technology is used to add constraints to the collected images for preliminary screening, as shown in Figure 4 The multi-scale bidirectional optimization algorithm is used to complete feature extraction and matching of images; combined with the previous two steps, three-dimensional reconstruction is carried out to obtain a complete point cloud model.

[0142] Specifically, the technology includes three main steps: first, according to the position of the shooting point, the angle of view and the rough modeling model, the actual field of view range is determined, and the images of the shooting points with overlapping fields of view are taken as matching image pairs, and the rest are considered as irrelevant image pairs, which are screened out in the subsequent matching process to improve efficiency; second, the multi-scale bidirectional optimization algorithm is used to extract and match image features; finally, combined with the previous two steps, three-dimensional reconstruction is carried out to obtain a complete point cloud model. Among them, the human eye multi-scale bidirectional optimization feature matching algorithm selects SUSAN operator as the feature detector, simulates the characteristics of human eye focusing on edge information to extract edge feature points of roof images, and improves SIFT descriptor, combined with the multi-resolution perception characteristics of human eye central vision and peripheral vision, to construct a multi-scale feature descriptor with high reliability. Then, the bidirectional matching method is used to preliminarily match these descriptors, and the random sample consensus algorithm (RANSAC) is used to further screen matching points, and finally the matching of feature points is completed.

[0143] In the process of obtaining the point cloud model, two images are selected from the matched images for initialization, the two images are registered to estimate their relative positions, and the matched points are triangulated to obtain three-dimensional points. After successful initialization, global adjustment is performed to ensure the accuracy of the initial pose and connected points, and gross errors in the connected points and images are filtered out. Next, the remaining images are registered one by one, and triangulation and local iterative refinement are performed after each image is registered, with two local adjustments performed by default. When the global adjustment condition is met, global iterative refinement is performed, usually five times by default, until all images are registered. On this basis, the image depth is estimated using incremental sparse reconstruction, and the depth map and RGB image are fused to output a dense point cloud, thereby generating a complete mesh model. This series of steps ensures high-precision modeling of irregular roofs, providing a solid foundation for subsequent flatness analysis.

[0144] Next, different types of roofs are automatically processed into regular quadrilateral blocks, and the boundary points are fine-tuned to facilitate subsequent flatness analysis. First, based on the pre-defined roof boundary point coordinates, the corresponding roof model is cut out from the complete point cloud model obtained by reconstruction. Next, according to the topological geometry calculation, different types of roof models are segmented and converted into regular quadrilateral forms to facilitate subsequent flatness measurement work. For these regular quadrilateral boundary points, fine-tuning is needed to make them accurately fall on the centerline of the groove, ensuring that subsequent flatness measurement strictly follows the actual direction of the groove.

[0145] The method of this embodiment is applicable to several specific types of roofs: regular polygonal roof, irregular quadrilateral roof, roof with arc boundary, and overall arc roof. For regular polygonal roofs and roofs with arc boundaries, similar processing methods can be used, i.e., simplifying them into irregular polygons and then processing them. For overall arc roofs, their consistency of curvature needs to be considered, so they need to be compared and analyzed in combination with the building information model (BIM). The specific approach is to generate an idealized arc surface model based on design parameters, then compare the actual measured data with the ideal curved surface, and calculate the deviation value to complete the flatness analysis.

[0146] As shown in Figure 5 The principle of dividing the roof model into regular quadrilaterals based on topological relationships includes inputting irregular polygons and extracting key topological features such as adjacency relationships, removing self-intersections and redundant points, etc. Through topological structure analysis, corner points are identified and a skeleton structure is constructed, then the main direction is determined using the covariance matrix, and based on the Voronoi diagram generation algorithm, the best division line is found and the sub-regions are preliminarily divided to ensure that the divided regions meet the requirements of topological connectivity. Finally, the least squares method is used to adjust the boundary to the horizontal or vertical direction to form a regular quadrilateral.

[0147] Specifically, an irregular polygon is inputted, and key topological features such as adjacency relationship are extracted, self-intersection and redundant points are removed, and if the vector cross product of three points A, B and C is zero: B is a redundant point; topological structure analysis is performed, corner points are identified, and a skeleton structure is constructed, and the included angle of adjacent edges at a vertex is calculated: u, v are adjacent edge vectors, and if the angle θ is less than a threshold value of 150° (the threshold value is determined according to the image used in the embodiment), it is determined to be a corner point; a covariance matrix is calculated: The eigenvector corresponding to the largest eigenvalue is the main direction; after the main direction is determined, a best division line is found, and a division scheme is calculated according to Voronoi generation; the sub-regions are preliminarily divided to ensure that the divided regions still satisfy the topological connectivity (Euler formula): V-E+F=2-2g, where V represents the number of vertices, E represents the number of edges, and F represents the number of faces; linear fitting is performed using the least squares method to adjust the boundary to be aligned to the horizontal / vertical direction as much as possible to form a regular quadrilateral.

[0148] The specific process of Voronoi diagram generation is as follows: generate its dual element Delaunay triangular net; find the circumcircle center of each triangle of the triangular net; connect the circumcircle centers of adjacent triangles to form a polygonal net with each triangle vertex as the generating element.

[0149] As shown in Figure 6 For fine adjustment of the boundary points of the regular quadrilateral, a local image within a radius of 1 meter around each boundary point is selected, Canny and Hough transform straight line detection algorithm is used to identify the trench boundary line, and then a multi-element scalar function minimization method is used to optimize the position of each boundary point. Specifically, a distance cost function of the boundary point to the adjacent trench center line is constructed The objective is to minimize the function value, where the trench center line position is determined by the median value of the trench boundary line. This method ensures that the boundary point can accurately fall on the trench center line, thereby improving the accuracy of the flatness analysis.

[0150] Finally, the regular quadrilateral boundary points are converted and calculated, projected onto the actual model, and the height values of the three-dimensional point coordinates are linearly fitted to analyze the flatness. The specific implementation of the process is as follows:

[0151] First, grid encryption points are generated inside the boundary points of the regular quadrilateral as plane measurement points. Then, these plane measurement points are projected onto the actual mesh model to determine the three-dimensional coordinate position of each measurement point. Next, the measurement points along the slope direction and perpendicular to the slope direction are connected to form two measurement lines in the two directions. These two lines are used for subsequent flatness analysis.

[0152] After the generation of the measurement line, it needs to be smoothed and denoised to accurately evaluate the height variation of the measurement line. According to the set threshold, it is judged which part exceeds the allowed deviation range, and the protruding or sunken part is marked with different colors to intuitively show the flatness image of the groove. Then, the flatness information of these measurement points is projected into the three-dimensional space to create a three-dimensional model containing flatness information.

[0153] In addition, the actual roof model needs to be compared with the BIM-based design model to mark any existing deviation area. Further, mechanical analysis is conducted to explore the influence of flatness problems on the performance of the roof structure. Finally, a detailed roof flatness detection report is prepared, covering flatness analysis results, mechanical analysis conclusions, and overall evaluation of the safety status of the roof, such as Figure 7 As shown, specifically, blue represents the flatness in the vertical direction; red represents the flatness along the slope.

[0154] For the generation of the grid encryption points, according to the distance D between the boundary points and the actual pitch d of the groove, the number of grooves M on the roof can be calculated, and the positions of the groove start and end points are determined according to the average distribution principle. The number of measurement points N in a single groove (i.e. along the slope direction) is set artificially, and the positions of the encryption points are obtained in the same way.

[0155] The process of projecting the plane measurement points to the Mesh model involves assuming that the measurement points are located at a specific coordinate position in the local plane coordinate system, and defining a transformation matrix from the plane coordinate system to the world coordinate system, which contains a rotation matrix R and a translation vector t. By applying this transformation matrix, the precise position of the measurement point in the world coordinate system can be calculated. The effect of this process is shown in Figure 8 .

[0156] Specifically, the number of measurement points N in a single groove (i.e. along the slope) is set artificially, and the grid encryption points are obtained by averaging distribution. where α is the included angle of the boundary line.

[0157] where the process of projecting the plane measurement points to the Mesh model is as follows: assume that the measurement points are located at a coordinate P Π =(u,v,0) in the local plane coordinate system Π, and define the transformation matrix between the plane and the world coordinate where R is the rotation matrix and t is the translation vector; then the world coordinate of the point is:

[0158] The method of this embodiment realizes efficient and accurate flatness detection of the roof model. This method significantly improves the accuracy and efficiency of irregular roof flatness detection, and makes up for the shortcomings of existing detection techniques.

[0159] In addition, it is mainly applicable to roof systems composed of multiple planar components. This method is not suitable for roof systems composed of arc-shaped components, as such roofs usually do not require flatness detection.

[0160] Specifically, the types of planar roofs involved include regular trapezoidal roofs, irregular polygonal roofs, and roofs with arc boundaries. Among them:

[0161] Regular trapezoidal roofs are considered a special case of irregular polygonal roofs, and only steps S110 and S130 are required to complete the flatness calculation.

[0162] Irregular polygonal roofs are the main application object of this patent technology, and need to be comprehensively processed through steps S110-S130.

[0163] For arc boundary roofs, they need to be simplified into polygonal boundaries according to their boundary arcs, and then processed according to the method of handling irregular polygonal roofs. The degree of simplification can be adjusted according to actual needs, for example, when simplified to a side with an arc n, the degree of simplification α = (sin(n)) / 2n.

[0164] Further operation steps are as follows:

[0165] Disease area marking: For areas with flatness exceeding the preset threshold, mark them as disease areas and align these information with the BIM design model. Use the secondary development function of Revit software to mark the disease areas as component properties on the roof, so that maintenance workers can accurately find and repair these problem areas on site according to the drawings.

[0166] Generate detection report: Based on the flatness calculation results, use open-source multi-modal large models to automatically generate detailed roof flatness detection reports. The report includes:

[0167] Overall flatness analysis overview; specific description of local flatness problems, including location positioning, image display of flatness problems, and flatness numerical details;

[0168] Provide targeted repair recommendations, such as the number of workers needed, estimated repair time, and cost estimates, to help property owners quickly understand the roof health status and optimize maintenance workflows.

[0169] This method not only improves the efficiency and accuracy of roof flatness detection, but also greatly enhances the targeting and operability of repair work, which is conducive to the efficient operation and maintenance of roof management.

[0170] The method of the embodiment solves the problem of weak texture and high similarity roof modeling by using an innovative optimization modeling method. Based on the existing COLMAP algorithm, the three-dimensional reconstruction process is optimized. The characteristics of irregular roof are studied, and the flatness evaluation results of the roof are output by processing the groove boundary points and fitting the height values.

[0171] In another embodiment, the preset threshold refers to the roof flatness threshold, which is analyzed in detail by Ansys Fluent software. The specific analysis steps are as follows:

[0172] Firstly, based on the existing point cloud coordinate data, the roof is finely modeled, and the coordinates are adjusted to simulate roof models with different flatness levels. In addition, in order to accurately reflect the influence of the main structure on the roof flow field, it is simplified and combined into the overall model. This process provides a variety of project overall models with different flatness characteristics, laying a solid foundation for subsequent flow field analysis.

[0173] Next, the project model established above is discretized to generate calculation units (i.e. grids). In particular, on the building surface, especially in areas exhibiting uneven features and their vicinity, an encryption grid method is used to ensure accurate capture of changes in key physical quantities. For areas away from the building, relatively coarse grid settings are used to improve computational efficiency without affecting the accuracy of the results.

[0174] The research goal considered is to capture the characteristics of surface pressure distribution under different roof flatness conditions, so the RNG turbulence model is selected. Although this model requires higher computational resources and complexity, it performs more accurately in predicting turbulent energy, which is suitable for the needs of this analysis.

[0175] On the model roof, according to its slope, eaves, ridge and different flatness feature areas, the measuring points are reasonably arranged and numbered. This step aims to quantify local wind pressure changes, thereby enhancing the intuitiveness and accuracy of subsequent flatness analysis.

[0176] According to the wind climate characteristics of the specified area (such as reference wind speed, turbulence intensity, etc.), the boundary conditions of the calculation domain are parameterized, including velocity inlet, pressure outlet, etc. At the same time, reasonable wall boundary conditions and outlet conditions are also set to ensure that the flow can fully develop in the entire calculation domain.

[0177] Finally, the post-processor of Fluent is used to calculate the wind pressure data at each measuring point and further calculate the wind pressure coefficient. By generating intuitive roof wind pressure coefficient cloud maps and streamline maps, the differences in wind pressure distribution of the project model under different flatness conditions can be clearly shown. By comparing the wind pressure conditions under different flatness roofs, a suitable roof flatness threshold can be determined, which is crucial for the subsequent flatness analysis of the patent.

[0178] In summary, through the above series of steps, not only can the specific influence of roof flatness on wind pressure distribution be understood in depth, but also scientific basis and technical support can be provided for practical engineering application.

[0179] The above irregular roof flatness detection method realizes high-precision three-dimensional reconstruction of the roof by using a UAV equipped with an RTK positioning module to obtain roof data through multi-view oblique photography and using COLMAP-MVORM technology to process these data. Subsequently, the obtained data is processed into regular quadrilateral blocks and the boundary points are fine-tuned to optimize the regular quadrilateral boundary, and the measurement points are determined within this boundary. Finally, these measurement points are projected onto the actual model, the flatness of the roof is analyzed by linearly fitting the three-dimensional point coordinate height values, and a detailed detection report is generated. This method not only significantly improves the detection efficiency and accuracy, but also can flexibly adapt to various complex roof designs, especially in solving the problem of irregular roof flatness detection. With high-precision positioning and advanced image processing technology, this method can provide detailed and accurate roof condition evaluation reports while ensuring efficient operation, greatly improving the accuracy and reliability of roof maintenance work.

[0180] Figure 9 is a schematic block diagram of an irregular roof flatness detection device 300 provided by an embodiment of the present application. As Figure 9 shown, corresponding to the above irregular roof flatness detection method, the present application also provides an irregular roof flatness detection device 300. The irregular roof flatness detection device 300 includes units for executing the above irregular roof flatness detection method, and the device can be configured in a server. Specifically, please refer to Figure 9 , the irregular roof flatness detection device 300 includes an acquisition unit 301, a processing unit 302, and an analysis unit 303.

[0181] The acquisition unit 301 is configured to acquire roof data photographed by a UAV equipped with an RTK positioning module; wherein the roof data is obtained by multi-view oblique photography of the UAV and processed by a COLMAP-MVORM technology; the processing unit 302 is configured to process the roof data into regular quadrilateral blocks, fine-tune the boundary points of the blocks, make the boundary points conform to the outer shape structure of the roof, and generate plane measurement points within the boundary; the analysis unit 303 is configured to project the plane measurement points onto an actual model, analyze the flatness by linear fitting of three-dimensional point coordinate height values, and generate a detection report.

[0182] In an embodiment, the acquisition unit 301 is further configured to equip the UAV with an RTK positioning module and a camera, set a flight route according to the horizontal direction of the shooting area, and perform oblique photography at a fixed height and a set angle to obtain a primary oblique photography result; re-plan a UAV route based on the primary oblique photography result, and perform low-altitude fine photography to obtain an image; and perform accurate modeling based on the image by using a COLMAP-MVORM technology to obtain the roof data.

[0183] In an embodiment, the acquisition unit 301 is further configured to add a constraint condition to the image for initial screening, determine an actual field of view range, identify image pairs to be matched, and screen out irrelevant image pairs; apply a multi-scale bidirectional optimization algorithm to the image pairs to be matched to extract and match image features to obtain the roof data.

[0184] In an embodiment, the acquisition unit 301 is further configured to simulate the sensitivity of the human eye to edge information by using a SUSAN operator, extract roof groove surface texture of the image to be matched as edge feature points, and generate a multi-scale feature descriptor adaptive to different resolutions by improving a SIFT descriptor and combining an image pyramid structure; adopt a bidirectional matching method to match the multi-scale feature descriptor to obtain preliminary matched points; use a RANSAC algorithm to screen the preliminary matched point pairs to obtain successfully matched images; select two images for initialization for all successfully matched images, calculate the relative positions of the two initialization images, generate three-dimensional points by using a triangulation method, perform global adjustment on the three-dimensional points to optimize the initial pose and connection points, and filter out inaccurate data; when the three-dimensional points meet the global adjustment condition, perform multiple global iterative refinements to obtain a sparse reconstruction result; estimate depth information based on the sparse reconstruction result, fuse a depth map and an RGB image, and generate a final dense point cloud and a mesh model to obtain the roof data.

[0185] In an embodiment, the processing unit 302 includes:

[0186] The cutting subunit is configured to cut a corresponding roof model from a point cloud model corresponding to the roof data according to preset roof boundary point coordinates; the conversion subunit is configured to convert the roof model into a regular quadrilateral through topological geometry calculation and a specific processing method to obtain boundary points; and the fine-tuning subunit is configured to fine-tune the boundary points and use an image processing algorithm to optimize the boundary point positions of the regular quadrilateral to a center line of an adjacent groove.

[0187] In an embodiment, the conversion subunit is configured to process the roof model as an irregular roof when the roof model is a regular polygonal roof, cut an arc region of the roof model first when the roof model is a roof with an arc boundary, process the cut roof model as an irregular polygonal roof, extract an adjacency relationship of the roof model, perform preprocessing, determine a main direction through topological structure analysis, find an optimal division line, calculate a division scheme by using a Voronoi diagram generation technique, preliminarily divide sub-regions according to the division scheme, perform linear fitting by using a least square method, and adjust the boundary to arrange the boundary along a horizontal or vertical direction to form a regular quadrilateral, so as to obtain boundary points.

[0188] In an embodiment, the fine-tuning subunit includes:

[0189] The selection module is configured to select a certain range around the boundary points of the regular quadrilateral to generate a local image; the identification module is configured to identify a position of a local groove boundary in the local image by using a Canny edge detection and a Hough transform algorithm to obtain a nearest groove center line; and the optimization module is configured to optimize the position of the boundary points of the regular quadrilateral by using a multivariate scalar function minimization method, constructing a distance cost function of the boundary points to the nearest groove center line, and minimizing a function value.

[0190] In an embodiment, the analysis unit 303 includes:

[0191] The generation subunit is configured to distinguish a plurality of parallel slope grooves by using different colors, wherein a groove spacing is adjusted according to a roof edge line angle; the flatness detection subunit is configured to project a plane measurement point to an actual model to determine a three-dimensional coordinate of the measurement point on each slope groove, perform linear fitting and smooth denoising on the measurement point by using a RANSAC algorithm, calculate a flatness of each groove, and draw an image, and identify and determine a height change of the slope groove and a flatness of a vertical direction groove based on a set threshold value; and the report generation subunit is configured to analyze an overall result based on the threshold value according to the flatness of the vertical direction groove and the height change of the slope groove, and generate a detection report including the flatness, a mechanical analysis, and a safety status.

[0192] It should be noted that the specific implementation process of the irregular roof flatness detection device 300 and each unit can be clearly understood by those skilled in the art, and can refer to the corresponding description in the foregoing method embodiments. For the convenience and brevity of description, it will not be repeated here.

[0193] The irregular roof flatness detection device 300 described above can be realized in the form of a computer program, which can run on a computer device as shown in the figure. Figure 10

[0194] Please refer to Figure 10 , Figure 10 is a schematic block diagram of a computer device provided by an embodiment of the present application. The computer device 500 can be a server, wherein the server can be a stand-alone server or a server cluster composed of multiple servers.

[0195] Referring to Figure 10 , the computer device 500 includes a processor 502, a memory, and a network interface 505 connected through a system bus 501, wherein the memory can include a non-volatile storage medium 503 and an internal memory 504.

[0196] The non-volatile storage medium 503 can store an operating system 5031 and a computer program 5032. The computer program 5032 includes program instructions which, when executed, can cause the processor 502 to perform an irregular roof flatness detection method.

[0197] The processor 502 is configured to provide computing and control capabilities to support the operation of the entire computer device 500.

[0198] The internal memory 504 provides an environment for the running of the computer program 5032 in the non-volatile storage medium 503, which, when executed by the processor 502, can cause the processor 502 to perform an irregular roof flatness detection method.

[0199] The network interface 505 is configured to perform network communication with other devices. Those skilled in the art can understand that Figure 10 the structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device 500 to which the scheme of the present application is applied. The specific computer device 500 can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0200] The processor 502 is configured to run the computer program 5032 stored in the memory to implement the following steps:

[0201] ​Obtaining roof data taken by a UAV equipped with an RTK positioning module; wherein the roof data is obtained by multi-view oblique photography by the UAV, and the obtained data is processed by a COLMAP-MVORM technology; processing the roof data into regular quadrilateral blocks, and fine-tuning the boundary points of the blocks so that the boundary points conform to the outer shape structure of the roof, and generating planar measurement points within the boundaries; projecting the planar measurement points onto an actual model, analyzing the flatness by linear fitting the three-dimensional point coordinate height values, and generating a detection report.

[0202] In an embodiment, the processor 502, when implementing the forming step of the roof data, specifically implements the following steps:

[0203] The UAV is equipped with an RTK positioning module and a camera, and a flight route is set horizontally along the direction of the shooting area. The UAV performs set-angle oblique photography at a fixed height to obtain a primary oblique photography result. Based on the primary oblique photography result, the UAV flight route is re-planned for low-altitude fine photography to obtain images. Based on the images, a COLMAP-MVORM technology is used for accurate modeling to obtain roof data.

[0204] In an embodiment, the processor 502, when implementing the step of using a COLMAP-MVORM technology to model accurately based on the images to obtain roof data, specifically implements the following steps:

[0205] The images are added with constraint conditions for initial screening, the actual field of view range is determined, and image pairs to be matched are identified and irrelevant image pairs are screened out. A multi-scale bidirectional optimization algorithm is applied to the image pairs to be matched to extract and match image features to obtain roof data.

[0206] In an embodiment, the processor 502, when implementing the step of applying a multi-scale bidirectional optimization algorithm to the image pairs to be matched to extract and match image features to obtain roof data, specifically implements the following steps:

[0207] The sensitivity of human eyes to edge information is simulated by using a SUSAN operator to extract roof groove surface details of the image to be matched as edge feature points, and a multi-scale feature descriptor adaptive to different resolutions is generated by improving a SIFT descriptor and combining an image pyramid structure; a bidirectional matching method is used to match the multi-scale feature descriptor to obtain preliminary matched points; a RANSAC algorithm is used to screen the preliminary matched points to obtain images with successful matching; for all images with successful matching, two images are selected for initialization, the relative positions of the two initialized images are calculated, and a three-dimensional point is generated using a triangulation method, global adjustment is performed on the three-dimensional point to optimize the initial pose and connection points, and inaccurate data is filtered out, when the three-dimensional point reaches the global adjustment condition, multiple global iterative refinements are performed to obtain a sparse reconstruction result; depth information is estimated based on the sparse reconstruction result, a depth map and an RGB image are fused to generate a final dense point cloud and a mesh model to obtain roof data.

[0208] In an embodiment, the processor 502, when implementing the step of processing the roof data into regular quadrilateral blocks and fine-tuning the boundary points of the blocks so that the boundary points conform to the shape of the roof surface and generating planar measurement points within the boundary, specifically implements the following steps:

[0209] According to the preset roof boundary point coordinates, a corresponding roof model is cut out from the point cloud model corresponding to the roof data; the roof model is converted into a regular quadrilateral through topological geometric calculation and a specific processing method to obtain boundary points; the boundary points are fine-tuned, and an image processing algorithm is used to optimize the boundary point positions of the regular quadrilateral to the midlines of adjacent grooves.

[0210] In an embodiment, the processor 502, when implementing the step of converting the roof model into a regular quadrilateral through topological geometric calculation and a specific processing method to obtain the boundary points of the regular quadrilateral, specifically implements the following steps:

[0211] When the roof model is a regular polygon roof, it is processed according to the method of an irregular roof; when the roof model is a roof with an arc-shaped boundary, the arc-shaped region of the roof model is first cut out, and the cut-out roof model is processed according to the method of an irregular polygon; when the roof model is an irregular polygon roof, the adjacency relationship of the roof model is extracted and preprocessed, the main direction is determined through topological structure analysis, the best division line is found, and the division scheme is calculated using Voronoi diagram generation technology, after the preliminary division of the sub-regions according to the division scheme, a least squares method is applied for straight line fitting, the boundary is adjusted so that the boundary is arranged along the horizontal or vertical direction, and a regular quadrilateral is formed to obtain the boundary points.

[0212] In an embodiment, the processor 502, when implementing the step of using an image processing algorithm to optimize the position of the boundary point of the regular quadrilateral to the midline of the adjacent groove, specifically implements the following steps:

[0213] selecting a certain range around the boundary point of the regular quadrilateral to generate a local image; applying a Canny edge detection and Hough transform algorithm to identify the position of the local groove boundary line in the local image to obtain the nearest groove midline; and using a multivariate scalar function minimization method to optimize the position of the boundary point of the regular quadrilateral by constructing a distance cost function of the boundary point to the nearest groove midline and minimizing the function value.

[0214] In an embodiment, the processor 502, when implementing the step of projecting the planar measurement points onto the actual model, analyzing the flatness by linearly fitting the three-dimensional point coordinate height values, and generating a detection report, specifically implements the following steps:

[0215] distinguishing different colors for a plurality of parallel slope grooves, wherein the groove spacing is adjusted according to the roof edge line angle; projecting the planar measurement points onto the actual model to determine the three-dimensional coordinates of the measurement points on each slope groove, and performing linear fitting and smoothing denoising on the measurement points by using a RANSAC algorithm, calculating the flatness of each groove and drawing an image, and based on a set threshold, identifying and determining the height change of the slope grooves and the flatness of the vertical direction grooves; analyzing the overall result based on the threshold according to the flatness of the vertical direction grooves and the height change of the slope grooves, and generating a detection report containing the flatness, mechanical analysis and safety status.

[0216] It should be understood that, in the embodiments of the present application, the processor 502 can be a central processing unit 302 (CPU), and the processor 502 can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.

[0217] Those skilled in the art can understand that all or part of the processes in the method of implementing the above embodiments can be completed by instructing the relevant hardware through a computer program. The computer program includes program instructions, and the computer program can be stored in a storage medium, which is a computer readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the above-mentioned embodiments of the method.

[0218] Therefore, the present application also provides a storage medium. The storage medium can be a computer readable storage medium. The storage medium stores a computer program, wherein the computer program is executed by a processor to make the processor execute the following steps:

[0219] Obtaining roof data taken by a UAV equipped with an RTK positioning module; wherein the roof data is obtained by multi-view oblique photography of the UAV, and the obtained data is processed by COLMAP-MVORM technology; processing the roof data into regular quadrilateral blocks, and fine-tuning the boundary points of the blocks to make the boundary points conform to the outer shape structure of the roof, and generating plane measurement points within the boundary; projecting the plane measurement points onto an actual model, analyzing the flatness by linear fitting three-dimensional point coordinate height values, and generating a detection report.

[0220] In an embodiment, the processor, when executing the computer program to implement the forming step of the roof data, specifically implements the following steps:

[0221] The UAV is equipped with an RTK positioning module and a camera, and a flight route is set horizontally according to the shooting area trend. The UAV performs set-angle oblique photography at a fixed height to obtain a primary oblique photography result. Based on the primary oblique photography result, the UAV flight route is re-planned for low-altitude fine photography to obtain images. Based on the images, precise modeling is performed using COLMAP-MVORM technology to obtain roof data.

[0222] In an embodiment, the processor, when executing the computer program to implement the step of performing precise modeling based on the images using COLMAP-MVORM technology to obtain roof data, specifically implements the following steps:

[0223] Adding a constraint condition to the images for initial screening, determining the actual field of view range, and identifying image pairs to be matched and excluding irrelevant image pairs. A multi-scale bidirectional optimization algorithm is applied to the image pairs to be matched to extract and match image features to obtain roof data.

[0224] In an embodiment, the processor, when executing the computer program to implement the step of applying a multi-scale bidirectional optimization algorithm to the image pairs to be matched to extract and match image features to obtain roof data, specifically implements the following steps:

[0225] The sensitivity of human eyes to edge information is simulated by using a SUSAN operator to extract roof groove surface details of the image to be matched as edge feature points, and a multi-scale feature descriptor adaptive to different resolutions is generated by improving a SIFT descriptor and combining an image pyramid structure; a two-way matching method is used to match the multi-scale feature descriptor to obtain preliminary matched points; a RANSAC algorithm is used to screen the preliminary matched points to obtain images with successful matching; for all images with successful matching, two images are selected for initialization, the relative positions of the two initialized images are calculated, and a three-dimensional point is generated using a triangulation method, global adjustment is performed on the three-dimensional point to optimize the initial pose and connection points, and inaccurate data is filtered out, when the three-dimensional point reaches the global adjustment condition, multiple global iterative refinements are performed to obtain a sparse reconstruction result; depth information is estimated based on the sparse reconstruction result, a depth map and an RGB image are fused to generate a final dense point cloud and a mesh model to obtain roof data.

[0226] In an embodiment, the processor, in executing the computer program to implement the processing of the roof data into regular quadrilateral blocks and fine-tuning the boundary points of the blocks so that the boundary points conform to the outer shape structure of the roof and generating planar measurement points within the boundary, specifically implements the following steps:

[0227] According to the preset roof boundary point coordinates, a corresponding roof model is cut out from the point cloud model corresponding to the roof data; the roof model is converted into a regular quadrilateral through topological geometric calculation and a specific processing method to obtain boundary points; the boundary points are fine-tuned, and an image processing algorithm is used to optimize the position of the boundary points of the regular quadrilateral to the center line of the adjacent groove.

[0228] In an embodiment, the processor, in executing the computer program to implement the conversion of the roof model into a regular quadrilateral through topological geometric calculation and a specific processing method to obtain the boundary points of the regular quadrilateral, specifically implements the following steps:

[0229] When the roof model is a regular polygon roof, it is processed according to the method of an irregular roof; when the roof model is a roof with an arc-shaped boundary, the arc-shaped region of the roof model is first cut out, and the cut-out roof model is processed according to the method of an irregular polygon; when the roof model is an irregular polygon roof, the adjacency relationship of the roof model is extracted and preprocessed, the main direction is determined through topological structure analysis, the best division line is found, and the division scheme is calculated using Voronoi diagram generation technology, after the preliminary division of the sub-regions according to the division scheme, a least squares method is applied for straight line fitting, the boundary is adjusted so that the boundary is arranged along the horizontal or vertical direction, and a regular quadrilateral is formed to obtain the boundary points.

[0230] In an embodiment, the processor, when executing the computer program to implement the step of fine-tuning the boundary points of the regular quadrangle, uses an image processing algorithm to optimize the position of the boundary points of the regular quadrangle to the center line of the adjacent groove, specifically implements the following steps:

[0231] selecting a certain range around the boundary points of the regular quadrangle to generate a local image; applying a Canny edge detection and Hough transform algorithm to identify the position of the local groove boundary in the local image to obtain the nearest groove center line; and using a multivariate scalar function minimization method to optimize the position of the boundary points of the regular quadrangle by constructing a distance cost function of the boundary points to the nearest groove center line and minimizing the function value.

[0232] In an embodiment, the processor, when executing the computer program to implement the step of projecting the planar measurement points onto the actual model, analyzing the flatness by linearly fitting the three-dimensional point coordinate height values, and generating a detection report, specifically implements the following steps:

[0233] different colors are used to distinguish a plurality of parallel slope grooves, wherein the groove spacing is adjusted according to the roof edge line angle; the planar measurement points are projected onto the actual model to determine the three-dimensional coordinates of the measurement points on each slope groove, and the RANSAC algorithm is used to linearly fit and smooth the measurement points to calculate the flatness of each groove and draw an image, and based on a set threshold, the height change of the slope grooves and the flatness of the vertical direction grooves are identified and determined; the overall result is analyzed based on the threshold according to the flatness of the vertical direction grooves and the height change of the slope grooves, and a detection report containing the flatness, mechanical analysis and safety status is generated.

[0234] The storage medium can be a U disk, a mobile hard disk, a read-only memory (ROM), a magnetic disk or an optical disk, and various computer readable storage media that can store program codes.

[0235] Those skilled in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be realized in electronic hardware, computer software or a combination of both. In order to clearly illustrate the interchangeability of hardware and software, the components and steps of the examples have been described in the above description in general terms. Whether the functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. The skilled person can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0236] In several embodiments provided by the present application, it should be understood that the disclosed apparatus and method can be implemented in other manners. For example, the embodiments of the apparatus described above are merely schematic. For example, the division of the units is merely a logical function division. For example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In this way, the inventive idea can be implemented.

[0237] The steps in the method embodiments of the present application can be adjusted, combined and deleted in sequence according to actual needs. The units in the apparatus embodiments of the present application can be combined, divided and deleted according to actual needs. In addition, each functional unit in each embodiment of the present application can be integrated in a processing unit 302, or each unit can exist physically, or two or more units can be integrated in one unit.

[0238] The integrated unit, if realized in the form of a software functional unit and sold or used as an independent product, can be stored in a storage medium. Based on such understanding, the technical solutions of the present application essentially or the part that contributes to the prior art, or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes a plurality of instructions for causing a computer device (which can be a personal computer, a terminal, or a network device, etc.) to execute all or part of the steps of the methods described in the embodiments of the present application.

[0239] The above describes only specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of various equivalent modifications or replacements within the technical range disclosed by the present application, and these modifications or replacements should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A method for detecting irregularities in roof flatness, characterized in that, The application relates to a roof data processing method and device. The application comprises: Obtaining roof data taken by a UAV equipped with an RTK positioning module; wherein the roof data is obtained by multi-view oblique photography of the UAV and processed by a COLMAP-MVORM technology; Processing the roof data into regular quadrilateral blocks, fine-tuning the boundary points of the blocks, making the boundary points conform to the outer shape structure of the roof, and generating plane measurement points within the boundary; 2. The method of irregular roof flatness detection according to claim 1, wherein, Projecting the plane measurement points onto an actual model, analyzing the flatness by linear fitting three-dimensional point coordinate height values, and generating a detection report. The formation process of the roof data comprises: The UAV is equipped with an RTK positioning module and a camera, and the flight route is set horizontally along the shooting area, the UAV performs set-angle oblique photography at a fixed height to obtain initial oblique photography results; Based on the initial oblique photography results, the UAV flight route is re-planned, and low-altitude fine photography is performed to obtain images; 3. The method of irregular roof flatness detection according to claim 2, wherein, Based on the images, a COLMAP-MVORM technology is used for accurate modeling to obtain roof data. The accurate modeling based on the images to obtain roof data comprises: Adding a constraint condition to the images for initial screening, determining the actual field of view range, and identifying image pairs to be matched, and screening out irrelevant image pairs; 4. The method of irregular roof flatness detection according to claim 3, wherein, Applying a multi-scale bidirectional optimization algorithm to extract and match image features of the image pairs to be matched to obtain roof data. The multi-scale bidirectional optimization algorithm for extracting and matching image features of the image pairs to be matched to obtain roof data comprises: Using a SUSAN operator to simulate the sensitivity of human eyes to edge information, extracting roof groove surface details of the image pairs to be matched as edge feature points, and generating multi-scale feature descriptors adaptive to different resolutions by improving a SIFT descriptor and combining an image pyramid structure; Using a bidirectional matching method to match the multi-scale feature descriptors to obtain preliminary matched points; Using a RANSAC algorithm to screen the preliminary matched points to obtain successfully matched images; For all successfully matched images, two images are selected for initialization, the relative positions of the two initialization images are calculated, three-dimensional points are generated by using a triangulation method, global adjustment is performed on the three-dimensional points to optimize the initial pose and connection points, and inaccurate data is filtered out, when the three-dimensional points reach the global adjustment condition, multiple global iterations are refined to obtain a sparse reconstruction result; 5. The method of irregular roof flatness detection of claim 1, wherein, Based on the sparse reconstruction result, depth information is estimated, a depth map and an RGB map are fused, and a final dense point cloud and a mesh model are generated to obtain roof data. The roof data is processed into regular quadrilateral blocks, the boundary points of the blocks are fine-tuned, the boundary points conform to the outer shape structure of the roof, and plane measurement points are generated within the boundary, which comprises: Cutting a corresponding roof model from a point cloud model corresponding to the roof data according to preset roof boundary point coordinates; Converting the roof model into a regular quadrilateral through topological geometric calculation and a specific processing method to obtain boundary points; The boundary points of the regular quadrilateral are fine-tuned, and an image processing algorithm is used to optimize the position of the boundary points of the regular quadrilateral to the center line of the adjacent groove.

6. The method of irregular roof flatness detection according to claim 5, wherein, The roof model is converted into a regular quadrilateral through topological geometry calculation and a specific processing method to obtain the boundary points of the regular quadrilateral, including: When the roof model is a regular polygonal roof, it is processed in the manner of an irregular roof; when the roof model is a roof with an arc-shaped boundary, the arc-shaped region of the roof model is cut off first, and the cut-off roof model is processed in the manner of an irregular polygon; when the roof model is an irregular polygonal roof, the adjacency relationship of the roof model is extracted and preprocessed, the main direction is determined through topological structure analysis, the best division line is found, and the division scheme is calculated by using the Voronoi diagram generation technology; after the sub-regions are preliminarily divided according to the division scheme, linear fitting is performed by using the least square method, the boundary is adjusted so that the boundary is arranged along the horizontal or vertical direction, a regular quadrilateral is formed, and the boundary points are obtained.

7. The method of irregular roof flatness detection of claim 1, wherein, The boundary points of the regular quadrilateral are fine-tuned, and an image processing algorithm is used to optimize the position of the boundary points of the regular quadrilateral to the center line of the adjacent groove. A certain range is selected around the boundary points of the regular quadrilateral to generate a local image; A Canny edge detection and Hough transform algorithm is applied to identify the position of the local groove boundary line in the local image to obtain the center line of the nearest groove; A multivariate scalar function minimization method is used to optimize the position of the boundary points of the regular quadrilateral by constructing a distance cost function of the boundary points to the center line of the nearest groove and minimizing the function value.

8. The method of irregular roof flatness detection of claim 1, wherein, The plane measurement points are projected onto the actual model, the flatness is analyzed by linear fitting of the three-dimensional point coordinate height values, and a detection report is generated, including: Different colors are used to distinguish a plurality of parallel slope grooves, wherein the groove spacing is adjusted according to the roof edge line angle, and the plane measurement points are projected onto the actual model to determine the three-dimensional coordinates of the measurement points on each slope groove, and the measurement points are linearly fitted and smoothed by using the RANSAC algorithm to calculate the flatness of each groove and draw an image, and based on a set threshold, the height change of the slope grooves and the flatness of the vertical direction grooves are identified and determined; The overall result is analyzed based on the threshold according to the flatness of the vertical direction grooves and the height change of the slope grooves, and a detection report containing the flatness, mechanical analysis and safety status is generated.

9. An apparatus for detecting irregularities in the flatness of a roof, characterized in that It includes: An acquisition unit is configured to acquire roof data captured by a UAV equipped with an RTK positioning module; wherein the roof data is obtained by multi-view oblique photography of the UAV and processed by COLMAP-MVORM technology; A processing unit is configured to process the roof data into regular quadrilateral blocks, fine-tune the boundary points of the blocks, and make the boundary points conform to the outer shape structure of the roof, and generate plane measurement points within the boundary; An analysis unit is configured to project the plane measurement points onto the actual model, analyze the flatness by linear fitting of the three-dimensional point coordinate height values, and generate a detection report.

10. A computer device, comprising: The computer device comprises a memory and a processor, the memory has stored thereon a computer program, and the processor implements the method according to any one of claims 1 to 8 when executing the computer program.

Citation Information

Patent Citations

  • Device and method for measuring surface flatness of aluminum alloy roof structure

    CN118602930A

  • Wall flatness detection method and system based on three-dimensional scanning technology

    CN119197391A

  • Seating detection method of roof and temporary post under lift-up construction method

    JP1996093229A

  • Roof panel system for load detection and construction method of the roof panel

    KR1020210011807A

  • Roof moisture detection and removal system

    US10571141B1