Mark point hole filling method, device and equipment
By using triangular meshes and triangular fill vertices combined with Laplacian operator optimization, the problem of poor hole filling effect in 3D scanners was solved, achieving more efficient hole filling that better fits the original mesh.
Patent Information
- Application Number
- CN202511078361.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-01
- Publication Date
- 2025-12-12
AI Technical Summary
In existing technologies, the hole filling effect left by 3D scanners is poor, especially on complex curved surfaces where it is difficult to match with the surrounding geometric features, resulting in poor hole filling effect.
The target holes are filled using triangular meshes and/or triangular fill vertices, and the vertex positions are optimized and adjusted using a Laplacian operator linear system to update the topology of the 3D model and ensure the hole filling effect.
It improves the hole filling effect, making it fit the original mesh data better, reducing complex operations, and improving filling efficiency and quality.
Smart Images

Figure CN121121012A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of digital measurement, in particular to a hole filling method, device and equipment for marker points. BACKGROUND
[0002] Three-dimensional scanners have become an important tool in the field of industrial measurement and three-dimensional modeling due to their portability, flexibility and high precision. Three-dimensional scanners usually use structured light, laser or photogrammetry technology to assist the scanner in positioning and splicing multi-view data by pasting marker points on the surface of the measured object.
[0003] In related technologies, after the three-dimensional scanner completes scanning, the marker points are removed, resulting in holes on the surface of the three-dimensional model generated by scanning. The holes on the surface of the three-dimensional model destroy the integrity and continuity of the surface of the measured object. The current hole filling method often causes the filling area to be mismatched with the surrounding geometric features, especially when filling holes on complex curved surfaces, which further causes poor hole filling effect. SUMMARY
[0004] Therefore, it is necessary to provide a hole filling method, device and equipment for marker points capable of improving the hole filling effect in view of the above technical problems.
[0005] In a first aspect, the present application provides a hole filling method for marker points, comprising:
[0006] obtaining boundary point data of a target hole on a three-dimensional model surface, the target hole being a hole formed by scanning marker points;
[0007] filling the target hole according to the boundary point data of the target hole, and determining a triangular mesh and / or a triangular filling vertex used for filling;
[0008] updating an initial topology of the three-dimensional model according to the triangular mesh and / or the triangular filling vertex to obtain a topology structure of updated mesh data corresponding to the three-dimensional model;
[0009] if the triangular filling vertex is used to fill the target hole, using a Laplacian operator linear system to optimize and adjust the position of the triangular filling vertex in the topology structure of the updated mesh data to obtain mesh data of the three-dimensional model after hole filling.
[0010] In one embodiment, the boundary point data includes a boundary point linked list, and the boundary point linked list includes a plurality of boundary points of the target hole, and the plurality of boundary points are arranged in order or in reverse order in the boundary point linked list.
[0011] In one of the embodiments, the filling the target hole according to the boundary point data of the target hole and determining the triangular mesh and / or the triangular filling vertex used for the filling comprises:
[0012] sequentially extracting three continuous boundary points from the boundary point data of the target hole;
[0013] determining an average side length of a target triangle formed by the three continuous boundary points;
[0014] if the side length of two non-adjacent boundary points among the three boundary points is greater than twice the average side length, filling the target hole using the triangular mesh and the triangular filling vertex;
[0015] determining the triangular filling vertex according to three angles of the target triangle, and determining the triangular mesh according to the triangular filling vertex and the three continuous boundary points.
[0016] In one of the embodiments, the determining the triangular filling vertex according to the three angles of the target triangle comprises:
[0017] if the angle of any one included angle adjacent to the sides corresponding to the two non-adjacent boundary points in the target triangle is less than an angle threshold, determining the midpoint of the sides corresponding to the two non-adjacent boundary points as the triangular filling vertex;
[0018] if the angles of the included angles adjacent to the sides corresponding to the two non-adjacent boundary points in the target triangle are both greater than or equal to the angle threshold, determining the triangular filling vertex according to the midline of the sides corresponding to the two non-adjacent boundary points.
[0019] In one of the embodiments, after the determining the average side length of the target triangle formed by the three continuous boundary points, the method further comprises:
[0020] if the side length of two non-adjacent boundary points among the three boundary points is less than or equal to twice the average side length, filling the target hole using the triangular mesh;
[0021] determining the triangular mesh as a region where the target triangle is located.
[0022] In one of the embodiments, the updating the initial topology of the three-dimensional model according to the triangular mesh and / or the triangular filling vertex to obtain the topology of the updated mesh data corresponding to the three-dimensional model comprises:
[0023] According to a data structure corresponding to the three-dimensional model, the triangular mesh and / or the triangular filling vertex are updated into an initial topology of the three-dimensional model to obtain a topology of updated mesh data corresponding to the three-dimensional model.
[0024] In one of the embodiments, the position of the triangular filling vertex in the topology of the updated mesh data is adjusted by using a Laplace operator linear system optimization.
[0025] From the topology of the updated mesh data, a control point and the triangular filling vertex are selected, and the control point is a boundary point unchanged after updating the topology.
[0026] According to the control point and the triangular filling vertex, the position of the triangular filling vertex is adjusted by using a Laplace operator linear system optimization.
[0027] In one of the embodiments, the method further comprises:
[0028] If the target hole is not filled by using the triangular filling vertex, then mesh data of the three-dimensional model after filling the hole is obtained according to the topology of the updated mesh data.
[0029] In a second aspect, the application provides a hole filling device for marking points, comprising:
[0030] An acquisition module is configured to acquire boundary point data of a target hole on a surface of a three-dimensional model, and the target hole is a hole formed by scanning marking points.
[0031] A filling module is configured to fill the target hole according to the boundary point data of the target hole and determine a triangular mesh and / or a triangular filling vertex used for filling.
[0032] An updating module is configured to update an initial topology of the three-dimensional model according to the triangular mesh and / or the triangular filling vertex to obtain a topology of updated mesh data corresponding to the three-dimensional model.
[0033] An optimization module is configured to, if the target hole is filled by using the triangular filling vertex, adjust the position of the triangular filling vertex in the topology of the updated mesh data by using a Laplace operator linear system optimization to obtain mesh data of the three-dimensional model after filling the hole.
[0034] In one of the embodiments, the boundary point data comprises a boundary point linked list, and the boundary point linked list comprises a plurality of boundary points of the target hole, and the plurality of boundary points are arranged in sequence or in reverse sequence in the boundary point linked list.
[0035] In one embodiment, the filling module is further configured to sequentially extract three consecutive boundary points from the boundary point data of the target hole; determine the average side length of the target triangle formed by the three consecutive boundary points; if the side length of two non-adjacent boundary points among the three boundary points is greater than twice the average side length, then fill the target hole with the triangular mesh and the triangular filling vertex; determine the triangular filling vertex according to the three angles of the target triangle, and determine the triangular mesh according to the triangular filling vertex and the three consecutive boundary points.
[0036] In one embodiment, the filling module is further configured to: if the angle of any included angle between the sides corresponding to two non-adjacent boundary points in the target triangle is less than an angle threshold, then determine the midpoint of the side corresponding to the two non-adjacent boundary points as the triangle filling vertex; if the angle of any included angle between the sides corresponding to two non-adjacent boundary points in the target triangle is greater than or equal to the angle threshold, then determine the triangle filling vertex based on the median of the side corresponding to the two non-adjacent boundary points.
[0037] In one embodiment, the filling module is further configured to fill the target hole with the triangular mesh if the side length of two non-adjacent boundary points among the three boundary points is less than or equal to twice the average side length; and to determine the triangular mesh as the region where the target triangle is located.
[0038] In one embodiment, the update module is further configured to update the triangular mesh and / or the triangular filling vertices to the initial topology of the three-dimensional model according to the data structure corresponding to the three-dimensional model, so as to obtain the updated topology of the mesh data corresponding to the three-dimensional model.
[0039] In one embodiment, the optimization module is further configured to select control points and triangle filling vertices from the topology of the updated grid data, wherein the control points are boundary points that have not changed after the topology is updated; and to optimize and adjust the position of the triangle filling vertices using a Laplace operator linear system based on the control points and the triangle filling vertices.
[0040] In one embodiment, the optimization module is further configured to, if the target hole is not filled using the triangle filling vertices, obtain the mesh data of the three-dimensional model after the hole is filled based on the topology of the updated mesh data.
[0041] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the hole filling method for the marker points described in the first aspect.
[0042] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the hole-filling method for the marker points described in the first aspect.
[0043] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the hole-filling method for the marker points described in the first aspect.
[0044] The aforementioned method, apparatus, and equipment for filling holes at marked points acquire boundary point data of target holes on the surface of a 3D model. The target holes are formed by scanning marked points. The target holes are filled based on the boundary point data, and the triangular mesh and / or triangular filling vertices used for filling are determined. The initial topology of the 3D model is updated based on the triangular mesh and / or triangular filling vertices, resulting in the updated topology of the corresponding mesh data. If triangular filling vertices are used to fill the target holes, the positions of the triangular filling vertices in the updated mesh data's topology are optimized using a Laplacian operator linear system to obtain the mesh data of the 3D model after hole filling. Because triangular meshes and / or triangular filling vertices are used to fill the target holes, no further complex meshing operations are required. Simultaneously, the Laplacian operator is used to smooth the triangular filling vertices, better matching the original mesh data of the 3D model, thus ensuring the effective hole filling of the marked points. Attached Figure Description
[0045] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0046] Figure 1 An application environment diagram of a hole filling method provided in this application embodiment;
[0047] Figure 2 A schematic flowchart illustrating a hole-filling method provided in an embodiment of this application;
[0048] Figure 3 A schematic diagram of a target hole provided in an embodiment of this application;
[0049] Figure 4 A schematic diagram illustrating the generation of a boundary point linked list provided in an embodiment of this application;
[0050] Figure 5A schematic diagram of a triangular mesh region provided in an embodiment of this application;
[0051] Figure 6 A schematic diagram of a triangle filling vertex provided in an embodiment of this application;
[0052] Figure 7 A schematic diagram of another triangle filling vertex provided in an embodiment of this application;
[0053] Figure 8 A schematic flowchart illustrating another method for filling holes in marker points provided in an embodiment of this application;
[0054] Figure 9 A structural block diagram of a hole-filling device for marking points provided in an embodiment of this application;
[0055] Figure 10 This is an internal structural diagram of a computer device provided in an embodiment of this application. Detailed Implementation
[0056] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0057] The relevant technologies will be explained below.
[0058] 3D scanners have become essential tools in industrial measurement and 3D modeling due to their portability, flexibility, and high precision. 3D scanners typically employ technologies such as structured light, laser, or photogrammetry, using markers attached to the surface of the object being measured to assist in positioning and stitching together multi-view data.
[0059] After a 3D scanner completes the scan, it removes the marker points, leaving holes on the surface of the resulting 3D model. These holes disrupt the integrity and continuity of the object's surface.
[0060] In related technologies, simple interpolation methods can be used to fill holes left on the surface of a 3D model. Simple interpolation based on hole edge data is suitable for flat surfaces but difficult to maintain complex curvatures. Alternatively, mathematical surfaces such as non-uniform rational B-splines (NURBS) can be used for fitting, but the computational cost is high and the feature edges are not well preserved. Alternatively, Poisson reconstruction based on global optimization methods can be used, but it is easy to over-smooth local features. Alternatively, the surrounding mesh can be deformed towards the hole region, but this may lead to geometric distortion.
[0061] Therefore, current methods for filling holes often result in a mismatch between the filled area and the surrounding geometric features, especially when filling holes on complex curved surfaces, which makes it even more difficult and leads to poor hole filling results.
[0062] To address the aforementioned technical problems, embodiments of this application provide a method, apparatus, and device for filling holes in marker points. This method uses triangular meshes and / or triangular filling vertices to fill target holes without requiring further complex meshing operations. Simultaneously, the Laplacian operator is used to smooth the triangular filling vertices, better conforming to the original mesh data of the 3D model, thereby ensuring the effective hole-filling of marker points.
[0063] The following describes the application scenarios of the hole filling method for marker points provided in the embodiments of this application.
[0064] The hole-filling method for marker points provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104, or it can be located in the cloud or on another network server.
[0065] Terminal 102 sends the scanned 3D model to server 104, enabling server 104 to fill the holes at the marked points on the surface of the 3D model. Server 104 first acquires the boundary point data of the target holes on the surface of the 3D model; the target holes are formed by the scanned marked points. Next, server 104 fills the target holes according to the boundary point data and determines the triangular mesh and / or triangular filling vertices used for filling. Then, server 104 updates the initial topology of the 3D model based on the triangular mesh and / or triangular filling vertices, obtaining the updated topology of the mesh data corresponding to the 3D model. Finally, if triangular filling vertices are used to fill the target holes, server 104 uses a Laplacian operator linear system to optimize and adjust the positions of the triangular filling vertices in the updated topology of the mesh data to obtain the mesh data of the 3D model after hole filling.
[0066] Among them, terminal 102 may be, but is not limited to, a 3D scanning device, server 104 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.
[0067] It should be noted that the hole filling method for marker points provided in this application embodiment can be applied to fields that require high-precision three-dimensional data acquisition, such as reverse engineering, industrial inspection, cultural relic protection, medical plastic surgery, and virtual reality.
[0068] In one exemplary embodiment, such as Figure 2 As shown, a method for filling holes in marker points is provided, which can be applied to... Figure 1 The following explanation uses the servers in the example, including S201-S204:
[0069] S201. Obtain the boundary point data of the target hole on the surface of the 3D model.
[0070] In this application, after obtaining the three-dimensional model of the target object obtained by the three-dimensional scanner, the boundary point data of the target holes on the surface of the three-dimensional model can be obtained, thereby filling the holes of the marked points.
[0071] The target objects mentioned above can be any items, including industrial parts, industrial molds, works of art, cultural relics, buildings, interior components, etc.
[0072] In some embodiments, the target hole is a hole formed by scanning marker points. For example, after the 3D scanner completes the scan, the marker points are removed, resulting in the target hole left on the surface of the 3D model generated by the scan.
[0073] Figure 3 This is a schematic diagram of a target hole provided in an embodiment of this application, as shown below. Figure 3 As shown, the target hole can include multiple boundary edges, each of which includes two vertices, which are the boundary points. Accordingly, by extracting the boundary points corresponding to all the boundary edges of the target hole, the boundary point data of the target hole is formed.
[0074] In some embodiments, the boundary points of the target hole can be extracted in an orderly manner to form boundary point data of the target hole. Accordingly, the boundary point data includes a boundary point linked list, which includes multiple boundary points of the target hole, and the multiple boundary points are arranged in sequential or reverse order in the boundary point linked list.
[0075] For example, Figure 4 This application provides a schematic diagram of the generation of a boundary point linked list, as shown in the embodiment. Figure 4 As shown, six boundary points (0 to 5) of the target hole are identified and then stored in a linked list in either ascending or descending order. The sorting process forms a grid-like data structure. Since every two boundary edges are connected by the same boundary point, the next boundary edge of a boundary point is found in the grid data structure. The two vertices (boundary points) of this next boundary edge are then determined; the non-common vertices (boundary points) are the next vertices (boundary points), and so on, until the original first vertex (boundary point) is found. The entire ring-shaped boundary is then stored in an orderly manner in the linked list.
[0076] S202. Fill the target hole according to the boundary point data of the target hole, and determine the triangular mesh and / or triangular filling vertices used for filling.
[0077] In this step, after the server obtains the boundary point data of the target hole on the surface of the 3D model, it can fill the target hole according to the boundary point data of the target hole and determine the triangular mesh and / or triangular filling vertices used for filling.
[0078] It should be understood that different filling methods can be used to fill target holes for different types of boundary points in the boundary point data, including filling with only triangular meshes, and filling with both triangular meshes and triangular filling vertices.
[0079] In this embodiment, different filling methods can be determined based on preset judgment conditions, which can be specifically set according to actual conditions. For example, different filling methods can be based on the side length relationship of the target triangle formed by three consecutive boundary points.
[0080] In some embodiments, the server sequentially extracts three consecutive boundary points from the boundary point data of the target hole. The server then determines the average side length of the target triangle formed by the three consecutive boundary points. If the side length of any two non-adjacent boundary points is greater than twice the average side length, the target hole is filled using a triangular mesh and triangular fill vertices. Subsequently, the server determines the triangular fill vertices based on the three angles of the target triangle and determines the triangular mesh based on the triangular fill vertices and the three consecutive boundary points.
[0081] In other embodiments, if the side lengths of two non-adjacent boundary points out of the three boundary points are less than or equal to twice the average side length, then a triangular mesh is used to fill the target hole. The server then determines the triangular mesh as the region containing the target triangle.
[0082] For example, continue to refer to Figure 3 Three consecutive boundary points can be, for example, boundary point 0, boundary point 1, and boundary point 2; or, three consecutive boundary points can be, for example, boundary point 1, boundary point 2, and boundary point 3; or, three consecutive boundary points can be, for example, boundary point 2, boundary point 3, and boundary point 4; or, three consecutive boundary points can be, for example, boundary point 3, boundary point 4, and boundary point 5; or, three consecutive boundary points can be, for example, boundary point 4, boundary point 5, and boundary point 0; or, three consecutive boundary points can be, for example, boundary point 5, boundary point 0, and boundary point 1.
[0083] For example, the side length of the two non-adjacent boundary points can be the length of the line connecting the two non-adjacent boundary points as vertices. For example, the three boundary points can be paired as vertices to obtain three connecting lines, and then the average length of the three connecting lines can be calculated to obtain the average side length of the target triangle.
[0084] Figure 5 This is a schematic diagram of a triangular mesh region provided in an embodiment of this application, such as... Figure 5 As shown, after retrieving three consecutive boundary points P1, P2, and P3 from the boundary point list, a new target triangle can be formed by connecting the head boundary point P1 and the tail boundary point P3. After calculating the average side length of the three boundary points P1 to P2, P2 to P3, and P1 to P3, the side lengths of two non-adjacent boundary points (the side lengths of P1 to P3) can be compared. If the side length of P1 to P3 is less than or equal to twice the average side length, then a triangular mesh is used to fill the target hole. Accordingly, the triangular mesh can be determined as the region where the target triangle is located.
[0085] For example, if the side lengths of P1 to P3 are more than twice the average side length, then the target hole is filled using a triangular mesh and triangular fill vertices. Accordingly, the server can determine the triangular fill vertices based on the three angles of the target triangle, and determine the triangular mesh based on the triangular fill vertices and three consecutive boundary points.
[0086] It should be understood that the embodiments of this application do not impose restrictions on how to determine the triangle filling vertex based on the three angles of the target triangle. In some embodiments, the server can determine whether the included angle between the edges corresponding to two non-adjacent boundary points in the target triangle is less than an angle threshold. If the included angle between any of the edges corresponding to two non-adjacent boundary points in the target triangle is less than the angle threshold, then the midpoint of the edges corresponding to the two non-adjacent boundary points is determined as the triangle filling vertex.
[0087] The aforementioned angle thresholds can be set according to the actual situation. For example, they can be set to 15°, 20°, 25°, 30°, etc.
[0088] For example, Figure 6 This is a schematic diagram of a triangle filling vertex provided in an embodiment of this application, as shown below. Figure 6 As shown, if the angle formed by P1P3P2 or P3P1P2 is less than the threshold, it indicates that the angle formed by P1P3P2 or P3P1P2 is too narrow. In this case, the midline of P1P3 can be doubled, and the end point of the doubled midline can be set as the triangle filling vertex P4.
[0089] For example, after determining the triangle filling vertex P4, the triangles formed by the triangle filling vertex P4 with the boundary points P1 and P2 can be used as triangular meshes. At the same time, the triangular meshes formed by the triangle filling vertex P4 with the boundary points P2 and P3 can also be used as triangular meshes.
[0090] In other embodiments, if the included angles between the sides corresponding to two non-adjacent boundary points in the target triangle are both greater than or equal to an angle threshold, then the triangle filling vertex is determined based on the median of the sides corresponding to the two non-adjacent boundary points.
[0091] For example, Figure 7 This is a schematic diagram of another triangle filling vertex provided in an embodiment of this application, as shown below. Figure 7 As shown, if the angle formed by P1P3P2 or P3P1P2 is greater than or equal to the threshold, it means that the angle formed by P1P3P2 or P3P1P2 is not narrow. In this case, the midpoint P4 of P1P3 can be taken, and P4 is the newly added triangle filling vertex.
[0092] For example, after determining the triangle filling vertex P4, the triangles formed by the triangle filling vertex P4 with the boundary points P1 and P2 can be used as triangular meshes. At the same time, the triangular meshes formed by the triangle filling vertex P4 with the boundary points P2 and P3 can also be used as triangular meshes.
[0093] It should be understood that combining the vertices of the triangles to form a triangular mesh avoids producing poor-quality triangular meshes. At the same time, the resulting triangular meshes are relatively uniform and do not require subsequent refinement or flipping operations.
[0094] S203. Update the initial topology of the 3D model based on the triangular mesh and / or the triangle-filled vertices to obtain the updated topology of the mesh data corresponding to the 3D model.
[0095] In this step, after the server fills the target hole according to the boundary point data of the target hole and determines the triangular mesh and / or triangular filling vertices used for filling, it can update the initial topology of the 3D model according to the triangular mesh and / or triangular filling vertices, and obtain the updated topology of the mesh data corresponding to the 3D model.
[0096] In some embodiments, the server can update the triangular mesh and / or triangular fill vertices to the initial topology of the 3D model according to the data structure corresponding to the 3D model, thereby obtaining the updated topology of the mesh data corresponding to the 3D model.
[0097] For example, the triangular mesh and / or triangle-filled vertices are updated to the initial topology of the 3D model. That is, triangular meshes and / or triangle-filled vertices are added to the initial topology of the 3D model, thereby changing the initial topology and obtaining the updated topology of the mesh data.
[0098] It should be understood that different data structures correspond to different data relationships, and different data relationships can correspond to different directions of topology updates, including using various data relationships such as points and neighboring points, points and neighboring edges, points and neighboring triangles, and edges and adjacent triangles to update the topology.
[0099] S204. If the target hole is filled using triangle filling vertices, the position of the triangle filling vertices in the updated mesh data topology is optimized and adjusted using the Laplacian operator linear system to obtain the mesh data of the 3D model after the hole is filled.
[0100] In this step, after the server obtains the topology of the updated mesh data corresponding to the 3D model, if the target hole is filled by using triangle filling vertices, the position of the triangle filling vertices in the updated mesh data topology is optimized and adjusted using the Laplacian operator linear system to obtain the mesh data of the 3D model after the hole is filled.
[0101] In some embodiments, the server selects control points and triangle-filling vertices from the updated mesh data topology. Subsequently, the server uses a Laplacian linear system to optimize and adjust the positions of the triangle-filling vertices based on the control points and triangle-filling vertices.
[0102] Control points are boundary points that remain unchanged after the topology is updated, and may also include some points near the boundary. The vertices of the triangle filling mentioned above can also be interpolation points.
[0103] It should be understood that the Laplacian operator can be used for tasks such as mesh smoothing, deformation, and reconstruction. Optimizing linear systems constructed using the Laplacian operator can significantly improve computational efficiency and result quality.
[0104] For example, the Laplacian operator described above can be of two orders: first order selects points as weights, and second order selects edges as weights. Its optimization method is shown in the following formula (1):
[0105] (1)
[0106] in, It is a symmetric Laplace matrix. It is a diagonal mass matrix. The displacement vector for filling the vertices of the triangle. The right-hand term derived from the boundary constraints is obtained through control points.
[0107] For example, after determining the displacement vector of the triangle filling vertex using formula (1), the position of the triangle filling vertex, including its coordinates, can be adjusted using the displacement vector of the triangle filling vertex. After replacing the original coordinates of the triangle filling vertex with the adjusted position of the triangle filling vertex, the mesh data of the 3D model after hole filling can be obtained.
[0108] In this application, since the updated mesh data and the mesh data corresponding to the initial topology often cannot be merged, especially at the boundary locations, the positions of the triangle filling vertices in the topology of the updated mesh data are optimized and adjusted using a linear system of the Laplacian operator to achieve a greater degree of fusion between the mesh and the mesh data corresponding to the initial topology.
[0109] In other embodiments, if the target hole is not filled using triangle filling vertices, the server obtains the mesh data of the 3D model after hole filling based on the topology of the updated mesh data. That is, the server does not need to adjust the position of the triangle filling vertices; it directly uses the topology of the updated mesh data to update the mesh data of the 3D model after hole filling.
[0110] In this application, the boundary point data of the target hole is quickly located based on the scanned markers, thereby extracting ordered boundary points and laying a better foundation for subsequent hole filling. During the filling of triangular meshes and / or triangular filling vertices, flexible and simple calculation and judgment conditions are used to generate triangular filling vertices and triangular meshes that more closely resemble the original surface, eliminating the need for more complex mesh operations and significantly improving both efficiency and speed. Using a higher-order Laplacian operator to smooth vertices, the original nearby meshes next to the boundary points can be used as control conditions. Through linear system calculations, smoother vertices can be obtained, while also closely conforming to the original mesh.
[0111] The hole-filling method for marker points provided in this application involves acquiring boundary point data of target holes on the surface of a 3D model. The target holes are formed by scanning marker points. The method fills the target holes based on the boundary point data and determines the triangular mesh and / or triangular filling vertices used for filling. Based on the triangular mesh and / or triangular filling vertices, the initial topology of the 3D model is updated to obtain the updated topology of the corresponding mesh data. If triangular filling vertices are used to fill the target holes, the positions of the triangular filling vertices in the updated mesh data's topology are optimized using a Laplacian operator linear system to obtain the mesh data of the 3D model after hole filling. Because triangular meshes and / or triangular filling vertices are used to fill the target holes, no further complex meshing operations are required. Simultaneously, the Laplacian operator is used to smooth the triangular filling vertices, better matching the original mesh data of the 3D model, thus ensuring the hole-filling effect of the marker points.
[0112] Figure 8 A flowchart illustrating another method for filling holes in marker points provided in this application embodiment is shown below. Figure 8 As shown, the hole filling method for this marker point includes S301-S311:
[0113] S301. Obtain the boundary point data of the target hole on the surface of the 3D model.
[0114] The target hole is the hole formed by the scanning marker points.
[0115] In some embodiments, the boundary point data includes a boundary point linked list, which includes multiple boundary points of the target hole, and the multiple boundary points are arranged in either sequential or reverse order in the boundary point linked list.
[0116] S302. Extract three consecutive boundary points sequentially from the boundary point data of the target hole.
[0117] S303. Determine the average side length of the target triangle formed by three consecutive boundary points.
[0118] S304. Determine whether the side lengths of two non-adjacent boundary points among the three boundary points are greater than twice the average side length.
[0119] If yes, then execute S305; otherwise, execute S307.
[0120] S305. Fill the target hole using a triangular mesh and triangular fill vertices.
[0121] S306. Determine the triangle filling vertices based on the three angles of the target triangle, and determine the triangular mesh based on the triangle filling vertices and three consecutive boundary points.
[0122] In some embodiments, if the angle between any of the included angles of the sides corresponding to two non-adjacent boundary points in the target triangle is less than an angle threshold, then the midpoint of the side corresponding to the two non-adjacent boundary points is determined as the triangle filling vertex; if the angle between the included angles of the sides corresponding to two non-adjacent boundary points in the target triangle is greater than or equal to the angle threshold, then the triangle filling vertex is determined based on the median of the side corresponding to the two non-adjacent boundary points.
[0123] S307. Fill the target holes with triangular mesh.
[0124] S308. Determine the triangular mesh as the region where the target triangle is located.
[0125] S309. Based on the data structure corresponding to the 3D model, update the triangular mesh and / or triangular fill vertices to the initial topology of the 3D model to obtain the updated topology of the mesh data corresponding to the 3D model.
[0126] S310. From the updated grid data topology, select control points and triangle filling vertices. Control points are boundary points that have not changed after the topology is updated.
[0127] S311. Based on the control points and triangle filling vertices, use the Laplacian operator linear system to optimize and adjust the positions of the triangle filling vertices to obtain the mesh data of the 3D model after hole filling.
[0128] The hole-filling method for marker points provided in this application involves acquiring boundary point data of target holes on the surface of a 3D model. The target holes are formed by scanning marker points. The method fills the target holes based on the boundary point data and determines the triangular mesh and / or triangular filling vertices used for filling. Based on the triangular mesh and / or triangular filling vertices, the initial topology of the 3D model is updated to obtain the updated topology of the corresponding mesh data. If triangular filling vertices are used to fill the target holes, the positions of the triangular filling vertices in the updated mesh data's topology are optimized using a Laplacian operator linear system to obtain the mesh data of the 3D model after hole filling. Because triangular meshes and / or triangular filling vertices are used to fill the target holes, no further complex meshing operations are required. Simultaneously, the Laplacian operator is used to smooth the triangular filling vertices, better matching the original mesh data of the 3D model, thus ensuring the hole-filling effect of the marker points.
[0129] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0130] Based on the same inventive concept, this application also provides a hole-filling device for implementing the hole-filling method for marker points described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more hole-filling device embodiments provided below can be found in the limitations of the hole-filling method for marker points described above, and will not be repeated here.
[0131] In one exemplary embodiment, such as Figure 9 As shown, a hole-filling device 400 for marking points is provided, including: an acquisition module 401, a filling module 402, an update module 403, and an optimization module 404, wherein:
[0132] The acquisition module 401 is used to acquire the boundary point data of the target hole on the surface of the three-dimensional model. The target hole is the hole formed by the scan marker points.
[0133] The filling module 402 is used to fill the target hole according to the boundary point data of the target hole, and to determine the triangular mesh and / or triangular filling vertices used for filling.
[0134] The update module 403 is used to update the initial topology of the 3D model based on the triangular mesh and / or triangular fill vertices, so as to obtain the topology of the updated mesh data corresponding to the 3D model.
[0135] The optimization module 404 is used to optimize and adjust the position of the triangle filling vertices in the topology of the updated mesh data using the Laplacian operator linear system if the target hole is filled with triangle filling vertices, so as to obtain the mesh data of the 3D model after the hole is filled.
[0136] In one embodiment, the boundary point data includes a boundary point linked list, which includes multiple boundary points of the target hole, and the multiple boundary points are arranged in either sequential or reverse order in the boundary point linked list.
[0137] In one embodiment, the filling module 402 is further configured to sequentially extract three consecutive boundary points from the boundary point data of the target hole; determine the average side length of the target triangle formed by the three consecutive boundary points; if the side length of two non-adjacent boundary points among the three boundary points is more than twice the average side length, then fill the target hole with a triangular mesh and triangular filling vertices; determine the triangular filling vertices based on the three angles of the target triangle, and determine the triangular mesh based on the triangular filling vertices and the three consecutive boundary points.
[0138] In one embodiment, the filling module 402 is further configured to determine the midpoint of the side corresponding to the two non-adjacent boundary points as the triangle filling vertex if the angle of any included angle between the sides corresponding to the two non-adjacent boundary points in the target triangle is less than the angle threshold; and to determine the triangle filling vertex based on the median of the side corresponding to the two non-adjacent boundary points if the angle of any included angle between the sides corresponding to the two non-adjacent boundary points in the target triangle is greater than or equal to the angle threshold.
[0139] In one embodiment, the filling module is further configured to fill the target hole with a triangular mesh if the side length of two non-adjacent boundary points among the three boundary points is less than or equal to twice the average side length; and to determine the triangular mesh as the area where the target triangle is located.
[0140] In one embodiment, the update module 403 is further configured to update the triangular mesh and / or triangular fill vertices to the initial topology of the three-dimensional model according to the data structure corresponding to the three-dimensional model, so as to obtain the updated topology of the mesh data corresponding to the three-dimensional model.
[0141] In one embodiment, the optimization module 404 is further configured to select control points and triangle filling vertices from the updated topology of the grid data, wherein the control points are boundary points that have not changed after the topology is updated; and to optimize and adjust the positions of the triangle filling vertices using a Laplace operator linear system based on the control points and triangle filling vertices.
[0142] In one embodiment, the optimization module 404 is further configured to obtain the mesh data of the three-dimensional model after the hole is filled, based on the topology of the updated mesh data, if the target hole is not filled using triangle filling vertices.
[0143] Each module in the aforementioned hole-filling device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.
[0144] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 10 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When executed by the processor, the computer program implements a hole-filling method for marker points.
[0145] Those skilled in the art will understand that Figure 10 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0146] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the hole-filling method for the marked points described above.
[0147] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the hole-filling method for the aforementioned marker points.
[0148] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the hole-filling method for the aforementioned marker points.
[0149] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0150] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0151] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0152] The above embodiments are merely illustrative of several implementation methods of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for filling holes in marker points, characterized in that, The method includes: Obtain the boundary point data of the target hole on the surface of the three-dimensional model, wherein the target hole is the hole formed by scanning the marker points; The target hole is filled based on the boundary point data of the target hole, and the triangular mesh and / or triangular filling vertices used for filling are determined. Based on the triangular mesh and / or the triangular filling vertices, update the initial topology of the 3D model to obtain the updated topology of the mesh data corresponding to the 3D model; If the target hole is filled using the triangle filling vertices, the position of the triangle filling vertices in the updated mesh data topology is optimized and adjusted using the Laplacian operator linear system to obtain the mesh data of the 3D model after the hole is filled.
2. The method according to claim 1, characterized in that, The boundary point data includes a boundary point linked list, which contains multiple boundary points of the target hole. The multiple boundary points are arranged in either sequential or reverse order in the boundary point linked list.
3. The method according to claim 1, characterized in that, The step of filling the target hole based on the boundary point data of the target hole, and determining the triangular mesh and / or triangular filling vertices used for filling, includes: From the boundary point data of the target hole, three consecutive boundary points are extracted sequentially; Determine the average side length of the target triangle formed by the three consecutive boundary points; If the side length of two non-adjacent boundary points among the three boundary points is greater than twice the average side length, then the target hole is filled using the triangular mesh and the triangular filling vertices. The triangle filling vertices are determined based on the three angles of the target triangle, and the triangle mesh is determined based on the triangle filling vertices and the three consecutive boundary points.
4. The method according to claim 3, characterized in that, Determining the triangle filling vertices based on the three angles of the target triangle includes: If the angle between any two adjacent edges of the non-adjacent boundary points in the target triangle is less than the angle threshold, then the midpoint of the edges of the non-adjacent boundary points is determined as the triangle filling vertex. If the included angle between the sides corresponding to two non-adjacent boundary points in the target triangle is greater than or equal to the angle threshold, then the triangle filling vertex is determined based on the median of the sides corresponding to the two non-adjacent boundary points.
5. The method according to claim 3, characterized in that, After determining the average side length of the target triangle formed by the three consecutive boundary points, the method further includes: If the side length of two non-adjacent boundary points among the three boundary points is less than or equal to twice the average side length, then the triangular mesh is used to fill the target hole. The triangular mesh is determined to be the region where the target triangle is located.
6. The method according to claim 1, characterized in that, The step of updating the initial topology of the 3D model based on the triangular mesh and / or the triangular fill vertices to obtain the updated topology of the mesh data corresponding to the 3D model includes: Based on the data structure corresponding to the 3D model, the triangular mesh and / or the triangular filling vertices are updated to the initial topology of the 3D model to obtain the updated topology of the mesh data corresponding to the 3D model.
7. The method according to claim 1, characterized in that, The optimization and adjustment of the positions of the triangle filling vertices in the updated mesh data topology using the Laplacian operator linear system includes: From the updated topology of the grid data, control points and triangle filling vertices are selected, where the control points are boundary points that have not changed after the topology is updated; Based on the control points and the triangle filling vertices, the positions of the triangle filling vertices are optimized and adjusted using a linear system of Laplace operators.
8. The method according to claim 1, characterized in that, The method further includes: If the target hole is not filled using the triangle filling vertices, then the mesh data of the 3D model after the hole is filled is obtained based on the topology of the updated mesh data.
9. A hole-filling device for marking points, characterized in that, The device includes: The acquisition module is used to acquire boundary point data of target holes on the surface of a three-dimensional model, wherein the target holes are holes formed by scanning marker points; A filling module is used to fill the target hole according to the boundary point data of the target hole, and to determine the triangular mesh and / or triangular filling vertices used for filling; The update module is used to update the initial topology of the 3D model based on the triangular mesh and / or the triangular fill vertices, so as to obtain the updated topology of the mesh data corresponding to the 3D model. An optimization module is used to optimize and adjust the position of the triangle filling vertices in the topology of the updated mesh data using a Laplacian operator linear system if the target hole is filled with the triangle filling vertices, so as to obtain the mesh data of the three-dimensional model after the hole is filled.
10. 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, it implements the steps of the method according to any one of claims 1 to 8.