Method and device for relocating target object, storage medium, and electronic device

By calculating and updating position and orientation matrices, the method enhances AR positioning accuracy by stabilizing the virtual environment, addressing the issue of low accuracy in current AR development kits.

JP2024538401AInactive Publication Date: 2024-10-18ZTE CORP
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
JP2024529558
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2021-11-22
Filing Date
2022-11-17
Publication Date
2024-10-18
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Current AR development kits suffer from low positioning accuracy of target objects in virtual space due to fluctuations caused by environmental textures, leading to instability and potential drifting of the virtual environment.

Method used

A method and apparatus for repositioning a target object in virtual space by calculating a second camera position and orientation matrix based on a first camera position and orientation matrix, along with a first image, to determine a first target position and orientation matrix, and updating the position and orientation information of the target object in virtual space.

Benefits of technology

Improves the positioning accuracy of target objects in virtual space by unifying the relative relationships between camera and content in point cloud and virtual spaces, reducing errors and enhancing the stability of the AR experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024538401000001_ABST
    Figure 2024538401000001_ABST
Patent Text Reader

Abstract

The present disclosure relates to a method and device for re-positioning a target object, a storage medium, and an electronic device, which includes the steps of: acquiring a first camera position and orientation matrix and a first image, calculating a second camera position and orientation matrix based on the first camera position and orientation matrix and the first image, determining a first target position and orientation matrix based on the second camera position and orientation matrix, and updating second position and orientation information of the target object in the virtual space based on the first target position and orientation matrix, where the second position and orientation information is position and orientation information of the target object in the virtual space obtained at the time of the previous positioning.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] (CROSS REFERENCE TO RELATED APPLICATIONS) This disclosure claims priority based on a Chinese patent application filed with the China Patent Office on November 22, 2021, bearing application number 202111387413.6 and entitled "Method and apparatus for re-positioning target object, storage medium and electronic device," the entire contents of which are incorporated herein by reference.

[0002] The present disclosure relates to the field of communications, and in particular to a method and device for re-locating an object, a storage medium, and an electronic device. [Background technology]

[0003] Augmented reality technology is a technology that uses the computing power of hardware devices to calculate its own position and orientation transformation in real time based on images captured by a mobile terminal, understands the real environment, and renders text, images, models, and videos in appropriate positions. Based on this technology, the virtual space is merged with the target objects in the real environment to enrich the virtual space, add more information to the virtual space, and achieve the purpose of enhancing the visual effect experience and the three-dimensional feeling of virtual reality interaction.

[0004] In recent years, with the rapid development of AR technology, manufacturers around the world have gradually launched AR development kits (Software Development Kits, SDKs). These AR development kits can effectively shorten the development time of AR applications, and can support other AR functions such as plane detection, object positioning, object recognition, image recognition, and face recognition, with the anchor function as the core basic function of AR applications.

[0005] However, the anchor function of current AR development kits can only guarantee anchoring of the position of a target object in the virtual space acquired by the current mobile terminal, and a similar target object may not be located at the same position in virtual space for other users. In addition, the constructed virtual environment is affected by the environmental texture of the real environment, which can cause large fluctuations in the stability of object positioning by the AR development kit, causing the target object's position in the virtual space to drift, which can degrade the AR experience.

[0006] So far, no effective solution has been proposed to the problem of low accuracy in measuring the position of a target object in a virtual space using AR technology. Summary of the Invention [Problem to be solved by the invention]

[0007] SUMMARY OF THE DISCLOSURE In order to solve the problem of low positioning accuracy of at least a target object in a virtual space, an embodiment of the present disclosure provides a method and apparatus for re-locating a target object, a storage medium, and an electronic device. [Means for solving the problem]

[0008] According to one aspect of an embodiment of the present disclosure, when re-positioning a target object in a virtual space, a step of acquiring a first camera position and orientation matrix and a first image, the first camera position and orientation matrix being for indicating position and orientation information in the virtual space of a camera of a mobile terminal at the time of performing a previous positioning of the target object in the virtual space, the first image being an image captured in a real space by the camera after performing the previous positioning, and the target object being located in the real space, and a step of calculating a second camera position and orientation matrix based on the first camera position and orientation matrix and the first image, the second camera position and orientation matrix being The present invention provides a method for re-positioning a target object, comprising: a step of determining a first target position and orientation matrix based on the second camera position and orientation matrix, the first target position and orientation matrix being for indicating corresponding position and orientation information of the camera in the point cloud space at the time when the camera captured the first image; a step of determining a first target position and orientation matrix based on the second camera position and orientation matrix, the first target position and orientation matrix being for indicating first position and orientation information of the target object in the point cloud space; and a step of updating second position and orientation information of the target object in the virtual space based on the first target position and orientation matrix, the second position and orientation information being position and orientation information of the target object in the virtual space obtained at the time of the previous positioning.

[0009] According to another aspect of the embodiment of the present disclosure, there is provided a transmission module for acquiring a first camera position and orientation matrix and a first image when re-positioning a target object in a virtual space, the first camera position and orientation matrix being for indicating position and orientation information in the virtual space of a camera of a mobile terminal at the time of performing a previous positioning of the target object in the virtual space, the first image being an image captured in a real space by the camera after performing the previous positioning, and the target object being located in the real space; and an acquisition module configured to calculate a second camera position and orientation matrix based on the first camera position and orientation matrix and the first image, the second camera position and orientation matrix being for indicating position and orientation information in the virtual space of a camera of a mobile terminal at the time of performing a previous positioning of the target object in the virtual space, the first image being an image captured in a real space by the camera after performing the previous positioning, and the target object being located in the real space. the second camera position and orientation matrix, the first target position and orientation matrix being for indicating corresponding position and orientation information in the point cloud space of the camera at the time when a first image was captured; a determination module configured to determine a first target position and orientation matrix based on the second camera position and orientation matrix, the first target position and orientation matrix being for indicating first position and orientation information of the target object in the point cloud space; and an update module configured to update second position and orientation information of the target object in the virtual space based on the first target position and orientation matrix, the second position and orientation information being position and orientation information of the target object in the virtual space obtained at the time of the previous positioning.

[0010] According to another aspect of an embodiment of the present disclosure, there is further provided a computer-readable storage medium having a computer program stored thereon, the computer program being configured to implement the above-described method for re-positioning an object when executed.

[0011] According to another aspect of an embodiment of the present disclosure, there is further provided an electronic device including a memory, a processor, and a computer program stored in the memory and executable by the processor, the processor further realizing the above-mentioned method for re-positioning a target object by means of the computer program. Effect of the Invention

[0012] According to the present disclosure, when re-positioning a target object in a virtual space, a second camera position and orientation matrix is ​​obtained based on the acquired first camera position and orientation matrix and a first image, a first target position and orientation matrix is ​​determined based on the second camera position and orientation matrix, and second position and orientation information of the target object in the virtual space is updated based on the first target position and orientation matrix, thereby solving the technical problem of low positioning accuracy of the target object in virtual space in related technologies and improving positioning accuracy. [Brief description of the drawings]

[0013] The drawings described herein are intended to provide a further understanding of the present disclosure and constitute a part of the present disclosure. The illustrative embodiments of the present disclosure and the description thereof are merely for the purpose of interpreting the present disclosure and are not intended to unduly limit the present disclosure. [Figure 1] FIG. 11 is a block diagram showing a configuration of a computer terminal for a target object re-positioning method according to an embodiment of the present disclosure. [Diagram 2] FIG. 2 is a schematic diagram of a process of re-locating a target object according to an embodiment of the present disclosure. [Diagram 3] FIG. 2 is a schematic diagram of a camera in a point cloud space according to an embodiment of the present disclosure. [Figure 4] FIG. 13 is a schematic diagram of re-positioning a target object in a virtual space according to an embodiment of the present disclosure. [Diagram 5] 2 is a flowchart of a method for re-locating a target object according to one embodiment of the present disclosure. [Figure 6] 13 is a flowchart of a method for re-locating a target object according to another embodiment of the present disclosure. [Figure 7] 1 is a block diagram showing a structure of a target object re-positioning device according to an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0014] In order to make those skilled in the art better understand the technical solution of the present disclosure, the technical solutions in the embodiments of the present disclosure will be described clearly and completely below with reference to the drawings in the embodiments of the present disclosure, but it goes without saying that the embodiments described below are only a part of the present disclosure, not all of the embodiments. All other embodiments that those skilled in the art can obtain based on the embodiments of the present disclosure without exerting inventive labor are also included in the scope of protection of the present disclosure.

[0015] In addition, terms such as "first" and "second" in the specification, claims and above drawings of the present disclosure are intended to distinguish between similar objects and are not intended to describe a specific order or chronological order.

[0016] It should be understood that the data used in this manner may be interchanged as appropriate to enable the embodiments of the disclosure described herein to be performed in orders other than those illustrated or described herein. Additionally, terms such as "comprises" and "having" and any variations thereof are intended to cover a non-exclusive inclusion, such that, for example, a process, method, system, product, or apparatus comprising a series of steps or units, may include not only those steps or units expressly listed, but also other steps or units not expressly listed or inherent to such process, method, product, or apparatus.

[0017] The method embodiments provided by the embodiments of the present disclosure may be implemented in a computer terminal or a similar computing device. For example, FIG. 1 is a block diagram showing the configuration of a computer terminal of the method for re-locating a target object according to the embodiments of the present disclosure.

[0018] As shown in FIG. 1, the computer terminal may include one or more (only one is shown in FIG. 1) processors 102 (processor 102 may include, but is not limited to, a microprocessor (abbreviated as Microprocessor Unit, MPU) or a programmable logic device (abbreviated as Programmable Logic Device, PLD) and a memory 104 for storing data, but in one exemplary embodiment, the computer terminal may further include a transmission device 106 and an input / output device 108 used for communication functions.

[0019] As will be appreciated by those skilled in the art, the structure shown in Figure 1 is merely exemplary and is not intended to limit the structure of the computer terminal. For example, the computer terminal may include more or fewer components than those shown in Figure 1, or may have a different configuration with equivalent or more functions than those shown in Figure 1.

[0020] The memory 104 is used to store computer programs, for example software programs and modules of application software, such as a computer program corresponding to the target object re-positioning method in the embodiment of the present disclosure, and the processor 102 executes various functional applications and data processing, i.e., realizes the above-mentioned method, by executing the computer programs stored in the memory 104. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, for example one or more magnetic storage devices, flash memories or other non-volatile solid-state memories.

[0021] In some implementations, the memory 104 may further include memory located remotely to the processor 102, and these remote memories may be connected to a computer terminal via a network, examples of which include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0022] The transmission device 106 is used to transmit and receive data through a network. An example of the network may include a wireless network provided by a communication supplier of the computer terminal. In one example, the transmission device 106 includes a network adapter (abbreviated as Network Interface Controller, NIC) that is connected to other network devices through a base station and can communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (abbreviated as RF) module for wirelessly communicating with the Internet.

[0023] 2 is a schematic diagram of a process of re-locating a target object according to an embodiment of the present disclosure. As shown in FIG. 2, the specific steps of the process of re-locating a target object shown in FIG. 2 are as follows:

[0024] In step 1, when the mobile client (corresponding to the mobile terminal mentioned above) requests re-positioning, the current real-time screen captured by the camera and the previous current camera position and orientation matrix in the virtual space are uploaded to the cloud recognition library.

[0025] The current camera position and orientation matrix in the virtual space can be understood as the camera position and orientation matrix in the virtual space at the time of the previous positioning (corresponding to the above-mentioned first camera position and orientation matrix).

[0026] In step 2, the target object is recognized in the cloud, and a position and orientation matrix in the camera's point cloud space (i.e., the second camera position and orientation matrix) is calculated by referring to a database in the cloud (i.e., the cloud recognition library in Figure 2, which corresponds to the database that stores the image data of the first image).

[0027] It should be noted that a first target position and orientation matrix, which is a position and orientation matrix in the point cloud space of the target object, can be determined based on the second camera position and orientation matrix.

[0028] In step 3, after completing the recognition process for the target object and the calculation process for the second camera position and orientation matrix, the position and orientation matrix of the camera in the point cloud space (corresponding to the second camera position and orientation matrix) and the position and orientation matrix of the camera in the virtual space (corresponding to the first camera position and orientation matrix) calculated by the cloud are returned to the mobile client.

[0029] In step 4, the mobile client calculates a position and orientation matrix of the target object in the virtual space (corresponding to the above-mentioned second target position and orientation matrix) based on the returned first camera position and orientation matrix and updates the position and orientation information of the target object in the virtual space based on the second target position and orientation matrix.

[0030] In one embodiment, the calculation process of the second target position and orientation matrix in step 4 can be described with reference to the embodiment in Figures 3 to 4. As shown in Figure 3, a schematic diagram of the positions of the camera and the target object in the point cloud space is provided, and in Figure 3, a two-dimensional coordinate system of the camera and the target object is established with the position of the target object as the origin, in which the coordinates of the target object are (0,0) and the coordinates of the camera are (2,2).

[0031] FIG. 4 provides a schematic diagram of updating the position of the target object in the virtual space. As shown in FIG. 4, by referring to the positions of the camera and the target object in the point cloud space in FIG. 3, the positions of the camera and the target object in the virtual space at the time of the previous positioning are updated to the positions of the camera and the target object at the time of re-positioning, in which the position of the camera does not change, the camera coordinates are (3,1), and the coordinates of the target object are updated from (0,0) to (1,-1).

[0032] In one embodiment, the process of updating the position and orientation information of the target object in the virtual space based on the second target position and orientation matrix can be described with reference to the following code. That is, first, the position and orientation matrix of the camera in the point cloud space at the time of repositioning is calculated based on the real-time image and the position and orientation matrix of the camera in the virtual space at the time of previous positioning, the position and orientation matrix of the target object in the point cloud space at the time of repositioning is obtained based on the position and orientation matrix of the camera in the point cloud space at the time of repositioning, and then, a spatial operation is performed based on the position and orientation matrix of the target object in the point cloud space at the time of repositioning and the matrix of the camera in the virtual space at the time of previous positioning, to obtain the position and orientation information of the target object in the virtual space at the time of repositioning, and to complete the repositioning of the target object in the virtual space. The code for understanding the process of updating the position and orientation information of the target object in the virtual space based on the second target position and orientation matrix is ​​as follows.

[0033] TIFF2024538401000002.tif191170

[0034] FIG. 5 is a flowchart of a method for re-locating a target object according to an embodiment of the present disclosure. As shown in FIG. 5, the re-locating method includes the following steps:

[0035] In step S502, when re-positioning the target object in the virtual space, a first camera position and orientation matrix and a first image are obtained, of which the first camera position and orientation matrix is ​​for indicating position and orientation information in the virtual space of the camera of the mobile terminal when the target object was last positioned in the virtual space, the first image is an image captured in the real space by the camera after the last positioning was performed, and the target object is located in the real space.

[0036] The mobile terminal can be understood as a mobile terminal device including, but not limited to, a mobile phone, a tablet, a wearable device, a smart watch, etc. The mobile terminal may be configured to operate passively or actively. When the mobile terminal operates passively, the target of use of the mobile terminal may include a person or a robot. The mobile terminal is provided with a camera for taking pictures.

[0037] The above camera position and orientation information can be understood as a collective term for the camera position and camera orientation, and describes the transformation relationship between a first coordinate system in a first space and a second coordinate system in a second space. In particular, when a first coordinate in the camera's first coordinate system is known, the camera's position and orientation matrix and the camera's first coordinate can be transformed by a transformation matrix.

[0038] In step S504, a second camera position and orientation matrix is ​​calculated based on the first camera position and orientation matrix and the first image, in which the second camera position and orientation matrix indicates corresponding position and orientation information of the camera in the point cloud space at the time when the camera captured the first image.

[0039] In step S506, a first target position and orientation matrix is ​​determined based on the second camera position and orientation matrix, in which the first target position and orientation matrix is ​​for indicating first position and orientation information of the target object in the point cloud space.

[0040] In step S508, second position and orientation information of the target object in the virtual space is updated based on the first target position and orientation matrix, and the second position and orientation information is the position and orientation information of the target object in the virtual space obtained during the previous positioning.

[0041] The present disclosure relates to a method for re-positioning a target object in a virtual space, comprising: acquiring a first camera position and orientation matrix and a first image, the first camera position and orientation matrix being for indicating position and orientation information in the virtual space of a camera in a mobile terminal when a previous positioning was performed on the target object in the virtual space; the first image being an image captured in a real space by the camera after the previous positioning was performed; the target object being located in the real space; and calculating a second camera position and orientation matrix based on the first camera position and orientation matrix and the first image, the second camera position and orientation matrix being a matrix representing the point of view of the camera when the camera captured the first image. The first target position and orientation matrix is ​​for indicating corresponding position and orientation information in the point cloud space, and a first target position and orientation matrix is ​​determined based on the second camera position and orientation matrix, wherein the first target position and orientation matrix is ​​for indicating first position and orientation information of the target object in the point cloud space, and second position and orientation information of the target object in the virtual space is updated based on the first target position and orientation matrix, wherein the second position and orientation information is the position and orientation information of the target object in the virtual space obtained at the time of the previous positioning, thereby solving the technical problem that the AR technology has low positioning accuracy of the target object in the virtual space and improving the positioning accuracy of the target object in the virtual space.

[0042] It should be noted that the repositioning process is essentially the unification of the relative relationship between the camera and the content in two three-dimensional spaces. Therefore, in this embodiment, first, there are two three-dimensional spaces, a point cloud space and a virtual space, among which the point cloud space can be understood as a three-dimensional space constructed using point cloud technology, and the position and orientation information of the camera and the content can be accurately obtained by referring to the recognition algorithm in the point cloud space. The virtual space can be understood as a three-dimensional space constructed based on the spatial coordinate axis. Since the position of the target object in the virtual space may be easily shifted, it is necessary to reposition the target object in the virtual space.

[0043] Note that since the explanation of the position and orientation information of the camera can be referred to for the explanation of the position and orientation information of the target object, the explanation thereof will be omitted in this disclosure.

[0044] In one embodiment, the first coordinate of the point P is P w Then, the first coordinate P w can be transformed into second coordinates in the coordinate system of the second space of the point P, and the second coordinates P c is expressed as follows: TIFF2024538401000003.tif7170

[0045] Alternatively, the point P can be transformed from the second coordinate system to the first coordinate system. TIFF2024538401000004.tif7170

[0046] Among them, T cw is the transformation matrix that transforms the point P from the first coordinate system to the second coordinate system, and T wc is the transformation matrix that transforms the point P from the second coordinate system to the first coordinate system.

[0047] Based on the above embodiment, when the first space represents a point cloud space and the second space represents a virtual space, a transformation process of an object between the point cloud space and the virtual space can be realized.

[0048] In one exemplary embodiment, in order to better understand how to update the second position and orientation information of the target object in the virtual space based on the first target position and orientation matrix in the above step S508, a technical solution is provided, which specifically includes a step of updating the second position and orientation information of the target object in the virtual space to a third position and orientation information based on the first target position and orientation matrix, determining a second target position and orientation matrix based on the first camera position and orientation matrix and the first target camera position and orientation matrix, wherein the second target position and orientation matrix is ​​for indicating the third position and orientation information of the target object in the virtual space after the previous positioning, and updating the second position and orientation information to the third position and orientation information if an error value between the second position and orientation information and the third position and orientation information is greater than a first predetermined value.

[0049] According to the technical solution of this embodiment, when the position and orientation information of the target object in the virtual space changes, the position and orientation information of the target object in the virtual space can be updated to update the positioning position of the target object, thereby further improving the positioning accuracy of the target object.

[0050] It should be noted that the types of error values ​​may include, but are not limited to, angular error values ​​and position error values ​​in this disclosure.

[0051] It should be noted that the first predetermined value can be set depending on the type of error value, and may be set manually or determined by historical data.

[0052] In one embodiment, the first predetermined value range for the angular error value may be [0,1] degrees, and the first predetermined value for the position error value may be expressed in coordinate values, with the first predetermined value range, i.e., the coordinate offset range, being [-1,1].

[0053] In one exemplary embodiment, a technical solution is further provided, which specifically includes a step of compensating the third position and orientation information using the error value, or a step of obtaining a compensation parameter corresponding to the error value and compensating the third position and orientation information using a divided value of the error value and the compensation parameter. According to the technical solution of this embodiment, it is possible to reduce an error in the updated position and orientation information of the target object in the virtual space, and improve the reliability of the position and orientation information of the target object in the virtual space.

[0054] The compensation parameter can be understood as the number of compensation times for an error value, and may be preset based on the error value and have a positive correlation with the error value. For example, the larger the error value, the larger the compensation parameter corresponding to the error value.

[0055] In one exemplary embodiment, the error value can be used to compensate the third position and orientation information through a number of technical solutions, and this embodiment provides a technical solution of determining a coordinate compensation value corresponding to the error value, and adjusting the spatial coordinates in the third position and orientation information using the coordinate compensation value. The technical solution of this embodiment can reduce the error of the spatial coordinates in the virtual space of the target object after updating, improve the reliability of the position and orientation information of the target object in the virtual space, and improve the accuracy of the positioning of the target object in the virtual space.

[0056] In one exemplary embodiment, a technical solution is further provided for compensating the third position and orientation information using the error value, specifically including: determining an angle compensation value corresponding to the error value, where the angle compensation value is for indicating an angle difference between a spatial angle of the camera at the previous positioning and a spatial angle after the previous positioning; and adjusting a spatial angle in the third position and orientation information using the angle compensation value. According to the technical solution of this embodiment, it is possible to reduce the error of the spatial angle of the target object in the virtual space after updating, improve the reliability of the position and orientation information of the target object in the virtual space, and improve the accuracy of the positioning of the target object in the virtual space.

[0057] In one embodiment, when the type of the error value is an angle error value, the angle error value is 0.5 degrees and the corresponding compensation number is 5; when the angle error value is 1 degree, the corresponding compensation number is 10.

[0058] In one embodiment, the process of compensating the third position and orientation information using the divided value of the error value and the compensation parameter can be understood as a process of using an angle error value and a compensation parameter corresponding to the angle error value. If the angle error value is 0.5 degrees and the number of compensation times corresponding to the angle error value is 5, the third position and orientation information can be compensated using 0.1 degrees, which is a value obtained by dividing 0.5 degrees by 5. In some cases, the third position and orientation information can be compensated five times, and the compensation value for each compensation can be 0.1 degrees.

[0059] In addition, since the coordinate compensation value and the angle compensation value are positively correlated with the error value, the process of adjusting the third position and orientation information using the coordinate compensation value and the angle compensation value is similar to the process of using the angle error value and the compensation parameter corresponding to the angle error value. In another embodiment, the process of adjusting the third position and orientation information using the coordinate compensation value and the angle compensation value can be obtained by referring to the process of using the angle error value and the compensation parameter corresponding to the angle error value.

[0060] In one exemplary embodiment, a technical solution is further provided, which specifically includes a step of triggering re-positioning of the target object in the virtual space when a preset condition is met, in which the preset condition includes at least one of: a change in image data of an image in the real space captured by the camera; a change in the position of the mobile terminal in the virtual space; a re-positioning request is received in the mobile terminal to request re-positioning of the target object in the virtual space; a time length after completing the previous positioning of the target object in the virtual space is equal to or greater than a first predetermined time; and a time length after completing the previous positioning of the target object in the point cloud space is equal to or greater than a second predetermined time.

[0061] According to the technical solution of this embodiment, a trigger condition for re-location is provided, so as to enrich the application scenarios of re-location and expand the application scope of the technical solution for re-location.

[0062] It should be noted that the first predetermined time may be 1 minute, 20 minutes, 1 hour, etc., but is not limited thereto in the present disclosure. In one embodiment, when the first predetermined time is 1 minute, a time length of 2 minutes after completing the previous positioning of the target object in the virtual space triggers the mobile terminal to request re-positioning of the target object in the virtual space.

[0063] In other embodiments, the second predetermined time is similar to the expression of the first predetermined time, and the explanation of the second predetermined time can be understood by referring to the first predetermined time, so the explanation is omitted in this disclosure.

[0064] In one exemplary embodiment, in order to better understand acquiring a first image in the above step S502, a technical solution is provided, which includes one of the following methods for acquiring the first image: when the frame rate of the video stream captured by the camera in the mobile terminal in the real space is equal to or greater than a second predetermined value, selecting one frame of image from the video stream as the first image when the number of invalid frame images in the video stream captured by the camera in the mobile terminal in the real space is equal to or less than a third predetermined value; and when the camera in the mobile terminal captures multiple images in the real space, selecting an image from the multiple images whose number of image noise is equal to or less than a fourth predetermined value as the first image.

[0065] According to the technical solution of this embodiment, by providing multiple types of image data acquisition methods, the data volume of the image data is increased, and by selecting image data obtained by different acquisition methods, the image quality of the image data is improved.

[0066] The second predetermined value may include 20 frames / second and 24 frames / second, but is not limited thereto in the present disclosure. In one embodiment, when the second predetermined value is 20 frames / second, if the frame rate of the video stream captured in the real space by the camera of the mobile terminal is 10 frames / second, one frame of the image is selected from the video stream as the first image.

[0067] The range of the third predetermined value may be [0, 100], but is not limited thereto in the present disclosure. In one embodiment, when the third predetermined value is 100, if the number of invalid frame images in the video stream captured in the real space by the camera in the mobile terminal is 10, one frame image is selected as the first image from the video stream. Among them, the invalid frame image can be understood as a frame image with missing pixel information.

[0068] The fourth predetermined value may be set according to the size of the sensor in the camera.

[0069] In one exemplary embodiment, a technical solution is further provided that specifically includes the steps of: calculating a spatial point position of each pixel in image data of the first image, and constructing the point cloud space using the spatial point positions, wherein the spatial point positions of each pixel are obtained by the second camera position and orientation matrix; and visibly displaying the point cloud space on the mobile terminal, wherein the point cloud space has the position of the mobile terminal as its origin, the moving direction of the mobile terminal as its Z-axis direction, and the ascending direction of the mobile terminal as its Y-axis direction.

[0070] According to the technical solution of this embodiment, a point cloud space is constructed using image data of a first image, and the point cloud space is visually displayed, thereby improving the interaction experience of the target user.

[0071] The method for re-locating an object will now be further described with reference to the following examples.

[0072] 6 is a flowchart of a method for re-locating a target object according to another embodiment of the present disclosure. As shown in FIG. 6, the AR SDK is used as an AR application development platform, and a smartphone (corresponding to the above-mentioned mobile terminal) that supports AR Kit or AR Core is selected. The specific implementation steps include the following parts:

[0073] Step S602: The AR SDK is started to call the smartphone camera, and the surrounding real environment is photographed to obtain image data (corresponding to the image data of the first image).

[0074] Step S604: A point cloud map (corresponding to a point cloud space) of the local area is constructed based on the collected image data, and the corresponding real environment can be embodied in the point cloud space.

[0075] In one embodiment, in a real environment with rich environmental textures, a monocular camera (corresponding to the above-mentioned camera) is used to continuously collect images, and the process of constructing a point cloud map is completed based on the collected images, the position and orientation information of the current collecting camera and the feature information required when collecting images are recorded, a cloud recognition library is constructed in the cloud, and the image data and the position and orientation matrix of the camera in the virtual space (corresponding to the above-mentioned first camera position and orientation matrix) can be transmitted to the cloud recognition library in real time.

[0076] Among them, the characteristic information required when collecting the above images may include, but is not limited to, the image collection time, the image collection frequency, information on the image collection device, etc., and the present disclosure does not limit them.

[0077] Step S606: Using the smartphone as the starting point, the direction in which the smartphone screen faces forward is selected as the Z-axis direction, and the direction in which the screen faces upwards is selected as the Y-axis direction, and a virtual space system (corresponding to the above virtual space) is constructed in Unity, also known as the world space system in Unity.

[0078] Step S608: The position and orientation matrix M of the smartphone camera in the virtual space is acquired in real time.

[0079] Step S610: The image data and M acquired at the same time are transmitted to the cloud identification library through http / https protocol.

[0080] In addition, the cloud identification library may include a dynamic link library, such as a dll library or an so library.

[0081] Step S612: After completing positioning of the target object in the real environment, the cloud replies with the position and orientation matrix M1 of the camera in the point cloud space (corresponding to the second camera position and orientation matrix described above) and the position and orientation matrix M of the camera in the virtual space.

[0082] Among them, the position and orientation matrix M1 in the point cloud space of the camera is a camera position and orientation matrix obtained based on the image data of the cloud recognition library and the position and orientation matrix in the virtual space of the camera. Specifically, after acquiring the image data captured by the smartphone and the position and orientation matrix in the virtual space of the smartphone camera, the cloud refers to the cloud recognition library constructed in the above step to calculate the position and orientation matrix in the point cloud space of the smartphone and returns it to the smartphone.

[0083] Step S614: Based on M1, a position and orientation matrix of the target object in the point cloud space at the time of re-positioning (corresponding to the above-mentioned first target position and orientation matrix) is calculated, and the position and orientation information of the target object in the point cloud space is uniformly converted to the virtual space based on M and the position and orientation matrix of the camera in the virtual space obtained during the previous positioning.

[0084] The process of uniformly converting the position and orientation information of the target object in the point cloud space to the virtual space can be understood as the smartphone receiving the position and orientation matrix M of the smartphone camera in the virtual space and the position and orientation matrix of the target object in the point cloud space returned from the cloud, and then calculating the position and orientation matrix of the target object in the virtual space (corresponding to the above-mentioned second target position and orientation matrix) based on these two position and orientation matrices.

[0085] Step S616: The real-world environment is recognized in real time by the AR SDK, and the collected image data is updated in real time to update the position and orientation matrix of the camera in the virtual space. Based on the environmental feature information of the real-world environment, the motion of the target object is tracked, and the real-time position of the target object in the virtual space is anchored.

[0086] Among them, the environmental feature information of the real environment may affect the image feature information of the collected image data, and further affect the spatial environment displayed in the point cloud space. The environmental feature information of the real environment may include the brightness feature of the environment, the weather condition of the environment, etc. Correspondingly, the image feature information of the collected image data may include the clarity of the image, the brightness of the image, etc., but this disclosure is not limited thereto.

[0087] For example, in one embodiment, when the weather condition of the real environment is foggy, the image clarity in the image feature information decreases, and the completeness and clarity of the constructed point cloud space decreases.

[0088] In one embodiment, the process of anchoring the real-time position of the target object in the virtual space can be understood as determining an error value between the coordinates and rotation angle of the target object in the virtual space at the time of re-positioning and the coordinates and rotation angle of the target object in the virtual space at the time of the previous positioning based on the calculated position and orientation matrix of the target object in the virtual space, where this error value represents the anchor error generated by the movement of the target object in the real environment. By updating the coordinates and rotation angle of the target object in the virtual space to the coordinates and rotation angle of the target object in the virtual space at the time of each re-positioning in real time, the problem of the existence of the error value can be solved and re-positioning of the target object in the virtual space can be realized.

[0089] Step S618: Trigger the cloud to re-position after a certain time interval or by clicking a button, and execute step S608.

[0090] In one embodiment, since a certain deviation value occurs in both the process of tracking the movement of a target object in the real environment and the process of recognizing and positioning the target object in the point cloud space, a function is set to periodically and automatically trigger re-positioning in the point cloud space, so that as much position and orientation information of the target object in the point cloud space as possible can be obtained in one re-positioning process, thereby reducing the proportion of deviation values ​​and improving the accuracy of the re-positioning results of the target object in the virtual space.Furthermore, the problem of significant drift in the positioning position when positioning the target object in the virtual space is solved, thereby improving the user's AR experience.

[0091] Among them, after obtaining as much position and orientation information of the target object in the point cloud space as possible, an averaging process can be performed on the position and orientation data of the target object in the point cloud space within a reasonable range, i.e., averaging the corresponding Euler angles and translation vectors in the position and orientation matrix of the target object, or filtering out generated error data, or adjusting the upload frame rate of the image when the image data is transmitted to the cloud, thereby improving the accuracy of the position and orientation information of the target object in the point cloud space.

[0092] In the above embodiment, the process of tracking the movement of the target object and the process of spatial re-positioning are not only completed by the AR SDK, but also the cloud recognition library in the cloud is referred to to perform positioning and registration on the smartphone, so as to obtain the position and orientation information of the target object in the point cloud space, and further complete the transformation of the target object from the point cloud space to the virtual space, thereby improving the consistency when the user uses the smartphone to observe the same target object from different viewing angles in the point cloud space.

[0093] In addition, the above embodiment also solves the problem of errors occurring in spatial motion tracking by using the cloud recognition library to update the position and orientation information of the target object in point cloud space in real time.

[0094] From the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be realized by a combination of software and a required general-purpose hardware platform, and of course can also be realized by hardware, and in many cases, the former is a more preferred embodiment. Based on this understanding, the technical solutions of the present disclosure can be essentially or in part contributed to the relevant art embodied in the form of a software product, and the computer software product is stored in a storage medium (e.g., ROM / RAM, magnetic disk, optical disk) and includes some instructions to make a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) execute the methods of the embodiments of the present disclosure.

[0095] This embodiment further provides a target object re-positioning device for realizing the above embodiment and preferred embodiment, and the description of the already described one will be omitted. The term "module" used below can realize a combination of software and / or hardware of a certain function. The device described in the following embodiment is preferably realized by software, but it can also be realized by hardware or a combination of software and hardware and can be envisioned.

[0096] 7 is a block diagram showing a structure of a target object re-location device according to an embodiment of the present disclosure. As shown in FIG. 7, the target object re-location device includes: a transmission module 702 configured to acquire a first camera position and orientation matrix and a first image when re-positioning a target object in a virtual space, the first camera position and orientation matrix being for indicating position and orientation information in the virtual space of a camera of a mobile terminal when a previous positioning was performed on the target object in the virtual space, the first image being an image captured in a real space by the camera after the previous positioning was performed, and the target object being located in the real space; an acquisition module 704 configured to calculate a second camera position and orientation matrix based on the first camera position and orientation matrix and the first image, where the second camera position and orientation matrix is ​​for indicating corresponding position and orientation information in a point cloud space of the camera when the camera captures the first image; a determination module 706 configured to determine a first target position and orientation matrix based on the second camera position and orientation matrix, where the first target position and orientation matrix is ​​for indicating a first position and orientation information of the target object in the point cloud space; and an update module 708 configured to update second position and orientation information of the target object in the virtual space based on the first target position and orientation matrix, wherein the second position and orientation information is position and orientation information of the target object in the virtual space obtained at the time of the previous positioning.

[0097] The mobile terminal can be understood as a mobile terminal device including, but not limited to, a mobile phone, a tablet, a wearable device, a smart watch, etc. The mobile terminal may be configured to operate passively or actively. When the mobile terminal operates passively, the target of use of the mobile terminal may include a person or a robot. The mobile terminal is provided with a camera for taking pictures.

[0098] The above camera position and orientation information can be understood as a collective term for the camera position and camera orientation, and describes the transformation relationship between a first coordinate system in a first space and a second coordinate system in a second space. In particular, when a first coordinate in the camera's first coordinate system is known, the camera's position and orientation matrix and the camera's first coordinate can be transformed by a transformation matrix.

[0099] According to the above device, when re-positioning a target object in a virtual space, a first camera position and orientation matrix and a first image are acquired, of which the first camera position and orientation matrix is ​​for indicating position and orientation information in the virtual space of a camera in a mobile terminal at the time of performing a previous positioning of the target object in the virtual space, the first image is an image captured in the real space by the camera after performing the previous positioning, and the target object is located in the real space, and a second camera position and orientation matrix is ​​calculated based on the first camera position and orientation matrix and the first image, of which the second camera position and orientation matrix is ​​the position and orientation information of the camera at the time of performing a previous positioning of the target object in the virtual space. The first target position and orientation matrix is ​​for indicating corresponding position and orientation information in the point cloud space of the camera, and a first target position and orientation matrix is ​​determined based on the second camera position and orientation matrix, wherein the first target position and orientation matrix is ​​for indicating first position and orientation information of the target object in the point cloud space, and second position and orientation information of the target object in the virtual space is updated based on the first target position and orientation matrix, wherein the second position and orientation information is the position and orientation information of the target object in the virtual space obtained at the time of the previous positioning, thereby solving the technical problem of low positioning accuracy of the target object in the virtual space in the related art and improving the positioning accuracy of the target object in the virtual space.

[0100] It should be noted that the repositioning process is essentially the unification of the relative relationship between the camera and the content in two three-dimensional spaces. Therefore, in this embodiment, first, there are two three-dimensional spaces, a point cloud space and a virtual space, among which the point cloud space can be understood as a three-dimensional space constructed using point cloud technology, and the position and orientation information of the camera and the content can be accurately obtained by referring to the recognition algorithm in the point cloud space. The virtual space can be understood as a three-dimensional space constructed based on the spatial coordinate axis. Since the position of the target object in the virtual space may be easily shifted, it is necessary to reposition the target object in the virtual space.

[0101] Note that since the explanation of the position and orientation information of the camera can be referred to for the explanation of the position and orientation information of the target object, the explanation thereof will be omitted in this disclosure.

[0102] In one embodiment, the first coordinate of the point P is P w Then, the first coordinate P w can be transformed into second coordinates in the coordinate system of the second space of the point P, and the second coordinates P c is expressed as follows: TIFF2024538401000005.tif7170

[0103] Alternatively, the point P can be transformed from the second coordinate system to the first coordinate system. TIFF2024538401000006.tif7170

[0104] Among them, T cw is the transformation matrix that transforms the point P from the first coordinate system to the second coordinate system, and T wc is the transformation matrix that transforms the point P from the second coordinate system to the first coordinate system.

[0105] Based on the above embodiment, when the first space represents a point cloud space and the second space represents a virtual space, a transformation process of an object between the point cloud space and the virtual space can be realized.

[0106] The update module is further configured to include: updating second position and orientation information of the target object in the virtual space to third position and orientation information based on the first target position and orientation matrix; determining a second target position and orientation matrix based on the first camera position and orientation matrix and the first target camera position and orientation matrix, wherein the second target position and orientation matrix is ​​for indicating the third position and orientation information of the target object in the virtual space after the previous positioning; and updating the second position and orientation information to the third position and orientation information when an error value between the second position and orientation information and the third position and orientation information is greater than a first predetermined value.

[0107] According to the technical solution of this embodiment, when the position and orientation information of the target object in the virtual space changes, the position and orientation information of the target object in the virtual space can be updated to update the positioning position of the target object, thereby further improving the positioning accuracy of the target object.

[0108] It should be noted that the types of error values ​​may include, but are not limited to, angular error values ​​and position error values ​​in this disclosure.

[0109] It should be noted that the first predetermined value can be set depending on the type of error value, and may be set manually or determined by historical data.

[0110] In one embodiment, the first predetermined value range for the angular error value may be [0,1] degrees, and the first predetermined value for the position error value may be expressed in coordinate values, with the first predetermined value range, i.e., the coordinate offset range, being [-1,1].

[0111] The above-mentioned target object re-location device further includes a compensation module configured to compensate the third position and orientation information by using the error value, or to obtain a compensation parameter corresponding to the error value and compensate the third position and orientation information by using a divided value of the error value and the compensation parameter. According to the technical solution of this embodiment, it is possible to reduce an error in the updated position and orientation information of the target object in the virtual space, and improve the reliability of the position and orientation information of the target object in the virtual space.

[0112] The compensation parameter can be understood as the number of compensation times for an error value, and may be preset based on the error value and have a positive correlation with the error value. For example, the larger the error value, the larger the compensation parameter corresponding to the error value.

[0113] The above-mentioned target object re-location device further includes a coordinate compensation module, which is configured to determine a coordinate compensation value corresponding to the error value, and adjust the spatial coordinates in the third position and orientation information by using the coordinate compensation value. According to the technical solution of this embodiment, the error of the spatial coordinates in the virtual space of the target object after updating can be reduced, the reliability of the position and orientation information of the target object in the virtual space can be improved, and the accuracy of the positioning of the target object in the virtual space can be improved.

[0114] The above-mentioned target object re-positioning device further includes an angle compensation module configured to determine an angle compensation value corresponding to the error value and adjust a spatial angle in the third position and orientation information by using the angle compensation value, wherein the angle compensation value is for indicating an angle difference between a spatial angle of the camera at the previous positioning and a spatial angle after the previous positioning. According to the technical solution of this embodiment, it is possible to reduce an error in a spatial angle of the target object in a virtual space after updating, improve the reliability of the position and orientation information of the target object in a virtual space, and improve the accuracy of positioning of the target object in a virtual space.

[0115] In one embodiment, when the type of the error value is an angle error value, the angle error value is 0.5 degrees and the corresponding compensation number is 5; when the angle error value is 1 degree, the corresponding compensation number is 10.

[0116] In one embodiment, the process of compensating the third position and orientation information using the divided value of the error value and the compensation parameter can be understood as a process of using an angle error value and a compensation parameter corresponding to the angle error value. If the angle error value is 0.5 degrees and the number of compensation times corresponding to the angle error value is 5, the third position and orientation information can be compensated using 0.1 degrees, which is a value obtained by dividing 0.5 degrees by 5. In some cases, the third position and orientation information can be compensated five times, and the compensation value for each compensation can be 0.1 degrees.

[0117] In addition, since the coordinate compensation value and the angle compensation value are positively correlated with the error value, the process of adjusting the third position and orientation information using the coordinate compensation value and the angle compensation value is similar to the process of using the angle error value and the compensation parameter corresponding to the angle error value. In another embodiment, the process of adjusting the third position and orientation information using the coordinate compensation value and the angle compensation value can be obtained by referring to the process of using the angle error value and the compensation parameter corresponding to the angle error value.

[0118] The above-mentioned object relocation device further includes a trigger module for triggering the relocation of the object in the virtual space when a preset condition is met, wherein the preset condition includes at least one of the following: image data of the image in the real space captured by the camera has changed; the position of the mobile terminal in the virtual space has changed; the mobile terminal has received a relocation request for requesting relocation of the object in the virtual space; the time length after the previous positioning of the object in the virtual space is equal to or longer than a first predetermined time; and the time length after the previous positioning of the object in the point cloud space is equal to or longer than a second predetermined time. According to the technical solution of this embodiment, the trigger condition for relocation is provided, thereby improving the richness of the application scenario of the relocation and expanding the application scope of the technical solution of the relocation.

[0119] It should be noted that the first predetermined time may be 1 minute, 20 minutes, 1 hour, etc., but is not limited thereto in the present disclosure. In one embodiment, when the first predetermined time is 1 minute, a time length of 2 minutes after completing the previous positioning of the target object in the virtual space triggers the mobile terminal to request re-positioning of the target object in the virtual space.

[0120] In other embodiments, the second predetermined time is similar to the expression of the first predetermined time, and the explanation of the second predetermined time can be understood by referring to the first predetermined time, so the explanation is omitted in this disclosure.

[0121] The first image acquisition method includes one of the following: when the frame rate of the video stream captured by the camera in the mobile terminal in the real space is equal to or greater than a second predetermined value, selecting one frame of image from the video stream as the first image when the number of invalid frame images in the video stream captured by the camera in the mobile terminal in the real space is equal to or less than a third predetermined value; and when the camera in the mobile terminal captures multiple images in the real space, selecting an image from the multiple images whose number of image noises is equal to or less than a fourth predetermined value as the first image. According to the technical solution of this embodiment, the amount of image data is improved by providing multiple types of image data acquisition methods, and the image quality of the image data is improved by selecting image data obtained by different acquisition methods.

[0122] The second predetermined value may include 20 frames / second and 24 frames / second, but is not limited thereto in the present disclosure. In one embodiment, when the second predetermined value is 20 frames / second, if the frame rate of the video stream captured in the real space by the camera of the mobile terminal is 10 frames / second, one frame of the image is selected from the video stream as the first image.

[0123] The range of the third predetermined value may be [0, 100], but is not limited thereto in the present disclosure. In one embodiment, when the third predetermined value is 100, if the number of invalid frame images in the video stream captured in the real space by the camera in the mobile terminal is 10, one frame image is selected as the first image from the video stream. Among them, the invalid frame image can be understood as a frame image with missing pixel information.

[0124] The fourth predetermined value may be set according to the size of the sensor in the camera.

[0125] The above-mentioned object re-location device further includes a construction module configured to calculate a spatial point position of each pixel in the image data of the first image, construct the point cloud space using the spatial point positions, and visibly display the point cloud space on the mobile terminal, in which the spatial point positions of each pixel are obtained by the second camera position and orientation matrix, and the point cloud space further includes a construction module that sets the position of the mobile terminal as the origin, the moving direction of the mobile terminal as the Z-axis direction, and the ascending direction of the mobile terminal as the Y-axis direction. According to the technical solution of this embodiment, the point cloud space is constructed using the image data of the first image, and the point cloud space is visibly displayed, thereby improving the interaction experience of the target.

[0126] In one exemplary embodiment, the computer-readable storage medium may be a medium capable of storing various computer programs, such as, but not limited to, a USB disk, a read-only memory (abbreviated as ROM), a random access memory (abbreviated as RAM), a removable hard disk, a magnetic disk, or an optical disk.

[0127] For specific examples in this embodiment, reference can be made to the examples described in the above embodiments and exemplary embodiments, and therefore the description thereof will be omitted in this embodiment.

[0128] An embodiment of the present disclosure further provides an electronic device including a memory and a processor, the memory storing a computer program, the processor being configured to perform the steps of any one of the method embodiments described above by executing the computer program.

[0129] Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:

[0130] S1: When re-positioning a target object in a virtual space, a first camera position and orientation matrix and a first image are obtained, of which the first camera position and orientation matrix is ​​for indicating position and orientation information in the virtual space of a camera of a mobile terminal when the target object was previously positioned in the virtual space, the first image is an image captured in real space by the camera after the previous positioning was performed, and the target object is located in the real space.

[0131] S2: Calculate a second camera position and orientation matrix based on the first camera position and orientation matrix and the first image, wherein the second camera position and orientation matrix indicates corresponding position and orientation information in the point cloud space of the camera at the time when the camera captured the first image.

[0132] S3: Determine a first target position and orientation matrix based on the second camera position and orientation matrix, in which the first target position and orientation matrix is ​​for indicating first position and orientation information of the target object in the point cloud space.

[0133] S4: Based on the first target position and orientation matrix, a second position and orientation information of the target object in the virtual space is updated, where the second position and orientation information is the position and orientation information of the target object in the virtual space obtained during the previous positioning.

[0134] In one exemplary embodiment, the electronic device may further include a transmission device coupled to the processor, and an input / output device coupled to the processor.

[0135] For specific examples in this embodiment, reference can be made to the examples described in the above embodiments and exemplary embodiments, and therefore the description thereof will be omitted in this embodiment.

[0136] Of course, as will be understood by those skilled in the art, each module or step of the present disclosure above can be implemented by a general-purpose computing device, can be centralized in a single computing device, or can be distributed across a network made up of multiple computing devices, and can be implemented by program code executable by a computing device, such that they can be stored in a storage device and executed by the computing device.

[0137] In one embodiment, the program code may be configured to implement the following steps by a computer program:

[0138] S1: When re-positioning a target object in a virtual space, a first camera position and orientation matrix and a first image are obtained, of which the first camera position and orientation matrix is ​​for indicating position and orientation information in the virtual space of a camera of a mobile terminal when the target object was previously positioned in the virtual space, the first image is an image captured in real space by the camera after the previous positioning was performed, and the target object is located in the real space.

[0139] S2: Calculate a second camera position and orientation matrix based on the first camera position and orientation matrix and the first image, wherein the second camera position and orientation matrix indicates corresponding position and orientation information in the point cloud space of the camera at the time when the camera captured the first image.

[0140] S3: Determine a first target position and orientation matrix based on the second camera position and orientation matrix, in which the first target position and orientation matrix is ​​for indicating first position and orientation information of the target object in the point cloud space.

[0141] S4: Based on the first target position and orientation matrix, a second position and orientation information of the target object in the virtual space is updated, where the second position and orientation information is the position and orientation information of the target object in the virtual space obtained during the previous positioning.

[0142] And, in some cases, the steps shown or described may be performed in a different order than shown, or may be implemented by creating each of them in separate integrated circuit modules, or by creating multiple of them or steps in a single integrated circuit module. Thus, the present disclosure is not limited to any particular combination of hardware and software.

[0143] The above is merely a preferred embodiment of the present disclosure, and does not limit the present disclosure. Those skilled in the art can make various modifications and changes to the present disclosure. Any modifications, equivalent replacements, improvements, etc. made within the principle of the present disclosure should be included within the protection scope of the present disclosure.

Claims

1. a step of acquiring a first camera position and orientation matrix and a first image when re-positioning a target object in a virtual space, the first camera position and orientation matrix being for indicating position and orientation information in the virtual space of a camera of a mobile terminal at the time of performing a previous positioning of the target object in the virtual space, the first image being an image captured in a real space by the camera after performing the previous positioning, and the target object being located in the real space; calculating a second camera position and orientation matrix based on the first camera position and orientation matrix and the first image, the second camera position and orientation matrix being for indicating corresponding position and orientation information in a point cloud space of the camera at the time when the camera captured the first image; determining a first target position and orientation matrix based on the second camera position and orientation matrix, the first target position and orientation matrix being for indicating first position and orientation information of the target object in the point cloud space; updating second position and orientation information of the target object in the virtual space based on the first target position and orientation matrix, the second position and orientation information being position and orientation information of the target object in the virtual space obtained at the time of the previous positioning; A method for relocating an object of interest.

2. The step of updating second position and orientation information of the target object in the virtual space based on the first target position and orientation matrix includes: updating second position and orientation information of the target object in the virtual space to third position and orientation information based on the first target position and orientation matrix; determining a second target position and orientation matrix based on the first camera position and orientation matrix and the first target camera position and orientation matrix, the second target position and orientation matrix being for indicating the third position and orientation information of the target object in the virtual space after the previous positioning; updating the second position and orientation information to the third position and orientation information when an error value between the second position and orientation information and the third position and orientation information is greater than a first predetermined value. The method for relocating an object according to claim 1 .

3. compensating the third position and orientation information using the error value; or obtaining a compensation parameter corresponding to the error value, and compensating the third position and orientation information by using a divided value of the error value and the compensation parameter. The method for relocating an object according to claim 2 .

4. The step of compensating the third position and orientation information using the error value includes: determining a coordinate compensation value corresponding to the error value; and adjusting spatial coordinates in the third position and orientation information using the coordinate compensation value. The method for re-locating an object according to claim 3 .

5. The step of compensating the third position and orientation information using the error value includes: determining an angle compensation value corresponding to the error value, the angle compensation value being for indicating an angle difference between a spatial angle at a previous positioning of the camera and a spatial angle after the previous positioning; and adjusting a spatial angle in the third position and orientation information using the angle compensation value. The method for re-locating an object according to claim 3 .

6. The method further includes the step of triggering a relocation of the target object in the virtual space when a preset condition is satisfied; The preset condition is: The image data of the image in the real space captured by the camera has changed; and A change in the position of the mobile terminal in the virtual space; and receiving, at the mobile terminal, a relocation request for requesting relocation of the target object in the virtual space; a time length after the completion of a previous positioning of the target object in the virtual space has become equal to or longer than a first predetermined time; a time length after the completion of the previous positioning of the target object in the point cloud space has become equal to or longer than a second predetermined time; The method for relocating an object according to claim 1 .

7. The method of acquiring the first image includes: a method of selecting one frame of an image from a video stream captured in the real space by the camera of the mobile terminal as the first image when a frame rate of the video stream is equal to or higher than a second predetermined value; a method of selecting one frame image from a video stream captured in the real space by the camera of the mobile terminal as the first image when the number of invalid frame images in the video stream is equal to or less than a third predetermined value; and when the camera of the mobile terminal captures a plurality of images in the real space, an image having an image noise level equal to or less than a fourth predetermined value is selected from the plurality of images as the first image. The method for relocating an object according to claim 1 .

8. A step of calculating a spatial point position of each pixel in image data of the first image and constructing the point cloud space using the spatial point positions, the spatial point positions of each pixel being obtained by the second camera position and orientation matrix; a step of visually displaying the point cloud space on the mobile terminal, the point cloud space having a position of the mobile terminal as an origin, a moving direction of the mobile terminal as a Z-axis direction, and an upward direction of the mobile terminal as a Y-axis direction; The method for relocating an object according to claim 1 .

9. a transmission module configured to acquire a first camera position and orientation matrix and a first image when re-positioning a target object in a virtual space, the first camera position and orientation matrix being for indicating position and orientation information in the virtual space of a camera of a mobile terminal at the time of performing a previous positioning of the target object in the virtual space, the first image being an image captured in a real space by the camera after performing the previous positioning, and the target object being located in the real space; an acquisition module configured to calculate a second camera position and orientation matrix based on the first camera position and orientation matrix and the first image, the second camera position and orientation matrix being for indicating corresponding position and orientation information in a point cloud space of the camera when the camera captured the first image; a determination module configured to determine a first target position and orientation matrix based on the second camera position and orientation matrix, the first target position and orientation matrix being for indicating first position and orientation information of the target object in the point cloud space; an update module configured to update second position and orientation information of the target object in the virtual space based on the first target position and orientation matrix, the second position and orientation information being position and orientation information of the target object in the virtual space obtained at the time of the previous positioning; A device for repositioning objects of interest.

10. A computer-readable storage medium on which a computer program is stored, The computer program is arranged to implement the method according to any one of claims 1 to 8 when executed. A computer readable storage medium.

11. A memory and a processor are included, The memory stores a computer program; The processor is arranged to implement the method according to any one of claims 1 to 8 by executing the computer program. electronic equipment.

Citation Information

Patent Citations

  • Positioning method and device, electronic device and storage medium

    CN111323007A

  • Information processing apparatus and control method thereof

    JP2010279023A

  • Attitude parameter estimation device, attitude parameter estimation method, and program

    JP2015069548A

  • Program, tracking method and tracking device

    JP2018067115A

  • Ar compatible labeling using aligned cad models

    JP2020087440A