Three-dimensional reconstruction and imaging method and system based on ray tracing
Through the three-dimensional reconstruction and imaging method based on ray tracing, the symbol distance function and ray tracing technology are used to efficiently reconstruct complex geometry, solving the problems of low calculation accuracy and insufficient efficiency in the existing technology, and achieving high-quality three-dimensional Reconstruction and imaging effects.
Patent Information
- Application Number
- CN202411406961.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-10
- Publication Date
- 2025-02-11
AI Technical Summary
The existing three-dimensional reconstruction methods have low calculation accuracy and uncontrollable results when processing complex geometries, and have low efficiency in the three-dimensional reconstruction of sparse spatial point data.
Three-dimensional reconstruction and imaging method based on ray tracing is adopted to define space through symbol distance function, and ray tracing technology is used to express each spatial point, and smooth calculations are performed to improve calculation efficiency.
Efficient three-dimensional reconstruction and imaging of complex scenes are realized, spatial position accuracy is ensured, and computing efficiency and reconstruction quality are improved.
Smart Images

Figure CN119417977A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of three-dimensional imaging rendering technology, and in particular to a three-dimensional reconstruction and imaging method and system based on ray tracing. Background Art
[0002] In traditional 3D reconstruction methods, spatial data represented by point clouds are often unable to support further real and effective calculations due to their unstructured characteristics. When dealing with such discrete problems of spatial points, surface reconstruction algorithms such as Poisson reconstruction and rolling ball reconstruction are often used.
[0003] However, when mainstream surface reconstruction algorithms perform reconstruction calculations on spatial points, they can only achieve good results when processing scenes with relatively simple geometric contours. When faced with complex and unpredictable geometric bodies in real scenes, they are unable to accurately define the surface and internal structure, resulting in loss of calculation accuracy, uncontrollable calculation results, low calculation efficiency, and low calculation quality.
[0004] Therefore, how to perform three-dimensional reconstruction of sparse spatial point data to form continuous, high-quality three-dimensional spatial data and imaging is a technical problem that needs to be solved urgently. Summary of the invention
[0005] The object of the present invention is to provide a three-dimensional reconstruction and imaging method and system based on ray tracing to solve the problems raised in the above background technology.
[0006] To achieve the above object, the present invention provides the following technical solution: a three-dimensional reconstruction and imaging method based on ray tracing, the method comprising the following steps:
[0007] Express each spatial point;
[0008] The entire space is defined by a signed distance function;
[0009] Proper reconstruction and imaging results;
[0010] The distance function is used to perform smooth calculations between similar units.
[0011] Preferably, the specific operations for expressing each spatial point include:
[0012] The voxel positioning method is adopted to describe the spatial scene through spatial vector coordinates and color information, and each spatial point is expressed through the basic shapes of circle and cube to obtain a result similar to the voxel model.
[0013] Preferably, the specific operations of defining the entire space by the signed distance function include:
[0014] The spatial distance is defined by the positive or negative value calculated by the function. If the sign is negative, it means that the light range intersects with a certain space. If the distance is positive, the definition continues to advance to a farther space. Assuming that the starting point is P0, the straight line represents the direction of the light ship, P1, P2...Pi represent the definition range at each moment, and P4 is the spatial depth of the surface.
[0015] Preferably, the specific operations for performing correct reconstruction and imaging results include:
[0016] Recalculate the space normal vector, using the result of the space depth calculation. If f (space depth) is positive, the normal vector is outward, and if f (space depth) is negative, the normal vector is inward. The specific calculation model is as follows:
[0017]
[0018] In order to improve the calculation efficiency, the sampling point method is used for approximate calculation.
[0019]
[0020] Preferably, the specific operation of using the distance function to perform smoothing calculation between adjacent units includes:
[0021] Using a two-dimensional function, given two basic function graphs, the smoothing calculation model at the intersection is as follows:
[0022]
[0023] Normal and color information are processed synchronously when applied to three-dimensional space.
[0024] A three-dimensional reconstruction and imaging system based on ray tracing, the system comprising:
[0025] A spatial point expression module is used to express each spatial point;
[0026] The space definition module is used to define the entire space through the signed distance function;
[0027] Reconstruction and imaging module, used for correct reconstruction and imaging results;
[0028] The calculation module uses the distance function to perform smooth calculations between similar units.
[0029] Preferably, the spatial point expression module adopts a voxel positioning method, describes the spatial scene through spatial vector coordinates and color information, and expresses each spatial point through basic shapes such as circle and cube to obtain a result similar to a voxel model.
[0030] Preferably, the space definition module defines the space distance by the positive or negative value calculated by the function. If the sign is a negative number, it is considered that the light range intersects with a certain space. If the distance is a positive number, the definition continues to advance to a farther space. Assuming that the starting point is P0, the straight line represents the direction of the light ship, P1, P2...Pi represent the definition range at each moment, and P4 is the spatial depth of the surface.
[0031] Preferably, the reconstruction and imaging module recalculates the space normal vector using the result of the space depth calculation. If f (space depth) is positive, the normal vector is outward, and if f (space depth) is negative, the normal vector is inward. The specific calculation model is as follows:
[0032]
[0033] In order to improve the calculation efficiency, the sampling point method is used for approximate calculation.
[0034]
[0035] Preferably, the calculation module adopts a two-dimensional function, and given two basic function graphs, the smooth calculation model at the intersection is as follows:
[0036]
[0037] Normal and color information are processed synchronously when applied to three-dimensional space.
[0038] Compared with the prior art, the present invention has the following beneficial effects:
[0039] The ray tracing-based 3D reconstruction and imaging method and system proposed in the present invention realizes efficient 3D reconstruction and imaging for discrete points in space, sets smoothing conditions according to the degree of discreteness, and obtains 3D data models and imaging results without losing spatial position accuracy. The present invention has a high response speed and good reconstruction efficiency for the spatial data of entities obtained by scanning, detection, calculation, etc. in real scenes. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 A schematic diagram of the symbol distance definition space of the present invention;
[0041] Figure 2 It is a schematic diagram of a two-dimensional basic graph of the present invention;
[0042] Figure 3 It is a schematic diagram of the smoothing result of the present invention;
[0043] Figure 4 The figure is a flow chart of the method of the present invention. DETAILED DESCRIPTION
[0044] In order to make the purpose and technical solution of the present invention clearly and completely described, and the advantages more clearly understood, the embodiments of the present invention are further described in detail with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are part of the embodiments of the present invention, rather than all of the embodiments, and are only used to explain the embodiments of the present invention, and are not used to limit the embodiments of the present invention. All other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0045] For example, see Figures 1 to 4 The present invention provides a technical solution: a three-dimensional reconstruction and imaging method based on ray tracing, the method comprising the following steps:
[0046] (1) First, the voxel positioning method is used to describe the spatial scene through spatial vector coordinates, color and other information, and each spatial point is expressed through basic shapes such as circles and cubes. At this time, a result similar to the voxel model is obtained.
[0047] (2) Figure 1 As shown in the figure, the entire space is defined by the signed distance function. The spatial distance is defined by the positive or negative value calculated by the function. If the sign is negative, we think that the light intersects with a certain space within the range. If the distance is positive, the definition continues to move forward to a farther space. Assuming that the line starts from point P0, the direction of the light ship, P1, P2...Pi represent the definition range at each moment, and P4 is the spatial depth of the surface.
[0048] (3) In order to obtain correct reconstruction and imaging results, the space normal vector needs to be recalculated first.
[0049] Using the result of spatial depth calculation, if f (spatial depth) is positive, the normal vector is outward, and if f (spatial depth) is negative, the normal vector is inward. The specific calculation model is as follows:
[0050]
[0051] In order to improve the calculation efficiency, the sampling point method can be used for approximate calculation.
[0052]
[0053] (4) Use the distance function to perform smoothing calculations between similar units. Taking a two-dimensional function as an example, given two basic function graphs, the effect is as follows Figure 2 and Figure 3 As shown;
[0054] The smoothing calculation model at the intersection is as follows,
[0055]
[0056] When applied to three-dimensional space, normal, color and other information are processed synchronously.
[0057] Embodiment 2, based on embodiment 1, proposes a 3D reconstruction and imaging system based on ray tracing, the system comprising:
[0058] The spatial point expression module is used to express each spatial point. It adopts voxel positioning method, describes the spatial scene through spatial vector coordinates and color information, and expresses each spatial point through basic shapes such as circle and cube to obtain results similar to voxel model.
[0059] The space definition module is used to define the entire space through the signed distance function; the space distance is defined by the positive or negative value calculated by the function. If the sign is a negative number, it is considered that the light range intersects with a certain space. If the distance is a positive number, the definition continues to advance to a farther space; assuming that starting from point P0, the straight line represents the direction of the light ship, P1, P2...Pi represent the definition range at each moment, and P4 is the spatial depth of the surface.
[0060] The reconstruction and imaging module is used to perform correct reconstruction and imaging results; recalculate the space normal vector, using the result of the space depth calculation. If f (space depth) is positive, the normal vector is outward, and if f (space depth) is negative, the normal vector is inward. The specific calculation model is as follows:
[0061]
[0062] In order to improve the calculation efficiency, the sampling point method is used for approximate calculation.
[0063]
[0064] The calculation module uses the distance function to perform smooth calculations between adjacent units. Using a two-dimensional function, given two basic function graphs, the smooth calculation model at the intersection is as follows:
[0065]
[0066] Normal and color information are processed synchronously when applied to three-dimensional space.
[0067] The present invention provides a method for real-time reading, loading data and performing 3D reconstruction, which can efficiently obtain 3D reconstruction results during operation, and the reconstruction accuracy reaches the millimeter level; the reconstruction results and imaging methods provided by the present invention effectively perform surface smoothing processing, and ensure the restoration degree of spatial data to a large extent; compared with simple 3D imaging, the present invention realizes 3D grid entity data, retains the physical properties of reconstruction, and supports further simulation analysis of the results.
[0068] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A three-dimensional reconstruction and imaging method based on ray tracing, characterized in that: The method comprises the following steps: Express each spatial point; The entire space is defined by a signed distance function; Proper reconstruction and imaging results; The distance function is used to perform smooth calculations between similar units.
2. The 3D reconstruction and imaging method based on ray tracing according to claim 1, characterized in that: The specific operations for expressing each spatial point include: The voxel positioning method is adopted to describe the spatial scene through spatial vector coordinates and color information, and each spatial point is expressed through the basic shapes of circle and cube to obtain a result similar to the voxel model.
3. The 3D reconstruction and imaging method based on ray tracing according to claim 1, characterized in that: The specific operations that define the entire space through the signed distance function include: The spatial distance is defined by the positive or negative value calculated by the function. If the sign is negative, it means that the light range intersects with a certain space. If the distance is positive, the definition continues to advance to a farther space. Assuming that the starting point is P0, the straight line represents the direction of the light ship, P1, P2...Pi represent the definition range at each moment, and P4 is the spatial depth of the surface.
4. The 3D reconstruction and imaging method based on ray tracing according to claim 1, characterized in that: Specific operations to achieve correct reconstruction and imaging results include: Recalculate the space normal vector, using the result of the space depth calculation. If f (space depth) is positive, the normal vector is outward, and if f (space depth) is negative, the normal vector is inward. The specific calculation model is as follows: In order to improve the calculation efficiency, the sampling point method is used for approximate calculation.
5. The 3D reconstruction and imaging method based on ray tracing according to claim 1, characterized in that: The specific operations of using the distance function to perform smooth calculations between similar units include: Using a two-dimensional function, given two basic function graphs, the smoothing calculation model at the intersection is as follows: Normal and color information are processed synchronously when applied to three-dimensional space.
6. A 3D reconstruction and imaging system based on ray tracing according to the 3D reconstruction and imaging method based on ray tracing according to any one of claims 1 to 5, characterized in that: The system comprises: A spatial point expression module is used to express each spatial point; The space definition module is used to define the entire space through the signed distance function; Reconstruction and imaging module, used for correct reconstruction and imaging results; The calculation module uses the distance function to perform smooth calculations between similar units.
7. The ray tracing-based three-dimensional reconstruction and imaging system according to claim 6, characterized in that: The spatial point expression module adopts voxel positioning method, describes the spatial scene through spatial vector coordinates and color information, and expresses each spatial point through basic shapes such as circle and cube to obtain a result similar to that of voxel model.
8. The 3D reconstruction and imaging system based on ray tracing according to claim 6, characterized in that: The space definition module defines the space distance by the positive and negative values of the function calculation value. If the sign is a negative number, it is considered that the light range intersects with a certain space. If the distance is a positive number, the definition continues to advance to a farther space. Assuming that the starting point is P0, the straight line represents the direction of the light ship, P1, P2...Pi represent the definition range at each moment, and P4 is the spatial depth of the surface.
9. The ray tracing-based three-dimensional reconstruction and imaging system according to claim 6, characterized in that: The reconstruction and imaging module recalculates the space normal vector using the result of the space depth calculation. If f (space depth) is positive, the normal vector is outward, and if f (space depth) is negative, the normal vector is inward. The specific calculation model is as follows: In order to improve the calculation efficiency, the sampling point method is used for approximate calculation.
10. The ray tracing-based three-dimensional reconstruction and imaging system according to claim 6, characterized in that: The calculation module adopts a two-dimensional function. Given two basic function graphs, the smooth calculation model at the intersection is as follows: Normal and color information are processed synchronously when applied to three-dimensional space.