Method and system for constructing local reference system of three-dimensional surface
Through the method of intersecting and stable vector calculation of spherical surfaces and triangular surfaces, a three-dimensional local reference system is constructed, which solves the problem of large errors in the existing method when dealing with three-dimensional point clouds with large resolution differences, severe noise interference and surface defects, and achieves higher stability and robustness.
Patent Information
- Application Number
- CN202411559223.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-04
- Publication Date
- 2025-03-28
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing three-dimensional local reference system construction method uses a large error when dealing with three-dimensional point clouds with large resolution differences, severe noise interference and surface defects, resulting in reduced similarity of feature description vectors and insufficient matching accuracy of key points.
The sphere and the triangle surface are intersected to obtain the precise local surface, calculate the stable vector of each vertex, and determine the Z axis through the average direction, determine the X axis using weighted projection and direction histogram, and finally obtain the Y axis by multiplying the Z and X axis.
The stability and robustness of the three-dimensional local reference frame in large-resolution transformation, noise interference and surface defect clouds are improved, and the similarity of feature description vectors and the accuracy of key point matching is enhanced.
Smart Images

Figure CN119722921A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of three-dimensional data processing and analysis, and in particular to a method and system for constructing a local reference system of a three-dimensional surface. Background Art
[0002] The 3D local reference frame (LRF) is composed of three orthogonal unit vectors and is mainly used for the posture normalization of the 3D local surface to achieve the invariance of the local surface to rigid transformation. According to whether the three coordinate axes are estimated synchronously, the existing methods can be divided into two categories: one is the LRF construction method based on covariance matrix decomposition, and the other is the LRF construction method based on point geometric attribute analysis. The former usually constructs the scatter matrix of the local surface of the key point first, then performs eigenvalue decomposition on the scatter matrix, and finally takes the eigenvector after direction disambiguation as the reference system of the local surface; the latter first uses the normal of the key point as the Z axis of the local surface reference system, and then uses the geometric statistics of each neighborhood point (such as the projection distance to the XY plane, etc.) as the weight of the vector pointing from the key point to the neighborhood point, and then sums the above weighted vectors, takes the projection vector of the summed vector to the XY plane as the X axis, and the Y axis is obtained by the cross product of the Z axis and the X axis.
[0003] In applications such as 3D target pose estimation, robot recognition and grasping, the registration of 3D high-precision model data (model) and actual contour point cloud (scene) is the mainstream implementation method. The model and scene are usually aligned by extracting the 3D local features of the point cloud. The construction of the local reference coordinate system is an important step in the extraction of 3D local features. Its position in the registration process is as follows: Figure 1 shown.
[0004] Due to the different point cloud acquisition methods of the model and the scene, the data quality of the two is quite different, mainly manifested in the significant inconsistency of point cloud resolution, noise interference level and surface incompleteness, which seriously affects the repeatability of the local reference coordinate system. When the existing local reference system construction method processes incomplete 3D point clouds with large resolution differences and strong noise levels, the LRF constructed by the key points with the same name has a large deviation, which greatly reduces the similarity of the feature description vector based on the LRF and seriously inadequate key point matching accuracy. Summary of the invention
[0005] In view of the above-mentioned shortcomings of the prior art, an object of the present invention is to provide a method and system for constructing a local reference system for a three-dimensional surface, which has better robustness against residual point clouds with resolution changes and noise interference.
[0006] To achieve the above-mentioned and other related purposes, the present invention provides a method for constructing a local reference system of a three-dimensional surface, comprising:
[0007] S1, select a local surface of a key point p of the three-dimensional surface, and divide the local surface into an inner circle and an outer ring with radius R1 and radius R2;
[0008] S2, obtaining the stable vector LSA of all vertices of the inner circle and the outer ring;
[0009] S3, taking the average direction of the stable vector LSA of all vertices of the inner circle part as the Z coordinate axis;
[0010] S4, weightedly projecting the stable vectors LSA of all vertices of the outer ring part onto the tangent plane defined by the Z coordinate axis and point p;
[0011] S5, establish a direction histogram, count the direction information of the projection vector, and select the angle with the largest voting value as the direction of the X-coordinate axis;
[0012] S6. Taking the direction of the cross product of the Z coordinate axis and the X coordinate axis as the direction of the Y coordinate axis.
[0013] In one embodiment of the present invention, the local surface of the key point p of the three-dimensional surface is selected in step S1, and the local surface is divided into an inner circle and an outer ring with a radius R1 and a radius R2, including:
[0014] S11. Use the Poisson reconstruction algorithm in the point cloud library to triangulate the point cloud to obtain mesh data;
[0015] S12, using the intrinsic shape signature algorithm to detect the key point set of the input point cloud, with a key point p=(p x ,p y ,p z ) T , use the sphere with radius R1 and radius R2 with point p as the center to intersect with the grid data respectively, and obtain the accurate local surface of radius R1 and radius R2 and
[0016] In one embodiment of the present invention, the intersection of the spheres of radius R1 and radius R2 with the grid data in step S12 includes:
[0017] The intersection results of the spheres with radius R1 and radius R2 with the grid data are obtained by finding the intersection points of each edge of the sphere and the triangle face one by one, as shown in formula (1):
[0018]
[0019] Where R is the radius of the sphere, is an edge of a triangle patch, (m,n,k) T for The unit direction vector is used to execute formula (1) until the edges of all triangular faces are traversed, and the accurate local surface is obtained.
[0020] In one embodiment of the present invention, obtaining the stable vector LSA of all vertices of the inner circle and the outer ring in step S2 includes:
[0021] With q as any point on the local surface except point p, the mesh data is the same as the sphere with q as the center and radius R. L The three-dimensional surface obtained by intersecting the spheres by The density-weighted scatter matrix C(Q) is constructed from the face vertices Q of all triangular facets in .
[0022]
[0023] Among them, m is the vertex number, M is the number of vertices in Q, is the centroid of the vertices in Q,
[0024]
[0025] Among them, w m,1 For vertex q m The normalized density compensation term is calculated as:
[0026]
[0027] Among them, exp(·) is the exponential operation, ED(·,·) is the calculation of Euclidean distance, q mNN Q m The nearest neighbor point of is obtained by the nearest neighbor search algorithm;
[0028] Perform eigenvalue decomposition on C(Q) to obtain the eigenvector e3 corresponding to the minimum eigenvalue. Use formula (5) to redirect the direction of the eigenvector to obtain the stable vector LSA at vertex q. q ,
[0029]
[0030] Calculate the exact local surface as above and Stable vectors for all vertices in and
[0031] In one embodiment of the present invention, the step S3 of taking the average direction of the stable vectors LSA of all vertices of the inner circle as the Z coordinate axis includes:
[0032] The Z axis at point p is defined as The average direction of the stable vectors of all vertices in
[0033]
[0034] Among them, #{·} represents the number of set elements.
[0035] In one embodiment of the present invention, the weighted projection of the stable vectors LSA of all vertices of the outer ring part onto the tangent plane defined by the Z coordinate axis and the point p in step S4 includes:
[0036] Arbitrary The projection on the tangent plane is
[0037]
[0038] Initial X-axis is defined as the projection vector of the unit vector to the tangent plane, that is, formula (8):
[0039]
[0040] calculate With the initial X axis The angle between the two vertex q m The direction interval index of the stable vector falls into, that is, formula (9):
[0041]
[0042] The voting weight w of each stable vector m for
[0043] w m =w m,1 ·w m,2 ·w m,3 (10)
[0044] Among them, w m,1 is the density compensation term, calculated as formula (4), w m,2 is the distance weight term, which gives smaller weights to vertices far away from the key points to weaken the influence of incomplete boundary points. It is defined as formula (11):
[0045]
[0046] Among them, ||·|| is the operation for finding the two-norm distance, w m,3 is the angle weight term, which measures the q m LSA q The size of the projection error, when LSA q The smaller the angle with the Z axis, the greater the direction error of the projection vector on the tangent plane. m,3It is defined as formula (12):
[0047]
[0048] In one embodiment of the present invention, the step S5 of establishing a direction histogram, counting the direction information of the projection vector, and selecting the angle with the largest voting value as the direction of the X-coordinate axis includes:
[0049] Traversal Get the 36-dimensional cumulative voting direction histogram and select the interval with the largest voting value [θ L ,θ R ) corresponds to the central angle θ * As the initial X axis The rotation angle of by The reference axis rotates counterclockwise about θ * , and get the final X-axis
[0050] In one embodiment of the present invention, the step S6 of taking the cross product direction of the Z coordinate axis and the X coordinate axis as the direction of the Y coordinate axis includes:
[0051] According to the orthogonality between the coordinate axes, the Y coordinate axis is defined as the cross product of the Z coordinate axis vector and the X coordinate axis vector, which is formula (13):
[0052]
[0053] in, is the Z coordinate axis, is the X-axis,
[0054] The local reference coordinate system at the key point p is obtained as
[0055] The present invention also provides a local reference system construction system for a three-dimensional surface, comprising:
[0056] A local surface division module, used for selecting a local surface of a key point p of a three-dimensional surface, and dividing the local surface into an inner circle and an outer ring with a radius R1 and a radius R2;
[0057] A stable vector obtaining module, used for obtaining the stable vector LSA of all vertices of the inner circle and the outer ring;
[0058] A Z coordinate axis determination module, used to use the average direction of the stable vector LSA of all vertices of the inner circle part as the Z coordinate axis;
[0059] A projection module, used for weightedly projecting the stable vectors LSA of all vertices of the outer ring part onto the tangent plane defined by the Z coordinate axis and the point p;
[0060] The histogram building module is used to build a directional histogram, count the directional information of the projection vector, and select the angle with the largest voting value as the direction of the X-axis;
[0061] The Y-coordinate axis determination module is used to take the cross product direction of the Z-coordinate axis and the X-coordinate axis as the direction of the Y-coordinate axis.
[0062] The present invention also provides an electronic device, including a processor and a memory, wherein the memory stores program instructions, and the processor executes the program instructions to implement the above-mentioned method for constructing a local reference system of a three-dimensional surface.
[0063] As described above, the method and system for constructing a local reference system of a three-dimensional surface of the present invention have the following beneficial effects:
[0064] (1) The method for constructing a local reference system for a three-dimensional surface of the present invention aims to solve the problem of large LRF errors in point clouds with large resolution differences. First, the local surface is accurately obtained by intersecting a spherical surface with a triangular surface. Second, density compensation is performed on each vertex. The present invention can improve the stability of LRF for large-resolution transformed point cloud data.
[0065] (2) The method for constructing a local reference system of a three-dimensional surface of the present invention targets the influence of noise. First, the stable vector of the local surface is calculated by eigendecomposition, and then the average value is used as the final Z axis. Secondly, when calculating the X-axis direction, the Z-axis direction is determined by histogram voting. The integral operation helps to reduce the influence of noise. The present invention has good robustness to noise.
[0066] (3) The local reference system construction method of the three-dimensional surface of the present invention addresses the problem of large errors in the existing LRF construction method when the surface is incomplete. The Z axis is estimated with a smaller radius, thereby reducing the influence of boundary points. When calculating the X axis, only the angle interval with the largest voting value is taken as the direction of the X axis, which is also robust to surface defects. The present invention specially designs a distance weight term to assign lower weights to vertices far away from the key points to reduce the influence of boundary points. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] Figure 1 The present invention is a flowchart of the local feature-based three-dimensional point cloud registration process in the prior art.
[0068] Figure 2 A workflow diagram of a method for constructing a local reference system for a three-dimensional surface provided in an embodiment of the present application.
[0069] Figure 3 A comparison diagram of the local reference system construction method for a three-dimensional surface provided in an embodiment of the present application.
[0070] Figure 4 A schematic diagram of the distribution of local reference system rotation error angles under different noise levels of the local reference system construction method for a three-dimensional surface provided in an embodiment of the present application.
[0071] Figure 5 A schematic diagram of the distribution of local reference system rotation error angles at different resolutions of the method for constructing a local reference system for a three-dimensional surface provided in an embodiment of the present application. DETAILED DESCRIPTION
[0072] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.
[0073] It should be noted that the illustrations provided in the following embodiments are only used to illustrate the basic concept of the present invention in a schematic manner, and thus the illustrations only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.
[0074] Terms such as first or second can be used to describe various components, but these components are not limited by the above terms. The above terms are used to distinguish one component from another component, for example, without departing from the scope of the concept according to the present disclosure, a first component can be referred to as a second component, and similarly, a second component can be referred to as a first component.
[0075] In addition, "connected / coupled" means that one component is directly electrically coupled to another component or is indirectly electrically coupled through another component. The singular form may include the plural form unless explicitly stated in the sentence. In addition, "include / comprise" or "includes / comprises" used in this specification indicates that one or more components, steps, operations, and elements exist or have been added. The specific structural or functional descriptions of the examples of the implementation of the concepts disclosed in this specification are only illustrated to describe the examples of the implementation of the concepts, and the examples of the implementation of the concepts can be implemented in various forms, but these descriptions are not limited to the examples of the implementation described in this specification.
[0076] According to the concept, various modifications and changes can be applied to the examples of the embodiments, so that the examples of the embodiments will be illustrated in the drawings and described in the specification. However, the examples of the embodiments according to the concept are not limited to the specific embodiments, but include all changes, equivalents or replacements included in the spirit and technical scope of the present disclosure.
[0077] It should be understood that when an element is described as being "coupled" or "connected" to another element, the element may be directly coupled or directly connected to the other element, or may be coupled or connected to the other element through a third element. Conversely, it should be understood that when an element is referred to as being "directly coupled to" or "directly coupled to" another element, no other element is placed between them. Other expressions describing the relationship between components (i.e., "between" and "directly between" or "adjacent to" and "directly adjacent to") need to be interpreted in the same manner.
[0078] The terms used in this specification are only used to describe specific examples of the embodiments and are not intended to limit the present disclosure. If there is no clear opposite meaning in the context, the singular form may include the plural form. In this specification, it should be understood that the term "including" or "having" indicates the presence of the features, quantities, steps, operations, components, parts or combinations thereof described in the specification, but the possibility of the presence or addition of one or more other features, quantities, steps, operations, components, parts or combinations thereof cannot be precluded.
[0079] If there is no contrary definition, all terms (including technical terms or scientific terms) used herein have the same meaning as those generally understood by ordinary technicians in the field. If the terms defined in the commonly used dictionary are not clearly defined in this specification, they should be interpreted as having the same meaning as in the context of the relevant technology, and not interpreted as ideal or overly formal meanings.
[0080] Descriptions of well-known components and processing techniques may be omitted so as not to unnecessarily obscure the embodiments of the disclosure.
[0081] Throughout the specification, the same reference numerals refer to the same elements. Thus, even if a reference numeral is not mentioned or described with reference to one figure, it may be mentioned or described with reference to another figure. Furthermore, even if a reference numeral is not shown in one figure, it may be mentioned or described with reference to another figure.
[0082] In addition, the logic level of the signal may be different or opposite to the described logic level. For example, a signal described as having a logic "high" level may alternatively have a logic "low" level, and a signal described as having a logic "low" level may alternatively have a logic "high" level.
[0083] The following will describe the various embodiments of the present disclosure in detail with reference to the accompanying drawings. However, it will be appreciated by those skilled in the art that in the various embodiments of the present disclosure, many technical details are provided in order to enable the reader to better understand the present disclosure. However, even without these technical details and various changes and modifications based on the following embodiments, the technical solutions claimed in the present disclosure can be implemented.
[0084] See also Figure 2 , Figure 2 The present invention provides a method for constructing a local reference system of a three-dimensional surface, comprising:
[0085] S1. Select a local surface of a key point p of a three-dimensional surface, and divide the local surface into two parts, an inner circle and an outer ring, with radius R1 and radius R2.
[0086] Specifically, the precise local surface at the key point p is divided into two parts: the inner circle (purple) and the outer ring (red) by R1 and R2.
[0087] S2. Obtain the stable vector LSA of all vertices of the inner circle and the outer ring.
[0088] S3. Taking the average direction of the stable vectors LSA of all vertices of the inner circle part as the Z coordinate axis.
[0089] S4. Weightedly project the stable vectors LSA of all vertices of the outer ring part onto the tangent plane defined by the Z coordinate axis and point p.
[0090] S5. Create a direction histogram, count the direction information of the projection vector, and select the angle with the largest voting value as the direction of the X-coordinate axis.
[0091] S6. Taking the direction of the cross product of the Z coordinate axis and the X coordinate axis as the direction of the Y coordinate axis.
[0092] In one embodiment of the present invention, the local surface is first divided into two parts, inner and outer, by radius R1 and radius R2. The Z-axis direction is obtained in the inner circle R1 area, because the probability of containing incomplete boundary points near the key points is lower, which is conducive to improving the stability of the Z-axis. Then, the X-axis and Y-axis directions of the tangent plane are obtained in the outer circle R2 area at the same time. Since the outer circle is far away from the key points, it is conducive to improving the calculation accuracy of the horizontal axis.
[0093] See also Figure 2 , Figure 3 , Figure 3The comparison effect diagram of the local reference system construction method of the three-dimensional surface provided in the embodiment of the present application. Specifically, the local surface of the key point p of the three-dimensional surface is selected in step S1, and the local surface is divided into an inner circle and an outer ring with radius R1 and radius R2. This step describes the resolution-independent local surface extraction process. Given point cloud data, the point cloud (PointCloud) is first triangulated using the Poisson reconstruction algorithm in the point cloud library to obtain mesh data, and then the eigenshape signature algorithm is used to detect the key point set of the input point cloud, and a key point p=(p x ,p y ,p z ) T For example, using the sphere with point p as the center, the sphere with radius R1 and radius R2 to intersect with the grid data, the accurate local surface of the two radii can be obtained. and The intersection results of the sphere and the grid data can be obtained by finding the intersection points of each edge of the sphere and the triangle, see formula (1),
[0094]
[0095] Where R is the radius of the sphere, is an edge of a triangle patch, (m,n,k) T for The unit direction vector is used to execute formula (1) until the edges of all triangles are traversed, and the accurate local surface is obtained. For the specific effect, see the attached Figure 3 , the blue area is the existing method (RoPS), and the green area is the local reference system construction method of the three-dimensional surface of the present invention.
[0096] Specifically, obtaining the stable vector LSA of all vertices of the inner circle and the outer ring in step S2 includes:
[0097] This step describes the calculation process of the stable vector of a single vertex on the local surface. Assume that q is any point on the local surface except p. According to step S1, the mesh data and the sphere with q as the center and radius R are calculated. L The three-dimensional surface obtained by intersecting the spheres by The density-weighted scatter matrix C(Q) is constructed from the face vertices Q of all triangular facets in .
[0098]
[0099] Among them, m is the vertex number, M is the number of vertices in Q, is the centroid of the vertices in Q,
[0100]
[0101] w m,1 For vertex q m The normalized density compensation term is calculated as:
[0102]
[0103] Among them, exp(·) is the exponential operation, ED(·,·) is the calculation of Euclidean distance, q mNN Q m The nearest neighbor point of can be obtained by the nearest neighbor search algorithm, and then the eigenvalue decomposition of C(Q) is performed to obtain the eigenvector e3 corresponding to the minimum eigenvalue. Since the direction of the eigenvector itself is ambiguous, formula (5) is used to redirect it, thereby obtaining the stable vector LSA at vertex q q ,
[0104]
[0105] In the same way, the local surface can be calculated and Stable vectors for all vertices in and
[0106]
[0107] Specifically, the step S3 of taking the average direction of the stable vectors LSA of all vertices of the inner circle as the Z coordinate axis includes:
[0108] This step describes the construction process of the Z axis at the key point p. Step S2 obtains the local surface Stable vectors for all vertices in Then the Z axis at p is defined as The average direction of the stable vectors of all vertices in is:
[0109]
[0110] #{·} is the number of elements in the collection.
[0111] Specifically, the weighted projection of the stable vector LSA of all vertices of the outer ring part onto the tangent plane defined by the Z coordinate axis and the point p in step S4 includes:
[0112] This step describes the construction process of the X axis at the key point p. Step S3 obtains the Z axis of the key point, so it can be determined that the direction passing through point p is The tangent plane.
[0113] In one embodiment of the present invention, in the tangent plane, a circular area with p as the center and a radius of R2 is divided into 36 equally divided sector direction intervals with a step length of 10 degrees, and then The stable vectors of all vertices in (the stable vector set of vertices in the outer ring) are weightedly projected into a 36-equally divided fan-shaped interval, with any For example, its projection on the tangent plane is:
[0114]
[0115] Initial X-axis is defined as the projection vector of the unit vector to the tangent plane, which is:
[0116]
[0117] calculate With the initial X axis The angle between the two vertex q m The direction interval index of the stable vector falling into is:
[0118]
[0119] The voting weight w of each stable vector m for:
[0120] w m =w m,1 ·w m,2 ·w m,3 (10)
[0121] Among them, w m,1 is the density compensation term, which can achieve invariance to resolution changes. The calculation method is shown in formula (4), w m,2 is the distance weight term, which gives smaller weights to vertices far away from the key points to weaken the influence of incomplete boundary points. It is defined as:
[0122]
[0123] Among them, ||·|| represents the operation of finding the two-norm distance, w m,3 is the angle weight term, which measures the q m LSA q The size of the projection error, when LSA q The smaller the angle with the Z axis, the greater the direction error of the projection vector on the tangent plane. Therefore, w m,3 is defined as:
[0124]
[0125] Specifically, the step S5 of establishing a direction histogram, counting the direction information of the projection vector, and selecting the angle with the largest voting value as the direction of the X-coordinate axis includes:
[0126] This step describes the construction process of the directional histogram. Get the 36-dimensional cumulative voting direction histogram and select the interval with the largest voting value [θ L ,θ R ) corresponds to the central angle θ * As the initial X axis The rotation angle of by The reference axis rotates counterclockwise about θ * , you can get the final X-axis
[0127] For details, please refer to Figure 4 , Figure 5 , Figure 4 A schematic diagram of the distribution of local reference system rotation error angles under different noise levels of the local reference system construction method for a three-dimensional surface provided in an embodiment of the present application. Figure 5 A schematic diagram of the distribution of the local reference system rotation error angles at different resolutions of the local reference system construction method for a three-dimensional surface provided in an embodiment of the present application. In step S6, the direction of the cross product of the Z coordinate axis and the X coordinate axis is used as the direction of the Y coordinate axis, including:
[0128] This step describes the construction process of the Y coordinate axis. Step S3 obtains the Z coordinate axis. Steps S4 and S5 get the X coordinate axis According to the orthogonality between the coordinate axes, the Y coordinate axis is defined as the cross product of the Z coordinate axis vector and the X coordinate axis vector, that is:
[0129]
[0130] Finally, the local reference coordinate system at the key point p is obtained as The present invention can effectively improve the accuracy of three-dimensional local feature matching. Figure 4 and Figure 5 , red is the result of a method for constructing a local reference system of a three-dimensional surface according to the present invention. It can be seen that the present invention has better robustness against residual defect clouds caused by resolution changes and noise interference.
[0131] Similar to the principle of the method for constructing a local reference system of a three-dimensional surface of the present invention, the present invention also provides a system for constructing a local reference system of a three-dimensional surface, comprising:
[0132] A local surface division module, used for selecting a local surface of a key point p of a three-dimensional surface, and dividing the local surface into an inner circle and an outer ring with a radius R1 and a radius R2;
[0133] A stable vector obtaining module, used for obtaining the stable vector LSA of all vertices of the inner circle and the outer ring;
[0134] A Z coordinate axis determination module, used to use the average direction of the stable vector LSA of all vertices of the inner circle part as the Z coordinate axis;
[0135] A projection module, used for weightedly projecting the stable vectors LSA of all vertices of the outer ring part onto the tangent plane defined by the Z coordinate axis and the point p;
[0136] The histogram building module is used to build a directional histogram, count the directional information of the projection vector, and select the angle with the largest voting value as the direction of the X-axis;
[0137] The Y-coordinate axis determination module is used to take the cross product direction of the Z-coordinate axis and the X-coordinate axis as the direction of the Y-coordinate axis.
[0138] The present invention also proposes an electronic device, the electronic device includes a processor and a memory, the memory stores program instructions, and the processor runs the program instructions to implement the above-mentioned method for constructing a local reference system of a three-dimensional surface. The processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components; the memory may include a random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory. The memory can also be an internal memory of the random access memory (RAM) type, and the processor and memory can be integrated into one or more independent circuits or hardware, such as: an application-specific integrated circuit (ASIC). It should be noted that the computer program in the above-mentioned memory can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for enabling a computer device (which can be a personal computer, an electronic device, or a network device, etc.) to execute all or part of the steps of the methods of each embodiment of the present invention.
[0139] The present invention also proposes a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the above-mentioned method for constructing a local reference system of a three-dimensional surface. The computer-readable storage medium can be an electronic medium, a magnetic medium, an optical medium, an electromagnetic medium, an infrared medium, or a semiconductor system or a propagation medium. The computer-readable storage medium can also include a semiconductor or solid-state memory, a magnetic tape, a removable computer disk, a random access memory (RAM), a read-only memory (ROM), a hard disk, and an optical disk. The optical disk can include a compact disk-read only memory (CD-ROM), a compact disk-read / write (CD-RW), and a DVD.
[0140] To summarize, the method for constructing a local reference system for a three-dimensional surface of the present invention aims to solve the problem of large LRF deviation of key points with the same name when processing incomplete three-dimensional point clouds with large resolution differences and strong noise levels using existing local reference system construction methods. The present invention comprehensively adopts means such as finding the intersection of triangle surfaces and spheres, obtaining small-scale stable vectors, voting for large-scale stable vectors, density compensation, distance penalty, and angle weight, and has better robustness to incomplete point clouds with resolution changes and noise interference.
[0141] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the art may modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by a person of ordinary skill in the art without departing from the spirit and technical concept disclosed by the present invention shall still be covered by the claims of the present invention.
Claims
1. A method for constructing a local reference system of a three-dimensional surface, characterized in that: include: S1, select a local surface of a key point p of the three-dimensional surface, and divide the local surface into an inner circle and an outer ring with radius R1 and radius R2; S2, obtaining the stable vector LSA of all vertices of the inner circle and the outer ring; S3, taking the average direction of the stable vector LSA of all vertices of the inner circle part as the Z coordinate axis; S4, weightedly projecting the stable vectors LSA of all vertices of the outer ring part onto the tangent plane defined by the Z coordinate axis and point p; S5, establish a direction histogram, count the direction information of the projection vector, and select the angle with the largest voting value as the direction of the X-coordinate axis; S6. Taking the direction of the cross product of the Z coordinate axis and the X coordinate axis as the direction of the Y coordinate axis.
2. A method for constructing a local reference system of a three-dimensional surface according to claim 1, characterized in that: The local surface of the key point p of the three-dimensional surface is selected in step S1, and the local surface is divided into an inner circle and an outer ring with radius R1 and radius R2, including: S11. Use the Poisson reconstruction algorithm in the point cloud library to triangulate the point cloud to obtain mesh data; S12, using the intrinsic shape signature algorithm to detect the key point set of the input point cloud, with a key point p=(p x ,p y ,p z ) T , use the sphere with radius R1 and radius R2 with point p as the center to intersect with the grid data respectively to obtain the accurate local surface of radius R1 and radius R2 and 3. The method for constructing a local reference system of a three-dimensional surface according to claim 2, characterized in that: In step S12, the intersection of the spheres of radius R1 and radius R2 with the grid data respectively includes: The intersection results of the spheres with radius R1 and radius R2 with the grid data are obtained by finding the intersection points of each edge of the sphere and the triangle face one by one, as shown in formula (1): Where R is the radius of the sphere, is an edge of a triangle patch, (m,n,k) T for The unit direction vector is used to execute formula (1) until the edges of all triangular faces are traversed, and the accurate local surface is obtained.
4. The method for constructing a local reference system of a three-dimensional surface according to claim 2, characterized in that: Obtaining the stable vector LSA of all vertices of the inner circle and the outer ring in step S2 includes: With q as any point on the local surface except point p, the mesh data is the same as the sphere with q as the center and radius R. L The three-dimensional surface obtained by intersecting the spheres by The density-weighted scatter matrix C(Q) is constructed from the face vertices Q of all triangular facets in . Among them, m is the vertex number, M is the number of vertices in Q, is the centroid of the vertices in Q, Among them, w m,1 For vertex q m The normalized density compensation term is calculated as: Among them, exp(·) is the exponential operation, ED(·,·) is the calculation of Euclidean distance, q mNN Q m The nearest neighbor point of is obtained by the nearest neighbor search algorithm; Perform eigenvalue decomposition on C(Q) to obtain the eigenvector e3 corresponding to the minimum eigenvalue. Use formula (5) to redirect the direction of the eigenvector to obtain the stable vector LSA at vertex q. q , Calculate the exact local surface as above and Stable vectors for all vertices in and 5. The method for constructing a local reference system of a three-dimensional surface according to claim 4, characterized in that: The step S3 of taking the average direction of the stable vectors LSA of all vertices of the inner circle part as the Z coordinate axis includes: The Z axis at point p is defined as The average direction of the stable vectors of all vertices in Among them, #{·} represents the number of set elements.
6. A method for constructing a local reference system of a three-dimensional surface according to claim 5, characterized in that: The step S4 of weightedly projecting the stable vectors LSA of all vertices of the outer ring part onto the tangent plane defined by the Z coordinate axis and the point p includes: Arbitrary The projection on the tangent plane is Initial X-axis is defined as the projection vector of the unit vector to the tangent plane, that is, formula (8): calculate With the initial X axis The angle between the two vertex q m The direction interval index of the stable vector falls into, that is, formula (9): The voting weight w of each stable vector m for In m =in m,1 ·In m,2 ·In m,3 (10) Among them, w m,1 is the density compensation term, calculated as formula (4), w m,2 is the distance weight term, which gives smaller weights to vertices far away from the key points to weaken the influence of incomplete boundary points. It is defined as formula (11): Among them, ||·|| is the operation for finding the two-norm distance, w m,3 is the angle weight term, which measures the q m LSA q The size of the projection error, when LSA q The smaller the angle with the Z axis, the greater the direction error of the projection vector on the tangent plane. m,3 It is defined as formula (12):
7. A method for constructing a local reference system of a three-dimensional surface according to claim 6, characterized in that: The step S5 of establishing a direction histogram, counting the direction information of the projection vector, and selecting the angle with the largest voting value as the direction of the X-coordinate axis includes: Traversal Get the 36-dimensional cumulative voting direction histogram and select the interval with the largest voting value [θ L ,θ R ) corresponds to the central angle θ * As the initial X axis The rotation angle of by The reference axis rotates counterclockwise about θ * , and get the final X-axis 8. The method for constructing a local reference system of a three-dimensional surface according to claim 7, characterized in that: The step S6 of using the cross product direction of the Z coordinate axis and the X coordinate axis as the direction of the Y coordinate axis includes: According to the orthogonality between the coordinate axes, the Y coordinate axis is defined as the cross product of the Z coordinate axis vector and the X coordinate axis vector, which is formula (13): in, is the Z coordinate axis, is the X-axis, The local reference coordinate system at the key point p is obtained as 9. A local reference system construction system for a three-dimensional surface, characterized in that: include: A local surface division module, used for selecting a local surface of a key point p of a three-dimensional surface, and dividing the local surface into an inner circle and an outer ring with a radius R1 and a radius R2; A stable vector obtaining module, used for obtaining the stable vector LSA of all vertices of the inner circle and the outer ring; A Z coordinate axis determination module, used to use the average direction of the stable vector LSA of all vertices of the inner circle part as the Z coordinate axis; A projection module, used for weightedly projecting the stable vectors LSA of all vertices of the outer ring part onto the tangent plane defined by the Z coordinate axis and the point p; The histogram building module is used to build a directional histogram, count the directional information of the projection vector, and select the angle with the largest voting value as the direction of the X-axis; The Y-coordinate axis determination module is used to take the cross product direction of the Z-coordinate axis and the X-coordinate axis as the direction of the Y-coordinate axis.
10. An electronic device, comprising a processor and a memory, wherein the memory stores program instructions, characterized in that: The processor runs program instructions to implement the method for constructing a local reference system for a three-dimensional surface as described in any one of claims 1 to 8.