Incremental three-dimensional reconstruction method, device and computer equipment
Through the incremental 3D reconstruction method, neural radiation field technology and volume rendering principles are used to implicitly reconstruct the 3D model, solving the problems of complex operations and insufficient accuracy in the existing technology, and achieving efficient and accurate 3D reconstruction effects.
Patent Information
- Application Number
- CN202111470822.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-03
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2041-12-03
AI Technical Summary
Existing 3D reconstruction methods are complex in operation and less than ideal in accuracy. In particular, methods based on depth cameras and structured light are limited by hardware. Multi-view methods require rich feature points, and most methods are insufficiently accurate.
The incremental three-dimensional reconstruction method is adopted to obtain the image sequence of the target scene, calculate the back projection ray, use the neural network model represented by the multi-layer perceptron to perform implicit reconstruction, and use the volume rendering principle to perform differentiable rendering and update the neural network Model and camera pose information are used to implement the rendering process from 3D voxel models to 2D images for end-to-end 3D reconstruction.
It achieves easy-to-operate and high-precision 3D reconstruction. The 3D model is implicitly reconstructed through neural radiation field technology, which can handle dynamic objects and lighting effects, ignore unreliable pixels and 3D positions, and improve the accuracy and efficiency of 3D reconstruction.
Smart Images

Figure CN114140510B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer vision, and in particular to an image-based three-dimensional reconstruction method. Background Art
[0002] With the development of computer vision, 3D reconstruction, AR, autonomous driving, SLAM and other technologies have gradually entered our daily lives. Among them, image-based 3D reconstruction has always been one of the most important challenges in the field of computer vision. Image-based 3D reconstruction methods can restore the geometric shape and texture information of the scene based on the image, and have a wide range of application values in real life, such as defect detection, digital relics, electronic maps and navigation, etc. Different application directions have different requirements for 3D reconstruction.
[0003] The current 3D reconstruction methods mainly include 3D reconstruction based on depth camera, 3D reconstruction based on structured light, and 3D reconstruction based on multi-view. Figure 3 3D reconstruction, among which 3D reconstruction based on depth camera and 3D reconstruction based on structured light are limited by hardware, and 3D reconstruction based on multi-view requires rich shooting feature points, which is also limited. In general, most operations are relatively complicated and the accuracy is not ideal. Summary of the invention
[0004] To this end, the embodiments of the present invention provide an incremental three-dimensional reconstruction method, apparatus, and computer device to solve the problems of the prior art, such as complex operation and less than ideal accuracy.
[0005] In order to achieve the above purpose, the embodiment of the present invention provides the following technical solutions:
[0006] In a first aspect, an incremental 3D reconstruction method comprises the following steps:
[0007] S1: Acquire a sequence of images of a target scene; the sequence of images includes a plurality of images corresponding to the target scene taken at multiple angles; perform the following steps S2 to S4 for any image in the sequence of images;
[0008] S2: Calculate the reverse projection ray from each pixel of the image to the center position of the camera;
[0009] S3: setting the depth range of the back-projection ray, discretely sampling a series of 3D points on the back-projection ray in the depth range, solving the problem through a neural network model represented by a multi-layer perceptron, and then performing differentiable rendering on the pixel points using the volume rendering principle to obtain a rendering result of the pixel points. The differentiable rendering process also obtains gradient information;
[0010] S4: randomly sampling pixel points on the image, performing implicit reconstruction of the model, and obtaining an initial reconstruction result after iterative calculation and rendering according to steps S2 and S3; updating the parameters of the neural network model and the camera posture information during the implicit reconstruction process utilizes the gradient information obtained by the differentiable rendering process;
[0011] S5: sequentially taking other images in the image sequence, and performing incremental reconstruction based on the reconstruction result of the previous image; traversing the image sequence, and finally obtaining the incremental reconstruction result;
[0012] Each incremental reconstruction includes: randomly initializing the camera posture corresponding to the current image, repeating steps S2, S3 and S4, but only updating the camera posture during the repeated execution, while keeping the parameters of the neural network model unchanged; then, repeating steps S2, S3 and S4 again, and only updating the parameters of the neural network model during the repeated execution.
[0013] Optionally, the camera's posture information includes a camera position and an observation direction.
[0014] Optionally, the input of the neural network model is the camera position, the observation direction and the observed 3D coordinates, and the output result is the color c and the volume density σ of the 3D point.
[0015] Optionally, in step S4, the parameters of the neural network model and the posture information of the camera are updated by using the gradient information obtained by the differentiable rendering process to calculate the gradient of the neural network model and the gradient of the camera parameters, and then using the Adam algorithm to update the parameters of the neural network model and the posture information of the camera.
[0016] Optionally, between step S3 and step S4, the difference between the rendered color and the actual image color is calculated as the reconstruction error.
[0017] Optionally, in step S4, the randomly sampling pixel points on the image are specifically extracted from the region of interest of each image; the method for determining the region of interest is as follows: convolving the gradient image (gradient information) with blob and corner kernels, then performing non-maximum suppression to obtain image interest points, and then using a morphological dilation algorithm to generate the region of interest.
[0018] Optionally, the incremental reconstruction described in step S5, taking into account the influence of dynamic objects or illumination, further performs the following processing:
[0019] First, the rendering equation of the differentiable rendering in step S3 is used as the static part of the model, and then the transient part is added to render the transient color and density, where the density is allowed to vary in the training image;
[0020] Second, the transient part is allowed to emit uncertainty fields, so that the model can adjust the reconstruction loss to ignore unreliable pixels and 3D positions;
[0021] The color of each pixel is then modeled as an isotropic normal distribution and maximum likelihood estimation is performed. Then, volume rendering is used to render the variance of the distribution as the transient color.
[0022] In a second aspect, an incremental 3D reconstruction device comprises:
[0023] A picture sequence acquisition module, used to acquire a picture sequence of a target scene; the picture sequence includes a plurality of images correspondingly obtained by shooting the target scene at multiple angles;
[0024] The projection ray calculation module is used to calculate the reverse projection ray from each pixel point of the image to the center position of the camera for the currently selected image;
[0025] A discrete sampling and rendering module is used to set the depth range of the back-projection ray, discretely sample a series of 3D points on the back-projection ray in the depth range, solve the problem through a neural network model represented by a multi-layer perceptron, and then perform differentiable rendering on the pixel points using the volume rendering principle to obtain the rendering result of the pixel points. The differentiable rendering process also obtains gradient information;
[0026] An implicit reconstruction module is used to randomly sample pixel points on the image to perform implicit reconstruction of the model, and obtain an initial reconstruction result by iteratively running the projection ray calculation module, discrete sampling and rendering module; the parameters of the neural network model and the camera posture information are updated during the implicit reconstruction process, and the gradient information obtained by the differentiable rendering process is utilized;
[0027] An incremental reconstruction module is used to sequentially take other images in the image sequence and perform incremental reconstruction based on the reconstruction result of the previous image; traverse the image sequence to finally obtain the incremental reconstruction result;
[0028] Each incremental reconstruction includes: randomly initializing the camera posture corresponding to the current image, repeatedly running the projection ray calculation module, the discrete sampling and rendering module, and the implicit reconstruction module, but only updating the camera posture during the repeated operation, while keeping the parameters of the neural network model unchanged; then, repeatedly running the projection ray calculation module, the discrete sampling and rendering module, and the implicit reconstruction module again, and only updating the parameters of the neural network model during the repeated operation.
[0029] In a third aspect, a computer device comprises a memory and a processor, wherein the memory stores a computer program, and the special feature of the device is that the processor implements the steps of the above method when executing the computer program.
[0030] In a fourth aspect, a computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the above method when executed by a processor.
[0031] The present invention has at least the following beneficial effects:
[0032] The present invention uses neural radiation field technology to implicitly reconstruct the three-dimensional model. The input data is a sequence of pictures, and the parameters to be estimated are the camera posture and the three-dimensional model. The present invention also uses the volume rendering principle and a differentiable rendering algorithm to realize the rendering process from the 3D voxel model to the 2D image, so that the three-dimensional model can be nonlinearly optimized using differentials, thereby realizing an end-to-end three-dimensional reconstruction method. Based on this, by traversing multiple images corresponding to multi-angle shooting of the target scene, the incremental reconstruction result is finally obtained, which is not only simple to operate but also highly accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly explain the prior art and the present invention, the following briefly introduces the drawings required for describing the prior art and the embodiments of the present invention. Obviously, the drawings described below are only exemplary, and for those of ordinary skill in the art, other drawings can be derived from the provided drawings without creative work.
[0034] The structures, proportions, sizes, etc. illustrated in this specification are only used to match the contents disclosed in the specification so that people familiar with this technology can understand and read them. They are not used to limit the conditions under which the present invention can be implemented. Any structural modification, change in proportion or adjustment of size should still fall within the scope of the technical contents disclosed in the present invention without affecting the effects and purposes that can be achieved by the present invention.
[0035] Figure 1 A schematic diagram of a flow chart of an incremental three-dimensional reconstruction method provided by an embodiment of the present invention;
[0036] Figure 2 A schematic diagram of a virtual module architecture of an incremental 3D reconstruction device provided by an embodiment of the present invention;
[0037] Figure 3 This is an example of the actual processing effect of an embodiment of the present invention. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0039] In one embodiment, Figure 1 As shown, an incremental 3D reconstruction method is provided, comprising the following steps:
[0040] S1: Acquire a sequence of images of a target scene; the sequence of images includes a plurality of images corresponding to the target scene taken at multiple angles; perform the following steps S2 to S4 for any image in the sequence of images;
[0041] S2: Calculate the reverse projection ray from each pixel of the image to the center position of the camera;
[0042] S3: setting the depth range of the back-projection ray, discretely sampling a series of 3D points on the back-projection ray in the depth range, solving the problem through a neural network model represented by a multi-layer perceptron, and then performing differentiable rendering on the pixel points using the volume rendering principle to obtain a rendering result of the pixel points. The differentiable rendering process also obtains gradient information;
[0043] S4: randomly sampling pixel points on the image, performing implicit reconstruction of the model, and obtaining an initial reconstruction result after iterative calculation and rendering according to steps S2 and S3; updating the parameters of the neural network model and the camera posture information during the implicit reconstruction process utilizes the gradient information obtained by the differentiable rendering process;
[0044] S5: sequentially taking other images in the image sequence, and performing incremental reconstruction based on the reconstruction result of the previous image; traversing the image sequence, and finally obtaining the incremental reconstruction result;
[0045] Each incremental reconstruction includes: randomly initializing the camera posture corresponding to the current image, repeating steps S2, S3 and S4, but only updating the camera posture during the repeated execution, while keeping the parameters of the neural network model unchanged; then, repeating steps S2, S3 and S4 again, and only updating the parameters of the neural network model during the repeated execution.
[0046] The key steps of the above method include at least:
[0047] (1) Calculate the back projection ray for each pixel in each view;
[0048] (2) Discrete sampling and rendering of projection ray rays;
[0049] (3) Implicit reconstruction of the model;
[0050] (4) Inverse solution of camera parameters (using the Adam algorithm to update the parameters of model M).
[0051] The above method is a 3D reconstruction algorithm with simple operation and high precision. It uses neural radiation field technology to implicitly reconstruct the 3D model. The input data is a sequence of pictures, and the camera posture and 3D model are the parameters to be estimated. The method also uses the volume rendering principle and a differentiable rendering algorithm to realize the rendering process from 3D voxel model to 2D image, so that the 3D model can be nonlinearly optimized using differentials, thereby realizing an end-to-end 3D reconstruction method and finally obtaining the result of incremental reconstruction. It is not only simple to operate but also highly precise.
[0052] For example, the specific description is as follows:
[0053] 1. First, shoot the scene or object from multiple angles and record the camera posture information;
[0054] 2. Camera intrinsic parameters are represented by K
[0055]
[0056] The camera extrinsic parameters are expressed using the differentiable SE(3),
[0057]
[0058]
[0059] 3. The model M is represented by a multi-layer perceptron. The parameters of the perceptron imply the three-dimensional model. The input of the neural network is the camera position, the observation direction, and the observed 3D coordinates, and the output is the color c and volume density σ of the 3D point.
[0060] 4. Calculate the reverse projection ray of a pixel point based on the internal and external parameters of the image, with the camera center position as the starting point of the ray. Set the depth range of the ray according to the size of the model, and then sample from the ray within this depth range to obtain a series of 3D points. Input the camera position, projection ray, and 3D point coordinates into the model M to obtain the color and volume density of each 3D point. Use the volume rendering formula to calculate the rendering result of this pixel point.
[0061]
[0062] 5. Calculate rendering loss: Calculate the difference between the rendered color and the actual image color as the reconstruction error.
[0063] 6. Use the gradient information obtained from the differentiable rendering process to calculate the gradient of the model M and the gradient of the camera parameters. Use the Adam algorithm to update the parameters of the model M and the camera.
[0064] 7. Random sampling of pixels. When reconstructing, pixels need to be randomly sampled on the image. Convolve the gradient image with blob and corner kernel, and then perform non-maximum suppression to obtain image interest points. Then use the morphological dilation algorithm to generate the region of interest. When randomly sampling, extract from the region of interest of each image. This can significantly improve training speed and accuracy.
[0065] 8. Repeat steps 4-7 to obtain the initial reconstruction result.
[0066] 9. When a new scene image I is captured, incremental reconstruction is performed. Due to dynamic objects or lighting, the image may not be consistent with the model, so the following processing is performed:
[0067] 1) First, we use the rendering equation in step 4 as the static part of our model, and then we add the transient part, rendering transient color and density, where the density is allowed to vary in the training images. This allows us to reconstruct images containing occluders without introducing motion blur components into the static scene representation.
[0068] 2) Second, instead of assuming that all observed pixel colors are equally reliable, allowing our transient part to emit uncertainty fields (color and density) allows the model to adjust the reconstruction loss to ignore unreliable pixels and 3D locations that are likely to contain transient occlusions.
[0069] 3) The color of each pixel is modeled as an isotropic normal distribution and maximum likelihood estimation is performed. Then, volume rendering is used to render the variance of the distribution as the transient color.
[0070] 10. Initialize the camera pose of the image and repeat steps 4-7, but only update the camera pose and keep the parameters of model M unchanged.
[0071] Execute steps 4-7 again and use the Adam algorithm to update the parameters of model M to obtain the result of incremental reconstruction.
[0072] In one embodiment, an incremental 3D reconstruction device is provided, such as Figure 2 As shown, including:
[0073] A picture sequence acquisition module, used to acquire a picture sequence of a target scene; the picture sequence includes a plurality of images correspondingly obtained by shooting the target scene at multiple angles;
[0074] The projection ray calculation module is used to calculate the reverse projection ray from each pixel point of the image to the center position of the camera for the currently selected image;
[0075] A discrete sampling and rendering module is used to set the depth range of the back-projection ray, discretely sample a series of 3D points on the back-projection ray in the depth range, solve the problem through a neural network model represented by a multi-layer perceptron, and then perform differentiable rendering on the pixel points using the volume rendering principle to obtain the rendering result of the pixel points. The differentiable rendering process also obtains gradient information;
[0076] An implicit reconstruction module is used to randomly sample pixel points on the image to perform implicit reconstruction of the model, and obtain an initial reconstruction result by iteratively running the projection ray calculation module, discrete sampling and rendering module; the parameters of the neural network model and the camera posture information are updated during the implicit reconstruction process, and the gradient information obtained by the differentiable rendering process is utilized;
[0077] An incremental reconstruction module is used to sequentially take other images in the image sequence and perform incremental reconstruction based on the reconstruction result of the previous image; traverse the image sequence to finally obtain the incremental reconstruction result;
[0078] Each incremental reconstruction includes: randomly initializing the camera posture corresponding to the current image, repeatedly running the projection ray calculation module, the discrete sampling and rendering module, and the implicit reconstruction module, but only updating the camera posture during the repeated operation, while keeping the parameters of the neural network model unchanged; then, repeatedly running the projection ray calculation module, the discrete sampling and rendering module, and the implicit reconstruction module again, and only updating the parameters of the neural network model during the repeated operation.
[0079] For the specific definition of the above-mentioned device, please refer to the definition of the incremental three-dimensional reconstruction method above, which will not be repeated here. Each module in the above-mentioned device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0080] The device uses neural radiation field technology to implicitly reconstruct three-dimensional models. The input data is a sequence of pictures, and the parameters to be estimated are the camera's posture and the three-dimensional model. It also uses the volume rendering principle and a differentiable rendering algorithm to realize the rendering process from 3D voxel model to 2D image, so that the three-dimensional model can be nonlinearly optimized using differentials, thereby achieving end-to-end three-dimensional reconstruction. Based on this, by traversing multiple images obtained by shooting the target scene from multiple angles, the incremental reconstruction result is finally obtained, which is not only easy to operate but also highly accurate.
[0081] Figure 3 Shown is the effect of incremental reconstruction applying the above example scheme.
[0082] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, which involves all or part of the processes in the above-mentioned embodiment method.
[0083] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which involves all or part of the processes in the above-mentioned embodiment method.
[0084] The above specific embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0085] The technical features of the above embodiments may be arbitrarily combined (as long as there is no contradiction in the combination of these technical features). To make the description concise, not all possible combinations of the technical features in the above embodiments are described; these embodiments that are not explicitly written should also be considered to be within the scope of this specification.
[0086] The present invention is described in more detail through general description and specific embodiments. It should be noted that, without departing from the concept of the present invention, it is obvious that several variations and improvements can be made to these specific embodiments, which all belong to the protection scope of this application. Therefore, the protection scope of the patent of this application shall be subject to the attached claims.
Claims
1. An incremental 3D reconstruction method, It is characterized in that The following steps are involved: S1: Acquire a sequence of images of a target scene; the sequence of images includes a plurality of images corresponding to the target scene taken at multiple angles; perform the following steps S2 to S4 for any image in the sequence of images; S2: Calculate the reverse projection ray from each pixel of the image to the center position of the camera; S3: setting the depth range of the back-projection ray, discretely sampling a series of 3D points on the back-projection ray in the depth range, solving the problem through a neural network model represented by a multi-layer perceptron, and then performing differentiable rendering on the pixel points using the volume rendering principle to obtain a rendering result of the pixel points. The differentiable rendering process also obtains gradient information; S4: randomly sampling pixel points on the image, performing implicit reconstruction of the model, and obtaining an initial reconstruction result after iterative calculation and rendering according to steps S2 and S3; updating the parameters of the neural network model and the camera posture information during the implicit reconstruction process utilizes the gradient information obtained by the differentiable rendering process; S5: sequentially taking other images in the image sequence, and performing incremental reconstruction based on the reconstruction result of the previous image; traversing the image sequence, and finally obtaining the incremental reconstruction result; Each incremental reconstruction includes: randomly initializing the camera posture corresponding to the current image, repeating steps S2, S3 and S4, but only updating the camera posture during the repeated execution, while keeping the parameters of the neural network model unchanged; then, repeating steps S2, S3 and S4 again, and only updating the parameters of the neural network model during the repeated execution.
2. The incremental three-dimensional reconstruction method according to claim 1, It is characterized in that The camera's posture information includes the camera's position and observation direction.
3. The incremental three-dimensional reconstruction method according to claim 2, It is characterized in that The input of the neural network model is the camera position, observation direction and observed 3D coordinates, and the output result is the color c and volume density σ of the 3D point.
4. The incremental three-dimensional reconstruction method according to claim 1, It is characterized in that In step S4, the parameters of the neural network model and the posture information of the camera are updated by using the gradient information obtained by the differentiable rendering process to calculate the gradient of the neural network model and the gradient of the camera parameters, and then using the Adam algorithm to update the parameters of the neural network model and the posture information of the camera.
5. The incremental three-dimensional reconstruction method according to claim 1, It is characterized in that Between step S3 and step S4, the difference between the rendered color and the actual image color is calculated as the reconstruction error.
6. The incremental three-dimensional reconstruction method according to claim 1, It is characterized in that In step S4, the pixels are randomly sampled on the image, specifically extracted from the region of interest of each image; the region of interest is determined by convolving the gradient image with blob and corner kernels, then performing non-maximum suppression to obtain image interest points, and then using a morphological dilation algorithm to generate the region of interest.
7. The incremental three-dimensional reconstruction method according to claim 1, It is characterized in that The incremental reconstruction described in step S5, taking into account the influence of dynamic objects or illumination, further performs the following processing: First, the rendering equation of the differentiable rendering in step S3 is used as the static part of the model, and then the transient part is added to render the transient color and density, where the density is allowed to vary in the training image; Second, the transient part is allowed to emit uncertainty fields, so that the model can adjust the reconstruction loss to ignore unreliable pixels and 3D positions; The color of each pixel is then modeled as an isotropic normal distribution and maximum likelihood estimation is performed. Then, volume rendering is used to render the variance of the distribution as the transient color.
8. An incremental three-dimensional reconstruction device, It is characterized in that include: A picture sequence acquisition module, used to acquire a picture sequence of a target scene; The picture sequence includes a plurality of images corresponding to shooting the target scene at multiple angles; The projection ray calculation module is used to calculate the reverse projection ray from each pixel point of the image to the center position of the camera for the currently selected image; A discrete sampling and rendering module is used to set the depth range of the back-projection ray, discretely sample a series of 3D points on the back-projection ray in the depth range, solve the problem through a neural network model represented by a multi-layer perceptron, and then perform differentiable rendering on the pixel points using the volume rendering principle to obtain the rendering result of the pixel points. The differentiable rendering process also obtains gradient information; An implicit reconstruction module is used to randomly sample pixel points on the image to perform implicit reconstruction of the model, and obtain an initial reconstruction result by iteratively running the projection ray calculation module, discrete sampling and rendering module; the parameters of the neural network model and the camera posture information are updated during the implicit reconstruction process, and the gradient information obtained by the differentiable rendering process is utilized; An incremental reconstruction module is used to sequentially take other images in the image sequence and perform incremental reconstruction based on the reconstruction result of the previous image; traverse the image sequence to finally obtain the incremental reconstruction result; Each incremental reconstruction includes: randomly initializing the camera posture corresponding to the current image, repeatedly running the projection ray calculation module, the discrete sampling and rendering module, and the implicit reconstruction module, but only updating the camera posture during the repeated operation, while keeping the parameters of the neural network model unchanged; then, repeatedly running the projection ray calculation module, the discrete sampling and rendering module, and the implicit reconstruction module again, and only updating the parameters of the neural network model during the repeated operation.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
