[go: up one dir, main page]

WO2024092890A1 - Local multi-device rapid spatial anchors synchronization method and system for mixed reality - Google Patents

Local multi-device rapid spatial anchors synchronization method and system for mixed reality Download PDF

Info

Publication number
WO2024092890A1
WO2024092890A1 PCT/CN2022/133039 CN2022133039W WO2024092890A1 WO 2024092890 A1 WO2024092890 A1 WO 2024092890A1 CN 2022133039 W CN2022133039 W CN 2022133039W WO 2024092890 A1 WO2024092890 A1 WO 2024092890A1
Authority
WO
WIPO (PCT)
Prior art keywords
host
local
guest
coordinate system
timestamp
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2022/133039
Other languages
French (fr)
Chinese (zh)
Inventor
胡伯涛
张宇辰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Holo Interactive Shenzhen Ltd
Original Assignee
Holo Interactive Shenzhen Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Holo Interactive Shenzhen Ltd filed Critical Holo Interactive Shenzhen Ltd
Publication of WO2024092890A1 publication Critical patent/WO2024092890A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N13/00Stereoscopic video systems; Multi-view video systems; Details thereof
    • H04N13/30Image reproducers
    • H04N13/398Synchronisation thereof; Control thereof
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Definitions

  • the present invention belongs to the technical field of mixed reality, and in particular relates to a method and system for local multi-device rapid spatial anchor point synchronization for mixed reality.
  • Mixed Reality (MR) and Augmented Reality (AR) are technologies that use HMD (Head Mounted Display), smartphones, or other display devices to render virtual content that can be associated with the real world, allowing users to simultaneously see the real world and the virtual content superimposed on it and interact with these virtual contents.
  • HMD Head Mounted Display
  • most applications of mixed reality technology are single-person experiences, that is, the virtual content rendered by the device can only be seen by the user wearing the device. Even if two or more users are in the same real space, the virtual content they see is different, so that more than two users cannot interact with the same virtual content at the same time.
  • the content rendered by the head display device can only be seen by the wearer, this mixed reality experience can only be observed from a first-person perspective.
  • a third party without a head display cannot see the content that the wearer is playing from a third-person perspective, making the dissemination of the mixed reality experience difficult.
  • the Chinese invention patent with the authorization announcement number "CN107945116B” discloses a coordinate axis synchronization method for realizing AR indoor positioning between multiple devices.
  • the technical solution includes the following steps: on each device participating in the online connection, the local coordinate system of each device is established using its own position and the angle of the gyroscope; any one device is selected as the main reference device, and the other devices are selected as slave devices, the coordinate system of the main reference device is used as the main reference coordinate system, and the coordinate system of other slave devices is corrected; the slave device obtains the position information of the main reference device and converts it into the coordinates of the slave device based on the main reference coordinate system.
  • the multi-device coordinate axis synchronization method provided by the technical solution can form a unified coordinate system between various devices, and conduct more convenient and unified online interaction, which is helpful to realize the combination of virtual and reality in a large range.
  • the accuracy of coordinate synchronization is insufficient, and the user experience is poor.
  • the Chinese invention patent with the authorization announcement number "CN109766001B” discloses a method for unifying the coordinate systems of different MR devices.
  • the unification method includes: taking any point in the preset space as a reference point, obtaining the relative position and rotation information of each calibration plate in the preset space relative to the reference point; binding each MR device to the corresponding calibration plate; establishing a global coordinate system with the reference point as the origin; unifying the relative position and rotation information of the original coordinate system of each MR device into the global coordinate system.
  • This technical solution sets a calibration plate and a reference point in the preset space, binds the MR device to the calibration plate, determines the position of each MR device in the global coordinate system established with the reference calibration plate as the origin through the relative position and rotation information of the calibration plate and the reference point, and corresponds the MR device to the global coordinate system, thereby realizing the interaction of different MR devices in the same scene.
  • the synchronization process of this technical solution is relatively cumbersome, resulting in a low synchronization speed of the spatial coordinate system.
  • a local multi-device fast spatial anchor synchronization method for mixed reality includes the following steps:
  • S1 Multiple devices in a local space establish a local network connection to achieve data transmission between the devices. Any one of the multiple devices is used as a host to create a local network, and other devices are used as guests to join the local network created by the host.
  • Time synchronization is performed between the host and the guest in the local network.
  • the guest and the host first exchange their local timestamps with each other, and then calculate the time offset between the local timestamp of the guest and the local timestamp of the host, and adjust and implement the time synchronization between the guest and the host according to the time offset.
  • S3 Synchronize the spatial anchor points of the host and a guest in the local network, and use a specific image displayed on the display system of the host as the anchor point.
  • the guest scans the specific image through augmented reality image tracking technology to obtain the second position and rotation of the image anchor point in the spatial coordinate system of the guest, and requests the host for the first position and rotation of the anchor point in the spatial coordinate system of the host at the same timestamp.
  • the guest obtains two position and rotation data as a pair of pose pairs.
  • the guest scans the anchor point multiple times to obtain multiple pose pairs, and calculates the multiple pose pairs through the least squares method to obtain the third position and rotation of the spatial coordinate origin of the host in the spatial coordinate system of the guest.
  • the position and rotation of the origin of the spatial coordinate system of the host and the guest are the same, and the synchronization of the spatial coordinate systems between devices is completed.
  • Other guests can synchronize the spatial coordinate system with the host in the local network, or synchronize the spatial coordinate system with the guest in the local network that has completed the spatial coordinate system synchronization.
  • the step S1 specifically comprises:
  • S1-1 The host creates a local network and broadcasts on the local network via wireless communication.
  • S1-2 The guest machine searches for the host's broadcast via the wireless communication method.
  • S1-3 The guest machine discovers the broadcast and sends a connection request to the host machine using the wireless communication method.
  • S1-4 The host receives the connection request, agrees to the connection request, and establishes a network connection between the guest and the host.
  • step S2 is specifically:
  • S2-1 A guest sends the local timestamp of the guest to the host.
  • S2-2 The host sends the time point at which the local timestamp 1 is received as the local timestamp 2 to the guest machine.
  • S2-3 The guest machine receives the time point of the local timestamp 2 as the local timestamp 3, and calculates and saves the timestamp offset between the guest machine and the host machine according to the local timestamp 1, the local timestamp 2 and the local timestamp 3.
  • S2-5 Calculate the standard deviation of the multiple timestamp offsets. If the standard deviation is not less than the preset value, abandon the earliest calculated timestamp offset and repeat steps S2-1 to S2-3 until the standard deviation is less than the preset value. Calculate the average value of the multiple timestamp offsets as the final timestamp offset result.
  • the formula for calculating the timestamp offset in step S2-3 is:
  • T0 is local timestamp one
  • T0′ is local timestamp two
  • T1 is local timestamp three.
  • the guest creates a queue to store the multiple timestamp offsets.
  • the step S3 is specifically:
  • S3-1 A specific picture is displayed on the display system of the host, and the specific picture is an anchor point in the space.
  • the host uses an accelerometer, a gyroscope and an imaging system to calculate the position and rotation of the specific picture in the local coordinate system of the host in real time based on the unchanged offset vector of the specific picture and the host imaging system.
  • a passenger plane in the local network uses an imaging system to scan the specific image through augmented reality image tracking technology.
  • the augmented reality image tracking technology identifies the second position and rotation of the specific image in the scene, sends the second position and rotation to the host, and receives the first position and rotation sent by the host.
  • the first position and rotation and the second position and rotation have the same timestamp.
  • the guest aircraft obtains multiple pairs of first positions and rotations, and second positions and rotations at different timestamps, calculates the best displacement vector and the best rotation by the least squares method, obtains the position and rotation of the origin of the local space coordinate system of the host relative to the origin of the local space coordinate system of the guest aircraft, resets the origin of the local space coordinate system of the guest aircraft to the origin of the local space coordinate system of the host aircraft, and completes the spatial coordinate system synchronization of the host aircraft and the guest aircraft.
  • the spatial coordinate system of the devices in the local network is synchronized by resetting the origin of its own local space coordinate system to the origin of the local space coordinate system of the host aircraft or the origin of the local space coordinate system of any synchronized guest aircraft.
  • S3-4 Render a virtual object of the same size as the host device in the mixed reality virtual space of the guest aircraft, and synchronize the position and rotation of the virtual object with the host in real time. If the virtual object does not completely overlap with the host in reality, the guest aircraft will repeat steps S3-1 to S3-3 until the virtual object completely overlaps with the host in reality.
  • the expression of the optimal displacement vector t is:
  • the optimal rotation ⁇ is calculated as follows:
  • P′ a,i,x and P′ a,i,z are the differences between an anchor point in the spatial coordinate system of the host and its weight center
  • P′ b,i,x and P′ b,i,z are the differences between an anchor point in the spatial coordinate system of the guest aircraft and its weight center
  • R′ i,1,x , R′ i,1,z , R′ i,3,x and R′ i,3,z are the rotation differences between the spatial coordinate systems of the host and a guest aircraft
  • c is an adjustable constant greater than 0.
  • a local multi-device fast spatial anchor synchronization system for mixed reality comprising a memory and a processor, the memory storing instructions, the instructions enabling the processor to execute: the above-mentioned local multi-device fast spatial anchor synchronization method for mixed reality.
  • a machine-readable storage medium having instructions stored thereon, wherein the instructions are used to cause a machine to execute: the above-mentioned local multi-device fast spatial anchor synchronization method for mixed reality.
  • the present invention has the following technical effects:
  • the synchronization method provided by the present invention first establishes a local network in the local space, which helps to overcome the dependence on the external network and reduce the network delay to improve the accuracy and speed of spatial synchronization; then all devices in the local network are time synchronized to further improve the accuracy of spatial synchronization; on the basis of establishing the local network and time synchronization, the spatial anchor point is determined, and the optimal position and optimal rotation are calculated using the least squares method according to the position and rotation of the anchor point in each spatial coordinate system to complete the spatial synchronization between devices, thereby meeting the real-time and accuracy requirements of mixed reality applications for spatial coordinate synchronization.
  • the synchronization method provided by the present invention selects any device in the local space as the host, establishes a local network through a local wireless communication method, and other devices join the local network as guests, thereby overcoming the dependence on the external network environment, so that multiple devices in the local space can use multi-person mixed reality applications even when the external network signal is poor or there is no external network signal.
  • the synchronization method provided by the present invention uses a specific image displayed by the device display system as an anchor point.
  • a QR code image is a good choice because the QR code image is complex enough and has enough feature points, which is conducive to rapid recognition by the scanning device.
  • the QR code image itself has the characteristic of carrying information, which can send additional information from the scanned device to the scanning device without transmitting it through the network.
  • the synchronization method provided by the present invention can be applied to both handheld mixed reality devices (mobile phones and tablet computers) and mixed reality head displays (HMDs) driven by mobile phones. Any number of the above two devices can establish a network and synchronize spatial anchor points through this method, thereby providing a multi-person mixed reality experience.
  • HMDs mixed reality head displays
  • the synchronization method provided by the present invention uses augmented reality image tracking technology to perform fast spatial coordinate synchronization between two devices by having the guest plane scan a specific image displayed on the host screen as an anchor point, or by having the guest plane scan a specific image displayed on the screen of a synchronized guest plane as an anchor point. This allows synchronization of spatial coordinate systems without the need for manual input of information in advance, and the synchronization speed is fast.
  • the synchronization method provided by the present invention supports any number of mixed reality devices to connect and synchronize spatial coordinates in the local space.
  • the devices that are subsequently added can synchronize spatial coordinates by chain image tracking.
  • Chain image tracking here means that, assuming that host A and guest B have established a network connection and completed synchronization, the newly added guest C can not only synchronize spatial coordinates by scanning the specific picture displayed by host A, but also synchronize spatial coordinates by scanning the picture displayed by guest B.
  • guest D joins guest D can complete spatial coordinate synchronization with all devices by scanning specific pictures on any one of devices A, B, and C, so as to provide convenient synchronization between spatial coordinate systems.
  • the synchronization method provided by the present invention uses the least squares method to calculate the optimal rotation and optimal displacement values between a pair of spatial coordinate systems, which can easily obtain unknown data and minimize the sum of squares of errors between the obtained data and the actual data, thereby ensuring the accuracy of spatial synchronization between different spatial coordinate systems.
  • FIG1 is a flow chart of a local multi-device fast spatial anchor synchronization method for mixed reality according to the present invention
  • FIG. 2 is a flow chart of local device networking of the local multi-device fast spatial anchor synchronization method for mixed reality according to the present invention
  • 3 is a flow chart of time synchronization between local devices of the local multi-device fast spatial anchor synchronization method for mixed reality according to the present invention
  • FIG4 is a flow chart of spatial synchronization between local devices of the local multi-device fast spatial anchor synchronization method for mixed reality described in the present invention.
  • FIG. 1 is a flow chart of this embodiment.
  • the synchronization method described in this embodiment includes three steps: 1. Establishing a local network, a device in the local space acts as a host to create a local network, and other devices act as guests to join the local network; 2. Local timestamp synchronization of multiple devices in the local network, the host and the guest perform time synchronization by calculating the offset of the local timestamp; 3. Rapid spatial anchor point synchronization of multiple devices in the local network, the host and the guest or the guest and the guest share the position information and rotation information of the same image anchor through image tracking technology, and synchronize the spatial coordinate system in combination with the time information.
  • Spatial Anchors represent physical points that exist in the virtual world.
  • holograms can be attached to spatial anchors.
  • Spatial anchors can be stored and persisted and later queried by the device that created it or any other supported device. This enables backup and sharing of anchors. For example, two people can view a chessboard at the same location (desktop) in the real world on the device side. No matter where you move in physical space, the chessboard will be fixed to a point.
  • FIG. 2 is a flowchart of local device networking in this embodiment.
  • any device can create a local network as a host, and other devices can join the local network established by the host as guests.
  • any device A in the local space creates a local network as a host and continuously broadcasts its existence to all nearby devices.
  • another device B in the local space begins to try to join the local network.
  • Device B begins to search for hosts in the nearby space that have established a local network and are broadcasting themselves. After searching for the existence of host A, device B sends a connection request to host A.
  • host A agrees to the connection request, so that device B joins the local network as guest B. Any number of subsequent devices can join the local network created by host A as guests by repeating the above process.
  • the local network of this embodiment is based on Bluetooth or wireless LAN (Wi-Fi), and can be directly connected point-to-point without the mobile provider network (4G or 5G) and the router providing the Internet, which can avoid the delay interference of the Internet.
  • Wi-Fi wireless LAN
  • the user does not need to do anything when the device is connected.
  • the relevant application software is opened on the mobile phone or tablet, the devices will be automatically connected. This allows multiple devices in the local space to use multi-person mixed reality applications even when the external network signal is poor or there is no external network signal.
  • FIG. 3 is a flow chart of time synchronization between local devices according to this embodiment.
  • the devices in the local network will synchronize their time, that is, calculate the local timestamp offset between the two devices.
  • Each device has its own local timestamp, which is used to mark the time when any local operation occurs.
  • timestamps There are many ways to implement timestamps in a device, such as calculating the time interval from the device power on to the operation in seconds. Regardless of the timestamp implementation method used, the timestamp remains correct and consistent on the local device, and the units of timestamps between multiple devices are the same, which has no effect on the implementation of this technology.
  • the purpose of calculating the timestamp offset between the two devices is to align the position and rotation of the two devices at the same time in the third step. All subsequent devices connected to the local network can synchronize their timestamps by repeating the same operation.
  • the specific process of time synchronization of devices in the local network is as follows: at a certain moment, the local timestamp of guest B is T0. Guest B sends this timestamp T0 as a parameter to host A and requests the timestamp of host A.
  • host A receives the timestamp request from guest B, its local timestamp is T1.
  • Host A sends the received timestamp T0 and its own timestamp T1 back to guest B at the same time.
  • guest B receives the timestamp sent back by the host, it has three timestamps locally on guest B, namely T0 when guest B sent the timestamp request to the host before, T1 when host A received the timestamp request, and T0' when guest B received the timestamp sent back by the host.
  • the time offset between guest B and host A can be calculated using the following formula:
  • the earliest calculated timestamp offset data in the queue is abandoned (this is the queue dequeue operation), and then the process of obtaining timestamps T0, T1, T0' and calculating the time offset is repeated once, and a new time offset data is obtained and added to the queue. If the queue variance is less than the preset variance value, this means that the timestamp offset at this time has stabilized.
  • the average value of the entire queue Q can be calculated as the final timestamp offset between the guest B and the host A.
  • FIG. 4 is a flowchart of spatial synchronization between local devices according to this embodiment.
  • the host A displays a specific picture as an anchor point on the display system, and starts recording the local pose of the picture over a period of time (pose includes position and rotation) and attaching a timestamp, and stores these poses with timestamps in the queue Q1.
  • Guest B uses augmented reality image tracking technology to scan and try to identify the specific picture displayed on the display system of host A. Every time guest B finds the image anchor point of host A through the augmented reality image tracking algorithm, guest B immediately sends the local pose of this anchor point with a timestamp to host A.
  • the specific image as the anchor point is displayed on the display system of host A.
  • Host A itself is an augmented reality device. Through its accelerometer, gyroscope and imaging system, it can calculate the position and rotation of the imaging system in the local coordinate system of host A in real time. The difference between the center position of the image and the position of the imaging system is fixed, so host A can calculate the position and rotation of the anchor point of this image in real time.
  • Passenger plane B uses augmented reality image tracking technology to continuously search for the specific image displayed on the host in the images taken by its imaging system (this image is preset in advance, so passenger plane B knows what image is displayed on host A). This augmented reality image tracking technology can accurately identify the position and rotation of a specific image in the scene, so passenger plane B can also know the position and rotation of the anchor point of the image.
  • the above-mentioned augmented reality picture tracking technology for scanning specific pictures can use Apple's ARKit technology, or other imaging technologies that support the MarkerTracking method.
  • QR code images are a very good choice.
  • the QR code image itself has the characteristic of carrying information, which can send additional information from host A to guest B without going through the network.
  • any image with enough feature points can also be used as an image anchor.
  • the positions and rotations of the two devices in the local coordinate system are transmitted to each other through the local network. Every time the guest B successfully scans the specific image displayed on the display system of the host A as an anchor point, both devices know the position and rotation of this anchor point in the local spatial coordinate system of each device.
  • the guest B can obtain multiple pairs of positions and rotations of this anchor point in the spatial coordinate systems of the two devices at the same time.
  • the position and rotation of the origin of the local spatial coordinate system of the host A relative to the origin of the local spatial coordinate system of the guest B are calculated. At this time, we reset the origin of the local coordinate system of the guest B to the origin of the host A, and the origin and direction of the spatial coordinate systems of the two devices are the same, so as to achieve synchronization of the spatial coordinate systems of the two devices.
  • Ra ,i is the rotation of an anchor point in the space coordinate system of host A
  • Pa,i is the position of an anchor point in the space coordinate system of host A
  • Rb,i is the rotation of an anchor point in the space coordinate system of passenger B
  • Pb ,i is the position of an anchor point in the space coordinate system of passenger B
  • position and rotation data with errors are processed simultaneously. By adjusting the value of c, the formula can be more biased towards a smaller rotation error or a smaller displacement error.
  • P′ a,i is the difference between an anchor point in the spatial coordinate system of host A and its weight center
  • P′ b,i is the difference between an anchor point in the spatial coordinate system of passenger aircraft B and its weight center.
  • the target rotation can be calculated when a pair of anchor point rotations are known Where R′ i is the target rotation (the rotation difference between the two coordinate systems), is the inverted matrix of the rotation matrix of the anchor point in the passenger aircraft coordinate system, Ra ,i is the rotation of the anchor point in the host coordinate system) and then the optimal rotation is obtained by deriving ⁇ :
  • Any number of devices that subsequently join the network can complete spatial coordinate synchronization with host A through this method.
  • a virtual object with the same size as the host A device is rendered in the mixed reality virtual space of guest B, and the position and rotation of the virtual object are synchronized with host A in real time. If the spatial synchronization accuracy of the two devices is high enough, from the perspective of guest B, the virtual object and the real host A should completely overlap; if the error between the two is too large, it means that the synchronization is unsuccessful, and guest B will repeat the spatial coordinate system synchronization process until it successfully achieves accurate spatial coordinate system synchronization with host A.
  • the device that subsequently joins the local network completes the synchronization of the spatial coordinate system by scanning the specific picture displayed on the display system of the guest machine that has synchronized the spatial coordinate system in the local network.
  • Guest machine B connects to the local network created by host A and completes the synchronization of the spatial coordinate system with host A by scanning the specific picture on the display system of host A.
  • a new guest machine C joins the network.
  • guest machine C can also synchronize the spatial coordinate system with guest machine B by scanning the specific picture on the display system of guest machine B.
  • guest machine B Since guest machine B has completed the spatial coordinate system synchronization with host A, the three devices A, B, and C have successfully completed the spatial synchronization with each other. Similarly, when a new guest machine D joins, guest machine D can synchronize the spatial coordinate system with all devices in the network by scanning the spatial synchronization of the specific picture with any one of the devices A, B, and C. Chain spatial coordinate synchronization is achieved by the above method, so that any device in the local network can synchronize the spatial coordinate system with other devices nearby.
  • a local multi-device fast spatial anchor synchronization system for mixed reality comprising a memory and a processor, the memory storing instructions, the instructions enabling the processor to execute: the local multi-device fast spatial anchor synchronization method for mixed reality described in the present invention.
  • a machine-readable storage medium having instructions stored thereon, wherein the instructions are used to enable a machine to execute: the local multi-device fast spatial anchor point synchronization method for mixed reality described in the present invention.

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Multimedia (AREA)
  • Processing Or Creating Images (AREA)

Abstract

Disclosed in the present invention are a local multi-device rapid spatial anchors synchronization method and system for mixed reality. The method comprises the following steps: using any device in a local space as a host to create a local network, and using other devices as guests to join in the local network created by the host; each guest and the host first exchanging respective local timestamps, and then calculating a time offset between the local timestamp of the guest and the local timestamp of the host, so that time synchronization between the guest and the host is realized; and on the basis of the time synchronization, a guest in the local network performing spatial coordinate system synchronization with the host by means of augmented reality image tracking technology, and other guests performing spatial coordinate system synchronization with the host or the synchronized guest, thereby implementing spatial coordinate system synchronization among all devices in the local network. The synchronization method provided by the present invention can use a multi-user mixed reality application in the absence of an external operator network, and implement rapid spatial coordinate system synchronization.

Description

用于混合现实的本地多设备快速空间锚点同步方法及系统Local multi-device fast spatial anchor synchronization method and system for mixed reality 技术领域Technical Field

本发明属于混合现实技术领域,特别涉及用于混合现实的本地多设备快速空间锚点同步方法及系统。The present invention belongs to the technical field of mixed reality, and in particular relates to a method and system for local multi-device rapid spatial anchor point synchronization for mixed reality.

背景技术Background technique

混合现实(MR,Mixed Reality)、增强现实(AR,Augmented Reality)是一种通过使用HMD(Head Mounted Display,头戴式显示设备)头显、智能手机或其他显示设备,渲染能与现实世界产生关联的虚拟内容,使得用户可以同时看到现实世界和叠加在其之上的虚拟内容并与这些虚拟内容产生交互的技术。目前在混合现实技术上的应用大多是单人体验,即设备渲染出的虚拟内容只有佩戴设备的用户才能看到。即使是身处同一现实空间的两名以上用户,所看到的虚拟内容也是不同的,使得两名以上用户不能同时与相同的虚拟内容进行交互。再者,由于头显设备所渲染的内容只能被佩戴者看到,造成了这种混合现实的体验只能以第一视角进行观察,没有带头显的第三方并不能以第三人称视角看到佩戴者正在游玩的内容,使得混合现实体验的传播很困难。Mixed Reality (MR) and Augmented Reality (AR) are technologies that use HMD (Head Mounted Display), smartphones, or other display devices to render virtual content that can be associated with the real world, allowing users to simultaneously see the real world and the virtual content superimposed on it and interact with these virtual contents. Currently, most applications of mixed reality technology are single-person experiences, that is, the virtual content rendered by the device can only be seen by the user wearing the device. Even if two or more users are in the same real space, the virtual content they see is different, so that more than two users cannot interact with the same virtual content at the same time. Furthermore, since the content rendered by the head display device can only be seen by the wearer, this mixed reality experience can only be observed from a first-person perspective. A third party without a head display cannot see the content that the wearer is playing from a third-person perspective, making the dissemination of the mixed reality experience difficult.

要实现不同设备之间的虚拟内容交互,考虑到不同的平台和设备拥有不同的空间扫描运算方法,如果混合现实设备不能同步空间,就难于协同工作,一混合现实设备的操作难以实时反应在其他的混合现实设备中。因此需要一个简单且便利的协同工作算法将不同设备和平台间的空间坐标进行同步,此时涉及到各设备空间坐标系的同步。To achieve virtual content interaction between different devices, considering that different platforms and devices have different spatial scanning calculation methods, if the mixed reality devices cannot synchronize space, it will be difficult for them to work together, and the operation of one mixed reality device will be difficult to be reflected in real time in other mixed reality devices. Therefore, a simple and convenient collaborative work algorithm is needed to synchronize the spatial coordinates between different devices and platforms, which involves the synchronization of the spatial coordinate systems of each device.

为解决多设备间缺乏联机互动的问题,授权公告号为“CN107945116B”的中国发明专利公开了用于多设备间实现AR室内定位的坐标轴同步方法,该技术 方案包括如下步骤:在每个参与联机的设备上分别用自身的位置以及陀螺仪的角度建立各个设备的本地坐标系;选取任意一个设备作为主参考设备,其他设备作为从属设备,将主参考设备的坐标系作为主参考坐标系,并对其他从属设备进行坐标系修正;从属设备获取主参考设备的位置信息并转换为基于主参考坐标系的从属设备坐标。该技术方案提供的多设备坐标轴同步方法能够在各设备间形成统一的坐标系,进行更为方便和统一的联机互动,有助于在大范围内实现虚拟与现实的结合。但是,对于实时性要求高的混合现实使用场景下,比如增强现实多人对战游戏,由于ISP(Internet Service Provider,互联网业务提供商)网络的延迟或者虚拟空间的快速变换,会导致坐标同步的精确度不足,用户体验不佳。In order to solve the problem of lack of online interaction between multiple devices, the Chinese invention patent with the authorization announcement number "CN107945116B" discloses a coordinate axis synchronization method for realizing AR indoor positioning between multiple devices. The technical solution includes the following steps: on each device participating in the online connection, the local coordinate system of each device is established using its own position and the angle of the gyroscope; any one device is selected as the main reference device, and the other devices are selected as slave devices, the coordinate system of the main reference device is used as the main reference coordinate system, and the coordinate system of other slave devices is corrected; the slave device obtains the position information of the main reference device and converts it into the coordinates of the slave device based on the main reference coordinate system. The multi-device coordinate axis synchronization method provided by the technical solution can form a unified coordinate system between various devices, and conduct more convenient and unified online interaction, which is helpful to realize the combination of virtual and reality in a large range. However, for mixed reality usage scenarios with high real-time requirements, such as augmented reality multiplayer battle games, due to the delay of the ISP (Internet Service Provider) network or the rapid transformation of the virtual space, the accuracy of coordinate synchronization is insufficient, and the user experience is poor.

为提高混合现实设备空间坐标系同步的精确度,授权公告号为“CN109766001B”的中国发明专利公开了一种不同MR设备坐标系的统一方法,统一方法包括:将预设空间的任意一点作为基准点,获取预设空间内的各个标定板相对于基准点的相对位置与旋转信息;将每个MR设备与对应的标定板进行绑定;建立以基准点为原点的全局坐标系;将每个MR设备的原始坐标系对应相对位置与旋转信息统一至全局坐标系中。该技术方案通过在预设空间内设置标定板和基准点,将MR设备与标定板进行绑定,通过标定板和基准点的相对位置与旋转信息确定每个MR设备在以基准标定板为原点建立的全局坐标系中的位置,将MR设备对应同一至全局坐标系中,实现了不同MR设备在同一场景内进行交互。该技术方案的同步过程较为繁琐,导致空间坐标系同步速度较低。In order to improve the accuracy of the synchronization of the spatial coordinate system of the mixed reality device, the Chinese invention patent with the authorization announcement number "CN109766001B" discloses a method for unifying the coordinate systems of different MR devices. The unification method includes: taking any point in the preset space as a reference point, obtaining the relative position and rotation information of each calibration plate in the preset space relative to the reference point; binding each MR device to the corresponding calibration plate; establishing a global coordinate system with the reference point as the origin; unifying the relative position and rotation information of the original coordinate system of each MR device into the global coordinate system. This technical solution sets a calibration plate and a reference point in the preset space, binds the MR device to the calibration plate, determines the position of each MR device in the global coordinate system established with the reference calibration plate as the origin through the relative position and rotation information of the calibration plate and the reference point, and corresponds the MR device to the global coordinate system, thereby realizing the interaction of different MR devices in the same scene. The synchronization process of this technical solution is relatively cumbersome, resulting in a low synchronization speed of the spatial coordinate system.

发明内容Summary of the invention

用于混合现实的本地多设备快速空间锚点同步方法,包括以下步骤:A local multi-device fast spatial anchor synchronization method for mixed reality includes the following steps:

S1:位于本地空间的多台设备建立本地网络连接以实现设备间的数据传输,将所述多台设备中的任意一台设备作为主机创建本地网络,其他设备作为客机加入所述主机创建的本地网络。S1: Multiple devices in a local space establish a local network connection to achieve data transmission between the devices. Any one of the multiple devices is used as a host to create a local network, and other devices are used as guests to join the local network created by the host.

S2:将所述本地网络中的主机与客机进行时间同步,所述客机与主机先向对方交换各自的本地时间戳,再计算所述客机的本地时间戳与主机的本地时间戳之间的时间偏移量,根据时间偏移量调整并实现所述客机与主机之间的时间同步。S2: Time synchronization is performed between the host and the guest in the local network. The guest and the host first exchange their local timestamps with each other, and then calculate the time offset between the local timestamp of the guest and the local timestamp of the host, and adjust and implement the time synchronization between the guest and the host according to the time offset.

S3:将所述本地网络中的主机与一客机进行空间锚点同步,在所述主机的显示系统上显示的一特定图片作为锚点,所述一客机通过增强现实图片跟踪技术扫描所述一特定图片,获取所述图片锚点在所述一客机空间坐标系下的第二位置与旋转,并向所述主机请求相同时间戳下所述锚点在所述主机空间坐标系下的第一位置与旋转,所述一客机获得两个位置与旋转数据,作为一对位姿对,所述一客机经过多次扫描所述锚点,获得多对位姿对,通过最小二乘法计算所述多对位姿对,得到所述主机空间坐标原点在所述一客机空间坐标系下的第三位置与旋转,通过将所述一客机的空间坐标系原点重设到该第三位置与旋转,使得所述主机与一客机的空间坐标系原点的位置与旋转相同,完成设备间空间坐标系的同步,其他客机可以与所述本地网络中的主机进行空间坐标系同步,或者与所述本地网络中已完成空间坐标系同步的客机进行空间坐标系同步。S3: Synchronize the spatial anchor points of the host and a guest in the local network, and use a specific image displayed on the display system of the host as the anchor point. The guest scans the specific image through augmented reality image tracking technology to obtain the second position and rotation of the image anchor point in the spatial coordinate system of the guest, and requests the host for the first position and rotation of the anchor point in the spatial coordinate system of the host at the same timestamp. The guest obtains two position and rotation data as a pair of pose pairs. The guest scans the anchor point multiple times to obtain multiple pose pairs, and calculates the multiple pose pairs through the least squares method to obtain the third position and rotation of the spatial coordinate origin of the host in the spatial coordinate system of the guest. By resetting the origin of the spatial coordinate system of the guest to the third position and rotation, the position and rotation of the origin of the spatial coordinate system of the host and the guest are the same, and the synchronization of the spatial coordinate systems between devices is completed. Other guests can synchronize the spatial coordinate system with the host in the local network, or synchronize the spatial coordinate system with the guest in the local network that has completed the spatial coordinate system synchronization.

优选地,所述步骤S1具体为:Preferably, the step S1 specifically comprises:

S1-1:所述主机创建本地网络,通过无线通信方式在本地网络上进行广播。S1-1: The host creates a local network and broadcasts on the local network via wireless communication.

S1-2:所述客机通过所述无线通信方式搜寻所述主机的广播。S1-2: The guest machine searches for the host's broadcast via the wireless communication method.

S1-3:所述客机发现所述广播,使用所述无线通信方式向所述主机发送连 接请求。S1-3: The guest machine discovers the broadcast and sends a connection request to the host machine using the wireless communication method.

S1-4:所述主机接收到所述连接请求,同意所述连接请求,建立所述客机与主机之间的网络连接。S1-4: The host receives the connection request, agrees to the connection request, and establishes a network connection between the guest and the host.

优选地,所述步骤S2具体为:Preferably, the step S2 is specifically:

S2-1:一客机将该客机的本地时间戳一发送至所述主机。S2-1: A guest sends the local timestamp of the guest to the host.

S2-2:所述主机将接收到所述本地时间戳一的时间点,作为本地时间戳二发送至所述一客机。S2-2: The host sends the time point at which the local timestamp 1 is received as the local timestamp 2 to the guest machine.

S2-3:所述一客机将接收到所述本地时间戳二的时间点,作为本地时间戳三,根据所述本地时间戳一、本地时间戳二及本地时间戳三计算并保存所述一客机与主机的时间戳偏移量。S2-3: The guest machine receives the time point of the local timestamp 2 as the local timestamp 3, and calculates and saves the timestamp offset between the guest machine and the host machine according to the local timestamp 1, the local timestamp 2 and the local timestamp 3.

S2-4:重复步骤S2-1至步骤S2-3,直至所述时间戳偏移量的数量达到设定值,得到多个时间戳偏移量。S2-4: Repeat steps S2-1 to S2-3 until the number of timestamp offsets reaches a set value, thereby obtaining multiple timestamp offsets.

S2-5:计算所述多个时间戳偏移量的标准方差,若所述标准方差不小于预设值,则放弃最早计算出的一个时间戳偏移量然后重复一遍步骤S2-1至步骤S2-3,直至所述标准方差小于预设值,计算所述多个时间戳偏移量的平均值,作为最终的时间戳偏移量结果。S2-5: Calculate the standard deviation of the multiple timestamp offsets. If the standard deviation is not less than the preset value, abandon the earliest calculated timestamp offset and repeat steps S2-1 to S2-3 until the standard deviation is less than the preset value. Calculate the average value of the multiple timestamp offsets as the final timestamp offset result.

S2-6:其他客机根据步骤S2-1至S2-5计算其他每个客机与主机之间最终的时间戳偏移量结果。S2-6: Other guest machines calculate the final timestamp offset result between each other guest machine and the host machine according to steps S2-1 to S2-5.

优选地,所述步骤S2-3计算时间戳偏移量offset的公式为:Preferably, the formula for calculating the timestamp offset in step S2-3 is:

Figure PCTCN2022133039-appb-000001
Figure PCTCN2022133039-appb-000001

其中,T0是本地时间戳一,T0′是本地时间戳二,T1是本地时间戳三。Among them, T0 is local timestamp one, T0′ is local timestamp two, and T1 is local timestamp three.

优选地,所述一客机创建队列保存所述多个时间戳偏移量。Preferably, the guest creates a queue to store the multiple timestamp offsets.

优选地,所述步骤S3具体为:Preferably, the step S3 is specifically:

S3-1:所述主机的显示系统上显示一特定图片,所述一特定图片即为空间中的一个锚点,所述主机利用加速计、陀螺仪及成像系统,根据所述一特定图片和主机成像系统的偏移向量不变,实时计算出所述一特定图片在所述主机的本地坐标系下的位置与旋转。S3-1: A specific picture is displayed on the display system of the host, and the specific picture is an anchor point in the space. The host uses an accelerometer, a gyroscope and an imaging system to calculate the position and rotation of the specific picture in the local coordinate system of the host in real time based on the unchanged offset vector of the specific picture and the host imaging system.

S3-2:所述本地网络中一客机通过增强现实图片追踪技术利用成像系统扫描所述一特定图片,增强现实图片追踪技术识别出场景中一特定图片的第二位置与旋转,发送所述第二位置与旋转至所述主机,并接收所述主机发送的所述第一位置与旋转,所述第一位置与旋转和第二位置与旋转具有相同的时间戳。S3-2: A passenger plane in the local network uses an imaging system to scan the specific image through augmented reality image tracking technology. The augmented reality image tracking technology identifies the second position and rotation of the specific image in the scene, sends the second position and rotation to the host, and receives the first position and rotation sent by the host. The first position and rotation and the second position and rotation have the same timestamp.

S3-3:所述一客机获取多对不同时间戳下的第一位置与旋转、第二位置与旋转,通过最小二乘法计算得到最佳位移向量与最佳旋转,得到所述主机的本地空间坐标系原点相对所述客机的本地空间坐标系原点的位置与旋转,将所述客机的本地空间坐标系原点重设到所述主机的本地空间坐标系原点,完成所述主机与客机的空间坐标系同步。对于本地网络中其他客机,通过将自身的本地空间坐标系原点重设到所述主机的本地空间坐标系原点或者任意一台已同步客机的本地空间坐标系原点,进行本地网络中设备的空间坐标系的同步。S3-3: The guest aircraft obtains multiple pairs of first positions and rotations, and second positions and rotations at different timestamps, calculates the best displacement vector and the best rotation by the least squares method, obtains the position and rotation of the origin of the local space coordinate system of the host relative to the origin of the local space coordinate system of the guest aircraft, resets the origin of the local space coordinate system of the guest aircraft to the origin of the local space coordinate system of the host aircraft, and completes the spatial coordinate system synchronization of the host aircraft and the guest aircraft. For other guest aircraft in the local network, the spatial coordinate system of the devices in the local network is synchronized by resetting the origin of its own local space coordinate system to the origin of the local space coordinate system of the host aircraft or the origin of the local space coordinate system of any synchronized guest aircraft.

S3-4:在所述一客机的混合现实虚拟空间中渲染一个大小与所述主机设备一致的虚拟物体,并将所述虚拟物体的位置与旋转同所述主机实时同步,若所述虚拟物体与现实中的所述主机未完全重合,则所述一客机将重复步骤S3-1至S3-3,直至所述虚拟物体与现实中的所述主机完全重合。S3-4: Render a virtual object of the same size as the host device in the mixed reality virtual space of the guest aircraft, and synchronize the position and rotation of the virtual object with the host in real time. If the virtual object does not completely overlap with the host in reality, the guest aircraft will repeat steps S3-1 to S3-3 until the virtual object completely overlaps with the host in reality.

优选地,所述最佳位移向量t的表达式为:Preferably, the expression of the optimal displacement vector t is:

Figure PCTCN2022133039-appb-000002
Figure PCTCN2022133039-appb-000002

其中,

Figure PCTCN2022133039-appb-000003
表示所有锚点在所述主机空间坐标系下的权重中心值,
Figure PCTCN2022133039-appb-000004
表示所有锚点在所述一客机空间坐标系下的权重中心值,
Figure PCTCN2022133039-appb-000005
是一个沿空间Y轴旋转φ角度的旋转矩阵。 in,
Figure PCTCN2022133039-appb-000003
Represents the weight center value of all anchor points in the host space coordinate system,
Figure PCTCN2022133039-appb-000004
represents the weight center value of all anchor points in the space coordinate system of the aircraft,
Figure PCTCN2022133039-appb-000005
It is a rotation matrix that rotates by an angle φ along the Y axis of the space.

优选地,所述最佳旋转φ的计算方法为:Preferably, the optimal rotation φ is calculated as follows:

Figure PCTCN2022133039-appb-000006
Figure PCTCN2022133039-appb-000006

其中,P′ a,i,x、P′ a,i,z是所述主机空间坐标系下一锚点与其权重中心的差值,P′ b,i,x、P′ b,i,z、是所述一客机空间坐标系下一锚点与其权重中心的差值,R′ i,1,x、R′ i,1,z、R′ i,3,x、R′ i,3,z是所述主机与一客机的空间坐标系之间的旋转差值,c是一大于0的可调整常数,通过调整c的数值可以使公式更偏向更小的旋转误差或更小的位移误差。 Among them, P′ a,i,x and P′ a,i,z are the differences between an anchor point in the spatial coordinate system of the host and its weight center, P′ b,i,x and P′ b,i,z are the differences between an anchor point in the spatial coordinate system of the guest aircraft and its weight center, R′ i,1,x , R′ i,1,z , R′ i,3,x and R′ i,3,z are the rotation differences between the spatial coordinate systems of the host and a guest aircraft, and c is an adjustable constant greater than 0. By adjusting the value of c, the formula can be made more biased towards a smaller rotation error or a smaller displacement error.

用于混合现实的本地多设备快速空间锚点同步系统,所述系统包括存储器和处理器,所述存储器上存储有指令,所述指令使得所述处理器能够执行:上述的用于混合现实的本地多设备快速空间锚点同步方法。A local multi-device fast spatial anchor synchronization system for mixed reality, the system comprising a memory and a processor, the memory storing instructions, the instructions enabling the processor to execute: the above-mentioned local multi-device fast spatial anchor synchronization method for mixed reality.

一种机器可读存储介质,所述机器可读存储介质上存储有指令,所述指令用于使得机器执行:上述的用于混合现实的本地多设备快速空间锚点同步方法。A machine-readable storage medium having instructions stored thereon, wherein the instructions are used to cause a machine to execute: the above-mentioned local multi-device fast spatial anchor synchronization method for mixed reality.

与现有技术相比,本发明具有以下技术效果:Compared with the prior art, the present invention has the following technical effects:

1.本发明提供的同步方法先在本地空间建立本地网络,有助于克服对外部网络的依赖并减小网络的延迟以提高空间同步的精度和速度;然后对本地网络中的所有设备进行时间同步,进一步提高空间同步的精度;在建立本地网络和时间同步的基础上,再通过确定空间锚点,根据锚点在各自空间坐标系中的位置和旋转,使用最小二乘法计算最佳位置和最佳旋转,完成设备间的空间同步,满足混合现实应用对空间坐标同步的实时性和精确度要求。1. The synchronization method provided by the present invention first establishes a local network in the local space, which helps to overcome the dependence on the external network and reduce the network delay to improve the accuracy and speed of spatial synchronization; then all devices in the local network are time synchronized to further improve the accuracy of spatial synchronization; on the basis of establishing the local network and time synchronization, the spatial anchor point is determined, and the optimal position and optimal rotation are calculated using the least squares method according to the position and rotation of the anchor point in each spatial coordinate system to complete the spatial synchronization between devices, thereby meeting the real-time and accuracy requirements of mixed reality applications for spatial coordinate synchronization.

2.本发明提供的同步方法选择本地空间中的任一设备作为主机,通过基于本地的无线通信方式建立本地网络,其他设备作为客机加入本地网络,克服了对外部网络环境的依赖,使得本地空间中的多台设备在外部网络信号不好或者没有外部网络信号的情况下,也可以使用多人混合现实应用。2. The synchronization method provided by the present invention selects any device in the local space as the host, establishes a local network through a local wireless communication method, and other devices join the local network as guests, thereby overcoming the dependence on the external network environment, so that multiple devices in the local space can use multi-person mixed reality applications even when the external network signal is poor or there is no external network signal.

3.本发明提供的同步方法利用设备显示系统显示的特定图片作为锚点。二维码图片是一个很好的选择,因为二维码图片足够复杂且特征点足够多,有利于扫描设备快速识别,并且二维码图片本身自带信息的特点可以将额外的信息在不通过网络传输的情况下由被扫描设备发送至扫描设备。3. The synchronization method provided by the present invention uses a specific image displayed by the device display system as an anchor point. A QR code image is a good choice because the QR code image is complex enough and has enough feature points, which is conducive to rapid recognition by the scanning device. In addition, the QR code image itself has the characteristic of carrying information, which can send additional information from the scanned device to the scanning device without transmitting it through the network.

4.本发明提供的同步方法可以同时应用在手持式混合现实设备(手机和平板电脑)和由手机驱动的混合现实头显(HMD)上,任意数量的上述两种设备都可以通过此方法建立网络并同步空间锚点,从而进行多人混合现实体验。4. The synchronization method provided by the present invention can be applied to both handheld mixed reality devices (mobile phones and tablet computers) and mixed reality head displays (HMDs) driven by mobile phones. Any number of the above two devices can establish a network and synchronize spatial anchor points through this method, thereby providing a multi-person mixed reality experience.

5.本发明提供的同步方法使用增强现实图片追踪技术,通过客机扫描主机屏幕上显示的作为锚点的特定图片来进行两台设备间的快速空间坐标同步,或者通过客机扫描已同步客机屏幕上显示的作为锚点的特定图片来进行两台设备间的快速空间坐标同步,在不用提前手动输入信息的情况下实现空间坐标系同步,同步速度快。5. The synchronization method provided by the present invention uses augmented reality image tracking technology to perform fast spatial coordinate synchronization between two devices by having the guest plane scan a specific image displayed on the host screen as an anchor point, or by having the guest plane scan a specific image displayed on the screen of a synchronized guest plane as an anchor point. This allows synchronization of spatial coordinate systems without the need for manual input of information in advance, and the synchronization speed is fast.

6.本发明提供的同步方法支持任意数量的混合现实设备在本地空间进行连接与空间坐标同步,在设备数量超过两台的情况下,后续加入的设备可以通过链式图片追踪的方式进行空间坐标同步。这里的链式图片追踪是指,假设主机A和客机B已经建立网络连接并完成同步,新加入的客机C不仅可以通过扫描主机A显示的特定图片进行空间坐标同步,还可以通过扫描客机B显示的图片进行空间坐标同步。同理,当客机D加入时,客机D可以通过扫描A、B、C任意 一台设备上的特定图片,完成与所有设备的空间坐标同步,以提供空间坐标系之间的便捷同步。6. The synchronization method provided by the present invention supports any number of mixed reality devices to connect and synchronize spatial coordinates in the local space. When the number of devices exceeds two, the devices that are subsequently added can synchronize spatial coordinates by chain image tracking. Chain image tracking here means that, assuming that host A and guest B have established a network connection and completed synchronization, the newly added guest C can not only synchronize spatial coordinates by scanning the specific picture displayed by host A, but also synchronize spatial coordinates by scanning the picture displayed by guest B. Similarly, when guest D joins, guest D can complete spatial coordinate synchronization with all devices by scanning specific pictures on any one of devices A, B, and C, so as to provide convenient synchronization between spatial coordinate systems.

7.本发明提供的同步方法在空间同步阶段,使用最小二乘法计算得到一对空间坐标系之间的最佳旋转与最佳位移值,可以简便地求得未知的数据,并使得这些求得的数据与实际数据之间误差的平方和为最小,保证不同空间坐标系之间空间同步的准确度。7. In the spatial synchronization stage, the synchronization method provided by the present invention uses the least squares method to calculate the optimal rotation and optimal displacement values between a pair of spatial coordinate systems, which can easily obtain unknown data and minimize the sum of squares of errors between the obtained data and the actual data, thereby ensuring the accuracy of spatial synchronization between different spatial coordinate systems.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1是本发明所述的用于混合现实的本地多设备快速空间锚点同步方法的流程图;FIG1 is a flow chart of a local multi-device fast spatial anchor synchronization method for mixed reality according to the present invention;

图2是本发明所述的用于混合现实的本地多设备快速空间锚点同步方法的本地设备间组网流程图;2 is a flow chart of local device networking of the local multi-device fast spatial anchor synchronization method for mixed reality according to the present invention;

图3是本发明所述的用于混合现实的本地多设备快速空间锚点同步方法的本地设备间时间同步流程图;3 is a flow chart of time synchronization between local devices of the local multi-device fast spatial anchor synchronization method for mixed reality according to the present invention;

图4是本发明所述的用于混合现实的本地多设备快速空间锚点同步方法的本地设备间空间同步流程图。FIG4 is a flow chart of spatial synchronization between local devices of the local multi-device fast spatial anchor synchronization method for mixed reality described in the present invention.

具体实施方式Detailed ways

为使本发明的目的、技术方案和优点更加清楚,下面将结合本申请具体实施例,并参照附图,对本发明技术方案进行清楚、完整地描述。In order to make the objectives, technical solutions and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in combination with specific embodiments of the present application and with reference to the accompanying drawings.

请参阅图1,为本实施例的流程图。Please refer to FIG. 1 , which is a flow chart of this embodiment.

本实施例所述的同步方法包括三步:一、建立本地网络,本地空间的一设备作为主机创建本地网络,其他设备作为客机加入该本地网络;二、所述本地网络中多设备的本地时间戳同步,所述主机与客机之间通过计算本地时间戳的 偏移量,进行时间同步;三、所述本地网络中多设备快速空间锚点同步,所述主机与客机或者客机与客机通过图片追踪技术共享相同图片锚点的位置信息与旋转信息,结合时间信息进行空间坐标系同步。The synchronization method described in this embodiment includes three steps: 1. Establishing a local network, a device in the local space acts as a host to create a local network, and other devices act as guests to join the local network; 2. Local timestamp synchronization of multiple devices in the local network, the host and the guest perform time synchronization by calculating the offset of the local timestamp; 3. Rapid spatial anchor point synchronization of multiple devices in the local network, the host and the guest or the guest and the guest share the position information and rotation information of the same image anchor through image tracking technology, and synchronize the spatial coordinate system in combination with the time information.

空间锚点(Spatial Anchors)表示存在于虚拟世界中的物理点。对于混合现实应用,全息图可以附着到空间锚点。空间锚点能够存储和持久化,并在以后由创建它的设备或任何其他受支持设备进行查询。这能够实现锚点的备份和锚点共享。举个例子,在设备端两人可以在现实世界中的同一位置(桌面)查看棋盘。无论在物理空间中移动到何处,棋盘都将固定到一个点。Spatial Anchors represent physical points that exist in the virtual world. For mixed reality applications, holograms can be attached to spatial anchors. Spatial anchors can be stored and persisted and later queried by the device that created it or any other supported device. This enables backup and sharing of anchors. For example, two people can view a chessboard at the same location (desktop) in the real world on the device side. No matter where you move in physical space, the chessboard will be fixed to a point.

请参阅图2,为本实施例的本地设备间组网流程图。Please refer to FIG. 2 , which is a flowchart of local device networking in this embodiment.

在本地有超过多台(两台或两台以上)设备的情况下,任意设备可以作为主机创建本地网络,其他设备可以作为客机加入主机所建立的本地网络。首先,本地空间中任意一台设备A作为主机创建本地网络,并持续向附近的所有设备广播自己的存在。然后,本地空间中的另一台设备B开始尝试加入本地网络,设备B开始搜寻附近空间中是否有已经建立本地网络的主机正在广播自己,设备B在搜索到主机A的存在后,向主机A发送连接请求。最后,主机A在接受到来自设备B的连接请求后,同意该连接请求,从而使设备B作为客机B加入到本地网络中。任意数量的后续设备都可以通过重复上述过程,作为客机加入到由主机A创建的本地网络中。When there are more than one (two or more) devices in the local area, any device can create a local network as a host, and other devices can join the local network established by the host as guests. First, any device A in the local space creates a local network as a host and continuously broadcasts its existence to all nearby devices. Then, another device B in the local space begins to try to join the local network. Device B begins to search for hosts in the nearby space that have established a local network and are broadcasting themselves. After searching for the existence of host A, device B sends a connection request to host A. Finally, after receiving the connection request from device B, host A agrees to the connection request, so that device B joins the local network as guest B. Any number of subsequent devices can join the local network created by host A as guests by repeating the above process.

本实施例的本地网络基于蓝牙(Bluetooth)或无线局域网(Wi-Fi),可以在没有移动供应商网络(4G或5G)和路由器提供互联网的情况下进行直接点对点连接,可避免互联网的延迟干扰。设备连接时不需要用户做任何操作,只要在手机或平板电脑上打开相关应用软件,设备之间就会自动连接。使得本地空 间中的多台设备在外部网络信号不好或者没有外部网络信号的情况下,也可以使用多人混合现实应用。The local network of this embodiment is based on Bluetooth or wireless LAN (Wi-Fi), and can be directly connected point-to-point without the mobile provider network (4G or 5G) and the router providing the Internet, which can avoid the delay interference of the Internet. The user does not need to do anything when the device is connected. As long as the relevant application software is opened on the mobile phone or tablet, the devices will be automatically connected. This allows multiple devices in the local space to use multi-person mixed reality applications even when the external network signal is poor or there is no external network signal.

请参阅图3,为本实施例的本地设备间时间同步流程图。Please refer to FIG. 3 , which is a flow chart of time synchronization between local devices according to this embodiment.

在建立了本地网络并且所有设备均加入该本地网络后,本地网络中的设备将进行时间同步,即计算两台设备之间的本地时间戳偏移量。每台设备都有自己的本地时间戳,用来标注任意本地操作发生的时间。在一台设备中,时间戳的实现方式有很多种,例如计算从设备开机到发生操作中间所间隔的时间,单位为秒。不论使用哪种时间戳的实现方式,时间戳在本地设备上保持正确一致,同时多设备之间时间戳的单位相同,就对此技术的实现没有影响。计算两台设备之间时间戳偏移量的目的是为了在第三部中将两台设备在相同时间内的位置与旋转进行对齐。后续所有接入本地网络的设备都可以通过重复同样的操作来进行时间戳同步。After the local network is established and all devices have joined the local network, the devices in the local network will synchronize their time, that is, calculate the local timestamp offset between the two devices. Each device has its own local timestamp, which is used to mark the time when any local operation occurs. There are many ways to implement timestamps in a device, such as calculating the time interval from the device power on to the operation in seconds. Regardless of the timestamp implementation method used, the timestamp remains correct and consistent on the local device, and the units of timestamps between multiple devices are the same, which has no effect on the implementation of this technology. The purpose of calculating the timestamp offset between the two devices is to align the position and rotation of the two devices at the same time in the third step. All subsequent devices connected to the local network can synchronize their timestamps by repeating the same operation.

本地网络中的设备进行时间同步的具体流程为:在某一时刻,客机B的本地时间戳为T0,客机B将此时间戳T0作为参数发送给主机A,并请求主机A的时间戳。主机A在收到客机B的时间戳请求时,其本地时间戳为T1,主机A将收到的时间戳T0和自己的时间戳T1同时发回给客机B。客机B在收到主机发回的时间戳时,在客机B本地拥有了三个时间戳,分别是客机B在之前给主机发送时间戳请求时的T0,主机A在接收到时间戳请求时的T1,和客机B收到主机发回的时间戳时的T0’。客机B与主机A之间的时间偏移量offset可以通过以下公式计算得出:The specific process of time synchronization of devices in the local network is as follows: at a certain moment, the local timestamp of guest B is T0. Guest B sends this timestamp T0 as a parameter to host A and requests the timestamp of host A. When host A receives the timestamp request from guest B, its local timestamp is T1. Host A sends the received timestamp T0 and its own timestamp T1 back to guest B at the same time. When guest B receives the timestamp sent back by the host, it has three timestamps locally on guest B, namely T0 when guest B sent the timestamp request to the host before, T1 when host A received the timestamp request, and T0' when guest B received the timestamp sent back by the host. The time offset between guest B and host A can be calculated using the following formula:

Figure PCTCN2022133039-appb-000007
Figure PCTCN2022133039-appb-000007

此时,客机B中便存在一个时间偏移量数据,考虑到网络延迟带来的影响, 只计算一次时间戳偏移量难以得到准确的数值。因此,在本实施例中,为确保时间戳偏移量的准确性和稳定性,将重复上述的步骤,将每次得出的时间戳偏移量储存在一个由客机B创建的队列Q中。当队列Q中保存的时间戳偏移量的数量达到一个预设数量值时,计算整个队列Q的标准方差。如果队列的标准方差过大(大于预设的标准方差值),便就放弃队列中最早计算出的一个时间戳偏移量数据(此为队列的出队操作),然后继续重复一次获取时间戳T0、T1、T0’并计算时间偏移量的过程,获取到一个新的时间偏移量数据,将其入队。如果队列方差小于预设的方差值,这代表此时的时间戳偏移量已经趋于稳定。可计算整个队列Q的平均值来作为最终客机B与主机A之间的时间戳偏移量。At this time, there is a time offset data in the guest B. Considering the influence of network delay, it is difficult to obtain an accurate value by calculating the timestamp offset only once. Therefore, in this embodiment, in order to ensure the accuracy and stability of the timestamp offset, the above steps will be repeated, and the timestamp offset obtained each time will be stored in a queue Q created by the guest B. When the number of timestamp offsets stored in the queue Q reaches a preset number value, the standard deviation of the entire queue Q is calculated. If the standard deviation of the queue is too large (greater than the preset standard deviation value), the earliest calculated timestamp offset data in the queue is abandoned (this is the queue dequeue operation), and then the process of obtaining timestamps T0, T1, T0' and calculating the time offset is repeated once, and a new time offset data is obtained and added to the queue. If the queue variance is less than the preset variance value, this means that the timestamp offset at this time has stabilized. The average value of the entire queue Q can be calculated as the final timestamp offset between the guest B and the host A.

请参阅图4,为本实施例的本地设备间空间同步流程图。Please refer to FIG. 4 , which is a flowchart of spatial synchronization between local devices according to this embodiment.

在客机B与主机A建立本地网络连接并同步本地时间戳后,主机A显示系统上显示特定图片作为锚点,开始记录一段时间内的图片本地位姿(位姿包括位置与旋转)并附加时间戳,并将这些带时间戳的位姿存贮到队列Q1中。客机B使用增强现实图片追踪技术来扫描尝试识别主机A显示系统上显示的特定图片,每次客机B通过增强现实图片追踪算法找到主机A的图片锚点,客机B立刻将此锚点的带时间戳的本地位姿发送给主机A。After the guest B establishes a local network connection with the host A and synchronizes the local timestamp, the host A displays a specific picture as an anchor point on the display system, and starts recording the local pose of the picture over a period of time (pose includes position and rotation) and attaching a timestamp, and stores these poses with timestamps in the queue Q1. Guest B uses augmented reality image tracking technology to scan and try to identify the specific picture displayed on the display system of host A. Every time guest B finds the image anchor point of host A through the augmented reality image tracking algorithm, guest B immediately sends the local pose of this anchor point with a timestamp to host A.

作为锚点的特定图片显示于主机A的显示系统上,主机A本身是一台增强现实设备,通过其加速计、陀螺仪和成像系统,可以实时计算出成像系统在主机A本地坐标系下的位置与旋转,而图片的中心位置与成像系统位置之间的差是固定的,所以主机A可以实时计算出此图片锚点的位置与旋转。客机B通过增强现实图片追踪技术,不断在其成像系统拍摄下的图片中找寻主机上显示的特定图片(这张图片是事先预设的,所以客机B知道主机A上显示什么图片)。 此增强现实图片追踪技术可以精准地识别出场景中特定图片的位置与旋转,所以客机B也可以知晓该图片锚点的位置与旋转。The specific image as the anchor point is displayed on the display system of host A. Host A itself is an augmented reality device. Through its accelerometer, gyroscope and imaging system, it can calculate the position and rotation of the imaging system in the local coordinate system of host A in real time. The difference between the center position of the image and the position of the imaging system is fixed, so host A can calculate the position and rotation of the anchor point of this image in real time. Passenger plane B uses augmented reality image tracking technology to continuously search for the specific image displayed on the host in the images taken by its imaging system (this image is preset in advance, so passenger plane B knows what image is displayed on host A). This augmented reality image tracking technology can accurately identify the position and rotation of a specific image in the scene, so passenger plane B can also know the position and rotation of the anchor point of the image.

上述用于扫描特定图片的增强现实图片追踪技术可以使用苹果公司的ARKit技术,或者其他支持MarkerTracking(标志物跟踪)方法的成像技术。The above-mentioned augmented reality picture tracking technology for scanning specific pictures can use Apple's ARKit technology, or other imaging technologies that support the MarkerTracking method.

上述特定图片为程序提前预设,最好使用足够复杂且特征点足够多的图片,二维码图片是一种非常好的选择。使用二维码图片除了有易于识别的好处外,二维码图片本身自带信息的特点可以将额外的信息在不通过网络的情况下由主机A发送给客机B。除了二维码图片,任何具有足够特征点的图片也可以用作图片锚点使用。The above specific images are preset by the program. It is best to use images that are complex enough and have enough feature points. QR code images are a very good choice. In addition to the advantage of being easy to identify, the QR code image itself has the characteristic of carrying information, which can send additional information from host A to guest B without going through the network. In addition to QR code images, any image with enough feature points can also be used as an image anchor.

在客机B扫描主机A显示系统上显示的特定图片的同时,两台设备也在进行着空间位置共享,两台设备间彼此在本地坐标系下的位置与旋转通过本地网络传输给对方。每次客机B成功扫描到主机A显示系统上显示的作为锚点的特定图片,而两台设备都知晓此锚点在各自设备本地空间坐标系下的位置与旋转。通过本地网络和时间戳同步,客机B可以获得多对相同时间下此锚点在两台设备空间坐标系下的位置与旋转,通过最小二乘法,算出主机A本地空间坐标系原点相对与客机B本地空间坐标系原点的位置与旋转,此时我们将客机B的本地坐标系原点重设到主机A的原点,两台设备的空间坐标系原点和方向便相同,以此来实现两台设备空间坐标系的同步。While the guest B is scanning the specific image displayed on the display system of the host A, the two devices are also sharing their spatial positions. The positions and rotations of the two devices in the local coordinate system are transmitted to each other through the local network. Every time the guest B successfully scans the specific image displayed on the display system of the host A as an anchor point, both devices know the position and rotation of this anchor point in the local spatial coordinate system of each device. Through the local network and timestamp synchronization, the guest B can obtain multiple pairs of positions and rotations of this anchor point in the spatial coordinate systems of the two devices at the same time. Through the least squares method, the position and rotation of the origin of the local spatial coordinate system of the host A relative to the origin of the local spatial coordinate system of the guest B are calculated. At this time, we reset the origin of the local coordinate system of the guest B to the origin of the host A, and the origin and direction of the spatial coordinate systems of the two devices are the same, so as to achieve synchronization of the spatial coordinate systems of the two devices.

本实施例的最小二乘法目标如下:The least squares method objectives of this embodiment are as follows:

Figure PCTCN2022133039-appb-000008
Figure PCTCN2022133039-appb-000008

Figure PCTCN2022133039-appb-000009
Figure PCTCN2022133039-appb-000009

R a,i是主机A空间坐标系下一锚点的旋转,P a,i是主机A空间坐标系下一锚 点的位置,R b,i是是客机B空间坐标系下一锚点的旋转,P b,i是客机B空间坐标系下一锚点的位置,

Figure PCTCN2022133039-appb-000010
是一队列图片锚点在主机A本地空间坐标系下的位姿,
Figure PCTCN2022133039-appb-000011
是一队列图片锚点在客机B本地空间坐标系下的位姿,队列
Figure PCTCN2022133039-appb-000012
与队列
Figure PCTCN2022133039-appb-000013
中的锚点在现实世界的时间中一一对应。 Ra ,i is the rotation of an anchor point in the space coordinate system of host A, Pa,i is the position of an anchor point in the space coordinate system of host A, Rb,i is the rotation of an anchor point in the space coordinate system of passenger B, Pb ,i is the position of an anchor point in the space coordinate system of passenger B,
Figure PCTCN2022133039-appb-000010
is the position of the anchor point of a queue image in the local space coordinate system of host A.
Figure PCTCN2022133039-appb-000011
is the position of the anchor point of a queue image in the local space coordinate system of aircraft B.
Figure PCTCN2022133039-appb-000012
With queue
Figure PCTCN2022133039-appb-000013
The anchor points in the graph correspond one-to-one in real-world time.

因为两台混合现实设备可以根据重力利用内置的陀螺仪找到同样的Y轴指向,因此需要找到一个一维的沿着坐标系Y轴方向的旋转:Because both mixed reality devices can use the built-in gyroscope to find the same Y-axis orientation based on gravity, we need to find a one-dimensional rotation along the Y-axis of the coordinate system:

Figure PCTCN2022133039-appb-000014
Figure PCTCN2022133039-appb-000014

和一个三维的向量t,将客机B的坐标系原点转移到客机A的坐标系原点。通过求解一个旋转角度φ和向量t,使得下面公式取得最小值(最小误差):and a three-dimensional vector t, to transfer the origin of the coordinate system of aircraft B to the origin of the coordinate system of aircraft A. By solving a rotation angle φ and vector t, the following formula is minimized (minimum error):

Figure PCTCN2022133039-appb-000015
Figure PCTCN2022133039-appb-000015

上述公式中的F可以表示为:F in the above formula can be expressed as:

Figure PCTCN2022133039-appb-000016
Figure PCTCN2022133039-appb-000016

其中,w表示每对锚点的权重,w i>0;c表示惩罚的权重,c>0;c是一个常数,本实施例中同时处理带误差的位置和旋转数据,通过调整c的数值可以使公式更偏向更小的旋转误差或者更小的位移误差。 Wherein, w represents the weight of each pair of anchor points, w i >0; c represents the weight of the penalty, c >0; c is a constant. In this embodiment, position and rotation data with errors are processed simultaneously. By adjusting the value of c, the formula can be more biased towards a smaller rotation error or a smaller displacement error.

然后,计算最佳位移向量,假设

Figure PCTCN2022133039-appb-000017
是固定的,可以通过求导t从而求出最佳位移向量,公式如下: Then, calculate the optimal displacement vector, assuming
Figure PCTCN2022133039-appb-000017
is fixed, and the optimal displacement vector can be obtained by taking the derivative of t. The formula is as follows:

Figure PCTCN2022133039-appb-000018
Figure PCTCN2022133039-appb-000018

可以推导出最佳位移向量t的表达式:The expression for the optimal displacement vector t can be derived:

Figure PCTCN2022133039-appb-000019
Figure PCTCN2022133039-appb-000019

其中

Figure PCTCN2022133039-appb-000020
Figure PCTCN2022133039-appb-000021
分别是 in
Figure PCTCN2022133039-appb-000020
and
Figure PCTCN2022133039-appb-000021
They are

Figure PCTCN2022133039-appb-000022
Figure PCTCN2022133039-appb-000022

Figure PCTCN2022133039-appb-000023
Figure PCTCN2022133039-appb-000023

其中,

Figure PCTCN2022133039-appb-000024
表示所有锚点在主机A坐标系下的权重中心值,
Figure PCTCN2022133039-appb-000025
表示所有锚点在客机B坐标系下的权重中心值。在假设旋转φ不变的情况下,我们可以通过计算A与B的权重中心来计算出最佳位移向量t。 in,
Figure PCTCN2022133039-appb-000024
Indicates the weight center value of all anchor points in the host A coordinate system.
Figure PCTCN2022133039-appb-000025
represents the weight center value of all anchor points in the aircraft B coordinate system. Assuming that the rotation φ remains unchanged, we can calculate the optimal displacement vector t by calculating the weight center of A and B.

最后,计算旋转:Finally, calculate the rotation:

Figure PCTCN2022133039-appb-000026
Figure PCTCN2022133039-appb-000026

Figure PCTCN2022133039-appb-000027
Figure PCTCN2022133039-appb-000027

P′ a,i是主机A空间坐标系下一锚点与其权重中心的差值,P′ b,i是客机B空间坐标系下一锚点与其权重中心的差值。 P′ a,i is the difference between an anchor point in the spatial coordinate system of host A and its weight center, and P′ b,i is the difference between an anchor point in the spatial coordinate system of passenger aircraft B and its weight center.

根据上述已经推到出在旋转φ已经确定的情况下t的表达式,将最佳位移向量t代入目标公式F可得:According to the above expression of t when the rotation φ is determined, the optimal displacement vector t is substituted into the target formula F to obtain:

Figure PCTCN2022133039-appb-000028
Figure PCTCN2022133039-appb-000028

因为矩阵AB与矩阵BA的迹(trace)相同,即tr(AB)=tr(BA),

Figure PCTCN2022133039-appb-000029
可以在已知一对锚点旋转的情况下计算目标旋转
Figure PCTCN2022133039-appb-000030
其中,R′ i为目标 旋转(两坐标系之间的旋转差值),
Figure PCTCN2022133039-appb-000031
为锚点在客机坐标系下的旋转矩阵的倒置矩阵,R a,i为锚点在主机坐标系下的旋转)再通过求导φ的方式得到最佳旋转: Since the trace of matrix AB is the same as that of matrix BA, i.e., tr(AB) = tr(BA),
Figure PCTCN2022133039-appb-000029
The target rotation can be calculated when a pair of anchor point rotations are known
Figure PCTCN2022133039-appb-000030
Where R′ i is the target rotation (the rotation difference between the two coordinate systems),
Figure PCTCN2022133039-appb-000031
is the inverted matrix of the rotation matrix of the anchor point in the passenger aircraft coordinate system, Ra ,i is the rotation of the anchor point in the host coordinate system) and then the optimal rotation is obtained by deriving φ:

Figure PCTCN2022133039-appb-000032
Figure PCTCN2022133039-appb-000032

通过上述计算得出最佳旋转φ为:The optimal rotation φ obtained from the above calculation is:

Figure PCTCN2022133039-appb-000033
Figure PCTCN2022133039-appb-000033

任意数量的后续加入网络的设备都可以通过此方法完成跟主机A的空间坐标同步。同步成功之后,客机B的混合现实虚拟空间中渲染一个大小与主机A设备一致的虚拟物体,并将该虚拟物体的位置与旋转同主机A实时同步。如果两台设备的空间同步准确度足够高,在客机B的视角中,虚拟物体与现实中的主机A应该完全重合;如果两者误差过大,就表示此次同步不成功,客机B将重复空间坐标系同步过程,直到成功与主机A实现准确的空间坐标坐标系同步。Any number of devices that subsequently join the network can complete spatial coordinate synchronization with host A through this method. After successful synchronization, a virtual object with the same size as the host A device is rendered in the mixed reality virtual space of guest B, and the position and rotation of the virtual object are synchronized with host A in real time. If the spatial synchronization accuracy of the two devices is high enough, from the perspective of guest B, the virtual object and the real host A should completely overlap; if the error between the two is too large, it means that the synchronization is unsuccessful, and guest B will repeat the spatial coordinate system synchronization process until it successfully achieves accurate spatial coordinate system synchronization with host A.

在本发明的另一实施例中,后续加入本地网络的设备通过扫描本地网络中 已同步空间坐标系的客机显示系统上显示的特定图片,完成空间坐标系的同步。客机B连入主机A创建的本地网络并且通过扫描主机A显示系统上特定图片的方式和主机A完成空间坐标系同步。后续新的客机C加入网络,除了扫描主机A上的图片,客机C也可以通过扫描客机B显示系统上特定图片的方式与客机B进行空间坐标系同步,由于客机B已经和主机A完成了空间坐标系同步,所以此时三台设备A、B、C彼此间都成功完成了空间同步。同理,当新的客机D加入时,客机D可以通过和设备A、B、C中的任何一台通过扫描特定图片的空间同步来实现和网络中的所有设备同步空间坐标系。通过上述方式实现链式空间坐标同步,使得本地网络中的任一设备可以就近与其他设备进行空间坐标系的同步。In another embodiment of the present invention, the device that subsequently joins the local network completes the synchronization of the spatial coordinate system by scanning the specific picture displayed on the display system of the guest machine that has synchronized the spatial coordinate system in the local network. Guest machine B connects to the local network created by host A and completes the synchronization of the spatial coordinate system with host A by scanning the specific picture on the display system of host A. Subsequently, a new guest machine C joins the network. In addition to scanning the picture on host A, guest machine C can also synchronize the spatial coordinate system with guest machine B by scanning the specific picture on the display system of guest machine B. Since guest machine B has completed the spatial coordinate system synchronization with host A, the three devices A, B, and C have successfully completed the spatial synchronization with each other. Similarly, when a new guest machine D joins, guest machine D can synchronize the spatial coordinate system with all devices in the network by scanning the spatial synchronization of the specific picture with any one of the devices A, B, and C. Chain spatial coordinate synchronization is achieved by the above method, so that any device in the local network can synchronize the spatial coordinate system with other devices nearby.

用于混合现实的本地多设备快速空间锚点同步系统,所述系统包括存储器和处理器,所述存储器上存储有指令,所述指令使得所述处理器能够执行:本发明所述的用于混合现实的本地多设备快速空间锚点同步方法。A local multi-device fast spatial anchor synchronization system for mixed reality, the system comprising a memory and a processor, the memory storing instructions, the instructions enabling the processor to execute: the local multi-device fast spatial anchor synchronization method for mixed reality described in the present invention.

一种机器可读存储介质,所述机器可读存储介质上存储有指令,所述指令用于使得机器执行:本发明所述的用于混合现实的本地多设备快速空间锚点同步方法。A machine-readable storage medium having instructions stored thereon, wherein the instructions are used to enable a machine to execute: the local multi-device fast spatial anchor point synchronization method for mixed reality described in the present invention.

以上所述的仅是本发明的优选实施方式,应当指出,对于本领域的普通技术人员来说,在不脱离本发明创造构思的前提下,还可以做出若干变形和改进,这些都属于本发明的保护范围。The above is only a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several modifications and improvements without departing from the inventive concept of the present invention, which all fall within the protection scope of the present invention.

Claims (10)

用于混合现实的本地多设备快速空间锚点同步方法,其特征在于,包括以下步骤:A local multi-device fast spatial anchor synchronization method for mixed reality, characterized in that it includes the following steps: S1:位于本地空间的多台设备建立本地网络连接以实现设备间的数据传输,将所述多台设备中的任意一台设备作为主机创建本地网络,其他设备作为客机加入所述主机创建的本地网络;S1: Multiple devices in a local space establish a local network connection to achieve data transmission between the devices, any one of the multiple devices is used as a host to create a local network, and other devices are used as guests to join the local network created by the host; S2:将所述本地网络中的主机与客机进行时间同步,所述客机与主机先向对方交换各自的本地时间戳,再计算所述客机的本地时间戳与主机的本地时间戳之间的时间偏移量,根据时间偏移量调整并实现所述客机与主机之间的时间同步;S2: performing time synchronization on the host and the guest in the local network, wherein the guest and the host first exchange their local timestamps with each other, then calculate the time offset between the local timestamp of the guest and the local timestamp of the host, and adjust and realize the time synchronization between the guest and the host according to the time offset; S3:将所述本地网络中的主机与一客机进行空间锚点同步,在所述主机的显示系统上显示的一特定图片作为锚点,所述一客机通过增强现实图片跟踪技术扫描所述一特定图片,获取所述图片锚点在所述一客机空间坐标系下的第二位置与旋转,并向所述主机请求相同时间戳下所述锚点在所述主机空间坐标系下的第一位置与旋转,所述一客机获得两个位置与旋转数据,作为一对位姿对,所述一客机经过多次扫描所述锚点,获得多对位姿对,通过最小二乘法计算所述多对位姿对,得到所述主机空间坐标原点在所述一客机空间坐标系下的第三位置与旋转,通过将所述一客机的空间坐标系原点重设到该第三位置与旋转,使得所述主机与一客机的空间坐标系原点的位置与旋转相同,完成设备间空间坐标系的同步,其他客机可以与所述本地网络中的主机进行空间坐标系同步,或者与所述本地网络中已完成空间坐标系同步的客机进行空间坐标系同步。S3: Synchronize the spatial anchor points of the host and a guest in the local network, and use a specific image displayed on the display system of the host as the anchor point. The guest scans the specific image through augmented reality image tracking technology to obtain the second position and rotation of the image anchor point in the spatial coordinate system of the guest, and requests the host for the first position and rotation of the anchor point in the spatial coordinate system of the host at the same timestamp. The guest obtains two position and rotation data as a pair of pose pairs. The guest scans the anchor point multiple times to obtain multiple pose pairs, and calculates the multiple pose pairs through the least squares method to obtain the third position and rotation of the host spatial coordinate origin in the spatial coordinate system of the guest. By resetting the spatial coordinate system origin of the guest to the third position and rotation, the position and rotation of the spatial coordinate system origin of the host and the guest are the same, and the synchronization of the spatial coordinate systems between devices is completed. Other guests can synchronize the spatial coordinate system with the host in the local network, or synchronize the spatial coordinate system with the guest in the local network that has completed the spatial coordinate system synchronization. 根据权利要求1所述的用于混合现实的本地多设备快速空间锚点同步方法,其特征在于,所述步骤S1具体为:The local multi-device fast spatial anchor synchronization method for mixed reality according to claim 1, characterized in that step S1 specifically comprises: S1-1:所述主机创建本地网络,通过无线通信方式在本地网络上进行广播;S1-1: The host creates a local network and broadcasts on the local network via wireless communication; S1-2:所述客机通过所述无线通信方式搜寻所述主机的广播;S1-2: the guest machine searches for the broadcast of the host machine through the wireless communication method; S1-3:所述客机发现所述广播,使用所述无线通信方式向所述主机发送连接请求;S1-3: the guest machine discovers the broadcast and sends a connection request to the host machine using the wireless communication method; S1-4:所述主机接收到所述连接请求,同意所述连接请求,建立所述客机与主机之间的网络连接。S1-4: The host receives the connection request, agrees to the connection request, and establishes a network connection between the guest and the host. 根据权利要求1所述的用于混合现实的本地多设备快速空间锚点同步方法,其特征在于,所述步骤S2具体为:The local multi-device fast spatial anchor synchronization method for mixed reality according to claim 1, characterized in that step S2 specifically comprises: S2-1:一客机将该客机的本地时间戳一发送至所述主机;S2-1: A guest sends a local timestamp of the guest to the host; S2-2:所述主机将接收到所述本地时间戳一的时间点,作为本地时间戳二发送至所述一客机;S2-2: the host sends the time point of receiving the local timestamp 1 as the local timestamp 2 to the guest machine; S2-3:所述一客机将接收到所述本地时间戳二的时间点,作为本地时间戳三,根据所述本地时间戳一、本地时间戳二及本地时间戳三计算并保存所述一客机与主机的时间戳偏移量;S2-3: the guest machine receives the time point of the local timestamp 2 as the local timestamp 3, and calculates and saves the timestamp offset between the guest machine and the host machine according to the local timestamp 1, the local timestamp 2 and the local timestamp 3; S2-4:重复步骤S2-1至步骤S2-3,直至所述时间戳偏移量的数量达到设定值,得到多个时间戳偏移量;S2-4: Repeat steps S2-1 to S2-3 until the number of timestamp offsets reaches a set value, thereby obtaining multiple timestamp offsets; S2-5:计算所述多个时间戳偏移量的标准方差,若所述标准方差不小于预设值,则放弃最早计算出的一个时间戳偏移量然后重复一遍步骤S2-1至步骤S2-3,直至所述标准方差小于预设值,计算所述多个时间戳偏移量的平均值,作为最终的时间戳偏移量结果;S2-5: Calculate the standard deviation of the multiple timestamp offsets. If the standard deviation is not less than a preset value, discard the earliest calculated timestamp offset and repeat steps S2-1 to S2-3 until the standard deviation is less than the preset value. Calculate the average value of the multiple timestamp offsets as the final timestamp offset result. S2-6:其他客机根据步骤S2-1至S2-5计算其他每个客机与主机之间最终的时间戳偏移量结果。S2-6: Other guest machines calculate the final timestamp offset result between each other guest machine and the host machine according to steps S2-1 to S2-5. 根据权利要求3所述的用于混合现实的本地多设备快速空间锚点同步方法,其特征在于,所述步骤S2-3计算时间戳偏移量offset的公式为:The local multi-device fast spatial anchor synchronization method for mixed reality according to claim 3 is characterized in that the formula for calculating the timestamp offset offset in step S2-3 is:
Figure PCTCN2022133039-appb-100001
Figure PCTCN2022133039-appb-100001
其中,T0是本地时间戳一,T0′是本地时间戳二,T1是本地时间戳三。Among them, T0 is local timestamp one, T0′ is local timestamp two, and T1 is local timestamp three.
根据权利要求3所述的用于混合现实的本地多设备快速空间锚点同步方法,其特征在于,所述一客机创建队列保存所述多个时间戳偏移量。The local multi-device fast spatial anchor synchronization method for mixed reality according to claim 3 is characterized in that the client creates a queue to save the multiple timestamp offsets. 根据权利要求1所述的用于混合现实的本地多设备快速空间锚点同步方法,其特征在于,所述步骤S3具体为:The local multi-device fast spatial anchor synchronization method for mixed reality according to claim 1, characterized in that step S3 specifically comprises: S3-1:所述主机的显示系统上显示一特定图片,所述一特定图片即为空间中的一个锚点,所述主机利用加速计、陀螺仪及成像系统,根据所述一特定图片和主机成像系统的偏移向量不变,实时计算出所述一特定图片在所述主机的本地坐标系下的位置与旋转;S3-1: a specific picture is displayed on the display system of the host, and the specific picture is an anchor point in space. The host uses an accelerometer, a gyroscope and an imaging system to calculate the position and rotation of the specific picture in the local coordinate system of the host in real time according to the invariance of the offset vector of the specific picture and the imaging system of the host; S3-2:所述本地网络中一客机通过增强现实图片追踪技术利用成像系统扫描所述一特定图片,增强现实图片追踪技术识别出场景中一特定图片的第二位置与旋转,发送所述第二位置与旋转至所述主机,并接收所述主机发送的所述第一位置与旋转,所述第一位置与旋转和第二位置与旋转具有相同的时间戳;S3-2: A passenger plane in the local network scans the specific image using an imaging system through augmented reality image tracking technology, and the augmented reality image tracking technology identifies a second position and rotation of the specific image in the scene, sends the second position and rotation to the host, and receives the first position and rotation sent by the host, wherein the first position and rotation and the second position and rotation have the same timestamp; S3-3:所述一客机获取多对不同时间戳下的第一位置与旋转、第二位置与旋转,通过最小二乘法计算得到最佳位移向量与最佳旋转,得到所述主机的本地空间坐标系原点相对所述客机的本地空间坐标系原点的位置与旋转,将所述客机的本地空间坐标系原点重设到所述主机的本地空间坐标系原点,完成所述主机与客机的空间坐标系同步;对于本地网络中其他客机,通过将自身的本地空间坐标系原点重设到所述主机的本地空间坐标系原点或者任意一台已同步客 机的本地空间坐标系原点,进行本地网络中设备的空间坐标系的同步;S3-3: The guest aircraft obtains multiple pairs of first positions and rotations, and second positions and rotations at different timestamps, calculates the best displacement vector and the best rotation by the least square method, obtains the position and rotation of the origin of the local space coordinate system of the host relative to the origin of the local space coordinate system of the guest aircraft, resets the origin of the local space coordinate system of the guest aircraft to the origin of the local space coordinate system of the host, and completes the spatial coordinate system synchronization of the host and the guest aircraft; for other guest aircraft in the local network, the spatial coordinate systems of the devices in the local network are synchronized by resetting their own local space coordinate system origins to the origin of the local space coordinate system of the host or the origin of the local space coordinate system of any synchronized guest aircraft; S3-4:在所述一客机的混合现实虚拟空间中渲染一个大小与所述主机设备一致的虚拟物体,并将所述虚拟物体的位置与旋转同所述主机实时同步,若所述虚拟物体与现实中的所述主机未完全重合,则所述一客机将重复步骤S3-1至S3-3,直至所述虚拟物体与现实中的所述主机完全重合。S3-4: Render a virtual object of the same size as the host device in the mixed reality virtual space of the guest aircraft, and synchronize the position and rotation of the virtual object with the host in real time. If the virtual object does not completely overlap with the host in reality, the guest aircraft will repeat steps S3-1 to S3-3 until the virtual object completely overlaps with the host in reality. 根据权利要求6所述的用于混合现实的本地多设备快速空间锚点同步方法,其特征在于,所述最佳位移向量t的表达式为:The local multi-device fast spatial anchor point synchronization method for mixed reality according to claim 6, characterized in that the expression of the optimal displacement vector t is:
Figure PCTCN2022133039-appb-100002
Figure PCTCN2022133039-appb-100002
其中,
Figure PCTCN2022133039-appb-100003
表示所有锚点在所述主机空间坐标系下的权重中心值,
Figure PCTCN2022133039-appb-100004
表示所有锚点在所述一客机空间坐标系下的权重中心值,
Figure PCTCN2022133039-appb-100005
是一个沿空间Y轴旋转φ角度的旋转矩阵。
in,
Figure PCTCN2022133039-appb-100003
Represents the weight center value of all anchor points in the host space coordinate system,
Figure PCTCN2022133039-appb-100004
represents the weight center value of all anchor points in the space coordinate system of the aircraft,
Figure PCTCN2022133039-appb-100005
It is a rotation matrix that rotates by an angle φ along the Y axis of the space.
根据权利要求6所述的用于混合现实的本地多设备快速空间锚点同步方法,其特征在于,所述最佳旋转φ的计算方法为:The local multi-device fast spatial anchor synchronization method for mixed reality according to claim 6, characterized in that the calculation method of the optimal rotation φ is:
Figure PCTCN2022133039-appb-100006
Figure PCTCN2022133039-appb-100006
其中,P′ a,i,x、P′ a,i,z是所述主机空间坐标系下一锚点与其权重中心的差值,P′ b,i,x、P′ b,i,z、是所述一客机空间坐标系下一锚点与其权重中心的差值,R′ i,1,x、R′ i,1,z、R′ i,3,x、R′ i,3,z是所述主机与一客机的空间坐标系之间的旋转差值,c是一大于0的可调整常数,通过调整c的数值可以使公式更偏向更小的旋转误差或更小的位移误差。 Among them, P′ a,i,x and P′ a,i,z are the differences between an anchor point in the spatial coordinate system of the host and its weight center, P′ b,i,x and P′ b,i,z are the differences between an anchor point in the spatial coordinate system of the guest aircraft and its weight center, R′ i,1,x , R′ i,1,z , R′ i,3,x and R′ i,3,z are the rotation differences between the spatial coordinate systems of the host and a guest aircraft, and c is an adjustable constant greater than 0. By adjusting the value of c, the formula can be made more biased towards a smaller rotation error or a smaller displacement error.
用于混合现实的本地多设备快速空间锚点同步系统,其特征在于,所述系统包括存储器和处理器,所述存储器上存储有指令,所述指令使得所述处理器能够执行:根据权利要求1-8中任一项所述的用于混合现实的本地多设备快 速空间锚点同步方法。A local multi-device fast spatial anchor synchronization system for mixed reality, characterized in that the system includes a memory and a processor, the memory stores instructions, and the instructions enable the processor to execute: a local multi-device fast spatial anchor synchronization method for mixed reality according to any one of claims 1-8. 一种机器可读存储介质,其特征在于,所述机器可读存储介质上存储有指令,所述指令用于使得机器执行:根据权利要求1-8中任一项所述的用于混合现实的本地多设备快速空间锚点同步方法。A machine-readable storage medium, characterized in that instructions are stored on the machine-readable storage medium, and the instructions are used to enable a machine to execute: a local multi-device fast spatial anchor synchronization method for mixed reality according to any one of claims 1-8.
PCT/CN2022/133039 2022-10-31 2022-11-19 Local multi-device rapid spatial anchors synchronization method and system for mixed reality Ceased WO2024092890A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211351078 2022-10-31
CN202211351078.9 2022-10-31

Publications (1)

Publication Number Publication Date
WO2024092890A1 true WO2024092890A1 (en) 2024-05-10

Family

ID=85527332

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/133039 Ceased WO2024092890A1 (en) 2022-10-31 2022-11-19 Local multi-device rapid spatial anchors synchronization method and system for mixed reality

Country Status (2)

Country Link
CN (1) CN115834867B (en)
WO (1) WO2024092890A1 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107945116A (en) * 2017-11-16 2018-04-20 上海麦界信息技术有限公司 The reference axis synchronous method of AR indoor positionings is realized for more equipment rooms
CN109087399A (en) * 2018-07-17 2018-12-25 上海游七网络科技有限公司 A method of by positioning figure Fast synchronization AR space coordinates
US20180374269A1 (en) * 2017-06-21 2018-12-27 INVRSE Reality Limited Augmented reality and virtual reality mobile device user interface automatic calibration
WO2019146830A1 (en) * 2018-01-25 2019-08-01 (주)이지위드 Apparatus and method for providing real-time synchronized augmented reality content utilizing spatial coordinates as markers
CN110322484A (en) * 2019-05-29 2019-10-11 武汉幻石佳德数码科技有限公司 The calibration method and system of the augmented reality Virtual Space of more collaborative shares
WO2021110051A1 (en) * 2019-12-05 2021-06-10 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Method and system for associating device coordinate systems in a multi‐person ar system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9916002B2 (en) * 2014-11-16 2018-03-13 Eonite Perception Inc. Social applications for augmented reality technologies
CN113792699B (en) * 2021-09-24 2024-03-12 北京易航远智科技有限公司 Object-level rapid scene recognition method based on semantic point cloud

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180374269A1 (en) * 2017-06-21 2018-12-27 INVRSE Reality Limited Augmented reality and virtual reality mobile device user interface automatic calibration
CN107945116A (en) * 2017-11-16 2018-04-20 上海麦界信息技术有限公司 The reference axis synchronous method of AR indoor positionings is realized for more equipment rooms
WO2019146830A1 (en) * 2018-01-25 2019-08-01 (주)이지위드 Apparatus and method for providing real-time synchronized augmented reality content utilizing spatial coordinates as markers
CN109087399A (en) * 2018-07-17 2018-12-25 上海游七网络科技有限公司 A method of by positioning figure Fast synchronization AR space coordinates
CN110322484A (en) * 2019-05-29 2019-10-11 武汉幻石佳德数码科技有限公司 The calibration method and system of the augmented reality Virtual Space of more collaborative shares
WO2021110051A1 (en) * 2019-12-05 2021-06-10 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Method and system for associating device coordinate systems in a multi‐person ar system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
LIU, XIU-KUN; DU, QINGYUN: "Algorithmic Research on Virtual-Real Matching on the Vision in Augmented Reality", CEHUI KEXUE - SCIENCE OF SURVEYING AND MAPPING, ZHONGGUO CEHUI KEXUE YANJIUYUAN, CN, vol. 32, no. 5, 30 September 2007 (2007-09-30), CN , pages 27 - 29, 200-201, XP009555052, ISSN: 1009-2307 *

Also Published As

Publication number Publication date
CN115834867A (en) 2023-03-21
CN115834867B (en) 2025-04-25

Similar Documents

Publication Publication Date Title
TWI675351B (en) User location location method and device based on augmented reality
US9384594B2 (en) Anchoring virtual images to real world surfaces in augmented reality systems
CN103858414B (en) Distributed localization mechanism for Wireless Telecom Equipment
CN114527872B (en) Virtual reality interaction system, method and computer storage medium
JP2019533372A (en) Panorama image display control method, apparatus, and storage medium
US9256299B2 (en) Client device orientation
US10803665B1 (en) Data aggregation for augmented reality applications
US20240154711A1 (en) Local multi-device fast spatial anchor point synchronization method for mixed reality and system
WO2019143572A1 (en) Method and system for ar and vr collaboration in shared spaces
CN110140099A (en) System and method for tracking control unit
US20220067974A1 (en) Cloud-Based Camera Calibration
TW200540458A (en) Motion sensor using dual camera inputs
CN103248810A (en) Image processing device, image processing method, and program
WO2017027338A1 (en) Apparatus and method for supporting interactive augmented reality functionalities
TW201710877A (en) Method of sharing display image on multiple screens and associated communication terminal
CN117474988A (en) Image acquisition method and related device based on camera
JP2019179382A (en) Information processing program, information processing method and information processing system
CN103457965B (en) Virtual machine system and remote display method
US11388205B2 (en) Systems and methods for establishing a shared augmented reality session
EP2955860B1 (en) Device selection method and apparatus
CN112513941B (en) System and method for generating a collection of approximately coordinated regional maps
WO2024092890A1 (en) Local multi-device rapid spatial anchors synchronization method and system for mixed reality
CN105183142B (en) A kind of digital information reproducing method of utilization space position bookbinding
US12289307B2 (en) System and method for using a validated card in a virtual environment
CN113516776B (en) Augmented reality synchronization method, device, terminal equipment and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22964188

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 16/09/2025)