A method and system for reconstructing transparent objects based on SDF field differentiable rendering

Through a differentiable rendering method based on the SDF field, using camera calibration and space carving algorithms for panoramas and transparent object photos, combined with differentiable ray tracing and loss calculation, the problems of equipment complexity and model smoothness in the existing technology are solved, and the problem of model smoothness is achieved. Fast, accurate 3D model reconstruction and image consistency of transparent objects.

CN113888694BActive Publication Date: 2024-10-01WUHAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111050357.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-08
Publication Date
2024-10-01
Estimated Expiration
2041-09-08

AI Technical Summary

Technical Problem

The existing technology lacks a simple end-to-end method that does not require specific equipment and can generate accurate 3D models of transparent objects. In addition, existing methods have problems with complex equipment, cumbersome operations, and over-smoothing of the 3D model during the reconstruction process.

Method used

A differentiable rendering method based on the SDF field is adopted. Through camera calibration of panoramas and transparent object photos, the space carving algorithm is used to generate the initial shape. Combined with the differentiable ray tracing algorithm and loss calculation unit, the three-dimensional model represented by the SDF field is gradually optimized to make The rendered image is consistent with the input image.

Benefits of technology

Fast and accurate 3D model reconstruction of transparent objects is achieved. The generated 3D model is almost consistent with the input image, avoiding the problems of device complexity and over-smoothing of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113888694B_ABST
    Figure CN113888694B_ABST
Patent Text Reader

Abstract

The present invention provides a method and system for reconstructing transparent objects based on SDF field differentiable rendering. By taking a panoramic image and a photo containing a transparent object that needs to be calibrated, a rotation matrix is ​​obtained using a camera calibration technology of the panoramic image and the photo containing the transparent object, and the initial shape of the transparent object is obtained through a space carving algorithm. The initial shape is represented by SDF (Signed Distance Fields), and a differentiable ray tracing algorithm is proposed to render the image of the three-dimensional model of the transparent object in any viewing angle and environment map. By minimizing the loss function of the input image and the rendered image, the three-dimensional model of the transparent object is gradually optimized. The proposed method is verified on synthetic and real data sets, and the results show that this method can reconstruct a more accurate model with almost the same appearance as the input image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method for reconstructing transparent objects based on SDF (Signed Distance Fields) field differentiable rendering, which is an image-based transparent object reconstruction method that can directly optimize the geometric shape of transparent objects and generate more accurate three-dimensional models and rendered images that are almost consistent with input images. The present invention belongs to the field of three-dimensional reconstruction, and in particular to SDF (Signed Distance Fields) field representation of three-dimensional models and differentiable rendering. Background Art

[0002] At present, the technology of transparent object reconstruction is mainly divided into the following types: 1. Traditional methods. By using the method of light path triangulation, Snell's law and Fresnel equation, the light path passing through the transparent object is restored, and the shape is reconstructed using the light path, which reveals the relationship between the surface normal vector and the refraction direction. The actual application is to use complex equipment such as cameras and monitors to establish the correspondence between the camera incident light and the outgoing light on the surface and back of the transparent object, and then reconstruct the three-dimensional model of the transparent object by strengthening and applying position normal consistency, contour consistency, surface smoothness, differentiable refraction ray tracing, etc. However, such methods require specific equipment and cumbersome operations to establish the correspondence between the camera incident light and the outgoing light, so the reconstruction process requires complex settings and a lot of manual operations, which is relatively cumbersome. 2. Methods based on deep learning. Design a neural network based on physical properties, restore the normal map of the transparent object at a given perspective under a known environment map, distort the generated normal map to the initial point cloud, and apply the modified PointNet++ network to optimize the three-dimensional model. However, this method divides transparent object reconstruction into two discrete processes: normal estimation and optimization of transparent object 3D model, and the learned prior knowledge tends to over-smooth the 3D model. In the prior art, there is a lack of a relatively simple transparent object reconstruction method that does not require specific equipment and can generate accurate 3D models end-to-end. Summary of the invention

[0003] The present invention proposes a method for reconstructing transparent objects based on SDF (Signed Distance Fields) field differentiable rendering. The present invention obtains a rotation matrix by taking panoramic images and photos of transparent objects, and uses camera calibration technology of panoramic images and transparent object photos; obtains the initial shape of the transparent object by space carving algorithm; uses SDF (Signed Distance Fields) field to represent the initial three-dimensional model; and proposes a differentiable ray tracing algorithm to render the image of the three-dimensional model of the transparent object in any viewing angle and environment map by given camera parameters and environment map; minimizes the difference between multiple input images and rendered images, and gradually optimizes the three-dimensional model represented by SDF (Signed Distance Fields) field to make multiple rendered images consistent with the input images. The proposed method is verified on synthetic and real data sets, and the results show that this method can reconstruct an accurate three-dimensional model and the rendered image is almost consistent with the input image.

[0004] The present invention proposes a method for transparent object reconstruction based on SDF (Signed Distance Fields) field differentiable rendering, which includes a transparent object photo fast calibration unit, a three-dimensional model representation unit, a differentiable rendering unit, and a loss calculation unit.

[0005] The transparent object photo fast calibration unit first takes a panoramic picture and a photo of a transparent object in an empty scene with no one around. The panoramic camera and the transparent object are placed in the same position. Use general equipment (such as: mobile phone, camera, etc.) to take a photo of the transparent object; select four aiming points in the panoramic picture - this patent selects to generate a rotation around the Y axis , and generate the rotation matrix of each aiming point, that is, rotate around the Y axis 3×3 rotation matrix. Closely connected to the back-projection photo generation system, the correspondence between the panorama and the photo and the rotation matrix of the aiming point are used to back-project and generate an aiming point image of the same size as the calibration photo. The Structure-from-Motion algorithm is used to call the point extraction matching unit and rotation matrix generation unit based on Opencv features to calibrate the aiming point image and transparent object photo, and finally the bundle adjustment method is used to fine-tune the rotation matrix.

[0006] The 3D model representation unit uses the generated camera matrix and contour map to generate the initial visible hull using the SpaceCarving algorithm, and represents the generated visible hull with the SDF (Signed Distance Fields) field to form a 3D model. This is followed by the differentiable rendering unit.

[0007] The differentiable rendering unit renders an image of a three-dimensional model represented by an SDF (Signed Distance Fields) field through a differentiable rendering method. By giving the camera parameters, light source and material of the object, the rendering process is only related to the position and direction of the intersection of the camera light and the surface of the object, and has nothing to do with the process of finding the intersection point by the sphere tracing algorithm. The rendering process is differentiable. However, when the environment map is known, only a single pixel of a transparent object is rendered, and the light path corresponding to the camera light must be taken into account. Therefore, for each pixel in the photo, the position and normal vector of the intersection point need to be obtained. Based on the calculated light direction, the intensity of the reflected light and the refracted light is calculated by the Fresnel equation. Different from the previous method, which only calculates two refractions along the ray path in the transparent object, the differentiable rendering algorithm of this method is specially designed for representing three-dimensional models with SDF (Signed Distance Fields) fields, and multiple refractions can occur inside the three-dimensional model.

[0008] The loss calculation unit mainly calculates four types of losses: image loss - making the rendered image consistent with the input image, SDF (Signed Distance Fields) loss - ensuring that the SDF (Signed Distance Fields) value represents a valid signed distance function; SSIM (Structural Similarity) represents smoothness loss - making the shape represented by the SDF (Signed Distance Fields) field smoother; MASK loss - making the projection of the three-dimensional model represented by the optimized SDF (Signed Distance Fields) field consistent with the given MASK.

[0009] The present invention provides a method for reconstructing a transparent object based on SDF (Signed Distance Fields) field micro-rendering, which comprises the following steps:

[0010] Step S1: Use the captured panorama and the photo of the transparent object; select four aiming points in the panorama - in this patent, select to generate a rotation around the Y axis , and generate the rotation matrix of each aiming point. Using the correspondence between the panorama and the photo, the rotation matrix of each aiming point is back-projected to generate an image of the same size as the calibration photo.

[0011] Step S2: Apply the Structure-from-Motion algorithm, the point extraction and matching unit based on the Opencv feature and the rotation matrix generation unit to calibrate the aiming point photo and the transparent object photo, and finally use the bundle adjustment method to fine-tune the generated rotation matrix.

[0012] Step S3: Using the generated camera matrix to generate an initial visible hull through a space carving algorithm, the generated visible hull is represented by a SDF (Signed Distance Fields) field as the initial shape of this method.

[0013] Step S4: For each pixel in the photo, a sphere tracing algorithm is used to obtain the position of the intersection of the light and the surface of the three-dimensional model. The SDF value and normal vector of the intersection are obtained by trilinear interpolation of eight discrete points around the intersection.

[0014] Step S5: Calculate the direction and intensity of the reflected light and the refracted light by using Snell's law and Fresnel equation.

[0015] Step S6: adopting a differentiable rendering algorithm, assuming that multiple refractions (greater than 2 times) occur inside the transparent object, and rendering each pixel of the transparent object when the environment map and the light path corresponding to the camera light are known.

[0016] Step S7: The sum of the four loss terms, image loss, SDF loss, smoothness loss and MASK loss, is used as the loss function between the rendered photo and the input photo. The SDF value is gradually optimized by minimizing the loss function, so that the rendered image of the reconstructed 3D model of the transparent object is close to the photograph.

[0017] The advantages of the present invention are that the transparent object three-dimensional reconstruction method of the present invention can realize the calibration of panoramic images and ordinary photos of transparent objects and the reconstruction of three-dimensional models of transparent objects, which has the advantages of being fast and accurate. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 Schematic diagram of transparent object reconstruction based on SDF (Signed Distance Fields) differentiable rendering proposed by the present invention.

[0019] Figure 2 Schematic diagram of ray tracing for an object with Lambertian surfaces.

[0020] Figure 3 Schematic diagram of ray tracing of transparent objects.

[0021] FIG4 is a schematic diagram of an environment image captured by a panoramic camera.

[0022] Figure 5 is a schematic diagram of a photo of a transparent object taken by a mobile phone camera.

[0023] FIG6 is a schematic diagram of back-projecting the calibration results of the panoramic image and the transparent object image to obtain an image with the same resolution as the transparent object image. DETAILED DESCRIPTION

[0024] In order to further understand the content of the present invention and make the objectives, technical solutions and advantages of the present invention clearer, the present invention is described in detail below with reference to the accompanying drawings and embodiments.

[0025] The present invention proposes a method for reconstructing transparent objects based on SDF (Signed Distance Fields) field differentiable rendering. The present invention obtains a rotation matrix by taking panoramic images and photos of transparent objects, and adopts a space carving algorithm to obtain the initial shape of the transparent object. The SDF (Signed Distance Fields) field is used to represent the initial three-dimensional model; through given camera parameters and environment maps, a differentiable ray tracing algorithm is proposed to render the image of the transparent object three-dimensional model in any viewing angle and environment map; the difference between multiple input images and rendered images is minimized, and the three-dimensional model represented by the SDF (Signed Distance Fields) field is gradually optimized to make the multiple rendered images consistent with the input photos. The proposed method is verified on synthetic and real data sets, and the results show that this method can reconstruct an accurate model and the rendered image is almost consistent with the input image. The main steps are as follows:

[0026] Step S1: Use a panoramic camera and a general camera (such as a mobile phone, a video camera, etc.) to take a panoramic image and a photo of a transparent object in an empty and unmanned scene. The panoramic camera and the transparent object are placed in the same position. Select four aiming points in the panoramic image - in this patent, select to generate a rotation around the Y axis , using the correspondence between the panorama and the photo, generate the rotation matrix of each aiming point, that is, rotate around the Y axis The 3×3 rotation matrix of , the corresponding relationship is as follows;

[0027]

[0028]

[0029] in , Represent the angles between the ray and the X-axis and Y-axis respectively; and is the two-dimensional coordinate value of the photo; and is the 2D coordinate value of the panorama. The rotation matrix of each aiming point is back-projected into an aiming point image with the same resolution as the calibration photo.

[0030] Step S2: Apply the Structure-from-Motion algorithm, call the feature point extraction and matching unit based on Opencv and the rotation matrix generation unit to calibrate the aiming point image and the transparent object photo generated by back projection, that is, convert the calibration of the panorama and the transparent object photo into the calibration between photos; use the bundle adjustment method to fine-tune the rotation matrix.

[0031]

[0032] in , Represent the coordinate values ​​of the feature points matched between the aiming point image and the transparent object photo, express Cross product , and The subtables represent the rotation matrix and translation matrix of the camera extrinsic parameters.

[0033] Step S3: Using the generated camera matrix to generate an initial visible hull through a space carving algorithm. The generated visible hull is represented by a SDF (Signed Distance Fields) field as the initial shape of this method.

[0034] Step S4: For each pixel in the photo, a sphere tracing algorithm is used to obtain the position of the intersection of the light and the 3D model surface. Since the SDF (Signed Distance Fields) field is discrete, the SDF value and normal vector of the intersection position are obtained by trilinear interpolation of the SDF values ​​and normal vectors of eight discrete points around the intersection position.

[0035]

[0036] : approximate intersection point; : SDF values ​​of eight adjacent vertices; : The position before the intersection; : The direction of the camera light; : Trilinear interpolation.

[0037]

[0038] : Normal vector of the intersection point; : Normal vectors of eight adjacent vertices

[0039] Step S5: Calculate the direction and intensity of the reflected light and the refracted light by using Snell's law and Fresnel equation.

[0040]

[0041]

[0042] : represents the intensity of reflected light; : represents the intensity of incident light; : Indicates the intensity of refracted light; : represents the refractive index; : Fresnel term; : The direction of the camera light; : Normal vector of the intersection point;

[0043] Step S6: Using a differentiable ray tracing algorithm, assuming that multiple refractions (greater than 2) occur inside the transparent object, render each pixel knowing the environment map, the intersection normal vector, and the light intensity. The light intensity of a single pixel is expressed as:

[0044]

[0045] : The number of ray tracing intersection points; : The intensity of the first reflected light; : The light intensity refracted inside the Nth model

[0046] Step S7: Use image loss, SDF loss, smoothness loss and MASK loss, and the sum of these four loss items as the loss function between the rendered photo and the input photo:

[0047]

[0048] : Image loss term; : SDF value loss term; : Depth smoothing term; : MASK loss term; , , , Represents the loss weight corresponding to the balance weight and the sum is 1, where the experiment obtains w 1 = 0.4, w 2 = 0.2, w 3 = 0.1, w 4= 0.3. The specific formulas of the four loss terms are:

[0049] Structural Similarity (SSIM) based image loss:

[0050]

[0051] M v : Input contour map; S(I gt , I render ): Calculate the similarity between the rendered image and the input image, the value range is 0-1,

[0052] A value of 1: indicates that the input image and the rendered image are exactly the same. m : The total number of valid points in the contour map.

[0053] The effective signed distance function SDF loss is:

[0054]

[0055] f ( x ): symbol distance value; x : A 3D point in space.

[0056] Deep smoothing loss for model surface smoothing:

[0057]

[0058] : vertices in a 3D mesh, :vertex The adjacent vertices of SDF( )vertex SDF value; N( ):vertex of

[0059] The set of adjacent vertices; N : The number of adjacent vertices.

[0060] The L1 distance between the input contour map and the differentiable rendered contour map is used as the MASK loss:

[0061]

[0062] M v : Input contour map; :Contour image obtained by differentiable rendering.

[0063] The value of SDF is gradually optimized by minimizing the loss function value, so that the rendered image of the reconstructed three-dimensional model of the transparent object is basically consistent with the input image.

[0064] This example provides a method for reconstructing transparent objects based on SDF (Signed Distance Fields) field differentiable rendering. By taking a panoramic image and photos of the transparent object to be calibrated, the camera calibration technology of the panoramic image and the transparent object photo is used to obtain the rotation matrix, and the initial shape of the transparent object is obtained through the space carving algorithm. The initial three-dimensional model is represented by SDF (Signed Distance Fields); based on the given camera parameters and environment map, a differentiable ray tracing algorithm is proposed to render the image of the transparent object three-dimensional model in any viewing angle and environment map; the difference between the input image and the rendered image of multiple views is minimized, and the three-dimensional model represented by the SDF (Signed Distance Fields) field is gradually optimized to make the rendered image consistent with the input image. The proposed method is verified on synthetic and real datasets, and the results show that this method can reconstruct a more accurate model and the rendered image is almost consistent with the input image.

Claims

1. A method for transparent object reconstruction based on SDF field differentiable rendering, It is characterized in that The following steps are involved: Step S1: Use the taken panorama and the photo of the transparent object; select four aiming points in the panorama, and generate the rotation matrix of each aiming point. Using the correspondence between the panorama and the photo, back-project the rotation matrix of each aiming point to generate an image of the same size as the calibration photo; Step S2: Apply the structure from motion algorithm, calibrate the aiming point photo and the transparent object photo based on the point extraction matching unit and the rotation matrix generation unit of Opencv’s features, and then fine-tune the generated rotation matrix using the bundle adjustment method; Step S3: Generate an initial visible shell using the generated camera matrix, and represent the generated visible shell with an SDF field as the initial shape of the method; Step S4: for each pixel in the photo, a sphere tracing algorithm is used to obtain the position of the intersection of the light ray and the surface of the three-dimensional model, and the SDF value and normal vector of the intersection are obtained by trilinear interpolation of eight discrete points around the intersection position; Step S5: Calculate the direction and intensity of the reflected light and the refracted light; Step S6: using a differentiable rendering algorithm, assuming that multiple refractions occur inside the transparent object, and rendering each pixel of the transparent object when the environment map and the light path corresponding to the camera light are known; Step S7: Use image loss, SDF loss, smoothness loss and MASK loss. The sum of these four loss items is used as the loss function between the rendered photo and the input photo. The SDF value is gradually optimized by minimizing the loss function, so that the rendered image of the reconstructed three-dimensional model of the transparent object is close to the taken photo.

2. The method for transparent object reconstruction based on SDF field differentiable rendering according to claim 1, Features: The specific process of step S1 is as follows: Use a panoramic camera and a general camera to take panoramic pictures and photos of transparent objects in the same empty scene. The panoramic camera and transparent objects are placed in the same position. In the panorama, choose to generate a rotation around the Y axis. Four aiming points, and generate the rotation matrix for each aiming point, using the following correspondence between the panorama and the photo; in , Represent the angles between the ray and the X-axis and Y-axis respectively; and is the two-dimensional coordinate value of the photo; Panorama_weight and Panorama_height are the two-dimensional coordinate values ​​of the panorama. The rotation matrix of each aiming point is back-projected into an image of the same size as the calibration photo.

3. The method for transparent object reconstruction based on SDF field differentiable rendering according to claim 1, Features: The specific process of step S4 is as follows: For each pixel in the photo, the intersection point position and normal vector are obtained through eight discrete points around the SDF value. : Approximate intersection point; : SDF values ​​of eight adjacent vertices; : The second to last position on the camera ray; : The direction of the camera light; : trilinear interpolation, : Normal vector of the intersection point; : Normal vectors of eight adjacent vertices.

4. The method for transparent object reconstruction based on SDF field differentiable rendering according to claim 1, Features: The specific process of step S5 is: calculating the light directions of the reflected light and the refracted light by using the Fresnel equation, : represents the radiance of reflected light; : represents the incident light radiance; : Indicates the radiance of refracted light; : represents the refractive index; : Fresnel term; : The direction of the camera light; : Normal vector at the intersection point.

5. The method for transparent object reconstruction based on SDF field differentiable rendering according to claim 1, Features: Step S6: Using a differentiable ray tracing algorithm, the number of refractions inside the transparent object is greater than 2. In the case of multiple refractions, the pixel radiance is expressed as: : The number of ray tracing intersection points; : pixel radiance; Render each pixel of a transparent object knowing the environment map and the light path corresponding to the camera light.

6. A system for a method of reconstructing transparent objects based on SDF field differentiable rendering, Features: It includes a transparent object photo fast calibration module, a 3D model representation module, a differentiable rendering module, and a loss calculation module; The transparent object photo fast calibration module adopts the taken panorama and transparent object photos; selects four aiming points in the panorama, generates a rotation matrix for each aiming point, and uses the correspondence between the panorama and the photo to back-project the rotation matrix of each aiming point to generate an image of the same size as the calibration photo; applies the structure from motion algorithm, and calibrates the aiming point photos and transparent object photos based on the point extraction matching unit and the rotation matrix generation unit of the Opencv feature, and then uses the bundle adjustment method to fine-tune the generated rotation matrix; The three-dimensional model representation module uses the generated camera matrix and contour map to generate an initial visible shell using a space carving algorithm, and represents the generated visible shell with a three-dimensional model represented by an SDF field; The micro-rendering module uses a sphere tracing algorithm to obtain the position of the intersection of the light and the surface of the three-dimensional model for each pixel in the photo, and obtains the SDF value and normal vector of the intersection position by trilinear interpolation of eight discrete points around the intersection position; calculates the light direction and intensity of the reflected light and the refracted light; uses a micro-rendering algorithm, assumes that multiple refractions occur inside the transparent object, and renders each pixel of the transparent object when the environment map and the light path corresponding to the camera light are known; The loss calculation module uses the sum of four loss terms, namely, image loss, SDF loss, smoothness loss and MASK loss, as the loss function between the rendered photo and the input photo, and gradually optimizes the SDF value by minimizing the loss function, so that the rendered image of the reconstructed three-dimensional model of the transparent object is close to the taken photo.