Three-dimensional reconstruction method, device, equipment, medium and product

By acquiring and sorting the image collection of the target object, extracting and matching feature points, and optimizing the three-dimensional reconstruction process combined with random noise, the problem of the lack of completeness of texture object reconstruction and inaccurate camera pose calculation in the existing technology is solved, and the three-dimensional reconstruction is improved. accuracy and efficiency.

CN114708399BActive Publication Date: 2024-09-06BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210278300.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-21
Publication Date
2024-09-06
Estimated Expiration
2042-03-21

AI Technical Summary

Technical Problem

Existing 3D reconstruction methods lack reconstruction integrity when there is a lack of textured objects, and the SFM algorithm requires feature points in the image to remain unchanged, which limits the shooting method and leads to inaccurate camera pose calculations.

Method used

By obtaining the image collection of the target object, extracting image feature points, determining the image sorting order, and performing three-dimensional reconstruction based on feature point matching pairs, introducing random noise to optimize the reconstruction process, and improve the accuracy of SFM pose calculation.

Benefits of technology

It improves the completeness and accuracy of 3D reconstruction of objects lacking surface texture features, reduces matching failures caused by changes in the position of the target object and the background, and optimizes the 3D reconstruction effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114708399B
    Figure CN114708399B
Patent Text Reader

Abstract

The present disclosure provides a three-dimensional reconstruction method, device, equipment, medium and product, which relate to the computer field, especially to the field of virtual / augmented reality and computer vision. The specific implementation scheme is: obtaining an image set including a target object; extracting feature points of images in the image set; determining the order in which the images in the image set are sorted, and sorting the images based on the order; matching feature points of the sorted images according to the feature points of the images to obtain feature point matching pairs; and reconstructing the target object in three dimensions based on the feature point matching pairs. The present disclosure can reduce matching failures caused by obvious position changes between the target object and the background, and improve the three-dimensional reconstruction effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to the field of virtual / augmented reality and computer vision technology. Background Art

[0002] 3D modeling is the process of constructing mathematical models of 3D objects in real scenes in computers. It is an important research field in computer graphics and computer vision. 3D modeling obtains and analyzes the appearance structure and geometric information of objects and scenes in the real world to simulate 3D interaction and perception in digital space and fully display the characteristics of real objects.

[0003] Three-dimensional modeling has a wide range of uses. It is the basis and key technology for scene target perception and understanding in the fields of modeling and navigation, visual monitoring, virtual reality, human-computer interaction, and computer-aided design. Summary of the invention

[0004] The present disclosure provides a method, apparatus, device, medium and product for three-dimensional reconstruction.

[0005] According to one aspect of the present disclosure, a three-dimensional reconstruction method is provided, comprising: acquiring an image set including a target object; extracting feature points of images in the image set; determining an order for sorting the images in the image set, and sorting the images based on the order; performing feature point matching on the sorted images according to the feature points of the images to obtain feature point matching pairs; and performing three-dimensional reconstruction of the target object based on the feature point matching pairs.

[0006] According to another aspect of the present disclosure, a three-dimensional reconstruction device is provided, including: an acquisition module, used to acquire an image set including a target object; an extraction module, used to extract feature points of images in the image set; a determination module, used to determine the order in which images in the image set are sorted, and sort the images based on the order, and perform feature point matching on the sorted images according to the feature points of the images to obtain feature point matching pairs; and a reconstruction module, used to perform three-dimensional reconstruction of the target object based on the feature point matching pairs.

[0007] According to another aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the three-dimensional reconstruction method described in any one of the present disclosure.

[0008] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute any one of the three-dimensional reconstruction methods described in the present disclosure.

[0009] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the computer program implements any one of the three-dimensional reconstruction methods described in the present disclosure.

[0010] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0012] Figure 1 is a schematic flow chart of a three-dimensional reconstruction method according to the present disclosure;

[0013] Figure 2 is a schematic diagram of image feature point matching according to the present disclosure;

[0014] Figure 3a-Figure 3b A schematic diagram showing a target object in a first placement posture and a second placement posture relative to a photographing platform in an embodiment of the present disclosure is shown;

[0015] Figure 4a-4b A schematic diagram of a first image set and a second image set acquired according to an embodiment of the present disclosure is shown;

[0016] Figure 5 is a flow chart of a method for determining an order for sorting images in an image set according to the present disclosure;

[0017] Figure 6a-6b A schematic diagram of mask images of a first image set and a second image set acquired according to an embodiment of the present disclosure is shown;

[0018] Figure 7 is a flow chart of a method for determining a feature image pair based on an image mask and feature points of an image according to the present disclosure;

[0019] Figure 8 A schematic diagram of an image for determining the maximum number of feature point matching pairs in an exemplary embodiment of the present disclosure is shown;

[0020] Fig. 9 is a flow chart of a method for determining an arrangement order of images in an image set based on a pair of feature images according to the present disclosure;

[0021] Fig.10 It is a flowchart of a method for performing feature point matching on sorted images according to feature points of the images to obtain feature point matching pairs according to the present disclosure;

[0022] Figure 11a-Figure 11c A comparison diagram of the corresponding three-dimensional reconstruction effects when no markers are added, when markers are added and three-dimensional reconstruction is performed using the traditional technology, and when markers are added and three-dimensional reconstruction is performed using the three-dimensional reconstruction method provided by the embodiment of the present disclosure;

[0023] Fig.12 is a block diagram of a three-dimensional reconstruction apparatus according to the present disclosure;

[0024] Fig.13 It is a block diagram of an electronic device used to implement the 3D reconstruction method of the embodiment of the present disclosure. DETAILED DESCRIPTION

[0025] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0026] As artificial intelligence technology is widely used in life and production, 3D modeling has become a key component of the visual part of artificial intelligence and an important research field in computer graphics and computer vision. Its goal is to capture the 3D shape and appearance of objects and scenes with high quality to simulate 3D interaction and perception in digital space. The model obtained through 3D reconstruction can better reflect the characteristics of objects in the real world.

[0027] In current technology, 3D reconstruction methods can be mainly divided into two parts: sparse reconstruction and dense reconstruction. Sparse reconstruction mainly uses Structure From Motion (SFM), and dense reconstruction mainly uses Multi-view Stereo (MVS) to calculate dense point cloud models. Among them, SFM uses two or more scenes to automatically restore camera motion and scene structure, automatically complete camera tracking and motion matching, and calculate the spatial position and direction of the camera when taking the image. When performing 3D reconstruction, the SFM algorithm extracts feature points in the image for matching to determine the camera pose, so it is necessary to ensure that the feature points extracted from all images remain unchanged. This requires that when shooting the reconstructed object, the relative position of the object and its background cannot be changed, which limits the shooting method for shooting the object. Due to the limitation of the shooting method, it is difficult to shoot images of all angles of the object. Moreover, for objects with insufficient surface texture features, the camera pose calculated by SFM is inaccurate or the camera pose cannot be determined.

[0028] In view of this, an embodiment of the present disclosure provides a three-dimensional reconstruction method, which effectively improves the reconstruction integrity of objects lacking texture in image three-dimensional reconstruction.

[0029] Figure 1 is a flow chart of the three-dimensional reconstruction method according to the present disclosure, referring to Figure 1 , the method comprises the following steps.

[0030] In step S101 , a set of images including a target object is acquired.

[0031] In the embodiment of the present disclosure, when the target object is three-dimensionally reconstructed, a set of images of the target object is first obtained. The set of images may be obtained by collecting the target object through an image acquisition device. For example, the target object may be placed on a shooting platform, the relative position between the target object and the shooting platform remains unchanged, the image acquisition device is placed at a fixed position, the shooting platform can support the target object to rotate, and the image acquisition device acquires images corresponding to the target object at different angles.

[0032] In step S102, feature points of images in the image set are extracted.

[0033] In the disclosed embodiment, feature point detection is performed on the images in the image set. The feature points may be feature points such as edge points and corner points on the surface of the target object. It is understandable that when the disclosed embodiment extracts feature points of the target object, methods such as Speeded Up Robust Features (SRUF), Scale-invariant feature transform (SIFT), AKAZE (accelerated version of KAZE), and deep learning network may be used, and the disclosed embodiment does not limit this. KAZE is used to detect and describe feature points in a nonlinear scale space.

[0034] In step S103, the order in which images in the image set are sorted is determined, and the images are sorted based on the order.

[0035] In step S104, feature point matching is performed on the sorted images according to the feature points of the images to obtain feature point matching pairs.

[0036] Figure 2 According to the image feature point matching diagram disclosed in the present invention, after sorting the image set and obtaining the feature points of each image in the image set, feature point matching can be performed on the sorted images to obtain matched feature points, and the matched feature points constitute feature point matching pairs. Figure 2 In the left and right images, the dotted lines connect a pair of matching feature points, i.e., a feature point matching pair. The feature point matching pair is used to determine the relationship between images for mesh reconstruction. When matching feature points, methods such as Approximate Nearest Neighbor (ANN) and Optical Flow can be used for matching.

[0037] In step S105 , the target object is three-dimensionally reconstructed based on the feature point matching pairs.

[0038] In the disclosed embodiment, after obtaining the feature point matching pairs, three-dimensional reconstruction is performed using the feature point matching pair set, which can be to determine the three-dimensional coordinates of each feature point in the matching feature point set, perform three-dimensional reconstruction based on each three-dimensional coordinate, and obtain a three-dimensional reconstructed model.

[0039] After determining the three-dimensional coordinates of each matching feature point, it can be used as a sparse point cloud. Combined with the SFM pose, the three-dimensional coordinates of each pixel in the target object can be determined to obtain a dense point cloud. When calculating the dense point cloud, multi-view clustering (Clustering Multi-View Stereo, CMVS), patch-based multi-view clustering (Patch-based Multi-View Stereo, PMVS), deep learning algorithms, etc. can be used.

[0040] By reconstructing the surface mesh through the dense point cloud, a triangular facet can be constructed according to the three-dimensional coordinates of each point in the dense point cloud. The three-dimensional reconstruction model can be obtained by connecting the triangular facets. Among them, the three-dimensional reconstruction can also be achieved by using the Poisson reconstruction algorithm in the embodiment of the present disclosure.

[0041] In summary, according to the three-dimensional reconstruction method provided by the embodiment of the present disclosure, by sorting the images in the image set and performing feature point matching on the sorted images, it is possible to reduce the matching failure caused by the obvious position change between the target object and the background, improve the accuracy of SFM pose calculation, optimize the three-dimensional reconstruction process of the target object, and improve the three-dimensional reconstruction effect.

[0042] In an exemplary embodiment of the present disclosure, the image set of the target object includes a first image set and a second image set, the first image set is composed of a plurality of first images, the second image set is composed of a plurality of second images, and the first image and the second image include the same target object. The first image is acquired when the target object is placed in a first placement posture relative to the shooting platform, and the second image is acquired when the target object is placed in a second placement posture relative to the shooting platform. The first image and the second image include the same random marker, and the random marker is fixedly set relative to the shooting platform.

[0043] For example, the first image set and the second image set including the target object may be obtained in the following manner. A random marker is fixedly set on the surface of the shooting platform. The random marker may be one or more. Any object with relatively rich textures such as arbitrary patterns, texts, lines, etc. may be used as a marker. First, the target object is placed in a first placement posture relative to the shooting platform. As the shooting platform rotates in a preset direction, the image acquisition device sequentially acquires the first image of the target object at a preset acquisition position. The preset acquisition position may be the initial position of the shooting platform, and the preset acquisition position where the acquisition is performed every time the preset angle passes through the initial position. The image acquisition is performed once at the preset acquisition position to obtain the first image set. It can be understood that the angle between adjacent preset acquisition positions can be determined as needed, but it should be satisfied that there is a certain degree of overlap between the images acquired at adjacent preset acquisition positions, that is, the relative position between the target object and the background changes little, so as to ensure that the number of acquired images is reasonable and a three-dimensional reconstruction effect can be obtained. Then, the placement posture of the target object relative to the shooting platform is changed, that is, the target object is placed in a second placement posture relative to the shooting platform, so that the shooting platform still rotates in the same preset direction, and the above image acquisition process is repeated to obtain the second image set.

[0044] The first images in the first image set are arranged in order, that is, the first images in the first image set are arranged in an order that gradually moves away from the initial position of the rotation of the shooting platform. Similarly, the second images in the second image set are arranged in an order that gradually moves away from the initial position of the rotation of the shooting platform. For the target object, there are a first image and a second image taken at the same preset acquisition position, that is, each first image in the first image set corresponds to each second image in the second image set, and the corresponding first image and second image are collected at the same preset acquisition position.

[0045] Figure 3a-Figure 3b A schematic diagram of a target object in a first placement posture and a second placement posture relative to a shooting platform in an embodiment of the present disclosure is shown. The target object is a doll at the center of the shooting platform, the first placement posture corresponds to the standing posture of the doll, and the second placement posture corresponds to the lying posture of the same doll. The shooting platform can rotate around an axis passing through the center of the shooting platform, and a marker with a random noise pattern is attached to the edge of the shooting platform surface.

[0046] Figure 4a-4b FIG. 1 shows a schematic diagram of a first image set and a second image set acquired according to an embodiment of the present disclosure. Figure 4aThe target object is a doll at the center of the shooting platform. The shooting device is fixed and does not rotate with the rotation of the shooting platform. The target object is in a first placement posture relative to the shooting platform, that is, a standing posture. The first image in the first image set is a perspective from the front of the doll to the shooting device. As the shooting platform rotates clockwise, the doll rotates with the shooting platform. The doll rotates relative to the shooting device, and its relative position gradually changes, deviating from the front of the doll and the angle gradually increases. After a 360-degree rotation, it returns to the perspective of facing the front of the shooting device. Figure 3b FIG. 4 shows the same target object photographed by the same photographing platform, and Figure 4b The target object is in a second placement posture, i.e., a lying posture, relative to the shooting platform, and the change in the angle between each second image in the second image set and each first image in the first image set and the shooting device is in one-to-one correspondence.

[0047] In summary, according to the 3D reconstruction method provided by the embodiment of the present disclosure, random noise is introduced to optimize the 3D reconstruction process and improve the accuracy of SFM pose calculation, thereby achieving effective 3D reconstruction of objects lacking surface texture features.

[0048] Figure 5 is a flow chart of a method for determining the order of sorting images in an image set according to the present disclosure, referring to Figure 5 , the method comprises the following steps.

[0049] In step S501, mask processing is performed on each image in the image set to obtain an image mask corresponding to the target object in each image.

[0050] Figure 6a-6b A schematic diagram of mask images of a first image set and a second image set acquired according to an embodiment of the present disclosure is shown.

[0051] In the disclosed embodiment, mask processing is performed on each image in the first image set and the second image set of the target image to obtain an image mask corresponding to the target object in each image, wherein the mask area of ​​each image can be determined by the coordinates of the image mask.

[0052] In step S502, a feature image pair is determined based on the image mask and the feature points of the image.

[0053] In step S503, based on the feature image pairs, an arrangement order for sorting the images in the image set is determined.

[0054] In the disclosed embodiment, feature point matching is performed on each first image in the first image set and each second image in the second image set to obtain feature point matching pairs in each image. Feature point matching pairs in the mask area of ​​each image can be determined based on the mask area of ​​each image. Feature image pairs are determined based on the image mask and the feature points of the image. The feature image pair is a pair of images, including a first image and a second image. It can be understood that the position change of the target object relative to the background is small between each first image in the first image set. The position change of the target object relative to the background is small between each second image in the second image set. After determining the feature image pair, the arrangement order of sorting the images in the first image set and the second image set is determined based on the feature image pair. In the sorted image set, the sorted first image set and the sorted second image set are connected end to end to form an orderly arranged image set. And the feature image pair is composed of the first image and the second image with the largest number of feature point matching pairs in the mask area of ​​the target object. After the above sorting, the overlap between adjacent images in the sorted image combination is large.

[0055] In summary, according to the three-dimensional reconstruction method provided by the embodiment of the present disclosure, by masking the target object in each image in the image set, the background in the image can be shielded, and a feature image pair consisting of a first image and a second image can be determined. Based on the feature image pair, the arrangement order for sorting the images in the image set is determined, so as to sort the images in the first image set and the second image set, and perform feature point matching on the sorted images, which can reduce the failure of feature point matching caused by obvious position changes between the target object and the background.

[0056] Figure 7 is a flow chart of a method for determining a feature image pair based on an image mask and feature points of an image according to the present disclosure, with reference to Figure 7 , the method comprises the following steps.

[0057] In step S701, feature point matching is performed between images in the first image set and images in the second image set to obtain feature point matching pairs.

[0058] In step S702, the number of matching pairs of feature points located in the mask area in each image of the image set is determined, and a third image is determined in the first image set, and a fourth image is determined in the second image set, the third image is an image corresponding to the maximum number of matching pairs of feature points in the first image set, and the fourth image is an image corresponding to the maximum number of matching pairs of feature points in the second image set.

[0059] In step S703, the third image and the fourth image are determined as a feature image pair.

[0060] In the disclosed embodiment, feature point matching is performed between each first image in the first image set and each second image in the second image set, respectively, to obtain feature point matching pairs of each image in the image set. Based on the mask area of ​​each image, the number of feature point matching pairs located in the mask area of ​​each image is determined. Then, the third image with the largest number of feature point matching pairs located in the mask area of ​​the image is determined in the first image set, and the fourth image with the largest number of feature point matching pairs located in the mask area of ​​the image is determined in the second image set, and the third image and the fourth image are determined as a feature image pair.

[0061] Figure 8 FIG. 4 shows a schematic diagram of an image with the largest number of feature point matching pairs according to an exemplary embodiment of the present disclosure. Figure 8 As shown, the images included in the first image set are: 1-1, 1-2, 1-3, 1-4, 1-5, 1-6 and 1-7. The images included in the second image set are: 2-1, 1-2, 2-3, 2-4, 2-5, 2-6 and 2-7. Assuming that 1-5 and 2-3 are the image pairs with the largest number of feature matching pairs in the mask area, 1-5 is the third image and 2-3 is the fourth image.

[0062] In summary, according to the three-dimensional reconstruction method provided by the embodiment of the present disclosure, a feature image pair consisting of a first image and a second image is determined by a mask corresponding to the target object in each image in the image set, and the images in the image set are sorted based on the feature image pairs. By matching feature points of the sorted images, the failure of feature point matching caused by obvious position changes between the target object and the background can be reduced.

[0063] Fig. 9 is a flow chart of a method for determining the arrangement order of images in an image set based on feature image pairs according to the present disclosure, referring to Fig. 9 , the method comprises the following steps.

[0064] In step S901, a first arrangement position of an image in a feature image pair in a first image set and a second arrangement position in a second image set are determined respectively.

[0065] In step S902 , the first image set is sorted based on the first arrangement position, and the second image set is sorted based on the second arrangement position.

[0066] In step S903, based on the positional relationship of the images in the feature image pair, an arrangement order of the first image set and the second image set is determined, and the arrangement order is used to arrange the images in the first image set and the images in the second image set.

[0067] In the disclosed embodiment, after determining a feature image pair including a first image and a second image, the images in the image set are sorted based on the determined feature image pair. When sorting, the images in the first image set and the second image set are sorted respectively, and the sorted first image set and the second image set are connected so that in the connected image set, the two images in the feature image pair are adjacent to each other.

[0068] For the convenience of description, the first image is denoted as I 1_i , the second image is recorded as I 2_i , the first image set and the second image set each include n images. Match each first image in the first image set with each second image. Determine the image pair with the largest number of feature matching pairs in the mask area in the first image set and the second image set. For example, the third image I 1_j and the fourth image I 2_k , will I 1_j with I 2_k Determined as a feature image pair. And I 1_j with I 2_k The order of arrangement can be I 1_j In the front position of the feature image pair, it can also be I 2_k In front of the feature image pair. Determine I 1_j The position in the first image set and determine I 2_k When determining the positions of the first image and the second image in the feature image pair in the first image set and the second image set, respectively, the first image set and the second image set are sorted so that I 1_j is located at the first or last position in the sorted first image set, and makes I 2_k In the first or last position.

[0069] If the position relationship of the image in the feature image is I 1_j ,I 2_k In order to achieve that after the first image set and the second image set are sorted, the first image and the second image constituting the feature image pair remain adjacent. In an example of the present disclosure, the first image set is sorted first, the second image set is connected to the first image set, and I 1_j is determined as the ending image in the first image set. 1_j+1 As the starting image in the first image set, I 2_k is determined as the starting image in the second image set, I 2_k-1 Determined as the ending image in the second image set. In the above example, the order of images in the sorted image set can be expressed as: 1_j+1 ,I1_j+2 ,……I 1_j-1 ,I 1_j ,I 2_k ,I 2_k+1 ,……I 2_k-1。

[0070] If the position relationship of the image in the feature image is I 2_k ,I 1_j In order to keep the first image and the second image adjacent after sorting, I 1_j As the starting image in the first image set, I 1_j-1 as the ending image in the first image set, and I 2_k+1 is determined as the starting image in the second image set, I 2_k The second image set is first sorted so that the second image set is connected to the first image set. In the above example, the order of images in the sorted image set can be expressed as: 2_k+1 ,I 2_k+2 ,……I 2_k-1 ,I 2_k ,I 2_k+1 ,I 1_j ,I 1_j+1 …I 1_j-1 .

[0071] In summary, according to the three-dimensional reconstruction method provided by the embodiment of the present disclosure, by sorting the image set composed of the first image set and the second image set, and based on the feature image pairs, the first image set and the image set are connected, thereby achieving a high degree of overlap between adjacent images after sorting. By matching feature points of the sorted images, the failure of feature point matching caused by obvious position changes between the target object and the background can be reduced, thereby improving the reconstruction efficiency and reconstruction effect of the three-dimensional reconstruction of the target object.

[0072] Fig.10 is a flow chart of a method for matching feature points of sorted images according to the feature points of the images to obtain feature point matching pairs, referring to Fig.10 , the method comprises the following steps.

[0073] In step S1001, a fifth image set is determined from the sorted images, where the fifth image set includes a characteristic image pair and a preset number of images adjacent to the characteristic image pair.

[0074] In step S1002, based on the feature points of each image in the fifth image set, feature point matching pairs of each image in the fifth image set located in the mask area are determined.

[0075] In step S1003 , the feature point matching pairs are determined as the feature point matching pairs of each image in the fifth image set.

[0076] In the disclosed embodiment, the image set of the target object includes a first image set and a second image set, which are respectively obtained by photographing the target object at different positions relative to the shooting platform. Based on the feature image pairs, the first image set and the second image set are sorted respectively, and the order of the sets between the first image set and the second image set is determined, and the sorted first image set and the second image set are sequentially connected. The feature image pairs connected to the first image set and the second image set, as well as the first image and the second image adjacent to the feature image pairs, have obvious changes in the positions of the target object and the background in the images. The feature image pairs and the preset number of images adjacent to the feature image pairs in the sorted images are determined as the fifth image set. For the images in the fifth image set, the image mask of the target object is used to remove the influence of the relative background position change between adjacent images. That is, based on the feature points of each image in the fifth image set, the feature point matching pairs of each image in the fifth image set located in the mask area are determined. For the other images in the image set other than the fifth image set, matching is performed in sequence according to the order of image arrangement to obtain feature point matching pairs. Based on the feature point matching pairs, the target object is reconstructed in three dimensions.

[0077] Fig.11a , Fig.11b as well as Fig.11c The figure shows the comparison of the corresponding 3D reconstruction effects when no markers are added, when markers are added and the 3D reconstruction is performed using the traditional technology, and when markers are added and the 3D reconstruction method provided by the embodiment of the present disclosure is used. The two placement methods of the target object in a nearly vertical state are used as an example for explanation. Among them, the effect after 3D reconstruction should ideally also be in a nearly vertical state. Fig.11a , Fig.11b as well as Fig.11c As shown in the figure, the triangular pyramid represents the camera, and the black points are the sparsely reconstructed point cloud of the target object. The shooting pose of each image can be seen from the triangular pyramid. Fig.11a As shown in the figure, in a scene without markers, since the surface features of the object to be reconstructed are relatively few, only a few camera poses can be calculated, so sparse reconstruction may fail. Fig.11b As shown in the figure, adding markers but using traditional techniques for 3D reconstruction (such as sequential matching or brute force matching) can calculate the poses of all cameras, but the spatial position of the target object is wrong. Fig.11cAs shown, adding markers and adopting the 3D reconstruction method provided by the embodiment of the present disclosure can obtain the correct position and posture of all cameras. That is, through the 3D reconstruction method provided by the embodiment of the present disclosure, sparse reconstruction can calculate the spatial position and posture (position and posture) of the camera when taking each image.

[0078] According to the embodiments of the present disclosure, by sorting the image collection, only feature point matching is performed on the mask area of ​​the sorted feature image pairs and their adjacent images, thereby removing the impact of the position change of the image relative to the background and reducing the failure of feature point matching caused by the obvious position change of the target object and the background. In addition, in the feature image pairs and their adjacent images, the surface texture of the target object is rich, thereby improving the robustness of the feature matching method and improving the reconstruction effect of the three-dimensional reconstruction of the target object.

[0079] Based on the same concept, the embodiment of the present disclosure also provides a three-dimensional reconstruction device.

[0080] It is understandable that the device provided by the embodiment of the present disclosure includes hardware structures and / or software modules corresponding to the execution of each function in order to realize the above functions. In combination with the units and algorithm steps of each example disclosed in the embodiment of the present disclosure, the embodiment of the present disclosure can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the technical solution of the embodiment of the present disclosure.

[0081] Fig.12 is a block diagram of a 3D reconstruction apparatus according to the present disclosure.

[0082] like Fig.12 As shown, the three-dimensional reconstruction device 1200 of the embodiment of the present disclosure includes: an acquisition module 1201, an extraction module 1202, a determination module 1203 and a reconstruction module 1204.

[0083] The acquisition module 1201 is used to acquire an image set including a target object.

[0084] The extraction module 1202 is used to extract feature points of images in the image set.

[0085] The determination module 1203 is used to determine the order of sorting images in the image set, sort the images based on the order, and perform feature point matching on the sorted images according to feature points of the images to obtain feature point matching pairs.

[0086] The reconstruction module 1204 is used to perform three-dimensional reconstruction of the target object based on the feature point matching pairs.

[0087] In an exemplary embodiment of the present disclosure, an image set includes a first image set and a second image set, the first image set includes a plurality of first images, the first image is acquired at a preset acquisition position when the target object is in a first placement posture relative to the shooting platform, and the plurality of first images in the first image set are arranged in sequence according to a preset acquisition order; the second image set includes a plurality of second images, the second image is acquired at a preset acquisition position when the target object is in a second placement posture relative to the shooting platform, and the plurality of second images in the second image set are arranged in sequence according to a preset acquisition order; the first image and the second image include the same random marker, and the random marker is fixedly set relative to the shooting platform.

[0088] In an exemplary embodiment of the present disclosure, the determination module 1203 is also used to: perform mask processing on each image in the image set to obtain a mask corresponding to the target object in each image; determine a feature image pair based on the mask and feature points of the image; and determine an arrangement order for sorting the images in the image set based on the feature image pairs.

[0089] In an exemplary embodiment of the present disclosure, the determination module 1203 is also used to: perform feature point matching between the first image set and the images in the second image set, to obtain feature point matching pairs; determine the number of feature point matching pairs located in the mask area in each image of the image set, and determine a third image in the first image set and a fourth image in the second image set, the third image being an image corresponding to the maximum number of feature point matching pairs in the first image set, and the fourth image being an image corresponding to the maximum number of feature point matching pairs in the second image set; and determine the third image and the fourth image as a feature image pair.

[0090] In an exemplary embodiment of the present disclosure, the determination module 1203 is also used to: determine the first arrangement position and the second arrangement position of the images in the feature image pair in the first image set and the second image set, respectively; sort the first image set based on the first arrangement position, and sort the second image set based on the second arrangement position; determine the arrangement order of the first image set and the second image set based on the positional relationship of the images in the feature image pair, and the arrangement order is used to arrange the images in the first image set and the images in the second image set.

[0091] In an exemplary embodiment of the present disclosure, the determination module 1203 is also used to: determine a fifth image set in the sorted images, the fifth image set including feature image pairs and a preset number of images adjacent to the feature image pairs; determine feature point matching pairs of each image in the fifth image set located in the mask area based on feature points of each image in the fifth image set; and determine the feature point matching pairs as feature point matching pairs of each image in the fifth image set.

[0092] In summary, according to the three-dimensional reconstruction device provided by the embodiment of the present disclosure, by sorting the images in the image set and matching the feature points of the sorted images, it is possible to reduce the matching failure caused by the obvious position change between the target object and the background, improve the accuracy of SFM pose calculation, optimize the three-dimensional reconstruction process of the target object, and improve the three-dimensional reconstruction effect.

[0093] In the technical solution disclosed herein, the acquisition, storage and application of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0094] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0095] Fig.13 A schematic block diagram of an example electronic device 1300 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0096] like Fig.13 As shown, the device 1300 includes a computing unit 1301, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1302 or a computer program loaded from a storage unit 1308 into a random access memory (RAM) 1303. In the RAM 1303, various programs and data required for the operation of the device 1300 can also be stored. The computing unit 1301, the ROM 1302, and the RAM 1303 are connected to each other via a bus 1304. An input / output (I / O) interface 1305 is also connected to the bus 1304.

[0097] A number of components in the device 1300 are connected to the I / O interface 1305, including: an input unit 1306, such as a keyboard, a mouse, etc.; an output unit 1307, such as various types of displays, speakers, etc.; a storage unit 1308, such as a disk, an optical disk, etc.; and a communication unit 1309, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 1309 allows the device 1300 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0098] The computing unit 1301 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 1301 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 1301 performs the various methods and processes described above, such as a method for three-dimensional reconstruction. For example, in some embodiments, the method for three-dimensional reconstruction may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 1308. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 1300 via the ROM 1302 and / or the communication unit 1309. When the computer program is loaded into the RAM 1303 and executed by the computing unit 1301, one or more steps of the method for three-dimensional reconstruction described above may be performed. Alternatively, in other embodiments, the computing unit 1301 may be configured to perform a method for three-dimensional reconstruction in any other appropriate manner (e.g., by means of firmware).

[0099] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0100] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0101] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0102] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0103] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0104] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0105] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0106] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A three-dimensional reconstruction method, comprising: Acquire a set of images including a target object; Extracting feature points of images in the image set; determining an order in which to sort images in the image set, and sorting the images based on the order; According to the feature points of the images, feature point matching is performed on the sorted images to obtain feature point matching pairs; Based on the feature point matching pairs, three-dimensionally reconstruct the target object; Wherein, determining the order in which images in the image set are sorted includes: Performing mask processing on each image in the image set to obtain an image mask corresponding to the target object in each image; Determining a feature image pair based on the image mask and feature points of the image; Based on the feature image pairs, determining an arrangement order for sorting images in the image set; The image set includes a first image set and a second image set, and determining the arrangement order of sorting images in the image set based on the feature image pairs includes: respectively determining a first arrangement position of the images in the feature image pair in the first image set and a second arrangement position in the second image set; sorting the first image set based on the first arrangement position, and sorting the second image set based on the second arrangement position; Based on the positional relationship of the images in the feature image pair, an arrangement order of the first image set and the second image set is determined, and the arrangement order is used to arrange the images in the first image set and the images in the second image set.

2. The method according to claim 1, wherein: The first image set includes a plurality of first images, wherein the first images are acquired at a preset acquisition position when the target object is in a first placement posture relative to the shooting platform, and the plurality of first images in the first image set are arranged in sequence according to a preset acquisition order; The second image set includes a plurality of second images, the second images are acquired at the preset acquisition position when the target object is in a second placement posture relative to the shooting platform, and the plurality of second images in the second image set are arranged in sequence according to a preset acquisition order; The first image and the second image include the same random marker, and the random marker is fixedly arranged relative to the shooting platform.

3. The method according to claim 2, wherein: The determining of a feature image pair based on the image mask and the feature points of the image comprises: Perform feature point matching between images in the first image set and images in the second image set, to obtain feature point matching pairs; Determine the number of matching pairs of feature points located in the mask area in each image of the image set, and determine a third image in the first image set and a fourth image in the second image set, wherein the third image is an image corresponding to the maximum number of matching pairs of feature points in the first image set, and the fourth image is an image corresponding to the maximum number of matching pairs of feature points in the second image set; The third image and the fourth image are determined as the feature image pair.

4. The method according to any one of claims 1 to 3, wherein: The step of performing feature point matching on the sorted images according to the feature points of the images to obtain feature point matching pairs includes: Determining a fifth image set from the sorted images, the fifth image set including the feature image pair and a preset number of images adjacent to the feature image pair; Determining, based on feature points of each image in the fifth image set, feature point matching pairs of each image in the fifth image set that are located in the mask area; The feature point matching pairs are determined as feature point matching pairs of each image in the fifth image set.

5. A three-dimensional reconstruction device, comprising: An acquisition module, used for acquiring an image set including a target object; An extraction module, used for extracting feature points of images in the image set; A determination module, used to determine the order in which images in the image set are sorted, sort the images based on the order, and perform feature point matching on the sorted images according to feature points of the images to obtain feature point matching pairs; A reconstruction module, used for performing three-dimensional reconstruction of the target object based on the feature point matching pairs; Wherein, the determining module is also used for: Performing mask processing on each image in the image set to obtain an image mask corresponding to the target object in each image; Determining a feature image pair based on the image mask and feature points of the image; Based on the feature image pairs, determining an arrangement order for sorting images in the image set; The image set includes a first image set and a second image set, and the determination module is further used for: respectively determining a first arrangement position of the images in the feature image pair in the first image set and a second arrangement position in the second image set; sorting the first image set based on the first arrangement position, and sorting the second image set based on the second arrangement position; Based on the positional relationship of the images in the feature image pair, an arrangement order of the first image set and the second image set is determined, and the arrangement order is used to arrange the images in the first image set and the images in the second image set.

6. The device according to claim 5, wherein: The first image set includes a plurality of first images, wherein the first images are acquired at a preset acquisition position when the target object is in a first placement posture relative to the shooting platform, and the plurality of first images in the first image set are arranged in sequence according to a preset acquisition order; The second image set includes a plurality of second images, the second images are acquired at the preset acquisition position when the target object is in a second placement posture relative to the shooting platform, and the plurality of second images in the second image set are arranged in sequence according to a preset acquisition order; The first image and the second image include the same random marker, and the random marker is fixedly arranged relative to the shooting platform.

7. The device according to claim 5, wherein: The determining module is also used for: Perform feature point matching between images in the first image set and images in the second image set, to obtain feature point matching pairs; Determine the number of matching pairs of feature points located in the mask area in each image of the image set, and determine a third image in the first image set and a fourth image in the second image set, wherein the third image is an image corresponding to the maximum number of matching pairs of feature points in the first image set, and the fourth image is an image corresponding to the maximum number of matching pairs of feature points in the second image set; The third image and the fourth image are determined as the feature image pair.

8. The device according to any one of claims 5 to 7, wherein: The determining module is also used for: Determining a fifth image set from the sorted images, the fifth image set including the feature image pair and a preset number of images adjacent to the feature image pair; Determining, based on feature points of each image in the fifth image set, feature point matching pairs of each image in the fifth image set that are located in the mask area; The feature point matching pairs are determined as feature point matching pairs of each image in the fifth image set.

9. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform the three-dimensional reconstruction method according to any one of claims 1 to 4.

10. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to enable the computer to execute the three-dimensional reconstruction method according to any one of claims 1-4.

11. A computer program product, comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 4.