3D multi-frame file reconstruction method and apparatus
Patent Information
- Application Number
- CN202310933963.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-27
- Publication Date
- 2026-10-30
- Estimated Expiration
- 2043-07-27
AI Technical Summary
[0003]本发明通过提供3D多帧文件重建方法及装置,解决了现有技术中3D多帧文件重建过程耗时长的技术问题
[0041]本发明第一次进行3D多帧文件重建后将重建数据以点云格式写入重建数据文件中,再次需要打开3D多帧文件时,可以直接装载重建数据文件并解析重建数据文件中的重建数据,由于之后的每次重建可以直接从重建数据文件中获得重建数据,无需进行复杂的重建过程,极大的降低了3D多帧文件的重建耗时。
Smart Images

Figure CN116934973B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of three-dimensional reconstruction technology, and more particularly to a method and apparatus for reconstructing 3D multi-frame files. Background Technology
[0002] Currently, the reconstruction of 3D image files (such as TIFF / DCM formats) requires loading image data frame by frame and using specific algorithms for 3D reconstruction. This process is time-consuming and has high requirements for hardware system resources. After the reconstruction is completed and rendered, if the file is closed and then reopened for reconstruction, the reconstruction process of loading image data frame by frame must be repeated, which is time-consuming. Summary of the Invention
[0003] This invention provides a method and apparatus for reconstructing 3D multi-frame files, which solves the technical problem of long time consumption in the existing 3D multi-frame file reconstruction process.
[0004] On the one hand, the present invention provides the following technical solution:
[0005] A method for reconstructing 3D multi-frame files, comprising:
[0006] Perform 3D multi-frame file reconstruction to obtain the reconstruction data of the 3D multi-frame file;
[0007] The reconstructed data is written into a reconstructed data file in point cloud format;
[0008] When the 3D multi-frame file needs to be opened, the reconstruction data file is loaded and the reconstruction data in the reconstruction data file is parsed.
[0009] Preferably, the 3D multi-frame file reconstruction includes:
[0010] The 3D multi-frame file is sliced in parallel for volume or surface rendering to obtain multiple reconstructed memory data, and the multiple reconstructed memory data are reconstructed in parallel.
[0011] Preferably, the step of performing volume rendering or surface rendering and parallel slicing on the 3D multi-frame file to obtain multiple reconstructed memory data, and performing parallel reconstruction on the multiple reconstructed memory data, includes:
[0012] Determine whether the reconstruction system for the 3D multi-frame file has a GPU;
[0013] If the GPU is available, the 3D multi-frame file is rendered in volume and sliced in parallel, and the GPU is preferentially used to perform parallel reconstruction of multiple reconstruction memory data.
[0014] Otherwise, the 3D multi-frame file is rendered in parallel slices, and the CPU of the reconstruction system is used to perform parallel reconstruction on multiple reconstruction memory data.
[0015] Preferably, the 3D multi-frame file reconstruction includes:
[0016] Determine whether the reconstruction system for the 3D multi-frame file has a GPU;
[0017] If the GPU is available, the reconstruction of the 3D multi-frame file is performed based on a first threshold, with the GPU's maximum utilization rate being 100% and the reconstruction system's maximum physical memory utilization rate being 100%.
[0018] If the GPU is not available, the reconstruction of the 3D multi-frame file is performed based on the maximum physical memory usage of the reconstruction system as a first threshold and the maximum CPU usage as a second threshold.
[0019] Both the first threshold and the second threshold are less than 100%.
[0020] On the other hand, the present invention also provides the following technical solution:
[0021] A 3D multi-frame file reconstruction device, comprising:
[0022] The reconstruction module is used to reconstruct 3D multi-frame files and obtain the reconstruction data of the 3D multi-frame files.
[0023] The writing module is used to write the reconstructed data into a reconstructed data file in point cloud format;
[0024] The loading module is used to load the reconstruction data file and parse the reconstruction data in the reconstruction data file when the 3D multi-frame file needs to be opened.
[0025] Preferably, the reconstruction module performs 3D multi-frame file reconstruction, including:
[0026] The 3D multi-frame file is sliced in parallel for volume or surface rendering to obtain multiple reconstructed memory data, and the multiple reconstructed memory data are reconstructed in parallel.
[0027] Preferably, the reconstruction module performs volume rendering or surface rendering and parallel slicing on the 3D multi-frame file to obtain multiple reconstruction memory data, and performs parallel reconstruction on the multiple reconstruction memory data, including:
[0028] Determine whether the reconstruction system for the 3D multi-frame file has a GPU;
[0029] If the GPU is available, the 3D multi-frame file is rendered in volume and sliced in parallel, and the GPU is preferentially used to perform parallel reconstruction of multiple reconstruction memory data.
[0030] Otherwise, the 3D multi-frame file is rendered in parallel slices, and the CPU of the reconstruction system is used to perform parallel reconstruction on multiple reconstruction memory data.
[0031] Preferably, the reconstruction module performs 3D multi-frame file reconstruction, including:
[0032] Determine whether the reconstruction system for the 3D multi-frame file has a GPU;
[0033] If the GPU is available, the reconstruction of the 3D multi-frame file is performed based on a first threshold, with the GPU's maximum utilization rate being 100% and the reconstruction system's maximum physical memory utilization rate being 100%.
[0034] If the GPU is not available, the reconstruction of the 3D multi-frame file is performed based on the maximum physical memory usage of the reconstruction system as a first threshold and the maximum CPU usage as a second threshold.
[0035] Both the first threshold and the second threshold are less than 100%.
[0036] On the other hand, the present invention also provides the following technical solution:
[0037] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement any of the above-described 3D multi-frame file reconstruction methods.
[0038] On the other hand, the present invention also provides the following technical solution:
[0039] A computer-readable storage medium storing a computer program that, when executed by a processor, implements any of the above-described 3D multi-frame file reconstruction methods.
[0040] One or more technical solutions provided by this invention have at least the following technical effects or advantages:
[0041] After the first reconstruction of a 3D multi-frame file, the reconstruction data is written into a reconstruction data file in point cloud format. When the 3D multi-frame file needs to be opened again, the reconstruction data file can be loaded directly and the reconstruction data in the reconstruction data file can be parsed. Since the reconstruction data can be obtained directly from the reconstruction data file for each subsequent reconstruction, there is no need to perform a complicated reconstruction process, which greatly reduces the reconstruction time of the 3D multi-frame file. Attached Figure Description
[0042] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0043] Figure 1 This is a flowchart of the 3D multi-frame file reconstruction method in an embodiment of the present invention;
[0044] Figure 2 This is a schematic diagram illustrating the volume-based parallel slicing and surface-based parallel slicing in an embodiment of the present invention;
[0045] Figure 3 This is a schematic diagram of a 3D multi-frame file reconstruction device in an embodiment of the present invention. Detailed Implementation
[0046] The embodiments of the present invention provide a 3D multi-frame file reconstruction method and apparatus, which solves the technical problem of long time consumption in the 3D multi-frame file reconstruction process in the prior art.
[0047] To better understand the technical solution of the present invention, the technical solution of the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0048] like Figure 1 As shown, the 3D multi-frame file reconstruction method of this embodiment includes:
[0049] Step S1: Perform 3D multi-frame file reconstruction to obtain the reconstruction data of the 3D multi-frame file;
[0050] Step S2: Write the reconstructed data into a reconstructed data file in point cloud format;
[0051] Step S3: When it is necessary to open a 3D multi-frame file, load the reconstruction data file and parse the reconstruction data in the reconstruction data file.
[0052] Step S1 can be used for the reconstruction after the first opening of the 3D multi-frame file. During the first reconstruction, the reconstructed data can be processed in two ways: first, by writing the reconstructed data into a point cloud format reconstructed data file in step S2; second, by rasterizing the reconstructed data and displaying it on the screen, thus completing the first reconstruction. In subsequent reconstructions, when the 3D multi-frame file needs to be opened, the reconstructed data file is directly loaded and the reconstructed data within it is parsed. Then, the reconstructed data is rasterized and displayed on the screen, achieving this for every subsequent reconstruction. Since subsequent reconstructions can directly obtain the reconstructed data from the reconstructed data file, a complex reconstruction process is unnecessary, greatly reducing the reconstruction time of the 3D multi-frame file.
[0053] In this embodiment, during the initial 3D multi-frame file reconstruction, the entire 3D multi-frame file can be treated as a single computational task and deployed to the CPU and / or GPU of the reconstruction system for single-threaded processing. However, single-threaded reconstruction is inefficient, leading to increased reconstruction time. To improve the efficiency of the initial reconstruction, step S1 of this embodiment, performing 3D multi-frame file reconstruction, may include:
[0054] Perform volume or surface rendering on 3D multi-frame files in parallel slicing to obtain multiple reconstructed memory data, and then perform parallel reconstruction on the multiple reconstructed memory data.
[0055] The principle of parallel slicing for volume rendering and surface rendering is as follows: Figure 2 As shown, let the slicing parameter be k. The larger K is, the more slices are created, the slower the computation performance, the greater the hardware resource consumption, the larger the reconstructed data file, and the better the reconstruction effect. K=2 n Here, n is a positive integer. The number of parallel slices for face rendering equals resolution * number of frames / K, and the number of parallel slices for volume rendering equals resolution * K. This is equivalent to dividing a large 3D multi-frame file into multiple smaller reconstruction memory data sets through parallel slicing, and then performing parallel reconstruction on these smaller reconstruction memory data sets. Each reconstruction memory data set is a computational task, and multiple computational tasks can be deployed to multiple CPU cores and / or GPUs for multi-threaded parallel processing. Parallel processing is highly efficient and can reduce the time spent in the reconstruction process.
[0056] The reconstruction system in this embodiment is generally a computer. The lower the CPU utilization of the computer, the smoother the system runs. For systems with GPUs, computational tasks should be prioritized for processing on the GPU to reduce CPU utilization. Furthermore, volume rendering algorithms are more complex and produce better reconstruction results. With a GPU, parallel volume rendering slicing can be selected, and computational tasks should be prioritized for parallel processing on the GPU to improve reconstruction results while maintaining low CPU utilization. Therefore, step S1, performing parallel volume rendering or surface rendering slicing on the 3D multi-frame file, can include:
[0057] Determine whether the reconstruction system for 3D multi-frame files has a GPU;
[0058] If a GPU is available, volume rendering and parallel slicing are performed on the 3D multi-frame files, and the GPU is used preferentially to perform parallel reconstruction of multiple reconstruction memory data.
[0059] Otherwise, the 3D multi-frame file is sliced in parallel for surface rendering, and the CPU of the reconstruction system is used to perform parallel reconstruction of multiple reconstruction memory data.
[0060] When the system has a GPU, volume rendering parallel slicing can improve reconstruction results. Complex volume rendering algorithms prioritize GPU usage, only allocating remaining computational tasks to the CPU when the GPU is fully loaded, resulting in low CPU utilization and smoother system operation. When the system does not have a GPU, surface rendering algorithms are relatively simpler, and the reconstructed memory data obtained from surface rendering parallel slicing has a relatively lower CPU utilization.
[0061] In this embodiment, 3D multi-frame file reconstruction may further include:
[0062] Determine whether the reconstruction system for 3D multi-frame files has a GPU;
[0063] If a GPU is available, the reconstruction of 3D multi-frame files will be performed based on the first threshold, with the GPU's maximum utilization rate being 100% and the maximum physical memory utilization rate of the reconstruction system being 100%.
[0064] If a GPU is not available, the reconstruction of 3D multi-frame files is based on the maximum physical memory usage of the reconstruction system as a first threshold and the maximum CPU usage as a second threshold; both the first and second thresholds are less than 100%.
[0065] The first and second thresholds can be set to 75%. Limiting the maximum physical memory and CPU usage in this way can minimize the impact on system smoothness during the first rebuild process.
[0066] like Figure 3 As shown, this embodiment also provides a 3D multi-frame file reconstruction device, including:
[0067] The reconstruction module is used to reconstruct 3D multi-frame files and obtain the reconstruction data of the 3D multi-frame files.
[0068] The writing module is used to write the reconstructed data into the reconstructed data file in point cloud format;
[0069] The loading module is used to load the reconstruction data file and parse the reconstruction data in the reconstruction data file when it is necessary to open a 3D multi-frame file.
[0070] Furthermore, the reconstruction module performs 3D multi-frame file reconstruction, which may include:
[0071] Perform volume or surface rendering on 3D multi-frame files in parallel slicing to obtain multiple reconstructed memory data, and then perform parallel reconstruction on the multiple reconstructed memory data.
[0072] Furthermore, the reconstruction module performs volume rendering or surface rendering on the 3D multi-frame file in parallel slicing to obtain multiple reconstruction memory data. Parallel reconstruction of these multiple reconstruction memory data can include:
[0073] Determine whether the reconstruction system for 3D multi-frame files has a GPU;
[0074] If a GPU is available, volume rendering and parallel slicing are performed on the 3D multi-frame files, and the GPU is used preferentially to perform parallel reconstruction of multiple reconstruction memory data.
[0075] Otherwise, the 3D multi-frame file is sliced in parallel for surface rendering, and the CPU of the reconstruction system is used to perform parallel reconstruction of multiple reconstruction memory data.
[0076] Furthermore, the reconstruction module, which performs 3D multi-frame file reconstruction, may also include:
[0077] Determine whether the reconstruction system for 3D multi-frame files has a GPU;
[0078] If a GPU is available, the reconstruction of 3D multi-frame files will be performed based on the first threshold, with the GPU's maximum utilization rate being 100% and the maximum physical memory utilization rate of the reconstruction system being 100%.
[0079] If a GPU is not available, the reconstruction of 3D multi-frame files is based on the first threshold of the maximum physical memory usage of the reconstruction system and the second threshold of the maximum CPU usage.
[0080] Both the first and second thresholds are less than 100%.
[0081] Based on the same inventive concept as the 3D multi-frame file reconstruction method described above, this embodiment also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps of any of the methods described above for 3D multi-frame file reconstruction.
[0082] The bus architecture (represented by a bus) can include any number of interconnected buses and bridges, linking various circuits including one or more processors (represented by a processor) and memory (represented by memory). The bus can also link various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. The bus interface provides an interface between the bus and receivers and transmitters. Receivers and transmitters can be the same element, a transceiver, providing a unit for communicating with various other devices over a transmission medium. The processor is responsible for managing the bus and general processing, while memory can be used to store data used by the processor during operation.
[0083] Since the electronic device described in this embodiment is the electronic device used to implement the 3D multi-frame file reconstruction method in this embodiment of the invention, those skilled in the art can understand the specific implementation method and various variations of the electronic device in this embodiment based on the 3D multi-frame file reconstruction method described in this embodiment of the invention. Therefore, how the electronic device implements the method in this embodiment of the invention will not be described in detail here. Any electronic device used by those skilled in the art to implement the 3D multi-frame file reconstruction method in this embodiment of the invention falls within the scope of protection of this invention.
[0084] Based on the same inventive concept as the above-described 3D multi-frame file reconstruction method, the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements any of the above-described 3D multi-frame file reconstruction methods.
[0085] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0086] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 The computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0087] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0088] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.
[0089] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A method for reconstructing 3D multi-frame files, characterized in that, include: Perform 3D multi-frame file reconstruction to obtain the reconstruction data of the 3D multi-frame file; The 3D multi-frame file reconstruction includes: The 3D multi-frame file is sliced in parallel for volume rendering or surface rendering to obtain multiple reconstructed memory data, and the multiple reconstructed memory data are reconstructed in parallel. The reconstructed data is written into a reconstructed data file in point cloud format; When the 3D multi-frame file needs to be opened, the reconstruction data file is loaded and the reconstruction data in the reconstruction data file is parsed.
2. The 3D multi-frame file reconstruction method as described in claim 1, characterized in that, The process of performing volume rendering or surface rendering and parallel slicing on the 3D multi-frame file to obtain multiple reconstructed memory data, and performing parallel reconstruction on the multiple reconstructed memory data, includes: Determine whether the reconstruction system for the 3D multi-frame file has a GPU; If the GPU is available, the 3D multi-frame file is rendered in volume and sliced in parallel, and the GPU is preferentially used to perform parallel reconstruction of multiple reconstruction memory data. Otherwise, the 3D multi-frame file is rendered in parallel slices, and the CPU of the reconstruction system is used to perform parallel reconstruction on multiple reconstruction memory data.
3. The 3D multi-frame file reconstruction method as described in claim 1, characterized in that, The 3D multi-frame file reconstruction includes: Determine whether the reconstruction system for the 3D multi-frame file has a GPU; If the GPU is available, the reconstruction of the 3D multi-frame file is performed based on a first threshold, with the GPU's maximum utilization rate being 100% and the reconstruction system's maximum physical memory utilization rate being 100%. If the GPU is not available, the reconstruction of the 3D multi-frame file is performed based on the maximum physical memory usage of the reconstruction system as a first threshold and the maximum CPU usage as a second threshold. Both the first threshold and the second threshold are less than 100%.
4. A 3D multi-frame file reconstruction device, characterized in that, include: The reconstruction module is used to reconstruct 3D multi-frame files and obtain the reconstruction data of the 3D multi-frame files. The reconstruction module performs 3D multi-frame file reconstruction, including: The 3D multi-frame file is sliced in parallel for volume rendering or surface rendering to obtain multiple reconstructed memory data, and the multiple reconstructed memory data are reconstructed in parallel. The writing module is used to write the reconstructed data into a reconstructed data file in point cloud format; The loading module is used to load the reconstruction data file and parse the reconstruction data in the reconstruction data file when the 3D multi-frame file needs to be opened.
5. The 3D multi-frame file reconstruction apparatus as described in claim 4, characterized in that, The reconstruction module performs volume rendering or surface rendering and parallel slicing on the 3D multi-frame file to obtain multiple reconstruction memory data. Parallel reconstruction is then performed on these multiple reconstruction memory data, including: Determine whether the reconstruction system for the 3D multi-frame file has a GPU; If the GPU is available, the 3D multi-frame file is rendered in volume and sliced in parallel, and the GPU is preferentially used to perform parallel reconstruction of multiple reconstruction memory data. Otherwise, the 3D multi-frame file is rendered in parallel slices, and the CPU of the reconstruction system is used to perform parallel reconstruction on multiple reconstruction memory data.
6. The 3D multi-frame file reconstruction apparatus as described in claim 4, characterized in that, The reconstruction module performs 3D multi-frame file reconstruction, including: Determine whether the reconstruction system for the 3D multi-frame file has a GPU; If the GPU is available, the reconstruction of the 3D multi-frame file is performed based on a first threshold, with the GPU's maximum utilization rate being 100% and the reconstruction system's maximum physical memory utilization rate being 100%. If the GPU is not available, the reconstruction of the 3D multi-frame file is performed based on the maximum physical memory usage of the reconstruction system as a first threshold and the maximum CPU usage as a second threshold. Both the first threshold and the second threshold are less than 100%.
7. An electronic device, characterized in that, The method includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the 3D multi-frame file reconstruction method according to any one of claims 1-3.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the 3D multi-frame file reconstruction method according to any one of claims 1-3.
Citation Information
Patent Citations
Mobile device multi-frame three-dimensional image processing method and system
CN115952139A
High-resolution image reconstruction acceleration method and system, medium, equipment and terminal
CN116188679A
