A multi-dimensional linear interpolation method for point cloud data, terminal device, and storage medium
Through the multi-dimensional linear interpolation method of point cloud data, the dependence on grid-based input data in the existing technology is solved, and the fast and efficient interpolation of point cloud data is achieved. It is suitable for multi-physics simulation platforms, improving the accuracy and efficiency of data processing.
Patent Information
- Application Number
- CN202310233326.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-13
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2043-03-13
AI Technical Summary
In the existing multi-physics simulation platform, linear interpolation requires users to provide grid-based input data, which makes it difficult to meet the needs in actual use scenarios, especially for insufficient processing capabilities for irregular data such as point clouds.
A multi-dimensional linear interpolation method for point cloud data is proposed. By extracting the maximum and minimum values of node coordinates, the maximum basic point and minimum basic point are selected, the assignment grid is constructed and the node value is calculated. It is suitable for one-dimensional, two-dimensional or three-dimensional grids to realize linear interpolation of point cloud data.
It realizes fast and efficient data interpolation, which is suitable for irregular data, has small errors and high efficiency, and can improve the accuracy and efficiency of data processing in the multi-physics simulation platform.
Smart Images

Figure CN116227209B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing, and in particular to a multidimensional linear interpolation method for point cloud data, a terminal device, and a storage medium. Background Art
[0002] Multiphysics coupling is a core technology of modern digital systems. Its essence lies in the coupling between physical quantities described by partial differential equations or ordinary differential equations, and the simultaneous solution of these equations. With the rapid development of industry worldwide, the emergence and development of multiphysics simulation platforms have greatly helped technicians and researchers to model and simulate multiphysics within the industrial sector. This is of vital importance for both industrial research and production. Multiphysics simulation software such as COMSOL and ANYSIS are already widely used by major companies, universities, and research institutions. The open-source, object-oriented multiphysics simulation environment MOOSE, developed by the Idaho National Laboratory in the United States, is designed to solve computational problems in all systems in a fully coupled manner, focusing on multiphysics coupling and cross-scale physical computational simulation processes. MOOSE provides a new, computationally efficient approach to solving multiphysics problems in the nuclear field and the broader scientific community. The MOOSE platform has become one of the most popular platforms for multiphysics development and application.
[0003] Image post-processing, as a simulation result visualization module, plays a crucial role in the human-computer interface of multiphysics simulation software. Interpolation methods largely determine the quality and reliability of processed images. Most multiphysics simulation platforms provide modules to help users better process simulation data and images. However, with the widespread adoption of numerical simulation platforms across various fields, most interpolation methods are gradually failing to meet user needs. These demands include a need for a wider variety of interpolation methods and the expansion of their functionality. Linear interpolation, in particular, is a common, reliable, and efficient method widely used in various fields, including computer science, electronic information, and geography. However, its use requires users to provide gridded input data, a demanding requirement that is often unmet in real-world scenarios. Therefore, research on linear interpolation methods suitable for irregular data such as point clouds and improving their functionality are crucial for improving multiphysics simulation computations and enhancing user efficiency. Summary of the Invention
[0004] In order to solve the above problems, the present invention proposes a multi-dimensional linear interpolation method for point cloud data, a terminal device and a storage medium.
[0005] The specific plan is as follows:
[0006] A multidimensional linear interpolation method for point cloud data includes the following steps:
[0007] S1: Extract the maximum and minimum values of all node coordinates in each coordinate dimension based on the point cloud data file;
[0008] S2: determining the grid coverage area corresponding to the grid file to be interpolated based on the maximum and minimum values of the extracted node coordinates, and setting the values of the nodes outside the coverage area to 0;
[0009] S3: For any node in the coverage area, two nodes are selected from other nodes in the point cloud data file as the maximum base point and minimum base point of the node respectively. The maximum base point and the minimum base point must meet the following requirements: the coordinates of the node in each dimension are greater than or equal to the coordinates of the minimum base point in the corresponding dimension, and less than or equal to the coordinates of the maximum base point in the corresponding dimension; if the point cloud data file does not contain the maximum base point and / or the minimum base point that meets the above conditions, then the vertex of the coverage area consisting of the maximum values in each coordinate dimension is used as the maximum base point, and / or the vertex of the coverage area consisting of the minimum values in each coordinate dimension is used as the minimum base point;
[0010] S4: construct the valued grid corresponding to the node and the vertices on the boundary of the valued grid according to the maximum basic point and the minimum basic point;
[0011] S5: Assign values to the vertices on the boundary of the node's assignment grid;
[0012] S6: Based on the dimensions of the grid, calculate the area enclosed by the node and each vertex on the boundary of the assigned grid;
[0013] S7: Based on the enclosed areas and the values of each vertex, calculate the value of the node:
[0014]
[0015] in, Indicates the value of the node, Represents the value of the i-th vertex, i represents the vertex number, and n represents the total number of vertices. represents the area enclosed by the node and the i-th vertex on the boundary of the assigned grid;
[0016] S8: Traverse all nodes in the grid coverage area and repeat steps S3-S7 to obtain values for all nodes.
[0017] Furthermore, the method for determining the grid coverage area in step S2 is: if the grid is one-dimensional, the coverage area is a line segment ; If the grid is two-dimensional, the coverage area is a rectangle, and the coordinates of the two diagonal points are )and ); If the grid is three-dimensional, the coverage area is a cuboid, and the coordinates of the two opposite corners are )and ), They are the minimum values in the three coordinate dimensions of X, Y, and Z respectively. They are the maximum values in the three coordinate dimensions of X, Y, and Z respectively.
[0018] Furthermore, the method for constructing the node assignment grid and the vertices on the assignment grid boundary in step S4 is as follows: let the coordinates of the maximum base point and the minimum base point of the node be and , then:
[0019] If the grid is one-dimensional, the node's value grid is a line segment , the vertices on the boundary of the assigned mesh are the two end points of the line segment, and their coordinates are and ;
[0020] If the grid is two-dimensional, the point assignment grid is a rectangle, and the vertices on the boundary of the assignment grid are the four vertices of the rectangle, with coordinates as follows: 、 、 and ;
[0021] If the grid is three-dimensional, the assigned grid of the point node is a cuboid, and the vertices on the boundary of the assigned grid are the 8 vertices of the cuboid, with coordinates as follows: 、 、 、 、 、 、 、 .
[0022] Furthermore, the method of assigning the vertex in step S5 is: if the vertex is a node in the point cloud data file, the value of the vertex is taken as the corresponding value in the point cloud data file; otherwise, the node closest to the vertex is found in the point cloud data file, and the value of the found node is assigned to the vertex.
[0023] Furthermore, the calculation method of the enclosed area in step S6 is:
[0024] If the grid is one-dimensional, the area enclosed by the node and the vertex is the length of the line segment formed from the node to the vertex;
[0025] If the mesh is two-dimensional, the area enclosed by the nodes and vertices is the area of the rectangle formed with the nodes and vertices as diagonal points;
[0026] If the mesh is three-dimensional, the area enclosed by the nodes and vertices is the volume of the cuboid formed with the nodes and vertices as opposite corners.
[0027] A point cloud data multidimensional linear interpolation terminal device includes a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the method described above are implemented.
[0028] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the method described above in an embodiment of the present invention.
[0029] The present invention adopts the above technical solution to quickly and efficiently implement data interpolation in a numerical simulation platform. When the method of this embodiment is used to perform data interpolation, it has the advantages of small error and high efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 Shown is a flow chart of embodiment 1 of the present invention.
[0031] Figure 2 FIG. 1 is a schematic diagram showing the contents of a point cloud data file in the first embodiment of the present invention.
[0032] Figure 3 FIG. 1 is a schematic diagram of the linear interpolation result using the method of this embodiment in the first embodiment of the present invention.
[0033] Figure 4 The figure shows a comparison of the results of the method of this embodiment and the linear interpolation algorithm of MOOSE in the first embodiment of the present invention. DETAILED DESCRIPTION
[0034] To further illustrate various embodiments, the present invention provides accompanying drawings. These drawings form part of the present disclosure and are primarily used to illustrate the embodiments and, in conjunction with the relevant description in the specification, to explain the operating principles of the embodiments. By referring to these drawings, those skilled in the art will be able to understand other possible implementations and the advantages of the present invention.
[0035] The present invention will now be further described with reference to the accompanying drawings and specific embodiments.
[0036] Example 1:
[0037] The embodiment of the present invention provides a multi-dimensional linear interpolation method for point cloud data, which is used in numerical simulation software platforms such as MOOSE and SALOME. Figure 1 , which is a flowchart of a multidimensional linear interpolation method for point cloud data according to an embodiment of the present invention, the method comprises the following steps:
[0038] S1: Extract the maximum and minimum values of all node coordinates in each coordinate dimension based on the point cloud data file.
[0039] The dimension of the node coordinates can be one-dimensional, two-dimensional or three-dimensional. Assume that the node coordinates are uniformly expressed as If it is a one-dimensional node, the default ; If it is a two-dimensional node, the default .
[0040] The content of the point cloud data file is as follows Figure 2 As shown, each row corresponds to a node, including the coordinate values of the node in the three coordinate dimensions of X, Y, and Z and the value of the node.
[0041] In this embodiment, the maximum coordinate values in the three coordinate dimensions of X, Y, and Z are set to , the minimum value is .
[0042] S2: Determine the grid coverage area corresponding to the grid file to be interpolated based on the maximum and minimum values of the extracted node coordinates, and set the values of the nodes outside the coverage area to 0.
[0043] In this embodiment, the method for determining the grid coverage area is as follows: if the grid is one-dimensional, the coverage area is a line segment The coordinates of the two endpoints are )and ); If the grid is two-dimensional, the coverage area is a rectangle, and the coordinates of the two diagonal points are )and ); If the grid is three-dimensional, the coverage area is a cuboid, and the coordinates of the two opposite corners are )and ).
[0044] S3: For any node in the coverage area, two nodes are selected from other nodes in the point cloud data file as the maximum base point and minimum base point of the node respectively. The maximum base point and the minimum base point must meet the following requirements: the coordinates of the node in each dimension are greater than or equal to the coordinates of the minimum base point in the corresponding dimension, and are less than or equal to the coordinates of the maximum base point in the corresponding dimension; if there is no maximum base point and / or minimum base point that meets the above conditions in the point cloud data file, the vertex of the coverage area composed of the maximum values in each coordinate dimension is used as the maximum base point, and / or the vertex of the coverage area composed of the minimum values in each coordinate dimension is used as the minimum base point.
[0045] As a node The maximum and minimum basis points are and , then , and .
[0046] If there is no maximum base point and / or minimum base point that meets the above conditions in the point cloud data file, the coordinates of the maximum base point are set to )or )or ), the coordinates of the minimum base point are )or )or ).
[0047] S4: Construct the valued grid corresponding to the node and the vertices on the boundary of the valued grid according to the maximum base point and the minimum base point.
[0048] In this embodiment, the method for constructing the node value grid and the vertices on the boundary of the value grid is as follows:
[0049] If the grid is one-dimensional, the node's value grid is a line segment , the vertices on the boundary of the assigned mesh are the two end points of the line segment, and their coordinates are and ;
[0050] If the grid is two-dimensional, the point assignment grid is a rectangle, and the vertices on the boundary of the assignment grid are the four vertices of the rectangle, with coordinates as follows: 、 、 and ;
[0051] If the grid is three-dimensional, the assigned grid of the point node is a cuboid, and the vertices on the boundary of the assigned grid are the 8 vertices of the cuboid, with coordinates as follows: 、 、 、 、 、 、 、 .
[0052] S5: Assign values to the vertices on the boundary of the node's assignment grid.
[0053] The vertex assignment method in this embodiment is: if the vertex is a node in the point cloud data file, the value of the vertex is the corresponding value in the point cloud data file; otherwise, the node closest to the vertex is found in the point cloud data file, and the value of the found node is assigned to the vertex.
[0054] S6: Based on the dimension of the grid, calculate the area enclosed by the node and each vertex on the boundary of the assigned grid.
[0055] The calculation method of the enclosed area in this embodiment is:
[0056] If the grid is one-dimensional, the area enclosed by the node and the vertex is the length of the line segment from the node to the vertex. Since there are two vertices, there are two enclosed areas, which are recorded as and ;
[0057] If the grid is two-dimensional, the area enclosed by the nodes and vertices is the area of the rectangle formed by the nodes and vertices as diagonal points. Since there are four vertices, there are four enclosed areas, which are recorded as , , and ;
[0058] If the grid is three-dimensional, the area enclosed by the nodes and vertices is the volume of the cuboid formed with the nodes and vertices as the opposite corners. Since there are eight vertices, there are eight enclosed areas, which are recorded as , , ,……, .
[0059] S7: Based on the enclosed areas and the values of each vertex, calculate the value of the node:
[0060]
[0061] in, Indicates the value of the node, Indicates the value of the i-th vertex, i represents the vertex number, and n represents the total number of vertices. It takes 2, 4, or 8 according to the dimension of the grid. Represents the area enclosed by the node and the i-th vertex on the boundary of the assigned grid.
[0062] S8: Traverse all nodes in the grid coverage area and repeat steps S3-S7 to obtain values for all nodes.
[0063] Steps S2-S8 are to perform interpolation on a grid file to be interpolated. The grid file to be interpolated is applied to a numerical simulation software platform, including a MedCoupling grid file, an Exodus file, or a Gmsh grid file.
[0064] This embodiment adopts the method of this embodiment in the MOOSE platform, using Figure 2 So the point cloud data file, the screenshot at x=5 is as follows Figure 3 The linear interpolation results are shown in Table 1.
[0065] Table 1
[0066]
[0067] In this embodiment, the linear interpolation algorithm of this embodiment is applied in the MOOSE platform under the same gridded point cloud data file ( Figure 4 Left) and the linear interpolation algorithm in MOOSE ( Figure 4 The interpolation results of the right) are compared as follows Figure 4 shown.
[0068] The data comparison results of the linear interpolation algorithm proposed in this embodiment and the linear interpolation algorithm in MOOSE for random grid nodes under the same gridded input data show that the error is zero (as shown in Table 2), indicating that in this case, the function of the linear interpolation algorithm proposed in this embodiment can completely cover the linear interpolation algorithm in MOOSE.
[0069] Table 2
[0070]
[0071] This embodiment of the present invention overcomes the problem of existing multi-physics simulation software requiring users to provide gridded input data for interpolation. It provides a linear interpolation method that is applicable not only to gridded input data but also to irregular data such as point clouds. This embodiment enables fast and efficient data interpolation in numerical simulation platforms. When using this embodiment's method for data interpolation, it has the advantages of low error and high efficiency.
[0072] Example 2:
[0073] The present invention also provides a point cloud data multi-dimensional linear interpolation terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps in the above-mentioned method embodiment of the first embodiment of the present invention are implemented.
[0074] Furthermore, as an executable solution, the point cloud data multi-dimensional linear interpolation terminal device can be a computing device such as a desktop computer, a notebook, a PDA, and a cloud server. The point cloud data multi-dimensional linear interpolation terminal device may include, but is not limited to, a processor and a memory. Those skilled in the art will understand that the composition structure of the above-mentioned point cloud data multi-dimensional linear interpolation terminal device is merely an example of a point cloud data multi-dimensional linear interpolation terminal device and does not constitute a limitation on the point cloud data multi-dimensional linear interpolation terminal device. It may include more or fewer components than the above-mentioned components, or a combination of certain components, or different components. For example, the point cloud data multi-dimensional linear interpolation terminal device may also include input and output devices, network access devices, buses, etc., and the embodiments of the present invention do not limit this.
[0075] Furthermore, as an executable solution, the processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor serves as the control center of the point cloud data multi-dimensional linear interpolation terminal device, connecting various parts of the entire point cloud data multi-dimensional linear interpolation terminal device using various interfaces and lines.
[0076] The memory can be used to store the computer programs and / or modules. The processor implements the various functions of the point cloud data multi-dimensional linear interpolation terminal device by running or executing the computer programs and / or modules stored in the memory and accessing the data stored in the memory. The memory may primarily include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for the function; the data storage area may store data generated based on the use of the mobile phone. In addition, the memory may include high-speed random access memory and non-volatile memory, such as a hard disk, internal memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, at least one disk storage device, a flash memory device, or other volatile solid-state storage device.
[0077] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above method in the embodiment of the present invention are implemented.
[0078] If the modules / units integrated into the point cloud data multidimensional linear interpolation terminal device are implemented as software functional units and sold or used as standalone products, they can be stored in a computer-readable storage medium. Based on this understanding, the present invention can also implement all or part of the process steps in the above-mentioned method embodiments by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, the computer program can implement the steps of each of the above-mentioned method embodiments. The computer program includes computer program code, which can be in source code form, object code form, executable file, or some intermediate form. The computer-readable medium can include any entity or device capable of carrying the computer program code, recording media, USB flash drives, removable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), and software distribution media.
[0079] Although the present invention has been particularly shown and described in conjunction with preferred embodiments, it will be understood by those skilled in the art that various changes in form and details may be made to the present invention without departing from the spirit and scope of the invention as defined in the appended claims, and all such changes are within the scope of protection of the present invention.
Claims
1. A multidimensional linear interpolation method for point cloud data, used in a numerical simulation software platform, characterized in that: The following steps are involved: S1: Extract the maximum and minimum values of all node coordinates in each coordinate dimension based on the point cloud data file; S2: determining the grid coverage area corresponding to the grid file to be interpolated based on the maximum and minimum values of the extracted node coordinates, and setting the values of the nodes outside the coverage area to 0; S3: For any node in the coverage area, select two nodes from other nodes in the point cloud data file as the maximum base point and minimum base point of the node respectively. The maximum base point must meet the following requirements: the coordinates in each dimension are greater than or equal to the value of any node in the corresponding dimension; The minimum base point must meet the following requirements: the coordinates in each dimension are less than or equal to the coordinates of any node in the corresponding dimension. If the point cloud data file does not contain a maximum base point and / or minimum base point that meet these two conditions, the vertex consisting of the maximum values in each coordinate dimension of the coverage area is used as the maximum base point, and / or the vertex consisting of the minimum values in each coordinate dimension of the coverage area is used as the minimum base point. S4: constructing a valued grid corresponding to the node and vertices on a boundary of the valued grid according to the maximum basic point and the minimum basic point when the grid is one-dimensional, two-dimensional, or three-dimensional; Assume that the coordinates of the maximum base point and the minimum base point of the node are and , then: If the grid is one-dimensional, the node's value grid is a line segment , the vertices on the boundary of the assigned mesh are the two end points of the line segment, and their coordinates are and ; If the grid is two-dimensional, the point assignment grid is a rectangle, and the vertices on the boundary of the assignment grid are the four vertices of the rectangle, with coordinates as follows: 、 、 and ; If the grid is three-dimensional, the assigned grid of the point node is a cuboid, and the vertices on the boundary of the assigned grid are the 8 vertices of the cuboid, with coordinates as follows: 、 、 、 、 、 、 、 ; S5: Assign values to the vertices on the boundary of the node's assignment grid; S6: Based on the dimensions of the grid, calculate the area enclosed by the node and each vertex on the boundary of the assigned grid; S7: Based on the enclosed areas and the values of each vertex, calculate the value of the node: ; in, Indicates the value of the node, Represents the value of the i-th vertex, i represents the vertex number, and n represents the total number of vertices. represents the area enclosed by the node and the i-th vertex on the boundary of the assigned grid; S8: Traverse all nodes in the grid coverage area and repeat steps S3-S7 to obtain values for all nodes.
2. The point cloud data multidimensional linear interpolation method according to claim 1, characterized in that: The method for determining the grid coverage area in step S2 is: if the grid is one-dimensional, the coverage area is a line segment ; If the grid is two-dimensional, the coverage area is a rectangle, and the coordinates of the two diagonal points are )and ); If the grid is three-dimensional, the coverage area is a cuboid, and the coordinates of the two opposite corners are )and ), They are the minimum values in the three coordinate dimensions of X, Y, and Z respectively. They are the maximum values in the three coordinate dimensions of X, Y, and Z respectively.
3. The multidimensional linear interpolation method for point cloud data according to claim 1, wherein: The method for assigning the vertex in step S5 is as follows: if the vertex is a node in the point cloud data file, the value of the vertex is the corresponding value in the point cloud data file; otherwise, the node closest to the vertex on the boundary of the assigned grid of the node is searched from the point cloud data file, and the value of the found node is assigned to the vertex.
4. The multidimensional linear interpolation method for point cloud data according to claim 1, wherein: The calculation method of the enclosed area in step S6 is: If the grid is one-dimensional, the area enclosed by the node and the vertex is the length of the line segment formed from the node to the vertex; If the mesh is two-dimensional, the area enclosed by the nodes and vertices is the area of the rectangle formed with the nodes and vertices as diagonal points; If the mesh is three-dimensional, the area enclosed by the nodes and vertices is the volume of the cuboid formed with the nodes and vertices as opposite corners.
5. A terminal device for multidimensional linear interpolation of point cloud data, characterized by: The method comprises a processor, a memory, and a computer program stored in the memory and running on the processor, wherein the processor implements the steps of the method according to any one of claims 1 to 4 when executing the computer program.
6. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.