Three-dimensional model construction method and device, equipment and storage medium

CN117422817BActive Publication Date: 2026-10-09BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210814152.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-11
Publication Date
2026-10-09
Estimated Expiration
2042-07-11

AI Technical Summary

Technical Problem

另一种是通过训练后的神经网络直接进行相机定位和三维重建,该种方式的结果受训练集的影响较大,且泛化性较差

Benefits of technology

[0020] Fourthly, embodiments of this disclosure also provide a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform the three-dimensional model construction method as described in embodiments of this disclosure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117422817B_ABST
    Figure CN117422817B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure provide a three-dimensional model construction method and device, equipment and a storage medium. Pixel tracking is performed on an original video to obtain an initial pixel track set; label information of each pixel track in the initial pixel track set is determined; the initial pixel track set is filtered based on the label information to obtain a target pixel track set; three-dimensional reconstruction point information and camera pose information of each video frame of the original video are determined according to the target pixel track set; and three-dimensional model construction is performed based on the three-dimensional reconstruction point information and the camera pose information of each video frame of the original video. The three-dimensional model construction method provided by the embodiments of the present disclosure filters the pixel track set based on label information, and determines three-dimensional reconstruction point information and camera pose information of each video frame of the original video based on the filtered pixel track set, which can improve the robustness and accuracy of camera positioning and three-dimensional reconstruction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of image processing technology, and in particular to a method, apparatus, device, and storage medium for constructing three-dimensional models. Background Technology

[0002] In related technologies, camera localization and 3D reconstruction are implemented using the following methods: One method involves extracting similarity and performing matching, initializing two frames based on the matched pixels to obtain the relative camera pose and initial 3D points between the initial matched pairs, and finally adjusting the camera pose and 3D points using bundle adjustment (BA). In dynamic scenes, this method exhibits low robustness and accuracy in camera localization and 3D reconstruction. Another method involves directly performing camera localization and 3D reconstruction using a trained neural network. However, the results of this method are significantly affected by the training set and exhibit poor generalization ability. Summary of the Invention

[0003] This disclosure provides a method, apparatus, device, and storage medium for constructing a three-dimensional model, which can improve the robustness and accuracy of camera positioning and three-dimensional reconstruction.

[0004] In a first aspect, embodiments of this disclosure provide a method for constructing a three-dimensional model, including:

[0005] Pixel tracking is performed on the original video to obtain an initial set of pixel trajectories; wherein the set of pixel trajectories consists of multiple pixel trajectories;

[0006] Determine the label information of each pixel trajectory in the initial pixel trajectory set;

[0007] The initial pixel trajectory set is filtered based on the label information to obtain the target pixel trajectory set;

[0008] The three-dimensional reconstruction point information and the camera pose information of each video frame of the original video are determined based on the target pixel trajectory set.

[0009] A 3D model is constructed based on the 3D reconstructed point information and the camera pose information of each video frame of the original video.

[0010] Secondly, embodiments of this disclosure also provide a three-dimensional model building apparatus, including:

[0011] A pixel tracking module is used to perform pixel tracking on the original video to obtain an initial set of pixel trajectories; wherein, the set of pixel trajectories consists of multiple pixel trajectories;

[0012] The label information determination module is used to determine the label information of each pixel trajectory in the initial pixel trajectory set;

[0013] The target pixel trajectory set acquisition module is used to filter the initial pixel trajectory set based on the label information to obtain the target pixel trajectory set;

[0014] The camera pose information and 3D reconstruction point information determination module is used to determine the 3D reconstruction point information and the camera pose information of each video frame of the original video based on the target pixel trajectory set.

[0015] The 3D model construction module is used to construct a 3D model based on the 3D reconstruction point information and the camera pose information of each video frame of the original video.

[0016] Thirdly, embodiments of this disclosure also provide an electronic device, the electronic device comprising:

[0017] One or more processors;

[0018] Storage device for storing one or more programs.

[0019] When the one or more programs are executed by the one or more processors, the one or more processors implement the three-dimensional model construction method as described in the embodiments of this disclosure.

[0020] Fourthly, embodiments of this disclosure also provide a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform the three-dimensional model construction method as described in embodiments of this disclosure.

[0021] This disclosure provides a method, apparatus, device, and storage medium for constructing a 3D model. The method involves pixel tracking of an original video to obtain an initial pixel trajectory set, where each set consists of multiple pixel trajectories. Label information for each pixel trajectory in the initial set is determined. The initial pixel trajectory set is then filtered based on the label information to obtain a target pixel trajectory set. Based on the target pixel trajectory set, 3D reconstruction point information and camera pose information for each video frame of the original video are determined. A 3D model is constructed based on the 3D reconstruction point information and the camera pose information for each video frame of the original video. The 3D model construction method provided in this disclosure improves the robustness and accuracy of camera positioning and 3D reconstruction by filtering the pixel trajectory set based on label information and determining the 3D reconstruction point information and camera pose information for each video frame of the original video based on the filtered pixel trajectory set. Attached Figure Description

[0022] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.

[0023] Figure 1 This is a flowchart illustrating a three-dimensional model construction method provided in an embodiment of this disclosure;

[0024] Figure 2 This is a schematic diagram of the pixel trajectory of a certain pixel point provided in an embodiment of this disclosure;

[0025] Figure 3 This is a schematic diagram of a three-dimensional model building device provided in an embodiment of the present disclosure;

[0026] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation

[0027] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0028] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.

[0029] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.

[0030] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.

[0031] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0032] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.

[0033] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.

[0034] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.

[0035] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0036] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.

[0037] It is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and related provisions.

[0038] Figure 1 This is a flowchart illustrating a three-dimensional model construction method provided in an embodiment of the present disclosure. This embodiment is applicable to the situation of three-dimensional reconstruction of a real scene corresponding to a video. The method can be executed by a three-dimensional model construction device, which can be implemented in the form of software and / or hardware. Optionally, it can be implemented by an electronic device, such as a mobile terminal, a PC, or a server.

[0039] like Figure 1 As shown, the method includes:

[0040] S110 performs pixel tracking on the original video to obtain an initial set of pixel trajectories.

[0041] The pixel trajectory set consists of multiple pixel trajectories, each recording the position information of the tracked pixel in each video frame, as well as the start and end timestamps. In this embodiment, all pixels in the original video can be tracked, or only pixels sampled at a set density can be tracked. A higher set density results in more sampled pixels and higher accuracy in 3D reconstruction; conversely, a lower set density results in fewer sampled pixels and lower accuracy in 3D reconstruction. Therefore, the set density can be adjusted according to requirements. For example... Figure 2 This is the pixel trajectory of a certain pixel in this embodiment, such as... Figure 2 As shown, the pixel trajectory records the position information of the tracked pixel in video frames I0-In, which are (u0,v0), (u1,v1), (u2,v2)...(u...). n ,v n In, the timestamp of video frame I0 is the start timestamp of the pixel, and In is the end timestamp of the pixel.

[0042] Optionally, the method for performing pixel tracking on the original video to obtain an initial pixel trajectory set can be as follows: determine the optical flow information of the tracked pixel between any two video frames in the original video; determine the position information of the tracked pixel in each video frame based on the optical flow information; concatenate the position information of the tracked pixel in each video frame to obtain the pixel trajectory of the tracked pixel; and form an initial pixel trajectory set by combining the pixel trajectories of multiple tracked pixels.

[0043] The tracked pixels are those obtained by sampling at a set density, and their pixel trajectories form the initial pixel trajectory set. The optical flow information includes forward optical flow information and backward optical flow information. Forward optical flow information can be understood as the optical flow information from an earlier timestamp video frame to a later timestamp video frame in the original video, while backward optical flow information can be understood as the optical flow information from a later timestamp video frame to an earlier timestamp video frame in the original video. For example, for video frame a and video frame b, assuming video frame a has an earlier timestamp and video frame b has a later timestamp, the optical flow information from video frame a to video frame b is the forward optical flow information between these two video frames, and the optical flow information from video frame b to video frame a is the backward optical flow information between these two video frames.

[0044] In this embodiment, any existing optical flow information estimation method can be used to determine the optical flow information of pixels between two video frames. No limitation is made here, as different pixels will have different optical flow information between two video frames. Specifically, first, the position information of the tracked pixel in the first frame is determined. Then, the optical flow information of the tracked pixel between the first and second video frames is determined. The position information of the tracked pixel in the first frame is added to this optical flow information to obtain the position information of the tracked pixel in the second video frame. The optical flow information between the second and third video frames is then determined, and the position information of the tracked pixel in the second video frame is added to this optical flow information to obtain the position information of the tracked pixel in the third video frame. This process is repeated to obtain the position information of the tracked pixel in each video frame. The position information of the tracked pixel in each video frame is then concatenated to obtain the pixel trajectory of the tracked pixel. The pixel trajectories of multiple tracked pixels form an initial pixel trajectory set.

[0045] In this embodiment, since the original video is captured by the camera while it is moving, the tracked pixel may be occluded in a certain video frame (e.g., it moves out of the frame or is occluded by other objects). In this case, tracking of the pixel needs to be stopped, i.e., the pixel trajectory of the tracked pixel terminates. Optionally, the method for determining the position information of the tracked pixel in each video frame based on optical flow information can be as follows: obtaining the first position information of the tracked pixel in the current video frame; obtaining the forward optical flow information and reverse optical flow information of the tracked pixel between the current video frame and the next video frame; performing consistency detection based on the first position information, forward optical flow information, and reverse optical flow information; determining whether the tracked pixel is occluded in the next video frame based on the consistency detection result; if the tracked pixel is occluded in the next video frame, then the tracking of the tracked pixel ends.

[0046] The current video frame can be the first frame or a non-first frame. If the current video frame is the first frame, the position information of the tracked pixel in the first frame can be directly obtained, i.e., the first position information. If the current video frame is not the first frame, the first position information of the tracked pixel in the current video frame can be determined based on the position information of the tracked pixel in the previous video frame and the optical flow information of the tracked pixel between the previous video frame and the current video frame. The forward optical flow information of the tracked pixel between the current video frame and the next video frame can be understood as the optical flow information of the tracked pixel from the current video frame to the next video frame, and the reverse optical flow information of the tracked pixel between the current video frame and the next video frame can be understood as the optical flow information of the tracked pixel from the next video frame to the current video frame.

[0047] In this embodiment, consistency detection can determine whether a pixel in the current video frame and a pixel in the next video frame belong to the same object. Optionally, the consistency detection process based on the first position information, forward optical flow information, and reverse optical flow information can be as follows: determine the second position information of the tracked pixel in the next video frame based on the first position information and forward optical flow information; determine the third position information based on the second position information and reverse optical flow information; determine the difference information between the first position information and the third position information, and determine the difference information as the consistency detection result.

[0048] One method for determining the second position information of the tracked pixel in the next video frame based on the first position information and the forward optical flow information is to accumulate the first position information and the forward optical flow information between the current video frame and the next video frame to obtain the second position information of the tracked pixel in the next video frame. This can be expressed as: L2 = L1 + F a→b Where a represents the current video frame, b represents the next video frame, and F a→b L1 represents the forward optical flow information between the current video frame and the next video frame, L2 represents the second position information, and L1 represents the first position information. The third position information can be determined based on the second position information and the reverse optical flow information by accumulating the second position information and the reverse optical flow information between the current video frame and the next video frame to obtain the third position information of the tracked pixel in the current video frame. This can be expressed as: L3 = L2 + F b→a , of which F b→a This indicates the reverse optical flow information between the current video frame and the next video frame.

[0049] The difference between the first and third location information can be understood as the distance between the coordinates corresponding to the first and third location information. For example, this distance can be Euclidean distance.

[0050] Optionally, the method for determining whether the tracked pixel is occluded in the next video frame based on the consistency detection result can be: if the difference information is less than or equal to a set threshold, the tracked pixel is not occluded in the next video frame; if the difference information is greater than the set threshold, the tracked pixel is occluded in the next video frame.

[0051] Specifically, if the difference information is less than or equal to the set threshold, it means that the consistency detection of the tracked pixel has passed, and the tracked pixel is not occluded in the next video frame, so tracking of the pixel can continue. If the difference information is greater than the set threshold, it means that the consistency detection of the tracked pixel has failed, and the tracked pixel is occluded in the next video frame, so tracking of the pixel ends, that is, the pixel trajectory of the pixel terminates.

[0052] Optionally, after ending the tracking of the tracked pixels, the method further includes: sampling new tracked pixels from the newly added pixels according to a set density; tracking the new tracked pixels to obtain the pixel trajectory of the new tracked pixels.

[0053] In this embodiment, when the tracked pixel is occluded, it indicates that a new pixel appears in the next video frame. After the tracking of the tracked pixel ends, in order to ensure that the pixel trajectory set meets the set density, it is necessary to sample new tracked pixels from the newly added pixels according to the set density, and track the new tracked pixels in the above manner to obtain the pixel trajectory of the new tracked pixels.

[0054] In this embodiment, since there is an error in the optical flow information between two adjacent video frames, the pixel trajectory determined based on the optical flow information between two adjacent video frames also has an error. Moreover, as the timestamps of the video frames accumulate, the error will also accumulate. Therefore, it is necessary to optimize or correct the pixel trajectory to improve its accuracy.

[0055] Optionally, the method for determining the position information of the tracked pixel in each video frame based on the optical flow information can be as follows: determine the fifth position information of the tracked pixel in the current video frame based on the fourth position information and the first forward optical flow information of the tracked pixel in the previous video frame; determine the sixth position information of the tracked pixel in the next video frame based on the fifth position information and the second forward optical flow information; determine the seventh position information of the tracked pixel in the next video frame based on the fourth position information and the third forward optical flow information; and determine the target position information of the tracked pixel in the current video frame based on the fifth position information, the sixth position information, and the seventh position information.

[0056] The first forward optical flow information is the forward optical flow information of the tracked pixel between the previous video frame and the current video frame. The second forward optical flow information is the forward optical flow information of the tracked pixel between the current video frame and the next video frame. The third forward optical flow information is the forward optical flow information of the tracked pixel between the previous video frame and the next video frame. The method to determine the fifth position information of the tracked pixel in the current video frame based on the fourth position information and the first forward optical flow information can be: accumulating the fourth position information and the first forward optical flow information to obtain the fifth position information of the tracked pixel in the current video frame; this can be expressed as: L5 = L4 + F c→a Where c represents the previous video frame, a represents the current video frame, and F c→aL6 represents the first forward optical flow information, L5 represents the fifth position information, and L4 represents the fourth position information. The sixth position information of the tracked pixel in the next video frame can be determined by accumulating the fifth and second forward optical flow information; this can be expressed as: L6 = L5 + F. a→b b indicates the next video frame, F a→b This represents the second forward optical flow information. The method for determining the seventh position information of the tracked pixel in the next video frame based on the fourth and third forward optical flow information can be: L7 = L4 + F c→b Fc→b represents the third forward optical flow information.

[0057] In this embodiment, the method for determining the target position information of the tracked pixel in the current video frame based on the fifth position information, the sixth position information, and the seventh position information can be as follows: construct a target optimization function based on the fifth position information, the sixth position information, and the seventh position information, iteratively optimize the target function, and obtain the target position information of the tracked pixel in the current video frame.

[0058] The objective function can be expressed as: D = (La - L5) 2 +(Lb-L6) 2 +(Lb-L7) 2 Where La represents the candidate position information of the tracked pixel in the current video frame, and Lb represents the candidate position information of the tracked pixel in the next video frame.

[0059] Optionally, the method for determining the target position information of the tracked pixel in the current video frame based on the fifth, sixth, and seventh position information can be as follows: obtain the first candidate position information of the tracked pixel in the current video frame and the second candidate position information in the next video frame; determine the first distance between the first candidate position information and the fifth position information, determine the second distance between the second candidate position information and the sixth position information, and determine the third distance between the second candidate position information and the seventh position information; accumulate the first distance, the second distance, and the third distance to obtain the target information; if the target information is less than a set value, then the first candidate position information is determined as the target position information in the current video frame.

[0060] Here, the target information can be understood as the result of the above objective optimization function, and the first distance can be expressed as: (La-L5) 2 The second distance can be expressed as (Lb-L6). 2 The third distance can be expressed as: (Lb-L7) 2In this embodiment, firstly, the first candidate position information and second candidate position information are initialized. Then, according to the set optimization algorithm and the aforementioned target optimization function, the first candidate position information and second candidate position information are iteratively optimized. Each iteration yields a set of first candidate position information, second candidate position information, and corresponding target information, until the target information is less than a set value. Then, the first candidate position information corresponding to the target information is determined as the target position information of the current video frame. This process is repeated for each subsequent video frame, optimizing the position information of the tracked pixel in the same way to obtain the optimized pixel trajectory.

[0061] S120, Determine the label information of each pixel trajectory in the initial pixel trajectory set.

[0062] The label information can include motion and stillness. Stillness indicates that the object corresponding to the pixel trajectory is a static object, while motion indicates that the object corresponding to the pixel trajectory is a dynamic object.

[0063] Optionally, the label information of each pixel trajectory in the initial pixel trajectory set can be determined by: setting a classification model from the output of the initial pixel trajectory set, and obtaining the label information of each pixel trajectory in the initial pixel trajectory set.

[0064] The classification model consists of a specification encoder and a specification-aware Network (OANet) decoder. The specification encoder can be a transformer encoder, which encodes sequential data, while the OANet decoder decodes point cloud-like data. For details regarding the specific network structures of the transformer encoder and OANet decoder, please refer to relevant existing technologies; they will not be elaborated upon here.

[0065] S130: Based on the label information, the initial pixel trajectory set is filtered to obtain the target pixel trajectory set.

[0066] Specifically, the method for filtering the initial pixel trajectory set based on label information to obtain the target pixel trajectory set can be as follows: delete pixel trajectories in the initial pixel trajectory set whose label information is "moving" to obtain the target pixel trajectory set. In this embodiment, deleting pixel trajectories whose label information is "moving" can improve the accuracy of subsequently determining the 3D reconstruction point information and the camera pose information of each video frame of the original video based on the pixel trajectory set.

[0067] S140, determine the 3D reconstruction point information and camera pose information of each video frame of the original video based on the target pixel trajectory set.

[0068] Specifically, the method for determining the 3D reconstruction point information and the camera pose information of each video frame in the original video based on the target pixel trajectory set can be as follows: determine the initial absolute camera pose information of the current video frame based on the target pixel trajectory set; perform triangulation processing based on the initial absolute camera pose information of each video frame and the target pixel trajectory set to obtain the initial 3D reconstruction points; and use a set algorithm to optimize the initial absolute camera pose information and the initial 3D reconstruction points of each video frame to obtain the target camera pose information and target 3D reconstruction point information of each video frame.

[0069] For example, the algorithm can be set as Bundle Adjustment (BA). The principle of Bundle Adjustment is that for any 3D point P in the scene, rays emitted from the optical center of the camera corresponding to each video frame and passing through the pixel corresponding to P in the video frame will converge at point P. For a 3D point P, this forms a considerable number of bundles, the number of which is determined by the number of video frames. In practice, due to noise and other factors, it is almost impossible for each ray to converge at a single point. Therefore, during the solution process, it is necessary to continuously adjust the 3D reconstructed point information and the camera pose information of the video frames so that the rays ultimately converge at point P.

[0070] Optionally, the method for determining the initial absolute camera pose information of the current video frame based on the target pixel trajectory set can be: determining the relative camera pose information between the current video frame and at least one other video frame based on the target pixel trajectory set; and determining the initial absolute camera pose information of the current video frame based on at least one relative camera pose information.

[0071] Optionally, the process of determining the relative camera pose information between the current video frame and other video frames based on the target pixel trajectory set can be as follows: First, obtain the position information sets of multiple tracked pixels in the current video frame and the position information sets in other video frames based on the target pixel trajectory set; then, determine the relative pose information between the current video frame and other video frames based on these two position information sets. Optionally, the method of determining the initial absolute camera pose information of the current video frame based on at least one relative camera pose information can be as follows: Average at least one relative pose information according to a set method to obtain the initial absolute pose information of the current video frame. Optionally, the method of performing triangulation processing based on the initial absolute camera pose information of each video frame and the target pixel trajectory set can be as follows: For each tracked pixel, obtain multiple rays emitted from the optical center of the camera corresponding to the initial absolute pose of each video frame and passing through the tracked pixel in the video frame (the position of the tracked pixel in the video frame is determined by the pixel trajectory); fit these multiple rays so that the multiple rays intersect at a point, which is the initial 3D reconstruction point corresponding to the tracked pixel.

[0072] Specifically, the bundle adjustment algorithm is used to optimize the initial absolute camera pose information and initial 3D reconstruction points of each video frame to obtain the target camera pose information and target 3D reconstruction point information of each video frame.

[0073] S150 constructs a 3D model based on the 3D reconstruction point information and the camera pose information of each video frame in the original video.

[0074] Specifically, after obtaining the 3D reconstructed point information and the camera pose information of each frame of the original video, a 3D model can be constructed based on these information. Any existing method can be used to construct the 3D model, which will not be elaborated upon here.

[0075] The technical solution of this embodiment involves pixel tracking of the original video to obtain an initial pixel trajectory set, wherein the pixel trajectory set consists of multiple pixel trajectories; determining the label information of each pixel trajectory in the initial pixel trajectory set; filtering the initial pixel trajectory set based on the label information to obtain a target pixel trajectory set; determining 3D reconstruction point information and camera pose information of each video frame of the original video based on the target pixel trajectory set; and constructing a 3D model based on the 3D reconstruction point information and the camera pose information of each video frame of the original video. The 3D model construction method provided in this embodiment, by filtering the pixel trajectory set based on label information and determining the 3D reconstruction point information and camera pose information of each video frame of the original video based on the filtered pixel trajectory set, can improve the robustness and accuracy of camera positioning and 3D reconstruction.

[0076] Figure 3 This is a schematic diagram of the structure of a three-dimensional model building device provided in an embodiment of the present disclosure, as shown below. Figure 3 As shown, the device includes:

[0077] The pixel tracking module 310 is used to perform pixel tracking on the original video to obtain an initial pixel trajectory set; wherein the pixel trajectory set consists of multiple pixel trajectories.

[0078] The label information determination module 320 is used to determine the label information of each pixel trajectory in the initial pixel trajectory set;

[0079] The target pixel trajectory set acquisition module 330 is used to filter the initial pixel trajectory set based on the label information to obtain the target pixel trajectory set;

[0080] The camera pose information and 3D reconstruction point information determination module 340 is used to determine the 3D reconstruction point information and the camera pose information of each video frame of the original video based on the target pixel trajectory set.

[0081] The 3D model construction module 350 is used to construct a 3D model based on the 3D reconstruction point information and the camera pose information of each video frame of the original video.

[0082] Optionally, the pixel tracking module 310 is also used for:

[0083] Determine the optical flow information of the tracked pixels between any two video frames in the original video; where the tracked pixels are pixels obtained by sampling with a set density.

[0084] The position information of the tracked pixel in each video frame is determined based on optical flow information;

[0085] The position information of the tracked pixel in each video frame is concatenated to obtain the pixel trajectory of the tracked pixel;

[0086] The pixel trajectories of multiple tracked pixels constitute an initial pixel trajectory set; wherein, the pixel trajectories of the tracked pixels constitute the initial pixel trajectory set.

[0087] Optionally, the pixel tracking module 310 is also used for:

[0088] Obtain the first position information of the tracked pixel in the current video frame;

[0089] Obtain the forward and backward optical flow information of the tracked pixels between the current video frame and the next video frame;

[0090] Consistency detection is performed based on the first position information, forward optical flow information, and reverse optical flow information;

[0091] Based on the consistency detection results, determine whether the tracked pixel is occluded in the next video frame;

[0092] If the tracked pixel is occluded in the next video frame, the tracking of the tracked pixel ends.

[0093] Optionally, the pixel tracking module 310 is also used for:

[0094] New tracked pixels are sampled from the newly added pixels according to the set density;

[0095] The new tracked pixel is tracked to obtain its pixel trajectory.

[0096] Optionally, the pixel tracking module 310 is also used for:

[0097] The second position information of the tracked pixel in the next video frame is determined based on the first position information and the forward optical flow information;

[0098] The third position information is determined based on the second position information and the reverse optical flow information;

[0099] Determine the differences between the first and third location information, where the differences are the consistency detection results.

[0100] Optionally, the pixel tracking module 310 is also used for:

[0101] If the difference information is less than or equal to the set threshold, the tracked pixel will not be occluded in the next video frame.

[0102] If the difference exceeds the set threshold, the tracked pixel will be occluded in the next video frame.

[0103] Optionally, the pixel tracking module 310 is also used for:

[0104] The fifth position information of the tracked pixel in the current video frame is determined based on the fourth position information of the tracked pixel in the previous video frame and the first forward optical flow information; wherein, the first forward optical flow information is the forward optical flow information of the tracked pixel between the previous video frame and the current video frame;

[0105] The sixth position information of the tracked pixel in the next video frame is determined based on the fifth position information and the second forward optical flow information; wherein, the second forward optical flow information is the forward optical flow information of the tracked pixel between the current video frame and the next video frame;

[0106] The seventh position information of the tracked pixel in the next video frame is determined based on the fourth position information and the third forward optical flow information; wherein, the third forward optical flow information is the forward optical flow information of the tracked pixel between the previous video frame and the next video frame;

[0107] The target position information of the tracked pixel in the current video frame is determined based on the fifth, sixth, and seventh position information.

[0108] Optionally, the pixel tracking module 310 is also used for:

[0109] Obtain the first candidate position information of the tracked pixel in the current video frame and the second candidate position information in the next video frame;

[0110] Determine the first distance between the first candidate location information and the fifth location information, determine the second distance between the second candidate location information and the sixth location information, and determine the third distance between the second candidate location information and the seventh location information;

[0111] The first distance, the second distance, and the third distance are summed to obtain the target information;

[0112] If the target information is less than the set value, the first candidate position information will be determined as the target position information of the current video frame.

[0113] Optionally, the tag information determination module 320 is also used for:

[0114] The initial pixel trajectory set is input into the established classification model to obtain the label information of each pixel trajectory in the initial pixel trajectory set; the label information includes motion and stillness; the established classification model consists of a set encoder and a set perceptual decoder;

[0115] Optionally, the target pixel trajectory set acquisition module 330 is also used for:

[0116] Remove the pixel trajectories with moving labels from the initial pixel trajectory set to obtain the target pixel trajectory set.

[0117] Optionally, the camera pose information and 3D reconstruction point information determination module 340 is also used for:

[0118] The initial absolute camera pose information of the current video frame is determined based on the target pixel trajectory set;

[0119] Triangulation is performed on the initial absolute camera pose information and target pixel trajectory set of each video frame to obtain the initial 3D reconstruction points;

[0120] An algorithm is used to optimize the initial absolute camera pose information and initial 3D reconstruction points of each video frame to obtain the target camera pose information and target 3D reconstruction point information of each video frame.

[0121] Optionally, the camera pose information and 3D reconstruction point information determination module 340 is also used for:

[0122] Determine the relative camera pose information between the current video frame and at least one other video frame based on the target pixel trajectory set;

[0123] The initial absolute camera pose information of the current video frame is determined based on at least one relative camera pose information.

[0124] The three-dimensional model building apparatus provided in this disclosure can execute the three-dimensional model building method provided in any embodiment of this disclosure, and has the corresponding functional modules and beneficial effects of executing the method.

[0125] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the protection scope of the embodiments of this disclosure.

[0126] Figure 4This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Reference is made below. Figure 4 It illustrates an electronic device suitable for implementing embodiments of the present disclosure (e.g., Figure 4 The diagram below shows the structure of the terminal device (or server) 400. The terminal device in this embodiment may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 4 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.

[0127] like Figure 4 As shown, electronic device 400 may include a processing unit (e.g., central processing unit, graphics processor, etc.) 401, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 402 or a program loaded from storage device 408 into random access memory (RAM) 403. The RAM 403 also stores various programs and data required for the operation of electronic device 400. The processing unit 401, ROM 402, and RAM 403 are interconnected via bus 404. An edit / output (I / O) interface 405 is also connected to bus 404.

[0128] Typically, the following devices can be connected to I / O interface 405: input devices 406 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 407 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 408 including, for example, magnetic tapes, hard disks, etc.; and communication devices 409. Communication device 409 allows electronic device 400 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 4 An electronic device 400 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.

[0129] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 409, or installed from storage device 408, or installed from ROM 402. When the computer program is executed by processing device 401, it performs the functions defined in the methods of embodiments of this disclosure.

[0130] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.

[0131] The electronic device provided in this embodiment and the three-dimensional model construction method provided in the above embodiments belong to the same inventive concept. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.

[0132] This disclosure provides a computer storage medium storing a computer program that, when executed by a processor, implements the three-dimensional model construction method provided in the above embodiments.

[0133] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0134] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.

[0135] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.

[0136] The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to:

[0137] The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: perform pixel tracking on the original video to obtain an initial set of pixel trajectories; wherein the set of pixel trajectories consists of multiple pixel trajectories; determine the label information of each pixel trajectory in the initial set of pixel trajectories; filter the initial set of pixel trajectories based on the label information to obtain a target set of pixel trajectories; determine 3D reconstruction point information and camera pose information of each video frame of the original video based on the target set of pixel trajectories; and construct a 3D model based on the 3D reconstruction point information and the camera pose information of each video frame of the original video.

[0138] Computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof, including but not limited to object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0139] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0140] The units described in the embodiments of this disclosure can be implemented in software or in hardware. The name of a unit does not necessarily limit the unit itself; for example, the first acquisition unit can also be described as "a unit that acquires at least two Internet Protocol addresses".

[0141] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.

[0142] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0143] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.

[0144] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.

[0145] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.

Claims

1. A method for constructing a three-dimensional model, characterized in that, include: Pixel tracking is performed on the original video to obtain an initial set of pixel trajectories; wherein, the initial set of pixel trajectories consists of multiple pixel trajectories; Determine the label information of each pixel trajectory in the initial pixel trajectory set, wherein the label information includes motion and stillness, where stillness indicates that the object corresponding to the pixel trajectory is a static object, and motion indicates that the object corresponding to the pixel trajectory is a dynamic object; The initial pixel trajectory set is filtered based on the label information to obtain the target pixel trajectory set; Based on the target pixel trajectory set, determine the three-dimensional reconstruction point information and the camera pose information of each video frame of the original video; A 3D model is constructed based on the 3D reconstructed point information and the camera pose information of each video frame of the original video.

2. The method according to claim 1, characterized in that, Perform pixel tracking on the original video to obtain an initial set of pixel trajectories, including: Determine the optical flow information of the tracked pixels between any two video frames in the original video; wherein the tracked pixels are pixels obtained by sampling with a set density; The position information of the tracked pixel in each video frame is determined based on the optical flow information; The position information of the tracked pixel in each video frame is concatenated to obtain the pixel trajectory of the tracked pixel; wherein the pixel trajectories of the tracked pixel constitute the initial pixel trajectory set.

3. The method according to claim 2, characterized in that, The step of determining the position information of the tracked pixel in each video frame based on the optical flow information includes: Obtain the first position information of the tracked pixel in the current video frame; Obtain the forward optical flow information and reverse optical flow information of the tracked pixels between the current video frame and the next video frame; Consistency detection is performed based on the first location information, the forward optical flow information, and the reverse optical flow information; Based on the consistency detection results, determine whether the tracked pixel is occluded in the next video frame; If the tracked pixel is occluded in the next video frame, the tracking of the tracked pixel ends.

4. The method according to claim 3, characterized in that, After ending the tracking of the tracked pixels, the process also includes: New tracked pixels are sampled from the newly added pixels according to the set density; The new tracked pixel is tracked to obtain the pixel trajectory of the new tracked pixel.

5. The method according to claim 3, characterized in that, Consistency detection is performed based on the first location information, the forward optical flow information, and the reverse optical flow information, including: The second position information of the tracked pixel in the next video frame is determined based on the first position information and the forward optical flow information; The third location information is determined based on the second location information and the reverse optical flow information; Determine the difference information between the first location information and the third location information; wherein, the difference information is a consistency detection result.

6. The method according to claim 5, characterized in that, Determining whether the tracked pixel is occluded in the next video frame based on the consistency detection result includes: If the difference information is less than or equal to a set threshold, then the tracked pixel is not occluded in the next video frame; If the difference information is greater than a set threshold, the tracked pixel will be occluded in the next video frame.

7. The method according to claim 2, characterized in that, Determining the position information of the tracked pixel in each video frame based on the optical flow information includes: Based on the fourth position information and the first forward optical flow information of the tracked pixel in the previous video frame, the fifth position information of the tracked pixel in the current video frame is determined; wherein, the first forward optical flow information is the forward optical flow information of the tracked pixel between the previous video frame and the current video frame; Based on the fifth position information and the second forward optical flow information, the sixth position information of the tracked pixel in the next video frame is determined; wherein, the second forward optical flow information is the forward optical flow information of the tracked pixel between the current video frame and the next video frame; Based on the fourth position information and the third forward optical flow information, the seventh position information of the tracked pixel in the next video frame is determined; wherein, the third forward optical flow information is the forward optical flow information of the tracked pixel between the previous video frame and the next video frame; Based on the fifth location information, the sixth location information, and the seventh location information, the target location information of the tracked pixel in the current video frame is determined.

8. The method according to claim 7, characterized in that, Based on the fifth location information, the sixth location information, and the seventh location information, the target location information of the tracked pixel in the current video frame is determined, including: Obtain the first candidate position information of the tracked pixel in the current video frame and the second candidate position information in the next video frame; Determine a first distance between the first candidate location information and the fifth location information, determine a second distance between the second candidate location information and the sixth location information, and determine a third distance between the second candidate location information and the seventh location information; The first distance, the second distance, and the third distance are summed to obtain the target information; If the target information is less than a set value, then the first candidate position information is determined as the target position information of the current video frame.

9. The method according to claim 1, characterized in that, Determining the label information of each pixel trajectory in the initial pixel trajectory set includes: The initial pixel trajectory set is input into a defined classification model to obtain the label information of each pixel trajectory in the initial pixel trajectory set; wherein, the defined classification model consists of a defined encoder and a defined perceptual decoder; Based on the label information, the initial pixel trajectory set is filtered to obtain the target pixel trajectory set, including: Delete the pixel trajectories with moving labels from the initial pixel trajectory set to obtain the target pixel trajectory set.

10. The method according to claim 1, characterized in that, Based on the target pixel trajectory set, determine the 3D reconstructed point information and the camera pose information of each video frame of the original video, including: The initial absolute camera pose information of the current video frame is determined based on the target pixel trajectory set; Triangulation is performed on the initial absolute camera pose information and the target pixel trajectory set of each video frame to obtain the initial three-dimensional reconstruction points; The initial absolute camera pose information and the initial 3D reconstruction points of each video frame are optimized using a set algorithm to obtain the target camera pose information and target 3D reconstruction point information of each video frame.

11. The method according to claim 10, characterized in that, The initial absolute camera pose information of the current video frame is determined based on the target pixel trajectory set, including: Determine the relative camera pose information between the current video frame and at least one other video frame based on the target pixel trajectory set; The initial absolute camera pose information of the current video frame is determined based on the at least one relative camera pose information.

12. A three-dimensional model construction device, characterized in that, include: A pixel tracking module is used to perform pixel tracking on the original video to obtain an initial set of pixel trajectories; wherein, the set of pixel trajectories consists of multiple pixel trajectories; The label information determination module is used to determine the label information of each pixel trajectory in the initial pixel trajectory set, wherein the label information includes motion and stillness, the stillness indicates that the object corresponding to the pixel trajectory is a static object, and the motion indicates that the object corresponding to the pixel trajectory is a dynamic object; The target pixel trajectory set acquisition module is used to filter the initial pixel trajectory set based on the label information to obtain the target pixel trajectory set; The camera pose information and 3D reconstruction point information determination module is used to determine the 3D reconstruction point information and the camera pose information of each video frame of the original video based on the target pixel trajectory set. The 3D model construction module is used to construct a 3D model based on the 3D reconstruction point information and the camera pose information of each video frame of the original video.

13. An electronic device, characterized in that, The electronic device includes: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the three-dimensional model construction method as described in any one of claims 1-11.

14. A storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform the three-dimensional model construction method as described in any one of claims 1-11.

Citation Information

Patent Citations

  • End-to-end unsupervised learning method based on bidirectional optical flow

    CN108320020A

  • Three-dimensional digital modeling method based on ball screen video stream

    CN108830925A