CN112669427A - Distance sampling method, device, equipment and storage medium - Google Patents

Distance sampling method, device, equipment and storage medium Download PDF

Info

Publication number
CN112669427A
CN112669427A CN202011594080.XA CN202011594080A CN112669427A CN 112669427 A CN112669427 A CN 112669427A CN 202011594080 A CN202011594080 A CN 202011594080A CN 112669427 A CN112669427 A CN 112669427A
Authority
CN
China
Prior art keywords
point
data block
data
sampling
attenuation coefficient
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011594080.XA
Other languages
Chinese (zh)
Inventor
张晓健
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai United Imaging Healthcare Co Ltd
Original Assignee
Shanghai United Imaging Healthcare Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai United Imaging Healthcare Co Ltd filed Critical Shanghai United Imaging Healthcare Co Ltd
Priority to CN202011594080.XA priority Critical patent/CN112669427A/en
Publication of CN112669427A publication Critical patent/CN112669427A/en
Priority to PCT/CN2021/142746 priority patent/WO2022143835A1/en
Priority to US18/343,730 priority patent/US20230360312A1/en
Pending legal-status Critical Current

Links

Images

Abstract

The application relates to a distance sampling method, a distance sampling device, computer equipment and a storage medium, wherein three-dimensional stereo data of a target object is divided into a plurality of data blocks, voxel points in each data block are compensated for virtual particles, each data block is generated into a uniform data block with the attenuation coefficient of each voxel point being the maximum attenuation coefficient, then a target sampling point is determined in a predetermined light transmission direction according to a light starting point and the attenuation distance of the maximum attenuation coefficient, and if the target sampling point is a real particle without compensating for the virtual particles, the distance sampling is determined to be effective distance sampling. The method realizes the quick positioning of the target sampling point, quickly improves the distance sampling speed and greatly improves the overall performance of the physical rendering algorithm.

Description

Distance sampling method, device, equipment and storage medium
Technical Field
The present application relates to the field of image processing, and in particular, to a distance sampling method, apparatus, device, and storage medium.
Background
The physical rendering technology is used for simulating a real scene and then performing mathematical modeling on real propagation interactive behaviors of light rays in a physical medium to finish high-fidelity rendering of the scene.
Taking the medical field as an example, when 3D medical image data is rendered to be plotted, the method has important clinical significance for ensuring real-time interactivity and low delay of a user for viewing the rendered image in real time. After multiple rendering iterations, the final 2D image with high signal-to-noise ratio can be rendered by the aid of the Monte Carlo rendering-based progressive physical rendering technology. In the physical rendering algorithm based on the Monte Carlo, different light transmission modes such as direct illumination, surface scattering BSDF (back scattering), volume scattering and the like exist, and distance sampling is one of the determining factors of the sampling position of a scattering point in the light transmission process, so that the speed of the distance sampling algorithm has an important influence on the overall performance of the physical rendering algorithm.
However, in the prior art, the distance sampling algorithm has a problem of low efficiency, so that the overall performance of the physical rendering algorithm is low.
Disclosure of Invention
Therefore, it is necessary to provide a distance sampling method, apparatus, device and storage medium for solving the above technical problems, so as to improve the efficiency of the distance sampling algorithm and greatly improve the overall performance of the physical rendering algorithm.
In a first aspect, an embodiment of the present application provides a distance sampling method, where the method includes:
dividing three-dimensional stereo data of a target object into a plurality of data blocks; the data block comprises a plurality of voxel points;
compensating the voxel points in each data block for virtual particles, and generating uniform data blocks with the attenuation coefficients of the individual voxel points being the maximum attenuation coefficients for each data block;
determining a target sampling point in a predetermined light transmission direction according to the light starting point and the attenuation distance of the maximum attenuation coefficient;
and if the target sampling point is a real particle of the uncompensated virtual particle, determining the distance sampling as effective distance sampling.
In one embodiment, the dividing the three-dimensional stereo data of the target object into a plurality of data blocks includes:
according to the first resolution of the three-dimensional data, equally dividing the three-dimensional data into a plurality of data blocks with the same second resolution; the second resolution is less than the first resolution.
In one embodiment, the dividing the three-dimensional stereo data of the target object into a plurality of data blocks includes:
dividing the three-dimensional data into data blocks with pyramid structures according to the first resolution of the three-dimensional data; the gold tower structure comprises N layers, wherein N is more than or equal to 2; the resolution of the data blocks of each layer of the pyramid structure is sequentially reduced, and the number of the data blocks is recursively increased; the resolution of the top data block of the pyramid structure is a first resolution.
In one embodiment, before generating the uniform data blocks with the largest attenuation coefficients for the individual pixel points from the data blocks, the method includes:
obtaining the attenuation coefficient of each individual pixel point in each data block;
and determining the maximum attenuation coefficient of the attenuation coefficients of the individual pixel points as the maximum attenuation coefficient of the corresponding data block.
In one embodiment, the compensating the voxel points in each data block for virtual particles, and generating a uniform data block with the attenuation coefficient of each voxel point being the maximum attenuation coefficient for each data block, includes:
acquiring reference voxel points of which the attenuation coefficients are not the maximum attenuation coefficients in each data block;
adding virtual particles to each reference voxel point, and compensating the attenuation coefficient of each reference voxel point to be the maximum attenuation coefficient;
and after the attenuation coefficient of the reference voxel point in each data block is compensated to be the maximum attenuation coefficient, obtaining a uniform data block corresponding to each data block.
In one embodiment, before the determining the distance sample as the valid distance sample, the method further comprises:
acquiring the probability of real particles in the reference voxel points compensated with the virtual particles and the probability of real particles in the voxel points uncompensated with the virtual particles in each data block;
determining whether the target sampling point is the real particle of the uncompensated virtual particle or not according to the probability of the real particle in the reference voxel point of each compensated virtual particle and the probability of the real particle in the voxel point of the uncompensated virtual particle;
if the target sampling point is a real particle, determining the distance sampling as effective distance sampling;
and if the target sampling point is not the real particle, the step of determining the target sampling point is executed again by taking the target sampling point as a new starting point until the determined target sampling point is the real particle.
In one embodiment, the determining the target sampling point in the predetermined light transmission direction according to the light starting point and the attenuation distance of the maximum attenuation coefficient includes:
calculating the intersection point of the straight line and each data block in the light transmission direction;
determining a data block to which a target sampling point belongs according to the intersection point;
and determining the target sampling points according to the coordinate positions of the target sampling points in the data blocks.
In a second aspect, an embodiment of the present application provides a distance sampling apparatus, including:
the dividing module is used for dividing the three-dimensional stereo data of the target object into a plurality of data blocks; the data block comprises a plurality of voxel points;
the compensation module is used for compensating the voxel points in each data block for virtual particles and generating uniform data blocks with the attenuation coefficients of the individual voxel points being the maximum attenuation coefficients for each data block;
the determining module is used for determining a target sampling point in a predetermined light transmission direction according to the light starting point and the attenuation distance of the maximum attenuation coefficient;
and the sampling module is used for determining the distance sampling as effective distance sampling if the target sampling point is a real particle of the uncompensated virtual particle.
In a third aspect, an embodiment of the present application provides a computer device, including a memory and a processor, where the memory stores a computer program, and the processor implements the method steps of any one of the foregoing first aspects when executing the computer program.
In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method steps of any one of the embodiments in the first aspect.
According to the distance sampling method, the distance sampling device, the computer equipment and the storage medium, three-dimensional data of a target object is divided into a plurality of data blocks, virtual particles are compensated for voxel points in each data block, each data block is generated into an even data block with the attenuation coefficient of each voxel point being the maximum attenuation coefficient, then a target sampling point is determined in a predetermined light transmission direction according to the attenuation distance between a light starting point and the maximum attenuation coefficient, and if the target sampling point is a real particle without compensating the virtual particles, the distance sampling is determined to be effective distance sampling. According to the method, three-dimensional data is divided into a plurality of data blocks, each data block is generated into uniform data blocks in a mode of adding virtual particles, the transmission direction of light rays in a uniform medium is a straight line, a target sampling point is determined based on the intersection of the light ray transmission straight line and each data block, the target sampling point is rapidly positioned, the distance sampling speed is rapidly increased, and particularly when the distance sampling algorithm is applied to the three-dimensional rendering of anisotropic three-dimensional medical image data and high-resolution medical image data, the overall performance of a physical rendering algorithm is greatly improved.
Drawings
FIG. 1 is a diagram of an exemplary application environment for a distance sampling method in one embodiment;
FIG. 2 is a schematic flow chart of distance sampling provided in one embodiment;
FIG. 3 is a schematic diagram of light rays incident on three-dimensional volume data according to another embodiment;
FIG. 4 is a diagram illustrating a uniform partition of data blocks provided in one embodiment;
FIG. 5 is a schematic diagram of a pyramid-structured data block according to an embodiment;
FIG. 6 is a schematic diagram of a distance sampling process provided in another embodiment;
FIG. 7 is a schematic diagram of a distance sampling process provided in another embodiment;
FIG. 8 is a schematic diagram of a distance sampling process provided in another embodiment;
FIG. 9 is a schematic diagram illustrating intersection of evenly divided data blocks with light rays according to one embodiment;
FIG. 10 is a schematic diagram illustrating intersection of pyramid-structured data blocks with light rays according to an embodiment;
FIG. 11 is a schematic flow chart of distance sampling provided in another embodiment;
FIG. 12 is a flow chart of distance sampling provided in one embodiment;
fig. 13 is a block diagram of a distance sampling apparatus provided in an embodiment;
FIG. 14 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The distance sampling method provided by the application can be applied to the application environment shown in fig. 1. The computer device may include, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, among others. The internal structure of the computer device can be seen in fig. 1, and the processor in fig. 1 is used for providing calculation and control capability. The memory includes a nonvolatile storage medium, an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database is used for storing relevant data in the distance sampling process. The network interface is used for communicating with other external devices through network connection. The computer program is executed by a processor to implement a distance sampling method.
For non-uniform three-dimensional medical image data, in order to fully describe the effect of global illumination, such as the effects of camera depth, shadow, micro-surface scattering, etc., a physical rendering algorithm based on monte carlo may be generally adopted to complete the progressive rendering of the image. The flow of the stereo rendering algorithm (taking Monte Carlo algorithm as an example) is divided into five substeps: in the first step, each pixel randomly samples a ray from the virtual camera, and the process can combine the aperture and the focal length to realize the depth of field effect and process the front sawtooth of the image. And secondly, determining a scattering position along the direction of the visible ray according to a distance sampling algorithm, and if the distance sampling is larger than the range of the surrounding boundary of the three-dimensional data, selecting the ambient light, and outputting the brightness after attenuation. Otherwise, executing the third step; and thirdly, calculating an emission item at the current scattering point and calculating the direct illumination of the current scattering point. And fourthly, determining the light scattering direction of the ray after the ray is irradiated into the scattering point according to the BSDF or the volume scattering. And fifthly, adopting a Russian roulette to determine whether the current light is completely absorbed, if so, outputting the light brightness, otherwise, turning to the second step.
For non-uniform medical image data, some distance sampling algorithms in the conventional technology need to simulate continuous integration through summation of discrete samples, resulting in long time consumption of the distance sampling algorithms. In some distance sampling algorithms, when the maximum attenuation coefficient of non-uniform volume data is large, the local attenuation coefficient is small, so that the sampling distance is shortened, the probability of sampling to an effective point is reduced, the light sampling frequency is increased rapidly, the sampling efficiency is lowered, and the algorithm performance is reduced. Based on this, embodiments of the present application provide a distance sampling method, apparatus, computer device, and storage medium, which can improve the efficiency of a distance sampling algorithm and greatly improve the overall performance of a physical rendering algorithm. Particularly, when the method is used for three-dimensional rendering of anisotropic three-dimensional medical image data and high-resolution medical image data, on the basis of ensuring the rendering effect, the performance of a distance sampling algorithm can be effectively improved, the single rendering speed of the three-dimensional medical image data is improved, and the method has important significance for fast iterative rendering of a 2D image with low signal-to-noise ratio and high fidelity.
The following describes in detail the technical solutions of the present application and how the technical solutions of the present application solve the above technical problems by embodiments and with reference to the drawings. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. It should be noted that, in the distance sampling method provided by the present application, the execution main body of fig. 2 to fig. 12 is a computer device, where the execution main body may also be a distance sampling apparatus, where the apparatus may be implemented as part of or all of the computer device by software, hardware, or a combination of software and hardware.
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments.
In an embodiment, as shown in fig. 2, a distance sampling method is provided, where the embodiment relates to a specific process in which a computer device divides three-dimensional stereo data into a plurality of data blocks, compensates voxel points in each data block for virtual particles, generates uniform data blocks with attenuation coefficients of each voxel point being maximum attenuation coefficients for each data block, and then completes sampling of an effective distance between a light starting point and a target sampling point according to attenuation distances of the light starting point and the maximum attenuation coefficients; this embodiment comprises the steps of:
s101, dividing three-dimensional stereo data of a target object into a plurality of data blocks; the data block includes a plurality of voxel points.
The target object may be a human body, an animal body, or an inanimate object, which is not limited in this embodiment of the present application. The three-dimensional medical image data of a human body is mainly described as an example of three-dimensional stereo data, for example, the three-dimensional stereo data is non-uniform three-dimensional medical image data, or three-dimensional stereo data generated by using a preset program, and the like.
The division of the three-dimensional stereo data into a plurality of data blocks is equivalent to the division of a large cube into a plurality of different small cubes, and the specific structure of the divided small cubes can be determined according to actual conditions, for example, the three-dimensional stereo data can be uniformly divided into a plurality of data blocks, or the data blocks can be divided according to a self-defined pyramid structure. It is understood that after the three-dimensional stereo data is divided into a plurality of data blocks, the resolution of each data block is definitely smaller than the resolution of the three-dimensional stereo data, for example, the resolution of the three-dimensional stereo data is 64 × 64, and then the resolution of the divided data blocks may be 8 × 8 or 16 × 16. The divided data block includes a plurality of pixel points, for example, when the resolution of the divided data block is 4 × 4, it includes 16 pixel points.
Optionally, the manner of dividing the three-dimensional data into a plurality of data blocks may be that the three-dimensional data is input into a pre-trained neural network model, and the obtained output is the divided data blocks. The method directly adopts a pre-trained neural network model to divide the three-dimensional data into a plurality of data blocks, so that the dividing efficiency is greatly improved.
And S102, compensating the voxel points in each data block for virtual particles, and generating uniform data blocks with the attenuation coefficients of the voxel points being the maximum attenuation coefficients for each data block.
In the embodiment of the present application, the term "virtual particle" refers to an extra particle that is not present in the data block but added, that is, the extra particle is filled in the voxel point in each data block. For example, assuming that each original voxel point (which can be abstracted to a small square box) is composed of real particles, when a virtual particle is added to the voxel, the voxel point is composed of two parts, namely the virtual particle and the real particle, and the voxel without the virtual particle is composed of only the real particle.
Since the attenuation coefficients of the individual voxel points in each original data block have different sizes, if each data block divided from the original three-dimensional stereo data belongs to non-uniform volume data, and each data block is converted into uniform volume data (the attenuation coefficients of the voxels in the uniform volume data are the same), the attenuation coefficients of the voxel points in each original data block can be compensated to the same attenuation coefficient by compensating the voxel points in each data block for virtual particles.
The attenuation coefficient is a linear attenuation coefficient, a mass attenuation coefficient, an atomic attenuation coefficient, or an electronic attenuation coefficient, which reflects the energy intensity loss of the data block, for example, in diagnostic radiology, the electromagnetic radiation attenuation coefficient is a linear attenuation coefficient and a mass attenuation coefficient, which are used to determine the energy intensity loss when the data block passes through each centimeter or unit mass of the material. The maximum attenuation coefficient is the attenuation coefficient with the maximum attenuation coefficient between each voxel point in one data block.
In one mode, the attenuation coefficient of each voxel point in each data block is increased to be equal to the maximum attenuation coefficient in each data block by compensating the dummy particles, where the maximum attenuation coefficient refers to the maximum attenuation coefficient in all voxel points in each data block. It is understood that one or more voxel points corresponding to the maximum attenuation coefficient in one data block may be provided, and this is not limited in the embodiment of the present application.
For example, when compensating the virtual particle for the voxel point in each data block, the virtual particle may be compensated for each voxel point in each data block directly by a preset automatic program. The automatic program may be a pre-developed program embedded in the computer device, and is automatically executed when a trigger condition is met, where the trigger condition may be a manual input trigger instruction, or a time point trigger or a third-party device sending instruction trigger, and the like, and the embodiment of the present application is not limited thereto.
S103, determining target sampling points in the predetermined light transmission direction according to the light starting point and the attenuation distance of the maximum attenuation coefficient.
The light ray is emitted by a light source except the three-dimensional stereo data. The three-dimensional stereo data may be represented by a two-dimensional grid as shown in fig. 3, S0 represents a display surface, S1 represents a hidden surface, L0, L1 represent point light sources and area light sources, and R1, R2, R3, R4 represent several ray transmission scenes with distance sampling in fig. 3. The first is that the light ray R1 represents direct illumination, that is, illumination on the light source reaches a scattering point after being attenuated by non-uniform volume data, and the propagation direction of the light ray is not changed, where the light source includes but is not limited to light sources in the form of ambient light map, point light source, surface light source, etc.; this case means that a distance sampling is required from the scattering point to the light source. The second is a process in which the light rays R2 and R3 reach the next scattering point after passing through an explicit surface or an implicit surface in the body and after a Bidirectional reflection (BSDF) occurs on the surface, which requires distance sampling. Thirdly, after the light ray R4 is scattered at a certain scattering point in the body, distance sampling is needed in the process of reaching the next scattering point; in this case, the scattering direction and probability can be calculated using a phase function (phase function).
Based on the above step S102, after the non-uniform data blocks in the three-dimensional stereo data are converted into the uniform data blocks, any light source enters the data blocks, and the transmission of the light rays is a straight line. Then, in the straight line direction of light transmission, the light starting point is taken as one end point of distance sampling, and the attenuation distance of the maximum attenuation coefficient is taken as the sampling distance of the distance sampling, so that the target sampling point of the other end point of the sampling distance can be determined. The light starting point may refer to a position of a light source, or a starting point of light entering the three-dimensional stereo data may be used as the light starting point according to an actual situation, which is not limited in the embodiment of the present application.
Generally, distance sampling can be understood as determining the distance between two points, and therefore, after a target sampling point is determined, it means that distance sampling between a light starting point and the target sampling point is completed.
And S104, if the target sampling point is a real particle of the uncompensated virtual particle, determining the distance sampling as effective distance sampling.
The determination of the target sampling point is based on the premise that each data block of the three-dimensional stereo data generates the uniform volume data in a mode of filling the virtual particles, so that if the determined target sampling point just falls on the filled virtual particles, the determined target sampling point does not exist, that is, the distance sampling fails because the determined target sampling point is not effective distance sampling at this time.
Therefore, after the target sampling point is determined, whether the target sampling point is a real particle of the uncompensated virtual particle needs to be judged, and if the target sampling point is the real particle, the distance sampling can be determined to be effective distance sampling, namely the distance sampling is successfully performed. Otherwise, distance sampling needs to be carried out again, namely the target sampling point needs to be determined again until the determined target sampling point is a real particle.
In this embodiment, three-dimensional stereo data of a target object is divided into a plurality of data blocks, virtual particles are compensated for voxel points in each data block, each data block generates a uniform data block in which attenuation coefficients of each voxel point are maximum attenuation coefficients, then a target sampling point is determined in a predetermined light transmission direction according to a light starting point and an attenuation distance of the maximum attenuation coefficient, distance sampling between the light starting point and the target sampling point is completed, and if the target sampling point is a real particle of an uncompensated virtual particle, the distance sampling is determined to be effective distance sampling. According to the method, three-dimensional data is divided into a plurality of data blocks, each data block is generated into uniform data blocks in a mode of adding virtual particles, the transmission direction of light rays in a uniform medium is a straight line, a target sampling point is determined based on the intersection of the light ray transmission straight line and each data block, the target sampling point is rapidly positioned, the distance sampling speed is rapidly increased, and particularly when the distance sampling algorithm is applied to the three-dimensional rendering of anisotropic three-dimensional medical image data and high-resolution medical image data, the overall performance of a physical rendering algorithm is greatly improved.
Based on the above embodiments, a process of dividing the three-dimensional stereo data of the target object into a plurality of data blocks in the step S101, which is a specific process in different embodiments, will be described. In one embodiment, the step S101 includes: according to the first resolution of the three-dimensional data, equally dividing the three-dimensional data into a plurality of data blocks with the same second resolution; the second resolution is less than the first resolution.
The second resolution in this embodiment is smaller than the first resolution, where specific resolutions of the first resolution and the second resolution are not limited in this embodiment, and may be arbitrarily defined according to practical situations, for example, the first resolution and the second resolution may be any one of 4x4, 8x8, and 16x16, or may be other resolutions.
Assuming that the first resolution is high resolution and the second resolution is low resolution, the embodiment divides the high-resolution three-dimensional stereo data into a plurality of low-resolution data blocks, for example, as shown in fig. 4, the high-resolution three-dimensional stereo data of 16 × 16 is divided into a plurality of 4 × 4 low-resolution data blocks. Similarly, the data blocks are also stereoscopic data, each data block includes a plurality of voxels, and the length and width of each data block can be arbitrarily defined, for example, one data block includes 32 × 32 voxels.
In another embodiment, the S101 includes: dividing the three-dimensional data into data blocks with pyramid structures according to the first resolution of the three-dimensional data; the gold tower structure comprises N layers, wherein N is more than or equal to 2; the resolution of the data blocks of each layer of the pyramid structure is sequentially reduced, and the number of the data blocks is recursively increased; the resolution of the top data block of the pyramid structure is a first resolution.
In this embodiment, still taking the example that the first resolution is high resolution and the second resolution is low resolution as an example, the three-dimensional data is divided into data blocks with a pyramid structure according to the first resolution of the three-dimensional data, that is, the three-dimensional data with high resolution is divided into data blocks with a pyramid structure.
The constructed gold-seed tower structure comprises N layers, wherein N is more than or equal to 2; the resolution of the data blocks of each layer of the pyramid structure is sequentially reduced, and the number of the data blocks is recursively increased; the resolution of the top data block of the pyramid structure is a first resolution. Wherein the specific value of N can be defined according to actual conditions.
The process of dividing the data blocks in this embodiment is described by taking N as an example, as shown in fig. 5, fig. 5 shows the pyramid structure by a two-dimensional grid, the resolution of the three-dimensional stereo data is 16 × 16, the first layer is the data blocks of the parent node of the pyramid structure (the grid of the parent node of the first layer is illustrated in fig. 5), the resolution of the data blocks of the parent node of the pyramid structure is also 16 × 16, the second layer divides the data blocks of the parent node into data blocks of eight child nodes (the grid of eight child nodes of the parent node of the second layer is illustrated in fig. 5), and recursion is sequentially performed, and the third layer divides the data blocks of the eight child nodes into data blocks of eight child nodes (the grid of eight child nodes divided by the grid of the eight child nodes of the third layer is illustrated in fig. 5). In this embodiment, each data block also includes a plurality of voxels, and the number of voxels included in the data block at the bottom layer after the pyramid structure is obtained can be obtained by calculation, for example, in fig. 5, the resolution of the first layer is 16 × 16, after the data block is divided into the third layer, the third layer is the bottom layer, and each data block (corresponding to one grid) includes 4 × 4 voxels.
In this embodiment, a data block of the pyramid structure is constructed in the preprocessing stage, the three-dimensional stereo data is divided into data blocks of different dimensions, and the dimension of the data block closer to the top end of the pyramid is larger, so that, especially for the high-resolution three-dimensional stereo data, the pyramid structure is used to introduce the data blocks of different dimensions to perform distance sampling, and the algorithm speed of the distance sampling can be further increased.
Since the attenuation coefficient of each voxel point in the uniform data block generated from each data block is the maximum attenuation coefficient, which is the maximum attenuation coefficient of all voxel points in each data block before uncompensation, the maximum attenuation coefficient in each data block needs to be determined before the uniform data block is generated in the step S102. Then in one embodiment, as shown in fig. 6, an embodiment is provided for determining the maximum attenuation coefficient in each data block, which comprises the steps of:
s201, obtaining the attenuation coefficient of each individual pixel point in each data block.
When the attenuation coefficient of each individual pixel point in each data block is obtained, the projection value of each individual pixel point can be processed through a preset algorithm, so that the attenuation coefficient of each individual pixel point is obtained. The embodiment of the present application does not limit the manner of obtaining the attenuation coefficient of each voxel point.
S202, determine the maximum attenuation coefficient of the attenuation coefficients of the individual pixel points as the maximum attenuation coefficient of the corresponding data block.
After the attenuation system of each pixel point is determined, the maximum attenuation coefficient σ max in each data block is determined in units of data blocks. The maximum attenuation coefficient σ max may be determined by sorting the attenuation coefficients of the voxels in a data block from large to small, and the top is the maximum attenuation coefficient of the data block, which is not limited in this embodiment.
After determining the maximum attenuation coefficient σ max in each data block, it may be stored for later use, e.g., in memory. In addition, the above provides two ways for dividing the data blocks, the first way is to directly divide the data blocks into a plurality of data blocks with the same low resolution, and the second way is to divide the data blocks in a pyramid structure; correspondingly, both of the two ways of dividing the data blocks can directly determine the maximum attenuation coefficient of each data block by using the steps S201 and S202. However, when determining the maximum attenuation coefficient of each data block in the second manner, according to the pyramid structure, the maximum attenuation coefficient σ max in each data block at the bottom layer of the pyramid may be determined first, stored in the memory, and then recurred upward along the pyramid to find the maximum attenuation coefficient of the data block of each node of the pyramid structure.
In this embodiment, before generating a uniform data block in which the attenuation coefficients of the individual pixel points are the maximum attenuation coefficients for each data block, the attenuation coefficient of each individual pixel point in each data block is obtained, and then the maximum attenuation coefficient of the attenuation coefficients of each individual pixel point is determined as the maximum attenuation coefficient of the corresponding data block. In the embodiment, when the maximum attenuation coefficient in each data block is determined, the attenuation coefficients of all voxels in each data block are determined, so that the accuracy of the maximum attenuation coefficient of each data block is ensured. And the implementation of the subsequent process of generating uniform data blocks with the attenuation coefficients of all the individual pixel points of all the data blocks being the maximum attenuation coefficients is ensured by the mode of predetermining the maximum attenuation coefficient in all the data blocks.
After the maximum attenuation coefficient in each data block is determined, generating uniform data blocks of which the attenuation coefficients of all the individual pixel points are the maximum attenuation coefficients for each data block based on the maximum attenuation coefficient. In one embodiment, as shown in fig. 7, the step S102 includes the following steps:
s301, obtaining a reference voxel point of which the attenuation coefficient is not the maximum attenuation coefficient in each data block.
The reference voxel point refers to a voxel point of which the attenuation coefficient is not the maximum attenuation coefficient in each data block; for example, eight voxel points P1-P8 exist in one data block, the attenuation coefficient of P5 is the maximum attenuation coefficient, and then seven voxel points P1-P4 and P6-P8 are reference voxel points.
The manner of obtaining the reference voxel point may be to determine each voxel point whose attenuation coefficient is not the maximum attenuation coefficient.
And S302, adding virtual particles to each reference voxel point, and compensating the attenuation coefficient of each reference voxel point to be the maximum attenuation coefficient.
Since the attenuation coefficient of each reference voxel point is smaller than the maximum attenuation coefficient, when the attenuation coefficient of the reference voxel point is changed to the maximum attenuation coefficient σ max, a virtual particle can be added to each reference voxel point for compensation, so that the compensated attenuation coefficient of each reference voxel point is equal to the maximum attenuation coefficient σ max. For example, if the attenuation coefficient of a reference voxel point is σ reference, then the virtual particle is compensated for the reference voxel point (σ compensation), so that σ reference + σ compensation is σ max. Wherein the size of the virtual particle compensated per reference voxel point (sigma compensation) may be different.
And S303, after the attenuation coefficients of the reference voxel points in each data block are compensated to be the maximum attenuation coefficients, obtaining uniform data blocks corresponding to each data block.
Each reference voxel point in each data block is made to have its own attenuation coefficient after compensating the virtual particle equal to the maximum attenuation coefficient of the data block to which it belongs by the way of adding the virtual particle, so that the attenuation coefficient of the voxel point in each data block becomes the maximum attenuation coefficient, which is equivalent to generating the non-uniform volume data (the original attenuation coefficients of the voxel points in each data block are not equal in size) into the corresponding uniform volume data (the attenuation coefficients of all voxel points in each data block after compensation are the maximum attenuation coefficients).
In this embodiment, by obtaining reference voxel points in each data block whose attenuation coefficients are not the maximum attenuation coefficient, and then adding virtual particles to each reference voxel point, the attenuation coefficient of each reference voxel point is compensated to be the maximum attenuation coefficient, so that the attenuation coefficients of the reference voxel points in each data block are compensated to be the maximum attenuation coefficient, and then uniform data blocks corresponding to each data block are obtained, so that all the data blocks become uniform media, which greatly facilitates the follow-up tracking of the path of light, and ensures the fast implementation of distance sampling.
When target sampling points are determined in a predetermined light transmission direction according to a light starting point and the attenuation distance of the maximum attenuation coefficient, the specific positions of the target sampling points need to be determined. As shown in fig. 8, in one embodiment, the step S103 includes the following steps:
s401, calculating the intersection point of the straight line and each data block in the light transmission direction.
After the data blocks are generated into the uniform volume data, each data block can be regarded as a uniform medium, at the moment, light rays are emitted from the light source and then irradiated into the three-dimensional data, the transmission route of the light rays is a straight line, and then the intersection point of the straight line and each data block in the transmission direction of the light rays is determined.
For the first type: the data blocks are directly divided into a plurality of data blocks with the same low resolution, as shown in fig. 9, a two-dimensional grid represents an intersection diagram of a straight line in the light transmission direction and each data block in the three-dimensional stereo data. In FIG. 9, six points d0-d6 are the intersection points of the straight line in the light transmission direction and each data block in the three-dimensional volume data.
For the second type: the data blocks are divided by the pyramid structure, as shown in fig. 10, and a two-dimensional grid represents an intersection of a straight line in the light transmission direction and each data block in the three-dimensional stereo data of the pyramid structure. In fig. 10, the intersection calculation of the straight line and the lower-layer data block is performed recursively downward starting from the data block of the parent node of the first layer and using B0 as the first-layer grid of the parent node until the sampling point is located in the third-layer grid B033 of the bottommost data block, and in fig. 10, the intersection point of the straight line and the data block of the pyramid structure in the light transmission direction is c0-c4 in the third layer.
S402, determining the data block of the target sampling point according to the intersection point.
The target sampling point is a sampling point determined according to the sampling distance determined by optical thickness sampling on a straight line in the light transmission direction. The method for determining the sampling distance of the optical thickness sampling is not limited in this embodiment, for example, the sampling distance may be determined according to the attenuation distance of the light ray in the three-dimensional stereo data, and the attenuation distance with the maximum attenuation coefficient is taken as an example in this embodiment of the present application to determine the sampling distance.
Specifically, on the straight line of the light transmission direction, the sampling distance of optical thickness sampling and the intersection point of each data block are combined to estimate the data block to which the target sampling point belongs. For example, the data block to which the estimated target sampling point (schematically indicated as hollow point f0 in fig. 9) belongs is the data block with the small right corner in fig. 9; alternatively, the data block to which the estimated target sampling point (schematically indicated as empty point f0 in fig. 10) belongs is a B033 data block in fig. 10.
And S403, determining the target sampling points according to the coordinate positions of the target sampling points in the data blocks.
And after the target sampling point is estimated in the data block, determining the coordinate position of the target sampling point according to the data block to which the target sampling point belongs, thereby determining the target sampling point. The target sampling point is a sampling point determined according to the sampling distance determined by optical thickness sampling on a straight line in the light transmission direction, so that distance sampling is performed once after the target sampling point is determined.
In this embodiment, the intersection point of the straight line and each data block in the light transmission direction is calculated, the data block to which the target sampling point belongs is determined according to the intersection point, and the target sampling point is determined according to the coordinate position of the target sampling point in the data block to which the target sampling point belongs. And the data block to which the target sampling point belongs is positioned by the intersection point of the straight line and each data block in the light transmission direction, so that the coordinates of the target sampling point are determined according to the data block to which the target sampling point belongs, and the target sampling point can be quickly determined. And for the data blocks of the pyramid structure, in the distance sampling of the light rays, traversing from the top end of the pyramid downwards, calculating the intersection of the light rays and the data blocks with different dimensions, determining the final sampled data block and the data blocks with different dimensions passing through the light ray path, and further determining the final target sampling point, so that the data blocks with the pyramid structure can be used for sampling the distance of the light rays, and the final target sampling point can be determined
As shown in fig. 11, in one embodiment, an embodiment of determining whether a target sampling point is a real particle is provided, and the embodiment includes the following steps:
s501, obtaining the probability of the real particle in the reference voxel point compensated with the virtual particle and the probability of the real particle in the voxel point uncompensated with the virtual particle in each data block.
After compensating the virtual particles for each reference voxel point in each data block, the probability of the real particles in the reference voxel points compensated with the virtual particles and the probability of the real particles in the voxel points uncompensated with the virtual particles in each data block can be determined, for example, the respective probabilities can be stored in a memory in advance and directly obtained from the memory when the probabilities need to be obtained; for example, if a voxel point in a data block is composed of 6 real particles and 10 virtual particles are compensated, the probability of the virtual particle in the reference voxel point compensated with the virtual particle is 5/8, and the probability of the real particle is 3/8. For a voxel point of an uncompensated virtual particle, the probability of its real particle is constantly 1.
Or recording the compensation details of the virtual particles in advance, and calculating the probability of the real particles in the reference voxel points compensated with the virtual particles and the probability of the real particles in the voxel points uncompensated with the virtual particles in each data block according to the recorded virtual particle compensation details when the probability needs to be acquired; for example, 16 voxel points in the data block, wherein the reference voxel points compensated by the virtual particle may be labeled (e.g., labeled with specific coordinate positions, orders, etc.), and the probability of the real particle in the reference voxel points compensated by the virtual particle and the probability of the real particle in the voxel points uncompensated by the virtual particle may be calculated according to the labels in the specific calculation. Or, acquiring the ratio of the virtual particles to the real particles in the target sampling point, wherein the ratio determines the respective probability of the virtual particles and the real particles in the target sampling point. The embodiment of the present application does not limit the manner of obtaining the probability.
S502, determining whether the target sampling point is the real particle of the uncompensated virtual particle according to the probability of the real particle in each reference voxel point with the compensated virtual particle and the probability of the real particle in the voxel point of the uncompensated virtual particle.
And judging whether the target sampling point is a voxel point added with the virtual particle, namely judging whether the target sampling point consists of the virtual particle and the real particle or only the real particle.
And judging whether the target sampling point determined by the distance sampling is a real particle or not, namely whether the target sampling point is a real particle of the uncompensated virtual particle or not based on the probability of the real particle in each reference voxel point with the compensated virtual particle and the probability of the real particle in the voxel point with the uncompensated virtual particle. For example, the probability of the real particle in the reference voxel point of each compensated virtual particle, the probability of the real particle in the voxel point of the uncompensated virtual particle, and the specific coordinates of the target sampling point are input into a preset neural network, and the obtained output result is that the target sampling point is the real particle, or the target sampling point is the virtual particle. For another example, if the real particle fraction of the target sample point is 5/8, the probability that the target sample point in this sample has 5/8 in the virtual particle fraction 3/8 is a real particle. And if the target sampling point is a voxel point of the uncompensated virtual particle, the probability of the real particle is constantly 1.
Optionally, the determination may also be performed according to the recorded marks of the virtual particles, for example, the coordinates of the target coordinate point are determined, then whether the voxel point at the coordinate position is marked is checked, if so, the target sampling point is determined to be a virtual particle, and the following step S504 is executed; otherwise, the target sampling point is a real particle, and step S503 is executed.
And S503, determining the distance samples as effective distance samples.
And when the target sampling point is determined to be the real particle, determining the distance sampling as effective distance sampling, wherein the distance sampling is successful.
And S504, the step of determining the target sampling point is executed again by taking the target sampling point as a new starting point until the determined target sampling point is a real particle.
If the target sampling point is determined not to be a real particle but a virtual particle, the distance sampling is not an effective distance sampling, the distance sampling fails, the distance sampling needs to be carried out again, and the target sampling point needs to be determined again. The method for re-determining the target sampling point is the same as the steps in the foregoing embodiments, and will not be described herein again.
Determining the target sampling point (which must be a real particle) means that one distance sampling is completed. After one distance sampling is completed, the next distance sampling can be continued based on the current target sampling point, but it should be noted that, because the distance sampling is performed on the three-dimensional stereo data of any target object in the embodiment of the present application, when the distance sampling is performed, if the determined target sampling point has reached the outside of the boundary of the three-dimensional stereo data, the distance sampling process is ended.
In this embodiment, the probability of a real particle in a reference voxel point compensated with a virtual particle and the probability of a real particle in a voxel point uncompensated with a virtual particle in each data block are obtained, and whether a target sampling point is a real particle of an uncompensated virtual particle is determined according to the probability of a real particle in a reference voxel point compensated with a virtual particle and the probability of a real particle in a voxel point uncompensated with a virtual particle, so that whether a target sampling point is a real particle structure can be determined according to the probabilities of a virtual particle and a real particle, and whether the target sampling point is an effective distance sampling point can be determined. And if the distance sampling points are effective, determining the distance sampling as the effective distance sampling, otherwise, re-determining the target sampling points until the target sampling points of the real particles are determined. The target sampling point is used as a real particle to be used as a judgment basis for successful distance sampling, so that the accuracy of distance sampling is ensured.
As shown in fig. 12, an embodiment of a distance sampling method is provided. The embodiment comprises the following steps:
s1, dividing the three-dimensional stereo data of the target object into a plurality of data blocks; the data block includes a plurality of voxel points.
According to the first resolution of the three-dimensional data, equally dividing the three-dimensional data into a plurality of data blocks with the same second resolution; the second resolution is less than the first resolution; alternatively, the first and second electrodes may be,
dividing the three-dimensional data into data blocks with pyramid structures according to the first resolution of the three-dimensional data; the gold tower structure comprises N layers, wherein N is more than or equal to 2; the resolution of the data blocks of each layer of the pyramid structure is sequentially reduced, and the number of the data blocks is recursively increased; the resolution of the top data block of the pyramid structure is a first resolution.
And S2, obtaining the attenuation coefficient of each individual pixel point in each data block.
S3, determining the maximum attenuation coefficient of the attenuation coefficients of the individual pixel points as the maximum attenuation coefficient of the corresponding data block.
And S4, acquiring the reference voxel point of which the attenuation coefficient is not the maximum attenuation coefficient in each data block.
And S5, adding virtual particles to each reference voxel point, and compensating the attenuation coefficient of each reference voxel point to be the maximum attenuation coefficient.
And S6, compensating the attenuation coefficient of the reference voxel point in each data block to be the maximum attenuation coefficient, and then obtaining the uniform data block corresponding to each data block.
S7, calculating the intersection point of the straight line and each data block in the light transmission direction.
And S8, determining the data block of the target sampling point according to the intersection point.
And S9, determining the target sampling points according to the coordinate positions of the target sampling points in the data blocks.
And S10, acquiring the probability of the real particle in the reference voxel point of the compensated virtual particle and the probability of the real particle in the voxel point of the uncompensated virtual particle in each data block.
And S11, determining whether the target sampling point is the real particle of the uncompensated virtual particle according to the probability of the real particle in the reference voxel point of each compensated virtual particle and the probability of the real particle in the voxel point of the uncompensated virtual particle.
And S12, if the target sampling point is a real particle, determining the distance sampling as effective distance sampling.
And S13, if the target sampling point is not the real particle, taking the target sampling point as a new starting point, and re-executing the step of determining the target sampling point until the determined target sampling point is the real particle.
In this embodiment, the applicable sampling manner includes distance sampling in the direct illumination process, distance sampling after surface scattering BSDF occurs, and distance sampling after bulk scattering occurs, that is, at least one distance sampling covering the whole algorithm flow such as direct illumination, surface BSDF reflected illumination, bulk scattering direction, and the like in physical rendering. Meanwhile, the method can overcome the defects of the traditional distance sampling algorithm during local sampling, namely the problems of short sampling distance and low speed caused by the maximum attenuation coefficient of the volume data, can effectively improve the performance of the distance sampling algorithm on the basis of ensuring the rendering effect, improves the single rendering speed of the three-dimensional medical image data, and has important significance for fast iterative rendering of 2D images with low signal-to-noise ratio and high fidelity.
In the steps of the distance sampling method provided in this embodiment, the implementation principle and technical effect are similar to those in the previous embodiments of the distance sampling method, and are not described herein again. The implementation manner of each step in the embodiment of fig. 12 is only an example, and is not limited to this, and the order of each step may be adjusted in practical application as long as the purpose of each step can be achieved.
It should be understood that although the various steps in the flow charts of fig. 2-12 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-12 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least some of the other steps.
In one embodiment, as shown in fig. 13, there is provided a distance sampling apparatus including: a partitioning module 10, a compensation module 11, a determination module 12 and a sampling module 13, wherein:
a dividing module 10, configured to divide three-dimensional stereo data of a target object into a plurality of data blocks; the data block comprises a plurality of voxel points;
the compensation module 11 is configured to compensate the voxel points in each data block for virtual particles, and generate a uniform data block with the attenuation coefficient of each voxel point being the maximum attenuation coefficient for each data block;
the determining module 12 is configured to determine a target sampling point in a predetermined light transmission direction according to a light starting point and an attenuation distance of a maximum attenuation coefficient;
and the sampling module 13 is configured to determine the distance sampling as the effective distance sampling if the target sampling point is a real particle of the uncompensated virtual particle.
In one embodiment, the dividing module 10 includes:
the dividing unit is used for averagely dividing the three-dimensional data into a plurality of data blocks with the same second resolution according to the first resolution of the three-dimensional data; the second resolution is less than the first resolution.
In an embodiment, the dividing unit is further configured to divide the three-dimensional stereo data into data blocks of a pyramid structure according to a first resolution of the three-dimensional stereo data; the gold tower structure comprises N layers, wherein N is more than or equal to 2; the resolution of the data blocks of each layer of the pyramid structure is sequentially reduced, and the number of the data blocks is recursively increased; the resolution of the top data block of the pyramid structure is a first resolution.
In one embodiment, the apparatus further comprises:
the attenuation coefficient acquisition module is used for acquiring the attenuation coefficient of each individual pixel point in each data block;
and the maximum attenuation coefficient determining module is used for determining the maximum attenuation coefficient in the attenuation coefficients of the individual pixel points as the maximum attenuation coefficient of the corresponding data block.
In one embodiment, the compensation module 11 comprises:
a voxel point acquisition unit for acquiring reference voxel points of which the attenuation coefficients are not the maximum attenuation coefficients in each data block;
the compensation unit is used for adding virtual particles to each reference voxel point and compensating the attenuation coefficient of each reference voxel point to be the maximum attenuation coefficient;
and the block unit is used for obtaining the uniform data blocks corresponding to the data blocks after the attenuation coefficients of the reference voxel points in the data blocks are all compensated to be the maximum attenuation coefficient.
In one embodiment, the apparatus further comprises:
a probability obtaining module, configured to obtain a probability of a real particle in a reference voxel point compensated with a virtual particle and a probability of a real particle in a voxel point uncompensated with a virtual particle in each data block;
the detection module is used for determining whether the target sampling point is the real particle of the uncompensated virtual particle according to the probability of the real particle in each reference voxel point compensated with the virtual particle and the probability of the real particle in the voxel point of the uncompensated virtual particle;
the execution module is used for determining the distance sampling as effective distance sampling if the target sampling point is a real particle; and if the target sampling point is not the real particle, the step of determining the target sampling point is executed again by taking the target sampling point as a new starting point until the determined target sampling point is the real particle.
In one embodiment, the determining module 12 comprises:
the calculating unit is used for calculating the intersection points of the straight lines and the data blocks in the light transmission direction;
the target sampling point determining unit is used for determining the data block of the target sampling point according to the intersection point; and determining the target sampling points according to the coordinate positions of the target sampling points in the data blocks.
For the specific definition of the distance sampling device, reference may be made to the above definition of the distance sampling method, which is not described herein again. The modules in the distance sampling device can be wholly or partially realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 14. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a distance sampling method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 14 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:
dividing three-dimensional stereo data of a target object into a plurality of data blocks; the data block comprises a plurality of voxel points;
compensating the voxel points in each data block for virtual particles, and generating uniform data blocks with the attenuation coefficients of the individual voxel points being the maximum attenuation coefficients for each data block;
determining a target sampling point in a predetermined light transmission direction according to the light starting point and the attenuation distance of the maximum attenuation coefficient;
and if the target sampling point is a real particle of the uncompensated virtual particle, determining the distance sampling as effective distance sampling.
The implementation principle and technical effect of the computer device provided by the above embodiment are similar to those of the above method embodiment, and are not described herein again.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
dividing three-dimensional stereo data of a target object into a plurality of data blocks; the data block comprises a plurality of voxel points;
compensating the voxel points in each data block for virtual particles, and generating uniform data blocks with the attenuation coefficients of the individual voxel points being the maximum attenuation coefficients for each data block;
determining a target sampling point in a predetermined light transmission direction according to the light starting point and the attenuation distance of the maximum attenuation coefficient;
and if the target sampling point is a real particle of the uncompensated virtual particle, determining the distance sampling as effective distance sampling.
The implementation principle and technical effect of the computer-readable storage medium provided by the above embodiments are similar to those of the above method embodiments, and are not described herein again.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method of distance sampling, the method comprising:
dividing three-dimensional stereo data of a target object into a plurality of data blocks; the data block comprises a plurality of voxel points;
compensating the voxel points in each data block for virtual particles, and generating uniform data blocks with the attenuation coefficients of the individual voxel points being the maximum attenuation coefficients for each data block;
determining a target sampling point in a predetermined light transmission direction according to the light starting point and the attenuation distance of the maximum attenuation coefficient;
and if the target sampling point is a real particle of the uncompensated virtual particle, determining the distance sampling as effective distance sampling.
2. The method of claim 1, wherein the dividing the three-dimensional volumetric data of the target object into a plurality of data blocks comprises:
according to the first resolution of the three-dimensional stereo data, equally dividing the three-dimensional stereo data into a plurality of data blocks with the same second resolution; the second resolution is less than the first resolution.
3. The method of claim 1, wherein the dividing the three-dimensional volumetric data of the target object into a plurality of data blocks comprises:
dividing the three-dimensional data into data blocks with a pyramid structure according to the first resolution of the three-dimensional data; the gold tower structure comprises N layers, wherein N is more than or equal to 2; the resolution of the data blocks of each layer of the pyramid structure is sequentially reduced, and the number of the data blocks is recursively increased; the resolution of the top data block of the pyramid structure is the first resolution.
4. A method according to any one of claims 1 to 3, wherein before said generating each of said data blocks into a uniform data block having the largest attenuation coefficient for each individual pixel point, said method comprises:
obtaining the attenuation coefficient of each individual pixel point in each data block;
and determining the maximum attenuation coefficient of the attenuation coefficients of the individual pixel points as the maximum attenuation coefficient of the corresponding data block.
5. The method of claim 4, wherein the compensating the voxel points in each of the data blocks for virtual particles, and generating each of the data blocks as a uniform data block with the attenuation coefficient of each of the voxel points being the maximum attenuation coefficient, comprises:
acquiring a reference voxel point of which the attenuation coefficient is not the maximum attenuation coefficient in each data block;
adding virtual particles to each reference voxel point, and compensating the attenuation coefficient of each reference voxel point to be the maximum attenuation coefficient;
and after the attenuation coefficient of the reference voxel point in each data block is compensated to the maximum attenuation coefficient, obtaining a uniform data block corresponding to each data block.
6. The method of any of claims 1-3, wherein prior to the determining the range sample as the valid range sample, the method further comprises:
obtaining the probability of real particles in the reference voxel points compensated with the virtual particles and the probability of real particles in the voxel points uncompensated with the virtual particles in each data block;
determining whether the target sampling point is a real particle of an uncompensated virtual particle according to the probability of the real particle in each reference voxel point of the compensated virtual particle and the probability of the real particle in the voxel point of the uncompensated virtual particle;
if the target sampling point is the real particle, determining the distance sampling as effective distance sampling;
and if the target sampling point is not the real particle, re-executing the step of determining the target sampling point by taking the target sampling point as a new starting point until the determined target sampling point is the real particle.
7. The method according to any one of claims 1 to 3, wherein the determining the target sampling point in the predetermined light transmission direction according to the attenuation distance between the light starting point and the maximum attenuation coefficient comprises:
calculating the intersection point of the straight line and each data block in the light transmission direction;
determining the data block of the target sampling point according to the intersection point;
and determining the target sampling points according to the coordinate positions of the target sampling points in the data blocks.
8. A distance sampling apparatus, characterized in that the apparatus comprises:
the dividing module is used for dividing the three-dimensional stereo data of the target object into a plurality of data blocks; the data block comprises a plurality of voxel points;
the compensation module is used for compensating the voxel points in each data block for virtual particles and generating uniform data blocks with the attenuation coefficients of the individual voxel points being the maximum attenuation coefficients for each data block;
the determining module is used for determining a target sampling point in a predetermined light transmission direction according to a light starting point and the attenuation distance of the maximum attenuation coefficient;
and the sampling module is used for determining the distance sampling as the effective distance sampling if the target sampling point is a real particle of the uncompensated virtual particle.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202011594080.XA 2020-12-29 2020-12-29 Distance sampling method, device, equipment and storage medium Pending CN112669427A (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN202011594080.XA CN112669427A (en) 2020-12-29 2020-12-29 Distance sampling method, device, equipment and storage medium
PCT/CN2021/142746 WO2022143835A1 (en) 2020-12-29 2021-12-29 Systems and methods for image processing
US18/343,730 US20230360312A1 (en) 2020-12-29 2023-06-28 Systems and methods for image processing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011594080.XA CN112669427A (en) 2020-12-29 2020-12-29 Distance sampling method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112669427A true CN112669427A (en) 2021-04-16

Family

ID=75411911

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011594080.XA Pending CN112669427A (en) 2020-12-29 2020-12-29 Distance sampling method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112669427A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022143835A1 (en) * 2020-12-29 2022-07-07 Shanghai United Imaging Healthcare Co., Ltd. Systems and methods for image processing

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110228055A1 (en) * 2010-03-22 2011-09-22 Microsoft Corporation Space skipping for multi-dimensional image rendering
US20120212496A1 (en) * 2011-02-17 2012-08-23 Sony Pictures Technologies Inc. System and method for decoupled ray marching for production ray tracking in inhomogeneous participating media
CN111080765A (en) * 2019-12-23 2020-04-28 北京工业大学 Ray tracing volume rendering method based on gradient sampling
US20200342653A1 (en) * 2019-04-25 2020-10-29 Case Western Reserve University Systems, methods, and media for rendering voxel-based 3d content

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110228055A1 (en) * 2010-03-22 2011-09-22 Microsoft Corporation Space skipping for multi-dimensional image rendering
US20120212496A1 (en) * 2011-02-17 2012-08-23 Sony Pictures Technologies Inc. System and method for decoupled ray marching for production ray tracking in inhomogeneous participating media
US20200342653A1 (en) * 2019-04-25 2020-10-29 Case Western Reserve University Systems, methods, and media for rendering voxel-based 3d content
CN111080765A (en) * 2019-12-23 2020-04-28 北京工业大学 Ray tracing volume rendering method based on gradient sampling

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
LEGRADY, D; MOLNAR, B;KLAUSZ, M ; MAJOR, T: "Woodcock tracking with arbitrary sampling cross section using negative weights", 《ANNALS OF NUCLEAR ENERGY》 *
张晓雨: "非均匀介质的无偏光子聚集算法", 《中国优秀博硕士学位论文全文数据库(硕士) 信息科技辑》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022143835A1 (en) * 2020-12-29 2022-07-07 Shanghai United Imaging Healthcare Co., Ltd. Systems and methods for image processing

Similar Documents

Publication Publication Date Title
US11107272B2 (en) Scalable volumetric 3D reconstruction
EP3501010B1 (en) Rendering operations using sparse volumetric data
US10706611B2 (en) Three-dimensional representation by multi-scale voxel hashing
CN112669463B (en) Method for reconstructing curved surface of three-dimensional point cloud, computer device and computer-readable storage medium
US7773088B2 (en) Simultaneous simulation of markov chains using quasi-monte carlo techniques
US20210350560A1 (en) Depth estimation
US10755474B1 (en) Method of processing a volumetric dataset and a method of rendering a volumetric dataset
CN111640180B (en) Three-dimensional reconstruction method and device and terminal equipment
US8963920B2 (en) Image processing apparatus and method
WO2023142607A1 (en) Image rendering method and apparatus, and device and medium
US20210264659A1 (en) Learning hybrid (surface-based and volume-based) shape representation
US9117254B2 (en) System, method, and computer program product for performing ray tracing
CN112669427A (en) Distance sampling method, device, equipment and storage medium
EP2937838B1 (en) Information processing apparatus, control method, program and storage medium
CN116012520B (en) Shadow rendering method, shadow rendering device, computer equipment and storage medium
CN114596401A (en) Rendering method, device and system
CN111870953A (en) Height map generation method, device, equipment and storage medium
CN115713584A (en) Method, system, device and storage medium for rendering volume cloud based on directed distance field
US20180330514A1 (en) Selective 3d registration
CN115375836A (en) Point cloud fusion three-dimensional reconstruction method and system based on multivariate confidence filtering
CN115619986A (en) Scene roaming method, device, equipment and medium
Campagnolo et al. An experimental study on volumetric visualization of black oil reservoir models
CN113706583A (en) Image processing method, image processing device, computer equipment and storage medium
JP2023079022A (en) Information processing device and information generation method
JP6802129B2 (en) Information processing equipment, methods and programs

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination