Data processing method and device for virtual scene

By collecting images and generating feature images in the virtual scene, the coordinate system synchronization between different terminals is achieved, which solves the synchronization problem between terminals in the virtual scene and improves the flexibility and user experience of virtual reality and augmented reality applications.

CN112530024BActive Publication Date: 2024-09-17HUAWEI TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202011394754.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-10-15
Publication Date
2024-09-17
Estimated Expiration
2038-10-15

AI Technical Summary

Technical Problem

Existing technology is difficult to achieve coordinate system synchronization between different mobile terminals in multi-user interactive virtual scenes, especially in non-planar or natural scenes, resulting in limited virtual content sharing.

Method used

Collect images in the natural environment through cameras, generate point cloud data and pose data, extract two-dimensional feature images, generate map data and perform feature matching to achieve coordinate system synchronization between different terminals and support different spatial positioning engines. Share across platforms.

Benefits of technology

It achieves virtual content synchronization between different terminals in any natural scene, improves the flexibility and user experience of multi-person shared AR/VR/MR applications, avoids dependence on specific geometric objects, and is suitable for various application scenarios. .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112530024B
    Figure CN112530024B
Patent Text Reader

Abstract

The present application provides a data processing method and device for virtual scenes, the method comprising: a first terminal collects a first image through a camera, the first image including an image of an object; based on the first image, first point cloud data of the object is obtained; the first point cloud data represents the three-dimensional coordinate value of the surface point of the object in the first camera coordinate system of the first terminal; based on the first image, the posture data of the first terminal in the first camera coordinate system is obtained; based on the posture data, the first point cloud data and the first image, a two-dimensional feature image is obtained; map data is generated based on the first point cloud data, the posture data and the two-dimensional feature image; and the map data is sent to a second terminal or a server. The implementation of the present application can realize the cross-platform synchronization of the coordinate system of the virtual scene in any natural scene by terminals of the same or different models, and is compatible with various spatial positioning engines to meet user needs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of virtual scene technology, and in particular to a data processing method and device for a virtual scene. Background Art

[0002] Virtual Reality (VR), Augmented Reality (AR) and Mixed Reality (MR) technologies are emerging multimedia virtual scene technologies in recent years. Among them, VR technology is a simulation technology that can create and experience a virtual world, and AR technology is a technology that can superimpose virtual reality and the real world and interact with each other. MR technology is a new visual environment generated by merging the real world and the virtual world, and a comprehensive technology that builds an interactive feedback information loop between the real world, the virtual world and the user.

[0003] In the above virtual scene technologies, Simultaneous Localization and Mapping (SLAM) technology is usually used to locate the terminal itself in the environment. SLAM technology can specifically enable a terminal (such as a mobile phone, VR glasses, and other mobile terminals) to locate itself according to position estimation and maps when it starts moving from an unknown position in the environment, and to build an incremental map based on its own positioning to facilitate subsequent positioning. The system or module using SLAM technology can also be called a spatial positioning engine.

[0004] In a multi-user interactive virtual scene, different mobile terminals may have different types or models (such as mobile phones and VR glasses, or Apple phones and Huawei phones), and their spatial positioning engine algorithms are also different. Coordinate system synchronization (content synchronization) between different mobile terminals is a core technology. Coordinate system synchronization can realize virtual content sharing and interaction in multi-user VR, AR or MR applications in the same coordinate system space.

[0005] An existing solution is to synchronize coordinate systems based on regular geometric planes (such as square desktops). Specifically, the mobile terminal uses the coordinates of the center point of the horizontal desktop at the current location as the origin of the terminal reference coordinate system. The coordinate axes of the reference coordinate system are then calculated using the desktop edge information. In turn, a terminal reference coordinate system is established. The calculation process of mobile terminals of different users is the same, thereby establishing the same reference coordinate system. The posture output by the mobile terminal spatial positioning engine can be used to calculate the posture of the terminal relative to the reference coordinate system, and then the relative posture between the terminals is calculated, thereby achieving coordinate system synchronization. This solution can enable multi-user VR, AR or MR application interaction on the same desktop using different models of mobile terminals.

[0006] Since this solution relies on regular geometric planes, its application scenarios are limited. In any planar or non-planar scenario, this solution will not be able to achieve coordinate system synchronization. Summary of the invention

[0007] The embodiments of the present invention provide a data processing method and device for virtual scenes, which can realize cross-platform coordinate system synchronization (content synchronization) of virtual scenes in any natural scene by terminals of different models, and are compatible with various spatial positioning engines to meet user needs.

[0008] In the first aspect, an embodiment of the present invention provides a data processing method for a virtual scene, wherein the virtual scene is one of a virtual reality VR scene, an augmented reality AR scene, and a mixed reality MR scene. The method comprises: a first terminal collects a first image through a camera, wherein the first image comprises an image of any object in any natural environment (real world); the first terminal obtains first point cloud data of the object according to the first image; the first point cloud data represents the three-dimensional coordinate value of the surface point of the object in the first camera coordinate system of the first terminal; the first terminal obtains the posture data of the first terminal in the first camera coordinate system according to the first image; the first terminal obtains a two-dimensional feature image according to the posture data, the first point cloud data and the first image; the first terminal generates map data according to the first point cloud data, the posture data and the two-dimensional feature image; the first terminal sends the map data to a second terminal or a server.

[0009] When the first terminal sends the map data to the second terminal, the second terminal may be used to synchronize the contents in the virtual scene according to the map data; the spatial positioning engines used by the first terminal and the second terminal may be different or the same.

[0010] When the first terminal sends the map data to the server, the server is used to obtain coordinate system transformation data between the first camera coordinate system of the first terminal and the second camera coordinate system of the second terminal according to the map data, and send the coordinate system transformation data to the second terminal, so that the second terminal can synchronize the content in the virtual scene according to the coordinate system transformation data. The spatial positioning engines used by the first terminal and the second terminal can be different or the same.

[0011] It can be seen that by implementing the embodiments of the present invention, the first terminal can use the output data of the local spatial positioning engine to extract image features, and generate map data to send to the second terminal or server, so that the second terminal can synchronize the coordinate systems between the two terminals based on the map data. Among them, the spatial positioning engines used by the first terminal and the second terminal can be different. In other words, even if different terminals are installed with different spatial positioning engines, content synchronization in the virtual scene can still be achieved, which is conducive to realizing cross-platform multi-person shared AR / VR / MR development and application between different spatial positioning engines, meeting user needs and improving user experience.

[0012] It can also be seen that the embodiments of the present invention can extract features of any object in any natural scene through an effective feature extraction method, thereby realizing the synchronization of coordinate systems between different terminals. Therefore, multi-person shared AR application scenarios are not restricted by the environment, that is, in the process of realizing multi-user virtual scene interaction, it is no longer necessary to rely on objects of specific geometric shapes. Therefore, the realization of multi-person shared AR / VR / MR applications is no longer affected by the environment, and the needs of various application scenarios are met.

[0013] Based on the first aspect, in a possible embodiment, the first terminal obtains a two-dimensional feature image according to the posture data, the first point cloud data and the first image, including: the first terminal projects the first point cloud data to the first image according to the posture data, obtains the two-dimensional image coordinates (also called 2D image coordinates) of the first point cloud data in the image coordinate system of the first image, and then extracts the two-dimensional feature image (also called 2D feature image) according to the image block or image feature point descriptor corresponding to the two-dimensional image coordinates in the first image. The image feature point descriptor includes but is not limited to one of Brief, Brisk, ORB, Freak, SIFT, and SURF.

[0014] In a specific implementation, the first terminal may select a frame of image (first image) at a preset time interval, as well as the pose data and first point cloud data of the same timestamp output by the spatial positioning engine, project the first point cloud data into the first image through the pose, obtain 2D image coordinates, and then perform 2D feature description on the 2D image coordinates, wherein the feature description may be an image feature point descriptor or an image block description, wherein the image feature point descriptor includes but is not limited to one of Brief, Brisk, ORB, Freak, SIFT, and SURF. In this way, a 2D feature image of the same timestamp corresponding to the image may be obtained. In an embodiment of the present invention, a set of 2D feature images, first point cloud data, and pose data associated with the same timestamp of the first terminal may be set as a key frame of the first terminal.

[0015] Based on the first aspect, in a possible embodiment, the spatial positioning engine of the first terminal may calculate and obtain the position and posture data of the first terminal in the first camera coordinate system according to the data (first image) collected by the camera.

[0016] In another possible embodiment, an inertial measurement unit (IMU) sensor is also provided in the first terminal, and the input signal of the spatial positioning engine includes image data collected by the camera and data collected by the IMU sensor (which may be called motion data). The spatial positioning engine can calculate the position data of the first terminal in the first camera coordinate system based on the image data and the motion data.

[0017] In another possible embodiment, in addition to the camera and IMU, the first terminal is also provided with a positioning module related to posture or motion (GPS positioning, Beidou positioning, WIFI positioning, or base station positioning, etc., for details, please refer to the description of the terminal structure below). Then, the spatial positioning engine can further refer to the data collected by the positioning module to calculate the posture data of the first terminal in the first camera coordinate system.

[0018] Based on the first aspect, in a possible embodiment, before the first terminal generates map data according to the first point cloud data, the position data and the two-dimensional feature image, the method further includes: the first terminal acquires positioning data, the positioning data includes at least one of the GPS positioning data of the terminal, the Beidou positioning data of the first terminal, the WIFI positioning data of the first terminal, the Bluetooth positioning data of the first terminal, or the base station positioning data of the first terminal. Then the positioning data is packaged together with the above-mentioned map data into a data packet for subsequent transmission; or, the positioning data can also be carried in the map data for subsequent transmission.

[0019] In the second aspect, an embodiment of the present invention provides another data processing method for a virtual scene, wherein the virtual scene is one of a virtual reality VR scene, an augmented reality AR scene, and a mixed reality MR scene. The method includes: a second terminal receives map data sent by a first terminal, wherein the map data is generated based on first point cloud data of an arbitrary object, position data of the first terminal in a first camera coordinate system of the first terminal, and a two-dimensional feature image of the first terminal; wherein the first point cloud data represents the three-dimensional coordinate value of the surface point of the object in the first camera coordinate system of the first terminal; the second terminal obtains the position data of the second terminal in a second camera coordinate system of the second terminal; the second terminal obtains the two-dimensional feature image of the second terminal; the second terminal obtains the coordinate system transformation data between the first camera coordinate system and the second camera coordinate system according to the map data, the position data of the second terminal in the second camera coordinate system, and the two-dimensional feature image of the second terminal; the second terminal synchronizes the content in the virtual scene according to the coordinate system transformation data.

[0020] It can be seen that by implementing the embodiments of the present invention, the second terminal can use the output data of the local spatial positioning engine to extract two-dimensional image features, receive the map data sent by the first terminal, and obtain the coordinate system transformation data according to the map data, the posture data of the second terminal and the two-dimensional feature image, and finally realize the coordinate system synchronization between the two terminals based on the coordinate system transformation data. Among them, the spatial positioning engines used by the first terminal and the second terminal can be different. In other words, even if different terminals are installed with different spatial positioning engines, the content synchronization in the virtual scene can still be achieved, which is conducive to realizing cross-platform multi-person shared AR / VR / MR development and application between different spatial positioning engines, meeting user needs and improving user experience.

[0021] It can also be seen that the embodiments of the present invention can extract features of any object in any natural scene through an effective feature extraction method, thereby realizing the synchronization of coordinate systems between different terminals. Therefore, multi-person shared AR application scenarios are not restricted by the environment, that is, in the process of realizing multi-user virtual scene interaction, it is no longer necessary to rely on objects of specific geometric shapes. Therefore, the realization of multi-person shared AR / VR / MR applications is no longer affected by the environment, and the needs of various application scenarios are met.

[0022] Based on the second aspect, in a possible embodiment, the second terminal obtains the coordinate system transformation data between the first camera coordinate system and the second camera coordinate system according to the map data, the pose data of the second terminal in the second camera coordinate system and the two-dimensional feature image of the second terminal, including: the second terminal uses the two-dimensional feature image of the second terminal to perform a feature matching operation in the map data to obtain the pose data of the second terminal in the first camera coordinate system; the second terminal obtains the coordinate system transformation data between the first camera coordinate system and the second camera coordinate system according to the pose data of the second terminal in the first camera coordinate system and the pose data in the second camera coordinate system.

[0023] In a specific implementation, the second terminal may select a frame of image (second image) at a preset time interval, as well as the pose data and second point cloud data of the same timestamp output by the spatial positioning engine, project the second point cloud data into the second image through the pose, obtain 2D image coordinates, and then perform 2D feature description on the 2D image coordinates, wherein the feature description may be an image feature point descriptor or an image block description, wherein the image feature point descriptor includes but is not limited to one of Brief, Brisk, ORB, Freak, SIFT, and SURF. In this way, a 2D feature image of the same timestamp corresponding to the image may be obtained. In an embodiment of the present invention, a set of the 2D feature image of the second terminal, the second point cloud data, and the pose data of the second terminal associated with the same timestamp of the second terminal may be set as a key frame of the second terminal.

[0024] In one implementation, the second terminal may perform feature matching based on the key frames determined by itself and the received map data, respectively extract the same image features of the two, output a feature point matching set, and then estimate the pose data of the second terminal relative to the first camera coordinate system, wherein the pose estimation algorithm may be a PNP algorithm. Then, the second terminal obtains the coordinate system transformation data (e.g., coordinate system transformation matrix) between the first camera coordinate system and the second camera coordinate system based on the pose data of the second terminal in the first camera coordinate system and the pose data in the second camera coordinate system. In a specific implementation, the pose transformation data of the anchor point used in the virtual scene may be calculated based on the coordinate system transformation matrix.

[0025] In a possible embodiment, the second terminal synchronizes the content in the virtual scene according to the coordinate system transformation data, including: the second terminal obtains the posture transformation data of the anchor point of the virtual scene according to the coordinate system transformation data; the second terminal synchronizes the content in the virtual scene according to the posture transformation data of the anchor point.

[0026] Based on the second aspect, in a possible embodiment, before the second terminal obtains the position data of the second terminal in the second camera coordinate system of the second terminal, it includes: the second terminal captures a second image, and the second image includes an image of the object. Since the second image is obtained by photographing the environment, and the first terminal and the second terminal are both in the environment, the second image contains an image of the object in the environment, and the object is the object used in the first image captured by the first terminal; the second terminal obtains the second point cloud data of the object based on the second image; the second point cloud data represents the three-dimensional coordinate values ​​of the surface points of the object in the second camera coordinate system;

[0027] Correspondingly, the second terminal obtains the position and posture data of the second terminal in the second camera coordinate system of the second terminal, including: the second terminal obtains the position and posture data of the second terminal in the second camera coordinate system according to the second image;

[0028] Correspondingly, the second terminal obtains the two-dimensional feature image of the second terminal, including: the second terminal projects the second point cloud data onto the second image according to the pose data of the second terminal in the second camera coordinate system to obtain the two-dimensional image coordinates of the second point cloud data in the image coordinate system of the second image; the second terminal obtains the two-dimensional feature image of the second terminal according to the image block or image feature point descriptor corresponding to the two-dimensional image coordinates in the second image. The image feature point descriptor includes but is not limited to one of Brief, Brisk, ORB, Freak, SIFT, and SURF.

[0029] Based on the second aspect, in a possible embodiment, the map data also carries positioning data, and the positioning data includes at least one of the GPS positioning data of the first terminal, the Beidou positioning data of the first terminal, the WIFI positioning data of the first terminal, the Bluetooth positioning data of the first terminal, or the base station positioning data of the first terminal; accordingly, the second terminal obtains the two-dimensional feature image of the second terminal, including: the second terminal determines a search range of the two-dimensional feature image according to the positioning data; and determines the two-dimensional feature image of the second terminal from multiple historical two-dimensional feature images according to the search range.

[0030] That is to say, if the data packet or map data sent by the first terminal to the second terminal carries the positioning data of the first terminal, then in the feature matching process, the second terminal can first determine the search range of the two-dimensional feature image based on the positioning data, and then screen the multiple key frames generated by the second terminal multiple times according to the search range, for example, select the key frame that is close to or closest to the positioning data, and then use the key frame to perform feature matching in the map data to obtain the position and posture data of the second terminal in the first camera coordinate system of the first terminal. This is conducive to improving matching efficiency and accuracy.

[0031] In a third aspect, an embodiment of the present invention provides a data processing method for a virtual scene, wherein the virtual scene is one of a virtual reality VR scene, an augmented reality AR scene, and a mixed reality MR scene, and the method includes: a server receives map data sent by a first terminal, and the map data is generated based on first point cloud data of an object, posture data of the first terminal in a first camera coordinate system of the first terminal, and a two-dimensional feature image of the first terminal; wherein the first point cloud data represents the three-dimensional coordinate value of the surface point of the object in the first camera coordinate system of the first terminal; the server receives the posture data of a second terminal in a second camera coordinate system of the second terminal, and a two-dimensional feature image of the second terminal; the server uses the two-dimensional feature image of the second terminal to perform a feature matching operation in the map data to obtain the posture data of the second terminal in the first camera coordinate system; the server obtains coordinate system transformation data between the first camera coordinate system and the second camera coordinate system according to the posture data of the second terminal in the first camera coordinate system and the posture data in the second camera coordinate system; the server sends the coordinate system transformation data to the second terminal.

[0032] It can be seen that by implementing the embodiments of the present invention, different mobile terminals can use the output data of their respective spatial positioning engines to perform the same type of image feature extraction, wherein the first terminal can further generate map data and upload it to the server, and the second terminal can further generate key frames and upload them to the server. The server then obtains coordinate system synchronization data based on the key frames and map data and sends it to the second terminal, thereby realizing coordinate system synchronization between terminals. In other words, even if different spatial positioning engines are installed on different mobile terminals, content synchronization in the virtual scene can still be achieved, which is conducive to realizing cross-platform multi-person shared AR / VR / MR development and application between different spatial positioning engines, and improving user experience. At the same time, since the server is used as a data interaction node between different terminals, the content synchronization requirements between a large number of terminals can be efficiently met.

[0033] It can also be seen that the embodiments of the present invention can extract features of objects in any scene through an effective feature extraction method, thereby realizing the synchronization of coordinate systems between different terminals. Therefore, multi-person shared AR application scenarios are not restricted by the environment, that is, in the process of realizing multi-user virtual scene interaction, specific geometric objects are no longer required. Therefore, multi-person shared AR / VR / MR applications are no longer affected by the environment, and the needs of various application scenarios are met.

[0034] In a fourth aspect, an embodiment of the present invention provides a terminal for data processing of a virtual scene, wherein the virtual scene is one of a virtual reality VR scene, an augmented reality AR scene, and a mixed reality MR scene. The terminal specifically includes: an image acquisition module, for collecting a first image through a camera of the terminal, wherein the first image includes an image of an object; a SLAM module, for obtaining first point cloud data of the object according to the first image; the first point cloud data represents the three-dimensional coordinate value of the surface point of the object in the first camera coordinate system of the terminal; the SLAM module is also used to obtain the posture data of the terminal in the first camera coordinate system according to the first image; a feature extraction module, for obtaining a two-dimensional feature image according to the posture data, the first point cloud data and the first image; a map generation module, for generating map data according to the first point cloud data, the posture data and the two-dimensional feature image; and a communication module, for sending the map data to other terminals or servers.

[0035] Based on the fourth aspect, in a possible embodiment, the feature extraction module is specifically used to: project the first point cloud data onto the first image according to the posture data, and obtain the two-dimensional image coordinates of the first point cloud data corresponding to the image coordinate system of the first image; obtain the two-dimensional feature image according to the image block or image feature point descriptor in the first image corresponding to the two-dimensional image coordinates.

[0036] Based on the fourth aspect, in a possible embodiment, the SLAM module is specifically used to obtain the position and posture data of the terminal in the first camera coordinate system according to the first image and motion data collected by the inertial measurement unit IMU.

[0037] Based on the fourth aspect, in a possible embodiment, the terminal also includes a positioning module; the positioning module is used to obtain positioning data, and the positioning data includes at least one of the GPS positioning data of the terminal, the Beidou positioning data of the terminal, the WIFI positioning data of the terminal, the Bluetooth positioning data of the terminal, or the base station positioning data of the terminal; accordingly, the map data generated by the map generation module also carries the positioning data.

[0038] In a specific implementation, each functional module of the terminal may be used to implement the method described in the first aspect.

[0039] In a fifth aspect, an embodiment of the present invention provides a terminal for data processing of a virtual scene, wherein the virtual scene is one of a virtual reality VR scene, an augmented reality AR scene, and a mixed reality MR scene. The terminal specifically includes: a communication module, which is used to receive map data sent by other terminals, wherein the map data is generated based on the first point cloud data of the object, the posture data of the other terminal in the first camera coordinate system of the other terminal, and the two-dimensional feature image of the other terminal; wherein the first point cloud data represents the three-dimensional coordinate value of the surface point of the object in the first camera coordinate system of the other terminal; a SLAM module, which is used to obtain the posture data of the terminal in the second camera coordinate system of the terminal; the SLAM module is also used to obtain the two-dimensional feature image of the terminal; a coordinate system transformation module, which is used to obtain the coordinate system transformation data between the first camera coordinate system and the second camera coordinate system according to the map data, the posture data of the terminal in the second camera coordinate system, and the two-dimensional feature image of the terminal; and a content synchronization module, which is used to synchronize the content in the virtual scene according to the coordinate system transformation data.

[0040] Based on the fifth aspect, in a possible embodiment, the coordinate system transformation module is specifically used to: use the two-dimensional feature image of the terminal to perform a feature matching operation in the map data to obtain the posture data of the terminal in the first camera coordinate system; obtain the coordinate system transformation data between the first camera coordinate system and the second camera coordinate system based on the posture data of the terminal in the first camera coordinate system and the posture data in the second camera coordinate system.

[0041] Based on the fifth aspect, in a possible embodiment, the terminal also includes an image acquisition module, which is used to capture a second image through a camera, and the second image includes an image of the object; the SLAM module is also used to obtain second point cloud data of the object based on the second image; the second point cloud data represents the three-dimensional coordinate values ​​of the surface points of the object in the second camera coordinate system; the SLAM module is specifically used to obtain the posture data of the terminal in the second camera coordinate system based on the second image; the SLAM module is also specifically used to project the second point cloud data onto the second image based on the posture data of the terminal in the second camera coordinate system to obtain the two-dimensional image coordinates of the second point cloud data in the image coordinate system of the second image; and obtain the two-dimensional feature image of the terminal based on the image blocks or image feature point descriptors corresponding to the two-dimensional image coordinates in the second image.

[0042] Based on the fifth aspect, in a possible embodiment, the content synchronization module is specifically used to: obtain posture transformation data of the anchor point of the virtual scene according to the coordinate system transformation data; and synchronize the content in the virtual scene according to the posture transformation data of the anchor point.

[0043] Based on the fifth aspect, in a possible embodiment, the map data also carries positioning data, and the positioning data includes at least one of the GPS positioning data of the other terminals, the Beidou positioning data of the other terminals, the WIFI positioning data of the other terminals, the Bluetooth positioning data of the other terminals, or the base station positioning data of the other terminals; the SLAM module is specifically used to obtain the two-dimensional feature image of the terminal according to the positioning data.

[0044] In a specific implementation, each functional module of the terminal may be used to implement the method described in the second aspect.

[0045] In a sixth aspect, an embodiment of the present invention provides a server for data processing of virtual scenes, the server comprising: a receiving module, for receiving map data sent by a first terminal, the map data being generated based on first point cloud data of an object, posture data of the first terminal in a first camera coordinate system of the first terminal, and a two-dimensional feature image of the first terminal; wherein the first point cloud data represents the three-dimensional coordinate value of the surface point of the object in the first camera coordinate system of the first terminal; the receiving module is also used to receive the posture data of a second terminal in a second camera coordinate system of the second terminal, and the two-dimensional feature image of the second terminal; a coordinate system transformation module, for performing a feature matching operation in the map data using the two-dimensional feature image of the second terminal to obtain the posture data of the second terminal in the first camera coordinate system; obtaining the coordinate system transformation data between the first camera coordinate system and the second camera coordinate system according to the posture data of the second terminal in the first camera coordinate system and the posture data in the second camera coordinate system; a sending module, for sending the coordinate system transformation data to the second terminal.

[0046] In a specific implementation, each functional module of the server can be used to implement the method described in the third aspect.

[0047] In a seventh aspect, an embodiment of the present invention provides another terminal, comprising: a processor and a coupled memory and a transmitter, wherein the processor can call program instructions stored in the memory to implement the method described in the first aspect.

[0048] In an eighth aspect, an embodiment of the present invention provides another terminal, comprising: a processor and a coupled memory and a receiver, wherein the processor can call program instructions stored in the memory to implement the method described in the second aspect.

[0049] In the ninth aspect, an embodiment of the present invention provides another server, which includes: a processor and a coupled memory and a communication interface. The processor can call program instructions stored in the memory to implement the method described in the third aspect.

[0050] In a tenth aspect, an embodiment of the present invention provides a non-volatile computer-readable storage medium; the computer-readable storage medium is used to store the implementation code of the method described in the first aspect. When the program code is executed by a computing device, the computing device is used for the method described in the first aspect.

[0051] In an eleventh aspect, an embodiment of the present invention provides another non-volatile computer-readable storage medium; the computer-readable storage medium is used to store the implementation code of the method described in the second aspect. When the program code is executed by a computing device, the user device is used for the method described in the second aspect.

[0052] In a twelfth aspect, an embodiment of the present invention provides another non-volatile computer-readable storage medium; the computer-readable storage medium is used to store the implementation code of the method described in the third aspect. When the program code is executed by a computing device, the user device is used for the method described in the third aspect.

[0053] In a thirteenth aspect, an embodiment of the present invention provides a computer program product; the computer program product includes program instructions, and when the computer program product is executed by a computing device, the controller executes the method described in the first aspect. The computer program product can be a software installation package, and when it is necessary to use the method provided by any possible design of the first aspect, the computer program product can be downloaded and executed on the controller to implement the method described in the first aspect.

[0054] In a fourteenth aspect, an embodiment of the present invention provides another computer program product. The computer program product includes program instructions. When the computer program product is executed by a user device, the controller executes the method provided by any possible design of the second aspect. The computer program product can be a software installation package. When it is necessary to use the method provided by any possible design of the second aspect, the computer program product can be downloaded and executed on the controller to implement the method described in the second aspect.

[0055] In a fifteenth aspect, an embodiment of the present invention provides another computer program product. The computer program product includes program instructions. When the computer program product is executed by a user device, the controller executes the method provided by any possible design of the second aspect. The computer program product can be a software installation package. When it is necessary to use the method provided by any possible design of the second aspect, the computer program product can be downloaded and executed on the controller to implement the method described in the third aspect.

[0056] It can be seen that by implementing the embodiment of the present invention, different mobile terminals can use the output data of their respective spatial positioning engines to extract the same type of image features. The second terminal can synchronize the coordinate systems between the two terminals based on the key frames generated by itself and the map data provided by the first terminal, or the second terminal can synchronize the coordinate systems between the two terminals based on the coordinate system transformation data sent by the server. In other words, even if different mobile devices are installed with different spatial positioning engines, content synchronization in the virtual scene can still be achieved, which is conducive to realizing cross-platform multi-person shared AR / VR / MR development and application between different spatial positioning engines, and improving user experience.

[0057] It can also be seen that the embodiments of the present invention can extract features of objects in any scene through an effective feature extraction method, thereby realizing coordinate system synchronization between different terminals. Therefore, multi-person shared AR application scenarios are not restricted by the environment. That is, in the process of realizing multi-user virtual scene interaction, it is no longer necessary to rely on known information such as specific geometric objects. Therefore, multi-person shared AR / VR / MR applications are no longer affected by the environment, meeting the needs of various application scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the background technology, the drawings required for use in the embodiments of the present invention or the background technology will be described below.

[0059] Figure 1 is a schematic diagram of an application architecture provided by an embodiment of the present invention;

[0060] Figure 2 is a schematic diagram of another application architecture provided by an embodiment of the present invention;

[0061] Figure 3 It is a flowchart of a data processing method for a virtual scene provided by an embodiment of the present invention;

[0062] Figure 4 It is a schematic diagram of a first terminal and a second terminal generating a map and a key frame respectively provided by an embodiment of the present invention;

[0063] Figure 5It is a schematic diagram of a second terminal obtaining coordinate system transformation data and anchor point posture transformation data provided by an embodiment of the present invention;

[0064] Figure 6 is a flow chart of another data processing method for a virtual scene provided by an embodiment of the present invention;

[0065] Figure 7 is a schematic diagram of the structure of a terminal provided by an embodiment of the present invention;

[0066] Figure 8 It is a structural diagram of a server provided by an embodiment of the present invention;

[0067] Fig. 9 is a schematic diagram of the structure of a system, a first terminal and a second terminal provided by an embodiment of the present invention;

[0068] Fig.10 This is a schematic diagram of the structure of another system, a first terminal, a second terminal and a server provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0069] The embodiments of the present invention are described below in conjunction with the accompanying drawings in the embodiments of the present invention. The terms used in the implementation mode of the present invention are only used to explain the specific embodiments of the present invention, and are not intended to limit the present invention.

[0070] First, two application architectures involved in the embodiments of the present invention are described.

[0071] See also Figure 1 The first application architecture provided by the embodiment of the present invention includes multiple terminals, which can be mobile terminal devices such as mobile phones, tablet computers, laptop computers, video recorders, etc., or virtual scene terminal devices (such as VR glasses, MR interactive devices, etc.). Each terminal in the multiple terminals can be a terminal of the same model (for example, a mobile phone of the same model), or a terminal of different models (for example, multiple terminals include mobile phones of different models, or multiple terminals include mobile terminal devices and virtual scene terminal devices), for example Figure 1 exemplarily shows a first terminal and a second terminal, and the first terminal and the second terminal are mobile phones of different models.

[0072] The first terminal and the second terminal can move in the same environment of the real world, and the environment can be any natural environment. The first terminal and the second terminal respectively run virtual scene applications (VR or AR or MR applications), and the first terminal and the second terminal can be connected in communication. The first terminal can collect information of any object in the environment through a camera and / or a sensor (for example, the image of object 1 in the environment in the figure is collected, and object 1 can be a complete object or a partial feature of an object), and then send data to the second terminal (such as sending the map data described below). The second terminal can synchronize the virtual scene content moved by the second terminal with the virtual scene content run by the first terminal based on the data sent by the first terminal.

[0073] See also Figure 2 The second application architecture provided by the embodiment of the present invention includes multiple terminals and servers, wherein the terminal can be a mobile terminal device such as a mobile phone, a tablet computer, a laptop computer, a video recorder, or a virtual scene terminal device (such as VR glasses, MR interactive devices, etc.). Each terminal in the multiple terminals can be a terminal of the same model (such as a mobile phone of the same model) or a terminal of different models (for example, multiple terminals include mobile phones of different models, or multiple terminals include mobile terminal devices and virtual scene terminal devices), for example Figure 2 The first terminal and the second terminal are shown as examples, and the first terminal and the second terminal are mobile phones of different models. The server can be one or more physical servers (for example Figure 2 A physical server is exemplarily shown in the figure), it may also be a computer cluster, or it may be a virtual machine in a cloud computing scenario.

[0074] The first terminal and the second terminal can move in the same environment scene in the real world. The first terminal and the second terminal can respectively run virtual scene applications (VR or AR or MR applications), and the first terminal can be connected to the server for communication, and the second terminal can also be connected to the server for communication. The first terminal can collect information about any object in the environment (for example, the image of object 1 in the environment in the figure) through a local camera and / or sensor, and then upload data to the server (such as sending the map data described below). The second terminal can also collect information about the same object in the environment as the first terminal (for example, the image of object 1 in the environment in the figure) through a local camera and / or sensor, and then upload data to the server (such as sending the two-dimensional feature image described below). The server calculates the content synchronization related data (such as the coordinate system conversion data described below) based on the above data, and sends the relevant data to the second terminal, and the second terminal synchronizes the virtual scene content moved by the second terminal with the virtual scene content run by the first terminal according to the relevant data.

[0075] Based on the first application architecture described above, the following describes a data processing method for a virtual scene provided by an embodiment of the present invention. The virtual scene is one of a VR scene, an AR scene, and an MR scene. Figure 3 , Figure 3 This is a flow chart of a data processing method provided by an embodiment of the present invention, which is described from the perspective of a first terminal side and a second terminal side. The first terminal and the second terminal may be terminals of the same model or terminals of different models. The method includes but is not limited to the following steps:

[0076] Step 101: A first terminal captures a first image through a camera of the first terminal.

[0077] Specifically, the first terminal is provided with a camera (or camera head, for details, please refer to the description of the terminal structure below), so the first terminal can shoot the real world environment through the camera to obtain the first image.

[0078] Step 102: The first terminal obtains first point cloud data of objects in the environment based on the first image.

[0079] Specifically, the first terminal is equipped with a spatial positioning engine (also called a SLAM module or a SLAM system, for details, please refer to the description of the terminal structure below). Since the first image is obtained by photographing the environment, the first image contains an image of an object in the environment, and the object may be all or part of the features of any object with any shape in the environment, that is, the object does not have to be a specific object, nor does it have to have a regular shape.

[0080] The spatial positioning engine can calculate the first point cloud data of the object based on the first image, wherein the first point cloud data represents the three-dimensional coordinate value (or 3D coordinate value) of the surface point of the object in the environment in the first camera coordinate system of the first terminal. The first camera coordinate system of the first terminal is the local reference coordinate system of the first terminal, and the first camera coordinate system is a rectangular coordinate system with the intersection of the optical axis and the image plane as the origin of the image coordinate system. In a specific implementation, the origin of the first camera coordinate system is the optical center of the camera of the first terminal, the x-axis and y-axis of the first camera coordinate system are parallel to the two axes of the image coordinate system, and the z-axis of the first camera coordinate system can be the optical axis of the camera, which is perpendicular to the image plane.

[0081] Step 103: The first terminal obtains position and posture data of the first terminal in the first camera coordinate system according to the first image.

[0082] Among them, the posture data is used to represent the position and posture (or direction) of the first terminal in the first camera coordinate system. The position can be represented by three coordinate axes x, y, and z, and the direction can be represented by (α, β, γ), and (α, β, γ) represents the angle of rotation around the three coordinate axes.

[0083] In a possible embodiment, the spatial positioning engine of the first terminal may calculate and obtain the position and posture data of the first terminal in the first camera coordinate system according to the data (first image) collected by the camera.

[0084] In another possible embodiment, an inertial measurement unit (IMU) sensor is also provided in the first terminal, and the input signal of the spatial positioning engine includes image data collected by the camera and data collected by the IMU sensor (which may be called motion data). The spatial positioning engine can calculate the position data of the first terminal in the first camera coordinate system based on the image data and the motion data.

[0085] In another possible embodiment, in addition to the camera and IMU, the first terminal is also provided with a positioning module related to posture or motion (GPS positioning, Beidou positioning, WIFI positioning, or base station positioning, etc., for details, please refer to the description of the terminal structure below). Then, the spatial positioning engine can further refer to the data collected by the positioning module to calculate the posture data of the first terminal in the first camera coordinate system.

[0086] Step 104: The first terminal obtains a two-dimensional feature image based on the posture data, the first point cloud data and the first image corresponding to the same timestamp.

[0087] Specifically, the first terminal projects the first point cloud data onto the first image based on the posture data to obtain the two-dimensional image coordinates (also called 2D image coordinates) of the first point cloud data in the image coordinate system of the first image, and then extracts the two-dimensional feature image (also called 2D feature image) based on the image blocks or image feature point descriptors in the first image corresponding to the two-dimensional image coordinates.

[0088] In a specific embodiment, Figure 4In the first terminal shown, the first terminal can select a frame of image (first image) at a preset time interval, as well as the pose data and first point cloud data of the same timestamp output by the spatial positioning engine, project the first point cloud data into the first image through the pose, obtain 2D image coordinates, and then perform 2D feature description on the 2D image coordinates, wherein the feature description can be an image feature point descriptor or an image block description, wherein the image feature point descriptor includes but is not limited to one of Brief, Brisk, ORB, Freak, SIFT, and SURF. In this way, a 2D feature image of the same timestamp corresponding to the image can be obtained. In an embodiment of the present invention, a set of 2D feature images, first point cloud data, and pose data associated with the same timestamp of the first terminal can be set as a key frame of the first terminal.

[0089] Step 105: The first terminal generates map data according to the first point cloud data, the posture data and the two-dimensional feature image.

[0090] Specifically, the first terminal generates map data based on the first point cloud data and posture data output by the spatial positioning engine, and the 2D feature image associated with the first point cloud data extracted in step 104, and packages them into a data package for subsequent external transmission.

[0091] In an embodiment of the present invention, if a collection of 2D feature images, first point cloud data, and posture data associated with the same timestamp can be set as a key frame of the first terminal, then if the first terminal repeats steps 101 to 104 described above at preset time intervals, then in step 105, the map data finally packaged may be a collection of one or more key frames of the local area where the first terminal is located.

[0092] In addition, in a possible embodiment, if the first terminal is provided with a positioning module (such as GPS positioning, Beidou positioning, WIFI positioning, or base station positioning, etc., for details, please refer to the description of the terminal structure below), then the first terminal can also obtain the positioning data of the first terminal when generating the map data through the positioning module, that is, the positioning data includes at least one of GPS positioning data, Beidou positioning data, WIFI positioning data, Bluetooth positioning data, or base station positioning data. Then, the positioning data is packaged into a data packet together with the above-mentioned map data (or the positioning data is carried in the map data) for subsequent external transmission.

[0093] Step 106: The first terminal sends the map data to the second terminal, and correspondingly, the second terminal receives the map data.

[0094] Step 107: The second terminal captures a second image through the camera of the second terminal.

[0095] Specifically, the second terminal may also be provided with a camera (or camera head, for details, please refer to the description of the terminal structure below). Therefore, the second terminal may shoot the environment of the real world through the camera to obtain the second image.

[0096] Step 108: The second terminal obtains second point cloud data of the object in the environment according to the second image. The second point cloud data represents the three-dimensional coordinate values ​​of the surface points of the object in the second camera coordinate system of the second terminal.

[0097] Specifically, the second terminal is also equipped with a spatial positioning engine (also called a SLAM module or a SLAM system, for details, please refer to the description of the terminal structure below), and the spatial positioning engine of the second terminal can be different from the spatial positioning engine of the first terminal, or can be the same as the spatial positioning engine of the first terminal. Since the second image is obtained by photographing the environment, the second image contains an image of an object in the environment, and the object is the object used by the first terminal in step 102.

[0098] Similarly, the spatial positioning engine can calculate the second point cloud data of the object based on the second image, wherein the second point cloud data represents the three-dimensional coordinate value (or 3D coordinate) of the surface point of the object in the environment in the second camera coordinate system of the second terminal. The second camera coordinate system of the second terminal is the local reference coordinate system of the second terminal, and the second camera coordinate system is a rectangular coordinate system with the intersection of the optical axis and the image plane as the origin of the image coordinate system. In a specific implementation, the origin of the second camera coordinate system is the optical center of the camera of the second terminal, the x-axis and y-axis of the second camera coordinate system are parallel to the two axes of the image coordinate system, and the z-axis of the second camera coordinate system can be the optical axis of the camera, which is perpendicular to the image plane.

[0099] Step 109: The second terminal obtains the position and posture data of the second terminal in the second camera coordinate system according to the second image.

[0100] Similarly, the posture data is used to represent the position and posture (or direction) of the second terminal in the second camera coordinate system. The position can be represented by three coordinate axes x, y, and z, and the direction can be represented by (α, β, γ), where (α, β, γ) represents the angle of rotation around the three coordinate axes.

[0101] In a possible embodiment, the spatial positioning engine of the second terminal may calculate and obtain the position and posture data of the second terminal in the second camera coordinate system according to the data (second image) collected by the camera.

[0102] In another possible embodiment, an IMU sensor is also provided in the second terminal, and the input signal of the spatial positioning engine includes image data collected by the camera and data collected by the IMU sensor (which may be called motion data). The spatial positioning engine can calculate the posture data of the second terminal in the second camera coordinate system based on the image data and motion data.

[0103] In another possible embodiment, in addition to the camera and IMU, the second terminal is also provided with a positioning module related to posture or motion (GPS positioning, Beidou positioning, WIFI positioning, or base station positioning, etc., please refer to the description of the terminal structure below for details). Then, the spatial positioning engine can further refer to the data collected by the positioning module to calculate the posture data of the second terminal in the second camera coordinate system.

[0104] Step 110: The second terminal obtains a two-dimensional feature image based on the posture data, the second point cloud data and the second image.

[0105] Similarly, the second terminal projects the second point cloud data onto the second image based on the posture data of the second terminal in the second camera coordinate system, and obtains the two-dimensional image coordinates (also called 2D image coordinates) of the second point cloud data in the image coordinate system of the second image, and then obtains the two-dimensional feature image (also called 2D feature image) of the second terminal based on the image blocks or image feature point descriptors in the second image corresponding to the two-dimensional image coordinates.

[0106] In a specific embodiment, Figure 4 In the second terminal shown, the second terminal can select a frame of image (second image) at a preset time interval, as well as the pose data and second point cloud data of the same timestamp output by the spatial positioning engine, project the second point cloud data into the second image through the pose, obtain 2D image coordinates, and then perform 2D feature description on the 2D image coordinates, wherein the feature description can be an image feature point descriptor or an image block description, wherein the image feature point descriptor includes but is not limited to one of Brief, Brisk, ORB, Freak, SIFT, and SURF. In this way, a 2D feature image of the same timestamp corresponding to the image can be obtained. In an embodiment of the present invention, the set of the 2D feature image of the second terminal, the second point cloud data, and the pose data of the second terminal associated with the same timestamp of the second terminal can be set as a key frame of the second terminal.

[0107] It should be noted that there is no necessary order between the above-mentioned steps 107-110 and step 106, that is, step 106 may be implemented before step 107, step 106 may also be implemented between steps 107-110, and step 106 may also be implemented after step 110, and the present invention does not make specific limitations on this.

[0108] Step 111: the second terminal obtains coordinate system transformation data between the first camera coordinate system and the second camera coordinate system according to the map data, the position data of the second terminal in the second camera coordinate system and the two-dimensional feature image of the second terminal.

[0109] Specifically, the second terminal can use the key frame of the second terminal to perform feature matching in the map data sent by the first terminal, so as to obtain the pose data of the second terminal in the first camera coordinate system (also referred to as the map coordinate system here) of the first terminal; then, the second terminal obtains the coordinate system transformation data between the first camera coordinate system and the second camera coordinate system based on the pose data of the second terminal in the first camera coordinate system and the pose data in the second camera coordinate system.

[0110] In one implementation, if Figure 5 As shown, the second terminal can perform feature matching based on the key frames determined by itself and the received map data, respectively extract the same image features of the two, output a feature point matching set, and then estimate the pose data of the second terminal relative to the first camera coordinate system, wherein the pose estimation algorithm can be a PNP algorithm. Then, the second terminal obtains the coordinate system transformation data (e.g., coordinate system transformation matrix) between the first camera coordinate system and the second camera coordinate system based on the pose data of the second terminal in the first camera coordinate system and the pose data in the second camera coordinate system. In a specific implementation, the posture transformation data of the anchor point used in the virtual scene can be calculated based on the coordinate system transformation matrix.

[0111] It should be noted that, in a possible embodiment, if the data packet or map data sent by the first terminal to the second terminal carries the positioning data of the first terminal, then in the feature matching process, the second terminal can first determine the search range of the two-dimensional feature image based on the positioning data, and then screen the multiple key frames generated by step 110 multiple times according to the search range, for example, select the key frame that is closer or closest to the positioning data, and then use the key frame to perform feature matching in the map data to obtain the pose data of the second terminal in the first camera coordinate system of the first terminal. This is conducive to improving matching efficiency and accuracy.

[0112] Step 112: The second terminal performs synchronization operations on the content (such as virtual objects) in the virtual scene according to the coordinate system transformation data.

[0113] Specifically, after obtaining the posture transformation data of the anchor point of the virtual scene according to the coordinate system transformation data, the second terminal can achieve posture synchronization of virtual objects in the virtual scene according to the posture transformation data of the anchor point. That is to say, through the synchronization operation, the second terminal can correctly display the posture of the virtual object shared by the first terminal.

[0114] It can be seen that by implementing the embodiment of the present invention, different mobile terminals can use the output data of their respective spatial positioning engines to extract the same type of image features, and the second terminal can then synchronize the coordinate systems between the two terminals based on the key frames generated by itself and the map data provided by the first terminal. In other words, even if different mobile devices are installed with different spatial positioning engines, the content synchronization in the virtual scene can still be achieved, which is conducive to realizing cross-platform multi-person shared AR / VR / MR development and application between different spatial positioning engines, and improving the user experience.

[0115] It can also be seen that the embodiments of the present invention can extract features of objects in any scene through an effective feature extraction method, and then realize the synchronization of coordinate systems between different terminals. Therefore, the multi-person shared AR application scenario is not restricted by the environment. That is, in the process of realizing multi-user virtual scene interaction, it is no longer necessary to rely on known information such as Marker images and objects of specific geometric shapes. Therefore, the realization of multi-person shared AR / VR / MR applications is no longer affected by the environment, and the needs of various application scenarios are met.

[0116] Based on the above second application architecture, another data processing method for a virtual scene provided by an embodiment of the present invention is described below. The virtual scene is one of a VR scene, an AR scene, and an MR scene. Figure 6 , Figure 6 This is a flow chart of another data processing method provided by an embodiment of the present invention, which is described from the perspectives of the first terminal side, the server side, and the second terminal side. The first terminal and the second terminal can be terminals of the same model or terminals of different models. The method includes but is not limited to the following steps:

[0117] Step 201: The first terminal collects a first image through the camera of the first terminal. For specific implementation, please refer to Figure 3 The description of step 101 of the embodiment will not be repeated here.

[0118] Step 202: The first terminal obtains first point cloud data of an object in the environment according to the first image. For specific implementation, please refer to Figure 3 The description of step 102 of the embodiment will not be repeated here.

[0119] Step 203: The first terminal obtains the position and posture data of the first terminal in the first camera coordinate system according to the first image. For specific implementation, please refer to Figure 3 The description of step 103 of the embodiment will not be repeated here.

[0120] Step 204: The first terminal obtains a two-dimensional feature image according to the posture data, the first point cloud data and the first image. For specific implementation, please refer to Figure 3 The description of step 104 of the embodiment will not be repeated here.

[0121] Step 205: The first terminal generates map data according to the first point cloud data, the position data and the two-dimensional feature image. For specific implementation, please refer to Figure 3 The description of step 105 of the embodiment will not be repeated here.

[0122] Step 206: The first terminal sends the map data to the server, and correspondingly, the server receives the map data.

[0123] Step 207: The second terminal collects a second image through the camera of the second terminal. For specific implementation, please refer to Figure 3 The description of step 107 of the embodiment will not be repeated here.

[0124] Step 208: The second terminal obtains second point cloud data of the object in the environment according to the second image. Figure 3 The description of step 108 of the embodiment will not be repeated here.

[0125] Step 209: The second terminal obtains the position and posture data of the second terminal in the second camera coordinate system according to the second image. For specific implementation, please refer to Figure 3 The description of step 109 of the embodiment will not be repeated here.

[0126] Step 210: The second terminal obtains a two-dimensional feature image according to the posture data, the second point cloud data and the second image. For specific implementation, please refer to Figure 3 The description of step 110 of the embodiment will not be repeated here.

[0127] Step 211: The second terminal sends the two-dimensional feature image and the position and posture data of the second terminal to the server.

[0128] In a specific embodiment, the second terminal may set the set of the 2D feature image of the second terminal, the second point cloud data, and the pose data of the second terminal in the second camera coordinate system associated with the same timestamp as a key frame of the second terminal. Then, the second terminal may also directly send the key frame to the server.

[0129] Step 212: The server obtains coordinate system transformation data according to the map data, the position and posture data of the second terminal in the second camera coordinate system, and the two-dimensional feature image of the second terminal.

[0130] In a specific embodiment, the server may use the key frame of the second terminal to perform feature matching in the map data sent by the first terminal, thereby obtaining the pose data of the second terminal in the first camera coordinate system (also referred to as the map coordinate system) of the first terminal; then, the server obtains the coordinate system transformation data between the first camera coordinate system and the second camera coordinate system based on the pose data of the second terminal in the first camera coordinate system and the pose data in the second camera coordinate system.

[0131] In addition, in a possible embodiment, the subsequent server may also calculate the posture transformation data of the anchor point used in the virtual scene according to the coordinate system transformation data.

[0132] It should be noted that the specific implementation process of step 212 can be referred to Figure 3 The description of step 111 of the embodiment will not be repeated here.

[0133] Step 213: The server sends the coordinate system transformation data to the second terminal. It should be noted that if in the above step 212, the server has calculated the posture transformation data of the anchor point used in the virtual scene according to the coordinate system transformation data, then the server can also send the posture transformation data of the anchor point to the second terminal.

[0134] Step 214: The second terminal performs synchronization operations on the content in the virtual scene according to the coordinate system transformation data. For the specific implementation process, please refer to Figure 3 The description of step 112 of the embodiment is not repeated here.

[0135] It can be seen that by implementing the embodiments of the present invention, different mobile terminals can use the output data of their respective spatial positioning engines to perform the same type of image feature extraction, wherein the first terminal can further generate map data and upload it to the server, and the second terminal can further generate key frames and upload them to the server. The server then obtains coordinate system synchronization data based on the key frames and map data and sends it to the second terminal, thereby realizing coordinate system synchronization between terminals. In other words, even if different spatial positioning engines are installed on different mobile terminals, content synchronization in the virtual scene can still be achieved, which is conducive to realizing cross-platform multi-person shared AR / VR / MR development and application between different spatial positioning engines, and improving user experience. At the same time, since the server is used as a data interaction node between different terminals, the content synchronization requirements between a large number of terminals can be efficiently met.

[0136] It can also be seen that the embodiments of the present invention can extract features of objects in any scene through an effective feature extraction method, and then realize the synchronization of coordinate systems between different terminals. Therefore, the multi-person shared AR application scenario is not restricted by the environment. That is, in the process of realizing multi-user virtual scene interaction, it is no longer necessary to rely on known information such as Marker images and objects of specific geometric shapes. Therefore, the realization of multi-person shared AR / VR / MR applications is no longer affected by the environment, and the needs of various application scenarios are met.

[0137] The above describes in detail the relevant methods provided by the embodiments of the present invention. Based on the same inventive concept, the following further describes the relevant devices of the embodiments of the present invention.

[0138] See also Figure 7 , Figure 7 FIG. 1 is a structural block diagram of an implementation method of a terminal provided by an embodiment of the present invention. Figure 7 As shown, the terminal 300 may include: a chip 310 , a memory 315 (one or more computer-readable storage media), a peripheral system 317 , a positioning module 331 , and a communication module 332 . These components may communicate on one or more communication buses 314 .

[0139] The peripheral system 317 is mainly used to implement the interaction function between the terminal 300 and the user / external environment. In specific implementation, the peripheral system 317 may include: a touch screen controller 318, a camera controller 319, and several components in the sensor management module 320. Each controller may be coupled with a corresponding peripheral device such as a touch screen 323, a camera 324, and a sensor 325. In some embodiments, the touch screen 323 may be obtained by coupling a touch sensing element and a display screen. The touch sensing element may be arranged below the display screen. The touch sensing element may be used to detect the touch pressure (such as the user's touch and sliding operation) acting on the display screen when the user inputs a touch operation through the display screen. The display screen is used to display content (such as displaying virtual objects of virtual scene applications); in some embodiments, the camera 324 may be a monocular camera, a binocular camera, or a depth camera; in some embodiments, the sensor 325 may include an inertial measurement unit IMU, and may also include other sensors (for example, a proximity sensing sensor). It should be noted that the peripheral system 317 may also include other I / O peripherals.

[0140] The chip 310 may include: one or more processors 311, a clock module 312, and a possible power management module 313. The clock module 312 integrated in the chip 310 is mainly used to generate a clock required for data transmission and timing control for the processor 311. The power management module 313 integrated in the baseband chip 310 is mainly used to provide a stable and high-precision voltage for the processor 311 and the peripheral system.

[0141] The memory 315 is coupled to the processor 311 and is used to store data (such as image data, point cloud data, map data, key frame data, coordinate system conversion data, etc.), various software programs and / or multiple sets of program instructions. In a specific implementation, the memory 315 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more disk storage devices, flash memory devices or other non-volatile solid-state storage devices. The memory 315 can also store one or more applications. As shown in the figure, these applications may include: virtual scene applications such as AR / VR / MR, map applications, image management applications, etc. The memory 115 can also be used to store operating systems, such as ANDROID, IOS, WINDOWS, or embedded operating systems such as LINUX. The memory 115 can also store a network communication program, which can be used to communicate with one or more additional devices, one or more terminal devices, and one or more network devices. The memory 115 can also store a user interface program, which can display the content of the application (such as virtual objects in a virtual scene) vividly through a graphical operation interface, and receive user control operations on the application through input controls such as menus, dialog boxes, and buttons.

[0142] The positioning module 331 is used to realize the physical positioning of the terminal 300, and the motion data of the terminal 300 can be collected through the positioning module 331. The positioning module 331 may include, for example, one or more of a WIFI positioning module, a Bluetooth positioning module, a base station positioning module, and a satellite positioning module (such as a GPS positioning module and / or a Beidou positioning module).

[0143] The communication module 332 integrates a transmitter and a receiver for receiving and sending radio frequency signals, so that the terminal 300 can establish a communication connection with other terminals, or the terminal 300 can establish a communication connection with a server. The communication module 332 mainly integrates the receiver and the transmitter of the terminal 300. In a specific implementation, the communication module 332 may include, but is not limited to: an antenna system, an RF transceiver, one or more amplifiers, a tuner, one or more oscillators, a digital signal processor, a CODEC chip, a SIM card, and a storage medium. In some embodiments, the communication module 332 can also be implemented on a separate chip.

[0144] It should be understood that the above-mentioned terminal 300 is only an example provided by an embodiment of the present invention, and the terminal 300 may have more or fewer components than those shown, may combine two or more components, or may have different configurations of components.

[0145] In a specific embodiment of the present invention, the terminal 300 may be the Figure 3 or Figure 6In a specific implementation, the camera 324 can be used to collect images of objects in the environment, and the processor 311 can be used to call the program instructions in the memory 315 to implement the above embodiment of the present invention. Figure 3 or Figure 6 The functions of the first terminal or the second terminal in the data processing method described in the embodiment, and therefore the functional implementation of each component of the terminal 300, can refer to the above description, which will not be repeated here.

[0146] See also Figure 8 , Figure 8 FIG. 1 is a structural block diagram of an implementation method of a server provided by an embodiment of the present invention. Figure 8 As shown, the server 400 includes a processor 403, a memory 401 (one or more computer-readable storage media), and a communication interface 402. These components can communicate on one or more communication buses 404. Among them:

[0147] The processor 403 may be one or more central processing units (CPUs). When the processor 403 is a CPU, the CPU may be a single-core CPU or a multi-core CPU.

[0148] The memory 401 is coupled to the processor 403 and is used to store various software programs and / or multiple sets of instructions, and data (such as map data, key frame data, coordinate system conversion data, etc.). In a specific implementation, the memory 401 includes but is not limited to a random access memory (RAM), a read-only memory (ROM), an erasable programmable read only memory (EPROM), or a portable read-only memory (CD-ROM). Specifically, the memory 401 can also be used to store an algorithm program for calculating coordinate system conversion data.

[0149] The communication interface 402 mainly integrates a receiver and a transmitter, wherein the receiver is used to receive data sent by the terminal, and the transmitter is used to send data to the terminal. In a specific implementation, the transmitter can be used to send coordinate system conversion data or anchor point posture conversion data to the terminal, and the receiver can be used to receive map data or key frame data uploaded by the terminal.

[0150] It should be understood that the above-mentioned server 400 is only an example provided in the embodiment of the present invention. In a specific implementation, the server 400 may have more components than those shown in the figure.

[0151] In a specific embodiment of the present invention, the server 400 may be Figure 6 In a specific implementation, the processor 403 can be used to call the program instructions in the memory 401 to implement the above embodiment of the present invention. Figure 6 The functions of the server in the data processing method described in the embodiment, and therefore the functional implementation of each component of the server 400 can refer to the above description, which will not be repeated here.

[0152] See also Fig. 9 , Fig. 9 1 is a structural block diagram of a multi-user interactive system provided by an embodiment of the present invention. The system includes a terminal 51 and a terminal 52, and the terminal 51 and the terminal 52 can be connected to each other through their respective communication modules.

[0153] The terminal 51 includes an image acquisition module 511, a SLAM module 512, a feature extraction module 513, a map generation module 514, and a communication module 515. In a specific implementation, the data / programs of these functional modules may be stored in the memory 315, and these functional modules may be run on the processor 311.

[0154] An image acquisition module 511, configured to acquire a first image;

[0155] The SLAM module 512 is used to obtain first point cloud data of an object in the environment according to the first image; the first point cloud data represents the three-dimensional coordinate values ​​of the surface points of the object in the environment in the first camera coordinate system of the terminal 51; and is also used to obtain the position and posture data of the terminal 51 in the first camera coordinate system according to the first image;

[0156] A feature extraction module 513, configured to obtain a two-dimensional feature image according to the posture data, the first point cloud data and the first image;

[0157] A map generation module 514, configured to generate map data according to the first point cloud data, the position and posture data, and the two-dimensional feature image;

[0158] The communication module 515 is used to send the map data to the terminal 52 .

[0159] The terminal 52 includes an image acquisition module 521, a SLAM module 522, a feature extraction module 523, a coordinate system transformation module 524, a communication module 525, and a content synchronization module 526. In a specific implementation, the data / programs of these functional modules may be stored in the memory 315, and these functional modules may be run on the processor 311.

[0160] The communication module 525 is used to receive map data sent by the terminal 51, wherein the map data is generated based on first point cloud data of an object in the environment, position data of the terminal 51 in a first camera coordinate system of the terminal 51, and a two-dimensional feature image of the terminal 51; wherein the first point cloud data represents a three-dimensional coordinate value of a surface point of the object in the first camera coordinate system of the terminal 51;

[0161] An image acquisition module 521, used for acquiring a second image;

[0162] The SLAM module 522 is used to obtain the position and posture data of the terminal 52 in the second camera coordinate system of the terminal 52;

[0163] A feature extraction module 523, used to obtain a two-dimensional feature image of the terminal 52;

[0164] A coordinate system transformation module 524, configured to obtain coordinate system transformation data between the first camera coordinate system and the second camera coordinate system according to the map data, the position and posture data of the terminal 52 in the second camera coordinate system, and the two-dimensional feature image of the terminal 52;

[0165] The content synchronization module 526 is used to synchronize the content in the virtual scene according to the coordinate system transformation data.

[0166] It should be noted that, in a specific embodiment of the present invention, the terminal 51 may be Figure 3 or Figure 6 In the embodiment, the first terminal, the terminal 52 may be the Figure 3 or Figure 6 That is, in a specific implementation, the relevant modules in terminal 51 and the relevant modules in terminal 52 can be used to implement the above-mentioned embodiment of the present invention respectively. Figure 3 or Figure 6 The relevant functional steps of the first terminal and the second terminal in the data processing method described in the embodiment are not repeated here.

[0167] See also Fig.10 , Fig.10 6 is a structural block diagram of another multi-user interactive system provided by an embodiment of the present invention. The system includes a terminal 61, a terminal 62 and a server 63, wherein the terminal 61 and the server 63 can be connected to each other in communication, and the terminal 62 and the server 63 can be connected to each other in communication.

[0168] The terminal 61 includes an image acquisition module 611, a SLAM module 612, a feature extraction module 613, a map generation module 614, and a communication module 615. In a specific implementation, the data / programs of these functional modules may be stored in the memory 315, and these functional modules may be run on the processor 311.

[0169] An image acquisition module 611 is used to acquire a first image;

[0170] The SLAM module 612 is used to obtain first point cloud data of an object in the environment according to the first image; the first point cloud data represents the three-dimensional coordinate value of the surface point of the object in the environment in the first camera coordinate system of the terminal 61; and is also used to obtain the position and posture data of the terminal 61 in the first camera coordinate system according to the first image;

[0171] A feature extraction module 613, configured to obtain a two-dimensional feature image according to the posture data, the first point cloud data and the first image;

[0172] A map generation module 614, configured to generate map data according to the first point cloud data, the position and posture data, and the two-dimensional feature image;

[0173] The communication module 615 is used to send the map data to the server 63 .

[0174] The terminal 62 includes an image acquisition module 621, a SLAM module 622, a feature extraction module 623, a communication module 624, and a content synchronization module 625. In a specific implementation, the data / programs of these functional modules may be stored in the memory 315, and these functional modules may be run on the processor 311.

[0175] An image acquisition module 621 is used to acquire a second image;

[0176] The SLAM module 622 is used to obtain the position and posture data of the terminal 62 in the second camera coordinate system of the terminal 62;

[0177] A feature extraction module 623, used to obtain a two-dimensional feature image of the terminal 62;

[0178] The communication module 624 is used to send the key frame of the terminal 62 to the server, where the key frame of the terminal 62 includes the position and posture data of the terminal 62 in the second camera coordinate system of the terminal 62 and the two-dimensional feature image of the terminal 62 .

[0179] The communication module 624 is also used to receive coordinate system transformation data sent by the server 63 .

[0180] The content synchronization module 625 is used to synchronize the content in the virtual scene according to the coordinate system transformation data.

[0181] The server includes a receiving module 631, a coordinate system transformation module 632 and a sending module 633. In a specific implementation, the receiving module 631 and the sending module 633 can also be integrated into a communication module 634, that is, the receiving module 631 and the sending module 633 are respectively used as two sub-functions of the communication module 634. In a specific implementation, the data / programs of these functional modules can be stored in the above-mentioned memory 401, and these functional modules can be run on the above-mentioned processor 403.

[0182] The receiving module 631 is used to receive the map data sent by the terminal 61, wherein the map data is generated based on the first point cloud data of the object in the environment, the position and posture data of the terminal 61 in the first camera coordinate system of the terminal 61, and the two-dimensional feature image of the terminal 61; wherein the first point cloud data represents the three-dimensional coordinate value of the surface point of the object in the first camera coordinate system of the terminal 61; and is also used to receive the position and posture data of the terminal 62 in the second camera coordinate system of the terminal 62, and the two-dimensional feature image of the terminal 62;

[0183] A coordinate system transformation module 632 is used to perform a feature matching operation in the map data using the two-dimensional feature image of the terminal 62 to obtain the position and posture data of the terminal 62 in the first camera coordinate system; and obtain coordinate system transformation data between the first camera coordinate system and the second camera coordinate system according to the position and posture data of the terminal 62 in the first camera coordinate system and the position and posture data in the second camera coordinate system;

[0184] The sending module 633 is used to send the coordinate system transformation data to the terminal 62.

[0185] It should be noted that, in a specific embodiment of the present invention, the terminal 61 may be Figure 6 In the embodiment, the first terminal, the terminal 62 may be the Figure 6 In the embodiment, the second terminal, the server 63 may be the Figure 6 That is to say, in a specific implementation, the relevant modules in the terminal 61, the relevant modules in the terminal 62, and the relevant modules in the server 63 can be respectively used to implement the above-mentioned embodiments of the present invention. Figure 6 The relevant functional steps of the first terminal, the second terminal, and the server in the data processing method described in the embodiment are not repeated here.

[0186] It should be noted that the present invention Fig. 9 or Fig.10The feature extraction module, map generation module and coordinate system transformation module proposed in the embodiment can provide a unified external interface. Through the unified external interface, the development work of multi-person shared AR applications for different application scenarios can be greatly reduced, thereby improving the user experience.

[0187] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one network site, computer, server or data center to another network site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer, or it can be a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape, etc.), an optical medium (e.g., a DVD, etc.), or a semiconductor medium (e.g., a solid-state hard disk), etc.

[0188] In the above embodiments, the description of each embodiment has different emphases. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

Claims

1. A data processing method for a virtual scene, characterized in that: The method comprises: Acquire a first image, the first image including an image of an object, the object being all or part of features of any object having any shape in an environment; Obtaining first point cloud data of the object according to the first image; the first point cloud data represents the three-dimensional coordinate values ​​of the surface points of the object in the first camera coordinate system of the first terminal; The first terminal obtains, according to the first image, posture data of the first terminal in the first camera coordinate system, where the posture data is used to represent the position and posture of the first terminal in the first camera coordinate system, where the position is represented by three coordinate axes x, y, and z in the first camera coordinate system, and the posture is represented by (α, β, γ), where (α, β, γ) represents angles of rotation around the three coordinate axes; Obtaining a two-dimensional feature image according to the posture data, the first point cloud data and the first image; Map data is generated according to the first point cloud data, the posture data and the two-dimensional feature image.

2. The method according to claim 1, characterized in that The step of obtaining a two-dimensional feature image according to the posture data, the first point cloud data and the first image comprises: Projecting the first point cloud data onto the first image according to the posture data to obtain two-dimensional image coordinates of the first point cloud data in an image coordinate system of the first image; The two-dimensional feature image is obtained according to the image block or image feature point descriptor in the first image corresponding to the two-dimensional image coordinates.

3. The method according to claim 2, characterized in that The obtaining, according to the first image, the position and posture data of the first terminal in the first camera coordinate system specifically includes: According to the first image and the motion data collected by the inertial measurement unit IMU, the position and posture data of the first terminal in the first camera coordinate system is obtained.

4. The method according to claim 3, characterized in that Before generating map data according to the first point cloud data, the position and posture data, and the two-dimensional feature image, the method further includes: Acquire positioning data, the positioning data including at least one of GPS positioning data of the terminal, Beidou positioning data of the first terminal, WiFi positioning data of the first terminal, Bluetooth positioning data of the first terminal, or base station positioning data of the first terminal; Correspondingly, the map data also carries the positioning data.

5. The method according to any one of claims 1 to 4, characterized in that: The virtual scene is one of a virtual reality VR scene, an augmented reality AR scene, and a mixed reality MR scene.

6. A data processing method for a virtual scene, characterized in that: The method comprises: Acquire map data, where the map data is generated based on first point cloud data of an object, position and posture data of a first terminal in a first camera coordinate system of the first terminal, and a two-dimensional feature image of the first terminal; wherein the first point cloud data represents the three-dimensional coordinate values ​​of the surface points of the object in the first camera coordinate system of the first terminal; the position and posture data of the first terminal in the first camera coordinate system of the first terminal are used to represent the position and posture of the first terminal in the first camera coordinate system, where the position is represented by three coordinate axes x, y, and z in the first camera coordinate system, and the posture is represented by (α, β, γ), where (α, β, γ) represents the angle of rotation around the three coordinate axes, and the object is all or part of the features of any object with any shape in the environment; Acquire position and posture data of the second terminal in a second camera coordinate system of the second terminal; Acquire a two-dimensional feature image of the second terminal; Obtaining coordinate system transformation data between the first camera coordinate system and the second camera coordinate system according to the map data, the position and posture data of the second terminal in the second camera coordinate system, and the two-dimensional feature image of the second terminal; The content in the virtual scene is synchronized according to the coordinate system transformation data.

7. The method according to claim 6, characterized in that The obtaining, according to the map data, the position data of the second terminal in the second camera coordinate system, and the two-dimensional feature image of the second terminal, coordinate system transformation data between the first camera coordinate system and the second camera coordinate system comprises: Using the two-dimensional feature image of the second terminal to perform a feature matching operation in the map data, to obtain the position and posture data of the second terminal in the first camera coordinate system; Coordinate system transformation data between the first camera coordinate system and the second camera coordinate system is obtained according to the position and posture data of the second terminal in the first camera coordinate system and the position and posture data of the second terminal in the second camera coordinate system.

8. The method according to claim 7, characterized in that Before acquiring the position and posture data of the second terminal in the second camera coordinate system of the second terminal, the method further includes: acquiring a second image, the second image comprising an image of the object; and, According to the second image, second point cloud data of the object is obtained; the second point cloud data represents the three-dimensional coordinate values ​​of the surface points of the object in the second camera coordinate system; Correspondingly, the acquiring the position and posture data of the second terminal in the second camera coordinate system of the second terminal includes: acquiring the position and posture data of the second terminal in the second camera coordinate system according to the second image; Correspondingly, the obtaining of the two-dimensional feature image of the second terminal includes: projecting the second point cloud data onto the second image according to the posture data of the second terminal in the second camera coordinate system to obtain the two-dimensional image coordinates of the second point cloud data corresponding to the image coordinate system of the second image; and obtaining the two-dimensional feature image of the second terminal according to the image blocks or image feature point descriptors in the second image corresponding to the two-dimensional image coordinates.

9. The method according to claim 8, characterized in that The step of synchronizing the content in the virtual scene according to the coordinate system transformation data includes: Obtaining posture transformation data of the anchor point of the virtual scene according to the coordinate system transformation data; The content in the virtual scene is synchronized according to the posture transformation data of the anchor point.

10. The method according to claim 9, characterized in that The map data also carries positioning data, and the positioning data includes at least one of GPS positioning data of the first terminal, Beidou positioning data of the first terminal, WIFI positioning data of the first terminal, Bluetooth positioning data of the first terminal, or base station positioning data of the first terminal; Correspondingly, the acquiring the two-dimensional feature image of the second terminal includes: Determining a search range of a two-dimensional feature image according to the positioning data; According to the search range, the two-dimensional feature image of the second terminal is determined from a plurality of historical two-dimensional feature images.

11. The method according to any one of claims 6 to 10, characterized in that: The virtual scene is one of a virtual reality VR scene, an augmented reality AR scene, and a mixed reality MR scene.

12. A data processing method for a virtual scene, characterized in that: The method comprises: Acquire map data, wherein the map data is generated based on first point cloud data of an object, pose data of a first terminal in a first camera coordinate system of the first terminal, and a two-dimensional feature image of the first terminal; wherein the first point cloud data represents the three-dimensional coordinate values ​​of the surface points of the object in the first camera coordinate system of the first terminal; the pose data is used to represent the position and posture of the first terminal in the first camera coordinate system, wherein the position is represented by three coordinate axes x, y, and z in the first camera coordinate system, and the pose is represented by (α, β, γ), wherein (α, β, γ) represents the angle of rotation around the three coordinate axes, and the object is all or part of the features of any object with any shape in the environment; Acquire the position and posture data of the second terminal in the second camera coordinate system of the second terminal, and the two-dimensional feature image of the second terminal; Using the two-dimensional feature image of the second terminal to perform a feature matching operation in the map data, to obtain the position and posture data of the second terminal in the first camera coordinate system; Coordinate system transformation data between the first camera coordinate system and the second camera coordinate system is obtained according to the position and posture data of the second terminal in the first camera coordinate system and the position and posture data of the second terminal in the second camera coordinate system.

13. A terminal, characterized in that: include: A processor and a coupled memory, wherein the processor can call program instructions stored in the memory to implement the method according to any one of claims 1 to 5.

14. A terminal, characterized in that: include: A processor and a coupled memory, wherein the processor can call program instructions stored in the memory to implement the method according to any one of claims 6 to 11.

15. A server, characterized in that: include: A processor and a coupled memory, wherein the processor can call program instructions stored in the memory to implement the method according to claim 12.

16. A non-volatile computer-readable storage medium storing program codes, wherein when the program codes are executed by a computer device, the computer device executes the method according to any one of claims 1 to 5.

17. A non-volatile computer-readable storage medium storing program codes, wherein when the program codes are executed by a computer device, the computer device executes the method according to any one of claims 6 to 11.

18. A non-volatile computer-readable storage medium storing program codes, wherein when the program codes are executed by a computer device, the computer device executes the method according to claim 12.

Citation Information

Patent Citations

  • Method, system, and interaction system for synchronous positioning and map construction based on cloud computing

    CN107885871A

  • Coordinate system determination method and apparatus, storage medium and electronic device

    CN108389264A

  • Generation and Sharing Coordinate System Between Users on Mobile

    US20140267234A1

  • Systems and methods for augmented and virtual reality

    WO2015161307A1