Three-dimensional model reconstruction method and device, storage medium and electronic equipment

By using image foreground extraction and feature matching technology in 3D model reconstruction, the 3D model generation process is simplified, the problems of complexity and high failure rate of existing technologies are solved, and 3D model reconstruction usable by ordinary users is achieved.

CN118840475APending Publication Date: 2024-10-25TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202310470288.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-04-24
Publication Date
2024-10-25

AI Technical Summary

Technical Problem

In the existing technology, the three-dimensional model reconstruction method is complex and the reconstruction failure rate is high. It is difficult for ordinary users to reconstruct the three-dimensional model and requires professional technicians and equipment.

Method used

By acquiring multiple collected images, performing foreground extraction and feature matching operations, filtering out the characteristic information of the target object itself, and determining the camera parameters to generate a three-dimensional model, it simplifies the user's image collection requirements and calculation amount.

Benefits of technology

It realizes a simplified 3D model reconstruction method and reduces the reconstruction failure rate. Ordinary users can obtain a complete 3D digital model through automatic acquisition technology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118840475A_ABST
    Figure CN118840475A_ABST
Patent Text Reader

Abstract

The invention discloses a three-dimensional model reconstruction method and device, a storage medium and electronic equipment. The method comprises the following steps: acquiring a plurality of acquisition images, executing foreground extraction operation on the plurality of acquisition images to obtain a plurality of foreground images, executing feature matching operation on the plurality of foreground images to obtain a group of matching results, one group of matching results comprises an image feature set of which the similarity meets a preset similarity condition in the first image feature set and the second image feature set, and the first image feature set and the second image feature set filter other feature information except the feature information of the target object; and determining camera parameters corresponding to the plurality of foreground images based on the group of matching results, and generating a target three-dimensional model corresponding to the target object according to the camera parameters. The technical problems of complex three-dimensional model reconstruction mode and high reconstruction failure rate in the prior art are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computers, and more specifically, to a three-dimensional model reconstruction method and device, a storage medium, and an electronic device. Background Art

[0002] At present, in order to obtain a three-dimensional digital model of an object of interest, professional technicians (such as technical artists) are required to adopt the following method: build a studio with a pure white background, install a large number of lighting lamps to ensure that no shadows appear when shooting the target object, use a professional SLR camera, and take an image at a certain angle. During the shooting process, the target object needs to be turned over many times to ensure that all areas of the object are completely captured, use professional software to extract the image foreground, and import all images into professional 3D reconstruction software for 3D reconstruction to obtain a complete 3D model of the object.

[0003] The above-mentioned three-dimensional model reconstruction process requires professional technicians to adjust the shooting angle and use professional software for image processing. If professional image processing is not performed, the feature information based on which the three-dimensional model reconstruction process is based will include other feature information in addition to the object itself (for example, feature information related to the background area). In order to obtain a complete three-dimensional digital model of the object, it is necessary to build a professional image acquisition site that meets the requirements of the existing technology, which is almost impossible for ordinary users to achieve. The existing technology also requires users to understand the image processing process and master professional image processing software to obtain the foreground image of the photographed object. In addition, the existing technology has relatively strict restrictions on the relative position between the collected image and the target object, and the relative translation and rotation relationship between the collected images. If the collected image does not meet the above requirements, it is easy to cause the problem of failure in three-dimensional model reconstruction.

[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0005] The embodiments of the present application provide a three-dimensional model reconstruction method and device, a storage medium and an electronic device to at least solve the technical problems in the related art that the three-dimensional model reconstruction method is complex and the reconstruction failure rate is high.

[0006] According to one aspect of an embodiment of the present application, a three-dimensional model reconstruction method is provided, comprising: acquiring a plurality of acquired images, wherein the plurality of acquired images include images acquired by acquiring images of a target object to be reconstructed at different angles; performing a foreground extraction operation on the plurality of acquired images to obtain a plurality of foreground images, wherein the plurality of foreground images correspond one-to-one to the plurality of acquired images; performing a feature matching operation on the plurality of foreground images to obtain a set of matching results, wherein the set of matching results includes a target matching result associated with a first foreground image and a second foreground image, the target matching result includes an image feature set whose similarity satisfies a preset similarity condition in a first image feature set and a second image feature set, the first image feature set is used to represent feature information of the target object in the first foreground image, the second image feature set is used to represent feature information of the target object in the second foreground image, and the first image feature set and the second image feature set both filter out feature information other than the feature information of the target object itself; determining camera parameters corresponding to the plurality of foreground images based on the set of matching results, and generating a target three-dimensional model corresponding to the target object according to the camera parameters.

[0007] According to another aspect of an embodiment of the present application, a three-dimensional model reconstruction method device is also provided, including: an acquisition module, used to acquire multiple acquired images, wherein the multiple acquired images include images acquired by acquiring images of a target object to be reconstructed at different angles; an extraction module, used to perform a foreground extraction operation on the multiple acquired images to obtain multiple foreground images, wherein the multiple foreground images correspond to the multiple acquired images one by one; a matching module, used to perform a feature matching operation on the multiple foreground images to obtain a group of matching results, wherein the group of matching results includes a target matching result associated with a first foreground image and a second foreground image, and the target matching result includes an image feature set whose similarity meets a preset similarity condition in a first image feature set and a second image feature set, the first image feature set is used to represent feature information of the target object in the first foreground image, the second image feature set is used to represent feature information of the target object in the second foreground image, and the first image feature set and the second image feature set both filter out feature information other than the feature information of the target object itself; a generation module, used to determine camera parameters corresponding to the multiple foreground images based on the group of matching results, and generate a target three-dimensional model corresponding to the target object according to the camera parameters.

[0008] Optionally, the device is used to perform feature matching operations on the multiple foreground images in the following manner to obtain a set of matching results: perform feature matching operations on the multiple foreground images in sequence in the following manner to obtain a set of matching results, wherein each input foreground image is regarded as the first foreground image and the second foreground image, and each output matching result is regarded as the target matching result: perform feature extraction operations on the first foreground image and the second foreground image respectively to obtain the first image feature set and the second image feature set; perform feature filtering operations on the first image feature set and the second image feature set respectively to obtain a first filtered feature set and a second filtered feature set, wherein the feature filtering operation is used to filter out feature information of adjacent areas, and the adjacent areas are determined by the boundary between the foreground area and the background area determined by the foreground extraction operation; perform feature matching on the first filtered feature set and the second filtered feature set using a preset feature matching algorithm to obtain the target matching result.

[0009] Optionally, the device is used to perform feature extraction operations on the first foreground image and the second foreground image respectively to obtain the first image feature set and the second image feature set in the following manner: perform a feature extraction operation on the first foreground image to obtain the first image feature set, wherein the first image features include image features of each pixel in the first foreground image and a first feature descriptor set of each pixel; perform a feature extraction operation on the second foreground image to obtain the second image feature set, wherein the second image features include image features of each pixel in the second foreground image and a second feature descriptor set of each pixel, and the first feature descriptor set and the second feature descriptor set are used together to perform the feature matching.

[0010] Optionally, the device is used to perform a feature filtering operation on the first image feature set in the following manner to obtain a first filtered feature set: obtain a target boundary between a target foreground area and a target background area in the first foreground image and position information of each pixel in the first image feature set; determine a pixel whose distance between the position information and the target boundary is less than a preset distance threshold as a target pixel belonging to the adjacent area, and determine the adjacent area based on the target pixel; remove feature descriptors whose corresponding pixel position information in the first feature descriptor set is located in the adjacent area to obtain the first filtered feature set.

[0011] Optionally, the device is used to determine a pixel point whose distance between the position information and the target boundary is less than a preset distance threshold as a target pixel point belonging to the adjacent area, and determine the adjacent area based on the target pixel point in the following manner: obtain a boundary pixel point in the first foreground image whose color value is 0 and whose adjacent pixel point has a color value of 1, wherein the boundary pixel point is used to represent the target boundary; extend the preset distance threshold along the boundary pixel point in the direction of the target foreground area to determine the adjacent area, wherein the boundary of the adjacent area includes the target boundary and an extended boundary determined after extending the preset distance threshold, and the target pixel point is located between the target boundary and the extended boundary.

[0012] Optionally, the device is used to perform feature matching on the first filtering feature set and the second filtering feature set using a preset feature matching algorithm in the following manner to obtain the target matching result: obtain a first feature descriptor in the first filtering feature set; calculate a set of similarity evaluation parameters between the first feature descriptor and each feature descriptor in the second filtering feature set using the preset feature matching algorithm; determine a feature descriptor associated with a target similarity evaluation parameter as a second feature descriptor, wherein the target similarity evaluation parameter is a similarity evaluation parameter with the largest value in the similarity evaluation parameter set; and when the target similarity evaluation parameter satisfies a preset value condition, add the first feature descriptor and the second feature descriptor as a matching pair to the target matching result.

[0013] Optionally, the device is used to perform a foreground extraction operation on the multiple acquired images in the following manner to obtain multiple foreground images: perform a foreground extraction operation on the multiple acquired images in sequence in the following manner to obtain multiple foreground images, wherein each input acquired image is regarded as a target acquired image, and each output foreground image is regarded as a target foreground image; perform a saliency detection operation on the target acquired image to obtain a set of saliency parameters, wherein a saliency parameter corresponds to a pixel on the target acquired image, and the saliency parameter is used to indicate the saliency of the corresponding pixel on the target acquired image; perform a binarization operation on the target acquired image according to the set of saliency parameters to generate an initial mask image, wherein the color values ​​of the foreground area and the background area in the initial mask image are different, and the foreground area and the background area are determined by the values ​​of the saliency parameters; perform a connected domain detection on the initial mask image to determine the target mask image; generate the target foreground image according to the target acquired image and the target mask image, wherein the color value of the target object in the target foreground image is determined by the target acquired image.

[0014] Optionally, the device is also used for: performing a downsampling operation on the target acquisition image to obtain the target acquisition image with reduced image resolution before performing a saliency detection operation on the target acquisition image to obtain a set of saliency parameters, wherein the degree of reduction in the image resolution is related to the original size of the target acquisition image and the maximum resolution allowed by the saliency detection operation; after performing a binarization operation on the target acquisition image according to the set of saliency parameters to generate an initial mask image, performing an upsampling operation on the initial mask image to obtain the initial mask image with the image resolution restored, wherein the upsampling operation is an inverse operation of the downsampling operation, and the image resolution of the initial mask image before the upsampling operation is performed is the same as the image resolution of the target acquisition image after the downsampling operation is performed.

[0015] Optionally, the device is used to perform a saliency detection operation on the target acquired image to obtain a set of saliency parameters in the following manner: mapping the target acquired image with reduced image resolution to a preset sample space to perform a normalization operation to obtain an initial acquired image, wherein the color value of each pixel of the initial acquired image is within a preset value range; inputting the initial acquired image into a saliency detection network to determine the saliency parameters of each pixel in the initial acquired image to generate the set of saliency parameters.

[0016] Optionally, the device is used to perform a binarization operation on the target acquisition image according to the set of saliency parameters in the following manner to generate an initial mask image: pixels whose saliency parameter values ​​are less than or equal to a saliency parameter threshold are determined as a first pixel set belonging to the background area; pixels whose saliency parameter values ​​are greater than the saliency parameter threshold are determined as a second pixel set belonging to the foreground area; and the initial mask image is generated based on the first pixel set and the second pixel set.

[0017] Optionally, the device is used to perform connected domain detection on the initial mask image to determine the target mask image in the following manner: perform connected domain detection on the initial mask image to determine a group of connected domains; calculate the area of ​​each connected domain in the group of connected domains, and determine the connected domain with the largest area as the target mask image; the device is used to generate the target foreground image according to the target acquisition image and the target mask image in the following manner: obtain the color value of each pixel in the target mask image; modify the pixels with a color value of 0 to the target color value, and fill the pixels with a color value not equal to 0 with the color value of the corresponding pixel of the target acquisition image to generate the target foreground image.

[0018] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned three-dimensional model reconstruction method when it is run.

[0019] According to another aspect of the embodiment of the present application, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the above three-dimensional model reconstruction method.

[0020] According to another aspect of an embodiment of the present application, there is also provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the three-dimensional model reconstruction method through the computer program.

[0021] In an embodiment of the present application, a plurality of acquired images are acquired, wherein the plurality of acquired images include images acquired by acquiring images of a target object to be reconstructed at different angles, a foreground extraction operation is performed on the plurality of acquired images to obtain a plurality of foreground images, wherein the plurality of foreground images correspond one-to-one to the plurality of acquired images, a feature matching operation is performed on the plurality of foreground images to obtain a set of matching results, wherein a set of matching results includes a target matching result associated with a first foreground image and a second foreground image, the target matching result includes an image feature set whose similarity satisfies a preset similarity condition in a first image feature set and a second image feature set, the first image feature set is used to represent feature information of a target object in the first foreground image, the second image feature set is used to represent feature information of a target object in the second foreground image, and both the first image feature set and the second image feature set filter out features other than the target object Other feature information in addition to its own feature information, based on a set of matching results to determine the camera parameters corresponding to multiple foreground images, and generate the target three-dimensional model corresponding to the target object according to the camera parameters. Through the foreground image automatic acquisition technology, the user only needs to provide the collected image of the target object without any manual processing to obtain the three-dimensional digital model of the target object. By first extracting the image features, and then filtering out a large number of highly interfering image background and image edge features, and then judging whether the internal features of the image match, it can not only achieve the purpose of reducing the user's image acquisition requirements and reducing the amount of calculation, but also further improve the modeling quality and obtain a more complete three-dimensional digital model, thereby achieving the technical effect of simplifying the reconstruction method of the three-dimensional model and reducing the reconstruction failure rate, thereby solving the technical problems of complex three-dimensional model reconstruction method and high reconstruction failure rate in related technologies. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0023] Figure 1 is a schematic diagram of an application environment of an optional three-dimensional model reconstruction method according to an embodiment of the present application;

[0024] Figure 2 is a schematic flow chart of an optional three-dimensional model reconstruction method according to an embodiment of the present application;

[0025] Figure 3 is a schematic diagram of an optional three-dimensional model reconstruction method according to an embodiment of the present application;

[0026] Figure 4 is a schematic diagram of another optional three-dimensional model reconstruction method according to an embodiment of the present application;

[0027] Figure 5 is a schematic diagram of another optional three-dimensional model reconstruction method according to an embodiment of the present application;

[0028] Figure 6 is a schematic diagram of another optional three-dimensional model reconstruction method according to an embodiment of the present application;

[0029] Figure 7 is a schematic diagram of another optional three-dimensional model reconstruction method according to an embodiment of the present application;

[0030] Figure 8 is a schematic diagram of another optional three-dimensional model reconstruction method according to an embodiment of the present application;

[0031] Fig. 9 is a schematic diagram of another optional three-dimensional model reconstruction method according to an embodiment of the present application;

[0032] Fig.10 is a schematic diagram of another optional three-dimensional model reconstruction method according to an embodiment of the present application;

[0033] Fig.11 is a structural schematic diagram of an optional three-dimensional model reconstruction method and device according to an embodiment of the present application;

[0034] Fig.12 is a structural schematic diagram of an optional three-dimensional model reconstruction method product according to an embodiment of the present application;

[0035] Fig.13 It is a schematic diagram of the structure of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0036] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0037] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0038] First, some nouns or terms that appear in the description of the embodiments of the present application are subject to the following interpretation:

[0039] Complex background: Images captured by digital devices such as mobile phones or cameras contain other background objects in addition to the target object to be reconstructed.

[0040] 3D reconstruction: Calculate the 3D digital model of the object contained in the image from multiple input images.

[0041] Fully automatic 3D reconstruction: Except for the input image which is taken manually, the other steps do not require human intervention.

[0042] The present application is described below in conjunction with embodiments:

[0043] According to one aspect of an embodiment of the present application, a three-dimensional model reconstruction method is provided. Optionally, in this embodiment, the three-dimensional model reconstruction method can be applied to Figure 1 In the hardware environment composed of the server 101 and the terminal device 103 shown in FIG. Figure 1As shown, the server 101 is connected to the terminal 103 via a network, and can be used to provide services for the terminal device or the application installed on the terminal device. The application can be a video application, an instant messaging application, a browser application, an educational application, a game application, etc. A database 105 may be set up on the server or independently of the server to provide data storage services for the server 101, for example, a game data storage server. The above-mentioned network may include, but is not limited to, a wired network and a wireless network, wherein the wired network includes, for example, a local area network, a metropolitan area network, and a wide area network; the wireless network includes, for example, Bluetooth, WIFI, and other networks that implement wireless communication; the terminal device 103 may be a terminal configured with an application program, and may include, but is not limited to, at least one of the following: a mobile phone (such as an Android phone, an iOS phone, etc.), a laptop computer, a tablet computer, a PDA, a MID (Mobile Internet Devices), a PAD, a desktop computer, a smart TV, an intelligent voice interaction device, a smart home appliance, a vehicle-mounted terminal, an aircraft, a virtual reality (VR) terminal, an augmented reality (AR) terminal, a mixed reality (MR) terminal, and other computer devices; the above-mentioned server may be a single server, a server cluster consisting of multiple servers, or a cloud server.

[0044] Combination Figure 1 As shown, the above three-dimensional model reconstruction method can be implemented in the terminal device 103 through the following steps:

[0045] S1, acquiring a plurality of acquired images on the terminal device 103, wherein the plurality of acquired images include images acquired by acquiring images of a target object to be reconstructed at different angles;

[0046] S2, performing a foreground extraction operation on the multiple collected images on the terminal device 103 to obtain multiple foreground images, wherein the multiple foreground images correspond one to one to the multiple collected images;

[0047] S3, performing a feature matching operation on the plurality of foreground images on the terminal device 103 to obtain a set of matching results, wherein the set of matching results includes a target matching result associated with the first foreground image and the second foreground image, the target matching result includes an image feature set whose similarity satisfies a preset similarity condition in the first image feature set and the second image feature set, the first image feature set is used to represent feature information of a target object in the first foreground image, the second image feature set is used to represent feature information of a target object in the second foreground image, and both the first image feature set and the second image feature set filter out feature information other than the feature information of the target object itself;

[0048] S4, determining camera parameters corresponding to the plurality of foreground images on the terminal device 103 based on a set of matching results, and generating a target three-dimensional model corresponding to the target object according to the camera parameters.

[0049] Optionally, in this embodiment, the above three-dimensional model reconstruction method can also be implemented by a server, for example, Figure 1 It is implemented in the server 101 shown; or it is implemented by the terminal device and the server together.

[0050] The above is only an example and is not specifically limited in this embodiment.

[0051] Optionally, as an optional implementation, as Figure 2 As shown, the above three-dimensional model reconstruction method includes:

[0052] S202, acquiring a plurality of acquired images, wherein the plurality of acquired images include images acquired by acquiring images of a target object to be reconstructed at different angles;

[0053] Optionally, in this embodiment, the above three-dimensional model reconstruction method can be applied to, including but not limited to, any application including a complete three-dimensional model, including but not limited to the following possible application scenarios:

[0054] (1) In UGC (User Generated Content) games that contain 3D (3D) models, both professional creators and ordinary players can use the method proposed in this application to obtain the complete 3D model of the object they are interested in, and import it into the game as a model asset for display or other operations;

[0055] (2) In augmented reality applications that include 3D models, the method proposed in this application can be used to obtain a complete three-dimensional model of a specific target object, place it in an augmented reality rendering engine, and then display it to the user, providing a 360-degree browsing function;

[0056] (3) Digitization of historical relics: the method proposed in this application can extract the complete three-dimensional model of the relics, thereby better protecting the relics and providing a virtual digital relics display to visitors, which can provide better 3D interpretation instead of traditional audio or video interpretation;

[0057] (4) 3D printing: after obtaining a complete three-dimensional digital model of an object of interest using the method proposed in this application, it can be 3D printed for rapid production;

[0058] (5) In online stores, sellers can use the method proposed in this application to reconstruct a complete three-dimensional digital model of their products, allowing buyers to browse the products from any angle, thereby improving the shopping experience of players.

[0059] Optionally, in this embodiment, the above-mentioned multiple acquired images may include but are not limited to images obtained by acquiring images of the target object to be reconstructed at different angles, that is, the user may use an image acquisition device to acquire images of the target object at different angles to obtain the above-mentioned multiple acquired images.

[0060] It should be noted that the above-mentioned different angles may include but are not limited to a combination of two or more angles such as the front view, the side view, the back view, the bottom view, and the top view.

[0061] For example, Figure 3 is a schematic diagram of an optional three-dimensional model reconstruction method according to an embodiment of the present application, such as Figure 3 As shown, the images are obtained by capturing the target object from angles 1 to 5, wherein angle 1 is the front, angle 2 is the back, angle 3 is the left side, angle 4 is the right side, and angle 5 is a top view.

[0062] Optionally, in this embodiment, the target object may include but is not limited to an object existing in a real scene, and the object is an object that the user expects to reconstruct into a three-dimensional model.

[0063] S204, performing a foreground extraction operation on the multiple collected images to obtain multiple foreground images, wherein the multiple foreground images correspond one to one to the multiple collected images;

[0064] Optionally, in this embodiment, the foreground extraction operation may include but is not limited to a pre-set fully automatic foreground extraction operation. If the user inputs multiple acquired images, multiple foreground images may be directly extracted based on the multiple acquired images and used in the subsequent three-dimensional model reconstruction process.

[0065] For example, Figure 4 is a schematic diagram of another optional three-dimensional model reconstruction method according to an embodiment of the present application, such as Figure 4 As shown, the exemplary process may include but is not limited to the following:

[0066] S1, input a captured image and perform a downsampling operation on the captured image;

[0067] S2, performing a normalization operation on the image obtained after the downsampling operation, and then performing saliency detection on the obtained image;

[0068] S3, perform binarization processing based on the saliency detection results to obtain the initial mask image;

[0069] S4, performing upsampling (upsampling, which is the inverse operation of the downsampling) on ​​the initial mask image to obtain an enlarged initial mask image;

[0070] S5, performing an optimization operation on the enlarged initial mask image to obtain an optimized mask image;

[0071] S6, generating a final foreground image based on the input captured image and the optimized mask image.

[0072] It should be noted that the purpose of the above downsampling operation is that the resolution of the input captured image is generally too large, which will affect the subsequent foreground segmentation results and increase the consumption of computing resources. Therefore, it is necessary to perform a downsampling operation on the input image to reduce the image resolution.

[0073] S206, performing a feature matching operation on the multiple foreground images to obtain a group of matching results, wherein the group of matching results includes a target matching result associated with the first foreground image and the second foreground image, the target matching result includes an image feature set whose similarity satisfies a preset similarity condition in the first image feature set and the second image feature set, the first image feature set is used to represent feature information of a target object in the first foreground image, the second image feature set is used to represent feature information of a target object in the second foreground image, and both the first image feature set and the second image feature set filter out feature information other than feature information of the target object itself;

[0074] Optionally, in this embodiment, the above-mentioned set of matching results includes matching results generated by matching two of the multiple foreground images, that is, when the multiple foreground images are two foreground images, the matching result is one, when the multiple foreground images are three foreground images, the matching result is three, when the multiple foreground images are four foreground images, the matching result is twelve, and so on.

[0075] It should be noted that, taking the above feature matching operation performed on the first foreground image and the second foreground image as an example, the obtained matching result is the above target matching result. The target matching result is the matching result generated by feature matching the first image feature set obtained by feature filtering the image features extracted from the first foreground image and the second image feature set obtained by feature filtering the image features extracted from the second foreground image.

[0076] In an exemplary embodiment, the first image feature set includes a feature descriptor set consisting of feature descriptors associated with each feature point in the first foreground image.

[0077] For example, the first foreground image is I A For example, extract IA The image features and feature descriptors of each image feature are I A The feature descriptor set is denoted as A = {A1, A2, ..., A M}, feature descriptor A in the set i is a 256-dimensional floating point vector. Each feature descriptor is associated with a unique image feature position coordinate. The position coordinates associated with the feature descriptors in set A are marked as P = {P1, P2, ..., P M}, the feature position coordinates are two-dimensional floating-point vectors, representing the precise coordinates of the corresponding image features in the foreground image.

[0078] Optionally, in this embodiment, the first image feature set and the second image feature set both filter out other feature information except the feature information of the target object itself, which can be understood as assuming that A The background area is The adjacent area between the background and the foreground is First, extract the segmentation contours of the background and foreground areas in is a two-dimensional floating point vector; for image I A Any pixel p in x , p y ), if p and C A The distance Dist(p, C A ) is less than 5 pixels, that is:

[0079]

[0080]

[0081] Then the pixel p is considered to belong to According to this, we can get I A of Next, for I A The feature descriptor A in i , if its associated feature position Then A i Remove from A.

[0082] It should be noted that by extracting the segmentation contour and then making a judgment based on the segmentation contour and the position information of the pixel point, the above-mentioned adjacent area can be determined, and then, it is judged whether the pixel point is located in the background area and the adjacent area. If it is located in the background area and the adjacent area, the part of the feature is removed; if it is not located in the background area and the adjacent area, the part of the feature is considered to be the feature corresponding to the target object, so as to realize the filtering of feature information.

[0083] In an exemplary embodiment, by detecting all feature descriptors in A and removing the feature descriptors that meet the conditions, a feature descriptor containing only I can be obtained. A Feature descriptor set A of foreground features * Similarly, we can get B corresponding to the second foreground image * .

[0084] For example, for A * and B * , use the SuperGlue algorithm to match image features and then output A * and B * The feature matching result Z = {Z1, Z2, ..., Z K}, indicating A * and B * There are K pairs of feature descriptors that can be matched, among which, are index values, which represent the feature descriptors that can be matched in A * and B * The number in .

[0085] It should be noted that the above similarity satisfies the preset similarity condition and can be understood as the above A * and B * The similarity between the feature descriptors in satisfies the preset similarity condition.

[0086] In an exemplary embodiment, it may include but is not limited to calculating a set of similarity evaluation parameters between a first feature descriptor and each feature descriptor in a second filtered feature set using a preset feature matching algorithm; determining a feature descriptor associated with a target similarity evaluation parameter as a second feature descriptor, wherein the target similarity evaluation parameter is a similarity evaluation parameter with the largest value in the similarity evaluation parameter set; and when the target similarity evaluation parameter satisfies a preset value condition, determining that the similarity satisfies a preset similarity condition, and adding the first feature descriptor and the second feature descriptor as a matching pair to the target matching result.

[0087] S208, determining camera parameters corresponding to the plurality of foreground images based on a set of matching results, and generating a target three-dimensional model corresponding to the target object according to the camera parameters.

[0088] Optionally, in this embodiment, the above-mentioned determination of camera parameters corresponding to multiple foreground images based on a set of matching results, and generation of a target three-dimensional model corresponding to the target object according to the camera parameters can be implemented based on the MVS (Multiple View Stereo) method. MVS can extract clues of geometric figures from photos: texture, defocus, shadow, contour and stereo matching. Multi-view stereo matching is a general term for a group of technologies that use stereo matching as the main clue and use more than two images. The goal of MVS three-dimensional reconstruction: given a set of photos of objects or scenes, under the assumption of known materials, viewpoints and lighting conditions, estimate the 3D shape that is most likely to explain these photos. The main steps of MVS: Different practical applications may have different methods, but their overall steps are the same, including but not limited to:

[0089] S1, calculate the camera parameters of each foreground image, wherein the camera parameter calculation process includes: selecting views adjacent to the reference foreground image from multiple foreground images for stereo vision matching. The adjacent view should contain similar content to the reference view, so the feature points contained in the two should overlap, but the overlap ratio cannot be too high. Because if the overlap ratio is very high, the baseline between the views may not be long enough, the parallax is very small, and the shooting posture is very close, which will affect the reconstruction effect; then perform local view selection. When processing a specific pixel, the algorithm selects again from a batch of adjacent views selected in the previous step based on other estimated pixel depths, the orientation of the pixel corresponding to the scene surface, the parallax between the adjacent view and the reference view, and other features to obtain a small batch of views that are actually used to calculate the pixel depth, and then estimates the pixel depth (corresponding to the aforementioned camera parameters) from this small batch of views based on the matching priority;

[0090] S2, reconstructs the 3D geometric parameters of the scene from each foreground image and the corresponding camera parameters.

[0091] In an exemplary embodiment, multiple images are taken around a target object to be reconstructed under a relatively complex background. During the shooting process, the target object and the background environment will be relatively displaced and rotated. The following steps can be used to calculate a complete three-dimensional digital model of the target object from the multiple images taken.

[0092] For example, Figure 5 is a schematic diagram of another optional three-dimensional model reconstruction method according to an embodiment of the present application, such as Figure 5 As shown, the exemplary process may include but is not limited to the following:

[0093] S1, extracting the foreground of the captured image to obtain a foreground image containing only the target object;

[0094] S2, extract foreground image features using the SuperPoint method;

[0095] S3, filtering the image features to obtain a feature set that truly represents the target object;

[0096] S4, then use the SuperGlue method to calculate the feature matching results between all foreground images;

[0097] S5, using the camera estimation method to calculate the foreground image camera pose;

[0098] S6, performing global optimization on the foreground image camera pose, the optimization method may adopt existing related technologies, which will not be described in detail here;

[0099] S7, using a multi-view stereo matching algorithm to obtain a three-dimensional model of the target object.

[0100] Through this embodiment, a plurality of acquired images are acquired, wherein the plurality of acquired images include images acquired by acquiring images of a target object to be reconstructed through different angles, a foreground extraction operation is performed on the plurality of acquired images to obtain a plurality of foreground images, wherein the plurality of foreground images correspond one-to-one to the plurality of acquired images, a feature matching operation is performed on the plurality of foreground images to obtain a group of matching results, wherein a group of matching results includes a target matching result associated with a first foreground image and a second foreground image, the target matching result includes a first image feature set and an image feature set in which the similarity of the first image feature set and the second image feature set meets a preset similarity condition, the first image feature set is used to represent the feature information of the target object in the first foreground image, the second image feature set is used to represent the feature information of the target object in the second foreground image, and both the first image feature set and the second image feature set filter out the feature information of the target object except the target object itself. Other feature information in addition to the feature information of the foreground image itself is determined based on a set of matching results to determine the camera parameters corresponding to multiple foreground images, and the target 3D model corresponding to the target object is generated according to the camera parameters. Through the foreground image automatic acquisition technology, the user only needs to provide the collected image of the target object without any manual processing to obtain the 3D digital model of the target object. By first extracting the features of the image, and then filtering out a large number of highly interfering image background and image edge features, and then judging whether the internal features of the image match, it can not only achieve the purpose of reducing the user's image acquisition requirements and reducing the amount of calculation, but also further improve the modeling quality and obtain a more complete 3D digital model, thereby achieving the technical effect of simplifying the reconstruction method of the 3D model and reducing the reconstruction failure rate, thereby solving the technical problems of complex 3D model reconstruction method and high reconstruction failure rate in related technologies.

[0101] As an optional scheme, a feature matching operation is performed on multiple foreground images to obtain a set of matching results, including: performing a feature matching operation on multiple foreground images in sequence in the following manner to obtain a set of matching results, wherein each input foreground image is regarded as a first foreground image and a second foreground image, and each output matching result is regarded as a target matching result: performing a feature extraction operation on the first foreground image and the second foreground image respectively to obtain a first image feature set and a second image feature set; performing a feature filtering operation on the first image feature set and the second image feature set respectively to obtain a first filtered feature set and a second filtered feature set, wherein the feature filtering operation is used to filter out feature information of adjacent areas, and the adjacent areas are determined by the boundary between the foreground area and the background area determined by the foreground extraction operation; and performing feature matching on the first filtered feature set and the second filtered feature set using a preset feature matching algorithm to obtain a target matching result.

[0102] Optionally, in this embodiment, the first foreground image and the second foreground image are two foreground images for which matching results need to be determined.

[0103] For example, Figure 6 is a schematic diagram of another optional three-dimensional model reconstruction method according to an embodiment of the present application, such as Figure 6 As shown, taking the first foreground image as image A and the second foreground image as image B as an example, the exemplary process may include but is not limited to the following:

[0104] S1, extract foreground image features from the captured images A and B using the SuperPoint method;

[0105] S2, filtering the feature descriptors extracted from image A and image B respectively to obtain feature set A and feature set B that truly represent the target object;

[0106] S3, using the SuperGlue method to calculate the feature matching results of feature set A and feature set B.

[0107] As an optional scheme, feature extraction operations are performed on the first foreground image and the second foreground image respectively to obtain a first image feature set and a second image feature set, including: performing a feature extraction operation on the first foreground image to obtain a first image feature set, wherein the first image feature includes the image feature of each pixel in the first foreground image and a first feature descriptor set of each pixel; performing a feature extraction operation on the second foreground image to obtain a second image feature set, wherein the second image feature includes the image feature of each pixel in the second foreground image and a second feature descriptor set of each pixel, and the first feature descriptor set and the second feature descriptor set are used together for feature matching.

[0108] Optionally, in this embodiment, the first foreground image is taken as I A , the second foreground image is I B For example, it may include but is not limited to extracting A with I B The SuperPoint image features and feature descriptors of each image feature are A The feature descriptor set is denoted as A = {A1, A2, ..., A M}, I B The feature descriptor set is denoted as B = {B1, B2, ..., B N}, feature descriptor A in the feature descriptor set i With B j are all 256-dimensional floating point vectors; each feature descriptor is associated with a unique image feature position coordinate, and the position coordinates associated with the feature descriptors in sets A and B are recorded as P = {P1, P2, ..., P M} and Q={Q1,Q2,…,Q N}, the feature position coordinates are two-dimensional floating-point vectors, representing the precise coordinates of the corresponding image features in the foreground image.

[0109] As an optional solution, a feature filtering operation is performed on the first image feature set to obtain a first filtered feature set, including:

[0110] Acquire the target boundary between the target foreground area and the target background area in the first foreground image and the position information of each pixel point in the first image feature set;

[0111] Determine a pixel whose position information has a distance from a target boundary less than a preset distance threshold as a target pixel belonging to an adjacent region, and determine an adjacent region based on the target pixel;

[0112] The feature descriptors whose corresponding pixel position information is located in the adjacent area in the first feature descriptor set are removed to obtain a first filtered feature set.

[0113] Optionally, in this embodiment, the target foreground area and the target background area can be directly obtained by the foreground extraction operation described above, the target boundary is used to segment the target foreground area and the target background area, and the preset distance threshold can be flexibly set according to actual needs. The adjacent area can include but is not limited to an area within a preset distance threshold around the target boundary.

[0114] Exemplarily, the first foreground image is I A , the second foreground image is I B For example, suppose I A with I B The background area is The adjacent areas of the background and foreground objects are First, extract the segmentation contours of the background and foreground areas in is a two-dimensional floating point vector; for image I A Any pixel p in x , p y ), if p and C A The distance Dist(p, C A ) is less than 5 pixels, that is:

[0115]

[0116]

[0117] Then the pixel p is considered to belong to According to this, we can get I A with I B of Next, for Test I A The feature descriptor A in i , if its associated feature position Then A i Remove from A; test all feature descriptors in A, remove the feature descriptors that meet the above conditions, and you can get only I A Feature descriptor set A of foreground features * Similarly, only I B The feature descriptor set B containing foreground features * .

[0118] As an optional scheme, a pixel point whose distance between position information and the target boundary is less than a preset distance threshold is determined as a target pixel point belonging to an adjacent area, and the adjacent area is determined based on the target pixel point, including: obtaining a boundary pixel point whose color value is 0 in a first foreground image and whose color value is 1 in an adjacent pixel point, wherein the boundary pixel point is used to represent the target boundary; extending the preset distance threshold along the boundary pixel point in the direction of the target foreground area to determine the adjacent area, wherein the boundary of the adjacent area includes the target boundary and an extended boundary determined after extending the preset distance threshold, and the target pixel point is located between the target boundary and the extended boundary.

[0119] Optionally, in this embodiment, the above-mentioned boundary pixel points can be understood as the first foreground image having only two color values ​​of 0 and 1 after the above-mentioned processing, 0 represents the background area, and 1 represents the foreground area. The boundary pixel points whose color value in the first foreground image is 0 and whose adjacent pixel points have a color value of 1 are the above-mentioned boundary pixel points.

[0120] It should be noted that the above-mentioned extending the preset distance threshold along the boundary pixel point in the direction of the target foreground area to determine the adjacent area can be understood as a process of extending the pixel point with a color value of 0 that is closest to the pixel point with a color value of 1 toward the foreground area.

[0121] For example, Figure 7 is a schematic diagram of another optional three-dimensional model reconstruction method according to an embodiment of the present application, such as Figure 7 As shown, the pixel with color value 0 represents the background area, and the pixel with color value 1 represents the foreground area. Figure 8 is a schematic diagram of another optional three-dimensional model reconstruction method according to an embodiment of the present application, such as Figure 8 As shown, a preset distance threshold may be extended from each pixel point toward the direction where the target foreground area is located to determine an adjacent area.

[0122] As an optional solution, a preset feature matching algorithm is used to perform feature matching on the first filtering feature set and the second filtering feature set to obtain a target matching result, including:

[0123] Obtaining a first feature descriptor in a first filtering feature set;

[0124] Calculating a set of similarity evaluation parameters between the first feature descriptor and each feature descriptor in the second filtering feature set using a preset feature matching algorithm;

[0125] Determining a feature descriptor associated with a target similarity evaluation parameter as a second feature descriptor, wherein the target similarity evaluation parameter is a similarity evaluation parameter with the largest value in the similarity evaluation parameter set;

[0126] When the target similarity evaluation parameter meets the preset value condition, the first feature descriptor and the second feature descriptor are added to the target matching result as a matching pair.

[0127] Optionally, in this embodiment, the preset feature matching algorithm may include but is not limited to using feature matching strategies such as nearest neighbor matching (NN), LoFTR, and OANet.

[0128] In an exemplary embodiment, the SuperGlu algorithm can be used to perform image feature matching, thereby outputting A * and B * The feature matching result Z = {Z1, Z2, ..., Z K}, indicating A * and B * There are K pairs of feature descriptors that can be matched, among which are index values, which represent the feature descriptors that can be matched in A *and B * The number in .

[0129] Among them, A * and B * The feature matching process can be done by first starting with A * Select feature descriptor A1, and then select feature descriptor A2 from B. * Select B1, B2, …, B N The similarity (corresponding to the aforementioned similarity evaluation parameter) is calculated with A1 respectively. When the similarity between B2 and A1 is the highest, B2 is the aforementioned second feature descriptor. At this time, the similarity between B2 and A1 is the aforementioned target similarity evaluation parameter. The similarity between B2 and A1 is then compared with a preset value condition (for example, a preset similarity threshold). When the similarity between B2 and A1 is greater than the preset similarity threshold, it is considered that B2 matches A1 and a similarity score is generated.

[0130] As an optional solution, a foreground extraction operation is performed on the multiple acquired images to obtain multiple foreground images, including:

[0131] A foreground extraction operation is performed on multiple acquisition images in sequence in the following manner to obtain multiple foreground images, wherein each input acquisition image is regarded as a target acquisition image, and each output foreground image is regarded as a target foreground image:

[0132] Performing a saliency detection operation on the target acquisition image to obtain a set of saliency parameters, wherein one saliency parameter corresponds to one pixel on the target acquisition image, and the saliency parameter is used to indicate the saliency of the corresponding pixel on the target acquisition image;

[0133] Performing a binarization operation on the target acquisition image according to a set of saliency parameters to generate an initial mask image, wherein the color values ​​of the foreground area and the background area in the initial mask image are different, and the foreground area and the background area are determined by the value of the saliency parameter;

[0134] Perform connected domain detection on the initial mask image to determine the target mask image;

[0135] A target foreground image is generated according to the target acquisition image and the target mask image, wherein the color value of the target object in the target foreground image is determined by the target acquisition image.

[0136] Optionally, in this embodiment, after a plurality of collected images are input, a foreground extraction operation is performed on each collected image in turn, specifically including but not limited to the following steps:

[0137] S1, downsampling, as an optional solution, before performing a saliency detection operation on the target acquisition image to obtain a set of saliency parameters, the above method also includes: performing a downsampling operation on the target acquisition image to obtain a target acquisition image with reduced image resolution, wherein the degree of reduction in image resolution is related to the original size of the target acquisition image and the maximum resolution allowed by the saliency detection operation. Since the resolution of the input acquisition image is generally large, it will not only affect the subsequent foreground segmentation results, but also increase the consumption of computing resources.

[0138] For example, it is necessary to perform a downsampling operation on the input image to reduce the image resolution. Assuming that the width and height of the input image are W and H respectively, and the maximum resolution of the image for saliency detection is M, the width and height of the image obtained after downsampling are s·W and s·H respectively, where s=min(1.0, M / max(W, H)}.

[0139] S2, normalization, as an optional solution, performs a saliency detection operation on the target acquisition image to obtain a set of saliency parameters, including: mapping the target acquisition image with reduced image resolution to a preset sample space to perform a normalization operation to obtain an initial acquisition image, wherein the color value of each pixel of the initial acquisition image is within a preset value range.

[0140] For example, the downsampled image matrix I is normalized by a normalization technique. d Mapped to a specific sample space. For any pixel p∈I d After normalization, the R, G, and B channel values ​​of the color are all in the range of [-1, 1], and the resulting image is recorded as I n .

[0141] S3, saliency detection, as an optional solution, performs a saliency detection operation on the target acquisition image to obtain a set of saliency parameters, including: mapping the target acquisition image with reduced image resolution to a preset sample space to perform a normalization operation to obtain an initial acquisition image, wherein the color value of each pixel of the initial acquisition image is within a preset value range; inputting the initial acquisition image into a saliency detection network, determining the saliency parameters of each pixel in the initial acquisition image, and generating a set of saliency parameters.

[0142] For example, the normalized image I n As input, it is sent to the saliency detection network to obtain I n The saliency value associated with any pixel p in (corresponding to the aforementioned saliency parameter) p sod ∈(0,1).

[0143] S4, binarization, as an optional solution, performs a binarization operation on the target captured image according to a set of saliency parameters to generate an initial mask image, including: determining pixels whose saliency parameter values ​​are less than or equal to the saliency parameter threshold as a first pixel set belonging to the background area; determining pixels whose saliency parameter values ​​are greater than the saliency parameter threshold as a second pixel set belonging to the foreground area; and generating the initial mask image according to the first pixel set and the second pixel set.

[0144] For example, the mask image obtained by the binarization operation is denoted as I m For I n For any pixel p in sod ≤0.15 (significance parameter threshold), the pixel is considered to belong to the background (corresponding to the first pixel set mentioned above), I m The corresponding pixel value is 0; if p sod >0.15, the pixel is considered to be on the surface of the target object (corresponding to the second pixel set mentioned above) and belongs to the foreground. m The corresponding pixel value is 1.

[0145] S5, upsampling, as an optional solution, after performing a binarization operation on the target acquisition image according to a set of saliency parameters to generate an initial mask image, the above method also includes: performing an upsampling operation on the initial mask image to obtain an initial mask image with restored image resolution, wherein the upsampling operation is an inverse operation of the downsampling operation, and the image resolution of the initial mask image before the upsampling operation is performed is the same as the image resolution of the target acquisition image after the downsampling operation is performed.

[0146] Exemplarily, upsampling is the inverse operation of step S1, aiming to obtain an initialization mask of the original image resolution (corresponding to the aforementioned initial mask image), denoted as I u , the image width and height are W and H respectively.

[0147] S6, mask optimization, as an optional solution, performs connected domain detection on the initial mask image to determine the target mask image, including: performing connected domain detection on the initial mask image to determine a group of connected domains; calculating the area of ​​each connected domain in a group of connected domains, and determining the connected domain with the largest area as the target mask image.

[0148] Exemplarily, using the region generation algorithm, detection I u All connected domains in are denoted as {C1, C2, …, C N}, N is the number of connected domains detected; calculate the area of ​​each connected domain, which is recorded as {A1, A2, ..., A NThe connected domain with the largest area is retained as the foreground area, and the remaining connected domains are regarded as the background, that is, the color values ​​of all pixels in the remaining connected domains are set to 0.

[0149] S7, foreground image extraction, as an optional solution, generates a target foreground image based on the target acquisition image and the target mask image, including: obtaining the color value of each pixel in the target mask image; modifying the pixels with a color value of 0 to the target color value, and filling the pixels with a color value not equal to 0 with the color value of the corresponding pixel of the target acquisition image to generate a target foreground image.

[0150] Exemplarily, the optimized foreground mask (corresponding to the aforementioned target mask image) is The output foreground image is I f , combined with the input image, we can get the foreground image. For any pixel in , if the color value is 0, then I f The corresponding pixel color value is [255, 255, 255]; if the color value is not 0, the color value corresponding to the input image is taken as I f The color value of the corresponding pixel.

[0151] The following is a further explanation of this application with reference to specific examples:

[0152] In a complex background, multiple images are taken around the target object to be reconstructed. During the shooting process, the target object and the background environment will be relatively displaced and rotated. How to calculate the complete 3D digital model of the target object from the multiple images taken is an open problem. Currently, there is no mature fully automatic modeling solution in the industry.

[0153] To address this problem, the present application proposes a fully automatic three-dimensional modeling method for a complete object. First, the foreground of the captured image is extracted to obtain a foreground image that only contains the target object. Then, the foreground image features are extracted using the SuperPoint method, and the image features are filtered to obtain a feature set that truly represents the target object. The SuperGlue method is then used to calculate the feature matching results between all foreground images. Finally, the camera estimation method is used to calculate the foreground image camera pose, and a multi-view stereo matching algorithm is used to obtain a three-dimensional digital model of the target.

[0154] This application proposes a fully automatic foreground image acquisition method based on saliency detection algorithm and image processing technology. Through the proposed foreground image automatic acquisition technology, the user only needs to provide the collected image of the target object without any manual processing to obtain the three-dimensional digital model of the target object.

[0155] This application proposes a method for determining whether a foreground image matches based on the SuperPoint feature operator, feature filtering, and SuperGlue feature matching algorithm. The method first extracts the SuperPoint features of the foreground image, then filters out a large number of background and edge features of the foreground image that are highly interfering, and then determines whether the internal features of the foreground image match based on the SuperGlue algorithm. This method can not only reduce the user's image acquisition requirements and reduce the amount of calculation, but also further improve the modeling quality and obtain a more complete three-dimensional digital model.

[0156] The fully automatic foreground image extraction algorithm is mainly used to estimate the foreground image corresponding to the input acquired image in order to remove the interference of the environmental background on subsequent modeling.

[0157] The input is a single color image, which includes the target object to be modeled and the background of the user's interest; the output is a foreground image, which only contains the target object to be modeled, and the background area will be set to pure white, that is, the color value of the background area is a three-dimensional vector [255, 255, 255].

[0158] The specific process of the algorithm is as follows:

[0159] S1, downsampling: The resolution of the input image is generally too large, which will not only affect the subsequent foreground segmentation results, but also increase the consumption of computing resources. To this end, it is necessary to downsample the input image to reduce the image resolution. Assuming that the width and height of the input image are W and H respectively, and the maximum resolution of the image for saliency detection is M, the width and height of the image obtained after downsampling are s·W and s·H respectively, where s=min(1.0, M / max(W, H)).

[0160] S2, Normalization: Through the normalization technology, the downsampled image matrix I d Mapped to a specific sample space. For any pixel p∈I d After normalization, the R, G, and B channel values ​​of the color are all in the interval [-1, 1], and the resulting image is recorded as I n .

[0161] S3, saliency detection: normalize the image I n As input, it is sent to the saliency detection network to obtain I n The saliency value p associated with any pixel p in sod ∈(0,1).

[0162] S4, Binarization: The mask image obtained by the binarization operation is denoted as I m For I n For any pixel p in sod≤0.15, the pixel is considered to belong to the background, I m The corresponding pixel value is 0; if p sod >0.15, the pixel is considered to be on the surface of the target object and belongs to the foreground. m The corresponding pixel value is 1.

[0163] S5, upsampling: Upsampling is the inverse operation of step 1, aiming to obtain the initialization mask of the original image resolution, denoted as I u , the image width and height are W and H respectively.

[0164] S6, mask optimization: using the region generation algorithm to detect I u All connected domains in are denoted as {C1, C2, …, C N}, N is the number of connected domains detected; calculate the area of ​​each connected domain, which is recorded as {A1, A2, ..., A N The connected domain with the largest area is retained as the foreground area, and the remaining connected domains are regarded as the background, that is, the color values ​​of all pixels in the remaining connected domains are set to 0.

[0165] S7, foreground image extraction: the optimized foreground mask is The output foreground image is I f , combined with the input image, we can get the foreground image. For any pixel in , if the color value is 0, then I f The corresponding pixel color value is [255, 255, 255]; if the color value is not 0, the color value corresponding to the input image is taken as I f The color value of the corresponding pixel.

[0166] The image matching method based on object features is different from the previous image matching method that relies on the features of the entire image. This method eliminates the influence of the image background area and relies on the feature information of the foreground object itself for image matching. It can better reflect the matching relationship of foreground objects between different perspectives and facilitate the subsequent calculation of the foreground image corresponding to the camera information.

[0167] The input of this method is two foreground images. Assume that the input image is I A and I B (Different angles). First, extract the foreground image features; then filter out the features of the background area and the adjacent areas of the background and foreground, and only retain the feature information of the foreground object itself; then perform image feature matching based on the filtered feature information. The specific process of the method is as follows:

[0168] S1, Feature Extraction: Extraction I A with I B The SuperPoint image features and feature descriptors of each image feature areA The feature descriptor set is denoted as A = {A1, A2, ..., A M}, I B The feature descriptor set is denoted as B = {B1, B2, ..., B N}, feature descriptor A in the set i With B j are all 256-dimensional floating point vectors; each feature descriptor is associated with a unique image feature position coordinate, and the position coordinates associated with the feature descriptors in sets A and B are recorded as P = {P1, P2, ..., P M} and Q={Q1,Q2,…,Q N}, the feature position coordinates are two-dimensional floating-point vectors, representing the precise coordinates of the corresponding image features in the foreground image.

[0169] S2, Feature Filtering: Assumption I A with I B The background area is The adjacent areas of the background and foreground objects are First, extract the segmentation contours of the background and foreground areas in is a two-dimensional floating point vector; for image I A Any pixel p in x , p y ), if p and C A The distance Dist(p, C A ) is less than 5 pixels, that is

[0170]

[0171]

[0172] Then the pixel p is considered to belong to According to this, we can get I A with I B of Next, for Test I A The feature descriptor A in i , if its associated feature position Then A i Remove from A; test all feature descriptors in A, remove the feature descriptors that meet the conditions, and you can get only I A Feature descriptor set A of foreground features * Similarly, only I B The feature descriptor set B containing foreground features * .

[0173] S3, feature matching: for A *and B * , use SuperGlue (all calculated similarities of A1 and B, find the largest and compare with the threshold, then match, at most one) algorithm to match image features, and then output A * and B * The feature matching result Z = {Z1, Z2, ..., Z K}, indicating A * and B * There are K pairs of feature descriptors that can be matched, among which are index values, which represent the feature descriptors that can be matched in A * and B * The number in .

[0174] This application can be applied to various system architectures. Taking Windows as an example, the technical solution can be applied to a fully automatic complete small object modeling system. Fig. 9 is a schematic diagram of another optional 3D model reconstruction method according to an embodiment of the present application, and the overall architecture of the system is as follows: Fig. 9 As shown:

[0175] When the user inputs the captured original image containing the target object into this system, the system will first extract the foreground image of the input image based on the foreground image extraction algorithm; then, the extracted foreground images are matched pairwise using the image matching method based on object features to output the corresponding matching results; then, the camera parameters corresponding to the foreground image are calculated based on the matching results, and the calculated camera parameters are globally optimized; finally, the Multi-View Stereo (MVS) method is used to calculate the three-dimensional digital model of the target object and the result is returned to the user.

[0176] The present application can fully automatically reconstruct the three-dimensional reconstruction of the target object that the user is interested in: for images collected by the user at different angles, the present application can automatically extract the foreground image where the target object is located, eliminating the erroneous influence of the background area on the object reconstruction; when testing whether the images match at different viewing angles, the present application only uses the characteristics of the object itself for matching tests, further eliminating the erroneous guidance of the adjacent areas of the background and foreground on the modeling, and finally realizing the fully automatic three-dimensional reconstruction of the target object.

[0177] Fig.10 is a schematic diagram of another optional three-dimensional model reconstruction method according to an embodiment of the present application, such as Fig.10As shown, the modeling effect comparison between this application and other modeling software is shown. The input images are 149 images with a resolution of 672x672. For the front of the model, it can be clearly observed that other modeling software and this application can well restore the geometry and texture information of the front area of ​​the 3D model; but for the bottom area of ​​the model, other modeling software cannot reconstruct it, while this application can still reconstruct the bottom area of ​​the 3D model well.

[0178] This application is based on the saliency detection algorithm and the graph analysis algorithm, and aims to extract the foreground area of ​​the input image. The module as a whole can be replaced by similar foreground recognition methods, such as Deep Image Matting and BackgroundMatting. This method can also be replaced by an image segmentation algorithm, that is, first segment the input image, then extract the segmented area where the target object is located, and regard the area as the foreground area. The feature filtering process of this application aims to extract the image features of the target object itself. The filtering strategy is mainly set based on the Euclidean distance between the feature coordinates and the background foreground segmentation contour. The Euclidean distance here can be replaced by other similarity judgment strategies, such as Mahalanobis distance, cosine distance, Manhattan distance, etc. The feature extraction and feature matching modules can also be replaced by other modules. For example, the feature extraction module can be replaced by feature algorithms such as ORB, SIFT, SURF, ContextDesc, D2Net, etc.; feature matching can be replaced by feature matching strategies such as nearest neighbor matching (NN), LoFTR, OANet, etc.

[0179] It is understandable that in the specific implementation of this application, related data such as user information is involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0180] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0181] According to another aspect of the embodiment of the present application, a 3D model reconstruction method apparatus for implementing the above 3D model reconstruction method is also provided. Fig.11 As shown, the device comprises:

[0182] An acquisition module 1102 is used to acquire a plurality of acquired images, wherein the plurality of acquired images include images acquired by acquiring images of a target object to be reconstructed at different angles;

[0183] An extraction module 1104, configured to perform a foreground extraction operation on the plurality of collected images to obtain a plurality of foreground images, wherein the plurality of foreground images correspond one-to-one to the plurality of collected images;

[0184] A matching module 1106 is configured to perform a feature matching operation on the multiple foreground images to obtain a set of matching results, wherein the set of matching results includes a target matching result associated with the first foreground image and the second foreground image, and the target matching result includes an image feature set whose similarity satisfies a preset similarity condition in the first image feature set and the second image feature set, the first image feature set is used to represent feature information of the target object in the first foreground image, the second image feature set is used to represent feature information of the target object in the second foreground image, and both the first image feature set and the second image feature set filter out feature information other than feature information of the target object itself;

[0185] The generating module 1108 is configured to determine the camera parameters corresponding to the plurality of foreground images based on the set of matching results, and to generate a target three-dimensional model corresponding to the target object according to the camera parameters.

[0186] As an optional scheme, the device is used to perform feature matching operations on the multiple foreground images in the following manner to obtain a set of matching results: perform feature matching operations on the multiple foreground images in sequence in the following manner to obtain a set of matching results, wherein each input foreground image is regarded as the first foreground image and the second foreground image, and each output matching result is regarded as the target matching result: perform feature extraction operations on the first foreground image and the second foreground image respectively to obtain the first image feature set and the second image feature set; perform feature filtering operations on the first image feature set and the second image feature set respectively to obtain a first filtered feature set and a second filtered feature set, wherein the feature filtering operation is used to filter out feature information of adjacent areas, and the adjacent areas are determined by the boundary between the foreground area and the background area determined by the foreground extraction operation; perform feature matching on the first filtered feature set and the second filtered feature set using a preset feature matching algorithm to obtain the target matching result.

[0187] As an optional solution, the device is used to perform feature extraction operations on the first foreground image and the second foreground image respectively to obtain the first image feature set and the second image feature set in the following manner: perform a feature extraction operation on the first foreground image to obtain the first image feature set, wherein the first image feature includes image features of each pixel in the first foreground image and a first feature descriptor set of each pixel; perform a feature extraction operation on the second foreground image to obtain the second image feature set, wherein the second image feature includes image features of each pixel in the second foreground image and a second feature descriptor set of each pixel, and the first feature descriptor set and the second feature descriptor set are used together to perform the feature matching.

[0188] As an optional scheme, the device is used to perform a feature filtering operation on the first image feature set in the following manner to obtain a first filtered feature set: obtain a target boundary between a target foreground area and a target background area in the first foreground image and position information of each pixel in the first image feature set; determine a pixel whose distance between the position information and the target boundary is less than a preset distance threshold as a target pixel belonging to the adjacent area, and determine the adjacent area based on the target pixel; remove feature descriptors whose corresponding pixel position information in the first feature descriptor set is located in the adjacent area to obtain the first filtered feature set.

[0189] As an optional scheme, the device is used to determine the pixel point whose distance between the position information and the target boundary is less than a preset distance threshold as the target pixel point belonging to the adjacent area, and determine the adjacent area based on the target pixel point in the following manner: obtain the boundary pixel point whose color value is 0 and the color value of the adjacent pixel point is 1 in the first foreground image, wherein the boundary pixel point is used to represent the target boundary; extend the preset distance threshold along the boundary pixel point in the direction of the target foreground area to determine the adjacent area, wherein the boundary of the adjacent area includes the target boundary and an extended boundary determined after extending the preset distance threshold, and the target pixel point is located between the target boundary and the extended boundary.

[0190] As an optional scheme, the device is used to perform feature matching on the first filtering feature set and the second filtering feature set using a preset feature matching algorithm in the following manner to obtain the target matching result: obtain the first feature descriptor in the first filtering feature set; use the preset feature matching algorithm to calculate a set of similarity evaluation parameters between the first feature descriptor and each feature descriptor in the second filtering feature set; determine the feature descriptor associated with the target similarity evaluation parameter as the second feature descriptor, wherein the target similarity evaluation parameter is the similarity evaluation parameter with the largest value in the similarity evaluation parameter set; when the target similarity evaluation parameter meets the preset value condition, add the first feature descriptor and the second feature descriptor as a matching pair to the target matching result.

[0191] As an optional solution, the device is used to perform a foreground extraction operation on the multiple acquired images in the following manner to obtain multiple foreground images: perform a foreground extraction operation on the multiple acquired images in the following manner in sequence to obtain multiple foreground images, wherein each input acquired image is regarded as a target acquired image, and each output foreground image is regarded as a target foreground image; perform a saliency detection operation on the target acquired image to obtain a set of saliency parameters, wherein a saliency parameter corresponds to a pixel on the target acquired image, and the saliency parameter is used to indicate the saliency of the corresponding pixel on the target acquired image; perform a binarization operation on the target acquired image according to the set of saliency parameters to generate an initial mask image, wherein the color values ​​of the foreground area and the background area in the initial mask image are different, and the foreground area and the background area are determined by the values ​​of the saliency parameters; perform a connected domain detection on the initial mask image to determine the target mask image; generate the target foreground image according to the target acquired image and the target mask image, wherein the color value of the target object in the target foreground image is determined by the target acquired image.

[0192] As an optional scheme, the device is also used for: performing a downsampling operation on the target acquisition image to obtain the target acquisition image with reduced image resolution before performing a saliency detection operation on the target acquisition image to obtain a set of saliency parameters, wherein the degree of reduction in the image resolution is related to the original size of the target acquisition image and the maximum resolution allowed by the saliency detection operation; after performing a binarization operation on the target acquisition image according to the set of saliency parameters to generate an initial mask image, performing an upsampling operation on the initial mask image to obtain the initial mask image with the image resolution restored, wherein the upsampling operation is an inverse operation of the downsampling operation, and the image resolution of the initial mask image before the upsampling operation is performed is the same as the image resolution of the target acquisition image after the downsampling operation is performed.

[0193] As an optional solution, the device is used to perform a saliency detection operation on the target acquisition image in the following manner to obtain a set of saliency parameters: mapping the target acquisition image with reduced image resolution to a preset sample space to perform a normalization operation to obtain an initial acquisition image, wherein the color value of each pixel of the initial acquisition image is within a preset value range; inputting the initial acquisition image into a saliency detection network, determining the saliency parameters of each pixel in the initial acquisition image, and generating the set of saliency parameters.

[0194] As an optional solution, the device is used to perform a binarization operation on the target acquisition image according to the set of saliency parameters in the following manner to generate an initial mask image: pixels whose saliency parameter values ​​are less than or equal to a saliency parameter threshold are determined as a first pixel set belonging to the background area; pixels whose saliency parameter values ​​are greater than the saliency parameter threshold are determined as a second pixel set belonging to the foreground area; and the initial mask image is generated based on the first pixel set and the second pixel set.

[0195] As an optional solution, the device is used to perform connected domain detection on the initial mask image to determine the target mask image in the following manner: perform connected domain detection on the initial mask image to determine a group of connected domains; calculate the area of ​​each connected domain in the group of connected domains, and determine the connected domain with the largest area as the target mask image; the device is used to generate the target foreground image according to the target acquisition image and the target mask image in the following manner: obtain the color value of each pixel in the target mask image; modify the pixels with a color value of 0 to the target color value, and fill the pixels with a color value not equal to 0 with the color value of the corresponding pixel of the target acquisition image to generate the target foreground image.

[0196] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0197] According to one aspect of the present application, a computer program product is provided, the computer program product comprising a computer program / instruction, the computer program / instruction comprising a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication part 1209, and / or installed from a removable medium 1211. When the computer program is executed by the central processor 1201, various functions provided in the embodiments of the present application are executed.

[0198] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0199] Fig.12 The structure block diagram of a computer system for implementing an electronic device according to an embodiment of the present application is schematically shown.

[0200] It should be noted that Fig.12 The computer system 1200 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0201] like Fig.12 As shown, the computer system 1200 includes a central processing unit 1201 (CPU), which can perform various appropriate actions and processes according to the program stored in the read-only memory 1202 (ROM) or the program loaded from the storage part 1208 to the random access memory 1203 (RAM). Various programs and data required for system operation are also stored in the random access memory 1203. The central processing unit 1201, the read-only memory 1202 and the random access memory 1203 are connected to each other through a bus 1204. The input / output interface 1205 (Input / Output interface, i.e., I / O interface) is also connected to the bus 1204.

[0202] The following components are connected to the input / output interface 1205: an input section 1206 including a keyboard, a mouse, etc.; an output section 1207 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1208 including a hard disk, etc.; and a communication section 1209 including a network interface card such as a LAN card, a modem, etc. The communication section 1209 performs communication processing via a network such as the Internet. A drive 1210 is also connected to the input / output interface 1205 as needed. A removable medium 1211, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1210 as needed so that a computer program read therefrom is installed into the storage section 1208 as needed.

[0203] In particular, according to an embodiment of the present application, the process described in each method flow chart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer readable medium, and the computer program contains a program code for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 1209, and / or installed from the removable medium 1211. When the computer program is executed by the central processor 1201, various functions defined in the system of the present application are executed.

[0204] According to another aspect of the embodiment of the present application, an electronic device for implementing the above-mentioned three-dimensional model reconstruction method is also provided. The electronic device may be Figure 1 The terminal device or server shown in the figure. This embodiment is described by taking the electronic device as a terminal device as an example. Fig.13 As shown, the electronic device includes a memory 1302 and a processor 1304. The memory 1302 stores a computer program, and the processor 1304 is configured to execute the steps in any of the above method embodiments through the computer program.

[0205] Optionally, in this embodiment, the electronic device may be located in at least one network device among a plurality of network devices of a computer network.

[0206] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0207] S1, acquiring a plurality of acquired images, wherein the plurality of acquired images include images acquired by acquiring images of a target object to be reconstructed at different angles;

[0208] S2, performing a foreground extraction operation on the multiple collected images to obtain multiple foreground images, wherein the multiple foreground images correspond one to one to the multiple collected images;

[0209] S3, performing a feature matching operation on the multiple foreground images to obtain a set of matching results, wherein the set of matching results includes a target matching result associated with the first foreground image and the second foreground image, the target matching result includes an image feature set whose similarity satisfies a preset similarity condition in the first image feature set and the second image feature set, the first image feature set is used to represent feature information of a target object in the first foreground image, the second image feature set is used to represent feature information of a target object in the second foreground image, and both the first image feature set and the second image feature set filter out feature information other than feature information of the target object itself;

[0210] S4, determining camera parameters corresponding to the plurality of foreground images based on a set of matching results, and generating a target three-dimensional model corresponding to the target object according to the camera parameters.

[0211] Alternatively, a person skilled in the art may understand that: Fig.13 The structure shown is for illustration only, and the electronic device may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (MID), a PAD, and other terminal devices. Fig.13 The electronic device and the electronic equipment described above are not limited in structure. Fig.13 More or fewer components (such as network interfaces, etc.) as shown in, or with Fig.13 Different configurations shown.

[0212] Among them, the memory 1302 can be used to store software programs and modules, such as the program instructions / modules corresponding to the three-dimensional model reconstruction method and device in the embodiment of the present application. The processor 1304 executes various functional applications and data processing by running the software programs and modules stored in the memory 1302, that is, realizing the above-mentioned three-dimensional model reconstruction method. The memory 1302 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 1302 may further include a memory remotely located relative to the processor 1304, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Among them, the memory 1302 can be specifically, but not limited to, used to store information such as acquired images. As an example, such as Fig.13As shown, the memory 1302 may include, but is not limited to, the acquisition module 1102, extraction module 1104, matching module 1106, and generation module 1108 in the 3D model reconstruction method device. In addition, it may also include, but is not limited to, other module units in the 3D model reconstruction method device, which will not be repeated in this example.

[0213] Optionally, the transmission device 1306 is used to receive or send data via a network. Specific examples of the network may include a wired network and a wireless network. In one example, the transmission device 1306 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers via a network cable so as to communicate with the Internet or a local area network. In one example, the transmission device 1306 is a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0214] In addition, the electronic device further includes: a display 1308 for displaying the captured image; and a connection bus 1310 for connecting various module components in the electronic device.

[0215] In other embodiments, the terminal device or server may be a node in a distributed system, wherein the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting the multiple nodes through network communication. Among them, the nodes may form a peer-to-peer (P2P, Peer To Peer) network, and any form of computing device, such as a server, terminal and other electronic devices, may become a node in the blockchain system by joining the peer-to-peer network.

[0216] According to one aspect of the present application, a computer-readable storage medium is provided, and a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the three-dimensional model reconstruction method provided in various optional implementations of the above-mentioned three-dimensional model reconstruction method.

[0217] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:

[0218] S1, acquiring a plurality of acquired images, wherein the plurality of acquired images include images acquired by acquiring images of a target object to be reconstructed at different angles;

[0219] S2, performing a foreground extraction operation on the multiple collected images to obtain multiple foreground images, wherein the multiple foreground images correspond one to one to the multiple collected images;

[0220] S3, performing a feature matching operation on the multiple foreground images to obtain a set of matching results, wherein the set of matching results includes a target matching result associated with the first foreground image and the second foreground image, the target matching result includes an image feature set whose similarity satisfies a preset similarity condition in the first image feature set and the second image feature set, the first image feature set is used to represent feature information of a target object in the first foreground image, the second image feature set is used to represent feature information of a target object in the second foreground image, and both the first image feature set and the second image feature set filter out feature information other than feature information of the target object itself;

[0221] S4, determining camera parameters corresponding to the plurality of foreground images based on a set of matching results, and generating a target three-dimensional model corresponding to the target object according to the camera parameters.

[0222] Optionally, in this embodiment, a person of ordinary skill in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing hardware related to the terminal device through a program, and the program may be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.

[0223] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0224] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.

[0225] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0226] In the several embodiments provided in the present application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0227] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0228] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0229] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A three-dimensional model reconstruction method, characterized in that: include: Acquire a plurality of acquired images, wherein the plurality of acquired images include images acquired by acquiring images of a target object to be reconstructed at different angles; Performing a foreground extraction operation on the multiple collected images to obtain multiple foreground images, wherein the multiple foreground images correspond one-to-one to the multiple collected images; Performing a feature matching operation on the multiple foreground images to obtain a group of matching results, wherein the group of matching results includes a target matching result associated with the first foreground image and the second foreground image, the target matching result includes an image feature set whose similarity satisfies a preset similarity condition in the first image feature set and the second image feature set, the first image feature set is used to represent feature information of the target object in the first foreground image, the second image feature set is used to represent feature information of the target object in the second foreground image, and the first image feature set and the second image feature set both filter out feature information other than feature information of the target object itself; Camera parameters corresponding to the plurality of foreground images are determined based on the set of matching results, and a target three-dimensional model corresponding to the target object is generated according to the camera parameters.

2. The method according to claim 1, characterized in that: The performing of feature matching operations on the multiple foreground images to obtain a set of matching results includes: A set of matching results is obtained by sequentially performing feature matching operations on the multiple foreground images in the following manner, wherein the foreground image input each time is regarded as the first foreground image and the second foreground image, and the matching result output each time is regarded as the target matching result: Performing feature extraction operations on the first foreground image and the second foreground image respectively to obtain the first image feature set and the second image feature set; Performing a feature filtering operation on the first image feature set and the second image feature set respectively to obtain a first filtered feature set and a second filtered feature set, wherein the feature filtering operation is used to filter out feature information of an adjacent area, and the adjacent area is determined by a boundary between a foreground area and a background area determined by the foreground extraction operation; The first filtering feature set and the second filtering feature set are feature matched using a preset feature matching algorithm to obtain the target matching result.

3. The method according to claim 2, characterized in that The performing feature extraction operations on the first foreground image and the second foreground image respectively to obtain the first image feature set and the second image feature set includes: Performing a feature extraction operation on the first foreground image to obtain the first image feature set, wherein the first image feature includes an image feature of each pixel in the first foreground image and a first feature descriptor set of each pixel; Perform a feature extraction operation on the second foreground image to obtain the second image feature set, wherein the second image feature includes image features of each pixel in the second foreground image and a second feature descriptor set of each pixel, and the first feature descriptor set and the second feature descriptor set are used together to perform the feature matching.

4. The method according to claim 3, characterized in that: The performing a feature filtering operation on the first image feature set to obtain a first filtered feature set includes: Acquire a target boundary between a target foreground area and a target background area in the first foreground image and position information of each pixel point in the first image feature set; Determine a pixel point whose distance between the position information and the target boundary is less than a preset distance threshold as a target pixel point belonging to the adjacent area, and determine the adjacent area based on the target pixel point; The feature descriptors whose corresponding pixel position information is located in the adjacent area in the first feature descriptor set are removed to obtain the first filtering feature set.

5. The method according to claim 4, characterized in that The step of determining a pixel point whose distance between the position information and the target boundary is less than a preset distance threshold as a target pixel point belonging to the adjacent area, and determining the adjacent area based on the target pixel point, comprises: Acquire a boundary pixel point in the first foreground image whose color value is 0 and whose adjacent pixel point has a color value of 1, wherein the boundary pixel point is used to represent the target boundary; The preset distance threshold is extended along the boundary pixel point in the direction of the target foreground area to determine the adjacent area, wherein the boundary of the adjacent area includes the target boundary and an extended boundary determined after extending the preset distance threshold, and the target pixel point is located between the target boundary and the extended boundary.

6. The method according to claim 3, characterized in that The using a preset feature matching algorithm to perform feature matching on the first filtering feature set and the second filtering feature set to obtain the target matching result includes: Obtaining a first feature descriptor in the first filtering feature set; Calculating a set of similarity evaluation parameters between the first feature descriptor and each feature descriptor in the second filtering feature set using the preset feature matching algorithm; Determining a feature descriptor associated with a target similarity evaluation parameter as a second feature descriptor, wherein the target similarity evaluation parameter is a similarity evaluation parameter with the largest value in the similarity evaluation parameter set; When the target similarity evaluation parameter satisfies a preset value condition, the first feature descriptor and the second feature descriptor are added to the target matching result as a matching pair.

7. The method according to claim 1, characterized in that The performing of a foreground extraction operation on the plurality of collected images to obtain a plurality of foreground images comprises: Performing foreground extraction operations on the multiple collected images in sequence in the following manner to obtain multiple foreground images, wherein each input collected image is regarded as a target collected image, and each output foreground image is regarded as a target foreground image: Performing a saliency detection operation on the target acquisition image to obtain a set of saliency parameters, wherein one saliency parameter corresponds to one pixel on the target acquisition image, and the saliency parameter is used to indicate the saliency of the corresponding pixel on the target acquisition image; Performing a binarization operation on the target acquisition image according to the set of saliency parameters to generate an initial mask image, wherein the color values ​​of the foreground area and the background area in the initial mask image are different, and the foreground area and the background area are determined by the values ​​of the saliency parameters; Performing connected domain detection on the initial mask image to determine a target mask image; The target foreground image is generated according to the target acquisition image and the target mask image, wherein the color value of the target object in the target foreground image is determined by the target acquisition image.

8. The method according to claim 7, characterized in that Before performing the saliency detection operation on the target acquisition image to obtain a set of saliency parameters, the method further includes: performing a downsampling operation on the target acquisition image to obtain the target acquisition image with reduced image resolution, wherein the degree of reduction of the image resolution is related to the original size of the target acquisition image and the maximum resolution allowed by the saliency detection operation; After performing a binarization operation on the target acquisition image according to the set of saliency parameters to generate an initial mask image, the method further includes: performing an upsampling operation on the initial mask image to obtain the initial mask image with the image resolution restored, wherein the upsampling operation is an inverse operation of the downsampling operation, and the image resolution of the initial mask image before the upsampling operation is performed is the same as the image resolution of the target acquisition image after the downsampling operation is performed.

9. The method according to claim 8, characterized in that The performing of a saliency detection operation on the target acquisition image to obtain a set of saliency parameters includes: Mapping the target acquisition image with reduced image resolution to a preset sample space to perform a normalization operation to obtain an initial acquisition image, wherein the color value of each pixel of the initial acquisition image is within a preset value range; The initial collected image is input into a saliency detection network, the saliency parameter of each pixel in the initial collected image is determined, and the set of saliency parameters is generated.

10. The method according to claim 7, characterized in that The step of performing a binarization operation on the target acquisition image according to the set of saliency parameters to generate an initial mask image comprises: Determine pixels whose significance parameter values ​​are less than or equal to the significance parameter threshold as a first pixel set belonging to the background area; Determine pixels whose significance parameter values ​​are greater than the significance parameter threshold as a second set of pixels belonging to the foreground area; The initial mask image is generated according to the first pixel set and the second pixel set.

11. The method according to claim 7, characterized in that The performing of connected domain detection on the initial mask image to determine the target mask image includes: performing connected domain detection on the initial mask image to determine a group of connected domains; calculating the area of ​​each connected domain in the group of connected domains, and determining the connected domain with the largest area as the target mask image; The generating of the target foreground image according to the target acquisition image and the target mask image includes: obtaining the color value of each pixel in the target mask image; modifying the pixels whose color value is 0 to the target color value, and filling the pixels whose color value is not 0 with the color value of the corresponding pixel of the target acquisition image to generate the target foreground image.

12. A three-dimensional model reconstruction device, characterized in that: include: An acquisition module, used to acquire a plurality of acquired images, wherein the plurality of acquired images include images acquired by acquiring images of a target object to be reconstructed at different angles; An extraction module, configured to perform a foreground extraction operation on the plurality of collected images to obtain a plurality of foreground images, wherein the plurality of foreground images correspond one-to-one to the plurality of collected images; a matching module, configured to perform a feature matching operation on the plurality of foreground images to obtain a set of matching results, wherein the set of matching results includes a target matching result associated with the first foreground image and the second foreground image, the target matching result includes an image feature set whose similarity satisfies a preset similarity condition in a first image feature set and a second image feature set, the first image feature set is used to represent feature information of the target object in the first foreground image, the second image feature set is used to represent feature information of the target object in the second foreground image, and both the first image feature set and the second image feature set filter out feature information other than feature information of the target object itself; A generation module is used to determine camera parameters corresponding to the multiple foreground images based on the set of matching results, and generate a target three-dimensional model corresponding to the target object according to the camera parameters.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program can be executed by a terminal device or a computer to execute the method described in any one of claims 1 to 11.

14. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method described in any one of claims 1 to 11 are implemented.

15. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 11 through the computer program.

Citation Information

Cited By

  • Method and device for determining equipment

    CN120849223A