Building template flatness threshold partition detection method based on normal vector constraint RANSAC

By using 3D laser scanning and an improved RANSAC algorithm, and fitting a reference surface based on a unit normal vector, the problem of low efficiency and poor accuracy in the flatness detection of building formwork has been solved, realizing automated, high-precision flatness detection and visualization.

CN120970539AActive Publication Date: 2025-11-18BEIJING NO 3 CONSTR ENG

Patent Information

Application Number
CN202510987886.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-17
Publication Date
2025-11-18
Estimated Expiration
2045-07-17

AI Technical Summary

Technical Problem

In current construction, the flatness inspection of formwork relies on manual measurement, which is inefficient and inaccurate, making it difficult to meet the quality requirements of modern construction.

Method used

High-density point cloud data is acquired using 3D laser scanning. A reference surface is fitted using an improved RANSAC algorithm, and a unit normal vector is introduced to ensure correct orientation. Deviation values ​​are calculated and thresholds are set according to building codes. The data is then displayed on the 3D point cloud model using color differentiation.

Benefits of technology

It achieves automated and high-precision template flatness detection, improving detection efficiency and accuracy, intuitively displaying the flatness status, and meeting construction quality requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120970539A_ABST
    Figure CN120970539A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of building templates, and particularly provides a building template flatness threshold partition detection method based on normal vector constraint RANSAC, which comprises the following steps: performing three-dimensional laser scanning on a building template to obtain high-density point cloud data; preprocessing operations such as denoising and downsampling are carried out on the collected point cloud data, so that the data quality is improved; fitting a reference surface of the template based on the preprocessed point cloud data by using an improved RANSAC algorithm, and introducing a unit normal vector to ensure the correct direction of the reference surface; calculating the vertical distance from each point cloud point to the reference surface to obtain a deviation value; independently setting a deviation threshold value according to a building specification, dividing the deviation value into different grades, and distinguishing and displaying the deviation value on the three-dimensional point cloud model through colors; and a visual result containing the three-dimensional point cloud model and the color identification is output, the flatness condition of the template is visually displayed, and the method has the effects of automatic measurement, high efficiency and high precision.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of building construction, and particularly relates to a building template flatness threshold partition detection method based on normal vector constraint RANSAC. BACKGROUND

[0002] The template for building construction is a shell mold for concrete pouring and forming, and a film-coated multilayer board is often used. After the horizontal floor template is installed by workers on site, the flatness of the template is checked by using a line pulling method. The above construction method belongs to a single-point manual measurement method, and cannot reflect the deviation of each template, which hides a safety hazard for construction quality. The present application improves the RANSAC algorithm by using a three-dimensional laser scanning point cloud model, sets a unit normal vector to determine the correct direction of the reference surface, sets a threshold and a partition color display according to the acceptance specification, and finally outputs a three-dimensional point cloud and a visualized result of partition color identification.

[0003] The above information disclosed in the background section is only intended to strengthen the understanding of the background of the present disclosure, and therefore it can include information that does not constitute the prior art known to those of ordinary skill in the art.

[0004] Prior art one, Chinese patent, application number CN202410113884.5 discloses a passenger car side wall plate flatness detection method based on three-dimensional point cloud and contour matching, which comprises: acquiring a frame of three-dimensional point cloud of different types of passenger car side wall plate; performing a preprocessing operation on the three-dimensional point cloud to generate point cloud slice data; performing line segment fitting on the point cloud slice data, storing the line segment function obtained by fitting, the number of collected points and the region division into a template library; performing point cloud preprocessing operation on each frame of point cloud data of the measured part, matching with the point cloud slice data in the template library, setting a related defect threshold, and judging whether the point is a defect point; expanding into complete passenger car side wall plate point cloud data, and segmenting out the defect area; and removing the misjudgment points by using an abnormal point removal algorithm to obtain the defect area. The present application solves the problem of long detection time caused by the large size of the passenger car side wall plate, adopts a contour matching method, solves the problem of difficult detection caused by small defects, and meets the real-time and accurate defect detection on the complex curved surface of the passenger car side wall plate;

[0005] The prior art two, Chinese patent, application number CN202210588295.3 discloses a kind of plate defect detection method based on three-dimensional point cloud, it is related to industrial defect detection field, by to the plate three-dimensional point cloud data collected in production site is filtered, coordinate conversion, fitting plane etc. Operation, measure out relevant parameter, after comparing with the set standard value and threshold value, judge whether there is defect in size and flatness, compared with prior art, it does not need to use standard data sample as template, and it does not need to train preset neural network model, just according to the three-dimensional point cloud data collected in field can realize the defect detection in size and flatness, with the advantages of high efficiency, high precision, low labor.

[0006] The prior art one, the prior art two, the traditional detection method mainly relies on manual measurement, there are problems such as low efficiency, poor accuracy, and it is difficult to meet the quality requirements of modern building construction. Therefore, the present application provides a building template flatness threshold partition detection method based on normal vector constraint RANSAC. SUMMARY

[0007] To achieve the above purpose, the present application adopts the following technical solutions:

[0008] In one aspect of the present application, a building template flatness threshold partition detection method based on normal vector constraint RANSAC is provided, comprising the following steps:

[0009] Three-dimensional laser scanning of the building template is performed to obtain high-density point cloud data;

[0010] The collected point cloud data is preprocessed by denoising and downsampling to improve data quality;

[0011] An improved RANSAC algorithm is used to fit the reference surface of the template based on the preprocessed point cloud data, and a unit normal vector is introduced to ensure the correct direction of the reference surface;

[0012] The perpendicular distance of each point cloud point to the reference surface is calculated to obtain the deviation value;

[0013] According to the building specification, the deviation threshold is set autonomously, the deviation value is divided into different grades, and the color is displayed on the three-dimensional point cloud model;

[0014] The visualization results containing three-dimensional point cloud model and color identification are outputted to intuitively show the flatness of the template.

[0015] In an alternative embodiment, the step of three-dimensional laser scanning the building formwork to obtain high-density point cloud data includes selecting a device with appropriate resolution and scanning range according to the size and complexity of the building formwork, ensuring that the scanner has sufficient power, storage media is available, and the device is in good working condition, specifying the specific location and coverage of the building formwork that needs to be scanned, determining multiple scanning positions according to the shape and structure of the formwork to ensure comprehensive coverage of all surfaces of the formwork, setting the scanning resolution as needed, obtaining more detailed data at high resolution but increasing the amount of data, adjusting the scanning frequency according to the dynamics of the formwork, fixing the scanner on a tripod or other stable support device to ensure that the device does not shake during scanning, performing device calibration to ensure the accuracy of the scanning data, monitoring the scanning progress and data quality in real time through the device display screen or connected computer, and storing the original point cloud data obtained by scanning in the device or directly transmitting it to the computer.

[0016] In an alternative embodiment, the step of fitting the reference surface of the formwork based on the pre-processed point cloud data using the improved RANSAC algorithm and introducing a unit normal vector to ensure the correct direction of the reference surface includes setting the number of iterations of the RANSAC algorithm according to the size and complexity of the data to ensure that the optimal plane is found, defining a distance threshold for points to the plane to determine whether the point belongs to the fitted plane, randomly selecting three points from the point cloud data as the initial sample of the fitted plane, calculating the normal vector and equation of the plane based on the three points, calculating the normal vector based on the fitted plane equation, normalizing the normal vector to make it a unit normal vector to ensure consistency in direction;

[0017] According to the structural characteristics of the building formwork, a reference normal vector is set as the correct direction of the reference surface, the angle between the unit normal vector of the current fitted plane and the reference direction is calculated, and the direction is judged to be consistent or not. If the direction is not consistent, adjust the direction of the normal vector to make it as close to the reference direction as possible. For each point cloud point, calculate its perpendicular distance to the fitted plane, and according to the set threshold, divide the points into inliers and outliers. In the iteration process, sample points are randomly selected, planes are fitted, and the direction of the normal vector is adjusted. After each iteration, the number of inliers and the overall deviation of the current fitted plane are evaluated, and the optimal fitting result is recorded. When the set number of iterations is reached or the fitting result no longer improves significantly, the iteration is terminated;

[0018] According to the iteration results, the plane with the most inliers and the smallest deviation is selected as the reference surface;

[0019] Output plane parameters: the plane equation, normal vector and point cloud data of the output reference plane are provided for subsequent deviation calculation and visualization, the fitted reference plane is superimposed with the original point cloud data for display, the fitting effect is intuitively checked, it is ensured that the normal vector direction of the reference plane conforms to the preset reference direction, and the deviation is within an acceptable range, according to the verification result, the algorithm parameters such as the number of iterations and the threshold value are adjusted, the fitting result is further optimized, based on the fitted reference plane, the deviation value of each point cloud point is calculated, which is used for the evaluation of the flatness of the template, according to the deviation value, the template area is divided into different levels, and is displayed by color differentiation, the flatness situation is intuitively displayed, the improved RANSAC algorithm is integrated into the building template detection system, and automatic and high-precision flatness detection is realized.

[0020] In an alternative embodiment, the step of setting the deviation threshold value according to the building specification, dividing the deviation value into different levels, and displaying it on the three-dimensional point cloud model by color differentiation includes setting the threshold range of each deviation level according to the specification, recording the set threshold range for subsequent data processing and adjustment, importing the preprocessed three-dimensional point cloud data into the selected software, ensuring that the deviation value of each point cloud point has been calculated and associated with the point cloud data, classifying the deviation value of each point cloud point according to the set threshold range, updating the classification result to the point cloud data, ensuring that the classification information of each point cloud point is accurate, selecting a color scheme according to the deviation level, applying the color mapping rule to the point cloud data, and displaying the color differentiation of different deviation levels in real time, optimizing the perspective and lighting settings of the three-dimensional point cloud model to ensure that the color differentiation is clear and visible, randomly extracting part of the point cloud points, manually checking whether the deviation value and the classification result are consistent, and ensuring the accuracy of the classification, adjusting the deviation threshold value and the color scheme according to the actual inspection result to improve the accuracy of the classification and the visualization effect, saving the visualization results of the three-dimensional point cloud model and the color identification in the form of pictures or videos for subsequent reporting and display, generating a detailed deviation analysis report according to the classification result, summarizing the flatness of the template, and proposing construction adjustment suggestions.

[0021] In an alternative embodiment, the plane fitting model is performed according to the Cartesian equation of the plane, also known as the general equation, which has a standard form of ax+by+cz+d=0, where (a,b,c) is the unit normal vector of the plane, and satisfies d is the plane offset.

[0022] An optimization model of the target function RANSAC is established:

[0023]

[0024] In the formula, N is the total number of point clouds, ∈ is the inlier distance threshold, and δ is an indicator function, which is 1 when the condition is met and 2 when the condition is not met.

[0025] In an alternative embodiment, the plane is established, and the mathematical expression of the plane is ax+by+cz+d=0, so that the plane can contain as many given points M(x i ,y i ,z i ) as possible, that is, all the points of the model of the template in the point cloud model, and the distance of these points to the plane does not exceed the set threshold ∈, which is set according to the quality acceptance specification;

[0026] The normal vector constraint condition is satisfied:

[0027] a 2 +b 2 +c 2 =1

[0028] A deviation quantization model is established, and the vertical deviation is symbolized:

[0029]

[0030] In the formula, Δ i >0 indicates that the point P i is located on the positive direction side of the plane, and Δ i <0 indicates that the point P i is located on the negative direction side of the plane. The flatness index data set of the final absolute deviation is:

[0031] D i =|Δ i |.

[0032] In an alternative embodiment, the threshold is set to make the results present dynamic two-color colors, and the condition is set to blue and the condition is set to red. The specific mapping model color allocation function is as follows:

[0033]

[0034] In the formula, τ is a preset threshold, which is set according to the quality acceptance specification, such as 10 mm;

[0035] A quality evaluation index calculation model is designed to calculate the proportion of qualified point clouds and the maximum deviation value statistics, wherein the qualified rate is calculated as:

[0036]

[0037] δ is an indicator function, and the above-mentioned satisfaction is 1 and the above-mentioned non-satisfaction is 0. The above-mentioned formula is to calculate the proportion of the number of points satisfying the total number of point cloud points;

[0038] Maximum deviation statistics:

[0039] D max= max(D i ), D min = min(D i ).

[0040] In another aspect of the present application, a building template flatness threshold partition detection system based on normal vector constraint RANSAC is provided, comprising a three-dimensional laser scanning device for scanning the building template to obtain high-density point cloud data.

[0041] A data processing device is configured to preprocess the point cloud data and fit a reference surface of the template by using an improved RANSAC algorithm, wherein the improved RANSAC algorithm ensures the correct direction of the reference surface based on unit normal vector constraint.

[0042] A display device is configured to automatically set a deviation threshold according to the building specification, divide the deviation values into different levels, and display them on the three-dimensional point cloud model by color differentiation.

[0043] In another aspect of the present application, an electronic device is provided, comprising:

[0044] at least one memory which non-transiently stores computer executable instructions;

[0045] at least one processor configured to run the computer executable instructions,

[0046] wherein the computer executable instructions, when executed by the processor, implement the building template flatness threshold partition detection method based on normal vector constraint RANSAC described above.

[0047] In another aspect of the present application, a computer readable storage medium is provided, wherein the computer readable storage medium stores computer executable instructions, and the computer executable instructions, when executed by at least one processor, implement the building template flatness threshold partition detection method based on normal vector constraint RANSAC described above.

[0048] The present application obtains high-density point cloud data by three-dimensional laser scanning of the building template, improves the data quality by denoising and downsampling of the collected point cloud data, fits the reference surface of the template based on the pretreated point cloud data by using the improved RANSAC algorithm, introduces the unit normal vector to ensure the correct direction of the reference surface, calculates the perpendicular distance of each point cloud point to the reference surface to obtain the deviation value, divides the deviation values into different levels according to the building specification, and displays them on the three-dimensional point cloud model by color differentiation, and outputs the visualized results containing the three-dimensional point cloud model and color identification to intuitively show the flatness of the template, which has the effects of automatic measurement, high efficiency and high precision. BRIEF DESCRIPTION OF DRAWINGS

[0049] The accompanying drawings are included to provide a further understanding of the application and are incorporated in and constitute a part of the specification, illustrate embodiments of the application and are used to explain the application, but are not intended to limit the application. In the drawings:

[0050] Figure 1 a flow chart provided in Embodiment 1 of the present application;

[0051] Figure 2 a system framework diagram provided in Embodiment 4 of the present application;

[0052] Figure 3 a block diagram of an electronic device provided in Embodiment 5 of the present application;

[0053] Figure 4 a block diagram of a computer readable storage medium provided in Embodiment 6 of the present application. DETAILED DESCRIPTION

[0054] The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments of the present application.

[0055] Hereinafter, the terms "first", "second", and the like are used only for the purpose of description, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the technical features indicated. Therefore, the features defined with "first", "second", and the like can explicitly or implicitly include one or more features. In the description of the present application, unless otherwise specified, the meaning of "a plurality of" is two or more.

[0056] In the present application, unless otherwise explicitly specified and limited, the term "connection" should be understood broadly, for example, "connection" can be a fixed mechanical connection, or a detachable mechanical connection, or an integral; or "connection" can be direct connection, or indirect connection through an intermediate medium. In addition, unless otherwise explicitly specified and limited, the term "coupling" should be understood broadly, for example, "coupling" can be direct electrical connection, for example, physical contact and electrical conduction between two components, or can be understood as electrical connection between different components through solid lines such as copper foil or wire of printed circuit board (PCB) in line structure to transmit electrical signals; or "coupling" can be indirect electrical connection between two components through an intermediate medium; or "coupling" can be electrical connection between two components in a way of space / without contact, for example, electrical connection between two components in a way of capacitive coupling to transmit electrical signals.

[0057] In this embodiment of the invention, directional terms such as "up," "down," "left," and "right" may be defined relative to the orientation of the components shown in the accompanying drawings. It should be understood that these directional terms can be relative concepts, used for relative description and clarification, and can change accordingly depending on the orientation of the components in the accompanying drawings.

[0058] Example 1:

[0059] like Figure 1 As shown, this embodiment of the invention provides a method for detecting the threshold partitioning of building formwork flatness based on normal vector constraint RANSAC, comprising the following steps:

[0060] Step S100: Perform 3D laser scanning on the building template to obtain high-density point cloud data;

[0061] Step S200: Perform preprocessing operations such as denoising and downsampling on the collected point cloud data to improve data quality;

[0062] Step S300: Using the improved RANSAC algorithm, based on the preprocessed point cloud data, fit the reference plane of the template, introduce the unit normal vector, and ensure the correct orientation of the reference plane.

[0063] Step S400: Calculate the vertical distance from each point cloud point to the reference plane to obtain the deviation value;

[0064] Step S500: Set deviation thresholds independently according to building codes, divide deviation values ​​into different levels, and display them on the 3D point cloud model by color differentiation;

[0065] Step S600: Output a visualization result containing a 3D point cloud model and color markers, which intuitively shows the flatness of the template.

[0066] In the above embodiments, a 3D laser scanning device is used to scan the building template to obtain high-density point cloud data. Noise denoising: Noise points are removed through statistical filtering or curvature-based methods. Downsampling: The point cloud data is downsampled to reduce the data volume and improve processing efficiency. Three points are randomly selected as initial samples, and the normal vector of the fitting plane is calculated. The normal vector is normalized to ensure directional consistency. Normal vector constraints are introduced to adjust the orientation of the fitting plane to conform to the correct orientation of the template. Iterative optimization is performed, and the plane with the most interior points and the smallest deviation is selected as the reference plane.

[0067] Deviation Calculation and Classification: Calculate Deviation Values: For each point cloud point, calculate its perpendicular distance to the reference plane. Set Deviation Thresholds: According to building specifications, set threshold ranges for different deviation levels, such as slight deviation (≤ 2mm), moderate deviation (2mm-5mm), and severe deviation (>5mm). Classify Point Cloud Points: Classify point cloud points into different levels based on deviation values.

[0068] Color Mapping and Visualization: Choose Color Scheme: Select corresponding colors for each deviation level, such as green for slight deviation, orange for moderate deviation, and red for severe deviation. Color Map: Map classification results to point cloud data, displaying different colors on the three-dimensional model. Add Legend and Annotations: Add legends and annotations in the visualization interface to explain the deviation levels represented by different colors.

[0069] Result Output and Report: Save Visualization Results: Save the three-dimensional point cloud model and color-labeled visualization results in picture or video format. Generate Deviation Analysis Report: Summarize the flatness of the template and provide construction adjustment suggestions. Data Preprocessing Optimization: Resolution Adjustment: Adjust the resolution of point cloud data as needed to balance data quality and processing efficiency. Data Alignment: Align point cloud data obtained from multiple-angle scanning to ensure data consistency. Improved RANSAC Algorithm Optimization: Adaptive Threshold: Dynamically adjust the threshold of the RANSAC algorithm based on data characteristics to improve fitting accuracy. Parallel Computing: Use multi-core processors or GPUs to accelerate the iterative process of the RANSAC algorithm to improve processing speed. Deviation Classification and Color Mapping Optimization: Dynamic Color Scheme: Dynamically adjust the color scheme based on actual deviation ranges to ensure color differentiation. Color Contrast Optimization: Adjust color contrast to ensure clear and distinguishable colors for different deviation levels. Visualization Optimization: Interactive Interface: Develop an interactive visualization interface that allows users to adjust thresholds and color schemes in real time. Multi-angle Display: Support multi-angle display to facilitate observation of the template's flatness from different angles. Automated Report Generation: Intelligent Analysis: Based on classification results, intelligently analyze the template's flatness issues and generate targeted adjustment suggestions. Report Templates: Provide various report templates to facilitate user selection and customization of report formats according to needs.

[0070] Integration into Building Management Systems: Integrate the flatness detection system into building management software for real-time data upload and analysis. Provide remote monitoring capabilities, allowing construction managers to view formwork flatness at any time and from anywhere. Integration with BIM Technology: Correlate point cloud data with BIM models for comparative analysis of formwork flatness and design models. Generate deviation reports to guide construction adjustments and ensure that construction quality meets design requirements. Mobile Application Development: Develop mobile applications to facilitate on-site formwork detection using smartphones or tablets by construction personnel. Provide real-time feedback capabilities, allowing construction personnel to make immediate adjustments based on detection results. Training and Knowledge Sharing: Develop training modules with operation guides and case analyses to help construction personnel quickly master detection methods. Establish a knowledge sharing platform for construction teams to upload and share detection results and experiences, promoting team collaboration and knowledge accumulation.

[0071] Performance Testing and Validation, Test Environment Setup: Select building forms of different sizes and complexities as test objects. Ensure the diversity and representativeness of the test environment, covering different construction conditions and form types. Algorithm Performance Testing: Fitting Accuracy: Test the fitting accuracy of the improved RANSAC algorithm under different noise and outlier conditions. Processing Speed: Evaluate the processing speed of the algorithm under different data volumes to verify its efficiency and scalability. Classification Accuracy Verification: Classification Accuracy: Verify the accuracy of deviation classification through manual inspection and comparative analysis. Color Mapping Consistency: Ensure that the color mapping is consistent with the classification results, with clear color differentiation. User Feedback Collection: User Experience Testing: Invite users of different backgrounds to participate in system testing and collect their feedback. Functionality Analysis: Based on user feedback, analyze the completeness and improvement direction of system functions. Continuous Optimization and Upgrade: Regular Updates: Regularly optimize and upgrade the system based on test results and user feedback. Technical Support: Provide technical support and consulting services to help users solve problems encountered during use.

[0072] Technology Comparison and Advantage Analysis, Compared with Traditional RANSAC Algorithm: Fitting Accuracy: The improved RANSAC algorithm improves fitting accuracy by introducing normal vector constraints, ensuring correct reference surface direction. Processing Speed: The optimized RANSAC algorithm is comparable in processing speed to traditional algorithms, and even faster in some cases. Adaptability: The improved algorithm performs better in complex and noisy point cloud data, with stronger adaptability. Compared with manual detection methods: Efficiency: Automated detection systems significantly improve detection efficiency and reduce labor costs. Accuracy: Algorithm-based detection methods have higher accuracy and consistency, reducing human error. Visualization: Detection results are more intuitive through color zoning display, making it easier for construction teams to understand and adjust.

[0073] Compared with the existing detection system: comprehensive functions: the system integrates data acquisition, processing, fitting, classification, visualization and other functions, and the functions are more comprehensive. User-friendly: the system provides an interactive interface and intelligent analysis functions, making it easier for users to operate. Scalability: the system supports integration with BIM technology, building management systems, and other technologies, and has better scalability and application prospects.

[0074] Embodiment 2

[0075] As Figure 2 shown, based on embodiment 1, the step of performing three-dimensional laser scanning on the building template to obtain high-density point cloud data in step S100 provided by the embodiment of the application includes selecting a device with appropriate resolution and scanning range according to the size and complexity of the building template, ensuring that the scanner has sufficient power, the storage medium is available, and the device is in good working condition, specifying the specific location and coverage of the building template that needs to be scanned, determining multiple scanning positions according to the shape and structure of the template to ensure comprehensive coverage of each face of the template, setting the scanning resolution as needed, obtaining more detailed data at high resolution, but increasing the amount of data, adjusting the scanning frequency according to the dynamics of the template, fixing the scanner on a tripod or other stable support device to ensure that the device does not shake during scanning, calibrating the device to ensure the accuracy of the scanning data, monitoring the scanning progress and data quality in real time through the device display screen or connected computer, and storing the original point cloud data obtained by scanning in the device or directly transmitting it to the computer.

[0076] The step of fitting the reference surface of the template based on the preprocessed point cloud data using the improved RANSAC algorithm and introducing the unit normal vector to ensure the correct direction of the reference surface includes setting the number of iterations of the RANSAC algorithm according to the size and complexity of the data to ensure that the optimal plane is found, defining the distance threshold of the point to the plane to determine whether the point belongs to the fitted plane, randomly selecting three points from the point cloud data as the initial sample of the fitted plane, calculating the normal vector and equation of the plane based on the three points, calculating the normal vector according to the fitted plane equation, normalizing the normal vector to make it a unit normal vector, and ensuring the consistency of the direction.

[0077] According to the structural characteristics of the building template, a reference vector is set as the correct direction of the reference surface, the included angle between the unit normal vector of the current fitting plane and the reference direction is calculated, and it is judged whether the directions are consistent. If the directions are not consistent, adjust the direction of the normal vector to make it as close to the reference direction as possible. For each point cloud point, calculate its vertical distance to the fitting plane, and according to the set threshold, divide the points into inner points and outer points. In the iteration process, randomly select sample points, fit the plane, and adjust the direction of the normal vector. After each iteration, evaluate the number of inner points and the overall deviation of the current fitting plane, and record the optimal fitting result. When the set number of iterations is reached or the fitting result is no longer significantly improved, terminate the iteration.

[0078] According to the iteration result, select the plane with the most inner points and the smallest deviation as the reference surface;

[0079] Output plane parameters: output the plane equation, normal vector and point cloud data of the reference surface for subsequent deviation calculation and visualization. Superimpose the fitted reference surface with the original point cloud data and display it intuitively to check the fitting effect, ensure that the normal vector direction of the reference surface conforms to the preset reference direction, and the deviation is within the acceptable range. According to the verification result, adjust the algorithm parameters such as the number of iterations and the threshold to further optimize the fitting result. Based on the fitted reference surface, calculate the deviation value of each point cloud point for template flatness evaluation. According to the deviation value, divide the template area into different levels and display it through color differentiation to intuitively show the flatness. Integrate the improved RANSAC algorithm into the building template detection system to realize automatic and high-precision flatness detection.

[0080] The step of setting the deviation threshold value autonomously according to the building specification, dividing the deviation value into different levels, and displaying the color distinction on the three-dimensional point cloud model includes setting the threshold range of each deviation level according to the specification, recording the set threshold range for subsequent data processing and adjustment, importing the pre-processed three-dimensional point cloud data into the selected software, ensuring that the deviation value of each point cloud point has been calculated and associated with the point cloud data, classifying the deviation value of each point cloud point according to the set threshold range, updating the classification results to the point cloud data to ensure the accuracy of the classification information of each point cloud point, selecting a color scheme according to the deviation level, applying the color mapping rule to the point cloud data, and displaying the color distinction of different deviation levels in real time to optimize the perspective and lighting settings of the three-dimensional point cloud model to ensure clear color distinction, randomly extracting part of the point cloud points to manually check whether the deviation value and the classification result are consistent to ensure the accuracy of the classification, adjusting the deviation threshold value and the color scheme according to the actual inspection results to improve the accuracy of the classification and the visual effect, saving the visual results of the three-dimensional point cloud model and the color identification in picture or video format for subsequent reporting and display, generating a detailed deviation analysis report according to the classification results, summarizing the flatness of the template, and proposing construction adjustment suggestions.

[0081] In the above embodiments, a suitable three-dimensional laser scanner is selected: according to the size and complexity of the building template, a device with appropriate resolution and scanning range is selected. Check the device status: ensure that the scanner has sufficient power, the storage medium is available, and the device is in good working condition. Determine the scanning range: clearly define the specific location and coverage of the building template that needs to be scanned. Select scanning positions: according to the shape and structure of the template, determine multiple scanning positions to ensure comprehensive coverage of all surfaces of the template. Adjust the resolution: set the scanning resolution according to the needs, high resolution can obtain more detailed data, but will increase the data volume. Set the scanning frequency: adjust the scanning frequency according to the dynamics of the template (such as whether there are moving parts). Set the scanning angle: ensure that the scanning angle can cover the entire template to avoid blind spots. Use stable support: fix the scanner on a tripod or other stable support device to ensure that the device does not shake during scanning. Calibrate the device: calibrate the device to ensure the accuracy of the scanning data.

[0082] Start the scanning program: start the scanning program according to the device operation manual. Perform multi-angle scanning: scan the template from different angles to ensure the comprehensiveness of the data. Record scanning parameters: record the position, angle and parameter settings of each scan for subsequent data processing. Real-time monitoring of the scanning process: through the device display screen or connected computer, real-time monitoring of the scanning progress and data quality. Store the original data: store the original point cloud data obtained by scanning in the device or directly transfer to the computer.

[0083] De-noising: Use professional software to de-noise the point cloud data, remove abnormal points caused by environmental interference or device errors. Down-sampling: Down-sample the point cloud data to reduce data volume and improve subsequent processing efficiency. Coordinate alignment: Align the point cloud data obtained from multi-angle scanning to ensure data consistency and integrity.

[0084] Data visualization and inspection: Visualize the point cloud data using point cloud processing software (such as CloudCompare, MeshLab, etc.) to check if the scanning results meet expectations. Check coverage: Ensure that all template areas are scanned without missing or blind areas. Evaluate data quality: Check the density, uniformity and completeness of the point cloud data to ensure that the data quality meets the requirements of subsequent analysis. Format conversion: Convert the point cloud data into common formats (such as LAS, PLY, etc.) for subsequent processing and analysis. Data backup: Backup the processed point cloud data in a safe and reliable storage medium to prevent data loss. Establish data management archives: Record information such as data acquisition time, location, device parameters, etc. for subsequent tracing and management.

[0085] Quality control and optimization: Evaluate the quality of the point cloud data through statistical analysis and visual inspection to ensure that it meets the requirements of subsequent flatness detection. Optimize scanning strategy: Optimize scanning parameters and strategies based on actual scanning results to improve data acquisition efficiency and quality. Through the above steps, three-dimensional laser scanning of the building template can be systematically and efficiently completed, obtaining high-density and high-quality point cloud data to provide a solid data foundation for subsequent template flatness detection.

[0086] Pre-processed point cloud data: Ensure that the point cloud data has completed de-noising, down-sampling and other preprocessing steps, and the data quality is good, suitable for plane fitting. Set iteration number: Set the iteration number of RANSAC algorithm according to the data size and complexity to ensure that the optimal plane is found. Set threshold: Define the distance threshold of points to the plane to determine whether the points belong to the fitted plane. Randomly select sample points: Randomly select three points from the point cloud data as the initial sample of the fitted plane. Fit plane equation: Calculate the normal vector and equation of the plane based on the three points. Calculate initial normal vector: Calculate the normal vector based on the fitted plane equation. Unitize normal vector: Normalize the normal vector to make it a unit normal vector to ensure the consistency of the direction.

[0087] Determine the reference plane direction, set the reference direction: According to the structural characteristics of the building template, set a reference normal vector as the correct direction of the reference plane. Compare the normal vector direction: Calculate the included angle between the unit normal vector of the current fitting plane and the reference direction to determine whether the directions are consistent. Adjust the normal vector direction: If the directions are not consistent, adjust the direction of the normal vector to make it as close to the reference direction as possible. Calculate the distance from the point to the plane: For each point cloud point, calculate its vertical distance to the fitting plane. Classify point cloud points: According to the set threshold, divide the points into inliers (belonging to the fitting plane) and outliers (not belonging to the fitting plane).

[0088] Repeat random sampling and fitting: In the iteration process, constantly randomly select sample points, fit the plane, and adjust the direction of the normal vector. Evaluate the fitting result: After each iteration, evaluate the number of inliers and overall deviation of the current fitting plane, and record the optimal fitting result. Termination condition: When the set number of iterations is reached or the fitting result no longer improves significantly, terminate the iteration.

[0089] Output the reference plane, determine the optimal plane: According to the iteration result, select the plane with the most inliers and the smallest deviation as the reference plane. Output plane parameters: Output the plane equation, normal vector and point cloud data of the reference plane for subsequent deviation calculation and visualization.

[0090] Visualization and verification, visualize the fitting result: Superimpose the fitted reference plane with the original point cloud data for display, and visually check the fitting effect. Verify the correctness of the direction: Ensure that the normal vector direction of the reference plane conforms to the pre-set reference direction, and the deviation is within an acceptable range. Adjust and optimize: According to the verification result, adjust algorithm parameters such as the number of iterations, threshold, etc., to further optimize the fitting result.

[0091] Application and extension, deviation calculation: Based on the fitted reference plane, calculate the deviation value of each point cloud point for template flatness evaluation. Partition and color display: According to the deviation value, divide the template area into different levels and display it through color differentiation, visually showing the flatness situation. Automatic detection: Integrate the improved RANSAC algorithm into the building template detection system to realize automatic and high-precision flatness detection. Through the above steps, the improved RANSAC algorithm can be effectively used to fit the reference plane of the template based on the pre-processed point cloud data, and ensure the correctness of the reference plane direction, providing a reliable foundation for subsequent template flatness detection.

[0092] Refer to the Building Construction Quality Acceptance Specification to clearly define the allowable deviation range and classification standards for template flatness. Determine the deviation level: According to the specification, divide the deviation value into different levels such as slight deviation, moderate deviation, and severe deviation.

[0093] Determine the threshold range: According to the specification, set the threshold range for each deviation level. For example:

[0094] Minor deviation: 0 < deviation value ≤ 2 mm;

[0095] Moderate deviation: 2 mm < deviation value ≤ 5 mm;

[0096] Severe deviation: deviation value > 5 mm;

[0097] Record threshold parameters: Record the set threshold range for future data processing and adjustment.

[0098] Select professional software that supports three-dimensional point cloud data processing and visualization, such as CloudCompare, MeshLab, PointCloudsLibrary (PCL), etc. Understand the color mapping, data classification, and visualization functions of the software to ensure that color differentiation display of deviation levels can be achieved. Import point cloud data: Import the pre-processed three-dimensional point cloud data into the selected software. Load deviation value data: Ensure that the deviation value of each point cloud point has been calculated and associated with the point cloud data.

[0099] Apply threshold classification: According to the set threshold range, classify the deviation value of each point cloud point. For example:

[0100] Deviation value ≤ 2 mm: classified as minor deviation;

[0101] 2 mm < deviation value ≤ 5 mm: classified as moderate deviation;

[0102] Deviation value > 5 mm: classified as severe deviation;

[0103] Update point cloud attributes: Update the classification results to the point cloud data to ensure that the classification information of each point cloud point is accurate.

[0104] Select color scheme: According to the deviation level, select the appropriate color scheme. For example:

[0105] Minor deviation: green;

[0106] Moderate deviation: orange;

[0107] Severe deviation: red;

[0108] Configure color mapping rules: Set color mapping rules in the software to map each deviation level to the corresponding color.

[0109] Apply color mapping: Apply color mapping rules to the point cloud data to display color differentiation of different deviation levels in real time. Adjust the viewing angle and lighting: Optimize the viewing angle and lighting settings of the three-dimensional point cloud model to ensure that the color differentiation is clear and visible. Add legends and annotations: Add legends and annotations to the visualization interface to explain the deviation levels represented by different colors, making it easier to understand and analyze. Check the classification accuracy: Randomly select a portion of the point cloud points and manually check whether their deviation values and classification results are consistent to ensure the accuracy of the classification. Adjust the threshold and color scheme: Based on the actual inspection results, adjust the deviation threshold and color scheme to improve the accuracy of the classification and the visual effect. Optimize processing speed: If the data volume is large, consider downsampling or optimizing the point cloud data to improve the efficiency of data processing and visualization. Save the visualization results: Save the three-dimensional point cloud model and color-labeled visualization results in picture or video format for future reporting and presentation. Generate a deviation analysis report: Based on the classification results, generate a detailed deviation analysis report summarizing the flatness of the template and providing suggestions for construction adjustments. Share and feedback: Share the visualization results and report with the construction team and relevant responsible persons, collect feedback, and further optimize the detection method and visualization effect.

[0110] Record improvement measures: Based on feedback, record areas for improvement, such as adjusting thresholds and optimizing color schemes. Update the detection process: Incorporate improvement measures into the detection process to continuously optimize the entire deviation detection and visualization display process. Training and knowledge sharing: Train the construction team to ensure they can understand and utilize the visualization results, improving overall construction quality management. Through the above steps, you can set deviation thresholds according to building specifications, divide deviation values into different levels, and display them on the three-dimensional point cloud model using color differentiation, providing a reliable basis for evaluating and adjusting construction quality.

[0111] Example 3:

[0112] As Figure 3 shown, based on the embodiment, the step of performing plane fitting model in the embodiment provided by the present embodiment is to perform plane fitting model according to the Cartesian equation of the plane, also known as the general equation, which has a standard form: ax+by+cz+d=0, wherein (a, b, c) is a unit normal vector of the plane, and satisfies d is the offset of the plane.

[0113] Establish the optimization model of the target function RANSAC:

[0114]

[0115] where N is the total number of point clouds, ∈ is the inlier distance threshold, and δ is an indicator function that is 1 when the condition is met and 2 when the condition is not met.

[0116] In an alternative embodiment, the plane is established, and the mathematical expression of the plane is ax+by+cz+d=0, so that the plane can contain as many given points M(x i ,y i ,z i ) as possible, that is, all the points of the model of the template in the point cloud model, and the distance of these points to the plane does not exceed the set threshold ∈, which is set according to the quality acceptance specification;

[0117] The normal vector constraint condition is satisfied:

[0118] a 2 +b 2 +c 2 =1

[0119] A deviation quantization model is established, and the vertical deviation is symbolized:

[0120]

[0121] In the formula, Δ i >0 indicates that the point P i is located on the positive direction side of the plane, and Δ i <0 indicates that the point P i is located on the negative direction side of the plane. The flatness index data set of the final absolute deviation is:

[0122] D i =|Δ i |.

[0123] In an alternative embodiment, the threshold is set to make the results present dynamic two-color colors, and the condition is set to blue and the condition is set to red. The specific mapping model color allocation function is as follows:

[0124]

[0125] In the formula, τ is a preset threshold, which is set according to the quality acceptance specification, such as 10 mm;

[0126] A quality evaluation index calculation model is designed to calculate the proportion of qualified point clouds and the maximum deviation value statistics, wherein the qualified rate is calculated as:

[0127]

[0128] δ is an indicator function, and the above-mentioned satisfaction is 1 and the above-mentioned non-satisfaction is 0. The above-mentioned formula is to calculate the proportion of the number of points satisfying the total number of point cloud points;

[0129] Maximum deviation statistics:

[0130] D max=max(D i ), D min =min(Δ i ).

[0131] The algorithm described above is implemented using the MATLAB software environment.

[0132] First, point cloud data is acquired. Then, using equipment such as 3D laser scanning, the completed template model is scanned and cropped until only the template model remains. Finally, it is exported as a LAS format.

[0133] Furthermore, input conversion code in MATLAB to convert the LAS format into PLY format data for subsequent processing.

[0134] Further input the code for the above formula, set the number of iterations and threshold data, and in this experiment, set the number of iterations to 2000 times, and finally output the image.

[0135] Example 4:

[0136] like Figure 2 As shown in Example 3, this embodiment of the invention provides a building template flatness threshold zoning detection system based on normal vector constraint RANSAC, including a three-dimensional laser scanning device for scanning the building template to obtain high-density point cloud data;

[0137] A data processing device is used to preprocess the point cloud data and fit the reference surface of the template using an improved RANSAC algorithm, wherein the improved RANSAC algorithm ensures the correct orientation of the reference surface based on unit normal vector constraints.

[0138] The display device is used to set deviation thresholds independently according to building codes, divide deviation values ​​into different levels, and display them on the 3D point cloud model by color differentiation.

[0139] Example 5:

[0140] Figure 3 A block diagram of an exemplary electronic device suitable for implementing embodiments of the present invention is shown.

[0141] The electronic device may include a central processing unit / microprocessor / main control chip, etc. 4; and a storage medium 5, coupled to the central processing unit / microprocessor / main control chip, etc. 4, and storing computer-executable instructions therein for performing the steps of various methods of embodiments of the present invention when executed by the processor.

[0142] The central processing unit / microprocessor / main control chip, etc., can include, but are not limited to, one or more processors or microprocessors.

[0143] The storage medium 5 can include, but is not limited to, for example, a random access memory (RAM), a read only memory (ROM), a flash memory, an EPROM memory, an EEPROM memory, a register, a computer storage medium (such as a hard disk, a floppy disk, a solid state disk, a removable disk, a CD-ROM, a DVD-ROM, a Blu-ray disk, and the like), and the like.

[0144] In addition to this, the electronic device can further include, but is not limited to, a data bus 6, an input / output bus / external bus / device bus, and the like 7, a display 8, and an input / output device 9 (such as a keyboard, a mouse, a speaker, and the like), and the like.

[0145] The central processing unit / microprocessor / master control chip, and the like 4 can communicate with external devices (8, 9, and the like) via a wired or wireless network (not shown) through the I / O bus 7.

[0146] The storage medium 5 can further store at least one computer executable instruction for performing the steps of the various functions and / or methods in the embodiments described in the present technology when executed by the central processing unit / microprocessor / master control chip, and the like 4.

[0147] In one embodiment, the at least one computer executable instruction can also be compiled or constitute a software product in which one or more computer executable instructions are executed by a processor to perform the steps of the various functions and / or methods in the embodiments described in the present technology.

[0148] Embodiment 6:

[0149] Figure 4 A schematic diagram of a computer readable storage medium according to an embodiment of the present application is shown.

[0150] As Figure 4 shown, a non-transitory computer readable storage medium 11 stores instructions, for example, computer readable instructions 10. When the computer readable instructions 10 are executed by a processor, the various methods described above can be performed. The non-transitory computer readable storage medium includes, but is not limited to, for example, a volatile memory and / or a non-volatile memory. The volatile memory can include, for example, a random access memory (RAM) and / or a cache memory, and the like. The non-transitory non-volatile memory can include, for example, a read only memory (ROM), a hard disk, a flash memory, and the like. For example, the non-transitory computer readable storage medium 11 can be connected to a computing device such as a computer, and then, when the computing device executes the computer readable instructions 10 stored on the non-transitory computer readable storage medium 11, the various methods described above can be performed.

[0151] 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 described apparatus embodiments are merely schematic. The unit division is merely logical function division. There can be other division manners in actual implementation. For example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not implemented. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections between different units, or the among different units, can be indirect couplings or communication connections through some interfaces, devices or unit intermediaries, and can be in electrical, mechanical or other forms.

[0152] The unit described as a separate component can or can not be physically separate, and the component shown as a unit can or can not be a physical unit, i.e., can be located in one place, or can be distributed to a plurality of network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.

[0153] In addition, the functional units in the various embodiments of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.

[0154] If the integrated unit is realized in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable 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 executing all or part of the steps of the various embodiments of the method of the present application by a computer device (which can be a personal computer, a server, or a network device, etc.). The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (English full name: Read-Only Memory, English abbreviation: ROM), a random access memory (English full name: Random Access Memory, English abbreviation: RAM), a magnetic disk or an optical disk, and various media that can store program codes.

[0155] The above embodiments are merely used to describe the technical solutions of the present application, rather than limit them. Although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that the technical solutions recorded in the foregoing embodiments can be modified, or some technical features can be replaced by equivalent ones; and such modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A building template flatness threshold partition detection method based on normal vector constraint RANSAC, characterized in that, The method comprises the following steps: Three-dimensional laser scanning of the building template to obtain high-density point cloud data; Preprocessing operations such as denoising and downsampling are performed on the collected point cloud data to improve data quality; An improved RANSAC algorithm is used to fit the reference surface of the template based on the pretreated point cloud data, and a unit normal vector is introduced to ensure the correct direction of the reference surface; The perpendicular distance of each point cloud point to the reference surface is calculated to obtain the deviation value; According to the building specification, the deviation threshold is set automatically, the deviation value is divided into different levels, and the color is displayed on the three-dimensional point cloud model; The visualization results including the three-dimensional point cloud model and color identification are outputted to intuitively show the flatness of the template.

2. The normal vector constraint RANSAC based building template flatness threshold zone detection method of claim 1, wherein, The step of three-dimensional laser scanning of the building template to obtain high-density point cloud data comprises the following steps: according to the size and complexity of the building template, a device with appropriate resolution and scanning range is selected, the scanner power is sufficient, the storage medium is available, and the device is in good working condition, the specific position and coverage range of the building template to be scanned are determined, the scanning resolution is set according to the shape and structure of the template, the high-resolution data is obtained, but the data volume is increased, the scanning frequency is adjusted according to the dynamic nature of the template, the scanner is fixed on a tripod or other stable support device to ensure that the device does not shake during scanning, the device is calibrated to ensure the accuracy of the scanning data, the scanning progress and data quality are monitored in real time through the device display screen or connected computer, and the original point cloud data obtained by scanning is stored in the device or directly transmitted to the computer.

3. The normal vector constraint RANSAC based building template flatness threshold zone detection method of claim 1, wherein, The step of using an improved RANSAC algorithm to fit the reference surface of the template based on the pretreated point cloud data and introducing a unit normal vector to ensure the correct direction of the reference surface comprises the following steps: according to the data size and complexity, the number of iterations of the RANSAC algorithm is set to ensure that the optimal plane is found, the distance threshold of the point to the plane is defined to determine whether the point belongs to the fitted plane, three points are randomly selected from the point cloud data as the initial sample of the fitted plane, the normal vector and equation of the plane are calculated based on the three points, the normal vector is calculated according to the fitted plane equation, the normal vector is normalized to make it a unit normal vector to ensure the consistency of the direction; According to the structural characteristics of the building template, a reference normal vector is set as the correct direction of the reference surface, the included angle between the unit normal vector of the current fitted plane and the reference direction is calculated to determine whether the directions are consistent, if the directions are not consistent, the direction of the normal vector is adjusted to make it as close to the reference direction as possible, for each point cloud point, the perpendicular distance of the point to the fitted plane is calculated, and the points are divided into inliers and outliers according to the set threshold, in the iteration process, sample points are randomly selected, the plane is fitted, and the direction of the normal vector is adjusted, after each iteration, the number of inliers and the overall deviation of the current fitted plane are evaluated, and the optimal fitting result is recorded, when the set number of iterations is reached or the fitting result is no longer significantly improved, the iteration is terminated; According to the iteration result, the plane with the most inliers and the smallest deviation is selected as the reference surface. Output plane parameters: the plane equation, normal vector and point cloud data of the output reference surface are output for subsequent deviation calculation and visualization, the fitted reference surface is superimposed with the original point cloud data for display, the fitting effect is intuitively checked, the normal vector direction of the reference surface is ensured to conform to the preset reference direction, and the deviation is within an acceptable range, according to the verification result, the algorithm parameters such as the number of iterations and the threshold value are adjusted to further optimize the fitting result, based on the fitted reference surface, the deviation value of each point cloud point is calculated for the evaluation of the flatness of the template, according to the deviation value, the template area is divided into different levels, and the color is displayed to intuitively show the flatness, the improved RANSAC algorithm is integrated into the building template detection system to realize automatic and high-precision flatness detection.

4. The normal vector constraint RANSAC based building template flatness threshold zone detection method of claim 1, wherein, The step of setting the deviation threshold value according to the building specification, dividing the deviation value into different levels, and displaying the color on the three-dimensional point cloud model includes setting the threshold range of each deviation level according to the specification, recording the set threshold range for subsequent data processing and adjustment, importing the preprocessed three-dimensional point cloud data into the selected software, ensuring that the deviation value of each point cloud point has been calculated and associated with the point cloud data, classifying the deviation value of each point cloud point according to the set threshold range, updating the classification result to the point cloud data to ensure the accuracy of the classification information of each point cloud point, selecting a color scheme according to the deviation level, applying the color mapping rule to the point cloud data, and displaying the color of different deviation levels in real time, optimizing the perspective and lighting settings of the three-dimensional point cloud model to ensure that the color differentiation is clear and visible, randomly selecting part of the point cloud points to manually check whether the deviation value and the classification result are consistent to ensure the accuracy of the classification, adjusting the deviation threshold value and the color scheme according to the actual inspection result to improve the accuracy of the classification and the visualization effect, saving the visualization results of the three-dimensional point cloud model and the color identification in the form of pictures or videos for subsequent reporting and display, generating a detailed deviation analysis report according to the classification result, summarizing the flatness of the template, and proposing construction adjustment suggestions.

5. The normal vector constraint RANSAC based building template flatness threshold zone detection method of claim 1, wherein, The plane fitting model is performed according to a plane Cartesian equation, also called a general equation, which has a standard form of ax+by+cz+d=0, where (a, b, c) is a plane unit normal vector, and d is a plane offset. d is a plane offset. An optimization model of the target function RANSAC is established: where N is the total number of point clouds, ∈ is the distance threshold of inliers, and δ is an indicator function, which is 1 when the condition is met and 2 when the condition is not met.

6. The normal vector constraint RANSAC based building template flatness threshold zone detection method of claim 5, wherein, The plane is established, and the mathematical expression of the plane is ax+by+cz+d=0, so that the plane can contain as many given points M(x i ,y i ,z i ) as possible, that is, the points of the model of all templates in the point cloud model, and the distance of the points to the plane is not more than a set threshold ∈, and the threshold is set according to the quality acceptance specification; The normal vector constraint condition is met: a 2 +b 2 +c 2 =1 A deviation quantification model is established, and the vertical deviation is symbolized: where Δ i > 0 indicates that point P i is located on the positive side of the plane, Δ i < 0 indicates that point P i is located on the negative side of the plane. The flatness index dataset of the final absolute deviation is: D i =|Δ i |.

7. The normal vector constraint RANSAC based building template flatness threshold zone detection method of claim 6, wherein, The threshold value is set to present dynamic two-color results, and the condition is set to blue and the condition is not met to red. The specific mapping model color allocation function is as follows: In the formula, τ is a preset threshold value set according to the quality acceptance specification, such as 10 mm; A quality evaluation index calculation model is designed to calculate the proportion of qualified point clouds and the maximum deviation value statistics, wherein the qualification rate is calculated as: δ is an indicator function, and the above-mentioned 1 means that the condition is met and 0 means that the condition is not met. The above formula calculates the proportion of the number of points that meet the condition to the total number of point clouds. Maximum deviation statistics: D max = max(D i ), D min = min(Δ i ).

8. A normal vector constraint RANSAC based building template flatness threshold zone detection system of the normal vector constraint RANSAC based building template flatness threshold zone detection method according to any one of claims 1 to 7, characterized in that, It includes: A three-dimensional laser scanning device is used to scan the building template to obtain high-density point cloud data. A data processing device is used to preprocess the point cloud data and fit the datum plane of the template by using an improved RANSAC algorithm, which ensures the correct direction of the datum plane based on unit normal vector constraint; A display device is used to autonomously set the deviation threshold according to the building specification, divide the deviation values into different levels, and display them on the three-dimensional point cloud model by color differentiation. 9.An electronic device, comprising: at least one memory that non-transitorily stores computer-executable instructions; at least one processor configured to execute the computer-executable instructions, wherein the computer-executable instructions, when executed by the processor, implement the method for RANSAC-based building template flatness threshold zoning detection based on normal vector constraint according to any one of claims 1-7.

10. A computer readable storage medium, wherein, The computer-readable storage medium stores computer-executable instructions, which, when executed by at least one processor, implement the method for RANSAC-based building template flatness threshold zoning detection based on normal vector constraint according to any one of claims 1-7.

Citation Information

Patent Citations

  • Plate defect detection method based on three-dimensional point cloud

    CN115100116A

  • Passenger car side wall plate flatness detection method based on three-dimensional point cloud and contour matching

    CN117934429A

  • Precast beam section surface flatness detection method based on three-dimensional point cloud model

    CN114037706A

  • RANSAC point cloud plane fitting method introducing normal vector optimization

    CN114791994A

  • Laser point cloud rock mass structure rapid identification method based on RANSAC algorithm

    CN117689965A

Cited By

  • Pipe ring flatness measuring method based on total station

    CN120926962A

  • Pipe ring flatness measurement method based on total station

    CN120926962B

  • Dynamic flatness detection method and system for structured light fusion laser calibration

    CN121346708A

  • Dynamic monitoring and optimizing method for curved surface coating flatness of robot with body

    CN121504923A