Local curved surface fitting method and device based on RMB spline representation and medium
The local surface fitting method represented by RMB splines solves the problems of topological constraints and linear independence in traditional methods, achieving efficient and high-precision surface reconstruction while reducing the number of control points and computational resource consumption.
Patent Information
- Application Number
- CN202511590873.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-03
- Publication Date
- 2026-02-24
Smart Images

Figure CN121564283A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of three-dimensional geometric modeling, and specifically relates to a method, device and medium for fitting local surfaces based on RMB (Reachable Minimally Supported B-spline) spline representation. Background Technology
[0002] In high-end manufacturing and spatial information fields such as the automotive industry, medical imaging, terrain modeling, and aircraft design, the digital representation of three-dimensional geometric shapes has become a key technology for industry development. Traditional surface representation methods are often limited by problems such as poor geometric fidelity, difficulty in maintaining continuity, and weak ability to control local features. In contrast, parametric spline surfaces, with their excellent smoothness and geometric adaptability, have become the mainstream solution for complex surface modeling.
[0003] B-splines and NURBS (Non-Uniform Rational B-Splines) are commonly used surface representation methods that can flexibly represent complex surfaces through control meshes and vertices, and are therefore widely used for surface reconstruction of point clouds. Conventional methods typically decompose the model into multiple sub-patterns, fit them separately, and then stitch them together to form a whole. However, B-splines and NURBS methods have significant topological limitations in surface modeling: their control meshes must be regular rectangular structures, and refinement operations can only be performed globally. When it is necessary to increase the density of local control points, nodes must be uniformly inserted along the row and column directions throughout the entire mesh to maintain topological regularity. This global subdivision method generates a large number of redundant nodes, significantly reducing the efficiency of designing and reconstructing complex surfaces.
[0004] The T-spline proposed by Sederberg et al., by introducing a T-grid that allows T-shaped connection points, achieves local refinement of surfaces and free merging of multi-B-spline surfaces, overcoming the shortcomings of traditional methods in terms of topological flexibility and control efficiency. They also established a bidirectional conversion theory between T-splines and NURBS surfaces. Subsequently, researchers developed various T-spline fitting methods. Although T-splines overcome traditional topological limitations, their mixture functions may suffer from linear dependence, which can affect the uniqueness and numerical stability of the solution. Therefore, there is an urgent need for an adaptive surface fitting method that can balance the linear independence of the mixture functions, the simplification of control points, and computational efficiency. Summary of the Invention
[0005] Purpose of the invention: To address the shortcomings of existing technologies, this invention provides a local surface fitting method, apparatus, and medium based on RMB spline representation, aiming to solve the problems of redundant control points, high computational cost, and inability to guarantee the linear independence of T-splines in traditional global fitting methods, thereby achieving high-efficiency and high-precision surface reconstruction.
[0006] Technical solution: The local surface fitting method based on RMB spline representation described in this invention includes the following steps:
[0007] (1) Parameterize the input triangular mesh model, mapping the data points in space to the parameter domain, so that each point Each corresponds to a parameter point ;
[0008] (2) In each cell of the RMB grid, local least squares fitting is performed using the local linearity of the RMB spline basis functions to obtain the local control points and local fitting errors of the activation basis functions corresponding to each cell.
[0009] (3) Construct the global control point interval for each B-spline basis function. For basis functions with empty control point intervals, mark the grid cells in their support domain.
[0010] (4) Locally subdivide the marked grid cells along the vertical or horizontal direction;
[0011] (5) Repeat steps (2) to (4) until the control point intervals of all basis functions are not empty. Extract the global control points from the final control point intervals to generate RMB spline surfaces.
[0012] Furthermore, the implementation process of step (1) is as follows:
[0013] SLIM parameterization maps data points of a 3D mesh model to fixed boundaries. The planar parameter domain; SLIM uses symmetric Dirichlet energy, which is defined as follows for each triangular facet:
[0014] in, It is a Jacobian matrix. It is the area of a triangular facet in three-dimensional space. Let be the total number of triangles in the mesh; the SLIM method finds a 2D parameterization that preserves the local shape as much as possible by minimizing energy, so that the data at each point... Each corresponds to a parameter point .
[0015] Furthermore, the implementation process of step (2) is as follows:
[0016] Fitting is performed using bicubic RMB splines, which exhibit local linear independence, meaning each grid cell contains 16 linearly independent activation basis functions. Fitting is then performed on each small cell based on its corresponding 16 active B-spline basis functions, thus solving for... ,in, Refers to all parameter points in the k-th unit. As control points, The B-spline basis functions are used; by solving, the local control points of each basis function in each element of its support domain can be obtained, and the fitting error in each element can be calculated.
[0017] Furthermore, the implementation process of step (3) is as follows:
[0018] Let a certain B-spline basis function be... , This represents all grid cells in the support domain of the basis function. A threshold is set, and the maximum fitting error of the points in each cell is subtracted from the threshold. This difference is denoted as _____. The control points obtained by local fitting of the basis functions in the cell are denoted as... Constructing coefficient intervals The intersection of the coefficient intervals obtained from all cells in the support domain is obtained, i.e. ,in Describing basis functions The intersection of all grid cells in the support domain is the control point interval of the basis function. If the intersection is an empty set, it means that the control points in the support domain of the basis function have not converged successfully. All cells in the support domain are marked and await the next step of local subdivision.
[0019] Furthermore, the implementation process of step (4) is as follows:
[0020] Let the range of a unit in the u direction be... The range of the v direction is ,like That is, the horizontal side is the longest side, find the lowest level. , This intersection will contain one or two elements, among which If it is a positive integer, select the closest one. The number is used as the dividing point in the u direction; the endpoints of the dividing line segment are determined. Let the support domains of the four active B-spline systems of this unit be: , , , ,Pick for , for Then the vertical dividing line segment is determined; the horizontal dividing line segment can be determined in the same way.
[0021] Furthermore, the implementation process of step (5) is as follows:
[0022] Repeat steps (2) to (4) until all basis functions in step (3) have non-empty global control point intervals. At this point, no grid cells need to be subdivided, and the iteration stops. Let the subdivision set generated by the local subdivision be denoted as . Generate relevant local node sets under the fixed-point refinement operator. According to the local node set Determine the set of basis functions Each basis function selects the midpoint of the corresponding global control point interval as the final surface control point, and the set of control points is denoted as . The final RMB spline surface Represented as: .
[0023] The device according to the present invention includes a memory and a processor, wherein:
[0024] Memory is used to store computer programs that can run on a processor;
[0025] A processor, configured to, while running the computer program, perform the steps of the local surface fitting method based on RMB spline representation as described above.
[0026] The present invention discloses a storage medium storing a computer program, which, when executed by at least one processor, implements the steps of the local surface fitting method based on RMB spline representation as described above.
[0027] Beneficial effects: Compared with the prior art, the beneficial effects of the present invention are as follows: In surface fitting, the present invention uses a local strategy to decompose the global fitting over the entire parameter domain into local fitting of each small unit, avoiding the large amount of computational resources consumed by updating the global fitting mixture matrix and solving large sparse systems. Instead, it assembles multiple small matrices and solves small linear systems, effectively saving computational resources. Furthermore, the splines used for surface fitting are RMB splines, whose local subdivision properties can effectively reduce the number of control points, simplify the surface expression, and save storage space. Attached Figure Description
[0028] Figure 1 This is a flowchart of local surface fitting based on RMB spline representation;
[0029] Figure 2 The graph shows the fitting effect of the experimental data. Detailed Implementation
[0030] The present invention will now be described in further detail with reference to the accompanying drawings.
[0031] like Figure 1As shown, this invention proposes a local surface fitting method based on RMB spline representation, comprising the following steps:
[0032] Step 1: Use the SLIM (Scalable Locally Injective Mappings) parameterization method to map discrete points on the triangular mesh surface into the parameter domain.
[0033] The input data is triangular mesh data. SLIM parametricization maps the 3D points of the 3D mesh model to the planar parameter domain. The SLIM method uses symmetric Dirichlet energy, which is defined as follows for each triangular facet: ,in, It is a Jacobian matrix. It is the area of a triangular facet in three-dimensional space. The energy function, representing the total number of triangles in the mesh, penalizes both stretching and shrinking deformations. The entire process begins with a simple initial mapping, such as the Tutte embedding, which guarantees non-overlapping mesh unfolding to a 2D disk but typically results in severe geometric distortion. In each iteration, the algorithm performs two key steps: first, a "local step," where the optimal rotation matrix is independently computed for each triangle. Next comes the "global step," which fixes all... Solving the sparse linear system afterwards By updating the 2D parametric coordinates U of all vertices, this alternating "local-global" process is continuously repeated. While maintaining strict local injectivity, it stably converges to a nearly isotropic final state, ultimately generating a low-distortion 2D parametric mapping that ensures that each data point... Each corresponds to a parameter point .
[0034] Step 2: Perform local least squares fitting within each cell of the grid.
[0035] The RMB splines used for fitting are a type of spline generated through adaptive refinement on a hierarchical T-grid. They belong to the category of locally refined splines and are created by splitting an existing B-spline system. The RMB spline space is composed of a set of bilinear B-splines. Composition, in which The B-spline basis function is formed by two local node vectors. and Define the i-th p-th basis function. The recursive calculation formula is as follows:
[0036]
[0037]
[0038] The fitting process uses bicubic RMB splines with doubly nodes inside the spline mesh and quadruple nodes at the boundaries, similar in structure to bilinear RMB spline meshes, differing only in the number of node multiplicity. This spline exhibits local linear independence; specifically, each cell in the mesh has four independent activation B-spline systems, each containing four B-spline basis functions. Therefore, each cell has a total of 16 activation basis functions, which are linearly independent. Fitting is performed on each cell using the triangular mesh data points and their corresponding parameter points using these 16 activation B-spline basis functions, thus solving for... ,in, Refers to the first All parameter points in each cell, As control points, Let be B-spline basis functions. This optimization problem can be reduced to solving... ,in Based on the linear independence of the RMB spline mixture function, Given three-dimensional point data, the least squares solution to this equation. It is unique, and is the local control point of the basis function in the cell. The error E of all data points can also be determined by the following formula: .
[0039] Step 3: Construct the global control point interval for each basis function and determine the subdivision unit.
[0040] In step 2, a least-squares fit was performed on each cell in the mesh. This gives each basis function its corresponding local control points in each cell of its support domain. Next, based on these local control points, a global control point interval defined over the entire parameter domain mesh needs to be constructed for the basis function. Let's consider a B-spline basis function. There are m elements in the support domain, denoted as . , In each unit Each of them has corresponding local control points. Each unit has a maximum fitting error denoted as . Set a global threshold The accuracy of the final surface fitting can be controlled by customizing the threshold value. For each unit Construction interval Next, for Perform an intersection operation on the intervals of all cells in the support domain to obtain... Global control point range If the obtained global control point interval is empty, it means that the global control point convergence of the basis function has failed and the error accuracy has not been met.
[0041] An intersection result that is an empty set can be caused by two situations. First, when... In a certain unit A negative value indicates that the local fitting error has exceeded the threshold, meaning that the current 16 degrees of freedom are insufficient to accurately describe the local surface, causing the left endpoint of the control point interval to be larger than the right endpoint, rendering it invalid. In this case, the unit needs to be subdivided locally to improve fitting accuracy. Secondly, if... Local control point values in each unit Excessive differences will lead to low overlap of control point intervals across different units, potentially resulting in empty sets. In such cases, the support domain of the basis function needs to be subdivided, and multiple basis functions with smaller support domains should be used for fitting within a smaller range. In summary, for basis functions with empty global control point intervals, all units in their support domains are labeled, awaiting further local subdivision.
[0042] Step 4: Locally subdivide the marked grid cells.
[0043] The marked grid cells are divided using either a vertical or horizontal direction, with vertical division into line segments. and horizontal dividing line segments They are represented as follows: , When the basis function control points fail to converge, local subdivision of all elements in the support domain is required. Let the range of an element in the u direction be... The range of the v direction is ,like That is, the horizontal side is the longest side, find the lowest level. , This intersection will contain one or two elements, among which Choose the closest positive integer. The number is used as the dividing point in the u direction. Next, determine the endpoints of the dividing line segment. Let the support regions of the four active B-spline systems of this unit be: , , , ,Pick for , for Then the vertical segment Once determined, the horizontal dividing line segments can be determined similarly. Inserting the dividing line segments into the mesh generates new basis functions.
[0044] Step 5: Iterative convergence, calculate the RMB spline surface.
[0045] Iterate through steps 1 to 4 until all basis functions in step 3 have non-empty global control point intervals. At this point, no mesh cells need further subdivision, and the iteration stops. Let the set of subdivisions generated by the local subdivision be denoted as . Under the fixed-point refinement operator, relevant local node sets can be generated. According to the local node set Determine the set of basis functions Each basis function selects the midpoint of the corresponding global control point interval as the final surface control point, and the set of control points is denoted as . The final RMB spline surface Represented as: .
[0046] The present invention also provides an apparatus comprising a memory and a processor, wherein: the memory is used to store a computer program capable of running on the processor; and the processor is used to execute, when running the computer program, the steps of the local surface fitting method based on RMB spline representation as described above.
[0047] The present invention discloses a storage medium storing a computer program, which, when executed by at least one processor, implements the steps of the local surface fitting method based on RMB spline representation as described above.
[0048] To verify the performance of the method of the present invention, the following experiments were conducted. Table 1 shows the relevant experimental data, where the degrees of freedom represent the number of basis functions.
[0049] Table 1 Comparison of degrees of freedom calculation between the RMB method and the NURBS method.
[0050]
[0051] like Figure 2 As shown in the figure, there are six models, each corresponding to three images: the original triangular mesh surface image, the fitted RMB spline surface image, and the RMB mesh image. RMB spline surface fitting was performed on the six triangular mesh models. The number of data points in each model is as follows: face model: 12879, cat head model: 7845, human head model: 9462, camel head model: 11392, bear head model: 3049, camel head model: 3049, and bull head model: 6712. As a comparative experiment, the NURBS global fitting method was used to fit the triangular mesh models to B-spline surfaces, comparing the number of basis functions required by the two methods under the same model and the same error. The experimental results show that, for the same triangular mesh model, under the condition of achieving the same fitting error, the RMB spline surface fitting method of this invention uses fewer basis functions than the global fitting method based on NURBS representation. The method of this invention can express a higher accuracy surface with fewer basis functions.
[0052] This specification has described the technical solution and core features of the present invention through specific embodiments, with the aim of enabling those skilled in the art to understand and implement the present invention. It should be noted that the above descriptions are merely illustrative of the present invention and are not intended to limit the scope of protection of the present invention. All equivalent changes or modifications made based on the spirit and essence of the present invention should be included within the scope of protection of the present invention.
Claims
1. A local surface fitting method based on RMB spline representation, characterized in that, Includes the following steps: (1) Parameterize the input triangular mesh model, mapping the data points in space to the parameter domain, so that each point Each corresponds to a parameter point ; (2) In each cell of the RMB grid, local least squares fitting is performed using the local linearity of the RMB spline basis functions to obtain the local control points and local fitting errors of the activation basis functions corresponding to each cell. (3) Construct the global control point interval for each B-spline basis function. For basis functions with empty control point intervals, mark the grid cells in their support domain. (4) Locally subdivide the marked grid cells along the vertical and horizontal directions; (5) Repeat steps (2) to (4) until the control point intervals of all basis functions are not empty. Extract the global control points from the final control point intervals to generate RMB spline surfaces.
2. The local surface fitting method based on RMB spline representation according to claim 1, characterized in that, The implementation process of step (1) is as follows: The SLIM method is used to map data points of a 3D mesh model to a planar parameter domain. In the SLIM method, the energy is defined as follows: (The original text appears to be incomplete and contains several grammatical errors. A more accurate translation would require the full context.) in, It is a Jacobian matrix. It is the area of a triangular facet in 3D space. Let be the total number of triangles in the mesh; SLIM finds a 2D parameterization that preserves the local shape as much as possible by minimizing energy, such that each data point... Each has a corresponding .
3. The local surface fitting method based on RMB spline representation according to claim 1, characterized in that, The implementation process of step (2) is as follows: Fitting is performed using bicubic RMB splines, which exhibit local linear independence, meaning each grid cell contains 16 linearly independent activation basis functions. Fitting is then performed on each small cell based on its corresponding 16 active B-spline basis functions, thus solving for... ,in, Refers to all parameter points in the k-th unit. As control points, The basis functions are B-spline base functions; by solving, the local control points of each basis function in each element of its support domain can be obtained, and the fitting error in each element can be calculated.
4. The local surface fitting method based on RMB spline representation according to claim 1, characterized in that, The implementation process of step (3) is as follows: Let a certain B-spline basis function be... , This represents all grid cells in the support domain of the basis function. A threshold is set, and the maximum fitting error in each cell is subtracted from the threshold; this difference is denoted as _____. The control points obtained by local fitting of the basis functions in the cell are denoted as... Constructing coefficient intervals Intersect the coefficient intervals obtained from all elements in the support domain, i.e. The intersection result is the control point interval of the basis function; if the intersection is an empty set, it means that the control points in the support domain of the basis function have not converged successfully, and all elements in the support domain are marked and await the next step of local subdivision.
5. The local surface fitting method based on RMB spline representation according to claim 1, characterized in that, The implementation process of step (4) is as follows: Let the range of the u-direction of a unit be... The range of the v direction is ,like That is, the horizontal side is the longest side, find the lowest level. , This intersection will contain one or two elements, among which If it is a positive integer, select the closest one. The number is used as the dividing point in the u direction; the endpoints of the dividing line segment are determined. Let the support domains of the four active B-spline systems of this unit be: , , , ,Pick for , for If the vertical dividing line segment is determined, then the dividing line segment can be determined in the same way if the dividing line segment is horizontal.
6. The local surface fitting method based on RMB spline representation according to claim 1, characterized in that, The implementation process of step (5) is as follows: Repeat steps (2) to (4) until all basis functions in step (3) have non-empty global control point intervals. Then, no grid cells need to be subdivided, and the iteration converges and stops. The subdivision set generated by local subdivision Generate relevant local node sets under the fixed-point refinement operator. According to the local node set Determine the set of basis functions Each basis function selects the midpoint of the corresponding global control point interval as the final surface control point, and the set of control points is denoted as . The final RMB spline surface Represented as: .
7. A device, characterized in that, Includes memory and processor, wherein: Memory is used to store computer programs that can run on a processor; A processor, configured to, while running the computer program, perform the steps of the local surface fitting method based on RMB spline representation as described in any one of claims 1 to 6.
8. A storage medium, characterized in that, The storage medium stores a computer program that, when executed by at least one processor, implements the steps of the local surface fitting method based on RMB spline representation as described in any one of claims 1 to 6.