Three-dimensional model reconstruction method of an object and electronic device
By adjusting the target parameters and depth implicit template (DIT) parameters of multi-viewpoint images, and combining semantic information to adjust the shape and color of the initial 3D model, the problem of low accuracy of 3D models in sparse viewpoint image reconstruction is solved, and high-precision 3D model reconstruction under sparse viewpoint conditions is achieved.
Patent Information
- Application Number
- CN202210834155.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-14
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2042-07-14
AI Technical Summary
Existing technologies have low accuracy in 3D model reconstruction of sparse viewpoint images. Neural radiation field and implicit surface reconstruction algorithms are difficult to generate accurate 3D models under sparse viewpoint image conditions.
By adjusting the target parameters and depth implicit template (DIT) parameters of the object using multi-view images, and combining semantic information, the shape and color of the initial 3D model are adjusted to obtain the target 3D model.
It improves the accuracy of 3D model reconstruction from sparse viewpoint images, ensuring the accuracy and precision of 3D models under sparse viewpoint conditions.
Smart Images

Figure CN115294268B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of three-dimensional reconstruction of objects, and in particular to a three-dimensional model reconstruction method of an object and an electronic device. BACKGROUND
[0002] At present, in the technical field of multi-view three-dimensional reconstruction, three-dimensional reconstruction methods are generally divided into two categories: the first category is to reconstruct a three-dimensional model based on a neural radiation field, the basic idea of which is to fit a radiation field by constructing a neural network to represent an object or a scene, and then to render an RGB picture by means of volume rendering. The second category is to reconstruct a three-dimensional model based on an implicit surface, the basic idea of which is to fit a signed distance field by constructing a neural network to represent the surface of an object, and then to render an RGB picture by means of surface rendering.
[0003] However, the reconstruction algorithm based on the neural radiation field often has high data dimension and high complexity, and has no geometric shape, so a large amount of data is needed to perform well. Therefore, in the case of inputting general sparse view images, the three-dimensional model cannot be accurately reconstructed. In addition, the reconstruction algorithm based on the implicit surface is prone to produce incorrect geometric shapes for very sparse view images (i.e. images with an angle difference between adjacent view angles greater than 60 degrees), and it is difficult to complete the reconstruction task. Therefore, the accuracy of the three-dimensional model reconstructed by the existing technology from sparse view images is low. SUMMARY
[0004] The present application provides a three-dimensional model reconstruction method of an object and an electronic device, which can improve the accuracy of the reconstructed three-dimensional model.
[0005] In a first aspect, the present application provides a three-dimensional model reconstruction method of an object, which comprises:
[0006] In response to a three-dimensional model reconstruction instruction of the object triggered by a user, a multi-view image corresponding to the object is acquired, wherein the multi-view image is each image of the object taken at different angles;
[0007] Each multi-view image of the object is segmented to obtain segmented images; and
[0008] Based on the segmented images and the mask images corresponding to the images, a target parameter of the object and a depth implicit template (DIT) parameter corresponding to the category of the object are adjusted to obtain an adjusted target parameter and an adjusted DIT parameter;
[0009] adjust a shape of an initial three-dimensional model corresponding to the category of the object by using the adjusted DIT parameter, to obtain a candidate three-dimensional model, wherein the initial three-dimensional model is obtained based on the DIT parameter and the multi-view images corresponding to the object;
[0010] adjust a color of the candidate three-dimensional model by using the adjusted target parameter, to obtain a target three-dimensional model of the object.
[0011] The second aspect of the present application provides an electronic device, comprising a processor and a memory, wherein the processor and the memory are connected through a bus;
[0012] The memory stores a computer program, and the processor is configured to execute the following operations based on the computer program:
[0013] In response to an object three-dimensional model reconstruction instruction triggered by a user, multi-view images corresponding to the object are obtained, wherein the multi-view images are images of the object taken at different angles;
[0014] The multi-view images of the object are segmented respectively to obtain segmented images; and
[0015] Based on the segmented images and the mask images corresponding to the images, a target parameter of the object and a depth implicit template (DIT) parameter corresponding to the category of the object are adjusted to obtain an adjusted target parameter and an adjusted DIT parameter;
[0016] A shape of an initial three-dimensional model corresponding to the category of the object is adjusted by using the adjusted DIT parameter, to obtain a candidate three-dimensional model, wherein the initial three-dimensional model is obtained based on the DIT parameter and the multi-view images corresponding to the object;
[0017] A color of the candidate three-dimensional model is adjusted by using the adjusted target parameter, to obtain a target three-dimensional model of the object.
[0018] According to the third aspect of the embodiments of the present application, a computer storage medium is provided, which stores a computer program for executing the method according to the first aspect.
[0019] In the above embodiments of the present application, the target parameter of the object and the depth implicit template (DIT) parameter corresponding to the category of the object are adjusted through the multi-view image; then the shape of the initial three-dimensional model corresponding to the category of the object is adjusted through the adjusted DIT parameter, to obtain a candidate three-dimensional model; finally, the color of the candidate three-dimensional model is adjusted through the adjusted target parameter, to obtain the target three-dimensional model of the object. Thus, in the embodiments, the shape and color of the initial three-dimensional model corresponding to the category of the object are adjusted through the target parameter of the object and the DIT parameter, to obtain the target three-dimensional model, so that the initial three-dimensional model corresponding to the category of the object is adjusted in combination with the semantic information of the object in the process of three-dimensional reconstruction of the object, thereby making the determination of the target three-dimensional model more accurate. BRIEF DESCRIPTION OF DRAWINGS
[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0021] Figure 1 An application scenario provided by the embodiments of the present application is exemplarily shown;
[0022] Figure 2 A flowchart of a three-dimensional model reconstruction method of an object provided by the embodiments of the present application is exemplarily shown;
[0023] Figure 3 An image segmentation diagram provided by the embodiments of the present application is exemplarily shown;
[0024] Figure 4 A flowchart of determining a mask image of an image provided by the embodiments of the present application is exemplarily shown;
[0025] Figure 5 A flowchart of adjusting a target parameter of an object and a DIT parameter provided by the embodiments of the present application is exemplarily shown;
[0026] Figure 6 A flowchart of determining a first loss value provided by the embodiments of the present application is exemplarily shown;
[0027] Figure 7 A flowchart of determining a target three-dimensional model of an object provided by the embodiments of the present application is exemplarily shown;
[0028] Figure 8An exemplary flowchart of a process for determining a target color value of a pixel point is shown;
[0029] Figure 9 An exemplary flowchart of a process for determining a position coordinate of an intersection point of a candidate three-dimensional model and a light ray is shown;
[0030] Figure 10 An exemplary flowchart of a process for determining a target position coordinate of a sampling point is shown;
[0031] Figure 11 An exemplary diagram of modifying a shape of an object is shown;
[0032] Figure 12 An exemplary flowchart of a process for reconstructing a three-dimensional model of an object is shown;
[0033] Figure 13 An exemplary structural diagram of a device for reconstructing a three-dimensional model of an object is shown;
[0034] Figure 14 An exemplary hardware structural diagram of a calibration device is shown. DETAILED DESCRIPTION
[0035] In order to make the objectives, implementations and advantages of the present application clearer, the following will be a clear and complete description of the exemplary embodiments of the present application with reference to the accompanying drawings. Obviously, the described exemplary embodiments are only a part of the embodiments of the present application, rather than all embodiments of the present application.
[0036] Based on the exemplary embodiments described in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the scope of the claims of the present application. In addition, although the disclosure in the present application is introduced according to one or more examples, it should be understood that each aspect of the disclosure can also constitute a complete embodiment.
[0037] It should be noted that the brief description of the terms in the present application is only for the convenience of understanding the following described embodiments, and is not intended to limit the embodiments of the present application. Unless otherwise specified, these terms should be understood according to their ordinary and general meanings.
[0038] The terms "first", "second", and the like, as used in the description and the claims of the application and the above figures, are used to differentiate between similar objects, and are not necessarily used to describe a particular sequential or chronological order. It is to be understood that the terms so used are interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in other sequences than those illustrated or otherwise described herein. Furthermore, the terms "comprise", "comprising", "include", "including", and "has", "having" and any variations thereof, are intended to cover a non-exclusive inclusion such that a product or process that comprises, includes, or has several components or steps does not include only those components or steps but can include other components or steps not expressly listed or inherent to such product or process.
[0039] The term "module" used in the present application refers to any known or later developed hardware, software, firmware, artificial intelligence, fuzzy logic, or combination of hardware and / or software code that can perform the functions associated with that element.
[0040] The idea of the embodiments of the present application is summarized as follows.
[0041] In the related art of three-dimensional model reconstruction, when inputting general sparse view point images, accurate results are often not obtained, so the accuracy of the three-dimensional model reconstructed from sparse view point images is low.
[0042] Based on the problems in the prior art, the embodiments of the present application provide a three-dimensional model reconstruction method of an object. The target parameters of the object and the depth implicit template (DIT) parameters corresponding to the category of the object are adjusted through multi-view point images. Then, the shape of the initial three-dimensional model corresponding to the category of the object is adjusted through the adjusted DIT parameters to obtain a candidate three-dimensional model. Finally, the color of the candidate three-dimensional model is adjusted using the adjusted target parameters to obtain a target three-dimensional model of the object. Thus, the shape and color of the initial three-dimensional model corresponding to the category of the object are adjusted through the target parameters of the object and the depth implicit template (DIT) parameters to obtain a target three-dimensional model. Therefore, in the process of three-dimensional reconstruction of the object, the initial three-dimensional model corresponding to the category of the object is adjusted in combination with the semantic information of the object, so that the target three-dimensional model is determined more accurately. The embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0043] Figure 1 An application scenario provided by the embodiments of the present application is exemplarily shown. As shown in Figure 1 The application scenario is illustrated by taking an electronic device as a server as an example. The application scenario includes a terminal device 110, a camera 120, and a server 130. The server 130 can be implemented by a single server or by multiple servers. The server 130 can be implemented by a physical server or by a virtual server.
[0044] In a possible application scenario, a user triggers an object three-dimensional model reconstruction instruction through the terminal device 110, and the server 130 acquires multi-view images corresponding to an object photographed by the camera 120 in response to the object three-dimensional model reconstruction instruction triggered by the user, and respectively segments the multi-view images of the object to obtain segmented images. Then, the server 130 adjusts a target parameter of the object and a depth implicit template (DIT) parameter corresponding to a category of the object based on the segmented images and mask images corresponding to the images, to obtain an adjusted target parameter and an adjusted DIT parameter. The server 130 adjusts a shape of an initial three-dimensional model corresponding to the category of the object through the adjusted DIT parameter, to obtain a candidate three-dimensional model, where the initial three-dimensional model is obtained based on the DIT parameter and the multi-view images corresponding to the object. Finally, the server 130 adjusts a color of the candidate three-dimensional model through the adjusted target parameter, to obtain a target three-dimensional model of the object, and displays the target three-dimensional model of the object through the terminal device 110.
[0045] In the server 130 and the terminal device 110, information interaction can be performed through a communication network, where a communication mode adopted by the communication network can be divided into a wireless communication mode or a wired communication mode. Figure 1
[0046] For example, the server 130 can access a network and communicate with the terminal device 110 through a cellular mobile communication technology, where the cellular mobile communication technology includes, for example, a 5th Generation Mobile Networks (5G) technology.
[0047] Optionally, the server 130 can access a network and communicate with the terminal device 110 through a short-range wireless communication mode, where the short-range wireless communication mode includes, for example, a Wireless Fidelity (Wi-Fi) technology.
[0048] In addition, only a single terminal device 110, four cameras 120, and a single server 130 are described in the description of the present application, but a person skilled in the art should understand that the terminal device 110, the camera 120, and the server 130 shown are intended to represent the operations of the terminal device 110, the camera 120, and the server 130 involved in the technical solutions of the present application. Rather than implying a limitation on the number, type, or location of the terminal device 110, the camera 120, and the server 130. It should be noted that if additional modules are added to the illustrated environment or individual modules are removed therefrom, the underlying concept of the example embodiments of the present application will not change.
[0049] Exemplarily, the terminal device 110 includes, but is not limited to, a visual large screen, a tablet computer, a notebook computer, a palm computer, a mobile internet device (MID), a wearable device, a virtual reality (VR) device, an augmented reality (AR) device, a wireless terminal device in industrial control, a wireless terminal device in unmanned driving, a wireless terminal device in smart grid, a wireless terminal device in transportation safety, a wireless terminal device in smart city, or a wireless terminal device in smart home, and the like. A related client can be installed on the terminal device, which can be software (for example, a browser, a short video software, and the like), a webpage, an applet, or the like.
[0050] It should be noted that the three-dimensional model reconstruction method of the object proposed in the present application is not only applicable to the application scenarios shown in the present application, but also applicable to any device for three-dimensional model reconstruction of the object. Figure 1 The three-dimensional model reconstruction method of the object proposed in the present application is not only applicable to the application scenarios shown in the present application, but also applicable to any device for three-dimensional model reconstruction of the object.
[0051] The three-dimensional model reconstruction method of the object proposed in the present application is not only applicable to the application scenarios shown in the present application, but also applicable to any device for three-dimensional model reconstruction of the object.
[0052] As shown in the flowchart of the three-dimensional model reconstruction method of the object, the method can include the following steps: Figure 2
[0053] Step 201: In response to a three-dimensional model reconstruction instruction of an object triggered by a user, a plurality of perspective images corresponding to the object are acquired, wherein the plurality of perspective images are images of the object taken at different angles.
[0054] It should be noted that the plurality of perspective images of the object in the present embodiment are obtained by shooting the object from a plurality of different shooting angle cameras, that is, the object is placed in the center, and the cameras are distributed around the object to shoot the object. That is, the number of perspective images is the same as the number of cameras. The number of cameras can be set according to actual conditions, and the number of cameras is not limited in the present embodiment.
[0055] Step 202: The plurality of perspective images of the object are segmented respectively to obtain segmented images.
[0056] For example, as shown in the left image of the object and the right image of the segmented image. Figure 3 Figure 3
[0057] The multi-view image of the object is segmented by using an image segmentation algorithm in the embodiment. The image segmentation algorithm can be set according to actual conditions, and the specific manner of the image segmentation algorithm is not limited in the embodiment.
[0058] Step 203: adjusting a target parameter of the object and a deep implicit template (DIT) parameter corresponding to a category of the object based on the segmented images and the mask images corresponding to the images, to obtain an adjusted target parameter and an adjusted DIT parameter.
[0059] In the embodiment, the DIT parameter is represented by using a high-dimensional vector. In the embodiment, a 256-dimensional vector is used to represent the DIT parameter.
[0060] First, the manner of determining the mask images corresponding to the images is described in detail as follows. Figure 4 As shown in the flowchart for determining the mask images of the images, the following steps are included.
[0061] Step 401: for any pixel point in any image, emitting a light ray pointing to the pixel point from a camera view angle corresponding to the image, and sampling a specified number of sampling points at equal intervals on the light ray;
[0062] It should be noted that the specified number in the embodiment can be set according to actual conditions, and the embodiment does not need to be limited here.
[0063] Step 402: for any sampling point, determining a signed distance field (sdf) value of the sampling point based on a position coordinate of the sampling point and the target parameter, wherein the sdf value is used to represent a distance between the sampling point and an initial three-dimensional model surface of the object.
[0064] The position of the sampling point is determined based on a position coordinate of a camera corresponding to the sampling point, a light ray direction corresponding to the sampling point, and an identifier of the sampling point. The position coordinate of the sampling point can be obtained by formula (1):
[0065] x n =o+r×nt......(1);
[0066] wherein x n is the position coordinate of the sampling point, o is the position coordinate of the camera corresponding to the sampling point, r is the direction of the light ray corresponding to the sampling point, n is the identifier of the sampling point, and t is a sampling interval.
[0067] In one embodiment, the sdf value of the sampling point is determined in the following manner:
[0068] transforming the position coordinates of the sampling points by using the target parameters to obtain target position coordinates of the sampling points, wherein the target parameters comprise at least one of a rotation parameter, a translation parameter and a scale parameter; inputting the target position coordinates of the sampling points into an sdf function to obtain sdf values of the sampling points. Wherein, formula (2) is a representation method based on the sdf function:
[0069] sdf(x n )=T(W(C,S·R -1 (x n -T)))......(2);
[0070] Wherein, sdf(x n ) is the sdf value of the sampling point x n , C is the DIT parameter of the depth implicit template, S is the scale parameter, R is the rotation parameter, and T is the translation parameter. T is a T function in the sdf function, and W is a W function in the sdf function.
[0071] Step 403: determining the sdf value with the smallest numerical value among the sdf values of the sampling points as the mask pixel value corresponding to the pixel point;
[0072] Step 404: obtaining a mask image corresponding to the image through the mask pixel values of each pixel point in the image.
[0073] After introducing the specific way of determining the mask image corresponding to the image, the adjustment method of the target parameters and the DIT parameters of the object will be introduced in detail, as shown in Figure 5 , comprising the following steps:
[0074] Step 501: obtaining a first loss value based on the segmented images and the mask images corresponding to the images; in an embodiment, as shown in Figure 6 , it is a flowchart for determining the first loss value, comprising the following steps:
[0075] Step 601: for any one segmented image, adding the pixel values of the first target pixels in the mask image corresponding to the segmented image to obtain a first total pixel value, wherein the first target pixels are the pixels in the mask image with pixel values less than a specified threshold;
[0076] Step 602: adding the pixel values of the second target pixels in the mask image corresponding to the segmented image to obtain a second total pixel value, wherein the second target pixels are the pixels in the mask image with pixel values greater than a specified threshold;
[0077] Wherein, each pixel point in the segmentation image with a pixel value equal to 1 corresponds to each pixel in the mask image with a pixel value less than 0. And each pixel point in the segmentation image with a pixel value equal to 0 corresponds to each pixel point in the mask image with a pixel value greater than 0. The specified threshold in the embodiment is 0, but the specified threshold can be set according to actual conditions, which is not limited in the embodiment.
[0078] Step 603: adding the first total pixel value and the second total pixel value to obtain a target total pixel value corresponding to the segmented image;
[0079] Step 604: adding the target total pixel values corresponding to each segmented image to obtain the first loss value. Wherein, the first loss value can be obtained by formula (3):
[0080]
[0081] Wherein, L1 is the first loss value, M p is the pixel value of the pixel point p in the segmented image, M' p is the pixel value of the pixel point p in the mask image.
[0082] Step 502: judging whether the first loss value meets a first preset condition, if yes, executing step 504, if not, executing step 503;
[0083] Wherein, the first preset condition can include one of the following preset conditions:
[0084] Condition 1: the first loss value is less than a preset loss value.
[0085] Condition 2: the first loss value is less than a preset loss value, and the adjustment times are greater than a preset times.
[0086] Condition 3: the error between the first loss value and the preset loss value is less than a preset value.
[0087] It should be noted that the first preset condition described in the foregoing is only used for example illustration, and does not limit the specific content of the first preset condition, and the first preset condition can be limited according to actual conditions.
[0088] Step 503: adjusting the target parameters of the object and the DIT parameters corresponding to the object category according to a preset rule to obtain intermediate target parameters and intermediate DIT parameters, and then re-rendering each image by using the intermediate target parameters and the intermediate DIT parameters to obtain updated mask images of the images, and determining the updated mask images of the images as the mask images corresponding to the images, and returning to execute step 501;
[0089] The preset rules can include adding specified values to the target parameter and the DIT parameter each time an adjustment is made. Specific preset rules can be set according to actual conditions; this embodiment does not limit the specific content of the preset rules.
[0090] Step 504: Determine the intermediate target parameter corresponding to the first loss value that satisfies the first preset condition as the adjusted target parameter, and determine the intermediate DIT parameter corresponding to the first loss value that satisfies the preset condition as the adjusted DIT parameter.
[0091] This ensures the accuracy of the determined adjusted target parameters and the adjusted DIT parameters, thereby further improving the accuracy of 3D model reconstruction.
[0092] Step 204 adjusts the shape of the initial 3D model corresponding to the category of the object using the adjusted DIT parameters to obtain a candidate 3D model, wherein the initial 3D model is obtained based on the DIT parameters and the multi-view image corresponding to the object;
[0093] It should be noted that the DIT parameter is a parameter in the sdf function. Therefore, the original DIT parameter in the sdf function is replaced by the adjusted DIT parameter, and the position coordinates of each sampling point in the view image are input into the sdf function after replacing the DIT parameter to obtain the sdf value of each sampling point, thereby obtaining the candidate 3D model.
[0094] In this invention, the SDF value of each sampling point is used to represent the shape of the object.
[0095] Step 205: Adjust the color of the candidate 3D model using the adjusted target parameters to obtain the target 3D model of the object.
[0096] In one embodiment, such as Figure 7 The diagram shown illustrates the process of determining the target 3D model of an object, including the following steps:
[0097] Step 701: For any pixel in any image of the multi-view image, determine the target color value of the pixel using a preset function, the adjusted target parameter, and the adjusted DIT parameter;
[0098] The preset functions include a first preset function and a second preset function.
[0099] The following describes the specific method for determining the target color value of a pixel in step 701, such as... Figure 8 The diagram illustrates the process for determining the target color value of a pixel, including the following steps:
[0100] Step 801: for any pixel point in any image in the multi-view image, emitting a light ray from the camera view corresponding to the image and pointing to the pixel point;
[0101] Step 802: using the adjusted target parameters to perform position transformation on the position coordinates of each sampling point in the light ray, to obtain the position coordinates of each sampling point after transformation in the light ray;
[0102] Wherein, the position coordinates of each sampling point after transformation in the light ray can be obtained by formula (4):
[0103] x n ′=S·R -1 (x n -T)......(4);
[0104] Wherein, x n ′ is the position coordinates of the nth sampling point after transformation, x n is the position coordinates of the nth sampling point before transformation, S is the scale parameter in the adjusted target parameters, R is the rotation parameter in the adjusted target parameters, and T is the translation parameter in the adjusted target parameters.
[0105] It should be noted that the way of determining the position coordinates of the sampling points has been described in detail in the foregoing, and will not be repeated here.
[0106] Step 803: using the position coordinates of each sampling point after transformation in the light ray, the first preset function and the sdf function, to obtain the position coordinates of the intersection point of the candidate three-dimensional model and the light ray;
[0107] In one embodiment, as shown in FIG. 8, a flowchart for determining the position coordinates of the intersection point of the candidate three-dimensional model and the light ray includes the following steps: Figure 9
[0108] Step 901: traversing each sampling point in the light ray in a specified order, for any traversed sampling point, inputting the position coordinates of the sampling point into the first preset function to obtain the optimized sdf value of the sampling point, and inputting the sampling point into the sdf function to obtain the sdf value of the sampling point;
[0109] Wherein, the optimized sdf value obtained in the first preset function is more accurate than the sdf value obtained in the sdf function.
[0110] Step 902: adding the optimized sdf value and the sdf value to obtain a target sdf value;
[0111] Step 903: if the target sdf value of the sampling point is greater than a specified value, obtaining a target position coordinate of the sampling point based on the target sdf value and the position coordinate of the sampling point, determining the sampling point as an intersection point of the candidate three-dimensional model and the light ray, and determining the target position coordinate as the position coordinate of the intersection point;
[0112] In one embodiment, as shown in FIG. 9, a flowchart for determining the target position coordinate of the sampling point includes the following steps: Figure 10
[0113] Step 1001: multiplying the target sdf value by a specified multiple to obtain an adjusted target sdf value;
[0114] It should be noted that the specified multiple in this embodiment can be set according to actual conditions, and the specific value of the specified multiple is not limited in this embodiment.
[0115] Step 1002: adding the adjusted target sdf value to a depth of a camera for shooting an image corresponding to the sampling point to obtain an adjusted camera depth;
[0116] Step 1003: obtaining the target position coordinate of the sampling point by using the adjusted camera depth and the position coordinate of the sampling point. The target position coordinate of the sampling point can be obtained by formula (5):
[0117] x″ n = o + r d... (5);
[0118] wherein x″ n is the target position coordinate of the nth sampling point, o is the position coordinate of the camera corresponding to the sampling point, r is the direction of the light ray corresponding to the sampling point, and d is the adjusted camera depth.
[0119] Step 904: if the target sdf value of the sampling point is not greater than the specified value, continuing to traverse other sampling points in the light ray until the position coordinate of the intersection point of the candidate three-dimensional model and the light ray is determined.
[0120] It should be noted that the specified value can be set according to actual conditions, and the specific value of the specified value is not limited in this embodiment.
[0121] Step 804: performing position transformation on the position coordinate of the intersection point by using the adjusted target parameter to obtain a transformed position coordinate of the intersection point;
[0122] Wherein, the position transformation can be realized according to the manner in formula (4), and this embodiment will not be repeated here.
[0123] Step 805: input the transformed position coordinates of the intersection points into the second preset function to obtain the color value of the pixel point.
[0124] In this embodiment, the second preset function is a function for determining the color value of a pixel point.
[0125] Step 702: perform surface rendering on the image based on the target color value of each pixel point in the image to obtain a rendered image;
[0126] Replace the current color value of each pixel point in the image with the determined target color value of each pixel point to obtain a rendered image.
[0127] Step 703: obtain a second loss value based on the rendered image and the mask image corresponding to the rendered image;
[0128] In one embodiment, the second loss value is obtained in the following manner:
[0129] For any pixel point in the rendered image corresponding to any one of the multi-view images, obtain a first intermediate loss value based on the absolute value of the difference between the pixel value of the pixel point and the pixel value of the corresponding pixel point in the mask image, obtain a second intermediate loss value based on the sum of the first intermediate loss values of each pixel point in the rendered image, obtain a third intermediate loss value using the sum of each second intermediate loss value corresponding to the multi-view images, obtain a fourth intermediate loss value based on each rendered image and the mask image corresponding to each rendered image, and obtain a fifth intermediate loss value using the preferred sdf value of the point on the surface of the candidate three-dimensional model. Add the third intermediate loss value, the fourth intermediate loss value, and the fifth intermediate loss value to obtain the fourth loss value.
[0130] In this embodiment, the preferred sdf value of the point on the surface of the candidate three-dimensional model is obtained based on a first preset function, and the preferred sdf total value is obtained by adding the preferred sdf values of the points on the surface of the candidate three-dimensional model, and the fifth intermediate loss value is obtained by multiplying the preferred sdf total value by a preset weight.
[0131] It should be noted that the manner of determining the fourth intermediate loss value is the same as that of determining the first loss value, which will not be described herein.
[0132] Step 704: determine whether the second loss value satisfies a second preset condition, if yes, execute step 705, and if no, execute step 706;
[0133] Step 705: adjust the specified parameters in the preset function and return to execute step 701;
[0134] Step 706: Adjust the color of the candidate 3D model based on the target color value corresponding to the second loss value that satisfies the second preset condition to obtain the target 3D model of the object.
[0135] The specified parameter can be adjusted by increasing or decreasing the specified value each time. The specific adjustment method can be set according to the actual situation, and this embodiment will not limit it here.
[0136] To further improve the accuracy of 3D model reconstruction, in one embodiment, in response to a user-triggered DIT parameter modification command, the depth implicit template DIT parameters are modified to modify the shape and / or surface texture of the object.
[0137] For example, such as Figure 11 The diagram illustrates how the shape of an object is modified based on user-defined commands. Figure 11 As can be seen, the size and height of the 3D model can be modified based on the DIT parameters.
[0138] To further connect the technical solutions in this application, the following is combined with... Figure 12 A detailed explanation may include the following steps:
[0139] Step 1201: In response to the user-triggered 3D model reconstruction command for an object, acquire multi-view images corresponding to the object, wherein the multi-view images are images of the object taken from different angles;
[0140] Step 1202: Segment the multi-view images of the object to obtain segmented images;
[0141] Step 1203: Based on the segmented images and the corresponding mask images, obtain the first loss value;
[0142] Step 1204: Determine whether the first loss value meets the first preset condition. If not, proceed to step 1205; if yes, proceed to step 1206.
[0143] Step 1205: Adjust the target parameters of the object and the DIT parameters corresponding to the object category according to the preset rules to obtain intermediate target parameters and intermediate DIT parameters. Then, use the intermediate target parameters and intermediate DIT parameters to render each image again to obtain the updated mask image of each image. After determining the updated mask image of each image as the mask image corresponding to each image, return to step 1203.
[0144] Step 1206: Determine the intermediate target parameter corresponding to the first loss value that satisfies the first preset condition as the adjusted target parameter, and determine the intermediate DIT parameter corresponding to the first loss value that satisfies the preset condition as the adjusted DIT parameter.
[0145] Step 1207: Adjust the shape of the initial 3D model corresponding to the category of the object using the adjusted DIT parameters to obtain a candidate 3D model, wherein the initial 3D model is obtained based on the DIT parameters and the multi-view image corresponding to the object;
[0146] Step 1208: For any pixel in any image of the multi-view images, determine the target color value of the pixel using a preset function, the adjusted target parameter, and the adjusted DIT parameter;
[0147] Step 1209: Perform surface rendering on the image based on the target color values of each pixel in the image to obtain a rendered image;
[0148] Step 1210: Based on the rendered image and the mask image corresponding to the rendered image, obtain the second loss value;
[0149] Step 1211: Determine whether the second loss value meets the second preset condition. If not, proceed to step 1212; if yes, proceed to step 1213.
[0150] Step 1212: After adjusting the specified parameters in the preset function, return to step 1210;
[0151] Step 1213: Adjust the color of the candidate 3D model based on the target color value corresponding to the second loss value that satisfies the second preset condition to obtain the target 3D model of the object.
[0152] Based on the same inventive concept, the method for reconstructing a three-dimensional model of an object as described above can also be implemented by a device for reconstructing a three-dimensional model of an object. The effect of reconstructing the three-dimensional model of the object is similar to that of the aforementioned method, and will not be described again here.
[0153] Figure 13 This is a schematic diagram of the structure of a three-dimensional model reconstruction apparatus for an object according to an embodiment of the present disclosure.
[0154] like Figure 13 As shown, the object three-dimensional model reconstruction device 1300 of this disclosure may include an acquisition module 1310, an image segmentation module 1320, a parameter adjustment module 1330, a candidate three-dimensional model determination module 1340, and a target three-dimensional model determination module 1350.
[0155] The acquisition module 1310 is configured to acquire multi-view images corresponding to the object in response to a user-triggered object three-dimensional model reconstruction instruction, where the multi-view images are images of the object captured at different angles.
[0156] The image segmentation module 1320 is configured to segment the multi-view images of the object respectively to obtain segmented images.
[0157] The parameter adjustment module 1330 is configured to adjust a target parameter of the object and a deep implicit template (DIT) parameter corresponding to a category of the object based on the segmented images and the mask images corresponding to the images to obtain an adjusted target parameter and an adjusted DIT parameter.
[0158] The candidate three-dimensional model determination module 1340 is configured to adjust a shape of an initial three-dimensional model corresponding to the category of the object by using the adjusted DIT parameter to obtain a candidate three-dimensional model, where the initial three-dimensional model is obtained based on the DIT parameter and the multi-view images corresponding to the object.
[0159] The target three-dimensional model determination module 1350 is configured to adjust a color of the candidate three-dimensional model by using the adjusted target parameter to obtain a target three-dimensional model of the object.
[0160] In an embodiment, the apparatus further includes:
[0161] The mask image determination module 1360 is configured to obtain a mask image corresponding to each image by the following manner:
[0162] For any pixel point in any image, a light ray is emitted from a camera perspective corresponding to the image to the pixel point, and a specified number of sampling points are sampled equidistantly on the light ray;
[0163] For any sampling point, a signed distance field (sdf) value of the sampling point is determined based on a position coordinate of the sampling point and the target parameter, where the sdf value is used to represent a distance between the sampling point and a surface of an initial three-dimensional model of the object.
[0164] A minimum sdf value among the sdf values of the sampling points is determined as a mask pixel value corresponding to the pixel point, and a mask image corresponding to the image is obtained by using the mask pixel values of the pixel points in the image.
[0165] In an embodiment, the mask image determination module 1360 performs the determination of the sdf value of the sampling point based on the position coordinate of the sampling point and the target parameter, and is specifically configured to:
[0166] transform the position coordinates of the sampling points by using the target parameters to obtain target position coordinates of the sampling points, wherein the target parameters comprise at least one of a rotation parameter, a translation parameter and a scale parameter;
[0167] input the target position coordinates of the sampling points into the sdf function to obtain the sdf value of the sampling points.
[0168] In an embodiment, the parameter adjustment module 1330 is specifically configured to:
[0169] obtain a first loss value based on the segmented images and the mask images corresponding to the images;
[0170] If the first loss value does not satisfy a first preset condition, adjust the target parameters of the object and the DIT parameters corresponding to the object category according to a preset rule, obtain intermediate target parameters and intermediate DIT parameters, re-render each image by using the intermediate target parameters and the intermediate DIT parameters, obtain updated mask images of the images, and determine the updated mask images of the images as the mask images corresponding to the images, and then return to execute the step of obtaining a first loss value based on the segmented images and the mask images corresponding to the images until the first loss value satisfies the first preset condition, then determine the intermediate target parameters corresponding to the first loss value satisfying the first preset condition as the adjusted target parameters, and determine the intermediate DIT parameters corresponding to the first loss value satisfying the preset condition as the adjusted DIT parameters.
[0171] In an embodiment, the parameter adjustment module 1330 executes the step of obtaining a first loss value based on the segmented images and the mask images corresponding to the images, and is specifically configured to:
[0172] add pixel values of first target pixel points in the mask image corresponding to the segmented image to obtain a first total pixel value, wherein the first target pixel points are pixel points in the mask image whose pixel values are less than a specified threshold; and
[0173] add pixel values of second target pixel points in the mask image corresponding to the segmented image to obtain a second total pixel value, wherein the second target pixel points are pixel points in the mask image whose pixel values are greater than the specified threshold; and
[0174] add the first total pixel value and the second total pixel value to obtain a target total pixel value corresponding to the segmented image;
[0175] Add the target total pixel value corresponding to each segmented image to obtain the first loss value.
[0176] In one embodiment, the target three-dimensional model determination module is specifically configured to:
[0177] For any pixel point in any one of the multi-view images, a target color value of the pixel point is determined by using a preset function, the adjusted target parameter, and the adjusted DIT parameter.
[0178] Based on the target color value of each pixel point in the image, surface rendering is performed on the image to obtain a rendered image.
[0179] Based on the rendered image and a mask image corresponding to the rendered image, a second loss value is obtained.
[0180] If the second loss value does not satisfy a second preset condition, the specified parameter in the preset function is adjusted, and then the step of determining the target color value of the pixel point by using the preset function, the adjusted target parameter, and the adjusted DIT parameter is returned until the second loss value satisfies the second preset condition. Then, the color of the candidate three-dimensional model is adjusted based on the target color value corresponding to the second loss value that satisfies the second preset condition, to obtain the target three-dimensional model of the object.
[0181] In one embodiment, the preset function includes a first preset function and a second preset function.
[0182] The target three-dimensional model determination module 1350 performs the step of determining the target color value of the pixel point by using the preset function, the adjusted target parameter, and the adjusted DIT parameter, and is specifically configured to:
[0183] For any one pixel point in any one of the multi-view images, a light ray pointing to the pixel point is emitted from a camera perspective corresponding to the image;
[0184] The position coordinates of each sampling point in the light ray are transformed in position by using the adjusted target parameter to obtain transformed position coordinates of each sampling point in the light ray;
[0185] The position coordinates of the intersection point of the candidate three-dimensional model and the light ray are obtained by using the transformed position coordinates of each sampling point in the light ray, the first preset function, and the sdf function.
[0186] The position coordinates of the intersection point are transformed in position by using the adjusted target parameter to obtain transformed position coordinates of the intersection point.
[0187] Input the position coordinates of the intersection point after transformation into the second preset function to obtain a target color value of the pixel point.
[0188] In one embodiment, the target three-dimensional model determination module 1350 performs the obtaining of the position coordinates of the intersection point of the candidate three-dimensional model and the light ray by using the position coordinates of each sampling point in the light ray after transformation, the first preset function, and the sdf function, and specifically for:
[0189] Traverse each sampling point in the light ray in a specified order, and for any one of the traversed sampling points, perform the following steps:
[0190] Input the position coordinates of the sampling point into the first preset function to obtain an optimized sdf value of the sampling point, and input the sampling point into the sdf function to obtain an sdf value of the sampling point;
[0191] Add the optimized sdf value and the sdf value to obtain a target sdf value;
[0192] If the target sdf value of the sampling point is greater than a specified value, obtain a target position coordinate of the sampling point based on the target sdf value and the position coordinates of the sampling point, determine the sampling point as the intersection point of the candidate three-dimensional model and the light ray, and determine the target position coordinate as the position coordinates of the intersection point;
[0193] If the target sdf value of the sampling point is not greater than the specified value, continue to traverse other sampling points in the light ray until the position coordinates of the intersection point of the candidate three-dimensional model and the light ray are determined.
[0194] In one embodiment, the target three-dimensional model determination module 1350 performs the obtaining of the target position coordinate of the sampling point based on the target sdf value and the position coordinates of the sampling point, and specifically for:
[0195] Multiply the target sdf value by a specified multiple to obtain an adjusted target sdf value;
[0196] Add the adjusted target sdf value to a depth of a camera that captures an image corresponding to the sampling point to obtain an adjusted camera depth;
[0197] Obtain the target position coordinate of the sampling point by using the adjusted camera depth and the position coordinates of the sampling point.
[0198] After introducing a three-dimensional model reconstruction method and device of an object according to an exemplary embodiment of the present application, next, an electronic device according to another exemplary embodiment of the present application is introduced.
[0199] Those skilled in the art can understand that each aspect of the present application can be implemented as a system, a method or a program product. Therefore, each aspect of the present application can be embodied in a form of entirely hardware, entirely software (including firmware, microcode, etc.), or a combination of hardware and software, which can be generically referred to as "circuitry", "module" or "system".
[0200] In some possible implementation, the electronic device according to the present application can include at least one processor and at least one computer storage medium. The computer storage medium stores program codes which, when executed by the processor, cause the processor to perform the steps of the three-dimensional model reconstruction method of the object according to various exemplary embodiments of the present application described above in the specification. For example, the processor can perform steps 201-205 as shown in Figure 2
[0201] The electronic device 1400 according to this implementation of the present application will be described below with reference to Figure 14 Figure 14 The electronic device 1400 shown is merely an example and should not bring any limitation to the function and use range of the embodiments of the present application.
[0202] As shown in Figure 14 The electronic device 1400 is shown in the form of a general electronic device. The components of the electronic device 1400 can include, but are not limited to, the at least one processor 1401 described above, the at least one computer storage medium 1402 described above, and a bus 1403 connecting different system components, including the computer storage medium 1402 and the processor 1401.
[0203] The bus 1403 represents one or more of several types of bus structures, including a computer storage medium bus or computer storage medium controller, a peripheral bus, a processor bus, or a local bus using any of a variety of bus architectures.
[0204] The computer storage medium 1402 can include readable media in the form of volatile computer storage medium, such as random access computer storage medium (RAM) 1421 and / or cache computer storage medium 1422, and can further include read-only computer storage medium (ROM) 1423.
[0205] The computer storage medium 1402 can further include programs / utilities 1425 having a set of (at least one) program modules 1424, such as an operating system, one or more application programs, other program modules, and program data, each of which or some combination of which can include implementation of a network environment.
[0206] The electronic device 1400 can also communicate with one or more external devices 1404 such as a keyboard or a pointing device, and / or one or more devices that enable a user to interact with an element of the electronic device 1400. Furthermore, the electronic device 1400 can communicate with one or more devices that enable the electronic device 1400 to communicate with one or more other electronic devices. For example, the electronic device 1400 can communicate with an external device such as a router, a modem, or the like, via an I / O interface 1405. In addition, the electronic device 1400 can communicate with one or more networks, such as a local area network (LAN), a wide area network (WAN), and / or the Internet, through a network adapter 1406. As depicted, the network adapter 1406 communicates with the other components of the electronic device 1400 via the bus 1403. It should be appreciated that although the network adapter 1406 is depicted as a separate component, the network adapter 1406 can be incorporated with the bus 1403. In addition, the electronic device 1400 can include other hardware and / or software modules that are not shown in FIG. 14, such as microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data archival storage systems, etc.
[0207] In some possible embodiments, various aspects of the method for reconstructing a three-dimensional model of an object provided by the present application can also be implemented in the form of a program product, which includes program codes for causing a computer device to perform the steps of the method for reconstructing a three-dimensional model of an object according to various exemplary embodiments of the present application described above in the specification when the program product is run on the computer device.
[0208] The program product can employ any combination of one or more computer readable media. The computer readable media can be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium include an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical computer storage device, a magnetic computer storage device, or any suitable combination of the foregoing.
[0209] The program product for reconstructing a three-dimensional model of an object of an embodiment of the present application can employ a portable compact disc read-only memory (CD-ROM) and include program codes, and can be run on an electronic device. However, the program product of the present application is not limited thereto, and in the present document, the computer readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device.
[0210] The readable program code can be transmitted as a carrier wave in a data signal using any suitable medium, including but not limited to wireless, wired, optical fiber cable, RF, and the like, or any suitable combination of these.
[0211] The program code contained on the readable medium can be executed by any suitable processor, including but not limited to a microprocessor, a microcontroller, a graphics processing unit, a central processing unit, a state machine, and the like.
[0212] The program code can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++, or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's electronic device, partly on the user's electronic device, as a stand-alone software package, partly on the user's electronic device and partly on a remote electronic device or entirely on the remote electronic device or server. In the latter scenario, the remote electronic device can be connected to the user's electronic device through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external electronic device (for example, through the Internet using an Internet Service Provider). The application program code can be downloaded to the user's electronic device from an external electronic device or server through any type of network connection.
[0213] It should be noted that, although several modules of the apparatus are mentioned in the above detailed description, this division is merely exemplary and not mandatory. Indeed, according to an embodiment of the application, the features and functionalities of two or more modules described above can be embodied in one module. Conversely, the features and functionalities of one module described above can be further divided into several modules embodied.
[0214] Furthermore, although the operations of the method(s) of the present application are described in a particular, sequential order for purposes of illustration, this is not intended to be a limitation, and any number of the described operations can be rearranged in another suitable order. Note, for example, that the order in which the operations or effects can occur can or can not strictly follow that described herein. Further, note that certain operations can be performed simultaneously. Moreover, steps can be added or omitted in some other embodiments. Further, watch out for the fact that not all of the operations are mandatory in some embodiments.
[0215] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk computer storage media, CD-ROMs, optical computer storage media, etc.) containing computer-usable program code.
[0216] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0217] These computer program instructions may also be stored in a computer-readable computer storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable computer storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0218] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0219] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A method of reconstructing a three-dimensional model of an object, characterized by, The method comprises: in response to a user-triggered object three-dimensional model reconstruction instruction, acquiring multi-view images corresponding to the object, wherein the multi-view images are images of the object taken at different angles; segmenting the multi-view images of the object respectively to obtain segmented images; and based on the segmented images and the mask images corresponding to the images, obtaining a first loss value; if the first loss value does not satisfy a first preset condition, adjusting a target parameter of the object and a DIT parameter corresponding to the object category according to a preset rule to obtain an intermediate target parameter and an intermediate DIT parameter, re-rendering each image using the intermediate target parameter and the intermediate DIT parameter to obtain updated mask images of the images, and determining the updated mask images of the images as the mask images corresponding to the images, and then returning to the step of obtaining a first loss value based on the segmented images and the mask images corresponding to the images until the first loss value satisfies the first preset condition, then determining the intermediate target parameter corresponding to the first loss value satisfying the first preset condition as the adjusted target parameter, and determining the intermediate DIT parameter corresponding to the first loss value satisfying the preset condition as the adjusted DIT parameter, wherein the DIT parameter is a model parameter represented using a high-dimensional vector, and the preset rule is to increase the target parameter and the DIT parameter by a specified value each time; adjusting the shape of an initial three-dimensional model corresponding to the category of the object using the adjusted DIT parameter to obtain a candidate three-dimensional model, wherein the initial three-dimensional model is obtained based on the DIT parameter and the multi-view images corresponding to the object; adjusting the color of the candidate three-dimensional model using the adjusted target parameter to obtain a target three-dimensional model of the object.
2. The method of claim 1, wherein, The mask image corresponding to each image is obtained in the following manner: for any one pixel point in any one image, a light ray pointing to the pixel point is emitted from the camera perspective corresponding to the image, and a specified number of sampling points are sampled equidistantly on the light ray; for any one sampling point, based on the position coordinates of the sampling point and the target parameter, a signed distance field (sdf) value of the sampling point is determined, wherein the sdf value is used to represent the distance between the sampling point and the surface of the initial three-dimensional model of the object; the smallest sdf value among the sdf values of the sampling points is determined as the mask pixel value corresponding to the pixel point; the mask image corresponding to the image is obtained through the mask pixel values of the pixel points in the image.
3. The method of claim 2, wherein, The determination of the sdf value of the sampling point based on the position coordinates of the sampling point and the target parameter comprises: performing position transformation on the position coordinates of the sampling point using the target parameter to obtain target position coordinates of the sampling point, wherein the target parameter includes at least one of a rotation parameter, a translation parameter, and a scale parameter. Input the target position coordinates of the sampling points into the sdf function to obtain sdf values of the sampling points.
4. The method of claim 1, wherein, The first loss value is obtained based on the segmented images and the mask images corresponding to the images. For any one segmented image, the pixel values of first target pixel points in the mask image corresponding to the segmented image are added to obtain a first total pixel value, wherein the first target pixel points are pixel points in the mask image with pixel values less than a specified threshold. For any one segmented image, the pixel values of first target pixel points in the mask image corresponding to the segmented image are added to obtain a first total pixel value, wherein the first target pixel points are pixel points in the mask image with pixel values less than a specified threshold. The first total pixel value and the second total pixel value are added to obtain a target total pixel value corresponding to the segmented image. The first loss value is obtained by adding the target total pixel values corresponding to the segmented images.
5. The method of claim 1, wherein, The target three-dimensional model of the object is obtained by adjusting the color of the candidate three-dimensional model using the adjusted target parameter. For any one pixel point in any one image in the multi-view images, a target color value of the pixel point is determined using a preset function, the adjusted target parameter, and the adjusted DIT parameter. The image is surface rendered based on the target color values of the pixel points in the image to obtain a rendered image. A second loss value is obtained based on the rendered image and the mask image corresponding to the rendered image. If the second loss value does not satisfy a second preset condition, the specified parameter in the preset function is adjusted, and then the step of determining the target color value of the pixel point using the preset function, the adjusted target parameter, and the adjusted DIT parameter is returned until the second loss value satisfies the second preset condition.
6. The method of claim 5, wherein, The preset function includes a first preset function and a second preset function. The target color value of the pixel point is determined using the preset function, the adjusted target parameter, and the adjusted DIT parameter, including: For any one pixel point in any one image in the multi-view images, a light ray pointing to the pixel point is emitted from a camera perspective corresponding to the image. The position coordinates of the sampling points in the light ray are position transformed using the adjusted target parameter to obtain transformed position coordinates of the sampling points in the light ray. The position coordinates of the intersection point of the candidate three-dimensional model and the light ray are obtained using the transformed position coordinates of the sampling points in the light ray, the first preset function, and an sdf function. The position coordinates of the intersection point are position transformed using the adjusted target parameter to obtain transformed position coordinates of the intersection point. The target color value of the pixel point is obtained by inputting the transformed position coordinates of the intersection point into the second preset function.
7. The method of claim 6, wherein, The position coordinates of the intersection point of the candidate three-dimensional model and the light ray are obtained by using the position coordinates of each sampling point in the light ray after transformation, the first preset function, and the sdf function, and the method comprises the following steps: Each sampling point in the light ray is traversed in a specified order, and the following steps are performed for any one of the traversed sampling points: The position coordinates of the sampling point are input into the first preset function to obtain an optimized sdf value of the sampling point, and the sampling point is input into the sdf function to obtain an sdf value of the sampling point; The optimized sdf value and the sdf value are added to obtain a target sdf value; If the target sdf value of the sampling point is greater than a specified value, the target position coordinates of the sampling point are obtained based on the target sdf value and the position coordinates of the sampling point, the sampling point is determined as the intersection point of the candidate three-dimensional model and the light ray, and the target position coordinates are determined as the position coordinates of the intersection point; If the target sdf value of the sampling point is not greater than the specified value, the other sampling points in the light ray are continuously traversed until the position coordinates of the intersection point of the candidate three-dimensional model and the light ray are determined.
8. The method of claim 7, wherein, The target position coordinates of the sampling point are obtained based on the target sdf value and the position coordinates of the sampling point, and the method comprises the following steps: The target sdf value is multiplied by a specified multiple to obtain an adjusted target sdf value; The adjusted target sdf value is added to the depth of a camera for shooting the image corresponding to the sampling point to obtain an adjusted camera depth; The target position coordinates of the sampling point are obtained by using the adjusted camera depth and the position coordinates of the sampling point.
9. An electronic device, comprising: The processor and the memory are connected through a bus; The memory stores a computer program, and the processor is configured to perform the following operations based on the computer program: In response to a three-dimensional model reconstruction instruction of an object triggered by a user, a plurality of multi-angle images corresponding to the object are obtained, wherein the plurality of multi-angle images are images of the object shot at different angles; Each multi-angle image of the object is segmented to obtain a segmented image; and A first loss value is obtained based on the segmented images and the mask images corresponding to the images. If the first loss value does not satisfy the first preset condition, the target parameter of the object and the DIT parameter corresponding to the object category are adjusted according to a preset rule to obtain an intermediate target parameter and an intermediate DIT parameter, the images are rendered again using the intermediate target parameter and the intermediate DIT parameter to obtain updated mask images of the images, the updated mask images of the images are determined as the mask images corresponding to the images, and the step of obtaining the first loss value based on the segmented images and the mask images corresponding to the images is executed until the first loss value satisfies the first preset condition, the intermediate target parameter corresponding to the first loss value satisfying the first preset condition is determined as the adjusted target parameter, and the intermediate DIT parameter corresponding to the first loss value satisfying the preset condition is determined as the adjusted DIT parameter, wherein the DIT parameter is a model parameter represented by a high-dimensional vector, and the preset rule is to increase the target parameter and the DIT parameter by a specified value each time; The shape of an initial three-dimensional model corresponding to the category of the object is adjusted by using the adjusted DIT parameter to obtain a candidate three-dimensional model, wherein the initial three-dimensional model is obtained based on the DIT parameter and the multi-view images corresponding to the object; The color of the candidate three-dimensional model is adjusted by using the adjusted target parameter to obtain a target three-dimensional model of the object.
Citation Information
Patent Citations
A directory system
CA2538506A1
Apparatus and method for performing transforms of packed complex data having real and imaginary components
CN109582362A