Concrete wall flatness detection method
By integrating a 3D scanning device with an RGB camera and a second-order polynomial surface model, and combining layered sampling of normal vectors, the problems of benchmark model distortion and information loss in concrete wall flatness detection are solved, achieving efficient and accurate flatness assessment and visualization reports.
Patent Information
- Application Number
- CN202511304536.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-12
- Publication Date
- 2025-12-16
AI Technical Summary
Existing technologies for detecting the flatness of concrete walls suffer from problems such as distorted benchmark models, loss of preprocessing information, and low efficiency, making it difficult to accurately reflect the true condition of the wall and leading to misjudgments and missed detections.
A 3D scanning device with an integrated RGB camera is used. The reference surface is fitted by a second-order polynomial surface model. Combined with consistent hierarchical sampling of normal vectors and the least squares method, the point cloud data is simplified, key features are preserved, and defect points are identified and projected onto a high-definition RGB image.
It improves the accuracy and efficiency of detection, reduces misjudgments and missed detections, generates clear and visual reports, and provides a basis for decision-making in subsequent repair work.
Smart Images

Figure CN121147162A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of building engineering quality testing technology, specifically to a method for testing the flatness of concrete walls. Background Technology
[0002] The flatness of concrete walls is one of the key indicators for evaluating the quality of building projects. Traditional testing methods involve manual measurement using a 2-meter straightedge and feeler gauge. While simple to operate, this method has many drawbacks. It is inefficient, labor-intensive, and the measurement points are sparse, making it difficult to reflect the true flatness of the wall. Furthermore, the results are easily affected by subjective factors.
[0003] With the development of 3D laser scanning technology, point cloud-based detection methods have gradually become a research hotspot. Existing technologies typically use 3D scanning equipment to acquire wall point clouds, and after a series of preprocessing steps such as filtering and downsampling, use algorithms such as Random Sample Consensus (RANSAC) to fit an ideal mathematical reference plane. Then, the distance from all points to this plane is calculated to determine the flatness.
[0004] However, existing technical solutions have the following main drawbacks:
[0005] Baseline model distortion: Traditional methods generally use a plane as the fitting baseline. However, in actual engineering, walls themselves may have macroscopic gradual changes, nonlinear bending or undulations within an acceptable range. Forcing an ideal plane to fit such a surface will lead to misjudgment of the overall shape of the wall, thus generating a large number of false "uneven" points in the gradual change areas of the wall that are not defective in reality, seriously affecting the accuracy of the detection.
[0006] Information loss and inefficiency in preprocessing: Traditional point cloud preprocessing, such as uniform voxel downsampling, adopts a "one-size-fits-all" strategy for point clouds in all regions. This results in a large amount of redundant data being retained in flat areas of the wall, while the fine geometric details in key feature areas with defects such as bumps and cracks may be blurred or lost due to oversampling, leading to missed detections.
[0007] The patent with publication number CN117197135A obtains a complete wall point cloud by stitching together data from multiple monitoring stations and uses SVD decomposition to fit an ideal reference plane. Finally, it generates a grayscale image by calculating the average distance from the point cloud to this plane, thereby achieving a quantitative assessment of wall flatness. However, this method ignores the macroscopic gradual curvature of walls that is common in actual engineering projects and is within the allowable range of specifications, leading to model distortion and systematic misjudgments. In addition, the method is relatively coarse in its preprocessing. After extracting the complete wall point cloud, all data points are processed uniformly, which may lead to problems such as missed detections.
[0008] Therefore, establishing a benchmark model that more closely resembles the actual macroscopic shape of the wall and accurately processing the point cloud to retain key information are crucial for improving the automation level, accuracy, and reliability of concrete wall flatness detection. Summary of the Invention
[0009] In order to overcome the shortcomings of the existing technology, the purpose of this invention is to provide a method for detecting the flatness of concrete walls, which can more realistically reflect the condition of the wall, improve the accuracy of detection, effectively simplify the flat areas and non-destructively preserve the defect feature areas, thereby improving processing efficiency and information fidelity.
[0010] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0011] A method for detecting the flatness of a concrete wall surface includes the following steps;
[0012] Step 1: Using a 3D scanning device with an integrated RGB camera, simultaneously acquire point cloud data of the concrete wall area to be inspected and capture high-definition RGB images to obtain the initial correspondence between the original point cloud data and image pixels, as well as the camera's internal and external parameters.
[0013] Step 2: Preprocess the raw point cloud data; simplify the data, retain key features, and remove noise;
[0014] Step 3: Using the point cloud data processed in Step 2, a second-order polynomial surface model is used to fit the wall surface using the least squares method, which serves as the flatness detection benchmark and a benchmark surface model is established.
[0015] Step 4: Based on the reference surface model established in Step 3, calculate the point cloud deviation and identify defect points;
[0016] Step 5: Based on the camera intrinsic and extrinsic parameters obtained in Step 1, establish a precise mapping relationship between the 3D point cloud coordinate system and the 2D image pixel coordinate system, and project the 3D coordinates of the defect points identified in Step 4 onto the corresponding 2D RGB image.
[0017] Step 6: Visualize the test results and generate a report that highlights the specific location, range, and degree of deviation of the uneven defects on the RGB image.
[0018] Step 1 specifically includes:
[0019] A 3D scanning device with an integrated high-resolution RGB camera was used to scan the target concrete wall. While acquiring the 3D coordinates of each spatial point, the integrated RGB camera simultaneously captured high-definition RGB images of the same field of view. The system obtained two sets of raw data: raw point cloud data P. setHigh-resolution RGB images, raw point cloud data P set P is a set composed of a large number of three-dimensional points. set ={P1,P2,...,P n}, where each point P i Its coordinates in the world coordinate system (X) wi ,Y wi Z wi As defined by ), high-definition RGB images record the color and texture information of the wall surface.
[0020] Step 2 specifically includes:
[0021] Step 2.1: Target area segmentation. The original point cloud data is segmented using a pass-through filter to remove point cloud data that is irrelevant to the wall surface being measured.
[0022] Step 2.2: Calculate the global principal normal vector. Use Principal Component Analysis (PCA) to calculate the covariance matrix of the cut point cloud data. The eigenvector corresponding to the smallest eigenvalue is the "global principal normal" vector N representing the overall orientation of the wall. global ,
[0023] Step 2.3: Layer the point cloud, traverse each point P in the point cloud. i The k-nearest neighbor (k-NN) algorithm is used to determine the local neighborhood point set, where k is the preset number of neighborhood points. The k-NN algorithm can adapt to changes in point cloud density, ensuring stable and reliable neighborhoods are obtained in regions with varying density. Subsequently, principal component analysis (PCA) is used to calculate the "local normal" vector n of this local neighborhood point set. local,i And calculate the angle θ between the local normal and the global principal normal. i According to the preset first angle threshold θ core and the second angle threshold θ outlier All point clouds are divided into three levels:
[0024] High-confidence core layer: when θ i ≤θ core At that time, this point was assigned to this layer, representing the flattest and most stable main part of the wall surface;
[0025] Transition feature layer: when θ core <θ i ≤θ outlier When this point is assigned to this layer, it typically corresponds to the edge of a flatness defect, a slope, or a gently changing area of the wall.
[0026] Outlier noise layer: when θ i >θ outlier When this point is assigned to this layer, it is likely to be a measurement of noise or the edge of an irrelevant object;
[0027] Step 2.4: Differentiated sampling. The "high confidence core layer" is downsampled significantly using the voxel grid method; the "transition feature layer" is fully preserved or slightly downsampled; the "outlier noise layer" is directly removed; all points retained after processing are merged to form a point cloud subset with high signal-to-noise ratio and high information value.
[0028] Step 3 specifically involves:
[0029] Step 3.1: High-order surface fitting, using a second-order polynomial surface model, the expression of which is:
[0030] z = f(x, y) = ax 2 +by 2 +cxy+dx+ey+f
[0031] Where (x,y,z) are the coordinates of any point in the point cloud, and (a,b,c,d,e,f) are the coefficients of the surface model to be solved, which together determine the shape and position of the surface;
[0032] Step 3.2: Establish the reference surface model. First, perform coordinate transformation on the point cloud subset to make the global principal normal vector N global The points are roughly aligned with the Z-axis of the coordinate system. Then, the least squares method is used to fit the subset of points and solve for the optimal coefficients (a,b,c,d,e,f) that minimize the sum of the squared Z-direction distances from all points to the surface, thus obtaining the final reference surface model for wall flatness.
[0033] Step 4 specifically involves:
[0034] Step 4.1: Calculate the deviation from the point to the surface for any point P in the point cloud subset. i (x i ,y i, z i Calculate its Z-axis projection value z′ on the fitted surface. i =f(x) i ,y i The flatness deviation d at this point i Defined as the vertical distance in the Z direction:
[0035]
[0036] Step 4.2: Identify unevenness defects, set the allowable deviation value for flatness required by the project (e.g., T = 4mm) as the threshold, and when the calculated deviation d i When the value is greater than T, the point is marked as an uneven defect point.
[0037] Step 5 specifically involves:
[0038] Using the camera intrinsic and extrinsic parameters calibrated in step 1, the three-dimensional coordinates P of all uneven defect points in the world coordinate system are determined. w (X w ,Y w Z w The coordinates (u,v) of a pixel on the image are converted using the following formula:
[0039]
[0040] Among them, Z c Let (u, v) be the depth of the point in camera coordinates, and (x, v) be the pixel coordinates on the 2D image. w ,Y w Z w ) is P w In the coordinates of three-dimensional space, [R|t] is the camera extrinsic parameter matrix, and K is the camera intrinsic parameter matrix.
[0041] In step 6, a gradient chromatogram is used to render the wall flatness test map based on the deviation value, and a quantitative data report containing key indicators such as the maximum deviation value and the percentage of area exceeding the standard is output.
[0042] The beneficial effects of this invention are:
[0043] Considering that actual walls often exhibit macroscopic, gradual curvature within the allowable range due to construction techniques and other factors, rigid planar benchmarks cannot accommodate this form, leading to model distortion and misjudging normal overall curvature as numerous unevenness defects. The second-order polynomial model used in this invention, due to its quadratic terms, possesses the inherent ability to fit smooth surfaces in three-dimensional space, constructing a "flexible" benchmark that accurately conforms to the true macroscopic contour of the wall. This effectively separates acceptable "overall gradual curvature" from unacceptable "local unevenness defects," eliminating systematic errors caused by benchmark mismatch, reducing misjudgments and omissions, and ensuring that the final test results closely match the actual needs of engineering quality assessment.
[0044] Employing a hierarchical sampling method based on normal vector consistency, this approach can identify and distinguish the importance of point clouds. It significantly simplifies flat areas representing the main body of the wall, greatly reducing data redundancy and subsequent computational load. At the same time, it fully preserves point clouds containing key geometric information, such as defect edges or gently changing regions, ensuring that details of flatness defects are not lost, thus achieving a balance between computational efficiency and information fidelity.
[0045] By directly classifying point clouds where local normals deviate significantly from global normals into "outlier noise layers" and removing them, this method can effectively eliminate most of the interference caused by measurement noise or irrelevant object edges from the data source, making subsequent surface fitting and deviation calculation more stable and reliable.
[0046] By projecting precisely identified defects onto high-definition color images and combining them with heat maps, the flatness of the wall surface, the location and severity of defects are clearly visible, providing a clear and quantifiable basis for subsequent repair and rectification work. Attached Figure Description
[0047] Figure 1 This is a flowchart for testing the flatness of concrete walls.
[0048] Figure 2 This is a flowchart of the point cloud data preprocessing process.
[0049] Figure 3 This is a diagram illustrating the layering principle in the point cloud data preprocessing process.
[0050] Figure 4 This is the original point cloud data of a wall surface and its 2D fitted surface plot.
[0051] Figure 5 This is a partial RGB image of a concrete wall surface and its corresponding flatness detection result. Detailed Implementation
[0052] The present invention will now be described in further detail with reference to the accompanying drawings.
[0053] like Figure 1 As shown, a method for detecting the flatness of a concrete wall surface includes the following steps;
[0054] Step 1: Data Collection
[0055] During on-site operations, a 3D scanning device was used to scan the target concrete wall. Before scanning, the relative positional relationship between the camera and the scanner (extrinsic parameter matrix [R|t]) and the camera's intrinsic parameter matrix K were calibrated using standard methods. A single scan operation yielded high-density 3D point cloud data of the wall (including X, Y, Z coordinates) and the corresponding color RGB image.
[0056] A pre-calibrated 3D scanning device is used to scan the target concrete wall surface in a single operation. High-density 3D point cloud data and corresponding color RGB images of the wall surface are captured in a single operation. Since the camera's intrinsic parameter matrix K and extrinsic parameter matrix [R|t] have been precisely calibrated beforehand, this step directly generates a set of spatially perfectly aligned multimodal data. This achievement provides a solid data foundation for the accurate projection of all subsequent 3D spatial analysis results back into 2D images, ensuring the accuracy of the final visualization results from the outset.
[0057] like Figure 2 As shown, step 2: Point cloud layering and differential sampling based on normal vector consistency:
[0058] Step 2 involves transforming the massive, noisy raw data into a lightweight, clean, and feature-rich subset of point clouds, thus preparing for subsequent accurate and efficient surface fitting and analysis. Specifically, Step 2 involves…
[0059] Step 2.1: Target area cutting. The original point cloud is cut by using a pass-through filter to limit the coordinate range to the area of the wall to be measured, thereby filtering out irrelevant point clouds such as the ground, ceiling, and adjacent walls.
[0060] Step 2.2: Calculate the global principal normal vector. Use Principal Component Analysis (PCA) to calculate the covariance matrix of the cut point cloud. The eigenvector corresponding to the smallest eigenvalue is the "global principal normal" vector N representing the overall orientation of the wall. global ;
[0061] Step 2.3: Point cloud layering, the principle of point cloud layering is as follows: Figure 3 As shown, traversing each point P in the point cloud i The k-nearest neighbor (k-NN) algorithm is used to determine the local neighborhood point set, where k is the preset number of neighborhood points. The k-NN algorithm can adapt to changes in point cloud density, ensuring stable and reliable neighborhoods are obtained in regions with varying density. Subsequently, principal component analysis (PCA) is used to calculate the "local normal" vector n of this local neighborhood point set. local,i And calculate the angle θ between the local normal and the global principal normal. i Set the angle threshold (θ) core =5°, θ outlier =30°), these two thresholds are selected based on engineering experience: an angle of less than 5° usually means that the local area where the point is located is in the same orientation as the overall wall, belonging to a flat area; while an angle of more than 30° means that the local orientation of the point has been drastically deflected, which is very likely noise. According to the size of the angle, all point clouds are divided into three layers: high confidence core layer, transition feature layer, and outlier noise layer;
[0062] Step 2.4: Differential sampling. The high-confidence core layer is downsampled using the voxel grid method with a large voxel edge length. The transition feature layer retains all potential defect details and is slightly downsampled with a very small voxel edge length (e.g., 2 mm). Outlier noise layers are removed. Finally, the processed high-confidence core layer and transition feature layer are merged to obtain a point cloud subset for subsequent analysis.
[0063] Step 3: Using the point cloud subset processed in Step 2, select the second-order polynomial surface z = f(x,y) = ax 2 +by 2 The mathematical model +cxy+dx+ey+f describes common, macroscopically gradual morphologies in walls, such as overall "bulges" or "depressions," within engineering tolerances. Using the least squares method, a set of optimal coefficients (a, b, c, d, e, f) is found through numerical optimization calculations, minimizing the sum of the squares of the Z-axis distances from all points to the surface. This fitted surface serves as the final flatness benchmark model. This model avoids the systematic errors caused by model mismatch in traditional plane benchmarks. Figure 4 This is a schematic diagram showing the original point cloud data of a certain wall surface and the effect of the second-order reference surface model fitted by this method.
[0064] Step 4: Identify unevenness and defects:
[0065] The flatness deviation is quantified by calculating the normal perpendicular distance from each point in the point cloud subset to the reference surface model established in step 3. Based on relevant national standards such as the "Unified Standard for Acceptance of Construction Quality of Building Engineering" (GB50300-2021), a permissible flatness deviation threshold is set. For ordinary plastered walls, T = 4mm. When the calculated deviation d... i When the value is greater than T, the point is marked as an uneven defect point. This step combines abstract geometric measurement with engineering standards. Any point with a deviation value exceeding the standard will be objectively and accurately marked as an uneven defect point, thereby generating a three-dimensional point set that accurately contains all areas that need to be rectified.
[0066] Step 5: To present the analysis results in a more intuitive way:
[0067] This step utilizes the camera's intrinsic and extrinsic parameters calibrated in step 1 to precisely convert and project the 3D coordinates of all uneven defect points identified in step 4 onto the corresponding 2D RGB image. This projection process establishes a bridge between abstract 3D data and a real 2D view, enabling anyone to easily locate the precise position of defects found in the spatial coordinate system on familiar on-site photographs, greatly improving the practicality and operability of the detection results.
[0068] Step 5 specifically involves:
[0069] Based on the camera intrinsic and extrinsic parameters obtained in step 1, a precise mapping relationship between the three-dimensional point cloud coordinate system and the two-dimensional image pixel coordinate system is established, and the three-dimensional coordinates of the uneven defect points selected in step 4 are projected onto the corresponding two-dimensional RGB image.
[0070] Using the camera intrinsic and extrinsic parameters calibrated in step 1, the three-dimensional coordinates P of all uneven defect points in the world coordinate system are determined. w (X w ,Y w Z w The coordinates (u,v) of a pixel on the image are converted using the following formula:
[0071]
[0072] Among them, Z c Let (u, v) be the depth of the point in camera coordinates, and (x, v) be the pixel coordinates on the 2D image. w ,Y w Z w ) is P w In the coordinates of three-dimensional space, [R|t] is the camera extrinsic matrix, and K is the camera intrinsic matrix;
[0073] Step 6: Visualize the test results, generating a report that highlights the specific location, range, and degree of deviation of uneven defects on an RGB image. Based on the deviation value, use a gradient color spectrum to render the wall flatness test map and output a quantitative data report containing key indicators such as the maximum deviation value and the percentage of area exceeding the standard. Figure 5 That is, a local RGB image of a certain wall surface ( Figure 5 The left image shows the corresponding wall flatness test results. Figure 5 (See right image). In this result image, for portions exceeding the set threshold, a new color (such as red, orange, yellow, green, etc.) is used to distinguish and mark each 1mm increase in deviation. Different colored areas intuitively reflect the severity of unevenness, thus clearly indicating the specific location, range, and precise deviation level of the defect, thereby achieving a refined, quantitative, and visual assessment of wall flatness.
Claims
1. A method for detecting the flatness of a concrete wall surface, characterized in that, Includes the following steps; Step 1: Using a 3D scanning device with an integrated RGB camera, simultaneously acquire point cloud data of the concrete wall area to be inspected and capture high-definition RGB images to obtain the initial correspondence between the original point cloud data and image pixels, as well as the camera's internal and external parameters. Step 2: Preprocess the raw point cloud data; Step 3: Using the point cloud data processed in Step 2, a second-order polynomial surface model is used to fit the wall surface using the least squares method, which serves as the flatness detection benchmark and a benchmark surface model is established. Step 4: Based on the reference surface model established in Step 3, calculate the point cloud deviation and identify defect points; Step 5: Based on the camera intrinsic and extrinsic parameters obtained in Step 1, establish a precise mapping relationship between the 3D point cloud coordinate system and the 2D image pixel coordinate system, and project the 3D coordinates of the defect points identified in Step 4 onto the corresponding 2D RGB image. Step 6: Visualize the test results and generate a visualization report.
2. The method for detecting the flatness of a concrete wall surface according to claim 1, characterized in that, Step 1 specifically includes: A 3D scanning device with an integrated high-resolution RGB camera was used to scan the target concrete wall. While acquiring the 3D coordinates of each spatial point, the integrated RGB camera simultaneously captured high-definition RGB images of the same field of view. The system obtained two sets of raw data: raw point cloud data P. set High-resolution RGB images, raw point cloud data P set P is a set composed of a large number of three-dimensional points. set ={P1,P2,...,P n }, where each point P i Its coordinates in the world coordinate system (X) wi ,Y wi Z wi As defined, high-definition RGB images record the color and texture information of the wall surface.
3. The method for detecting the flatness of a concrete wall surface according to claim 2, characterized in that, Step 2 specifically includes: Step 2.1: Target area segmentation. The original point cloud data is segmented using a pass-through filter to remove point cloud data that is irrelevant to the wall surface being measured. Step 2.2: Calculate the global principal normal vector. Use Principal Component Analysis (PCA) to calculate the covariance matrix of the cut point cloud data. The eigenvector corresponding to the smallest eigenvalue is the global principal normal vector N representing the overall orientation of the wall. global ; Step 2.3: Layer the point cloud, traverse each point P in the point cloud. i The k-NN algorithm is used to determine the local neighborhood point set, where k is the preset number of neighborhood points. The k-NN algorithm can adapt to changes in point cloud density, ensuring stable and reliable neighborhoods can be obtained in regions with varying density. Subsequently, principal component analysis is used to calculate the "local normal" vector n of this local neighborhood point set. local,i And calculate the angle θ between the local normal and the global principal normal. i According to the preset first angle threshold θ core and the second angle threshold θ outlier All point clouds are divided into three levels: High-confidence core layer: when θ i ≤θ core At that time, this point was assigned to this layer, representing the flattest and most stable main part of the wall surface; Transition feature layer: when θ core <θ i ≤θ outlier At that time, the point is assigned to this layer, corresponding to the edge of a flatness defect, a slope, or a gently changing area of the wall; Outlier noise layer: when θ i >θ outlier At that time, the point is assigned to this layer to measure noise or the edge of an irrelevant object; Step 2.4: Differentiated sampling. Voxel grid method is used to downsample the high-confidence core layer by a large margin; the transition feature layer is fully preserved or slightly downsampled; the outlier noise layer is directly removed; all points retained after processing are merged to form a point cloud subset with high signal-to-noise ratio and high information value.
4. The method for detecting the flatness of a concrete wall surface according to claim 3, characterized in that, Step 3 specifically involves: Step 3.1: High-order surface fitting, using a second-order polynomial surface model, the expression of which is: z=f(x,y)=ax 2 +by 2 +cxy+dx+ey+f Where (x,y,z) are the coordinates of any point in the point cloud, and (a,b,c,d,e,f) are the coefficients of the surface model to be solved, which together determine the shape and position of the surface; Step 3.2: Establish the reference surface model. First, perform coordinate transformation on the point cloud subset to make the global principal normal vector N global The points are roughly aligned with the Z-axis of the coordinate system. Then, the least squares method is used to fit the subset of points and solve for the optimal coefficients (a,b,c,d,e,f) that minimize the sum of the squared Z-direction distances from all points to the surface, thus obtaining the final reference surface model for wall flatness.
5. The method for detecting the flatness of a concrete wall surface according to claim 4, characterized in that, Step 4 specifically involves: Step 4.1: Calculate the deviation from the point to the surface for any point P in the point cloud subset. i (x i ,y i, z i Calculate its Z-axis projection value z′ on the fitted surface. i =f(x) i ,y i The flatness deviation d at this point i Defined as the vertical distance in the Z direction: Step 4.2: Identify unevenness defects, set the allowable deviation value for flatness required by the project as a threshold value, and when the calculated deviation d i When the value is greater than T, the point is marked as an uneven defect point.
6. The method for detecting the flatness of a concrete wall surface according to claim 5, characterized in that, Step 5 specifically involves: Using the camera intrinsic and extrinsic parameters calibrated in step 1, the three-dimensional coordinates P of all uneven defect points in the world coordinate system are determined. w (X w ,Y w Z w The coordinates (u,v) of a pixel on the image are converted using the following formula: Among them, Z c Let (u, v) be the depth of the point in camera coordinates, and (x, v) be the pixel coordinates on the 2D image. w ,Y w Z w ) is P w In the coordinates of three-dimensional space, [R|t] is the camera extrinsic parameter matrix, and K is the camera intrinsic parameter matrix.
7. The method for detecting the flatness of a concrete wall surface according to claim 6, characterized in that, In step 6, a gradient color spectrum is used to render the wall flatness test map based on the deviation value, and a quantitative data report containing key indicators such as the maximum deviation value and the percentage of area exceeding the standard is output.
Citation Information
Patent Citations
Wall flatness detection method and system based on laser point cloud
CN117197135A
Cited By
Surrounding rock grade identification data preprocessing and labeling method based on tunnel face image
CN122049697A