Object reconstruction method and related device
An object reconstruction method includes obtaining a plurality of target images and real poses corresponding to a case in which a camera captures the target images. Based on the target images and the real poses, a sparse point cloud whose size is consistent with a real size of a target object is constructed and a three-dimensional (3D) model of the target object is generated based on the sparse point cloud. A distribution size of the sparse point cloud generated based on the first poses is consistent with the real size of the target object such that the reconstructed 3D model is more realistic, and does not include a size distortion.
1 . A method comprising:
obtaining target images of a target object and a first pose corresponding to the target images, wherein the target images and first pose are based on angles of view, and wherein the first pose is a real pose;
determining, based on the target images, a second pose corresponding to the target images;
constructing, based on the target images, an initial sparse point cloud of the target object;
determining, based on the first pose and the second pose, a pose adjustment relationship;
adjusting, based on the pose adjustment relationship, location distribution of the initial sparse point cloud to obtain a target sparse point cloud of the target object, wherein a distribution size of the target sparse point cloud is consistent with a real size of the target object; and
performing, based on the target sparse point cloud, a three-dimensional (3D) reconstruction on the target object to obtain a 3D model of the target object.
2 . The method of claim 1 , further comprising capturing, by a sensor in a terminal device, the target images and the first pose.
3 . The method of claim 2 , further comprising sending, to the terminal device, the 3D model.
4 . The method of claim 2 , wherein the sensor is an inertial measurement unit (IMU).
5 . The method of claim 4 , further comprising:
receiving, from the terminal device, a pose association relationship among the target images before constructing the initial sparse point cloud; and
further constructing, through feature point matching based on first images that are in the target images and among which there is the pose association relationship, the initial sparse point cloud.
6 . The method of claim 1 , further comprising:
calculating, based on the first pose, a pose association relationship among the target images before constructing the initial sparse point cloud, and
further constructing, through feature point matching based on first images that are in the target images and among which there is the pose association relationship, the initial sparse point cloud.
7 . The method of claim 1 , wherein the target images meet a condition, and wherein the condition is that an angle-of-view coverage of the target images for the target object is greater than a threshold.
8 . The method of claim 1 , wherein the target images meet a condition, and wherein the condition is that a degree of angle-of-view overlap between different target images in the target images is less than a threshold.
9 . The method of claim 1 , wherein the target images meet a condition, and wherein the condition is that an image definition of the target images is greater than a threshold.
10 . A method comprising:
capturing a first image of a target object;
displaying, based on a location of the target object in the first image and a first real pose corresponding to the first image, first guidance information indicating capture viewpoints distributed around the target object;
obtaining target images that are based on the first guidance information and a first pose, wherein each target image is from one of the capture viewpoints;
calculating, based on a second pose corresponding to the target images, a pose association relationship among the target images, wherein the second pose is a second real pose corresponding to a corresponding target image, and wherein the second pose is from a sensor;
sending, to a server, the target images, the second pose, and the pose association relationship to construct a three-dimensional (3D) model of the target object; and
receiving, from the server, the 3D model that is based on the target images, the pose association relationship, and the second pose.
11 . The method of claim 10 , wherein the sensor is an inertial measurement unit (IMU).
12 . The method of claim 10 , wherein an angle-of-view coverage of the capture viewpoints for the target object is greater than a first threshold.
13 . The method of claim 10 , wherein a degree of angle-of-view overlap between different capture viewpoints in the capture viewpoints is less than a second threshold.
14 . An apparatus comprising:
a memory configured to store instructions; and
one or more processors coupled to the memory and configured to execute the instructions to cause the apparatus to:
obtain target images of a target object and a first pose corresponding to the target images, wherein the target images are received from a terminal device, and are based on angles of view, wherein the first pose is a real pose received from the terminal device;
determine, based on the target images, a second pose corresponding to the target images;
construct, based on the target images, an initial sparse point cloud of the target object;
determine a pose adjustment relationship based on the first pose and the second pose;
adjust, based on the pose adjustment relationship, location distribution of the initial sparse point cloud to obtain a sparse point cloud of the target object, wherein a distribution size of the sparse point cloud is consistent with a real size of the target object; and
perform, based on the sparse point cloud, a three-dimensional (3D) reconstruction on the target object to obtain a 3D model of the target object.
15 . The apparatus of claim 14 , wherein the one or more processors are further configured to execute the instructions to cause the apparatus to receive, from the terminal device, the target images and wherein the first pose is from a sensor of the terminal device.
16 . The apparatus of claim 15 , wherein the sensor is an inertial measurement unit (IMU).
17 . The apparatus of claim 16 , wherein the one or more processors are further configured to execute the instructions to cause the apparatus to:
receive, from the terminal device, a pose association relationship among the target images before constructing the initial sparse point cloud of the target object; and
further construct, through feature point matching based on first images that are in the target images and between which there is the pose association relationship, the initial sparse point cloud.
18 . The apparatus of claim 14 , wherein the one or more processors are further configured to execute the instructions to cause the apparatus to send, to the terminal device, the 3D model.
19 . The apparatus of claim 14 , wherein the one or more processors are further configured to execute the instructions to cause the apparatus to:
determine, based on the first pose, a pose association relationship among the target images before constructing the initial sparse point cloud; and
further construct, through feature point matching based on first images that are in the target images and between which there is the pose association relationship, the initial sparse point cloud.
20 . The apparatus of claim 14 , wherein the target images meet at least one of the following conditions:
an angle-of-view coverage of the target images for the target object is greater than a first threshold;
a degree of angle-of-view overlap between different target images in the target images is less than a second threshold; or
an image definition of the target images is greater than a third threshold.