Closed three-dimensional contour line measurement data and theoretical design contour line registration method and device
The method of uniform discretization and precise registration using normal correspondence and Euclidean distance minimization addresses the inaccuracy in registering three-dimensional contour line data, ensuring accurate alignment and evaluation of complex parts.
Patent Information
- Application Number
- CN202311376850.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-23
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2043-10-23
AI Technical Summary
Existing methods for registering three-dimensional contour line measurement data with theoretical design contour lines are inaccurate due to the lack of robust registration methods for point cloud data without sufficient geometric features, leading to inaccuracies in evaluating complex thin-walled parts.
A method involving uniform discretization of theoretical design contour lines, normal correspondence construction, and precise registration steps to align three-dimensional contour line measurement data with theoretical design contour lines, using normal deviations and Euclidean distance minimization to establish accurate spatial alignment.
Achieves precise registration of three-dimensional contour line measurement data with theoretical design contour lines, ensuring accurate evaluation of surface profiles and alignment without requiring characteristic points or directions, suitable for various shapes and applications such as mold line template evaluation and large-sized rigid part assembly.
Smart Images

Figure CN118036105B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of geometric quantity measurement and detection, and relates to a method and a device for registering closed three-dimensional contour line measurement data with theoretical design contour lines. Background Art
[0002] Edge profile detection technology can be used for the evaluation of mold line template profile deviation, automated assembly guidance of large-sized rigid parts, and other processes. At present, two-dimensional profile rapid detection and three-dimensional profile contact detection can be achieved through template comparison, observation of light gaps, image detection, and spatial coordinate evaluation. However, three-dimensional profiles cannot be detected non-contact, which affects the accuracy of surface profile detection of large-sized complex thin-walled parts. Non-contact scanning equipment provides actual three-dimensional profile data, but there is currently a lack of robust registration methods for three-dimensional profile measurement data and theoretical design profiles, which affects the accurate evaluation of three-dimensional profiles.
[0003] Some existing data registration methods solve the spatial pose conversion relationship based on the corresponding geometric features between two sets of data to be registered, such as registration based on the corresponding relationship between the centers of three or more standard balls, registration based on the corresponding relationship between the three coordinate axes of the coordinate system, registration based on the corresponding relationship between surface-line-point features, etc. These methods are ineffective for point cloud data without geometric features or with insufficient geometric feature information. Summary of the invention
[0004] The purpose of the present invention is to provide a method and device for aligning closed three-dimensional contour line measurement data with theoretical design contour lines, a computer device, and a computer-readable storage medium, which can solve the problem that closed three-dimensional contour line measurement data and theoretical design contour lines cannot be accurately aligned due to the lack of regular geometric feature constraints.
[0005] One aspect of the present invention provides a method for registering closed three-dimensional contour line measurement data with theoretical design contour lines, comprising:
[0006] Theoretical design contour line uniform discretization step: perform uniform discretization processing on the theoretical design contour line at equal intervals to obtain a group of uniformly distributed data points of the theoretical design contour line, and set the data distribution interval to be equal to the interval of the three-dimensional contour line measurement data, and establish a corresponding relationship between the two groups of contour line data, the two groups of contour line data are the three-dimensional contour line measurement data and the obtained uniformly distributed data of the theoretical design contour line;
[0007] Normal correspondence construction steps: calculate the normals of the two sets of contour line data, and establish all normal correspondences of the two sets of contour line data;
[0008] Initial registration step: Calculate the normal deviation and the normal deviation between the two sets of contour data under each normal correspondence relationship, and take the minimum normal deviation as the goal to achieve accurate registration of the spatial posture of the two sets of contour data. By translating the center point of the 3D contour measurement data to the center point of the uniformly distributed data of the theoretical design contour, the initial registration of the spatial position of the two sets of contour data is achieved;
[0009] Precise registration steps: Construct the corresponding points between the two sets of contour line data with the minimum Euclidean distance as the constraint condition, and minimize the sum of square distances of all corresponding points as the goal to achieve precise registration of the spatial positions of the two sets of contour line data.
[0010] Preferably, the three-dimensional contour line measurement data is a group of evenly distributed discrete data points, and the theoretical design contour line is a continuous three-dimensional curve.
[0011] Preferably, in the step of uniformly discretizing the theoretical design contour, the theoretical design contour is uniformly discretized at equal intervals as follows:
[0012] According to the curvature change characteristics, the three-dimensional theoretical design contour line is divided into straight line segments, arc segments and variable curvature segments; linear interpolation is performed on the straight line segments, equal arc length interpolation is performed on the arc segments, and equal Euclidean distance interpolation is performed on the variable curvature segments.
[0013] Preferably, the linear interpolation is: constructing a plurality of data points equally spaced along the straight line between two end points of the straight line segment;
[0014] The equal arc length interpolation is as follows: fitting a circle through the two end points of the arc segment and any point in the middle of the arc to obtain the radius and center coordinates of the arc segment; converting the sampling interval into a sampling center angle, starting from the starting end point of the arc segment, and gradually increasing the sampling center angle to determine the position of the interpolation point;
[0015] The equal Euclidean distance interpolation is as follows: the variable curvature line segment is discretized into a set of non-uniformly distributed data points by controlling the chord height, and interpolation judgment and new point solution are performed according to the Euclidean distance between adjacent data points.
[0016] Preferably, in the normal correspondence construction step, the normals of the two sets of contour line data are calculated as follows:
[0017] Perform quadratic curve best fitting on the contour data point and multiple adjacent data points, project the contour data point onto the best fitting curve, and use the normal of the projection point on the fitting curve to represent the normal of the contour data point.
[0018] Preferably, in the precise registration step, the translation vector of the spatial position of the two sets of contour line data is solved according to the minimum sum of the distance deviations of all corresponding points, and the spatial positions of the two sets of contour line data are transformed according to the translation vector; the process is iterated a certain number of times, and when the sum of the squares of the corresponding point distances is minimized, it is determined that the spatial positions of the two sets of contour line data are precisely registered.
[0019] Another aspect of the present invention provides a closed three-dimensional contour line measurement data and a theoretical design contour line registration device, comprising:
[0020] Theoretical design contour line uniform discretization module: perform uniform discretization processing on the theoretical design contour line at equal intervals to obtain a group of uniformly distributed data points of the theoretical design contour line, and set the data distribution interval to be equal to the interval of the three-dimensional contour line measurement data, and establish a corresponding relationship between the two groups of contour line data, the two groups of contour line data are the three-dimensional contour line measurement data and the obtained uniformly distributed data of the theoretical design contour line;
[0021] Normal correspondence building module: calculates the normals of two sets of contour line data and establishes all normal correspondences between the two sets of contour line data;
[0022] Initial registration module: Calculate the normal deviation and the normal deviation between the two sets of contour data under each normal correspondence relationship, and take the minimum normal deviation as the goal to achieve accurate registration of the spatial posture of the two sets of contour data. By translating the center point of the 3D contour measurement data to the center point of the uniformly distributed data of the theoretical design contour, the initial registration of the spatial position of the two sets of contour data is achieved;
[0023] Precise registration module: Construct the corresponding points between two sets of contour line data with the minimum Euclidean distance as the constraint condition, and minimize the sum of square distances of all corresponding points as the goal to achieve precise registration of the spatial positions of the two sets of contour line data.
[0024] Another aspect of the present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.
[0025] Still another aspect of the present invention is a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the above method when executed by a processor.
[0026] According to the closed three-dimensional contour line measurement data and theoretical design contour line registration method and device, computer equipment, and computer-readable storage medium of the above aspects of the present invention, accurate registration of closed three-dimensional contour line measurement data and theoretical design contour line can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] 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:
[0028] Figure 1 It is a flow chart of a method for registering closed three-dimensional contour line measurement data with theoretical design contour lines according to an embodiment of the present invention;
[0029] Figure 2 It is an example diagram of a closed three-dimensional contour line measurement data and a theoretical design contour line registration method according to an embodiment of the present invention;
[0030] Figure 3 It is a diagram of the structure of a closed three-dimensional contour line measurement data and theoretical design contour line registration device according to one embodiment of the present invention;
[0031] Figure 4 It is a structural diagram of a computer device according to one embodiment of the present invention. DETAILED DESCRIPTION
[0032] 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.
[0033] The embodiment of the present invention provides a registration method for closed three-dimensional contour line measurement data and theoretical design contour line, which can be used to evaluate the deviation of the three-dimensional contour line of the physical surface relative to the theoretical design contour line. In the embodiment of the present invention, the measurement data of the three-dimensional contour line is a set of evenly or approximately evenly distributed discrete data points, and its theoretical design contour line is a continuous three-dimensional curve.
[0034] Figure 1 FIG. 1 is a flow chart of a closed three-dimensional contour line measurement data and a theoretical design contour line registration method according to an embodiment of the present invention. Figure 1 As shown, the closed three-dimensional contour line measurement data and theoretical design contour line registration method according to the embodiment of the present invention includes steps S1 to S4.
[0035] (1) Step S1: Uniform discretization step of theoretical design contour line
[0036] The theoretical design contour line is discretized uniformly at equal intervals to obtain a group of uniformly distributed data points of the theoretical design contour line, and the data distribution interval is set equal to the interval of the three-dimensional contour line measurement data to establish a corresponding relationship between the two groups of contour line data, which are the three-dimensional contour line measurement data and the obtained uniformly distributed data of the theoretical design contour line.
[0037] The three-dimensional theoretical design contour line is composed of multiple line segments. According to the curvature change characteristics, the line segments are divided into straight line segments, arc segments and variable curvature line segments. For line segments with different curvature characteristics, different interpolation methods are proposed for uniform discretization processing to obtain a set of data points uniformly distributed along the theoretical design contour line with equal length.
[0038] a. Linear interpolation
[0039] For straight line segments. Constructs multiple data points that are equally spaced along the line between the two endpoints of the line segment. The number of data points constructed is equal to the straight line distance between the two endpoints divided by the sampling interval minus 1.
[0040] Suppose the two endpoints of the straight line segment are P i , P i+1 , the sampling interval is S, then the Mth interpolation point P M The coordinates (x', y', z') satisfy equation (1), where M≥1.
[0041]
[0042] In the formula, (x i ,y i , z i )、(x i+1 ,y i+1 , z i+1 )d(*, *) represents the straight-line distance between the two points in the brackets.
[0043] b. Equal arc length interpolation
[0044] For arc segments. Fit a circle through the two endpoints of the arc segment and any point in the middle of the arc to obtain the radius and center coordinates of the arc segment; convert the sampling interval S into the sampling center angle, expressed as Δθ. Starting from the starting endpoint of the arc segment, the sampling center angle Δθ is increased by multiples to determine the position of the interpolation point. The specific calculation method is as follows:
[0045] First, a local coordinate system is constructed through the two endpoints of the arc segment and any point in the middle of the arc, so that the arc segment is located in the XOY plane of the local coordinate system; in the local coordinate system, the radius r and the center coordinates (a, b) of the arc segment are obtained by three-point fitting, and the sampling center angle Δθ satisfies equation (2). At the same time, the center angle of the arc segment is obtained through the two endpoints, expressed as α, and the number of constructed data points is equal to the result of α divided by Δθ minus 1, expressed as w.
[0046] Δθ=S / r (2)
[0047] Starting from the starting end point of the arc segment, the central angle Δθ is gradually increased to construct a new point. Then the coordinates (x', y') of the Qth new point in the local coordinate system satisfy equation (3), where 1≤Q≤w.
[0048]
[0049] In the formula, θ is the angle between the line connecting the starting end point of the arc segment and the center of the arc segment and the X-axis of the local coordinate system, which can be obtained by formula (4):
[0050]
[0051] Where x1 represents the X-axis coordinate of the starting endpoint of the arc segment in the local coordinate system.
[0052] c. Equi-Euclidean distance interpolation
[0053] For variable curvature line segments. First, the variable curvature line segment is discretized into a set of non-uniformly distributed data points by controlling the chord height, represented as a point set G. Then, interpolation judgment and new point solution are performed based on the Euclidean distance between adjacent data points in the point set G, which is called the equal Euclidean distance interpolation method. The specific calculation process of interpolation judgment and new point solution is as follows:
[0054] The first point P1 in the point set G is used as the first point of the uniformly distributed point set G', denoted as P1'; the Euclidean distance between P1' and the point P2 in the point set G is calculated, denoted as D(1,2), P1' is called the starting point of the Euclidean distance, and P2 is called the ending point of the Euclidean distance. According to the relationship between D(1,2) and the sampling interval S, it is determined whether a new point needs to be added between the two points:
[0055] Case 1: When D(1, 2) is greater than the sampling interval S, point P1' and point P2 are regarded as the two endpoints of the straight line segment, and new points are constructed by the above-mentioned "linear interpolation" method, and are saved in the uniformly distributed point set G' in sequence, where the data at the end is used as the starting point of the Euclidean distance, and the next point P3 in the point set G is used as the end point of the Euclidean distance, and the next interpolation judgment and new point solution are performed;
[0056] Case 2: When D(1, 2) is less than the sampling interval S, there is no need to construct a new point between point P1' and point P2. Then, P1' is still used as the starting point of the Euclidean distance, and the next point P3 in the point set G is used as the ending point of the Euclidean distance to perform the next interpolation judgment and new point solution.
[0057] Repeat the above operation until all data in the non-uniformly distributed point set G participate in interpolation judgment or new point solution.
[0058] In the above-mentioned uniform discretization step of the theoretical design contour line, based on the premise that the three-dimensional contour line measurement data is uniformly distributed along the contour line with equal length, three methods of linear interpolation, equal arc length interpolation and equal Euclidean distance interpolation are proposed to obtain a set of data points uniformly distributed along the theoretical design contour line with equal length.
[0059] (2) Step S2: Normal correspondence construction step
[0060] In this step, the normals of the two sets of contour line data are calculated, and all normal correspondences of the two sets of contour line data are established by point-by-point movement.
[0061] Specifically, according to the position distribution of neighborhood data points, quadratic surface fitting and nearest point normal approximation are used to obtain the spatial normal vectors of the three-dimensional contour measurement data points and the uniformly distributed data points of the theoretical design contour. The point-by-point moving traversal method is used to determine the precise normal correspondence between the two groups of contour data points in order to align the spatial postures of the two groups of contour data.
[0062] a. Solution of normal vector in contour data point space
[0063] First, for any point P in the contour data i , and its adjacent H data points, namely P i Point H / 2 before and after the point, perform least square quadratic curve fitting, and obtain the quadratic curve C i , where 1≤i≤N, N represents the number of contour data points, and H>3. Then solve the quadratic curve C i Up and point P i The nearest point, denoted as P i ', with P on the quadratic curve i ' is the normal vector of point P i Normal vector of point P i The space normal vector calculation process is as follows:
[0064] Point P i The best plane fitting is performed on its H neighboring points to obtain the local fitting plane PL i , point P i and its H neighborhood points are projected onto the local fitting plane PL iAbove; construct the local coordinate system W based on the projection point i , so that the projection point is located in the local coordinate system W i On the XOY plane, the general expression ax 2 +by 2 +cx+dy=1, and we get the quadratic curve C i Expression of; Establish the quadratic curve C i Any point on the i The distance expression of the calculation expression is expressed as (x ci ',y ci '), then (x ci ',y ci ') corresponds to the point of the quadratic curve C i Upper distance point P i The nearest point; quadratic curve C i The point on (x ci ',y ci ') normal N i 'Satisfies formula (5).
[0065] N i ′=[n x n y ]=[2·a·x ci ′+c 2·b·y ci ′+d] (5)
[0066] b. Construction of normal correspondence
[0067] Affected by processing accuracy and wear and tear, the number of points of the three-dimensional contour measurement data and the uniformly distributed data on the theoretical design contour line is not necessarily equal. In order to establish a one-to-one correspondence between the normals of the two sets of contour data, it is first necessary to unify the number of points of the two sets of contour data, and then traverse all possible normal correspondences of the two sets of data by moving point by point, and realize the registration of the postures of the two sets of contour data based on the normal deviation and the minimum. The specific calculation process is as follows:
[0068] A group of data equal in number to the contour line data with fewer points is selected from the contour line data with more points, denoted as G0, and the sequence numbers of the selected points satisfy equation (6).
[0069] M1=round(Ratio*X) X={1, 2,...,N} (6)
[0070] In the formula, N represents the number of points in the smaller set of contour data, M1 represents the point number of the selected point in the larger set of contour data, and Ratio is the point number scaling factor. When contour data 1 contains N1 points, contour data 2 contains N2 points, and N1<N2, the scaling factor Ratio is equal to N2 / N1; when N1≥N2, Ratio is equal to N1 / N2, and "round" represents rounding operation.
[0071] Move point by point to construct 2N normal correspondences between two sets of data. The process is as follows:
[0072] Step 1: For the selected contour data G and the "contour data with more points" G0, the normals of the data points with the same sequence number are taken as a group of corresponding normals, and the first normal correspondence relationship between the two groups of data is established;
[0073] Step 2: Move the contour data G by one point. After the movement, the first point of data G becomes the last point of the new contour data, the second point of data G becomes the first point of the new contour data, and the order of data G from the third point to the last point is increased by 1. The normals of the data points with the same sequence number in the new contour data and contour data G0 are taken as a set of corresponding normals. After moving N-1 points point by point, the corresponding relationship between the second to Nth normals of the two sets of data is established.
[0074] Step 3: Considering that the correct normal correspondence between the two sets of contour data may be in reverse order, the data points in the contour data G are arranged in reverse order to obtain data G'. Perform "step 1" and "step 2" operations on data G' to establish N new normal correspondences.
[0075] (3) Step S3: Initial registration step
[0076] In this step, the sum of normal deviations between the two sets of contour data under each normal correspondence is calculated, and the goal is to minimize the sum of normal deviations to achieve accurate alignment of the spatial postures of the two sets of contour data. The initial alignment of the spatial positions of the two sets of contour data is achieved by translating the center point of the three-dimensional contour measurement data to the center point of the uniformly distributed data of the theoretical design contour.
[0077] The initial registration includes the precise registration of the spatial attitude of the two sets of contour data and the initial registration of the spatial position. The precise registration of the spatial attitude is realized according to the normal correspondence, and the initial registration of the position is realized by coinciding the center points of the two sets of data. The specific calculation process is as follows:
[0078] For the 2N normal correspondences obtained by point-by-point movement, the corresponding rotation matrix is calculated, denoted as R(i), where 1≤i≤2N, and the normal deviation sum of each correspondence is calculated according to formula (7), denoted as E(i).
[0079]
[0080] Where V j Represents the normal vector of the jth point in the data G0, V i,j ' represents the normal vector of the jth point of the moving contour data in the ith normal correspondence, and R(i) represents the rotation matrix corresponding to the ith normal correspondence between the two sets of contour data.
[0081] The spatial postures of the two sets of contour data are aligned by the rotation matrix corresponding to the minimum value of E(i), denoted as R. Then, the two sets of contour data are translated as a whole so that their center points coincide. The translation vector T1 satisfies equation (8).
[0082] T1=B c -R.A c (8)
[0083] Where Bc represents the center of the uniformly distributed data of the theoretical design contour line, and Ac represents the center of the three-dimensional contour line measurement data.
[0084] Since the points of the two sets of contour line data do not strictly correspond, their spatial positions can only be initially aligned by overlapping the centers of the two sets of contour line data.
[0085] The above initial registration step includes the precise registration of the spatial attitude of the two sets of contour data and the initial registration of the spatial position. The precise registration of the spatial attitude of the two sets of contour data is achieved by minimizing the sum of the deviations of all corresponding normals between the two sets of contour data; the initial registration of the spatial position of the two sets of contour data is achieved by translating the center point of the three-dimensional contour measurement data to the center point of the uniformly distributed data of the theoretical design contour, and the three-dimensional contour measurement data is translated accordingly.
[0086] (4) Step S4: Accurate registration step
[0087] In this step, the corresponding points between the two sets of contour line data are constructed with the minimum Euclidean distance as the constraint condition, and the goal is to minimize the sum of squared distances of all corresponding points to achieve accurate alignment of the spatial positions of the two sets of contour line data.
[0088] Accurate registration refers to the accurate registration of the spatial positions of two sets of contour line data. This process only changes the spatial positions of the two sets of data, but does not change the spatial postures of the two sets of data. The change in spatial position, denoted as T2, is obtained based on the corresponding points established based on the minimum spatial Euclidean distance, satisfying the objective function (9).
[0089]
[0090] Where P i , P i' represents the coordinates of a set of corresponding points between two sets of contour line data before the spatial position changes, d 2 (P i +T2,P i ′) represents the point P after the spatial position changes i With point P i 'The square of the Euclidean distance, N represents the number of corresponding points between two sets of contour line data.
[0091] Repeat the above process of "establishing corresponding points based on the minimum spatial Euclidean distance - solving the translation vector - transforming the spatial position of the two sets of data" for a certain number of times, and use the spatial position when the value of E(T2) is the smallest in a certain number of times as the precise registration position. At this point, the spatial position registration of the closed three-dimensional contour measurement data and the theoretical design contour line is achieved.
[0092] The above precise registration step further improves the registration accuracy of the spatial positions of the two sets of contour line data under the initial registration state. According to the minimum distance constraint, the corresponding points between the two sets of contour line data are constructed; according to the minimum sum of the distance deviations of all corresponding points, the translation vectors of the spatial positions of the two sets of contour line data are solved; after the above process is iterated for a fixed number of times (not less than 3), the minimum sum of the squares of the corresponding point distances is determined as the precise registration result of the spatial positions of the two sets of contour line data.
[0093] The following is a specific example to illustrate the effect of the closed three-dimensional contour line measurement data and theoretical design contour line registration method of the above embodiment of the present invention. Figure 2 As shown in (a), the closed three-dimensional contour line includes straight line segments, arc segments and spline curve segments. First, the theoretical design contour line is uniformly discretized to obtain uniformly distributed data. The spatial postures of the two sets of contour line data points are aligned by the "normal correspondence construction-based normal correspondence constraint spatial posture" method of the present invention, and the spatial positions of the two sets of data are aligned based on "minimum sum of squared Euclidean distances of corresponding points". The process and results of the posture alignment and position alignment of the three-dimensional contour line measurement data and the theoretical design contour line are shown in FIG. Figure 2 as shown in (b).
[0094] In summary, according to the closed three-dimensional contour line measurement data and the theoretical design contour line registration method of the above-mentioned embodiment of the present invention, in order to establish the corresponding relationship between the three-dimensional contour line measurement data and the data points on the theoretical design contour line, the theoretical design contour line is firstly uniformly discretized, and the data distribution interval is set equal to the interval of the three-dimensional contour line measurement data, so as to provide a data basis for establishing accurate corresponding point pairs between the two sets of data. Establishing a correct and effective corresponding relationship between the two sets of contour line data is the key to achieving accurate registration of their spatial posture. For the three-dimensional contour line measurement data and the uniformly distributed data on the theoretical design contour line, the embodiment of the present invention constrains the spatial posture of the two sets of data by the normal direction of the overall contour line data, realizes the registration of the spatial posture of the two sets of data, and then overlaps the center points of the two sets of contour line data to realize the initial registration of the spatial positions of the two sets of contour line data. The minimum distance is used to determine the corresponding points, and the iterative method is used to solve the accurate point correspondence relationship. At this time, the sum of the squares of the distances of the corresponding points is the minimum value in multiple iterations. Therefore, by sequentially implementing the process of spatial posture registration - initial position registration - precise position registration of two sets of contour line data, it is possible to effectively avoid the situation where the relative posture of the two sets of contour line data falls into the local optimum during the registration process, thereby ensuring that the correct registration result is obtained.
[0095] The closed three-dimensional contour line measurement data and theoretical design contour line registration method of the above embodiment of the present invention has the following beneficial effects:
[0096] By constructing and constraining the normal deviation of the three-dimensional contour line measurement data relative to the uniformly distributed data of the theoretical design contour line, the optimal registration of the spatial posture of the two sets of data is achieved, providing an accurate data basis for the construction of corresponding point pairs in the precise registration process, avoiding the local optimum of the registration result, and ensuring the correctness and reliability of the registration result. The registration method of the present invention does not require the contour line to have characteristic points, characteristic directions and other conditions, and is suitable for the registration of two-dimensional and three-dimensional contour lines of different shapes. It can be used for the evaluation of the deviation of the mold line template contour line, the automatic assembly guidance of large-sized rigid parts, and the registration of surface contour measurement data with theoretical design digital models.
[0097] The embodiment of the present invention further provides a closed three-dimensional contour line measurement data and a theoretical design contour line registration device. Figure 3 1 is a diagram showing the structure of a closed three-dimensional contour line measurement data and theoretical design contour line registration device according to an embodiment of the present invention. Figure 3 As shown, the closed three-dimensional contour line measurement data and theoretical design contour line registration device of this embodiment includes:
[0098] Theoretical design contour line uniform discretization module 101: Performing uniform discretization processing on the theoretical design contour line at equal intervals to obtain a group of uniformly distributed data points of the theoretical design contour line, and setting the data distribution interval to be equal to the interval of the three-dimensional contour line measurement data, and establishing a corresponding relationship between two groups of contour line data, wherein the two groups of contour line data are the three-dimensional contour line measurement data and the obtained uniformly distributed data of the theoretical design contour line;
[0099] Normal correspondence building module 102: calculates the normals of two sets of contour line data, and establishes all normal correspondences of the two sets of contour line data;
[0100] Initial registration module 103: Calculate the normal deviation sum between the two sets of contour data under each normal correspondence relationship, and achieve accurate registration of the spatial postures of the two sets of contour data with the goal of minimizing the normal deviation sum. Initial registration of the spatial positions of the two sets of contour data is achieved by translating the center point of the three-dimensional contour measurement data to the center point of the uniformly distributed data of the theoretical design contour.
[0101] Precise registration module 104: Constructs corresponding points between two sets of contour line data with the minimum Euclidean distance as the constraint condition, and takes the minimum sum of the squares of all corresponding points as the goal to achieve precise registration of the spatial positions of the two sets of contour line data.
[0102] The specific embodiments of the closed three-dimensional contour measurement data and theoretical design contour alignment device of this embodiment can refer to the above definition of the closed three-dimensional contour measurement data and theoretical design contour alignment method, which will not be repeated here. Each module in the above-mentioned closed three-dimensional contour measurement data and theoretical design contour alignment device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0103] The 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 4As 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 closed three-dimensional contour line measurement data and the theoretical design contour line registration method of this embodiment are implemented.
[0104] Those skilled in the art will understand that Figure 4 The 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.
[0105] An embodiment of the present invention further provides 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 closed three-dimensional contour line measurement data and theoretical design contour line alignment method of the embodiment of the present invention are implemented.
[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 registering closed three-dimensional contour line measurement data with theoretical design contour lines, characterized in that: include: Theoretical design contour line uniform discretization step: perform uniform discretization processing on the theoretical design contour line at equal intervals to obtain a group of uniformly distributed data points of the theoretical design contour line, and set the data distribution interval to be equal to the interval of the three-dimensional contour line measurement data, and establish a corresponding relationship between the two groups of contour line data, the two groups of contour line data are the three-dimensional contour line measurement data and the obtained uniformly distributed data of the theoretical design contour line; Normal correspondence construction steps: calculate the normals of the two sets of contour line data, and establish all normal correspondences of the two sets of contour line data; Initial registration step: Calculate the normal deviation and the normal deviation between the two sets of contour data under each normal correspondence relationship, and take the minimum normal deviation as the goal to achieve accurate registration of the spatial posture of the two sets of contour data. By translating the center point of the 3D contour measurement data to the center point of the uniformly distributed data of the theoretical design contour, the initial registration of the spatial position of the two sets of contour data is achieved; Accurate registration steps: Construct the corresponding points between the two sets of contour line data with the minimum Euclidean distance as the constraint condition, and minimize the sum of the squares of all corresponding points as the goal to achieve accurate registration of the spatial positions of the two sets of contour line data. In the step of uniform discretization of the theoretical design contour, the theoretical design contour is uniformly discretized at equal intervals as follows: According to the curvature change characteristics, the three-dimensional theoretical design contour line is divided into straight line segments, arc segments and variable curvature segments; linear interpolation is performed on the straight line segments, equal arc length interpolation is performed on the arc segments, and equal Euclidean distance interpolation is performed on the variable curvature segments.
2. The method according to claim 1, characterized in that The three-dimensional contour line measurement data is a group of evenly distributed discrete data points, and the theoretical design contour line is a continuous three-dimensional curve.
3. The method according to claim 1 or 2, characterized in that: The linear interpolation is as follows: constructing a plurality of data points equally spaced along the straight line between two end points of the straight line segment; The equal arc length interpolation is as follows: fitting a circle through the two end points of the arc segment and any point in the middle of the arc to obtain the radius and center coordinates of the arc segment; converting the sampling interval into a sampling center angle, starting from the starting end point of the arc segment, and gradually increasing the sampling center angle to determine the position of the interpolation point; The equal Euclidean distance interpolation is as follows: the variable curvature line segment is discretized into a set of non-uniformly distributed data points by controlling the chord height, and interpolation judgment and new point solution are performed according to the Euclidean distance between adjacent data points.
4. The method according to claim 1 or 2, characterized in that: In the normal correspondence construction step, the normals of the two sets of contour line data are calculated as follows: Perform quadratic curve best fitting on the contour data point and multiple adjacent data points, project the contour data point onto the best fitting curve, and use the normal of the projection point on the fitting curve to represent the normal of the contour data point.
5. The method according to claim 1 or 2, characterized in that: In the precise registration step, the translation vector of the spatial position of the two sets of contour line data is solved according to the minimum sum of the distance deviations of all corresponding points, and the spatial position of the two sets of contour line data is transformed according to the translation vector; after a certain number of iterations, when the sum of the squares of the corresponding point distances is minimized, it is determined that the spatial positions of the two sets of contour line data are precisely registered.
6. A closed three-dimensional contour line measurement data and theoretical design contour line registration device, characterized in that: include: Theoretical design contour line uniform discretization module: perform uniform discretization processing on the theoretical design contour line at equal intervals to obtain a group of uniformly distributed data points of the theoretical design contour line, and set the data distribution interval to be equal to the interval of the three-dimensional contour line measurement data, and establish a corresponding relationship between the two groups of contour line data, the two groups of contour line data are the three-dimensional contour line measurement data and the obtained uniformly distributed data of the theoretical design contour line; Normal correspondence building module: calculates the normals of two sets of contour line data and establishes all normal correspondences between the two sets of contour line data; Initial registration module: Calculate the normal deviation and the normal deviation between the two sets of contour data under each normal correspondence relationship, and take the minimum normal deviation as the goal to achieve accurate registration of the spatial posture of the two sets of contour data. By translating the center point of the 3D contour measurement data to the center point of the uniformly distributed data of the theoretical design contour, the initial registration of the spatial position of the two sets of contour data is achieved; Precise registration module: Construct the corresponding points between two sets of contour line data with the minimum Euclidean distance as the constraint condition, and minimize the sum of the squares of all corresponding points as the goal to achieve precise registration of the spatial positions of the two sets of contour line data. The theoretical design contour line uniform discretization module performs uniform discretization processing on the theoretical design contour line at equal intervals as follows: According to the curvature change characteristics, the three-dimensional theoretical design contour line is divided into straight line segments, arc segments and variable curvature segments; linear interpolation is performed on the straight line segments, equal arc length interpolation is performed on the arc segments, and equal Euclidean distance interpolation is performed on the variable curvature segments.
7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.
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 5 are implemented.
