Searching method for gap edge feature data in scanning point cloud data
By uniformly discretizing the theoretical digital-mode gap edge profile and principal component analysis, combined with iterative closest point method registration, identifying the point cloud data points with the nearest normal distance, the difficulty in searching gap edge feature data in the existing technology is solved. Problem, fast and accurate gap edge detection is achieved.
Patent Information
- Application Number
- CN202411140026.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2044-08-19
AI Technical Summary
When using three-dimensional scanning data to detect assembly gap sizes, it is difficult to quickly and accurately search for gap edge feature data, resulting in large amount of calculation and poor threshold adaptation, affecting the accuracy of the detection results.
By uniformly discretizing the theoretical digital-mode gap edge contour, principal component analysis and iterative closest point method registration are performed, and the cube grid is divided to identify the point cloud data point with the nearest normal distance as the gap edge feature point.
It realizes rapid and accurate search of gap edge profile data in scanning point cloud data, provides accurate guidance for assembly gap size detection, and improves detection efficiency and accuracy.
Smart Images

Figure CN119048541A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of assembly gap size detection, and in particular relates to a method for searching gap edge feature data in scanning point cloud data, a computer device, a computer-readable storage medium and a computer program product. Background Art
[0002] The assembly gaps on the surface of high-speed moving vehicles such as aircraft affect the aerodynamic performance and fuel efficiency of operation. The improvement of the performance of high-speed moving vehicles requires continuous detection of the assembly gap size.
[0003] In addition to traditional visual inspection, the existing part assembly gap size can be measured by feeler gauges and surface difference gauges, or based on two-dimensional image information detection, or based on three-dimensional data information detection. Feeler gauges and surface difference gauges are manual contact measurements, and workers judge the gaps that may be out of tolerance and conduct sampling inspections. The detection method based on pure image information mainly collects images of the assembly gap area, identifies the gap edges of the image, and directly calculates the gap size by combining the image scale factor. The detection results of this method are directly related to the image quality, and can only detect the gap size on a two-dimensional plane.
[0004] The detection methods based on three-dimensional data information can be divided into three types. The first is to use digital special gap measurement equipment, such as Gapgun and Calipri c1x series products, for detection. This type of equipment obtains the surface three-dimensional data of the gap area based on the principle of triangulation, and evaluates the size of the gap by processing and analyzing the surface three-dimensional data. The existing digital special gap measurement equipment requires that the measuring laser line is perpendicular to the gap during the measurement process, otherwise it will introduce a systematic error related to the inclination angle to the gap size. The Calipri c1x series products use three rays for inclination compensation and measurement. These digital special gap measurement devices can only measure the size on a single vertical section at a time. Although industrial robots can be used to achieve automated measurement, it is difficult to use this type of equipment to perform continuous detection of gap size due to the limitation of a single vertical section measurement method. The second is a detection method based on edge feature three-dimensional information, that is, a binocular camera system is used to collect images of the assembly feature area, and the three-dimensional data of the gap edge is obtained through edge feature recognition and binocular stereo reconstruction, and the gap size is calculated according to the definition. This method belongs to passive measurement, and the image acquisition quality directly affects the detection results. The third is a detection method based on 3D scanning data, which uses optical scanning equipment to collect assembly gap surface point cloud data, identifies the gap edge feature points, and calculates the assembly gap size according to the definition. Thanks to the measurement accuracy and efficiency of existing industrial scanning equipment, this method can accurately and continuously detect the 3D gap size, but in this method, the edge feature data on both sides of the gap is the key to calculating the 3D gap size. At present, by designing the neighborhood morphology change description factor and setting the threshold to determine the data on both sides of the gap, there are problems such as large amount of calculation and poor threshold adaptation, making it difficult to quickly and accurately search for the gap edge feature data. Summary of the invention
[0005] The purpose of the present invention is to provide a method for searching gap edge feature data in scanning point cloud data, a computer device, a computer-readable storage medium and a computer program product, which can quickly search for gap edge contour data in scanning point cloud data and provide accurate guidance for accurate detection of assembly gap size.
[0006] In order to achieve the above object, one aspect of the present invention provides a method for searching for gap edge feature data in scanning point cloud data, comprising:
[0007] The gap edge contour line of the theoretical digital model is uniformly discretized to obtain the theoretical digital model discrete data, and the redundant data in the theoretical digital model discrete data relative to the scanned point cloud data is removed to make the distribution area of the theoretical discrete data consistent with that of the scanned point cloud data;
[0008] The principal component analysis method is used to calculate the three mutually perpendicular principal directions of the theoretical digital analog discrete data and the scanned point cloud data, and the three principal directions are aligned to perform initial posture alignment of the theoretical digital analog discrete data and the scanned point cloud data, and the center points of the theoretical digital analog discrete data and the scanned point cloud data are calculated, and the positions of the theoretical digital analog discrete data and the scanned point cloud data are initially aligned by aligning the center points, and the iterative closest point method is used to perform accurate alignment of the spatial relative posture of the theoretical digital analog discrete data and the scanned point cloud data; and
[0009] The scanning point cloud data and theoretical digital model discrete data are divided into different cube grids. For each edge contour line data point in the theoretical digital model discrete data, the data point of the scanning point cloud data with the closest normal distance to the edge contour line data point in the grid where the edge contour line data point is located is identified as the gap edge feature data point in the corresponding scanning point cloud data.
[0010] Preferably, the uniform discretization of the theoretical numerical model comprises:
[0011] For the straight lines, circular arcs and variable curvature curves in the gap edge contour line of the theoretical numerical model, the methods of equidistant linear interpolation, equal arc length interpolation, discretization based on maximum chord height constraint and equal Euclidean distance interpolation are used respectively to obtain the uniform discretization data of the gap edge contour line of the theoretical numerical model.
[0012] Preferably, the method combining the maximum chord height constraint-based discretization with the equi-Euclidean distance interpolation comprises:
[0013] Step a: Connect the first and last points of the variable curvature curve to obtain a projected straight line segment, calculate the maximum distance from the data point on the variable curvature curve to the projected straight line segment, split the variable curvature curve at the point of maximum distance to obtain two sub-segments;
[0014] Step b: for the sub-line segment, repeat step a until the maximum distance is less than the set threshold, then stop segmenting and obtain the variable curvature curve discrete data;
[0015] Step c: Perform equally spaced linear interpolation on the discrete data of the variable curvature curve.
[0016] Preferably, the initial registration of the theoretical digital-analog discrete data and the scanned point cloud data by aligning the three main directions comprises:
[0017] The rotation transformation matrix R is solved by matrix operation as follows, and the rotation transformation matrix R is used to perform initial registration of the theoretical digital model discrete data and the scanned point cloud data:
[0018] [n x n y n z ]=R[n′x n′ y n′ z ]
[0019] Among them, n i Represents the main direction vector of the theoretical digital model discrete data, n′ i Represents the main direction vector of the scanned point cloud data, i = x, y, z;
[0020] The initial registration of the positions of theoretical digital analog discrete data and scanned point cloud data by center point alignment includes:
[0021] Calculate the center point of the theoretical digital discrete data and the scanned point cloud data, calculate the translation vector T as follows, and use the translation vector T to perform initial position alignment between the theoretical digital discrete data and the scanned point cloud data:
[0022]
[0023] in, Represents the center point coordinate vector of the theoretical numerical model discrete data, Represents the center point coordinate vector of the scanned point cloud data.
[0024] Preferably, the method of using the iterative closest point method to accurately align the spatial relative pose of the theoretical digital model discrete data with the scanned point cloud data includes:
[0025] Obtain the corresponding point pairs of the theoretical digital discrete data and the scanned point cloud data, use one set of the theoretical digital discrete data and the scanned point cloud data as the reference data, and the other set as the data to be converted, and construct the following alignment objective function:
[0026]
[0027] Among them, E(R,T) represents the distance deviation and P of all corresponding point pairs. i represents the vector consisting of the coordinates of the data points to be transformed, S i Indicated by P i The vector formed by the coordinates of the corresponding reference data points, d(RP i +T,S i ) represents the vector S i Aligned with the transformed vector P i distance.
[0028] Preferably, the side length a of the cube grid is determined as follows:
[0029]
[0030] Among them, x max 、x min ,y max,y min 、z max , Z min Represents the X, Y, and Z coordinate extreme values of the minimum bounding box of the scanned point cloud data, N represents the number of points in the scanned point cloud data, and n represents the number of data points contained in each grid.
[0031] Another aspect of the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the above method.
[0032] Another aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the above method when executed by a processor.
[0033] Another aspect of the present invention provides a computer program product, comprising a computer program, which implements the steps of the above method when executed by a processor.
[0034] The method for searching for gap edge feature data in scanning point cloud data, computer equipment, computer-readable storage medium and computer program product according to the above aspects of the present invention can quickly search for gap edge contour data in scanning point cloud data, providing accurate guidance for accurate detection of assembly gap size. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings used in the description of the embodiments of the present invention. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work:
[0036] Figure 1 is a flow chart of a method for searching for gap edge feature data in scanning point cloud data according to an embodiment of the present invention;
[0037] Figure 2 Schematic diagram of initial registration of theoretical digital model and scanned point cloud data in an embodiment of the present invention;
[0038] Figure 3 is a schematic diagram of grid division and normal distance closest point search according to an embodiment of the present invention;
[0039] Figure 4 is a schematic diagram of edge feature data search results in scanned point cloud data according to an embodiment of the present invention;
[0040] Figure 5 4 is a structural diagram of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0041] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0042] An embodiment of the present invention provides a method for searching for gap edge feature data in scanning point cloud data. Figure 1 FIG. 1 is a flow chart of a method for searching for gap edge feature data in scanning point cloud data according to an embodiment of the present invention. Figure 1 As shown, the method for searching for gap edge feature data in scanning point cloud data according to an embodiment of the present invention includes steps S1 to S3.
[0043] (1) Step S1: Uniform discretization of theoretical numerical models
[0044] In this step, the gap edge contour line of the theoretical digital model is uniformly discretized to obtain theoretical digital model discrete data, and redundant data in the theoretical digital model discrete data relative to the scanning point cloud data is removed to make the distribution area of the theoretical discrete data consistent with that of the scanning point cloud data.
[0045] The theoretical digital model is composed of point, line and surface elements. In order to facilitate the calculation of the main direction, the theoretical digital model needs to be discretized to obtain discrete data points. The scanned point cloud data is randomly non-uniformly distributed, in which the data point density of the large curvature surface is greater than that of the small curvature surface, and the data points of the equal curvature surface are approximately uniformly distributed. The embodiment of the present invention performs uniform discretization on the theoretical digital model to obtain a set of uniformly distributed data points (theoretical digital model discrete data) on the theoretical digital model surface. In order to make the main directions of the theoretical digital model discrete data and the scanned point cloud data (hereinafter referred to as two sets of data) accurately correspond, the distribution areas of the two sets of data must be consistent. Usually the theoretical digital model contains the complete outer surface of the part to be measured, while the scanned point cloud data usually only contains the data of the area to be detected. Therefore, it is necessary to remove the redundant data in the theoretical digital model discrete data relative to the scanned point cloud data.
[0046] Therefore, the theoretical numerical model discretization processing includes uniform discretization processing of line and surface elements and removal processing of non-corresponding data.
[0047] 1) Uniform discretization of different line elements
[0048] For contour lines with different curvature change characteristics, such as straight lines, circular arcs and variable curvature curves, the methods of equal distance linear interpolation, equal arc length interpolation, and a combination of discretization based on maximum chord height constraints and equal Euclidean distance interpolation are used to obtain the uniform discretization data of the theoretical assembly gap edge contour line.
[0049] The implementation method of combining the discretization based on the maximum chord height constraint and the equi-Euclidean distance interpolation is as follows:
[0050] a. Connect the first and last points of the variable curvature curve to obtain the projected straight line segment, calculate the maximum distance from the data point on the variable curvature curve to the projected straight line segment, split the variable curvature curve at the point of maximum distance to obtain two sub-segments;
[0051] b. For the sub-segments, repeat step a and stop segmenting when the maximum distance is less than the set threshold.
[0052] The segmentation points added in the above process constitute a set of data points reflecting the distribution shape of the variable curvature curve. By reducing the set threshold, a set of dense data (variable curvature curve discrete data) that can accurately reflect the detailed characteristics of the distribution shape of the variable curvature curve can be obtained.
[0053] c. Perform equally spaced S linear interpolation on discrete data of variable curvature curve
[0054] The first point P1 of the variable curvature curve discrete data is taken as the first uniformly distributed point, expressed as P1'; the Euclidean distance between P1' and the second data point P2 of the variable curvature curve discrete data is calculated, expressed as D(1,2), and the interpolation judgment and interpolation operation are performed according to the size relationship between D(1,2) and the interval S:
[0055] ◆When D(1,2) is greater than k times the interpolation interval S, k≥1.5, it is necessary to interpolate between point P1' and point P2. In this case, the first uniformly distributed point P1' and the second data point P2 are regarded as the two endpoints of the straight line segment, and a new point is constructed by linear interpolation;
[0056] ◆When D(1,2) is less than k times the interpolation interval S, k≥1.5, the straight line segment P1'P2 is not interpolated. Then the Euclidean distance between point P1' and the next data point P3 of the complex curve segment data is calculated, which is expressed as based on D(1,3), the interpolation judgment and interpolation operation of the straight line segment P1'P3 are performed according to the relationship between the Euclidean distance D(1,3) and the interpolation interval S;
[0057] Repeat the above operation, judge the Euclidean distance between the variable curvature curve discrete data and the latest interpolation point in turn, and perform corresponding interpolation operation until the last point of the variable curvature curve discrete data participates in the interpolation judgment or operation.
[0058] 2) Uniform discretization of different surface elements
[0059] For a plane, define two mutually perpendicular directions, sample at equal intervals in the two perpendicular directions, and obtain discrete data evenly distributed on the plane. The two mutually perpendicular directions can be selected as the two coordinate axes of the theoretical numerical model design coordinate system, or defined by the plane boundary line. The sampling interval is set to
[0060] For a sphere, two mutually perpendicular longitude and latitude directions are defined. On the same latitude (longitude) plane, the arc length of two adjacent longitude (latitude) planes is equal to the sampling interval S. The curvature of the sphere is constant, and the choice of longitude and latitude directions has little effect on the uniform discretization results.
[0061] For the variable curvature surface, two mutually perpendicular directions are defined according to its boundary line, which are expressed as (UV). In the U direction, the variable curvature curve on the variable curvature surface is uniformly discretized by the above-mentioned "method combining discretization based on maximum chord height constraint and equal Euclidean distance interpolation". The sampling interval in the V direction is the interval between adjacent variable curvature curves on the variable curvature surface, which is set to 2S / 3 to ensure that the average point spacing approaches S.
[0062] 3) Removal of non-corresponding data points
[0063] Non-corresponding data refers to the data of the surface area of the part that is included in the theoretical numerical model discretization data but not in the scanned point cloud data. When removing non-corresponding data, the surface area included in the scanned point cloud data is used as a reference to remove the data of the redundant surface area in the theoretical numerical model discretization data. When the surface area included in the scanned point cloud data is difficult to define, some data can be appropriately deleted, usually the outer data of the scanned point cloud data, and the new scanned point cloud data is used as a reference to determine the retained theoretical numerical model discretization data.
[0064] In summary, the discretization processing of the theoretical numerical model constructs a set of data that is similar to the overall distribution area and local distribution characteristics of the scanning point cloud data, providing good data consistency for the registration of the theoretical numerical model discrete data with the scanning point cloud data, and ensuring the accuracy and convergence of the registration results.
[0065] (2) Step S2: Initial registration of theoretical digital discrete data and scanned point cloud data
[0066] In this step, the principal component analysis method is used to calculate the three mutually perpendicular main directions of the theoretical digital analog discrete data and the scanned point cloud data. The three main directions are aligned to perform the initial posture alignment of the theoretical digital analog discrete data and the scanned point cloud data. The center points of the theoretical digital analog discrete data and the scanned point cloud data are calculated, and the positions of the theoretical digital analog discrete data and the scanned point cloud data are initially aligned by center point alignment. The iterative closest point method is used to accurately align the spatial relative posture of the theoretical digital analog discrete data and the scanned point cloud data.
[0067] Initial registration includes attitude and position initial registration. The attitude initial registration is achieved by constraining the three mutually perpendicular main directions of the data, and the position initial registration is achieved by constraining the position of the data center point. Figure 2 It is a schematic diagram of the initial alignment of the theoretical numerical model and the scanned point cloud data of an embodiment of the present invention, wherein (a) represents the theoretical numerical model, (b) represents the discrete data of the theoretical numerical model, (c) represents the initial relative pose of the two sets of data, (d) represents the posture alignment constrained by the main direction, and (e) represents the position alignment constrained by the center point.
[0068] 1) Initial registration of the theoretical digital discrete data and the scanned point cloud data
[0069] Solving the main direction of data: The main direction of data is related to the spatial distribution of point cloud data, and is solved using the principal component analysis method. The principal component analysis method is often used to calculate the main direction of data. The dispersion of data in the main direction is the largest, and the main direction and the data center point have the characteristics of transformation invariance. For two sets of data with the same morphology, the correspondence between the three main directions and the data center points is accurate, and the two sets of data can be initially registered.
[0070] First, the 3×3 covariance matrix R is constructed using the data point coordinates w , see formula (1); covariance matrix R w The three eigenvectors are the three main directions of this group of data.
[0071]
[0072] In formula (1), (x i ,y i , z i ) represents the coordinates of the data points involved in the covariance matrix operation, where i = 1, 2, .., n, The coordinates of the center point of the data set.
[0073] The main directions of the data are perpendicular to each other and have strong posture constraints, which can quickly align the postures of two sets of data. However, the main directions are ambiguous, and the consistency of the main directions needs to be judged and adjusted during alignment.
[0074] The correspondence between the three main directions of the two sets of data is clear and satisfies equation (2). The rotation transformation matrix R can be directly solved through matrix operations.
[0075] [n x n y n z ]=R[n′ x n′ y n′ z ] (2)
[0076] In formula (2), n iRepresents the main direction vector of the theoretical digital model discrete data, n′ i Represents the main direction vector of the scanned point cloud data, i = x, y, z. The rotation transformation matrix R is used for initial posture registration.
[0077] 2) Initial registration of theoretical digital discrete data and scanned point cloud data
[0078] The center points of the two sets of data are calculated. The coordinates of the center points of the two sets of data satisfy equation (3). The translation vector T required for the initial position alignment is obtained through the matrix.
[0079]
[0080] In formula (3), Represents the center point coordinate vector of the theoretical numerical model discrete data, Represents the coordinate vector of the center point of the scanned point cloud data. The translation vector T is used for initial position alignment.
[0081] 3) Accurate registration of theoretical digital discrete data and scanned point cloud data
[0082] In the initial registration state, the ICP method is used to achieve accurate registration of the spatial poses of the two sets of data by constraining the distance deviation. The ICP (Iterative Closest Point) method is a commonly used iterative registration method based on distance deviation constraints. Under the premise of accurate initial registration results, it can robustly and accurately register two sets of discrete data.
[0083] ICP precise registration includes the establishment of corresponding point pairs, the determination of point pair weights, the elimination of erroneous point pairs, the establishment of objective functions, and the solution of the minimum value of objective functions.
[0084] Corresponding point pairs are often determined by constraints such as spatial distance, geometric features, or neighborhood features. Spatial distance can be the distance between points, the distance between points and local fitted surfaces, or the distance between points and triangular meshes. Commonly used geometric features are the principal curvature, Gaussian curvature, and mean curvature of data points. Neighborhood features refer to the spatial distribution characteristics of neighborhood points, including the normal angle distribution, mean curvature distribution, histogram distribution, and the distance between points and the neighborhood centroid of neighborhood points. Different point pairs can be assigned different weights to obtain different alignment effects based on the importance and accuracy of different point pairs. The weight of a point pair can be determined by the size of the distance, the size of the normal angle, and other methods. The corresponding point pairs established usually have erroneous results. Removing erroneous point pairs can increase the proportion of correct point pairs and ensure the accuracy of the alignment structure. K-means clustering and distance standard deviation classification can be combined to identify erroneous point pairs.
[0085] After obtaining accurate corresponding point pairs, it is necessary to construct and solve the alignment objective function. The ICP method aims to minimize the sum of the distance deviations of all corresponding point pairs, using one set of theoretical digital discrete data and scanned point cloud data as reference data and the other set as data to be converted. Its objective function is shown in Equation (4).
[0086]
[0087] In formula (4), E(R,T) represents the distance deviation and P of all corresponding point pairs. i represents the vector consisting of the coordinates of the data points to be transformed, S i Indicated by P i The vector formed by the coordinates of the corresponding reference data points, d(RP i +T,S i ) represents the vector S i Aligned with the transformed vector P i distance.
[0088] Solving the minimum value of the objective function includes two parts: determining the iteration direction and solving the transformation parameters. The iteration direction can be determined by solving the convergence direction of the transformation parameters through local traversal, and further searching in the convergence direction until the difference between the objective functions after two adjacent transformations is less than the set threshold or the number of transformations reaches the upper limit of the iteration number, and then the iteration is stopped.
[0089] When there are multiple sets of corresponding point pairs between two sets of data, the least square method is often used to solve the conversion parameters to reduce the impact of random noise on the alignment results. Singular Value Decomposition (SVD) is a widely used least square deviation solution method. The SVD method aims to minimize the sum of square deviations of all corresponding point pairs. The rotation matrix (R, T) is derived by solving the extreme value. The solution process is shown in formula (5). In formula (5), B represents the set of data points to be converted, A represents the set of reference data points, the two sets of data correspond one to one in order, and B is aligned to A.
[0090]
[0091] In formula (5), Ac and Bc represent the center points of data point set A and data point set B respectively, and the symbol “SVD” represents the singular value decomposition operation of the matrix.
[0092] (3) Step S3: Searching for assembly gap edge contour data in the scanned point cloud data
[0093] In this step, the scanning point cloud data and theoretical digital model discrete data are divided into different cubic grids. For each edge contour line data point in the theoretical digital model discrete data, the data point of the scanning point cloud data with the closest normal distance to the edge contour line data point in the grid where the edge contour line data point is located is identified as the gap edge feature data point in the corresponding scanning point cloud data.
[0094] Under the precise registration state, the data of the combination of the scanned point cloud data and the theoretical numerical model discrete data is divided into a fixed-side-length cube grid. The gap edge data points on the theoretical numerical model are used as references. For each edge contour data point, the point in the grid closest to the edge contour data point is searched as the gap edge data point corresponding to the scanned point cloud data. Grid division can constrain the size of the search area and ensure search efficiency. Figure 3 Schematic diagram of grid division and normal distance nearest point search according to an embodiment of the present invention, wherein (a) represents grid division, and (b) represents normal distance nearest point search.
[0095] The scanned point cloud data and the discrete data of the theoretical gap edge contour line (the gap edge data points on the theoretical numerical model) are divided into different grids by constructing a spatial grid. The grid is a cube distributed along the X, Y, and Z axes of the theoretical numerical model design coordinate system. The side length of the grid, denoted as a, is determined according to formula (6).
[0096]
[0097] In formula (6), (x max 、x min ,y max ,y min 、z max 、z min ) represents the X, Y, and Z coordinate extreme values of the minimum bounding box of the scanned point cloud data, such as Figure 3 As shown in (a); N represents the number of scanned point cloud data points, and n represents the number of data points expected to be contained in each grid.
[0098] Starting from each discrete data point of the theoretical gap edge contour line, calculate the point with the closest normal distance in the grid where it is located. Figure 3 The grid where the theoretical gap edge contour data point P0 in (b) contains 6 scan point cloud data, represented by P1~P6, and the normal distance from the 6 points to point P0 is represented by D i , i = 1, 2, ..., 6, D i Satisfies formula (7).
[0099] D i =dot((P i-P0), n0), i = 1, 2, ..., 6 (7) In formula (7), n0 represents the surface normal vector of point P0, which can be calculated by the neighborhood morphological features of the theoretical numerical model discrete data points.
[0100] Minimum normal distance D min It is equal to min{D1, D2, ..., D6}, and its corresponding data point is the gap edge feature point in the scanned point cloud data. Figure 4 : This is a schematic diagram of the edge feature data search result in the scanned point cloud data of an embodiment of the present invention, wherein (a) represents the discrete data of the theoretical gap edge contour line, and (b) represents the gap edge feature point in the scanned point cloud data. All theoretical edge contour line data points can search for a corresponding point in the scanned point cloud data, and all corresponding points present the assembly edge of the actual part to a certain extent, providing accurate data guidance for the continuity evaluation and detection of the assembly gap size.
[0101] In summary, the method for searching for gap edge feature data in scanning point cloud data of the embodiment of the present invention uniformly discretizes the theoretical numerical model and constrains the consistency of the distribution area of the scanning point cloud data and the theoretical numerical model data, thereby ensuring that the main directions and center points of the two sets of data accurately correspond to each other, and obtaining reliable initial registration results; through data grid division and normal distance constraints, the gap edge contour data in the scanning point cloud data can be quickly searched, providing accurate guidance for the accurate detection of assembly gap size. The method of the embodiment of the present invention is suitable for assembly features with good rigidity and theoretical numerical models.
[0102] An embodiment of the present invention further provides a computer device, which may be a server, and its internal structure diagram may be as shown in FIG. Figure 5 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store operating parameter data of each framework. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the steps of the method for searching for gap edge feature data in scanning point cloud data of an embodiment of the present invention are implemented.
[0103] Those skilled in the art will understand that Figure 5The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0104] An embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the method for searching for gap edge feature data in scanning point cloud data of an embodiment of the present invention are implemented.
[0105] An embodiment of the present invention further provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the method for searching for gap edge feature data in scanning point cloud data of an embodiment of the present invention.
[0106] The above description is only by way of illustration of certain exemplary embodiments of the present invention. It is undoubted that those skilled in the art can modify the described embodiments in various ways without departing from the spirit and scope of the present invention. Therefore, the above drawings and descriptions are illustrative in nature and should not be construed as limiting the scope of protection of the claims of the present invention.
Claims
1. A method for searching for gap edge feature data in scanning point cloud data, characterized in that: include: The gap edge contour line of the theoretical digital model is uniformly discretized to obtain the theoretical digital model discrete data, and the redundant data in the theoretical digital model discrete data relative to the scanned point cloud data is removed to make the distribution area of the theoretical discrete data consistent with that of the scanned point cloud data; The principal component analysis method is used to calculate the three mutually perpendicular main directions of the theoretical digital model discrete data and the scanned point cloud data. The three main directions are aligned to perform the initial posture alignment of the theoretical digital model discrete data and the scanned point cloud data. The center points of the theoretical digital model discrete data and the scanned point cloud data are calculated. The positions of the theoretical digital model discrete data and the scanned point cloud data are initially aligned by aligning the center points. The iterative closest point method is used to perform the precise alignment of the spatial relative posture of the theoretical digital model discrete data and the scanned point cloud data. as well as The scanning point cloud data and theoretical digital model discrete data are divided into different cube grids. For each edge contour line data point in the theoretical digital model discrete data, the data point of the scanning point cloud data with the closest normal distance to the edge contour line data point in the grid where the edge contour line data point is located is identified as the gap edge feature data point in the corresponding scanning point cloud data.
2. The method according to claim 1, characterized in that The uniform discretization processing of the theoretical numerical model comprises: For the straight lines, circular arcs and variable curvature curves in the gap edge contour line of the theoretical numerical model, the methods of equidistant linear interpolation, equal arc length interpolation, discretization based on maximum chord height constraint and equal Euclidean distance interpolation are used respectively to obtain the uniform discretization data of the gap edge contour line of the theoretical numerical model.
3. The method according to claim 2, characterized in that The method of combining the maximum chord height constraint-based discreteness with the equi-Euclidean distance interpolation includes: Step a: Connect the first and last points of the variable curvature curve to obtain a projected straight line segment, calculate the maximum distance from the data point on the variable curvature curve to the projected straight line segment, split the variable curvature curve at the point of maximum distance to obtain two sub-segments; Step b: for the sub-line segment, repeat step a until the maximum distance is less than the set threshold, then stop segmenting and obtain the variable curvature curve discrete data; Step c: Perform equally spaced linear interpolation on the discrete data of the variable curvature curve.
4. The method according to any one of claims 1 to 3, characterized in that The initial registration of the theoretical digital model discrete data and the scanned point cloud data by aligning the three main directions includes: The rotation transformation matrix R is solved by matrix operation as follows, and the rotation transformation matrix R is used to perform initial registration of the theoretical digital model discrete data and the scanned point cloud data: [n x n y n z ]=R[n′ x n′ y n′ z ] Among them, n i Represents the main direction vector of the theoretical digital model discrete data, n′ i Represents the main direction vector of the scanned point cloud data, i = x, y, z The initial registration of the positions of theoretical digital analog discrete data and scanned point cloud data by center point alignment includes: Calculate the center point of the theoretical digital discrete data and the scanned point cloud data, calculate the translation vector T as follows, and use the translation vector T to perform initial position alignment between the theoretical digital discrete data and the scanned point cloud data: in, Represents the center point coordinate vector of the theoretical numerical model discrete data, Represents the center point coordinate vector of the scanned point cloud data.
5. The method according to claim 4, characterized in that The accurate registration of the spatial relative position of theoretical digital model discrete data and scanned point cloud data by using the iterative closest point method includes: Obtain the corresponding point pairs of the theoretical digital discrete data and the scanned point cloud data, use one set of the theoretical digital discrete data and the scanned point cloud data as the reference data, and the other set as the data to be converted, and construct the following alignment objective function: Among them, E(R,T) represents the distance deviation and P of all corresponding point pairs. i represents the vector consisting of the coordinates of the data points to be transformed, S i Indicated by P i The vector formed by the coordinates of the corresponding reference data points, d(RP i +T,S i ) represents the vector S i Aligned with the transformed vector P i distance.
6. The method according to any one of claims 1 to 3, characterized in that The side length a of the cube grid is determined as follows: Among them, x max 、x min ,y max ,y min 、z max 、z min Represents the X, Y, and Z coordinate extreme values of the minimum bounding box of the scanned point cloud data, N represents the number of points in the scanned point cloud data, and n represents the number of data points contained in each grid.
7. A computer device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 6.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Numerically controlled lathe-based contour laser online measurement device and method for rotary type structure characteristic parts
CN107238352A
Crown model extraction method in point cloud data of laser scanning environment
CN107705344A
Accurate point cloud segmentation method based on feature template
CN114119628A
Unmanned vehicle mapping method combining laser radar and acceleration sensor
CN115540850A
Complex curved surface point cloud registration method based on multi-scale feature description, electronic equipment and storage medium
CN116091727A
Cited By
Dike patch connection method based on'searchlight 'swing search
CN121686212A
A method for connecting embankment patches based on "searchlight" wobble search
CN121686212B
