A method and system for testing the flatness of a tile laying based on the thickness of the gap
Patent Information
- Application Number
- CN202610863223.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-15
- Publication Date
- 2026-08-18
AI Technical Summary
现有技术未结合缝隙的空间形态做精细化划分,对缝隙的不同区域采用统一的检测分析方式,没有依据缝隙点序列的曲率变化区分直线段与拐点段,缝隙厚度检测仅依靠单一距离指标,未通过法向距离计算并统计相关参数形成多维度厚度特征,无法真实反映缝隙厚度的实际分布情况
[0015]与现有技术相比,本发明的优点和积极效果在于:
Smart Images

Figure CN122590771A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of building construction testing technology, and in particular to a method and system for testing the flatness of tile laying based on gap thickness. Background Technology
[0002] Current methods for detecting the flatness of tile paving primarily rely on manual inspection or conventional 3D point cloud analysis. These methods acquire 3D point cloud data by collecting depth images of the laid tile surface, identify tile gaps, extract gap point data, and then perform overall flatness analysis. Some methods simply calculate gap thickness using distance and use this as the sole criterion for flatness judgment. Existing technologies fail to consider the spatial morphology of the gaps, employing a uniform detection and analysis method for different gap regions. They do not differentiate between straight segments and inflection points based on the curvature changes in the gap point sequence. Gaps thickness detection depends solely on a single distance indicator, without calculating normal distance and statistically analyzing relevant parameters to form multi-dimensional thickness characteristics, thus failing to accurately reflect the actual distribution of gap thickness.
[0003] The curvature features of the inflection point region were not extracted and analyzed separately, nor could data correlation be established with the thickness features of adjacent straight segments. Flatness evaluation relied solely on a single indicator to output the test results, without establishing a corresponding quantitative scoring model for flatness. This made it difficult to accurately locate gaps that did not meet flatness standards, and the test results could not be visually labeled with the location of abnormal gaps in the report. Existing detection methods cannot complete the segmentation of gaps, extraction of multi-dimensional thickness features, feature correlation, quantitative scoring, and visual labeling, failing to meet the actual needs for refined and accurate detection of flatness in tile grout lines. Summary of the Invention
[0004] The purpose of this invention is to overcome the shortcomings of the existing technology and to propose a method and system for testing the flatness of tile laying based on the gap thickness.
[0005] To achieve the above objectives, the present invention adopts the following technical solution: a method for testing the flatness of tile laying based on gap thickness, comprising: Acquire depth images of the laid tile surface, the depth images containing three-dimensional point cloud data of the tile surface; In the three-dimensional point cloud data, the gaps between tiles are identified, and a continuous sequence of gap points is extracted along the direction of the gaps. A continuous sequence of gap points is segmented and fitted, and the gaps are divided into straight line segments and inflection point segments based on the curvature change. Calculate the normal distance between all gap points in each line segment and their corresponding fitted line to obtain the set of normal distances; Based on the set of normal distances, the thickness characteristics of each straight line segment are statistically analyzed, and the thickness characteristics include the average normal distance, the standard deviation of the normal distance, and the range of the normal distance; The curvature features of each inflection point segment are extracted, including curvature values and curvature change rates, and correlated with the thickness features of adjacent straight line segments. The thickness characteristics of each straight line segment and the curvature characteristics of each inflection point segment are input into the preset flatness evaluation model to obtain a quantitative score for the flatness of the gap. Highlight gaps with flatness measurement scores below a set threshold and generate a visual report containing the marking information.
[0006] As a further aspect of the present invention, the gaps between tiles are identified in the three-dimensional point cloud data, and a continuous sequence of gap points is extracted along the direction of the gaps, including: Normal estimation is performed on 3D point cloud data, and the normal vector of each point is calculated; Based on normal vector clustering analysis, points with similar normal vector directions are grouped into the same plane, and the point cloud region corresponding to each tile is segmented. At the boundary of adjacent tile point cloud regions, a discrete set of points that do not belong to any tile plane is extracted by a boundary detection operator. The discrete set of points forms the initial contour point cloud of the gap. Curve tracing is performed along the extension direction of the initial contour point cloud of the gap, and the points are connected to form a continuous sequence of gap points. The step of extracting a set of discrete points that do not belong to any tile plane at the boundary of adjacent tile point cloud regions using a boundary detection operator specifically includes: Calculate the directed distance from each point to the plane of its corresponding tile; Points whose directed distance is greater than a preset planar distance threshold are marked as candidate boundary points; Among the candidate boundary points, calculate the angle between the normal vector of each point and its neighboring points; Candidate boundary points whose included angle with the normal vector is greater than a preset angle threshold are extracted to form a discrete set of points that do not belong to any tile plane.
[0007] As a further aspect of the present invention, the step of segmenting and fitting a continuous sequence of gap points, and dividing the gaps into straight line segments and inflection point segments based on curvature changes, includes: Slide an analysis window of a preset length along a continuous sequence of gap points; Calculate the local curvature of the sequence within each analysis window; Based on the comparison results of local curvature and straight line curvature threshold, the continuous gap point sequence is initially divided into candidate straight line segments and candidate curved segments; For each candidate line segment, perform a line fitting and calculate the fitting residual; If the fitting residual is greater than the preset error allowable value, the current candidate straight line segment will be reclassified as a candidate curved segment. Adjacent candidate curved segments are merged to form the final inflection point segment, and the remaining candidate straight segments are determined as straight segments.
[0008] As a further aspect of the present invention, the step of calculating the normal distance between all gap points in each straight line segment and their corresponding fitted straight line to obtain a set of normal distances includes: For each line segment, the least squares method is used to fit its corresponding spatial line equation; For each gap point within the straight line segment, calculate the perpendicular distance from its three-dimensional spatial coordinates to the fitted spatial straight line equation; the perpendicular distance is the normal distance. Record the normal distances corresponding to all gap points within the straight line segment to form the normal distance set; The process of fitting the corresponding spatial line equation using the least squares method for each line segment includes: Obtain the spatial three-dimensional coordinate data of all gap points within the current straight line segment, construct a point set from the spatial three-dimensional coordinate data of all gap points, and calculate the centroid coordinates of the point set in three-dimensional space. Construct a covariance matrix with respect to the direction vector of the line and the coordinates of the centroid, perform eigenvalue decomposition on the covariance matrix, and obtain the eigenvector corresponding to the minimum eigenvalue. The eigenvector is the direction vector of the fitted spatial line equation. Based on the calculated centroid coordinates and direction vector, a spatial straight line equation is constructed that passes through the centroid and extends along the direction vector, thus completing the fitting of the spatial straight line equation for the line segment.
[0009] As a further aspect of the present invention, the thickness characteristics of each straight line segment are statistically analyzed based on the set of normal distances. These thickness characteristics include the average normal distance, the standard deviation of the normal distance, and the range of the normal distance, including: The sum of all normal distance values in the normal distance set for each line segment is divided by the number of data in the normal distance set. The result is the average normal distance. Calculate the average of the squared deviations of all normal distance values in the set of normal distances for each line segment from their average value, and then take the square root to obtain the standard deviation of the normal distance. Identify the maximum and minimum values in the set of normal distances for each line segment; the difference between them is the normal distance range.
[0010] As a further aspect of the present invention, the step of extracting the curvature features of each inflection point segment, wherein the curvature features include curvature values and curvature change rates, and is associated with the thickness features of adjacent straight line segments, includes: Cubic spline interpolation is performed on the sequence of gap points within each inflection point segment to obtain a smooth spatial curve. Calculate the curvature of the space curve at each gap point, and average the curvature of all gap points within the inflection point segment to obtain the curvature value of the inflection point segment; Calculate the change in curvature between adjacent gap points within the inflection point segment, and take the average of their absolute values to obtain the rate of change of curvature of the inflection point segment. Record the identifiers of the straight line segments adjacent to the inflection point segment, and establish a data association between the curvature value, curvature change rate of the inflection point segment and the thickness characteristics of the identified adjacent straight line segments.
[0011] As a further aspect of the present invention, the step of inputting the thickness characteristics of each straight line segment and the curvature characteristics of each inflection point segment into a preset flatness evaluation model to obtain a quantitative score for gap flatness includes: The preset flatness evaluation model is a machine learning model built based on a gradient boosting decision tree model; The average normal distance, standard deviation of normal distance, and range of normal distance for each straight line segment, along with the curvature value and rate of change of curvature for each associated inflection point segment, are used to form a feature vector. The feature vector is input into the trained gradient boosting decision tree model; The gradient boosting decision tree model outputs a score between zero and one hundred as a flatness quantification score for the corresponding gap segment; The steps for constructing the preset flatness evaluation model include: Collect 3D point cloud data of gaps in historical tile laying projects, process the 3D point cloud data of gaps to obtain multiple gap segment samples, each gap segment sample includes the thickness features of its straight segment and the curvature features of its inflection point segment, and manually label the flatness level of each gap segment sample by experts to form a training dataset. The feature vectors in the training dataset are normalized to eliminate the influence of different feature dimensions, and the normalized feature vectors are associated with their corresponding artificial flatness level labels. The gradient boosting decision tree algorithm is adopted, with the normalized feature vector as input and the corresponding artificial smoothness level as the supervision target, and the model parameters are trained in multiple rounds of iterative training. In each round of training iteration, the difference between the model's predicted level and the manually labeled level is calculated, and the loss function is calculated based on the difference. The gradient information of the loss function is used to update the parameters of the decision tree in the gradient boosting decision tree model. During training, a portion of the samples is used as a validation set to monitor the model's evaluation accuracy on the validation set. Training is stopped when the evaluation accuracy no longer improves to prevent the model from overfitting. The final trained gradient boosting decision tree model and its parameters are saved as a preset flatness evaluation model, which is used to predict the flatness quantification score of the new input gap feature vector.
[0012] As a further aspect of the present invention, the step of highlighting and marking gap segments with flatness measurement scores below a set threshold, and generating a visual report containing the marking information, includes: Set a passing threshold for the flatness score; The flatness quantification score of all straight line segments and inflection point segments is compared with the qualified threshold; All straight line segments and inflection point segments whose flatness measurement scores are below the qualified threshold are rendered and marked with a preset highlight color in their corresponding 3D point cloud models. The system integrates a 3D point cloud model with color markings, a quantitative score of the flatness of each gap segment, and location description information to generate a visual report document.
[0013] As a further aspect of the present invention, the step of initially dividing the continuous gap point sequence into candidate straight line segments and candidate curved segments based on the comparison result of local curvature and straight line curvature threshold includes: Calculate the approximate curvature of the gap point sequence within the analysis window; The approximate curvature is compared with a preset straight curvature threshold; If the approximate curvature of all points within the analysis window is less than or equal to the straight line curvature threshold, then the gap point sequence segment covered by the current analysis window is marked as a candidate straight line segment. If the approximate curvature of any point within the analysis window is greater than the straight curvature threshold, then the gap point sequence segment covered by the current analysis window is marked as a candidate curved segment.
[0014] As a further aspect of the present invention, the present invention also includes a tile laying flatness testing system based on gap thickness. The system includes a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it implements the steps of the tile laying flatness testing method based on gap thickness as described above.
[0015] Compared with the prior art, the advantages and positive effects of the present invention are as follows: Based on the curvature variation, a segmented fitting process is performed on the continuous sequence of gap points, dividing the gaps into straight line segments and inflection point segments. The segmentation method of the gaps conforms to the spatial morphology of the natural direction of the gaps, and the fitting process ensures that the division of gap segments fits the actual structural characteristics. The normal distance between all gap points within a straight line segment and the corresponding fitted line is calculated. Based on the normal distance, the mean, standard deviation, and range are statistically analyzed. The calculation method of the normal distance fits the spatial representation of the gap thickness. The statistically obtained multiple features can fully present the distribution of the gap thickness in the straight line segment, and the thickness features can accurately reflect the actual laying pattern of the gaps in the straight line segment.
[0016] Curvature values and curvature change rates of inflection point segments are extracted, and these curvature features are correlated with the thickness features of adjacent straight segments. This feature correlation method adapts to the connection structure between straight segments and inflection point segments in the joint, ensuring the feature data fits the overall spatial structure of the joint. The thickness and curvature features are input into a preset flatness assessment model. The model outputs a quantitative score for joint flatness based on multi-dimensional correlated features, and the score results closely match the actual paving condition of each joint segment. Joint segments with scores below a set threshold are highlighted. This highlighting operation accurately locates joints with flatness anomalies, generating a visual report with the highlighted information. This report intuitively displays the detection results of tile joint flatness and presents the differences in flatness across different joint segments. Attached Figure Description
[0017] Figure 1 This is a flowchart of a method for testing the flatness of tile laying based on gap thickness, as described in this invention. Figure 2 A flowchart for the method of fitting gap segments and dividing straight line segments into inflection point segments; Figure 3 A flowchart of the statistical method for the thickness characteristics of straight line segments; Figure 4 Analysis of the normal distance distribution for line segments; Figure 5 The curve showing the change in training loss of the gradient boosting decision tree flatness evaluation model. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0019] In the description of this invention, it should be understood that the terms "length," "width," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicating orientation or positional relationships, are based on the orientation or positional relationships shown in the accompanying drawings and are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, in the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0020] See Figure 1 The process involves acquiring depth images of the laid tile surface, which contain 3D point cloud data of the tile surface. Gaps between tiles are identified within the 3D point cloud data, and continuous gap point sequences are extracted along the gap direction. These continuous gap point sequences are then segmented into straight line segments and inflection point segments based on curvature changes. The normal distance between all gap points in each straight line segment and their corresponding fitted straight line is calculated, resulting in a set of normal distances. Based on this set of normal distances, the thickness characteristics of each straight line segment are statistically analyzed, including the average normal distance, standard deviation of the normal distance, and range of the normal distance. Curvature characteristics of each inflection point segment are extracted, including the curvature value and rate of change of curvature, and correlated with the thickness characteristics of adjacent straight line segments. The thickness characteristics of each straight line segment and the curvature characteristics of each inflection point segment are input into a pre-defined flatness evaluation model to obtain a quantitative score for gap flatness. Gaps with a flatness quantitative score below a set threshold are highlighted, generating a visual report containing the marked information.
[0021] In one embodiment of the present invention, see [reference] Figure 2 This method identifies gaps between tiles in 3D point cloud data and extracts a continuous sequence of gap points along the gap direction. The process includes estimating the normal vector of the 3D point cloud data and calculating the normal vector for each point. Based on normal vector clustering analysis, points with similar normal vector directions are grouped into the same plane, segmenting the point cloud region corresponding to each tile. At the boundary of adjacent tile point cloud regions, a boundary detection operator extracts a set of discrete points that do not belong to any tile plane; this set of discrete points forms the initial contour point cloud of the gap. Curve tracing is performed along the extension direction of the initial contour point cloud of the gap, connecting them to form a continuous sequence of gap points. Specifically, at the boundary of adjacent tile point cloud regions, a boundary detection operator extracts a set of discrete points that do not belong to any tile plane, including calculating the directed distance from each point to its corresponding tile plane. Points with a directed distance greater than a preset plane distance threshold are marked as candidate boundary points. Among the candidate boundary points, the angle between the normal vector of each point and its neighboring points is calculated. Candidate boundary points whose included angle with the normal vector is greater than a preset angle threshold are extracted to form a discrete set of points that do not belong to any tile plane.
[0022] In practice, the depth image containing 3D point cloud data acquired from the surface of the laid tiles is processed. The first step is to identify the gaps between the tiles in the 3D point cloud data and extract a continuous sequence of gap points along the gap direction. This process begins with normal estimation of the 3D point cloud data, calculating the normal vector of each point. Based on the calculated normal vectors, cluster analysis is performed, grouping points with similar normal vector directions into the same plane, thus segmenting the point cloud region corresponding to each tile. At the boundary of adjacent tile point cloud regions, a boundary detection operator extracts a set of discrete points that do not belong to any tile plane; this set of discrete points constitutes the initial contour point cloud of the gap. A curve tracing algorithm is then applied along the extension direction of the initial contour point cloud of the gap, connecting them to form a continuous sequence of gap points.
[0023] In some embodiments, the operation of extracting a discrete set of points that do not belong to any tile plane using a boundary detection operator specifically includes the following calculation steps: Calculate the directed distance of each point to its corresponding tile plane determined by cluster analysis. For points whose absolute value of the directed distance is greater than a preset plane distance threshold, they are marked as candidate boundary points. In the candidate boundary point set, further calculate the angle between the normal vector of each candidate boundary point and the normal vectors of other points in its spatial neighborhood. It can be understood that the preset angle threshold is used to distinguish between planar regions and edge features. Candidate boundary points with normal vector angles greater than the preset angle threshold are ultimately extracted, and these points form a discrete set of points that do not belong to any tile plane. The dot product formula can be used when calculating the normal vector angle. For points... normal vector With one of its neighboring points normal vector The angle between the two It can be calculated using the following formula: in: Point The unit normal vector, Point The unit normal vector, symbol " " represents the dot product operation of vectors, The result is an inverse cosine function. That is, the angle between the two normal vectors, and its range is in arrive between.
[0024] Optionally, the preset planar distance threshold can be set according to the tile specifications and point cloud acquisition accuracy. Its purpose is to filter out points located on the tile surface that deviate from the ideal plane due to noise or minor undulations. In some embodiments, the curve tracing algorithm can employ a seed point-based growth strategy. It selects a point from a discrete point set as the starting seed point and iteratively connects the nearest neighbors based on their spatial relationships and directional consistency, thereby constructing a continuous sequence of gap points arranged in an orderly manner along the gap's direction. Optionally, during curve tracing, a maximum connection distance threshold can be set. When the nearest neighbor distance exceeds this threshold, the current gap segment tracking is considered complete, and a new seed point is searched to track another gap.
[0025] In one embodiment of the present invention, a continuous sequence of gap points is segmented and fitted, dividing the gaps into straight line segments and inflection point segments based on curvature changes. This includes sliding an analysis window of a preset length along the continuous sequence of gap points. The local curvature of the sequence is calculated within each analysis window. Based on the comparison between the local curvature and a straight line curvature threshold, the continuous sequence of gap points is initially divided into candidate straight line segments and candidate curved segments. The approximate curvature of the gap point sequence is calculated within the analysis window and compared with a preset straight line curvature threshold. If the approximate curvature of all points within the analysis window is less than or equal to the straight line curvature threshold, the gap point sequence segment covered by the current analysis window is marked as a candidate straight line segment. If the approximate curvature of any point within the analysis window is greater than the straight line curvature threshold, the gap point sequence segment covered by the current analysis window is marked as a candidate curved segment. A straight line is fitted to each candidate straight line segment, and the fitting residual is calculated. If the fitting residual is greater than a preset error allowable value, the current candidate straight line segment is reclassified as a candidate curved segment. Adjacent candidate curved segments are merged to form the final inflection point segment, and the remaining candidate straight segments are determined as straight segments.
[0026] In practice, after obtaining a continuous sequence of gap points, the sequence needs to be segmented and fitted. Based on curvature changes, the gaps are divided into straight line segments and inflection point segments. In practice, the segmentation process begins by sliding an analysis window of a preset length along the continuous gap point sequence. The length of the analysis window can be set to cover a fixed number of points in the continuous gap point sequence, such as thirty points. Within each analysis window, the local curvature of the gap point sequence is calculated. Based on the comparison between the local curvature and a preset straight line curvature threshold, the continuous gap point sequence is initially divided into candidate straight line segments and candidate curved segments.
[0027] In some embodiments, the preliminary segmentation based on the comparison between local curvature and a straight-line curvature threshold includes specific calculations. The approximate curvature of the gap point sequence is calculated within the analysis window, and the calculated approximate curvature is compared with a preset straight-line curvature threshold. If the approximate curvature of all points within the analysis window is less than or equal to the straight-line curvature threshold, the gap point sequence segment covered by the current analysis window is marked as a candidate straight-line segment. If the approximate curvature of any point within the analysis window is greater than the straight-line curvature threshold, the gap point sequence segment covered by the current analysis window is marked as a candidate curved segment. It can be understood that the straight-line curvature threshold is a positive decimal close to zero, used to define the maximum degree of curvature that can be considered a straight line. The calculation of approximate curvature can be based on the chord-height difference method of the point sequence within the analysis window. For a sequence containing m ordered points... The analysis window, its approximate curvature By examining the midpoint To the string distance With chord length To estimate based on the relationship, one calculation method is as follows: in: Point To the connection point and points The perpendicular distance of the chord, Indicates all The maximum value in, Point-to-point The Euclidean distance is calculated, and the value of k ranges from 2 to m-1. Optionally, the analysis window can be slid with an overlapping sliding method, such as sliding half the length of the analysis window each time, to ensure that the continuity of the neighborhood of each point in the gap point sequence is fully evaluated.
[0028] Optionally, after initially identifying candidate straight segments and candidate curved segments, a straight line fitting is performed on each candidate straight segment, and the fitting residual is calculated. For each candidate straight segment, a spatial straight line is fitted using the three-dimensional coordinates of all its gap points through the least squares method. The distance from each point in the candidate straight segment to the fitted spatial straight line is calculated, and the sum of the squares of these distances or their root mean square value can be used as the fitting residual. If the fitting residual is greater than the preset error allowable value, it indicates that the points of the current candidate straight segment are not strictly distributed along a straight line, and the current candidate straight segment needs to be reclassified as a candidate curved segment. The preset error allowable value can be set according to the construction accuracy requirements. After all candidate straight segments have been verified and possibly reclassified, adjacent candidate curved segments are merged to form the final inflection point segment, while the remaining verified candidate straight segments are determined as the final straight segments.
[0029] In one embodiment of the present invention, the normal distance between all gap points in each straight line segment and their corresponding fitted straight line is calculated to obtain a set of normal distances. This includes fitting the corresponding spatial straight line equation for each straight line segment using the least squares method. The process of fitting the spatial straight line equation using the least squares method involves obtaining the spatial three-dimensional coordinate data of all gap points in the current straight line segment, constructing a point set from the spatial three-dimensional coordinate data of all gap points, and calculating the centroid coordinates of the point set in three-dimensional space. A covariance matrix is constructed with respect to the line direction vector and the centroid coordinates. Eigenvalue decomposition is performed on the covariance matrix to obtain the eigenvector corresponding to the smallest eigenvalue. This eigenvector is the direction vector of the fitted spatial straight line equation. Based on the calculated centroid coordinates and direction vector, a spatial straight line equation passing through the centroid and extending along the direction vector is constructed to complete the fitting of the spatial straight line equation for the straight line segment. For each gap point in the straight line segment, the perpendicular distance from its spatial three-dimensional coordinates to the fitted spatial straight line equation is calculated. This perpendicular distance is the normal distance. The normal distances corresponding to all gap points in the straight line segment are recorded to form a set of normal distances.
[0030] In practical implementation, after segmenting the gap point sequence and determining the straight line segments, it is necessary to calculate the normal distance between all gap points in each straight line segment and their corresponding fitted line, thus obtaining a set of normal distances. Calculating the normal distance between all gap points in each straight line segment and their corresponding fitted line involves fitting the corresponding spatial straight line equation for each straight line segment using the least squares method. For each gap point within a straight line segment, the perpendicular distance from its three-dimensional spatial coordinates to the fitted spatial straight line equation is calculated; this perpendicular distance is the normal distance. The normal distances corresponding to all gap points within a straight line segment are recorded, forming a set of normal distances.
[0031] In some embodiments, fitting the corresponding spatial straight line equation using the least squares method includes a series of specific calculation steps. First, obtain the spatial three-dimensional coordinate data of all gap points within the current straight line segment, and construct a point set from the spatial three-dimensional coordinate data of all gap points. Then, calculate the centroid coordinates of this point set in three-dimensional space. The calculation formula is: in: This indicates the total number of gap points within the current straight line segment. Represents the first point in the set of points The three-dimensional coordinate vector of each gap point, symbol This indicates that for all points from arrive Perform a summation operation. The centroid coordinates can be understood as representing the spatial geometric center of the point set of the line segment. Construct a covariance matrix with respect to the line direction vector and centroid coordinates. Perform eigenvalue decomposition on this covariance matrix to obtain the eigenvector corresponding to the smallest eigenvalue; this eigenvector is the direction vector of the fitted spatial line equation. Based on the calculated centroid coordinates and direction vector, construct a spatial line equation passing through the centroid and extending along the direction vector, thus completing the fitting of the spatial line equation for the line segment.
[0032] The specific process of constructing the covariance matrix is as follows: First, calculate the deviation vector of each point relative to the centroid, i.e. Covariance matrix Then it is obtained by summing the outer products of these deviation vectors, that is: Regarding this covariance matrix Eigenvalue decomposition yields three eigenvalues and their corresponding eigenvectors. The eigenvector corresponding to the smallest eigenvalue indicates the direction in which the point set is most dispersed, i.e., along the direction of the straight line, and is therefore chosen as the direction vector of the equation of the straight line in space. Obtain the direction vector. and centroid coordinates Then, the equation of a straight line in space can be expressed in parametric form. ,in These are real-valued parameters. When calculating the perpendicular distance from the three-dimensional coordinates in space to the fitted spatial line equation, for a given point within the line segment... Its path to the straight line vertical distance It can be calculated using the magnitude of the cross product of vectors: in: This represents the vector cross product operation. This represents the magnitude of the vector. The above distance calculation is performed on every gap point within the line segment, and all the resulting normal distance values are stored sequentially in a list or array. This list or array constitutes the set of normal distances for the line segment.
[0033] In one embodiment of the present invention, the thickness characteristics of each straight line segment are statistically analyzed based on the set of normal distances. These thickness characteristics include the average normal distance, the standard deviation of the normal distance, and the range of the normal distance. See also... Figure 3For each straight line segment, sum all normal distance values in the normal distance set and divide by the number of data points in the normal distance set to obtain the average normal distance. Calculate the average of the squared deviations of all normal distance values in the normal distance set from the average, and then take the square root to obtain the standard deviation of the normal distance. Identify the maximum and minimum values in the normal distance set for each straight line segment; the difference between them is the normal distance range. Extract the curvature features of each inflection point segment, including the curvature value and the rate of change of curvature, and correlate them with the thickness features of adjacent straight line segments. This includes cubic spline interpolation of the gap point sequence within each inflection point segment to obtain a smooth spatial curve. Calculate the curvature of the spatial curve at each gap point and average the curvature of all gap points within the inflection point segment to obtain the curvature value of the inflection point segment. Calculate the change in curvature between adjacent gap points within the inflection point segment and take the average of their absolute values to obtain the rate of change of curvature of the inflection point segment. Record the identifiers of the straight line segments adjacent to the inflection point segment, and establish a data association between the curvature value, curvature change rate of the inflection point segment and the thickness characteristics of the identified adjacent straight line segments.
[0034] In practice, the thickness characteristics of each straight line segment are statistically analyzed based on the set of normal distances. These characteristics include the average normal distance, the standard deviation of the normal distance, and the range of the normal distance. The curvature characteristics of each inflection point segment are extracted, including the curvature value and the rate of change of curvature, and are correlated with the thickness characteristics of adjacent straight line segments. Specifically, for each determined straight line segment, its thickness characteristics are calculated based on the set of normal distances for that segment. The sum of all normal distance values in the set of normal distances for each straight line segment is divided by the number of data points in the set; the result is the average normal distance. The average of the squared deviations of all normal distance values in the set of normal distances for each straight line segment from its average value is calculated, and then the square root is taken to obtain the standard deviation of the normal distance. The maximum and minimum values in the set of normal distances for each straight line segment are identified, and their difference is the range of the normal distances. Refer to Table 1, which illustrates the process of calculating the thickness characteristics of the normal distance set for an example straight line segment.
[0035] Table 1: Calculation Table of Thickness Characteristics of Straight Segments 1 1.2 Average normal distance 1.33 2 1.5 Standard deviation of normal distance 0.19 3 1.4 Normal distance range 0.6 In some embodiments, extracting the curvature features of each inflection point segment includes performing cubic spline interpolation on the sequence of gap points within each inflection point segment to obtain a smooth spatial curve. The curvature of the spatial curve at each gap point is calculated, and the curvature of all gap points within the inflection point segment is averaged to obtain the curvature value of the inflection point segment. The change in curvature between adjacent gap points within the inflection point segment is calculated, and the average of their absolute values is taken to obtain the rate of change of curvature of the inflection point segment. It can be calculated using the following formula: in: This indicates the total number of gap points contained within the inflection point segment. This represents the first value calculated using the interpolation curve. The curvature value at each gap point Indicates the first The curvature value at each gap point This indicates the absolute value operation. Indicates all from arrive The summation is performed on adjacent pairs of points. It can be understood that the rate of change of curvature describes the degree of change in curvature within the inflection point segment.
[0036] Optionally, associating the thickness characteristics with adjacent straight segments includes recording the identifiers of the straight segments adjacent to the inflection point segment. In specific implementations, an inflection point segment typically connects two straight segments, requiring the recording of unique numbers for these two straight segments as identifiers of the adjacent straight segments. A data association is established between the curvature value, rate of curvature change of the inflection point segment, and the thickness characteristics of the identified adjacent straight segments. In some embodiments, this data association can be achieved by creating a data structure, such as creating a data record for each inflection point segment containing its own curvature value and rate of curvature change, and including references or numbers pointing to its predecessor and successor straight segments. These references allow access to the average normal distance, standard deviation of normal distance, and range of normal distance for the corresponding straight segments. It can be understood that this association establishes a connection between the local geometric characteristics of the gap (the bending characteristics of the inflection point) and the construction characteristics of the adjacent area (the uniformity and smoothness of the straight segment grout), providing a structured data foundation for comprehensively evaluating the quality of the gap.
[0037] See Figure 4The box plot visually presents the dispersion and concentration trend of gap thickness in different straight line segments (L1, L2, L3), providing a quantitative basis for the statistical analysis of flatness characteristics. The plot uses the normal distance (mm) as the vertical axis, representing the perpendicular distance from the gap point to the fitted line, directly reflecting the local fluctuations in gap thickness; and the straight line segment numbers (L1, L2, L3) as the horizontal axis, corresponding to gap straight line segments at different locations. The box plot clearly displays the core statistical characteristics of each straight line segment: the upper and lower edges of the box represent the upper quartile (Q3) and lower quartile (Q1), respectively; the center line of the box represents the median; whiskers extend to the extreme values of non-outliers; and hollow dots mark outlier data points outside the range. From the distribution characteristics: L1 segment: the median normal distance is approximately 1.20 mm, the box range is concentrated between 1.10–1.35 mm, and whiskers cover 0.80–1.73 mm. The data distribution is compact, with minimal fluctuation, indicating that this segment has the best uniformity of gap thickness. Segment L2: The median thickness is approximately 1.45 mm, with a box range of 1.38–1.60 mm and whiskers covering 1.08–1.87 mm. Three outliers (0.85 mm, 1.00 mm, and 2.35 mm) are observed, indicating abrupt thickness changes in a localized area, making its uniformity weaker than segment L1. Segment L3: The median thickness is approximately 1.88 mm, with a box range of 1.60–2.08 mm and whiskers covering 1.38–2.57 mm. It exhibits the highest overall normal distance and the greatest dispersion, reflecting drastic thickness fluctuations and the worst flatness in this segment. The box plot, through the visual comparison of statistical quantities, directly quantifies the central tendency and dispersion of gap thickness in different straight segments. This provides intuitive support for subsequent extraction of thickness features such as the mean, standard deviation, and range of the normal distance, and also provides a visual basis for the differential analysis of input features in the flatness assessment model.
[0038] In one embodiment of the present invention, the thickness features of each straight line segment and the curvature features of each inflection point segment are input into a preset flatness evaluation model to obtain a quantitative score for the flatness of the gap. The preset flatness evaluation model is a machine learning model built based on a gradient boosting decision tree model. The average normal distance, standard deviation of normal distance, and range of normal distance for each straight line segment, as well as the curvature value and rate of change of curvature for each associated inflection point segment, are used to form a feature vector. The feature vector is input into the trained gradient boosting decision tree model, which outputs a score between zero and one hundred as the quantitative score for the flatness of the corresponding gap segment. The construction steps of the preset flatness evaluation model include collecting three-dimensional point cloud data of gaps from historical tile laying projects, processing the three-dimensional point cloud data to obtain multiple gap segment samples, each gap segment sample containing the thickness features of its straight line segments and the curvature features of its inflection point segments, and manually labeling the flatness level of each gap segment sample by experts to form a training dataset. The feature vectors in the training dataset are normalized to eliminate the influence of different feature units. The normalized feature vectors are then associated with their corresponding artificial smoothness level labels. A gradient boosting decision tree algorithm is used, with the normalized feature vectors as input and the corresponding artificial smoothness level as the supervised target, to perform multiple rounds of iterative training on the model parameters. In each round of training, the difference between the model's predicted level and the artificially labeled level is calculated, and a loss function is calculated based on this difference. The gradient information of the loss function is used to update the parameters of the decision tree in the gradient boosting decision tree model. During training, a subset of samples is used as a validation set to monitor the model's evaluation accuracy on the validation set. Training stops when the evaluation accuracy no longer improves to prevent overfitting. The finally trained gradient boosting decision tree model and its parameters are saved as a preset smoothness evaluation model, used to predict the smoothness metric score of newly input gap feature vectors. Gaps with smoothness metric scores below a set threshold are highlighted, and a visual report containing the marking information is generated, including setting a passing threshold for the smoothness score. The flatness metric scores of all straight line segments and inflection point segments are compared with a passing threshold. All straight line segments and inflection point segments with flatness metric scores below the passing threshold are marked with a preset highlight color in their corresponding 3D point cloud models. The 3D point cloud model containing the color markers, the flatness metric scores of each gap segment, and the location description information are integrated to generate a visual report document.
[0039] In practice, the thickness features of each straight line segment and the curvature features of each inflection point segment are input into a pre-defined flatness evaluation model to obtain a quantitative score for the flatness of the gap. Gap segments with a flatness quantitative score below a set threshold are highlighted, generating a visual report containing the marked information. In this implementation, the pre-defined flatness evaluation model is a machine learning model built on a gradient boosting decision tree model. The average normal distance, standard deviation, and range of normal distance for each straight line segment, along with the curvature value and rate of change of curvature for each associated inflection point segment, are combined to form a multi-dimensional feature vector. This feature vector is input into the pre-trained gradient boosting decision tree model, which performs forward inference calculations and outputs a numerical score between zero and one hundred. This score is the quantitative score for the flatness of the corresponding gap segment.
[0040] In some embodiments, the construction steps of the preset flatness assessment model include collecting three-dimensional point cloud data of gaps from historical tile laying projects. The collected three-dimensional point cloud data is processed using the aforementioned method to obtain multiple gap segment samples. Each gap segment sample includes the thickness features of its straight segments and the curvature features of its inflection points. Qualified experts manually observe and evaluate each gap segment sample, providing a manual flatness level label to form a training dataset. The feature vectors in the training dataset are normalized to eliminate the influence of different feature dimensions, and the normalized feature vectors are associated with their corresponding manual flatness level labels. A gradient boosting decision tree algorithm is used, with the normalized feature vectors as input and the corresponding manual flatness level as the supervision target, to perform multiple rounds of iterative training on the internal parameters of the gradient boosting decision tree model. In each round of iterative training, the difference between the predicted level of the gradient boosting decision tree model and the manually labeled level is calculated, and a loss function is calculated based on the difference. The gradient information of the loss function is used to update the parameters of each decision tree in the gradient boosting decision tree model. The loss function used during model training is described below. It can be the squared error loss, which takes the form: in: This indicates the number of samples in the current training batch. Indicates the first Numerical representation of the artificial smoothness grade label for each sample. This indicates that the gradient boosting decision tree model is applied to the first... The predicted output for each sample, with the sign... This indicates that for all samples from arrive Perform a summation operation. During training, a subset of samples is used as a validation set to monitor the evaluation accuracy of the gradient boosting decision tree model on the validation set. Training is stopped when the evaluation accuracy no longer improves to prevent overfitting. The final trained gradient boosting decision tree model and its parameters are saved as a preset smoothness evaluation model, used to predict the smoothness quantification score of newly input gap feature vectors.
[0041] See Figure 5 In the training process of the gradient boosting decision tree model, the curves showing the changes in training loss and validation loss intuitively reflect the model's learning state and generalization ability. Specifically, the training loss (dashed line) shows a continuous monotonically decreasing trend with the increase of the number of iterations, indicating that the model continuously learns and fits the sample features on the training set; the validation loss (solid line) decreases rapidly in the early stage of iteration, reaches its lowest point around 70 iterations, and then tends to stabilize with slight fluctuations, indicating that the model's generalization performance on the validation set reaches its optimal level at 70 iterations. Further training does not significantly improve the evaluation accuracy, which is consistent with the design logic of the early stopping strategy to prevent overfitting. The optimal number of iterations (70) marked by the dotted line in the figure is precisely the position of the performance inflection point of the model on the validation set. At this point, the validation loss is minimal, the model has fully learned the data features, and avoids overfitting the training set, providing a stable and reliable predictive ability for the evaluation of tile paving flatness. The loss curves fully present the entire process of the gradient boosting decision tree model from fitting to convergence, providing a quantitative basis for the training termination conditions and parameter selection of the flatness evaluation model.
[0042] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments that can be applied to other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.
Claims
1. A method for testing the flatness of tile laying based on gap thickness, characterized in that, include: Acquire depth images of the laid tile surface, the depth images containing three-dimensional point cloud data of the tile surface; In the three-dimensional point cloud data, the gaps between tiles are identified, and a continuous sequence of gap points is extracted along the direction of the gaps. A continuous sequence of gap points is segmented and fitted, and the gaps are divided into straight line segments and inflection point segments based on the curvature change. Calculate the normal distance between all gap points in each line segment and their corresponding fitted line to obtain the set of normal distances; Based on the set of normal distances, the thickness characteristics of each straight line segment are statistically analyzed, and the thickness characteristics include the average normal distance, the standard deviation of the normal distance, and the range of the normal distance; The curvature features of each inflection point segment are extracted, including curvature values and curvature change rates, and correlated with the thickness features of adjacent straight line segments. The thickness characteristics of each straight line segment and the curvature characteristics of each inflection point segment are input into the preset flatness evaluation model to obtain a quantitative score for the flatness of the gap. Highlight gaps with flatness measurement scores below a set threshold and generate a visual report containing the marking information.
2. The method for testing the flatness of tile laying based on gap thickness according to claim 1, characterized in that, Identify the gaps between tiles in the three-dimensional point cloud data, and extract a continuous sequence of gap points along the gap direction, including: Normal estimation is performed on 3D point cloud data, and the normal vector of each point is calculated; Based on normal vector clustering analysis, points with similar normal vector directions are grouped into the same plane, and the point cloud region corresponding to each tile is segmented. At the boundary of adjacent tile point cloud regions, a discrete set of points that do not belong to any tile plane is extracted by a boundary detection operator. The discrete set of points forms the initial contour point cloud of the gap. Curve tracing is performed along the extension direction of the initial contour point cloud of the gap, and the points are connected to form a continuous sequence of gap points. The step of extracting a set of discrete points that do not belong to any tile plane at the boundary of adjacent tile point cloud regions using a boundary detection operator specifically includes: Calculate the directed distance from each point to the plane of its corresponding tile; Points whose directed distance is greater than a preset planar distance threshold are marked as candidate boundary points; Among the candidate boundary points, calculate the angle between the normal vector of each point and its neighboring points; Candidate boundary points whose included angle with the normal vector is greater than a preset angle threshold are extracted to form a discrete set of points that do not belong to any tile plane.
3. The method for testing the flatness of tile laying based on gap thickness according to claim 2, characterized in that, The step of segmenting and fitting a continuous sequence of gap points, dividing the gaps into straight line segments and inflection point segments based on curvature changes, includes: Slide an analysis window of a preset length along a continuous sequence of gap points; Calculate the local curvature of the sequence within each analysis window; Based on the comparison results of local curvature and straight line curvature threshold, the continuous gap point sequence is initially divided into candidate straight line segments and candidate curved segments; For each candidate line segment, perform a line fitting and calculate the fitting residual; If the fitting residual is greater than the preset error allowable value, the current candidate straight line segment will be reclassified as a candidate curved segment. Adjacent candidate curved segments are merged to form the final inflection point segment, and the remaining candidate straight segments are determined as straight segments.
4. The method for testing the flatness of tile laying based on gap thickness according to claim 3, characterized in that, The calculation of the normal distance between all gap points in each straight line segment and their corresponding fitted straight line yields a set of normal distances, including: For each line segment, the least squares method is used to fit its corresponding spatial line equation; For each gap point within the straight line segment, calculate the perpendicular distance from its three-dimensional spatial coordinates to the fitted spatial straight line equation; the perpendicular distance is the normal distance. Record the normal distances corresponding to all gap points within the straight line segment to form the normal distance set; The process of fitting the corresponding spatial line equation using the least squares method for each line segment includes: Obtain the spatial three-dimensional coordinate data of all gap points within the current straight line segment, construct a point set from the spatial three-dimensional coordinate data of all gap points, and calculate the centroid coordinates of the point set in three-dimensional space. Construct a covariance matrix with respect to the direction vector of the line and the coordinates of the centroid, perform eigenvalue decomposition on the covariance matrix, and obtain the eigenvector corresponding to the minimum eigenvalue. The eigenvector is the direction vector of the fitted spatial line equation. Based on the calculated centroid coordinates and direction vector, a spatial straight line equation is constructed that passes through the centroid and extends along the direction vector, thus completing the fitting of the spatial straight line equation for the line segment.
5. The method for testing the flatness of tile laying based on gap thickness according to claim 4, characterized in that, Based on the set of normal distances, the thickness characteristics of each line segment are statistically analyzed. These thickness characteristics include the average normal distance, the standard deviation of the normal distance, and the range of the normal distance, including: The sum of all normal distance values in the normal distance set for each line segment is divided by the number of data in the normal distance set. The result is the average normal distance. Calculate the average of the squared deviations of all normal distance values in the set of normal distances for each line segment from their average value, and then take the square root to obtain the standard deviation of the normal distance. Identify the maximum and minimum values in the set of normal distances for each line segment; the difference between them is the normal distance range.
6. The method for testing the flatness of tile laying based on gap thickness according to claim 5, characterized in that, The curvature features of each inflection point segment are extracted, including curvature values and curvature change rates, and correlated with the thickness features of adjacent straight line segments, including: Cubic spline interpolation is performed on the sequence of gap points within each inflection point segment to obtain a smooth spatial curve. Calculate the curvature of the space curve at each gap point, and average the curvature of all gap points within the inflection point segment to obtain the curvature value of the inflection point segment; Calculate the change in curvature between adjacent gap points within the inflection point segment, and take the average of their absolute values to obtain the rate of change of curvature of the inflection point segment. Record the identifiers of the straight line segments adjacent to the inflection point segment, and establish a data association between the curvature value, curvature change rate of the inflection point segment and the thickness characteristics of the identified adjacent straight line segments.
7. The method for testing the flatness of tile laying based on gap thickness according to claim 6, characterized in that, The process involves inputting the thickness characteristics of each straight line segment and the curvature characteristics of each inflection point segment into a preset flatness evaluation model to obtain a quantitative score for the gap flatness, including: The preset flatness evaluation model is a machine learning model built based on a gradient boosting decision tree model; The average normal distance, standard deviation of normal distance, and range of normal distance for each straight line segment, along with the curvature value and rate of change of curvature for each associated inflection point segment, are used to form a feature vector. The feature vector is input into the trained gradient boosting decision tree model; The gradient boosting decision tree model outputs a score between zero and one hundred as a flatness quantification score for the corresponding gap segment; The steps for constructing the preset flatness evaluation model include: Collect 3D point cloud data of gaps in historical tile laying projects, process the 3D point cloud data of gaps to obtain multiple gap segment samples, each gap segment sample includes the thickness features of its straight segment and the curvature features of its inflection point segment, and manually label the flatness level of each gap segment sample by experts to form a training dataset. The feature vectors in the training dataset are normalized to eliminate the influence of different feature dimensions, and the normalized feature vectors are associated with their corresponding artificial flatness level labels. The gradient boosting decision tree algorithm is adopted, with the normalized feature vector as input and the corresponding artificial smoothness level as the supervision target, and the model parameters are trained in multiple rounds of iterative training. In each round of training iteration, the difference between the model's predicted level and the manually labeled level is calculated, and the loss function is calculated based on the difference. The gradient information of the loss function is used to update the parameters of the decision tree in the gradient boosting decision tree model. During training, a portion of the samples is used as a validation set to monitor the model's evaluation accuracy on the validation set. Training is stopped when the evaluation accuracy no longer improves to prevent the model from overfitting. The final trained gradient boosting decision tree model and its parameters are saved as a preset flatness evaluation model, which is used to predict the flatness quantification score of the new input gap feature vector.
8. The method for testing the flatness of tile laying based on gap thickness according to claim 7, characterized in that, The step of highlighting gap segments with flatness quantitative scores below a set threshold and generating a visual report containing the marking information includes: Set a passing threshold for the flatness score; The flatness quantification score of all straight line segments and inflection point segments is compared with the qualified threshold; All straight line segments and inflection point segments whose flatness measurement scores are below the qualified threshold are rendered and marked with a preset highlight color in their corresponding 3D point cloud models. The system integrates a 3D point cloud model with color markings, a quantitative score of the flatness of each gap segment, and location description information to generate a visual report document.
9. The method for testing the flatness of tile laying based on gap thickness according to claim 8, characterized in that, Based on the comparison results between local curvature and straight-line curvature thresholds, the continuous gap point sequence is initially divided into candidate straight-line segments and candidate curved segments, including: Calculate the approximate curvature of the gap point sequence within the analysis window; The approximate curvature is compared with a preset straight curvature threshold; If the approximate curvature of all points within the analysis window is less than or equal to the straight line curvature threshold, then the gap point sequence segment covered by the current analysis window is marked as a candidate straight line segment. If the approximate curvature of any point within the analysis window is greater than the straight curvature threshold, then the gap point sequence segment covered by the current analysis window is marked as a candidate curved segment.
10. A tile laying flatness testing system based on gap thickness, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method for testing the flatness of tile laying based on gap thickness as described in any one of claims 1 to 9.