Triangular mesh point cloud stitching method based on genetic algorithm
By employing a triangular mesh stitching method based on genetic algorithms and utilizing the Delaunay triangulation method to design a fitness function and optimize the stitching path, the problems of low mesh quality and ill-conditioned numerical calculations in existing technologies are solved, thereby improving the geometric optimality and numerical stability of triangular meshes.
Patent Information
- Application Number
- CN202511099417.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-07
- Publication Date
- 2025-11-21
AI Technical Summary
Existing point cloud stitching methods in 3D modeling often result in low mesh quality and ill-conditioned numerical calculations.
A triangular mesh stitching method based on genetic algorithm is adopted. The fitness function is designed using the Delaunay triangulation method, and the stitching path is optimized by genetic algorithm to improve mesh quality and numerical stability.
By optimizing the stitching path, the geometric optimality and numerical stability of the triangular mesh were improved, and the occurrence of low-quality triangles was avoided.
Smart Images

Figure CN120997446A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of image generation technology, specifically relating to 3D modeling for computer graphics, and more particularly to a method for stitching triangular mesh point clouds based on genetic algorithms. Background Technology
[0002] In fields such as 3D modeling and computer vision, point cloud data processing is a critical task. When it is necessary to fuse multiple point cloud datasets, point cloud stitching is an important step.
[0003] Chinese patent publication number "CN106204738B" is titled "A Method for Stitching Network Models." This method processes multiple point cloud datasets into a single layer, generating a single-frame mesh model composed of triangles, and determines the boundaries of all single-frame mesh models as the boundaries to be stitched. It selects any side of the boundary to be stitched from a single-frame mesh model as its base, constructs new triangles on adjacent boundaries, and checks the topological correctness of the surrounding area of the new triangles. However, this method does not use the principle of maximizing the minimum interior angle in Delaunay triangulation as the optimization condition for point cloud stitching, which can easily lead to low mesh quality and ill-conditioned numerical calculations. Summary of the Invention
[0004] To address the problems of low mesh quality and ill-conditioned numerical calculations in existing suturing techniques, this invention provides a triangular mesh suturing method based on a genetic algorithm. The fitness function is designed based on the principle of maximizing the minimum interior angle in the Delaunay triangulation method, and the suturing path is optimized through a genetic algorithm to obtain an optimized suturing method.
[0005] The technical solution of this invention to solve the technical problem is as follows:
[0006] A method for stitching triangular mesh point clouds based on genetic algorithms, comprising the following steps:
[0007] Step 1, Initialize the population: Encode the boundary points. Each genetic algorithm individual represents a stitching method. Randomly generate n individuals to form the initial population P0. Step 2, Design the fitness function: Based on the Delaunay triangulation method, design the fitness function using the average sum of the minimum angles of all triangles. Step 3, Roulette wheel selection operation. Step 4, Single-point crossover operation. Step 5, Mutation operation. Step 6, Iteration: Repeat the iteration until the number of iterations T is reached or the proportion of individuals with fitness reaching the critical value F reaches s. acc Or the fitness change rate e is less than the critical value ∈; the final population P T The individual with the highest fitness, S′, is the final suturing method.
[0008] Beneficial effects of this invention:
[0009] 1. Based on the Delaunay triangulation method, the fitness function of the genetic algorithm is designed with the sum of the smallest interior angles of the triangles in the mesh as the fitness. Mathematically, this ensures the geometric optimality of the mesh, avoids low-quality triangles, and improves numerical stability.
[0010] 2. This invention utilizes the selection, crossover, and mutation operations of genetic algorithms to leverage their global search characteristics. It can search the entire solution space and effectively obtain an optimized stitching method through fitness function evaluation and iterative genetic operations. Attached Figure Description
[0011] Figure 1 This is a flowchart of a triangular mesh point cloud stitching method based on a genetic algorithm according to the present invention.
[0012] Figure 2 A schematic diagram of the initial suturing described in this invention.
[0013] Figure 3 A schematic diagram of the optimized suture as described in this invention.
[0014] Figure 4 A schematic diagram of the initial suturing as described in an embodiment of the present invention.
[0015] Figure 5 A schematic diagram of the optimized suture as described in an embodiment of the present invention. Detailed Implementation
[0016] The present invention will now be described in further detail with reference to the accompanying drawings.
[0017] like Figure 1 As shown, a triangular mesh stitching method based on a genetic algorithm includes the following steps:
[0018] Step 1, initialize the population;
[0019] Given the point clouds C1 and C2 of the mesh to be stitched, and the boundary to be stitched. The number of boundary points is b1; the boundary to be stitched The number of boundary points is b2. The points in the array are numbered, with a numbering range of [1, b1]. The points in the array are numbered, with a range of [1, b2]. A number x is randomly selected from [1, b1], and a number y is randomly selected from [1, b2] to form a genetic algorithm individual S = {(x, y) | x ∈ [1, b1], y ∈ [1, b2]}, where S represents a stitching method. Let the population of generation t be P. t For t∈N, randomly generate n S's to form the initial population.
[0020] Step 2, design the fitness function;
[0021] Based on the Delaunay triangulation method, the fitness function is designed using the average sum of the smallest angles of all triangles as the fitness:
[0022]
[0023] In formula (1): amount is the number of newly generated triangles, θ k1 θ k2 θ k3 Let be the three interior angles of the k-th triangle.
[0024] Maximum fitness f t The rate of change is defined as:
[0025]
[0026] Let the fitness threshold be F, and let s be the proportion of individuals in the current population with fitness reaching F. acc .
[0027] Step 3, roulette wheel selection operation;
[0028] S3.1: The current iteration is t-th. Calculate P according to formula (1). t-1 Each individual fitness The selection process is performed using a roulette wheel selection method. Let:
[0029]
[0030] Generate a random number r between [0, 1], and iterate through P. t-1 Each individual individual The probability of selection is when Select the individual when the value is greater than r.
[0031] S3.2: If n individuals are not selected in one selection, repeat step S3.1 until n individuals are selected from the population P. t-1 Select n individuals S to form the parent set
[0032] Step 4, single-point crossover operation;
[0033] S4.1: At P′ t-1 Two individuals are randomly selected from the data. As the parent generation,
[0034]
[0035] m = min(b1, b2), randomly select an integer q, 1 < q < m, and use the single-point crossover method to generate two intermediate offspring That is
[0036]
[0037] S4.2: Repeat step 4.1 until an intermediate offspring set consisting of n individuals is obtained
[0038]
[0039] Step 5, Mutation operation;
[0040] Let the mutation rate be p m , 0 < p m < 1. Traverse the individuals in P″ t-1 For each individual Generate a random number r between [0, 1]. If r < p m , then perform the mutation operation: randomly generate a new integer pair Select an integer pair randomly from Replace with Otherwise, skip this individual. After one traversal, a new population consisting of the final offspring is obtained
[0041] Step 6, Iteration: Repeat the iteration until the iteration number T is reached or the fitness change rate e is less than the critical value v; the individual S′ with the highest fitness in the final population P T is the final stitching method.
[0042] Let s acc The critical value be δ, let the critical value of e be ∈, and let the maximum iteration number be T. Calculate f according to formula (1) final , calculate e according to formula (2). If s acc < δ and e > ∈, then go to step 3 to perform multiple rounds of genetic operations, and each round is an iteration to generate P t , when s acc ≥ δ or e ≤ ∈ or t = T, stop the iteration. Let t = t final when the iteration stops. In the finally generated population , for Substitute the triangular interior angle values θ of each individual i1 , θ i2 , θ i3 (i = 1, 2, 3... amount) into formula (1) to calculate the fitness Pick
[0043] S′ is the final suturing method.
[0044] Example:
[0045] A triangular mesh stitching method based on a genetic algorithm, comprising the following steps:
[0046] Step 1, initialize the population;
[0047] Given the point clouds C1 and C2 of the mesh to be stitched, and the stitching boundary... The number of boundary points is 370; stitching the boundary There are 439 boundary points. The points in the array are numbered, with a range of (1, 370). The points in the data are numbered, with a range of (0, 439). The genetic algorithm individual S = {(x, y) | x ∈ [1, 370], y ∈ [1, 439]} represents a stitching method. Let the population of generation t be P. t 1000 S's are randomly generated to form the initial population.
[0048] Initial individual The interior angles of the middle triangle are shown in the table below:
[0049]
[0050] Step 2, design the fitness function;
[0051] Based on the Delaunay triangulation method, the fitness function is designed using the average sum of the smallest angles of all triangles as the fitness:
[0052]
[0053] In formula (1): amount is the number of newly generated triangles, θ k1 θ k2 θ k3 Let be the three interior angles of the k-th triangle.
[0054] Maximum fitness f t The rate of change is defined as:
[0055]
[0056] Let the fitness threshold F be 60, and let s be the proportion of individuals in the current population whose fitness reaches this threshold. acc .
[0057] Step 3, Roulette wheel selection operation;
[0058] S3.1: Currently at the t-th iteration, calculate P according to formula (1) t-1 for each individual in Perform the selection operation using the roulette wheel selection method. Let Generate a random number r between [0, 1], and traverse each individual t-1 in P The selection probability of individual is When is greater than r, select this individual i = 1, 2... 1000.
[0059] S3.2: Repeat step S3.1. If 1000 individuals are not selected, continue the selection until 1000 individuals are selected from the population P t-1 to form the parental set S
[0060] Step 4, Single-point crossover operation;
[0061] S4.1: Randomly select two individuals t-1 from P′ as parents,
[0062]
[0063] Randomly select an integer q where 1 < q < 370, and use the single-point crossover method to generate two intermediate offspring That is,
[0064]
[0065] S4.2: Repeat step 4.1 until an intermediate offspring set consisting of n individuals is obtained
[0066]
[0067] Step 5, Mutation operation
[0068] Let the mutation rate be 0.1. Traverse the individuals in P″ t-1 For each individual generate a random number r between [0, 1]. If r < 0.1, perform the mutation operation: Randomly generate an integer pair From Randomly select an integer pair Use to replace Otherwise, skip that individual. After one traversal, a new population consisting of the final offspring is obtained.
[0069] Step 6, iteration;
[0070] Let s acc The critical value is 80%, and the critical value of e is 10. -6 Let the maximum number of iterations be 1000. If s acc <80% and e>10 -6 Then proceed to step 3 for multiple rounds of genetic operations, with each round being an iteration to generate P. t The iteration stops when t = 1000. The final population generated... In China, for Each individual The interior angle value θ of the triangle i1 θ i2 θ i3 Substituting (i = 1, 2, 3...amount) into formula (1), calculate the fitness. Pick
[0071] S′ is the final suturing method.
[0072] The interior angles of part S′ of the triangle are listed in the table below:
[0073]
Claims
1. A triangular mesh stitching method based on genetic algorithm, characterized in that, The method includes the following steps: Step 1, Initialize the population: Encode the boundary points. One genetic algorithm individual represents a stitching method. Randomly generate n individuals to form the initial population P0. Step 2, Design the fitness function; Based on the Delaunay triangulation method, the fitness function is designed using the average of the sum of the smallest angles of all triangles. Step 3, roulette wheel selection operation; Step 4, single-point crossover operation; Step 5, mutation operation; Step 6, Iteration: Repeat the iteration until the number of iterations T is reached or the proportion of individuals with fitness reaching the critical value F reaches s. acc Or the fitness change rate e is less than the critical value ∈; the final population P T The individual with the highest fitness, S′, is the final suturing method.
2. The triangular mesh stitching method based on genetic algorithm according to claim 1, characterized in that, Step 1 specifically involves: Given the point clouds C1 and C2 of the mesh to be stitched, and the boundary to be stitched. The number of boundary points is b1; the boundary to be stitched The number of boundary points is b2; for The points in the array are numbered, with a numbering range of [1, b1]. The points in the array are numbered, with a range of [1, b2]. A number x is randomly selected from [1, b1], and a number y is randomly selected from [1, b2] to form a genetic algorithm individual S = {(x, y) | x ∈ [1, b1], y ∈ [1, b2]}, where S represents a stitching method. Let the population of generation t be P. t For t∈N, randomly generate n S's to form the initial population.
3. The triangular mesh stitching method based on genetic algorithm according to claim 1, characterized in that, The fitness function in step 2 is: Where: amount is the number of newly generated triangles, θ k1 ,θ k2 ,θ k3 These are the three interior angles of the k-th triangle; Maximum fitness f t The rate of change is defined as: Let the fitness threshold be F, and let s be the proportion of individuals in the current population with fitness F. acc .
4. The triangular mesh stitching method based on genetic algorithm according to claim 3, characterized in that, The specific steps of step 3 are as follows: S3.1: The current iteration is t. Calculate P according to formula (1). t-1 Each individual fitness The selection process is carried out using a roulette wheel selection method. set up: Generate a random number r between [0, 1], and iterate through P. t-1 Each individual individual The probability of selection is when Select the individual when the value is greater than r. S3.2: If n individuals are not selected in one selection, repeat step 3.1 until n individuals are selected from the population P. t-1 Select n individuals S to form the parent set 5. The triangular mesh stitching method based on genetic algorithm according to claim 4, characterized in that, The specific steps of step 4 are as follows: S4.1: At P' t-1 Randomly select two individuals as parents, m = min(b1, b2), randomly select an integer q, 1 < q < m, and use the single-point crossover method to generate two intermediate offspring That is S4.2: Repeat step S4.1 until an intermediate offspring set of n individuals is obtained.
6. The triangular mesh stitching method based on a genetic algorithm according to claim 5, characterized in that, The specific steps of step 5 are as follows: Let the rate of variation be p. m 0 <p m <1; Traverse P″ t-1 The individuals in, each individual Generate a random number r between [0, 1]. If r <p m Then perform the mutation operation: randomly generate new integer pairs. from Randomly select pairs of integers use replace Otherwise, skip that individual; after one traversal, a new population consisting of the final offspring is obtained.
7. The triangular mesh stitching method based on genetic algorithm according to claim 3, characterized in that, The specific steps of step 6 are as follows: Let s acc The critical value is δ, let the critical value of e be ∈, and let the maximum number of iterations be T; calculate f according to formula (1). t Calculate e according to formula (2), if s acc If <δ and e>∈, then proceed to step 3 and perform multiple rounds of genetic operations, with each round being an iteration to generate P. t When s is satisfied acc The iteration stops when ≥δ or e≤∈ or t=T, and let t=t when the iteration stops. final In the last population generated In China, for Each individual interior angle values of a triangle θ i1 ,θ i2 ,θ i3 Substituting (i = 1, 2, 3...amount) into formula (1), calculate the fitness. Pick S′ is the final suturing method.
Citation Information
Patent Citations
A stitching method for mesh model
CN106204738B
Method for fusing sensor grid data based on grid clustering
CN102149158A
Improved genetic algorithm-based traveling salesman problem solving method
CN107122843A
Reducer gear box lightweight design method based on topological optimization
CN120354668A