Pose determination method, apparatus, device, and storage medium
By utilizing dense reconstruction threads in the SLAM tracking system to process lost tracking data, pose determination is achieved when data is lost, solving the problem of SLAM tracking failure and improving system stability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GOERTEK INC
- Filing Date
- 2024-11-18
- Publication Date
- 2026-05-29
Smart Images

Figure CN122115499A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer vision technology, and in particular to pose determination methods, apparatus, devices and storage media. Background Technology
[0002] For most researchers, when using the Simultaneous Localization and Mapping (SLAM) algorithm for tracking, they usually only focus on accuracy. However, in practical applications, if data is lost unexpectedly, it will cause SLAM tracking to temporarily fail, which will force the entire SLAM tracking process to be interrupted. That is, it is impossible to avoid SLAM tracking failure caused by the unexpected loss of tracking data.
[0003] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention
[0004] The main objective of this application is to provide a pose determination method, apparatus, device, and storage medium, which aims to solve the technical problem that the prior art cannot avoid SLAM tracking failure caused by accidental loss of tracking data.
[0005] To achieve the above objectives, this application proposes a pose determination method, the method comprising:
[0006] When the target tracking system is detected to be activated, acquire the current tracking data;
[0007] When the loss of the current tracking data is detected, the target image of the previous frame before the loss is obtained by starting a dense reconstruction thread;
[0008] The target image is densely reconstructed using the initiated dense reconstruction thread;
[0009] The first dense reconstruction result is matched with the three-dimensional dense point cloud of the target global environment, and the first pose of the target device in the current environment is determined based on the first matching result.
[0010] In one embodiment, after the step of matching the first dense reconstruction result with the three-dimensional dense point cloud of the target global environment and determining the first pose of the target device in the current environment based on the matching result, the method further includes:
[0011] Upon detection of recovered tracking data, a dense reconstruction thread is initiated;
[0012] The first frame of the recovered image is obtained by starting a dense reconstruction thread;
[0013] The first frame image is densely reconstructed using the initiated dense reconstruction thread;
[0014] The continuous pose is determined based on the second dense reconstruction result and the first pose of the target device in the current environment.
[0015] In one embodiment, the step of determining the continuous pose based on the second dense reconstruction result and the first pose of the target device in the current environment includes:
[0016] The second dense reconstruction result is matched with the three-dimensional dense point cloud of the target global environment;
[0017] Determine the second pose of the target device in the current environment based on the second matching result;
[0018] Obtain tracking data loss time and tracking frequency;
[0019] Based on the tracking data loss time and the tracking frequency, the pose difference is calculated according to the first pose and the second pose to obtain a continuous pose.
[0020] In one embodiment, the step of determining the first pose of the target device in the current environment based on the first matching result includes:
[0021] Obtain each matching error based on the first matching result;
[0022] The matching errors are sorted according to a preset order;
[0023] Based on the current sorting result, obtain the minimum matching error and determine the inverse matrix of the transformation corresponding to the minimum matching error;
[0024] The first pose of the target device in the current environment is determined based on the inverse matrix.
[0025] In one embodiment, before the step of matching the first dense reconstruction result with the three-dimensional dense point cloud of the target global environment, the method further includes:
[0026] During the process of prompting the user to look around at the surrounding environment, the first multi-view image is obtained based on the dense reconstruction thread that has been opened;
[0027] The first multi-view image is reconstructed in three dimensions based on the target calibration relationship;
[0028] Extract the dense reconstruction results of two sets of images from different time periods from the current dense reconstruction result;
[0029] Three-dimensional matching is performed on the dense reconstruction results of the two sets of images before and after the time sequence to determine the common region;
[0030] Based on the common region, the current frame's 3D dense point cloud is stitched together with the previous frame's 3D dense point cloud;
[0031] The three-dimensional dense point cloud of the target's global environment is determined based on the stitched three-dimensional dense point cloud.
[0032] In one embodiment, the step of determining the three-dimensional dense point cloud of the target global environment based on the stitched three-dimensional dense point cloud includes:
[0033] Construct a global backend optimization function based on the stitched 3D dense point cloud;
[0034] The stitched 3D dense point cloud is subjected to global graph optimization processing based on the global backend optimization function.
[0035] The three-dimensional dense point cloud of the target global environment is determined based on the optimized three-dimensional dense point cloud.
[0036] In one embodiment, the step of determining the three-dimensional dense point cloud of the target global environment based on the optimized three-dimensional dense point cloud includes:
[0037] Real-time detection of the user's movement trajectory;
[0038] When the motion trajectory loops, the dense reconstruction thread is controlled to continue running for a preset time;
[0039] Second multiview images are obtained based on the running dense reconstruction thread;
[0040] Obtain a stitched 3D dense point cloud of the target based on the second multi-view image;
[0041] The target stitched 3D dense point cloud and the optimized 3D dense point cloud are corrected respectively;
[0042] The three-dimensional dense point cloud of the target global environment is obtained based on the correction results.
[0043] Furthermore, to achieve the above objectives, this application also proposes a pose determination device, the pose determination device comprising:
[0044] The detection module is used to acquire current tracking data when the target tracking system is detected to be activated;
[0045] The acquisition module is used to acquire the target image of the previous frame before the loss by starting a dense reconstruction thread when the loss of the current tracking data is detected.
[0046] A reconstruction module is used to perform dense reconstruction of the target image through the initiated dense reconstruction thread;
[0047] The determination module is used to match the first dense reconstruction result with the three-dimensional dense point cloud of the target global environment, and determine the first pose of the target device in the current environment based on the first matching result.
[0048] In addition, to achieve the above objectives, this application also proposes a pose determination device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the pose determination method as described above.
[0049] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the pose determination method described above.
[0050] One or more technical solutions proposed in this application have at least the following technical effects: When the target tracking system is detected to be started, current tracking data is acquired; when the loss of the current tracking data is detected, a dense reconstruction thread is started to acquire the target image of the frame before the loss; the dense reconstruction thread is started to perform dense reconstruction on the target image; the first dense reconstruction result is matched with the three-dimensional dense point cloud of the target's global environment, and the first pose of the target device in the current environment is determined based on the first matching result; Through the above method, when the loss of current tracking data is detected, the target image of the frame before the loss is fully utilized, that is, dense reconstruction is performed on the target image, and the first pose of the target device in the current environment is determined by matching it with the three-dimensional dense point cloud of the target's global environment, thereby avoiding SLAM tracking failure caused by accidental loss of tracking data and improving the stability of SLAM tracking. Attached Figure Description
[0051] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0052] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0053] Figure 1 This is a flowchart illustrating an embodiment of the pose determination method of this application.
[0054] Figure 2 This is a flowchart illustrating Embodiment 2 of the pose determination method of this application.
[0055] Figure 3 This is a schematic diagram of the module structure of the pose determination device according to an embodiment of this application;
[0056] Figure 4 This is a schematic diagram of the device structure of the hardware operating environment involved in the pose determination method in the embodiments of this application.
[0057] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0058] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device or pose determination device capable of performing the above functions. The following description uses a pose determination device as an example to illustrate this embodiment and the subsequent embodiments.
[0059] Based on this, embodiments of this application provide a pose determination method, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the pose determination method of this application.
[0060] In this embodiment, the pose determination method includes steps S10 to S40:
[0061] Step S10: When the target tracking system is detected to be started, acquire the current tracking data.
[0062] It should be noted that the current tracking data refers to the data collected by the target tracking system performing SLAM tracking. This current tracking data includes, but is not limited to, camera images and IMU data. The target tracking system can be a SLAM tracking system. The target tracking system can be activated after the user correctly wears the smart device.
[0063] Step S20: When it is detected that the current tracking data is lost, the target image of the previous frame before the loss is obtained by starting a dense reconstruction thread.
[0064] It should be understood that after acquiring the current tracking data, the system will detect in real time whether the current tracking data is lost. If so, if it is not handled in time, SLAM tracking failure will occur due to the accidental loss of tracking data. Based on this, this application will perform dense reconstruction of the target image and match it with the three-dimensional dense point cloud of the target's global environment to avoid the above situation. The first step is to start a dense reconstruction thread and obtain the target image of the previous frame that was lost through the started dense reconstruction thread. For example, if the target image of the i-th frame is lost, the target image of the (i-1)-th frame will be obtained. This target image can be a camera image.
[0065] Step S30: Perform dense reconstruction on the target image using the initiated dense reconstruction thread.
[0066] Understandably, after obtaining the target image, dense reconstruction is still performed through the started dense reconstruction thread. Dense reconstruction aims to restore the surface details of the entire scene. After dense reconstruction, a 3D dense point cloud is obtained.
[0067] Step S40: Match the first dense reconstruction result with the three-dimensional dense point cloud of the target global environment, and determine the first pose of the target device in the current environment based on the first matching result.
[0068] It should be understood that the first dense reconstruction result refers to the result of dense reconstruction when there is a loss of current tracking data. The target global environment can be the global indoor environment. After obtaining the first dense reconstruction result, the first dense reconstruction result is matched with the three-dimensional dense point cloud of the target global environment to determine the first pose of the target device in the current environment, which can be the indoor environment.
[0069] Further, the step of determining the first pose of the target device in the current environment based on the first matching result includes: obtaining each matching error based on the first matching result; sorting the matching errors in a preset order; obtaining the minimum matching error based on the current sorting result; determining the inverse matrix of the transformation corresponding to the minimum matching error; and determining the first pose of the target device in the current environment based on the inverse matrix.
[0070] It is understandable that the matching error refers to the error when matching the first dense reconstruction result with the 3D dense point cloud of the target global environment. The minimum matching error is found by traversing the current sorting results. At this time, the minimum matching error represents the result that the two point clouds can overlap as much as possible by a set of transformations. After determining the inverse matrix of the transformation corresponding to the minimum matching error, the first pose of the target device in the current environment is further determined.
[0071] Furthermore, before the step of matching the first dense reconstruction result with the three-dimensional dense point cloud of the target global environment, the method further includes: acquiring a first multi-view image based on an established dense reconstruction thread during the process of prompting the user to look around at the surrounding environment; performing three-dimensional dense reconstruction on the first multi-view image according to the target calibration relationship; extracting the dense reconstruction results of two sets of images before and after the current dense reconstruction result; performing three-dimensional matching on the dense reconstruction results of the two sets of images before and after the time sequence to determine a common region; stitching the three-dimensional dense point cloud of the current frame with the three-dimensional dense point cloud of the previous frame according to the common region; and determining the three-dimensional dense point cloud of the target global environment according to the stitched three-dimensional dense point cloud.
[0072] It should be understood that before matching the first dense reconstruction result with the 3D dense point cloud of the target global environment, it is necessary to first determine the 3D dense point cloud of the target global environment. At this time, the user is prompted to look around the surrounding environment, and a safe boundary range is suggested. During the process of prompting the user to look around the surrounding environment, a dense reconstruction thread is opened, and then the first multi-view image is obtained using the opened dense reconstruction thread. This first multi-view image can be a binocular camera image or a multi-view camera image. The target calibration relationship refers to the calibration relationship of the camera on the smart device. After obtaining the first multi-view image, 3D dense reconstruction is performed on the first multi-view image according to the target calibration relationship.
[0073] It should be noted that the common region refers to the region shared by the dense reconstruction results of two sets of images in time sequence. After determining the common region, the current frame's 3D dense point cloud is stitched with the previous frame's 3D dense point cloud using the common region to achieve accurate stitching.
[0074] Furthermore, the step of determining the three-dimensional dense point cloud of the target global environment based on the stitched three-dimensional dense point cloud includes: constructing a global backend optimization function based on the stitched three-dimensional dense point cloud; performing global graph optimization processing on the stitched three-dimensional dense point cloud based on the global backend optimization function; and determining the three-dimensional dense point cloud of the target global environment based on the optimized three-dimensional dense point cloud.
[0075] It is understandable that the global backend optimization function refers to the optimization function that performs global graph optimization processing on the point cloud. After constructing the global backend optimization function, the global backend optimization function is used to perform global graph optimization processing on the stitched 3D dense point cloud in order to obtain the 3D dense point cloud with the smallest error in the real-time environment.
[0076] Furthermore, the step of determining the 3D dense point cloud of the target global environment based on the optimized 3D dense point cloud includes: real-time detection of the user's motion trajectory; when the motion trajectory loops, controlling the dense reconstruction thread to continue running for a preset time; acquiring a second multi-view image based on the running dense reconstruction thread; acquiring the target stitched 3D dense point cloud based on the second multi-view image; correcting the target stitched 3D dense point cloud and the optimized 3D dense point cloud respectively; and obtaining the 3D dense point cloud of the target global environment based on the correction results.
[0077] It should be understood that while the user is wearing a smart device and looking around at the surrounding environment, the target tracking system will still control the user's movement status in real time and detect whether the user's movement trajectory has looped back through the loop closure detection thread. If so, the loop closure detection thread will notify the dense reconstruction thread of the movement trajectory loop closure status. For the dense reconstruction thread, after receiving the status, it will continue to run for a preset time and continue to receive the second multi-view image from the front end within the preset time, as well as perform 3D environment reconstruction and stitching to obtain the target stitched 3D dense point cloud. The purpose of setting the preset time is to complete the optimization and correction of the 3D dense point cloud.
[0078] Understandably, after completing the correction of the stitched 3D dense point cloud, the 3D dense reconstruction thread is closed. Therefore, when the loss of current tracking data is detected, it indicates that the dense reconstruction thread needs to be used. At this time, the dense reconstruction thread needs to be started, and then the 3D dense point cloud of the target's global environment is saved so as to match it with the first dense reconstruction result, thereby effectively improving the stability of SLAM tracking.
[0079] This embodiment acquires current tracking data when the target tracking system is activated; when the loss of the current tracking data is detected, a dense reconstruction thread is activated to acquire the target image of the previous frame before the loss; the dense reconstruction thread is activated to perform dense reconstruction on the target image; the first dense reconstruction result is matched with the three-dimensional dense point cloud of the target's global environment, and the first pose of the target device in the current environment is determined based on the first matching result; in this way, when the loss of current tracking data is detected, the target image of the previous frame before the loss is fully utilized, that is, the target image is densely reconstructed, and the first pose of the target device in the current environment is determined by matching it with the three-dimensional dense point cloud of the target's global environment, thereby avoiding SLAM tracking failure caused by accidental loss of tracking data and improving the stability of SLAM tracking.
[0080] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in the first embodiment described above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 2 After step S40, steps S501 to S504 are also included:
[0081] Step S501: When the recovery of tracking data is detected, the dense reconstruction thread is started.
[0082] It should be noted that when tracking data recovery is detected, it indicates that there may have been a tracking failure, such as a brief movement of the user. In this case, the target tracking system is reawakened and a dense reconstruction thread is started.
[0083] Step S502: Obtain the first frame image after recovery by starting the dense reconstruction thread.
[0084] It is understandable that the first frame image refers to the first frame image after the tracking data is recovered. After the dense reconstruction thread is started, the recovered first frame image is obtained through the started dense reconstruction thread.
[0085] Step S503: Perform dense reconstruction on the first frame image by starting a dense reconstruction thread.
[0086] Step S504: Determine the continuous pose based on the second dense reconstruction result and the first pose of the target device in the current environment.
[0087] It is understandable that continuous pose refers to the consecutive poses between the target device's first pose and second pose in the current environment. The second dense reconstruction result refers to the result of dense reconstruction performed during tracking data recovery. After obtaining the second dense reconstruction result, the continuous pose is determined by combining it with the target device's first pose in the current environment. In the event of an unexpected short-term tracking failure, when the target tracking system is reactivated, it can associate the pose at the time of reactivation with the previous continuous poses, achieving a continuous and stable tracking connection.
[0088] Further, step S504 includes: matching the second dense reconstruction result with the three-dimensional dense point cloud of the target global environment; determining the second pose of the target device in the current environment based on the second matching result; obtaining the tracking data loss time and tracking frequency; and obtaining a continuous pose by calculating the pose difference between the first pose and the second pose based on the tracking data loss time and the tracking frequency.
[0089] It should be understood that after obtaining the second dense reconstruction result, it is also necessary to match it with the three-dimensional dense point cloud of the target global environment. At this time, the inverse matrix of the transformation corresponding to the minimum matching error is determined in the same way as the first dense reconstruction result, and then the second pose of the target device in the current environment is determined.
[0090] It is understandable that tracking data loss time refers to the time during which tracking data is lost when the target tracking system is tracking, and tracking frequency refers to the frequency at which the target tracking system tracks. Then, based on tracking data loss time and tracking frequency, the continuous pose between the first pose and the second pose is obtained through pose difference, so as to realize continuous and stable tracking and complete continuous and stable SLAM tracking.
[0091] This embodiment starts a dense reconstruction thread when tracking data recovery is detected; acquires the recovered first frame image through the started dense reconstruction thread; performs dense reconstruction on the first frame image through the started dense reconstruction thread; determines the continuous pose based on the second dense reconstruction result and the first pose of the target device in the current environment; in this way, when tracking data recovery is detected, it indicates that the target tracking system has experienced an unexpected short-term tracking failure. At this time, the recovered first frame image is acquired, and then the scene details are recovered through dense reconstruction of the first frame image. The second pose is determined through matching of the 3D dense point cloud, and then the continuous pose is determined by combining the first pose. This can effectively improve the accuracy of determining the continuous pose and achieve continuous and stable tracking connection.
[0092] This application also provides a pose determination device, please refer to... Figure 3 The pose determination device includes:
[0093] The detection module 10 is used to acquire current tracking data when the target tracking system is detected to be started.
[0094] The acquisition module 20 is used to acquire the target image of the previous frame before the loss by starting a dense reconstruction thread when the loss of the current tracking data is detected.
[0095] The reconstruction module 30 is used to perform dense reconstruction on the target image through the initiated dense reconstruction thread.
[0096] The determination module 40 is used to match the first dense reconstruction result with the three-dimensional dense point cloud of the target global environment, and determine the first pose of the target device in the current environment based on the first matching result.
[0097] This embodiment acquires current tracking data when the target tracking system is activated; when the loss of the current tracking data is detected, a dense reconstruction thread is activated to acquire the target image of the previous frame before the loss; the dense reconstruction thread is activated to perform dense reconstruction on the target image; the first dense reconstruction result is matched with the three-dimensional dense point cloud of the target's global environment, and the first pose of the target device in the current environment is determined based on the first matching result; in this way, when the loss of current tracking data is detected, the target image of the previous frame before the loss is fully utilized, that is, the target image is densely reconstructed, and the first pose of the target device in the current environment is determined by matching it with the three-dimensional dense point cloud of the target's global environment, thereby avoiding SLAM tracking failure caused by accidental loss of tracking data and improving the stability of SLAM tracking.
[0098] The pose determination device provided in this application, employing the pose determination method in the above embodiments, can solve the technical problem that the prior art cannot avoid SLAM tracking failure caused by accidental loss of tracking data. Compared with the prior art, the beneficial effects of the pose determination device provided in this application are the same as those of the pose determination method provided in the above embodiments, and other technical features in the pose determination device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.
[0099] In one embodiment, the determining module 40 is further configured to: acquire a first multi-view image based on an established dense reconstruction thread during the process of prompting the user to look around at the surrounding environment; perform three-dimensional dense reconstruction on the first multi-view image according to the target calibration relationship; extract the dense reconstruction results of two sets of images before and after the current dense reconstruction result; perform three-dimensional matching on the dense reconstruction results of the two sets of images before and after the time sequence to determine a common region; stitch the current frame's three-dimensional dense point cloud with the previous frame's three-dimensional dense point cloud according to the common region; and determine the three-dimensional dense point cloud of the target's global environment based on the stitched three-dimensional dense point cloud.
[0100] In one embodiment, the determining module 40 is further configured to construct a global backend optimization function based on the stitched 3D dense point cloud; perform global graph optimization processing on the stitched 3D dense point cloud based on the global backend optimization function; and determine the 3D dense point cloud of the target global environment based on the optimized 3D dense point cloud.
[0101] In one embodiment, the determining module 40 is further configured to detect the user's motion trajectory in real time; when the motion trajectory loops, control the dense reconstruction thread to continue running for a preset duration; acquire a second multi-view image based on the running dense reconstruction thread; acquire a target stitched 3D dense point cloud based on the second multi-view image; correct the target stitched 3D dense point cloud and the optimized 3D dense point cloud respectively; and obtain a 3D dense point cloud of the target global environment based on the correction results.
[0102] In one embodiment, the determining module 40 is further configured to obtain each matching error based on the first matching result; sort the matching errors according to a preset order; obtain the minimum matching error based on the current sorting result; determine the inverse matrix of the transformation corresponding to the minimum matching error; and determine the first pose of the target device in the current environment based on the inverse matrix.
[0103] In one embodiment, the determining module 40 is further configured to: initiate a dense reconstruction thread when tracking data recovery is detected; acquire the recovered first frame image through the initiated dense reconstruction thread; perform dense reconstruction on the first frame image through the initiated dense reconstruction thread; and determine continuous poses based on the second dense reconstruction result and the first pose of the target device in the current environment.
[0104] In one embodiment, the determining module 40 is further configured to match the second dense reconstruction result with the three-dimensional dense point cloud of the target global environment; determine the second pose of the target device in the current environment based on the second matching result; obtain the tracking data loss time and tracking frequency; and obtain a continuous pose by calculating the pose difference between the first pose and the second pose based on the tracking data loss time and the tracking frequency.
[0105] This application provides a pose determination device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the pose determination method in the first embodiment described above.
[0106] The following is for reference. Figure 4 The diagram illustrates a structural schematic suitable for implementing the pose determination device in the embodiments of this application. The pose determination device in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 4 The pose determination device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0107] like Figure 4As shown, the pose determination device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the pose determination device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touchscreen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1003 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. Communication device 1009 allows the pose determination device to communicate wirelessly or wiredly with other devices to exchange data. While pose determination devices with various systems are shown in the figures, it should be understood that implementation or possession of all the systems shown is not required. More or fewer systems may be implemented alternatively.
[0108] Specifically, according to the embodiments disclosed in this application, the process described above with reference to the flowcharts can be implemented as a computer software program. This computer program includes 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 a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0109] The pose determination device provided in this application, employing the pose determination method in the above embodiments, can solve the technical problem that the prior art cannot avoid SLAM tracking failure caused by accidental loss of tracking data. Compared with the prior art, the beneficial effects of the pose determination device provided in this application are the same as those of the pose determination method provided in the above embodiments, and other technical features in this pose determination device are the same as those disclosed in the method of the previous embodiment, and will not be repeated here.
[0110] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0111] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0112] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the pose determination method in the above embodiments.
[0113] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having 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 thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0114] The aforementioned computer-readable storage medium may be included in the pose determination device; or it may exist independently and not assembled into the pose determination device.
[0115] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and 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).
[0116] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems and methods according to various embodiments of this application. 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 the 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.
[0117] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0118] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described pose determination method. This solves the technical problem that existing technologies cannot avoid SLAM tracking failures caused by accidental loss of tracking data. Compared with existing technologies, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the pose determination method provided in the above embodiments, and will not be elaborated upon here.
[0119] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.
Claims
1. A pose determination method, characterized in that, The method includes: When the target tracking system is detected to be activated, acquire the current tracking data; When the loss of the current tracking data is detected, the target image of the previous frame before the loss is obtained by starting a dense reconstruction thread; The target image is densely reconstructed using the initiated dense reconstruction thread; The first dense reconstruction result is matched with the three-dimensional dense point cloud of the target global environment, and the first pose of the target device in the current environment is determined based on the first matching result.
2. The method as described in claim 1, characterized in that, After the step of matching the first dense reconstruction result with the three-dimensional dense point cloud of the target global environment and determining the first pose of the target device in the current environment based on the matching result, the method further includes: Upon detection of recovered tracking data, a dense reconstruction thread is initiated; The first frame of the recovered image is obtained by starting a dense reconstruction thread; The first frame image is densely reconstructed using the initiated dense reconstruction thread; The continuous pose is determined based on the second dense reconstruction result and the first pose of the target device in the current environment.
3. The method as described in claim 2, characterized in that, The step of determining the continuous pose based on the second dense reconstruction result and the first pose of the target device in the current environment includes: The second dense reconstruction result is matched with the three-dimensional dense point cloud of the target global environment; Determine the second pose of the target device in the current environment based on the second matching result; Obtain tracking data loss time and tracking frequency; Based on the tracking data loss time and the tracking frequency, the pose difference is calculated according to the first pose and the second pose to obtain a continuous pose.
4. The method as described in claim 1, characterized in that, The step of determining the first pose of the target device in the current environment based on the first matching result includes: Obtain each matching error based on the first matching result; The matching errors are sorted according to a preset order; Based on the current sorting result, obtain the minimum matching error and determine the inverse matrix of the transformation corresponding to the minimum matching error; The first pose of the target device in the current environment is determined based on the inverse matrix.
5. The method as described in claim 1, characterized in that, Before the step of matching the first dense reconstruction result with the three-dimensional dense point cloud of the target global environment, the method further includes: During the process of prompting the user to look around at the surrounding environment, the first multi-view image is obtained based on the dense reconstruction thread that has been opened; The first multi-view image is reconstructed in three dimensions based on the target calibration relationship; Extract the dense reconstruction results of two sets of images from different time periods from the current dense reconstruction result; Three-dimensional matching is performed on the dense reconstruction results of the two sets of images before and after the time sequence to determine the common region; Based on the common region, the current frame's 3D dense point cloud is stitched together with the previous frame's 3D dense point cloud; The three-dimensional dense point cloud of the target's global environment is determined based on the stitched three-dimensional dense point cloud.
6. The method as described in claim 5, characterized in that, The step of determining the 3D dense point cloud of the target global environment based on the stitched 3D dense point cloud includes: Construct a global backend optimization function based on the stitched 3D dense point cloud; The stitched 3D dense point cloud is subjected to global graph optimization processing based on the global backend optimization function. The three-dimensional dense point cloud of the target global environment is determined based on the optimized three-dimensional dense point cloud.
7. The method as described in claim 6, characterized in that, The step of determining the 3D dense point cloud of the target global environment based on the optimized 3D dense point cloud includes: Real-time detection of the user's movement trajectory; When the motion trajectory loops, the dense reconstruction thread is controlled to continue running for a preset time; Second multiview images are obtained based on the running dense reconstruction thread; Obtain a stitched 3D dense point cloud of the target based on the second multi-view image; The target stitched 3D dense point cloud and the optimized 3D dense point cloud are corrected respectively; The three-dimensional dense point cloud of the target global environment is obtained based on the correction results.
8. A pose determination device, characterized in that, The device includes: The detection module is used to acquire current tracking data when the target tracking system is detected to be activated; The acquisition module is used to acquire the target image of the previous frame before the loss by starting a dense reconstruction thread when the loss of the current tracking data is detected. A reconstruction module is used to perform dense reconstruction of the target image through the initiated dense reconstruction thread; The determination module is used to match the first dense reconstruction result with the three-dimensional dense point cloud of the target global environment, and determine the first pose of the target device in the current environment based on the first matching result.
9. A pose determination device, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the pose determination method as described in any one of claims 1 to 7.
10. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the pose determination method as described in any one of claims 1 to 7.