A model splicing method, device, equipment and readable medium

By acquiring the boundaries of the 3D model and adjusting the angle relationship, the problem of low automation in 3D model splicing is solved, achieving semi-automation and efficient splicing of models.

CN115272634BActive Publication Date: 2026-04-10ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-22
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

The automation level of the current 3D model stitching process is low, relying heavily on manual adjustment of the model's position and size, which is inefficient.

Method used

By acquiring the boundaries of the models to be stitched, moving the models to form stitching surfaces, and adjusting the angle relationships between the models, the angles and areas of the stitched models are optimized. Semi-automatic stitching is achieved using machine learning.

Benefits of technology

It improves the efficiency and quality of model assembly, reduces the workload of manual adjustments, and achieves semi-automation of the model design process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115272634B_ABST
    Figure CN115272634B_ABST
Patent Text Reader

Abstract

The embodiments of the present specification disclose a model splicing method, device, equipment and readable medium. The scheme can include: obtaining a first model and a second model to be spliced; the first model has at least a first boundary corresponding to a second boundary of the second model; moving the first model and the second model, the distance between the first boundary and the second boundary after moving is less than a certain distance, and the first boundary and the second boundary after moving form a splicing surface; the angle between each predetermined shape pattern adjacent to the first model in the splicing surface and the first boundary is a first angle, and the angle between each predetermined shape pattern adjacent to the second model in the splicing surface and the second boundary is a second angle; adjusting the first model and the second model to obtain a spliced model, and the sum of the first angle and the second angle after adjustment is less than the sum of the first angle and the second angle before adjustment.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, and particularly relates to a model splicing method and device, equipment and a computer readable medium. BACKGROUND

[0002] In recent years, with the high development of electronic devices and rendering technology, applications related to three-dimensional modeling have been developed. Three-dimensional modeling requires splicing and combining different models to obtain different models.

[0003] At present, the automatic degree of three-dimensional model splicing process is relatively low for splicing and combining various basic three-dimensional models. In the prior art, manual splicing of models is required, and a large amount of manual operation is needed to adjust the position and size relationship between the models to be spliced, and the intelligent degree and automatic degree are low.

[0004] Therefore, there is an urgent need for a model splicing method to improve splicing efficiency. SUMMARY

[0005] The embodiments of the present specification provide a model splicing method, device, equipment and computer readable medium to improve the efficiency of splicing models.

[0006] To solve the above technical problems, the embodiments of the present specification are implemented as follows:

[0007] The model splicing method provided by the embodiments of the present specification comprises: obtaining a first model and a second model to be spliced; the first model has at least a first boundary corresponding to a second boundary of the second model;

[0008] moving the first model and the second model, the distance between the first boundary and the second boundary after moving is less than a certain distance, and the first boundary and the second boundary after moving form a splicing surface; the splicing surface contains a plurality of predetermined shape graphics; the angle between each predetermined shape graphic adjacent to the first model in the splicing surface and the first boundary is a first angle, and the angle between each predetermined shape graphic adjacent to the second model in the splicing surface and the second boundary is a second angle;

[0009] adjusting the first model and the second model to obtain a spliced model, and the sum of the first angle and the second angle after adjustment is less than the sum of the first angle and the second angle before adjustment.

[0010] The model splicing device provided by the embodiments of the present specification comprises:

[0011] The obtaining module is configured to obtain a first model and a second model to be spliced; the first model has at least a first boundary corresponding to a second boundary of the second model;

[0012] moving the first model and the second model, a distance between the first boundary and the second boundary after the moving is less than a specific distance, and a splicing surface is formed between the first boundary and the second boundary after the moving; the splicing surface includes a plurality of predetermined shape patterns; an angle between each predetermined shape pattern adjacent to the first model in the splicing surface and the first boundary is a first angle, and an angle between each predetermined shape pattern adjacent to the second model in the splicing surface and the second boundary is a second angle;

[0013] adjusting the first model and the second model to obtain a spliced model, and a sum of the first angle and the second angle after the adjusting is less than a sum of the first angle and the second angle before the adjusting.

[0014] An embodiment of the present specification provides a model splicing device, including:

[0015] at least one processor; and

[0016] a memory in communication connection with the at least one processor; wherein

[0017] the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to:

[0018] obtain a first model and a second model to be spliced; the first model at least has a first boundary corresponding to a second boundary of the second model;

[0019] moving the first model and the second model, a distance between the first boundary and the second boundary after the moving is less than a specific distance, and a splicing surface is formed between the first boundary and the second boundary after the moving; the splicing surface includes a plurality of predetermined shape patterns; an angle between each predetermined shape pattern adjacent to the first model in the splicing surface and the first boundary is a first angle, and an angle between each predetermined shape pattern adjacent to the second model in the splicing surface and the second boundary is a second angle;

[0020] adjusting the first model and the second model to obtain a spliced model, and a sum of the first angle and the second angle after the adjusting is less than a sum of the first angle and the second angle before the adjusting.

[0021] An embodiment of the present specification provides a computer readable medium having computer readable instructions stored thereon, and the computer readable instructions are executable by a processor to implement a model splicing method.

[0022] The embodiment of the present specification can at least achieve the following beneficial effects:

[0023] By moving the first model and the second model, the distance between the first boundary and the second boundary after moving is less than a certain distance, and a splicing surface is formed between the first boundary and the second boundary. According to the included angle between the first model and the second model and the splicing surface, the positional relationship of the first model and the second model is adjusted, so that the sum of the first included angle and the second included angle after adjustment is less than the sum of the first included angle and the second included angle before adjustment. The model splicing method provided by the embodiment of the present specification realizes the semi-automation of the model splicing process through machine learning, thereby further improving the efficiency and quality of model design and saving the working time consumption of the model in the design process. BRIEF DESCRIPTION OF DRAWINGS

[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present specification or the prior art, the drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments described in the present application, and those skilled in the art can also obtain other drawings according to these drawings without creative labor.

[0025] Figure 1 The application scenario of the model splicing method in the embodiment of the present specification is shown in the figure;

[0026] Figure 2 The flowchart of the model splicing method provided by the embodiment of the present specification is shown in the figure;

[0027] Figure 3 The schematic diagram of the splicing surface with a predetermined shape pattern provided by the embodiment of the present specification is shown in the figure;

[0028] Figure 4 The relationship between the predetermined shape pattern of the splicing surface and the model to be spliced provided by the embodiment of the present specification is shown in the figure;

[0029] Figure 5 The flowchart of the model splicing method in an actual application scenario provided by the embodiment of the present specification is shown in the figure;

[0030] Figure 6 The example schematic diagram of the first model and the second model provided by the embodiment of the present specification is shown in the figure;

[0031] Figure 7 The schematic diagram of the first edge and the second edge provided by the embodiment of the present specification is shown in the figure;

[0032] Figure 8 The schematic diagram of the model to be spliced after preliminary alignment provided by the embodiment of the present specification is shown in the figure;

[0033] Figure 9 A schematic diagram of the first model and the second model after movement is provided for an embodiment of the present specification;

[0034] Figure 10 A structural schematic diagram of a model splicing device is provided for an embodiment of the present specification;

[0035] Figure 11 A structural schematic diagram of a model splicing device is provided for an embodiment of the present specification. DETAILED DESCRIPTION

[0036] In order to make the purpose, technical scheme and advantages of one or more embodiments of the present specification clearer, the technical scheme of one or more embodiments of the present specification will be described clearly and completely below in combination with specific embodiments of the present specification and corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present specification, not all the embodiments. Based on the embodiments in the present specification, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of one or more embodiments of the present specification.

[0037] It should be understood that although the terms first, second, third, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other.

[0038] The technical scheme provided by each embodiment of the present specification will be described in detail below in combination with the drawings.

[0039] With the development of electronic devices and rendering technology, three-dimensional modeling is increasingly applied in various augmented reality (AR), virtual reality (VR), three-dimensional electronic games and CG (Computer Graphics, CG) movies. After three-dimensional modeling, model splicing is needed. In existing splicing, manual splicing is often relied on. Although splicing auxiliary tools can play an auxiliary role, they still rely on a large amount of manual adjustment of the size and positional relationship between models, which is relatively low in efficiency.

[0040] In order to solve the defects in the prior art, the present scheme provides the following embodiments:

[0041] Figure 1 An application scenario schematic diagram of a model splicing method is provided for an embodiment of the present specification. As shown in Figure 1As shown, the application scenario can include a to-be-spliced model and a server, wherein the to-be-spliced model can be multiple, for example, 2, 3, or 4, and the to-be-spliced model can be a three-dimensional (3Dimensional, 3D for short) model. The three-dimensional model can be a polygonal representation of an object and can be displayed on a computer or other video device. The three-dimensional model can be generated by a three-dimensional modeling tool or other software. The data of the three-dimensional model can exist in a computer or a computer file in a virtual manner. The server adjusts the spliced model based on the data of the to-be-spliced model, so that the spliced surface of the spliced model is smooth and natural.

[0042] Figure 2 A flowchart of a model splicing method provided by an embodiment of the present specification is shown. From a program perspective, the execution subject of the flowchart can be a program loaded on an application server or an application terminal.

[0043] As shown, Figure 2 The flowchart can include the following steps:

[0044] Step 202: obtaining a first model and a second model to be spliced; the first model has at least a first boundary corresponding to a second boundary of the second model.

[0045] The first model and the second model can be three-dimensional models, and the first model and the second model can be 3D models spliced by triangular or quadrilateral patches. The patch is mainly composed of a plurality of 3D coordinate points connected to each other, and the data of the first model and the second model can be represented in the form of coordinates.

[0046] The data of the first model and the second model can be obtained by user data input operation to obtain the first model and the second model to be spliced. The first model has edge points, and the edge edges can be obtained by sequentially connecting adjacent edge points. The first boundary is constituted by the first graph where the edge edges of the first model are located, and the second boundary is constituted by the second graph where the edge edges of the second model are located.

[0047] Step 204: moving the first model and the second model, the distance between the first boundary and the second boundary after moving is less than a certain distance, and the first boundary and the second boundary after moving form a spliced surface; the spliced surface contains a plurality of predetermined shape graphs; the angle between each predetermined shape graph adjacent to the first model in the spliced surface and the first boundary is a first angle, and the angle between each predetermined shape graph adjacent to the second model in the spliced surface and the second boundary is a second angle.

[0048] In actual application, a target function including the distance sum of the edge points of the first model to the second boundary can be constructed, and the optimal moving parameters can be obtained by taking the extreme value of the target function.

[0049] In practical applications, the splicing surface can be divided to obtain a plurality of predetermined shape patterns. For example, a triangle. Figure 3 The schematic diagram of the splicing surface with predetermined shape patterns provided by the embodiment of the present disclosure is shown in FIG. 3. As shown in FIG. 3, the splicing surface 30 contains a plurality of triangles, the first model 10 has a first boundary edge 101, the second model has a second boundary edge 201, the splicing surface 30 forms a first included angle with the plurality of triangles of the first model 10, and the first included angle is a plurality of angles; the splicing surface 30 forms a second included angle with the plurality of triangles of the second model 20, and the second included angle is also a plurality of angles. Figure 3

[0050] Step 206: adjusting the first model and the second model to obtain a spliced model, and the sum of the first included angle and the second included angle after the adjustment is less than the sum of the first included angle and the second included angle before the adjustment.

[0051] Figure 2 The method in the embodiment of the present disclosure can first move the first model and the second model to form a splicing surface between the first model and the second model, and then adjust the included angles between the splicing surface and the first model and the second model, so that the sum of the first included angle and the second included angle after the adjustment is less than the sum of the first included angle and the second included angle before the adjustment. Since the included angles between the splicing surface and the first model and the second model are reduced, the splicing surface of the spliced model can be smooth and natural.

[0052] Based on the method in the embodiment of the present disclosure, the embodiment of the present disclosure further provides some specific implementations of the method, which are described below. Figure 2 Optionally, the adjusting the first model and the second model to obtain a spliced model can specifically include: determining a first pattern in the splicing surface that shares a side with the first boundary; determining the first included angle according to the included angle between the predetermined shape pattern in the splicing surface and the first pattern; determining a second pattern in the splicing surface that shares a side with the second boundary; determining the second included angle according to the included angle between the predetermined shape pattern in the splicing surface and the second pattern; and adjusting the first model and the second model according to the first included angle and the second included angle.

[0053]

[0054] ​​In practical applications, 3D model edge detection algorithms can be used to determine the edge points of the first model. This can be achieved by traversing the edges of the first shape in the first model and determining whether an edge of the first shape is an edge. If an edge of the first shape is not shared by two triangles, then it is considered the first edge of the first model. After determining the first edge, the two vertices of the first edge can be the edge points of the first model. The process of determining the edge points of the second model is similar to that of the first model and will not be repeated here.

[0055] In practical applications, after step 204, the model splicing method may further include:

[0056] The splicing surface is divided according to a preset shape. For example, the Delaunay triangulation algorithm is used to divide the splicing surface to obtain a splicing surface with a preset triangular shape.

[0057] The first shape can be a triangle or a quadrilateral; the second shape can be a triangle or a quadrilateral.

[0058] Figure 3 This is a schematic diagram of a splicing surface with a predetermined shape, provided as an embodiment of this specification. For example... Figure 3 As shown, a splicing surface 30 is located between the first model 10 and the second model 20. The first model 10 has a first edge 101, and the second model 20 has a second edge 201. When a side of a triangle in the splicing surface 30 is a side of the first edge 101, a first shape sharing a side with the triangle in the splicing surface is determined based on the first edge 101, and a first included angle 102 is determined based on the first shape and the triangle in the splicing surface. When a side of a triangle in the splicing surface 30 is a side of the second edge 201, a second shape sharing a side with the triangle in the splicing surface is determined based on the second edge 201, and a second included angle 202 is determined based on the second shape and the triangle in the splicing surface.

[0059] By using the above method, the position between the splicing surface and the model to be spliced ​​is adjusted, and the positional relationship between the models is manually adjusted into the calculation of the first included angle and the second included angle, which reduces the difficulty of adjusting the model and improves the efficiency of model splicing.

[0060] Optionally, the first model includes at least a first edge point, and the second model includes at least a second edge point. Adjusting the first model and the second model to obtain the stitched model may specifically include:

[0061] Based on the coordinate set of the first edge point and the coordinate set of the second edge point, a first loss function is determined to characterize the sum of the first angle and the second angle; based on the first loss function, a first adjustment coefficient is determined; the first adjustment coefficient includes: a first translation parameter, a first scaling parameter, and a first rotation parameter, wherein the first translation parameter represents the translation distance of the first model relative to the first model; the first scaling parameter is the scaling ratio of the first model, and the first rotation parameter represents the rotation angle of the first model; based on the first adjustment coefficient, the first model and the second model are adjusted.

[0062] The first loss function is used to characterize the sum of the first and second included angles. Assume the first set of edge points in the first model is V. a The set of the second edge points is U. b ,in:

[0063] V a ={v1,v2……v n},U a ={U1,U2……U m}

[0064] n represents the number of first edge points, and m represents the number of second edge points. n and m can be the same or different. Both first and second edge points can be represented in coordinate form, v i =(x i ,y i ,z i ), u j =(x j ,y j ,z j ).

[0065] Figure 4 This is a schematic diagram showing the relationship between the predetermined shape of the splicing surface provided in the embodiments of this specification and the model to be spliced. For example... Figure 4 As shown, the triangle is one of the facets in the splicing surface, and this facet consists of 3 vertices {v j ,v k ,u l} are interconnected, where v j ,v k Let u be the first edge point. l If the second edge point is given, then the normal vector n of this patch is... i It can be represented as:

[0066] n i =(v j -v k )×(u l -v k )

[0067] Suppose the face sheet adjacent to the face sheet has a face sheet f from the first model ax , a face sheet f from the second model by , the normal vectors of the two face sheets are n ax and n by , then the difference angle angle i between the normal vectors of the face sheet and the surrounding face sheet is:

[0068]

[0069] The first adjustment coefficient includes a first translation parameter t1, a first scaling parameter a1 and a first rotation parameter R1. All vertices U b of the second model are adjusted relative to the first adjustment coefficient of the first model, which is the first translation parameter t1, the first scaling parameter a1 and the first rotation parameter R1, and the optimization target of the first loss function is that the direction of the normal vector of the plane perpendicular to the face sheet at the splicing position is as close as possible to the direction of the normal vector of the face sheet adjacent to the face sheet. For any vertex u l in the second model, the adjustment process can be represented as:

[0070] u l ′=R1*(a1×u l )+t1

[0071] Wherein, u l ′ is the second edge point after being adjusted by the first adjustment coefficient.

[0072] The first loss function can be specifically:

[0073]

[0074] Through continuous iteration and adjustment of R1, a1 and t1 in the form of back propagation, the first loss function is reduced, and the optimization of the face sheet at the model connection position is realized, so that the splicing position between the models to be spliced is smoother, and the visual effect is better.

[0075] Optionally, the method further includes: obtaining the area of the splicing face; adjusting the first model and the second model, specifically including: based on the area of the splicing face and the first angle and the second angle, adjusting the first model and the second model to obtain a spliced model; the area of the splicing face is smaller than the area of the splicing face before adjustment, and the sum of the first angle and the second angle after adjustment is smaller than the sum of the first angle and the second angle before adjustment.

[0076] Optionally, the acquiring the area of the splicing surface specifically comprises: determining a second loss function for representing the area of the splicing surface based on the first edge point coordinate set and the second edge point coordinate set; determining a second adjustment coefficient based on the second loss function; the second adjustment coefficient comprises: a second translation parameter, a second scaling parameter and a second rotation parameter, the second translation parameter represents a translation distance of the second model relative to the first model, the second scaling parameter is a scaling ratio of the second model, and the second rotation parameter represents an angle of rotation of the second model; and adjusting the first model and the second model based on the second adjustment coefficient.

[0077] For example, continue to describe, Figure 4 Figure 4 The triangle in the splicing surface is one patch in the splicing surface, and the area s of the patch can be represented as: i

[0078]

[0079] wherein a=‖v j -v k ‖, b=‖v k -u l ‖, c=‖u l -v j ‖, and p=(a+b+c) / 2.

[0080] The second adjustment coefficient comprises: a second translation parameter t2, a second scaling parameter a2 and a second rotation parameter R2. All vertices U b of the second model are adjusted relative to the second adjustment coefficient of the first model, which is the second translation parameter t2, the second scaling parameter a2 and the second rotation parameter R2, and the optimization target of the second loss function is that the direction of the normal vector of the patch at the splicing position is as parallel as possible to the direction of the normal vector of the adjacent patch, and the area of the splicing surface is as small as possible. For any vertex u l in the second model, the adjustment process can be represented as:

[0081] u l ″=R2*(a2×u l )+t2

[0082] wherein u l ″ is the second edge point after the adjustment of the second adjustment coefficient.

[0083] The second loss function can be represented as:

[0084]

[0085] ​​Through the above method, the splicing surface of the to-be-spliced models can be optimized, the splicing surface between the to-be-spliced models is smoother, the area of the splicing position is relatively small, and the visual effect is better.

[0086] Optionally, the first model and the second model are moved, and a distance between the first boundary and the second boundary after the movement is less than a specific distance, and specifically includes:

[0087] Based on the first edge point coordinate set and the second edge point coordinate set, a third adjustment coefficient is determined; the third adjustment coefficient includes a third translation parameter and a third scaling parameter, the third translation parameter represents a translation distance of the third model relative to the second model, and the third scaling parameter is a scaling ratio of the third model.

[0088] After the position of the first model is adjusted based on the third adjustment coefficient, a sum of distances from the first edge point to the second edge point is less than a first preset value.

[0089] The third adjustment coefficient includes a third translation parameter t3 and a third scaling parameter a3, a target function for representing a distance between the first boundary and the second boundary is constructed, and an optimization target of the target function is to make the first boundary and the second boundary as close as possible. The target function can be represented as:

[0090]

[0091] Solving the extreme value of the target function can obtain the third adjustment coefficient of the first model relative to the second model, and after the first model is adjusted by using the third adjustment coefficient, the first stage of movement of the first model and the second model is completed. The main role of the first stage of movement is to move the positions of the two models to a rough alignment degree, and then the subsequent steps of “adjusting the to-be-spliced models by using the first adjustment coefficient or the second adjustment coefficient” are used to perform the second stage of adjustment on the two models. The main role of the second stage of adjustment is to adjust the splicing position of the two models to a relatively smooth state, so as to achieve fine alignment.

[0092] According to the above description, Figure 5 A flowchart of a model splicing method in an actual application scenario is provided in the embodiment of the present specification. The model splicing method in the embodiment of the present specification can be applied to online businesses of a third-party platform, such as 3D modeling, AR effects, face recognition, and the like. In the embodiment, the to-be-spliced models can be a 3D model of a human head.

[0093] Figure 5 The method in the embodiment can include the following steps:

[0094] Step 501: Obtain a first model and a second model to be spliced.

[0095] Step 503: Obtain the first edge point and the second edge point of the first model.

[0096] Step 505: Move the first model and the second model. The distance between the moved first boundary and the second boundary is less than a certain distance, and a splicing surface is formed between the moved first boundary and the second boundary.

[0097] Step 507: Divide the splicing surface to obtain a splicing surface with a predetermined shape.

[0098] Step 509: Determine the first shape in the splicing surface that shares an edge with the first boundary; determine the first included angle based on the included angle between the predetermined shape in the splicing surface and the first shape.

[0099] Step 511: Determine the second shape in the splicing surface that shares an edge with the second boundary; determine the second included angle based on the included angle between the predetermined shape in the splicing surface and the second shape;

[0100] Step 513: Adjust the first model and the second model to obtain the spliced ​​model. The sum of the first angle and the second angle after adjustment is less than the sum of the first angle and the second angle before adjustment.

[0101] Figure 6 The diagram illustrates examples of the first and second models provided in the embodiments of this specification. Figure 6 As shown, the models to be stitched together are the back and front of the head. The first model 10 represents the back of the head, and the second model 20 represents the front of the head. After stitching the first model 10 and the second model 20 together, a complete head model can be obtained.

[0102] Figure 7 This is a schematic diagram of the first and second edge edges provided for embodiments of this specification. Figure 7 As shown, for Figure 6 In the model, by sequentially connecting adjacent first edge points, we can obtain the first edge 101 of the first model; by sequentially connecting adjacent second edge points, we can obtain the second edge 201 of the second model. The first edge 101 and the second edge 201 correspond to each other.

[0103] Before moving the first and second models in step 505, the following may also be included:

[0104] Determine the first normal vector of the first model and the second normal vector of the second model;

[0105] The first normal vector and the second normal vector are adjusted, and the adjusted first normal vector and the adjusted second normal vector are parallel.

[0106] Figure 8 A schematic diagram of the to-be-spliced models after preliminary alignment is provided for an embodiment of the present specification. As shown in Figure 8 After preliminary alignment, the first normal vector and the second normal vector are parallel.

[0107] After preliminary alignment of the to-be-spliced models by the above method, the orientations of the two models are adjusted to be consistent, and subsequently, only one or all of the two models needs to be moved in a direction corresponding to the orientation to complete the preliminary splicing.

[0108] Figure 9 A schematic diagram of the first model and the second model after movement is provided for an embodiment of the present specification. As shown in Figure 9 After movement, the first model and the second model to be spliced complete preliminary splicing, and a complete splicing surface is formed between the first model and the second model.

[0109] Step 507 can specifically segment the splicing surface based on the Delaunay triangulation algorithm, and the predetermined shape pattern is a triangle.

[0110] Based on the same idea, the present specification also provides a device corresponding to the above method. Figure 10 A structural schematic diagram of a model splicing device is provided for an embodiment of the present specification. As shown in Figure 10 The device can include:

[0111] The acquisition module 1001 is configured to acquire a first model and a second model to be spliced; the first model has at least a first boundary corresponding to a second boundary of the second model;

[0112] The movement module 1003 is configured to move the first model and the second model, so that the distance between the first boundary and the second boundary after movement is less than a specific distance, and a splicing surface is formed between the first boundary and the second boundary after movement; the splicing surface contains a plurality of predetermined shape patterns; the angle between each predetermined shape pattern adjacent to the first model in the splicing surface and the first boundary is a first angle, and the angle between each predetermined shape pattern adjacent to the second model in the splicing surface and the second boundary is a second angle;

[0113] The splicing module 1005 is configured to adjust the first model and the second model to obtain a spliced model, and the sum of the first angle and the second angle after adjustment is less than the sum of the first angle and the second angle before adjustment.

[0114] It can be understood that the above-mentioned modules refer to computer programs or program segments for performing one or more specific functions. In addition, the division of the above-mentioned modules does not mean that the actual program code must also be separated.

[0115] Based on the same idea, the embodiments of the present specification also provide a device corresponding to the above method.

[0116] Figure 11 The structural diagram of the model splicing device provided by the embodiments of the present specification is shown in FIG. 11. As shown in FIG. 11, the device 1100 can include: Figure 11

[0117] at least one processor 1110; and

[0118] a memory 1130 in communication connection with the at least one processor; wherein

[0119] the memory 1130 stores instructions 1120 executable by the at least one processor 1110, and the instructions are executed by the at least one processor 1110 to enable the at least one processor 1110 to:

[0120] obtain a first model and a second model to be spliced; the first model has at least a first boundary corresponding to a second boundary of the second model;

[0121] move the first model and the second model, and the distance between the first boundary and the second boundary after moving is less than a specific distance, and the first boundary and the second boundary after moving form a splicing surface; the splicing surface contains a plurality of predetermined shape patterns; the angle between each predetermined shape pattern adjacent to the first model in the splicing surface and the first boundary is a first angle, and the angle between each predetermined shape pattern adjacent to the second model in the splicing surface and the second boundary is a second angle;

[0122] adjust the first model and the second model to obtain a spliced model, and the sum of the first angle and the second angle after adjustment is less than the sum of the first angle and the second angle before adjustment.

[0123] Based on the same idea, the embodiments of the present specification also provide a computer readable medium corresponding to the above method. The computer readable medium stores computer readable instructions, and the computer readable instructions can be executed by a processor to implement the above-mentioned model splicing method.

[0124] ​The above-described embodiments of the application have been described in connection with certain modes of practicing the application. However, those skilled in the art will recognize that the application is not limited to the embodiments disclosed. For example, although the above-described embodiments have been described in the context of a single user, the application can be used in a multi-user environment. Moreover, the application can be used in a variety of other contexts. In addition, the order of the steps in the processes described above are not essential, and thus can be different from that of the described embodiments. Furthermore, the described embodiments can be implemented in software, hardware, or a combination thereof. The software implementation can be in a modular or object-oriented design. The specific

[0125] The various embodiments in the specification are described in progressive manner, and the same or similar parts between the embodiments can be referred to each other.

[0126] The apparatus, device and method provided by the embodiments of the present application are corresponding, therefore, the apparatus and device also have similar beneficial technical effects as the corresponding method. Since the beneficial technical effects of the method have been described in detail above, the beneficial technical effects of the corresponding apparatus and device will not be described here.

[0127] In the 1990s, it was relatively easy to distinguish whether an improvement in a technology was a hardware improvement (e.g., an improvement in the circuit structure of a diode, transistor, switch, etc.) or a software improvement (an improvement in a method flow). However, as technology has evolved, many improvements in method flows today can be considered as direct improvements in hardware circuit structures. Designers almost always obtain the corresponding hardware circuit structures by programming the improved method flows into hardware circuits. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using hardware entity modules. For example, a programmable logic device (PLD) (e.g., a field programmable gate array (FPGA)) is an integrated circuit whose logic function is determined by user programming of the device. A designer programs a digital system "integrated" on a PLD by himself, without having to ask a chip manufacturer to design and manufacture a special integrated circuit chip. Moreover, instead of manually manufacturing integrated circuit chips, this programming is now mostly implemented using "logic compiler" software, which is similar to the software compiler used when developing programs, and the original code before compilation must also be written in a specific programming language, which is called a hardware description language (HDL), and there are many types of HDLs, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc., and the most commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also be aware that it is easy to obtain a hardware circuit that implements a logical method flow by simply logically programming the method flow in one of the above-mentioned hardware description languages and programming it into an integrated circuit.

[0128] The controller can be implemented in any suitable way, for example, the controller can take the form of a microprocessor or processor and a computer readable medium storing computer readable program code, such as software or firmware, executable by the (micro)processor, logic gates, switches, an application specific integrated circuit (ASIC), a programmable logic controller and an embedded microcontroller, examples of which include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicone Labs C8051F320, the memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also know that, in addition to being implemented in pure computer readable program code, the controller can also be implemented to perform the same functions in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers and embedded microcontrollers, etc. by logically programming the method steps. Therefore, such a controller can be considered as a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can even be considered as both a software module implementing a method and a structure within a hardware component.

[0129] The systems, apparatuses, modules or units illustrated by the above embodiments can be specifically implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer can be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0130] For the sake of description, the above apparatuses are described in functional division and are described respectively. Of course, the functions of the units can be implemented in the same or multiple software and / or hardware in the implementation of the present application.

[0131] Those skilled in the art will understand that the embodiments of the present application can be provided as a method, a system or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer usable program code.

[0132] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flowcharts and / or blocks in the flowcharts and / or combination thereof. Figure 1 one or more flowcharts and / or blocks in the flowcharts and / or combination thereof.

[0133] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flowcharts and / or blocks in the flowcharts and / or combination thereof. Figure 1 one or more flowcharts and / or blocks in the flowcharts and / or combination thereof.

[0134] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flowcharts and / or blocks in the flowcharts and / or combination thereof. Figure 1 one or more flowcharts and / or blocks in the flowcharts and / or combination thereof.

[0135] In one typical configuration, the computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0136] The memory can include non-persistent memory and / or volatile memory, such as random access memory (RAM) and / or cache memory, non-volatile memory, such as read-only memory (ROM), EPROM, and / or flash memory. The memory is an example of computer-readable media.

[0137] Computer-readable media includes permanent and non-permanent, movable and non-movable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette, magnetic tape disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to a computing device. According to the definition herein, computer-readable media does not include transitory media such as modulated data signals and carriers.

[0138] It should also be noted that the terms "comprising", "containing", or any other variant thereof are intended to cover non-exclusive inclusion, such that a process, method, article or apparatus that comprises a list of elements does not only include those elements, but can also include other elements not expressly listed or inherent to such process, method, article or apparatus. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, method, article or apparatus that includes the element.

[0139] Those skilled in the art will appreciate that embodiments of the present application can be provided as a method, system or computer program product. Accordingly, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, etc.) containing computer usable program code.

[0140] The present application can be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform particular tasks or implement particular abstract data types. The present application can also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communication network. In a distributed computing environment, program modules can be located in both local and remote computer storage media including memory storage devices.

[0141] The above merely provides an example of the present application, but is not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. within the spirit and principle of the present application should be included in the scope of claims of the present application.

Claims

1. A model splicing method, comprising: obtaining a first model and a second model to be spliced; the first model has at least a first boundary corresponding to a second boundary of the second model; moving the first model and the second model, the distance between the first boundary and the second boundary after moving is less than a certain distance, and the first boundary and the second boundary after moving form a splicing surface; the splicing surface contains a plurality of predetermined shape patterns; the angle between each predetermined shape pattern adjacent to the first model in the splicing surface and the first boundary is a first angle, and the angle between each predetermined shape pattern adjacent to the second model in the splicing surface and the second boundary is a second angle; adjusting the first model and the second model to obtain a spliced model, the sum of the first angle and the second angle after adjustment is less than the sum of the first angle and the second angle before adjustment; the adjusting the first model and the second model specifically comprises: determining a first loss function for representing the sum of the first angle and the second angle; determining a first adjustment coefficient based on the first loss function; determining a second loss function for representing the area of the splicing surface; determining a second adjustment coefficient based on the second loss function; adjusting the first model and the second model based on the first adjustment coefficient and the second adjustment coefficient; the optimization target of the first loss function is that the direction of the normal vector of the plane perpendicular to the splicing surface is as parallel as possible to the direction of the normal vector of the adjacent surface of the surface patch; the optimization target of the second loss function is that the direction of the normal vector of the plane perpendicular to the splicing surface is as parallel as possible to the direction of the normal vector of the adjacent surface of the surface patch. 2.The method of claim 1, the adjusting the first model and the second model to obtain a spliced model specifically comprises: determining a first pattern in the splicing surface whose shape is predetermined and which shares an edge with the first boundary; determining the first angle according to the angle between the predetermined shape pattern in the splicing surface and the first pattern; determining a second pattern in the splicing surface whose shape is predetermined and which shares an edge with the second boundary; determining the second angle according to the angle between the predetermined shape pattern in the splicing surface and the second pattern; adjusting the first model and the second model according to the first angle and the second angle. 3.The method of claim 1, the first model at least includes a first edge point, and the second model at least includes a second edge point, the adjusting the first model and the second model to obtain a spliced model specifically comprises: determining a first loss function for representing the sum of the first angle and the second angle based on the coordinate set of the first edge point and the coordinate set of the second edge point; determining a first adjustment coefficient based on the first loss function; The first adjustment coefficient comprises a first translation parameter, a first scaling parameter and a first rotation parameter, the first translation parameter represents a translation distance of the first model relative to the first model, the first scaling parameter is a scaling ratio of the first model, and the first rotation parameter represents an angle of rotation of the first model. The first model and the second model are adjusted based on the first adjustment coefficient.

4. The method of claim 2, wherein the first graph is a triangle or a quadrilateral, and the second graph is a triangle or a quadrilateral.

5. The method of claim 1, further comprising: obtaining an area of the splicing surface; adjusting the first model and the second model, specifically comprising: adjusting the first model and the second model based on the area of the splicing surface and the first included angle and the second included angle to obtain a spliced model, wherein the area of the splicing surface is smaller than the area of the splicing surface before adjustment, and the sum of the first included angle and the second included angle after adjustment is smaller than the sum of the first included angle and the second included angle before adjustment.

6. The method of claim 5, wherein the obtaining the area of the splicing surface specifically comprises: determining a second loss function for representing the area of the splicing surface based on the first edge point coordinate set and the second edge point coordinate set; determining a second adjustment coefficient based on the second loss function; the second adjustment coefficient comprises a second translation parameter, a second scaling parameter and a second rotation parameter, the second translation parameter represents a translation distance of the second model relative to the second model, the second scaling parameter is a scaling ratio of the second model, and the second rotation parameter represents an angle of rotation of the second model; the first model and the second model are adjusted based on the second adjustment coefficient.

7. The method of claim 1, wherein the moving the first model and the second model, the distance between the first boundary and the second boundary after the moving is smaller than a specific distance, specifically comprising: determining a third adjustment coefficient based on the first edge point coordinate set and the second edge point coordinate set; the third adjustment coefficient comprises a third translation parameter and a third scaling parameter, the third translation parameter represents a translation distance of the third model relative to the second model, and the third scaling parameter is a scaling ratio of the third model; after adjusting the position of the first model based on the third adjustment coefficient, the sum of the distances from the first edge point to the second edge point is smaller than a first preset value.

8. The method of any one of claims 1 to 7, wherein the first model and the second model are 3D models.

9. A model splicing device, comprising: an obtaining module configured to obtain a first model and a second model to be spliced; the first model has at least a first boundary corresponding to a second boundary of the second model; a moving module configured to move the first model and the second model, wherein the distance between the first boundary and the second boundary after the moving is smaller than a specific distance, and the first boundary and the second boundary after the moving form a splicing surface. The splicing surface comprises a plurality of predetermined shape patterns; each predetermined shape pattern adjacent to the first model in the splicing surface has a first included angle with the first boundary, and each predetermined shape pattern adjacent to the second model in the splicing surface has a second included angle with the second boundary; The splicing module is configured to adjust the first model and the second model to obtain a spliced model, and the sum of the first included angle and the second included angle after the adjustment is smaller than the sum of the first included angle and the second included angle before the adjustment; The adjustment of the first model and the second model specifically comprises: determining a first loss function for representing the sum of the first included angle and the second included angle; determining a first adjustment coefficient based on the first loss function; determining a second loss function for representing the area of the splicing surface; determining a second adjustment coefficient based on the second loss function; and adjusting the first model and the second model based on the first adjustment coefficient and the second adjustment coefficient; the optimization target of the first loss function is that the direction of the normal vector of the plane perpendicular to the splicing surface patch is as close as possible to the direction of the normal vector of the adjacent patch of the splicing surface patch; and the optimization target of the second loss function is that the direction of the normal vector of the plane perpendicular to the splicing surface patch is as close as possible to the direction of the normal vector of the adjacent patch of the splicing surface patch.

10. A model splicing device, comprising: at least one processor; and a memory in communication connection with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to: obtain a first model and a second model to be spliced; the first model has at least a first boundary corresponding to a second boundary of the second model; move the first model and the second model, and the distance between the first boundary and the second boundary after the movement is less than a specific distance, and the first boundary and the second boundary after the movement form a splicing surface; the splicing surface comprises a plurality of predetermined shape patterns; each predetermined shape pattern adjacent to the first model in the splicing surface has a first included angle with the first boundary, and each predetermined shape pattern adjacent to the second model in the splicing surface has a second included angle with the second boundary; adjust the first model and the second model to obtain a spliced model, and the sum of the first included angle and the second included angle after the adjustment is smaller than the sum of the first included angle and the second included angle before the adjustment; The adjusting the first model and the second model specifically comprises: determining a first loss function for characterizing a sum of the first included angle and the second included angle; determining a first adjustment coefficient based on the first loss function; determining a second loss function for characterizing an area of the spliced surface; determining a second adjustment coefficient based on the second loss function; and adjusting the first model and the second model based on the first adjustment coefficient and the second adjustment coefficient; an optimization target of the first loss function is that a direction of a normal vector of a plane perpendicular to a surface patch at a splicing position is as close as possible to a same straight line as a direction of a normal vector of an adjacent surface patch of the surface patch; and an optimization target of the second loss function is that the direction of the normal vector of the plane perpendicular to the surface patch at the splicing position is as close as possible to parallel to the direction of the normal vector of the adjacent surface patch of the surface patch. 11.A computer readable medium having stored thereon computer readable instructions executable by a processor to implement the model splicing method of any one of claims 1 to 7.

Citation Information

Patent Citations

  • Video image spliced seam searching method, video image splicing method, and video image splicing device

    CN113793382A

  • Three-dimensional model splicing method and device based on geometry

    CN114399583A