WO2023071381A1 - Virtual-real fusion method and apparatus, and device, storage medium and program product - Google Patents

Virtual-real fusion method and apparatus, and device, storage medium and program product Download PDF

Info

Publication number
WO2023071381A1
WO2023071381A1 PCT/CN2022/111199 CN2022111199W WO2023071381A1 WO 2023071381 A1 WO2023071381 A1 WO 2023071381A1 CN 2022111199 W CN2022111199 W CN 2022111199W WO 2023071381 A1 WO2023071381 A1 WO 2023071381A1
Authority
WO
WIPO (PCT)
Prior art keywords
virtual object
projection
display
projection position
target
Prior art date
Application number
PCT/CN2022/111199
Other languages
French (fr)
Chinese (zh)
Inventor
盛崇山
孙夏
廖锦毅
Original Assignee
深圳市慧鲤科技有限公司
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 深圳市慧鲤科技有限公司 filed Critical 深圳市慧鲤科技有限公司
Publication of WO2023071381A1 publication Critical patent/WO2023071381A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/006Mixed reality
    • G06T3/06
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras

Definitions

  • the present disclosure relates to the technical field of augmented reality, and in particular to a virtual-real fusion method, device, equipment, storage medium and program product.
  • the method of changing the display position of the virtual object from the first projection position to the target projection position by using the second correction strategy is as described above.
  • the fusion part 42 in response to obtaining the corrected second positioning result of the target device and the virtual object does not meet the first preset condition, adopts the first correction strategy or the second correction strategy to change the display of the virtual object to Changing the position from the first projection position to the target projection position includes: in response to the virtual object belonging to the second type, using the first correction strategy to change the display position of the virtual object from the first projection position to the target projection position; in response to the virtual object belonging to The third type is to change the display position of the virtual object from the first projection position to the target projection position by using the second correction strategy; The display position of the object is changed from the first projection position to the target projection position.
  • the above solution improves the flexibility of the correction strategy by implementing different correction strategies for different types of virtual objects.
  • the second positioning result of the target device in the preset map is obtained by positioning and matching the target device with the preset map, so that the second positioning result is more accurate than the first positioning result before correction.
  • the implementation of the device embodiment may refer to the implementation of the method embodiment.
  • This disclosure relates to the field of augmented reality.
  • acquiring the image information of the target object in the real environment and then using various visual correlation algorithms to detect or identify the relevant features, states and attributes of the target object, and thus obtain the image information that matches the specific application.
  • AR effect combining virtual and reality.
  • the target object may involve faces, limbs, gestures, actions, etc. related to the human body, or markers and markers related to objects, or sand tables, display areas or display items related to venues or places.
  • Vision-related algorithms can involve visual positioning, real-time positioning in map construction (Simultaneous Localization and Mapping, SLAM), 3D reconstruction, image registration, background segmentation, key point extraction and tracking of objects, object pose or depth detection, etc.

Abstract

Disclosed in the present disclosure are a virtual-real fusion method and apparatus, and a device, a storage medium and a program product. The virtual-real fusion method comprises: on the basis of a first positioning result of a target device before being calibrated, determining a first projection position of a virtual object in the current photographed picture of the target device, wherein the first projection position is determined to be a display position of the virtual object in the current photographed picture; and in response to a second positioning result of the target device after being calibrated having been acquired, and the virtual object meeting a first preset condition, continuing to determine the first projection position to be the display position of the virtual object in the current photographed picture.

Description

虚实融合方法、装置、设备、存储介质及程序产品Virtual-real fusion method, device, equipment, storage medium and program product
相关申请的交叉引用Cross References to Related Applications
本公开基于申请号为202111272361.8、申请日为2021年10月29日、申请名称为“虚实融合方法、装置、设备及存储介质”的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此以全文引入的方式引入本公开。This disclosure is based on the Chinese patent application with the application number 202111272361.8, the application date is October 29, 2021, and the application name is "virtual-real fusion method, device, equipment and storage medium", and claims the priority of the Chinese patent application. The entire content of the Chinese patent application is hereby incorporated into this disclosure in its entirety.
技术领域technical field
本公开涉及增强现实技术领域,特别是涉及一种虚实融合方法、装置、设备、存储介质及程序产品。The present disclosure relates to the technical field of augmented reality, and in particular to a virtual-real fusion method, device, equipment, storage medium and program product.
背景技术Background technique
随着科学技术的发展,增强现实(Augmented Reality,AR)技术的应用越来越广泛。增强现实技术是一种将真实世界和虚拟世界信息结合的技术。通过设备将虚拟视觉信息在真实世界图像中显示出来。With the development of science and technology, augmented reality (Augmented Reality, AR) technology is more and more widely used. Augmented reality technology is a technology that combines real world and virtual world information. Display virtual visual information in real-world images through devices.
在虚实融合过程中,由于设备的定位过程中会出现累积误差,因此,需要每隔一段时间对设备的位置进行更新,以便校正累积误差。因为累积误差的存在,在设备的位置更新后,原有的虚拟视觉信息会在设备的屏幕上发生跳变,定期的这种虚拟视觉信息跳变会带有不良的视觉体验。In the process of virtual-real fusion, due to the cumulative error in the positioning process of the device, it is necessary to update the position of the device at regular intervals in order to correct the cumulative error. Due to the existence of accumulated errors, after the location of the device is updated, the original virtual visual information will jump on the screen of the device, and the regular jump of this virtual visual information will bring a bad visual experience.
发明内容Contents of the invention
本公开至少提供一种虚实融合方法、装置、设备、存储介质及程序产品。The present disclosure at least provides a virtual-real fusion method, device, equipment, storage medium and program product.
本公开提供了一种虚实融合方法,包括:基于目标设备经校正前的第一定位结果,确定虚拟物在目标设备的当前拍摄画面的第一投影位置,其中,第一投影位置确定为虚拟物在当前拍摄画面中的显示位置;响应于获取到目标设备经校正后的第二定位结果,并且虚拟物满足第一预设条件,将第一投影位置继续确定为虚拟物在当前拍摄画面中的显示位置。The present disclosure provides a virtual-real fusion method, including: based on the first positioning result of the target device before correction, determine the first projection position of the virtual object in the current shooting picture of the target device, wherein the first projection position is determined as the virtual object Display position in the current shooting frame; in response to obtaining the corrected second positioning result of the target device and the virtual object meets the first preset condition, continue to determine the first projection position as the virtual object’s position in the current shooting frame Show location.
因此,在获取到目标设备经校正后的第二定位结果后,响应于虚拟物满足第一预设条件,将虚拟物保持显示在当前拍摄画面的第一投影位置上,能够减少虚拟物因为显示位置发生跳变带来的视觉影响。Therefore, after obtaining the corrected second positioning result of the target device, in response to the fact that the virtual object satisfies the first preset condition, the virtual object is kept displayed at the first projection position of the current shooting frame, which can reduce The visual impact caused by the jump in position.
本公开提供了一种虚实融合装置,包括:确定部分,配置为基于目标设备经校正前的第一定位结果,确定虚拟物在目标设备的当前拍摄画面的第一投影位置,其中,第一投影位置确定为虚拟物在当前拍摄画面中的显示位置;融合部分,配置为响应于获取到目标设备经校正后的第二定位结果,并且虚拟物满足第一预设条件,将第一投影位置继续确定为虚拟物在当前拍摄画面中的显示位置。The present disclosure provides a virtual-reality fusion device, including: a determining part configured to determine the first projection position of a virtual object on the current shooting picture of the target device based on the first positioning result of the target device before correction, wherein the first projection The position is determined as the display position of the virtual object in the current shooting frame; the fusion part is configured to respond to the acquisition of the corrected second positioning result of the target device, and the virtual object satisfies the first preset condition, continue the first projection position It is determined as the display position of the virtual object in the current shooting frame.
本公开提供了一种电子设备,包括存储器和处理器,处理器配置为执行存储器中存储的程序指令,以实现上述虚实融合方法。The present disclosure provides an electronic device, including a memory and a processor, and the processor is configured to execute program instructions stored in the memory, so as to realize the above virtual-real fusion method.
本公开提供了一种计算机可读存储介质,其上存储有程序指令,程序指令被处理器执行时实现上述虚实融合方法。The present disclosure provides a computer-readable storage medium, on which program instructions are stored, and when the program instructions are executed by a processor, the above virtual-real fusion method is realized.
本公开提供了一种计算机程序产品,包括计算机可读代码,当所述计算机可读代码在电子设备中运行时,所述电子设备中的处理器执行配置为实现上述虚实融合方法。The present disclosure provides a computer program product, including computer-readable codes. When the computer-readable codes are run in an electronic device, a processor in the electronic device is configured to implement the above virtual-real fusion method.
上述方案,在获取到目标设备经校正后的第二定位结果后,响应于虚拟物满足第一预设条件,将虚拟物保持显示在当前拍摄画面的第一投影位置上,能够减少虚拟物因为显示位置发生跳变带来的视觉影响。In the above solution, after obtaining the corrected second positioning result of the target device, in response to the fact that the virtual object satisfies the first preset condition, the virtual object is kept displayed at the first projection position of the current shooting screen, which can reduce the risk of the virtual object due to The visual impact caused by the jump of the display position.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,而非限制本公开。It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
附图说明Description of drawings
此处的附图被并入说明书中并构成本说明书的一部分,这些附图示出了符合本公开的实施例,并与说明书一起用于说明本公开的技术方案。The accompanying drawings here are incorporated into the description and constitute a part of the present description. These drawings show embodiments consistent with the present disclosure, and are used together with the description to explain the technical solution of the present disclosure.
图1是本公开虚实融合方法一实施例的流程示意图;FIG. 1 is a schematic flow diagram of an embodiment of the virtual-real fusion method of the present disclosure;
图2为本公开虚实融合方法一实施例示出步骤S12的部分子流程示意图;FIG. 2 is a schematic diagram of a part of the sub-flow of step S12 according to an embodiment of the virtual-real fusion method of the present disclosure;
图3是本公开虚实融合方法一实施例的另一流程示意图;Fig. 3 is another schematic flow chart of an embodiment of the virtual-real fusion method of the present disclosure;
图4是本公开虚实融合装置一实施例的结构示意图;Fig. 4 is a schematic structural diagram of an embodiment of the virtual reality fusion device of the present disclosure;
图5是本公开电子设备一实施例的结构示意图;5 is a schematic structural diagram of an embodiment of the disclosed electronic device;
图6是本公开计算机可读存储介质一实施例的结构示意图。Fig. 6 is a schematic structural diagram of an embodiment of a computer-readable storage medium of the present disclosure.
具体实施方式Detailed ways
下面结合说明书附图,对本公开实施例的方案进行详细说明。The solutions of the embodiments of the present disclosure will be described in detail below in conjunction with the accompanying drawings.
以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、接口、技术之类的具体细节,以便透彻理解本公开。In the following description, for purposes of illustration rather than limitation, specific details, such as specific system architectures, interfaces, techniques, are set forth in order to provide a thorough understanding of the present disclosure.
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。此外,本文中的“多”表示两个或者多于两个。另外,本文中术语“至少一种”表示多种中的任意一种或多种中的至少两种的任意组合,例如,包括A、B、C中的至少一种,可以表示包括从A、B和C构成的集合中选择的任意一个或多个元素。The term "and/or" in this article is just an association relationship describing associated objects, which means that there can be three relationships, for example, A and/or B can mean: A exists alone, A and B exist simultaneously, and there exists alone B these three situations. In addition, the character "/" in this article generally indicates that the contextual objects are an "or" relationship. In addition, "many" herein means two or more than two. In addition, the term "at least one" herein means any one of a variety or any combination of at least two of the more, for example, including at least one of A, B, and C, which may mean including from A, Any one or more elements selected from the set formed by B and C.
请参阅图1,图1是本公开虚实融合方法一实施例的流程示意图。该虚实融合方法可以包括如下步骤S11至步骤S12:Please refer to FIG. 1 . FIG. 1 is a schematic flowchart of an embodiment of a virtual-real fusion method of the present disclosure. The virtual-real fusion method may include the following steps S11 to S12:
步骤S11:基于目标设备经矫正前的第一定位结果,确定虚拟物在目标设备的当前拍摄画面的第一投影位置,其中第一投影位置确定为虚拟物在当前拍摄画面中的显示位置。Step S11: Based on the first positioning result of the target device before correction, determine the first projection position of the virtual object in the current shooting frame of the target device, wherein the first projection position is determined as the display position of the virtual object in the current shooting frame.
其中,基于目标设备经校正前的第一定位结果,确定虚拟物在目标设备的当前拍摄画面中的第一投影位置的方式可以是根据目标设备的第一定位结果和虚拟物的原始空间位置确定。Wherein, based on the first positioning result of the target device before correction, the method of determining the first projection position of the virtual object in the current shooting frame of the target device may be determined according to the first positioning result of the target device and the original spatial position of the virtual object .
其中,目标设备可以是本公开实施例所提供方法的执行设备,在一些公开实施例中,目标设备可以是具备增强现实功能的设备,如AR眼镜、手机等。另一些公开实施例中,目标设备也可不是本公开实施例所提供方法的执行设备,即目标设备可以仅执行拍摄环境画面以及显示虚实融合画面。在实施中,目标设备在对环境画面进行拍摄后,将环境画面传输给执行设备,执行设备对目标设备进行定位得到目标设备经校正前的第一定位结果,然后基于该第一定位结果以及虚拟物的原始空间位置,确定虚拟物在目标设备的当前拍摄画面的第一投影位置,然后将虚拟物与当前拍摄画面进行融合,得到融合画面, 并将融合画面传输至目标设备,以便目标设备能够显示融合画面。本公开实施例以目标设备为本公开实施例所提供方法的执行设备为例。Wherein, the target device may be an execution device of the method provided by the embodiments of the present disclosure. In some disclosed embodiments, the target device may be a device with an augmented reality function, such as AR glasses, a mobile phone, and the like. In other disclosed embodiments, the target device may not be the execution device of the method provided by the embodiments of the present disclosure, that is, the target device may only perform shooting of the environment picture and display of the virtual-real fusion picture. In implementation, after the target device captures the environment picture, it transmits the environment picture to the execution device, and the execution device locates the target device to obtain the first positioning result of the target device before correction, and then based on the first positioning result and the virtual The original spatial position of the object, determine the first projection position of the virtual object on the current shooting screen of the target device, and then fuse the virtual object with the current shooting screen to obtain a fusion screen, and transmit the fusion screen to the target device so that the target device can The fusion screen is displayed. In the embodiment of the present disclosure, the target device is taken as an execution device of the method provided by the embodiment of the present disclosure as an example.
虚拟物包括可见的展示信息或效果,例如可见的文字、图形、模型、动漫形象等;虚拟物也可包括用于遮挡碰撞的不可见虚拟物,例如,虚拟物可以是指示类、导航类、兴趣点类、虚拟形象类等。Virtual objects include visible display information or effects, such as visible text, graphics, models, animation images, etc.; virtual objects can also include invisible virtual objects used to block collisions, for example, virtual objects can be indicators, navigation, Points of interest, avatars, etc.
目标设备经校正前的第一定位结果可以是目标设备在世界坐标系下的位置或位姿,位姿包括位置和姿态。其中,世界坐标系与虚拟物所在的虚拟空间对齐。The first positioning result of the target device before correction may be the position or pose of the target device in the world coordinate system, and the pose includes position and pose. Wherein, the world coordinate system is aligned with the virtual space where the virtual object is located.
步骤S12:响应于获取到目标设备经校正后的第二定位结果,且虚拟物满足第一预设条件,将第一投影位置继续确定为虚拟物在当前拍摄画面中的显示位置。Step S12: In response to obtaining the corrected second positioning result of the target device and the virtual object meets the first preset condition, continue to determine the first projection position as the display position of the virtual object in the current shooting frame.
其中,在虚实融合中一般采用视觉惯性定位或其他6自由度(6 Degree of Freedom,6DoF)跟踪算法等处理量不大的定位方式,以获取目标设备在世界坐标系下的定位结果。但是这些定位方式可能会存在定位误差,所以在持续定位过程中难免会存在一定的累积误差。因此,需要定期对目标设备的定位结果进行校正,以减小定位过程中的累积误差。具体对目标设备的定位结果进行校正的时间可以由用户自行设置,或采用目标设备出厂时的设置。例如,每隔30秒(s)对目标设备的第一定位结果进行一次校正。Among them, visual inertial positioning or other 6 degrees of freedom (6 Degree of Freedom, 6DoF) tracking algorithms are generally used in virtual-real fusion to obtain the positioning results of the target device in the world coordinate system. However, these positioning methods may have positioning errors, so it is inevitable that there will be certain cumulative errors in the continuous positioning process. Therefore, it is necessary to periodically correct the positioning results of the target device to reduce the cumulative error in the positioning process. The specific time for correcting the positioning result of the target device can be set by the user, or the setting of the target device when it leaves the factory can be adopted. For example, the first positioning result of the target device is corrected every 30 seconds (s).
其中,第一预设条件可以是对虚拟物设置的精确度要求小于预设精确度要求。例如,对于一些指示类、导航类的虚拟物精确度要求相对于标签类的虚拟物的精确度要求而言,前者相对宽松。指示类、导航类的虚拟物具体可以是虚拟箭头等,标签类的虚拟物具体可以是商店各商品对应的简介(例如价格、产品介绍等)。这种指示类、导航类的虚拟物的精确度要求可以设置为小于预设精确度要求。标签类虚拟物的精确度要求可以设置为大于或等于预设精确度要求。当然,另一些实施例中,可以根据虚拟物设置的允许误差要求调整第一预设条件。Wherein, the first preset condition may be that the accuracy requirement set for the virtual object is smaller than the preset accuracy requirement. For example, the accuracy requirements for virtual objects of indication and navigation types are relatively loose compared to the accuracy requirements of virtual objects of label type. The virtual objects of the indication type and the navigation type can be virtual arrows, etc., and the virtual objects of the label type can be specific introductions (such as prices, product introductions, etc.) corresponding to each commodity in the store. The accuracy requirements of such indication-type and navigation-type virtual objects can be set to be smaller than the preset accuracy requirements. The accuracy requirement of the tag virtual object can be set to be greater than or equal to the preset accuracy requirement. Certainly, in some other embodiments, the first preset condition may be adjusted according to the allowable error requirement set by the virtual object.
在获取到目标设备经校正后的第二定位结果,且虚拟物满足第一预设条件的情况下,将第一投影位置继续确定为虚拟物在当前拍摄画面中的显示位置,意味着在目标设备校正前后,虚拟物在当前拍摄画面中的显示位置并未发生跳变。When the corrected second positioning result of the target device is obtained and the virtual object satisfies the first preset condition, continue to determine the first projection position as the display position of the virtual object in the current shooting frame, which means Before and after device calibration, the display position of the virtual object in the current shooting screen does not change.
上述方案,在获取到目标设备经校正后的第二定位结果后,响应于虚拟物满足第一预设条件,将虚拟物保持显示在当前拍摄画面的第一投影位置上,能够减少虚拟物因为显示位置发生跳变带来的视觉影响。In the above solution, after obtaining the corrected second positioning result of the target device, in response to the fact that the virtual object satisfies the first preset condition, the virtual object is kept displayed at the first projection position of the current shooting screen, which can reduce the risk of the virtual object due to The visual impact caused by the jump of the display position.
一些公开实施例中,在确定显示位置之后,虚实融合方法还包括以下步骤:显示当前拍摄画面,并在当前拍摄画面的第一投影位置上显示虚拟物。In some disclosed embodiments, after the display position is determined, the virtual-real fusion method further includes the following steps: displaying the current shooting frame, and displaying the virtual object at the first projection position of the current shooting frame.
在实施中,可以将拍摄画面与虚拟物进行融合,得到融合画面。一种可能的融合方式为,将虚拟物投影到当前拍摄画面的第一投影位置上。然后,在目标设备的显示界面上,显示融合画面,即可实现显示当前拍摄画面,并在当前拍摄画面的第一投影位置上显示虚拟物。也就是说,在根据目标设备的第一定位结果,确定虚拟物在目标设备的当前拍摄画面的第一投影位置,并将该第一投影位置确定为虚拟物在当前拍摄画面中的显示位置之后,将虚拟物显示在当前拍摄画面的显示位置,并且显示当前拍摄画面,而在执行步骤S12之后,将第一投影位置继续确定为虚拟物在当前拍摄画面中的显示位置之后,继续显示当前拍摄画面,并且继续在当前拍摄画面中的显示位置显示虚拟物。In implementation, the shooting picture and the virtual object can be fused to obtain a fused picture. A possible fusion manner is to project the virtual object onto the first projection position of the current shooting frame. Then, displaying the fusion picture on the display interface of the target device can realize the display of the current shooting picture, and display the virtual object on the first projection position of the current shooting picture. That is to say, after determining the first projection position of the virtual object in the current shooting frame of the target device according to the first positioning result of the target device, and determining the first projection position as the display position of the virtual object in the current shooting frame , display the virtual object at the display position of the current shooting frame, and display the current shooting frame, and after step S12 is executed, continue to determine the first projection position as the display position of the virtual object in the current shooting frame, and continue to display the current shooting frame screen, and continue to display the virtual object at the display position in the current shooting screen.
其中,在首次确定虚拟物在当前拍摄画面中的显示位置之后,可以持续性地在当前确定的显示位置显示该虚拟物,而且该虚拟物的显示位置在显示过程中能够进行更新。例如,在目标设备的定位结果经校正前,虚拟物在当前拍摄画面中的显示位置为第一投影位置,而在目标设备的定位结果经校正后,且虚拟物在满足第一预设条件的情况下,虚拟物在当前拍摄画面中的显示位置不变;在虚拟物不满足第一预设条件的情况下,虚拟物在当前拍摄画面中的显示位置则可能会发生变更,则在变更后的显示位置继续显示 虚拟物。Wherein, after determining the display position of the virtual object in the current shooting frame for the first time, the virtual object can be continuously displayed at the currently determined display position, and the display position of the virtual object can be updated during the display process. For example, before the positioning result of the target device is corrected, the display position of the virtual object in the current shooting frame is the first projection position; after the positioning result of the target device is corrected, and the virtual object satisfies the first preset condition In this case, the display position of the virtual object in the current shooting frame remains unchanged; in the case that the virtual object does not meet the first preset condition, the display position of the virtual object in the current shooting frame may change, then after the change The display position of continues to display the virtual object.
一些公开实施例中,上述步骤S11包括:利用虚拟物的原始空间位置、目标设备的投影参数、以及世界坐标系与目标设备的相机坐标系之间的第二变换参数,得到第一投影位置。In some disclosed embodiments, the above step S11 includes: using the original spatial position of the virtual object, the projection parameters of the target device, and the second transformation parameters between the world coordinate system and the camera coordinate system of the target device to obtain the first projection position.
其中,虚拟物的原始空间位置是预先设定的,指的是虚拟物在虚拟空间中的位置。世界坐标系与目标设备的相机坐标系之间的第二变换参数具体为目标设备的视域矩阵(View Matrix)。该第二变换参数是从世界坐标系变换到目标设备的相机坐标系的第二变换参数。其中,目标设备的第一定位结果可以是目标设备在世界坐标系下的位姿。其中,目标设备的位姿包括目标设备的位置和姿态(或朝向)。本公开实施例中,将目标设备的拍摄组件在世界坐标系下的位姿等同为目标设备在世界坐标系下的位姿。当然,在另一些公开实施例中,可将目标设备上预设部件的位姿作为目标设备的位姿。然后,根据目标设备上拍摄组件与目标设备上预设位置之间的相对位姿关系、以及预设部件的位姿,确定拍摄组件的位姿。其中,可以认为拍摄组件的位置为相机坐标系的原点。具体根据目标设备的拍摄组件的位姿,确定世界坐标系与目标设备的相机坐标系之间的变换关系的方式可参见一般公知技术。Wherein, the original space position of the virtual object is preset, which refers to the position of the virtual object in the virtual space. The second transformation parameter between the world coordinate system and the camera coordinate system of the target device is specifically a view matrix (View Matrix) of the target device. The second transformation parameter is a second transformation parameter transformed from the world coordinate system to the camera coordinate system of the target device. Wherein, the first positioning result of the target device may be the pose of the target device in the world coordinate system. Wherein, the pose of the target device includes the position and posture (or orientation) of the target device. In the embodiment of the present disclosure, the pose of the shooting component of the target device in the world coordinate system is equivalent to the pose of the target device in the world coordinate system. Of course, in some other disclosed embodiments, the pose of a preset component on the target device may be used as the pose of the target device. Then, the pose of the photographing component is determined according to the relative pose relationship between the photographing component on the target device and the preset position on the target device, and the pose of the preset component. Wherein, the position of the photographing component can be considered as the origin of the camera coordinate system. Specifically, according to the pose of the shooting component of the target device, reference may be made to general known technologies for a manner of determining the transformation relationship between the world coordinate system and the camera coordinate system of the target device.
投影参数的形式为投影矩阵,投影参数为摄像组件的内部参数,主要根据投影原理构建,用于实现三维空间坐标到二维图像坐标的变换。The form of the projection parameter is a projection matrix, and the projection parameter is an internal parameter of the camera component, which is mainly constructed according to the projection principle, and is used to realize the transformation from the three-dimensional space coordinates to the two-dimensional image coordinates.
第二变换参数用于基于虚拟物的原始空间位置,确定该虚拟物在目标设备的相机坐标系下的三维空间坐标,投影参数用于基于虚拟物在相机坐标系下的三维空间坐标确定该虚拟物在当前拍摄画面中的第一投影位置。通过将目标设备与预设地图进行定位匹配,得到目标设备在预设地图中的第二定位结果,使得第二定位结果相对于校正前的第一定位结果而言更为准确。The second transformation parameter is used to determine the three-dimensional space coordinates of the virtual object in the camera coordinate system of the target device based on the original space position of the virtual object, and the projection parameter is used to determine the virtual object based on the three-dimensional space coordinates of the virtual object in the camera coordinate system. The first projection position of the object in the current shooting frame. By positioning and matching the target device with the preset map, a second positioning result of the target device in the preset map is obtained, so that the second positioning result is more accurate than the first positioning result before correction.
其中,在上述步骤S12之前,还包括以下步骤:Wherein, before the above step S12, the following steps are also included:
将目标设备与预设地图进行定位匹配,得到目标设备在预设地图中的第二定位结果。预设地图可以是高精度三维地图,例如稠密的三维地图。将目标设备与预设地图进行定位匹配,又可称之为获取目标设备在预设地图中更准确的位姿。将目标设备与预设地图进行定位匹配的方式可以是根据目标设备中精确的定位组件获取目标设备在预设地图中的第二定位结果。该精确的定位组件可以是全球定位系统(Global Positioning System,GPS)。当然,获取目标设备在预设地图中更精确的定位结果的方式还可以是使用视觉惯性定位的方式进行获取。提取当前拍摄画面的特征点与预设地图中的特征点进行匹配,基于匹配结果得到第二定位结果。另一些公开实施例中,可以将当前拍摄画面发送给云端,以便云端对当前拍摄画面的特征点进行提取,并将提取到的特征点与预设地图中的特征点进行匹配,得到目标设备的第二定位结果,然后再接收由云端发送的第二定位结果。The target device is positioned and matched with the preset map to obtain a second positioning result of the target device in the preset map. The preset map may be a high-precision three-dimensional map, such as a dense three-dimensional map. Positioning and matching the target device with the preset map can also be referred to as obtaining a more accurate pose of the target device in the preset map. A manner of positioning and matching the target device with the preset map may be to obtain a second positioning result of the target device in the preset map according to an accurate positioning component in the target device. The precise positioning component may be a Global Positioning System (Global Positioning System, GPS). Of course, a more accurate positioning result of the target device in the preset map may also be obtained by using a visual-inertial positioning method. The feature points of the currently photographed picture are extracted and matched with the feature points in the preset map, and a second positioning result is obtained based on the matching results. In other disclosed embodiments, the current shooting picture can be sent to the cloud, so that the cloud can extract the feature points of the current shooting picture, and match the extracted feature points with the feature points in the preset map to obtain the target device. The second positioning result, and then receiving the second positioning result sent by the cloud.
另一些公开实施例中,上述步骤S12之前,还可包括以下步骤:In other disclosed embodiments, before the above step S12, the following steps may also be included:
检测目标设备经矫正后的第二定位结果与第一定位结果是否存在预设变化。响应于第二定位结果与第一定位结果之间存在预设变化,则执行步骤S12。Detecting whether there is a preset change between the corrected second positioning result and the first positioning result of the target device. In response to a preset change between the second positioning result and the first positioning result, step S12 is executed.
其中,预设变化可以是第一定位结果和第二定位结果之间的误差大于或等于预设误差。预设误差可根据用户对虚实融合精确度的要求进行确定。在对精确度的要求较高的情况下,则预设误差可以设置得较小,趋近于0,否则可将预设误差设置得较大。Wherein, the preset change may be that the error between the first positioning result and the second positioning result is greater than or equal to the preset error. The preset error can be determined according to the user's requirements for the accuracy of virtual-real fusion. In the case of higher requirements on accuracy, the preset error can be set smaller and close to 0; otherwise, the preset error can be set larger.
一些公开实施例中,第一预设条件包括以下至少一者:虚拟物符合第二预设条件、虚拟物的第一变更空间位置与原始空间位置之间的位置偏差符合预设位置要求。一些应用场景中,第一预设条件包括虚拟物符合第二预设条件。还有一些应用场景中,第一预设条件包括虚拟物的第一变更空间位置与原始空间位置之间的位置偏差符合预设位置 要求。还有一些应用场景中,第一预设条件包括虚拟物符合第二预设条件,且虚拟物的第一变更空间位置与原始空间位置之间的位置偏差符合预设位置要求。In some disclosed embodiments, the first preset condition includes at least one of the following: the virtual object meets the second preset condition, and the position deviation between the first modified spatial position and the original spatial position of the virtual object meets the preset position requirement. In some application scenarios, the first preset condition includes that the virtual object meets the second preset condition. In some application scenarios, the first preset condition includes that the position deviation between the first changed space position of the virtual object and the original space position meets the preset position requirements. In some application scenarios, the first preset condition includes that the virtual object meets the second preset condition, and the position deviation between the first changed spatial position and the original spatial position of the virtual object meets the preset position requirement.
其中,第二预设条件包括虚拟物属于第一类型和/或虚拟物的第一变更空间位置属于合理位置。第一变更空间位置为基于目标设备的第二定位结果确定的,且第一变更空间位置能够投影至第一投影位置的空间位置。也就是说,在目标设备位于第二定位结果处的情况下,处于第一变更空间的虚拟物能够投影到当前拍摄画面的第一投影位置。执行步骤S12之前,获取虚拟物第一变更空间位置的方式可以是:Wherein, the second preset condition includes that the virtual object belongs to the first type and/or the first change space position of the virtual object belongs to a reasonable position. The first modified spatial position is determined based on the second positioning result of the target device, and the first modified spatial position can be projected to the spatial position of the first projected position. That is to say, when the target device is located at the second positioning result, the virtual object in the first change space can be projected to the first projection position of the current shooting frame. Before step S12 is executed, the way to obtain the first changed space position of the virtual object can be:
利用第一投影位置、目标设备的投影参数、以及世界坐标系与目标设备的相机坐标系之间的第一变换参数,得到世界坐标系上的第一变更空间位置。其中,第一变换参数基于目标设备的第二定位结果获取得到。获取第一变换参数的方式可参见上述获取第二变换参数的方式。Using the first projected position, the projected parameters of the target device, and the first transformation parameters between the world coordinate system and the camera coordinate system of the target device, a first changed space position on the world coordinate system is obtained. Wherein, the first transformation parameter is obtained based on the second positioning result of the target device. For a manner of obtaining the first transformation parameter, reference may be made to the foregoing manner of obtaining the second transformation parameter.
通过投影参数能够将虚拟物从当前拍摄画面中的第一投影位置反投影到相机坐标系中,得到虚拟物在相机坐标系中的三维坐标,然后基于第一变换参数能够将虚拟从相机坐标系转换到世界坐标系中,得到虚拟物在世界坐标系上的第一变更空间位置。通过目标设备的第二定位结果以及虚拟物的第一投影位置确定虚拟物的第一变更空间位置,能够保持虚拟物在第一变更空间位置处对应当前拍摄画面中的投影位置不变。Through the projection parameters, the virtual object can be back-projected from the first projection position in the current shooting frame to the camera coordinate system, and the three-dimensional coordinates of the virtual object in the camera coordinate system can be obtained, and then based on the first transformation parameter, the virtual object can be transformed from the camera coordinate system Convert to the world coordinate system to obtain the first changed space position of the virtual object on the world coordinate system. The first changed space position of the virtual object is determined by the second positioning result of the target device and the first projected position of the virtual object, so that the projection position of the virtual object at the first changed space position corresponding to the current shooting frame can be kept unchanged.
一些公开实施例中,第二预设条件包括虚拟物属于第一类型。可选地,接收用户对虚拟物进行类别划分的指令,将虚拟物划分为若干个类型,例如划分为三个类型。各类型的虚拟物对应的融合精确度不同。虚拟物的划分原则可以是根据虚拟物跳变带来的视觉影响,与虚拟物投影误差带来的影响之间的平衡关系确定。例如,在某虚拟物的投影误差较大,且虚拟物不跳变时投影误差带来的影响也可忽略的情况下,可以将该虚拟物划分为第一类型,例如对于一些大范围的导航箭头,信息面板的展示等,实际上偏差几米的位置,并不会影响导航的效果。而在虚拟物跳变带来的视觉影响小于投影误差带来的影响的情况下,可以将该虚拟物划分为第二类型,例如商品的信息标牌等。而在虚拟物跳变带来的视觉影响大于投影误差带来的影响的情况下,则可以将该虚拟物划分为第三类型,例如用于遮挡的虚拟物。In some disclosed embodiments, the second preset condition includes that the virtual item belongs to the first type. Optionally, an instruction from the user to classify the virtual objects is received, and the virtual objects are classified into several types, for example, into three types. Different types of virtual objects have different fusion accuracy. The division principle of the virtual object may be determined according to the balance relationship between the visual impact brought by the jump of the virtual object and the impact brought by the virtual object projection error. For example, when the projection error of a virtual object is relatively large, and the impact of the projection error is negligible when the virtual object does not jump, the virtual object can be classified into the first type, for example, for some large-scale navigation Arrows, the display of information panels, etc., actually deviate from the position of a few meters, and will not affect the navigation effect. In the case where the visual impact caused by the jump of the virtual object is less than the impact caused by the projection error, the virtual object may be classified into the second type, such as an information sign of a product. In the case where the visual impact caused by the jump of the virtual object is greater than the impact caused by the projection error, the virtual object may be classified into a third type, such as a virtual object used for occlusion.
一些公开实施例中,第二预设条件包括虚拟物的第一变更空间位置属于合理位置。虚拟物的第一变更空间位置是否属于合理位置,具体可以根据预设地图中第一变更空间位置处的语义信息进行确定。其中,语义信息例如高精度地图中的危险区域、高度等信息。可选地,合理位置包括非危险区域和属于预设高度范围内的至少一者。一种可能的实现方式是,危险区域可预先标记在预设地图上,除危险区域以外的区域可以认为是非危险区域。例如,在城市导航的场景中,虚拟物为导航箭头,危险区域可以是位于道路一旁的湖泊。预设高度范围可根据对投影精度的需求进行设置。为更好理解预设高度范围,现示出以下具体应用实例。假定预设地图为某房间的地图,虚拟物为花瓶,且虚拟物的原始空间位置为该房间的桌子表面上。如果虚拟物的第一变更空间位置为该房间的地面以下,这显然不符合逻辑,至少花瓶的底座应该位于该房间的地面以上才合适,也就是花瓶的底座的高度应高于地面的高度。预设高度范围为预设地图中在第一变更空间位置所在的竖直方向上允许的最大高度和/或最低高度。通过结合预设地图的语义信息,确定第一变更空间位置是否属于合理位置,使得合理位置的确定更准确,减少因为未采用精确的位置引起危险或其他问题。In some disclosed embodiments, the second preset condition includes that the first change space position of the virtual object belongs to a reasonable position. Whether the first changed space position of the virtual object is a reasonable position can be specifically determined according to the semantic information at the first changed space position in the preset map. Among them, semantic information such as dangerous areas and heights in high-precision maps. Optionally, the reasonable location includes at least one of a non-dangerous area and a preset height range. A possible implementation manner is that dangerous areas can be pre-marked on a preset map, and areas other than the dangerous areas can be considered as non-dangerous areas. For example, in a city navigation scene, the virtual object is a navigation arrow, and the dangerous area may be a lake beside the road. The preset height range can be set according to the demand for projection accuracy. In order to better understand the preset height range, the following specific application examples are shown below. Assume that the preset map is a map of a certain room, the virtual object is a vase, and the original spatial position of the virtual object is on the table surface of the room. If the first change space position of the virtual object is below the floor of the room, this is obviously illogical, at least the base of the vase should be above the floor of the room, that is, the height of the base of the vase should be higher than the height of the ground. The preset height range is the maximum height and/or the minimum height allowed in the vertical direction where the first change space position is located in the preset map. By combining the semantic information of the preset map, it is determined whether the first change space position is a reasonable position, so that the determination of the reasonable position is more accurate, and the danger or other problems caused by not using the precise position are reduced.
一些公开实施例中,第二预设条件包括虚拟物属于第一类型,且虚拟物的第一变更空间位置属于合理位置。也就是,响应于虚拟物属于第一类型,且虚拟物的第一变更空间位置属于合理位置时,将虚拟物保持显示在当前拍摄画面的第一投影位置上。In some disclosed embodiments, the second preset condition includes that the virtual object belongs to the first type, and the first change space position of the virtual object belongs to a reasonable position. That is, in response to the fact that the virtual object belongs to the first type and the first changed spatial position of the virtual object belongs to a reasonable position, the virtual object is kept displayed at the first projection position of the current shooting frame.
一些公开实施例中,第一预设条件包括虚拟物的第一变更空间位置与原始空间位置 之间的位置偏差符合预设位置要求。第一变更空间位置与原始空间位置之间的位置偏差可以包括高度方向上的偏差,也可不包括高度方向上的偏差。例如,一些应用场景中,位置偏差可以仅包括两个位置之间在垂直于高度方向的平面上的偏差。具体可以是在该平面上的距离偏差。其中,预设位置要求可以包括位置偏差小于预设阈值。也就是原始空间位置和第一变更空间位置之间的偏差较小,该位置偏差带来的影响小于虚拟物体在当前拍摄画面中跳变带来的影响。预设阈值可由用户自定义,或默认目标设备的原始设置。通过虚拟物的第一变更空间位置与原始空间位置之间的位置偏差小于预设阈值,则两个位置在当前拍摄画面上的显示位置之间的偏差也不会大,因此保持虚拟物的显示位置不发生跳变,相比于虚拟物的显示位置发生跳变而言,前者带来的视觉影响更小。In some disclosed embodiments, the first preset condition includes that the position deviation between the first changed space position of the virtual object and the original space position meets the preset position requirement. The positional deviation between the first modified spatial position and the original spatial position may include a deviation in the height direction, or may not include a deviation in the height direction. For example, in some application scenarios, the position deviation may only include a deviation between two positions on a plane perpendicular to the height direction. Specifically, it may be a distance deviation on this plane. Wherein, the preset position requirement may include that the position deviation is smaller than a preset threshold. That is, the deviation between the original spatial position and the first changed spatial position is relatively small, and the impact of the position deviation is less than the impact of the jump of the virtual object in the current shooting frame. Preset thresholds can be user-defined, or default to the original settings of the target device. If the position deviation between the first changed space position of the virtual object and the original space position is less than the preset threshold, the deviation between the display positions of the two positions on the current shooting screen will not be large, so the display of the virtual object is maintained The position does not change, and compared with the display position change of the virtual object, the visual impact caused by the former is smaller.
可选地,根据虚拟物的显示变更过程可见或不可见,预设位置要求还可以包括虚拟物的显示变更过程可见。即,虚拟物的显示变更过程可见且位置偏差小于预设阈值。其中,虚拟物的显示变更过程虚拟物从第一位置变为目标投影位置进行显示的过程。具体地,获取虚拟物在原始空间位置和第一变更空间位置形成的联合包围盒。也就是该联合包围盒为三维包围盒,可以认为其是一个长方体,其包裹了位于原始空间位置和第一变更位置的虚拟物。虚拟物体在当前拍摄画面中跳变的过程具体可以认为是虚拟物体从第一变更位置往原始空间位置的移动过程中在当前显示界面上的投影。在当前拍摄画面过程中主要体现为虚拟物在第一投影位置往目标投影位置移动过程中的插值过程。目标投影位置指的是基于虚拟物体原始空间位置、上述第一变换参数以及投影参数得到的虚拟物体在当前拍摄画面中的投影位置。其中,显示变更过程不可见指的是在当前拍摄画面中该插值过程不可见,显示变更过程可见指的是当前拍摄画面中该插值过程可见。插值过程是否可见可以根据是否有目标投影位置决定。在一些实施方式中,在当前拍摄画面中没有虚拟物对应的目标投影位置的情况下,则认为插值过程不可见。在一些实施方式中,在目标投影位置不位于当前拍摄画面中,也就是目标设备基于校正后的位置根本观测不到虚拟物的情况下,虚拟物无法根据其原始空间位置以及目标设备对应的第二变换参数以及投影参数,获取虚拟物在当前拍摄画面中的投影位置。此时,在当前拍摄画面中无法体现虚拟物在联合包围盒中移动过程中的投影。又或者,插值过程是否可见可根据插值过程是否完整确定。在一些实施方式中,在插值过程完整的情况下,则认为插值过程可见,在另一些实施方式中,在插值过程不完整的情况下,则认为插值过程不可见。例如,虚拟物在联合包围盒中移动的过程中,中间部分位置目标设备无法观测到,也就无法在当前拍摄画面中进行显示,所以认为该位置的插值不可见。Optionally, according to whether the virtual object is visible or not during the display change process, the preset position requirement may also include that the virtual object is visible during the display change process. That is, the display change process of the virtual object is visible and the position deviation is smaller than the preset threshold. Wherein, the display change process of the virtual object is a process in which the virtual object is displayed from the first position to the target projection position. Specifically, the joint bounding box formed by the virtual object at the original space position and the first changed space position is acquired. That is, the joint bounding box is a three-dimensional bounding box, which can be regarded as a cuboid, which wraps the virtual object at the original spatial position and the first changed position. The process of the virtual object jumping in the current shooting frame can be specifically considered as the projection of the virtual object on the current display interface during the process of moving from the first changed position to the original space position. During the current shooting process, it is mainly reflected in the interpolation process during the movement of the virtual object from the first projection position to the target projection position. The target projection position refers to the projection position of the virtual object in the current shooting frame obtained based on the original spatial position of the virtual object, the first transformation parameter and the projection parameter. Wherein, the invisible change process means that the interpolation process is invisible in the current shooting frame, and the visible change process means that the interpolation process is visible in the current shooting frame. Whether the interpolation process is visible can be determined according to whether there is a target projection position. In some implementation manners, if there is no target projection position corresponding to the virtual object in the current shooting frame, the interpolation process is considered invisible. In some implementations, when the target projection position is not located in the current shooting frame, that is, the target device cannot observe the virtual object at all based on the corrected position, the virtual object cannot Two transformation parameters and projection parameters, to obtain the projection position of the virtual object in the current shooting frame. At this time, the projection of the virtual object during movement in the joint bounding box cannot be reflected in the current shooting frame. Alternatively, whether the interpolation process is visible may be determined according to whether the interpolation process is complete. In some implementation manners, if the interpolation process is complete, the interpolation process is considered visible; in other implementation manners, if the interpolation process is incomplete, the interpolation process is considered invisible. For example, during the movement of the virtual object in the joint bounding box, the target device at the middle position cannot be observed, and thus cannot be displayed in the current shooting frame, so the interpolation at this position is considered invisible.
一些应用场景中,在虚拟物的显示变更过程不可见的情况下,则可以认为括虚拟物的第一变更空间位置与原始空间位置之间的位置偏差符合预设位置要求。另一些应用场景中,正因为虚拟物的显示变更过程不可见,因此,即便虚拟物体发生跳变,对视觉观感的影响也较小,完全可以对虚拟物体的投影位置进行纠偏,减少位置偏差带来的影响。In some application scenarios, when the display change process of the virtual object is invisible, it can be considered that the position deviation between the first changed spatial position of the virtual object and the original spatial position meets the preset position requirements. In other application scenarios, because the display change process of the virtual object is invisible, even if the virtual object jumps, the impact on the visual perception is small, and the projection position of the virtual object can be corrected to reduce the position deviation. coming impact.
一些公开实施例中,第一预设条件包括虚拟物符合第二预设条件,且虚拟物的第一变更空间位置与原始空间位置之间的位置偏差符合预设位置要求。基于图1,图2为本公开虚实融合方法一实施例示出步骤S12的部分子流程示意图。如图2所示,上述步骤S12包括以下步骤:In some disclosed embodiments, the first preset condition includes that the virtual object meets the second preset condition, and the position deviation between the first changed spatial position and the original spatial position of the virtual object meets the preset position requirement. Based on FIG. 1 , FIG. 2 is a schematic diagram showing part of the sub-flow of step S12 in an embodiment of the virtual-real fusion method of the present disclosure. As shown in Figure 2, above-mentioned step S12 comprises the following steps:
步骤S121:判断虚拟物是否属于第一类型。Step S121: Determine whether the virtual object belongs to the first type.
在实施中首先根据预先设置的参数信息,确定虚拟物的类型。其中,预先设置的参数信息包括至少一种虚拟物对应的类型信息。该预设设置的参数信息可以由用户自定义。In the implementation, firstly, the type of the virtual object is determined according to the preset parameter information. Wherein, the preset parameter information includes at least one type information corresponding to the virtual object. The parameter information of the preset setting can be customized by the user.
在虚拟物不属于第一类型的情况下,执行步骤S122,在虚拟物属于第一类型的情况下,执行步骤S123。If the virtual item does not belong to the first type, execute step S122, and if the virtual item does not belong to the first type, execute step S123.
步骤S122:认定虚拟物不满足第一预设条件。Step S122: Determine that the virtual item does not meet the first preset condition.
步骤S123:判断虚拟物的第一变更空间位置与原始空间位置之间的位置偏差是否符合预设位置要求。Step S123: Determine whether the positional deviation between the first modified spatial position of the virtual object and the original spatial position meets the preset position requirements.
预设位置要求具体可参见上述描述。在虚拟物的第一变更空间位置与原始空间位置之间的位置偏差符合预设位置要求的情况下,执行步骤S124,否则执行步骤S122。Please refer to the above description for specific requirements on the preset location. In the case that the position deviation between the first modified spatial position of the virtual object and the original spatial position meets the requirement of the preset position, step S124 is executed; otherwise, step S122 is executed.
步骤S124:判断虚拟物的第一变更空间位置是否属于合理位置。Step S124: Determine whether the first changed space position of the virtual object belongs to a reasonable position.
其中,合理位置的定义请参见上述描述。在第一变更空间位置处于合理位置的范围内的情况下,认定虚拟物的第一变更空间位置属于合理位置。在虚拟物的第一变更空间不属于合理位置时,认定虚拟物的第一变更空间属于合理位置。在虚拟物的第一空间不属于合理位置时,执行步骤S122。在虚拟物的第一空间属于合理位置时,执行步骤S125。Wherein, for the definition of a reasonable location, please refer to the above description. If the first changed space position is within the range of the reasonable position, it is determined that the first changed space position of the virtual object belongs to the reasonable position. When the first change space of the virtual object does not belong to the reasonable position, it is determined that the first change space of the virtual thing belongs to the reasonable position. When the first space of the virtual object does not belong to a reasonable position, step S122 is executed. When the first space of the virtual object belongs to a reasonable position, step S125 is executed.
步骤S125:认定虚拟物满足第一预设条件。Step S125: Determine that the virtual object satisfies the first preset condition.
其中,上述步骤S123和步骤S124的执行顺序可以交换,并非严格按照上述步骤流程执行。Wherein, the execution order of the above-mentioned step S123 and step S124 can be exchanged, and it is not strictly executed according to the above-mentioned step flow.
通过虚拟物的类型、虚拟物的第一变更空间位置处于合理位置以及虚拟物的第一变更空间位置与原始空间位置之间的位置偏差符合预设位置要求,相比于虚拟物的显示位置发生跳变而言,显示位置存在一定的偏差所带来的视觉影响更小。Through the type of virtual object, the first changed space position of the virtual object is in a reasonable position, and the position deviation between the first changed space position of the virtual object and the original space position meets the preset position requirements, compared with the display position of the virtual object In terms of jumping, the visual impact caused by a certain deviation in the display position is smaller.
一些公开实施例中,虚实融合方法还可包括以下步骤:In some disclosed embodiments, the virtual-real fusion method may also include the following steps:
响应于获取到目标设备经校正后的第二定位结果,且虚拟物不满足第一预设条件,采用第一纠正策略或第二纠正策略将虚拟物的显示位置从第一投影位置变更在目标投影位置。其中,目标投影位置可以是由虚拟物的原始空间位置以及上述第一变换参数以及投影参数获得,还可以是基于目标设备的设定参数确定。其中,基于目标设备的设定参数确定可以基于虚拟物的第一变更空间位置的合理性确定。通过在虚拟物不满足第一预设条件的情况下,对虚拟物的显示位置进行变更,能够减少因为虚拟物的投影位置偏差带来的不好的视觉体验。In response to obtaining the corrected second positioning result of the target device and the virtual object does not meet the first preset condition, the first correction strategy or the second correction strategy is used to change the display position of the virtual object from the first projection position to the target device. projection location. Wherein, the target projection position may be obtained from the original space position of the virtual object and the above-mentioned first transformation parameters and projection parameters, and may also be determined based on setting parameters of the target device. Wherein, the determination based on the setting parameters of the target device may be based on the rationality determination of the first changed space position of the virtual object. By changing the display position of the virtual object when the virtual object does not satisfy the first preset condition, the bad visual experience caused by the deviation of the projection position of the virtual object can be reduced.
具体地,在采用第一纠正策略或第二纠正策略将虚拟物的显示位置从第一投影位置变更在目标投影位置之前,先获取目标投影位置。其中,获取目标投影位置的方式可以有多种:Specifically, before the first correction strategy or the second correction strategy is adopted to change the display position of the virtual object from the first projection position to the target projection position, the target projection position is acquired first. Among them, there are many ways to obtain the target projection position:
第一种是,基于第二定位结果和原始空间位置,确定虚拟物在当前拍摄画面的第二投影位置,以作为目标投影位置。其中,基于第二定位结果和原始空间位置,确定虚拟物在当前拍摄画面的第二投影位置的具体过程如下:基于目标设备的第二定位结果,获取目标设备的相机坐标系与世界坐标系之间的第一变换参数。具体获取第一变换参数的方式请参见上述描述。然后使用第一变换参数将虚拟物的原始空间位置转换到目标设备的相机坐标系,再使用投影参数将相机坐标系下的虚拟物投影到当前拍摄画面,得到虚拟物在当前拍摄画面中的第二投影位置。并将虚拟物在当前拍摄画面中的第二投影位置作为目标投影位置。其中,与该第二投影位置间隔预设距离的投影位置,也可作为目标投影位置。例如,与第二投影位置间隔2个像素的投影位置,也可作为目标投影位置。The first method is to determine the second projection position of the virtual object in the current shooting frame as the target projection position based on the second positioning result and the original spatial position. Wherein, based on the second positioning result and the original space position, the specific process of determining the second projection position of the virtual object in the current shooting picture is as follows: based on the second positioning result of the target device, the distance between the camera coordinate system of the target device and the world coordinate system is obtained. between the first transformation parameters. For a specific manner of obtaining the first transformation parameter, please refer to the above description. Then use the first transformation parameter to convert the original space position of the virtual object to the camera coordinate system of the target device, and then use the projection parameter to project the virtual object in the camera coordinate system to the current shooting frame, and obtain the first position of the virtual object in the current shooting frame Two projection positions. The second projection position of the virtual object in the current shooting frame is used as the target projection position. Wherein, the projection position separated from the second projection position by a preset distance may also be used as the target projection position. For example, a projection position that is 2 pixels away from the second projection position may also be used as a target projection position.
第二种是,在第一变更空间位置不属于合理位置的情况下,将第一变更空间位置调整为属于合理位置的第二变更空间位置。基于第二定位结果和第二变更空间位置,确定虚拟物在当前拍摄画面的第三投影位置,以作为目标投影位置。将第一变更空间位置调整为属于合理位置的第二变更空间位置的方式可以是,获取第一变更空间与合理位置之间的相对位置,基于该相对位置对第一变更空间位置进行调整。继上例,虚拟物花瓶的底端理应放置在地面以上,而花瓶在位于第一变更空间位置时,花瓶的底端位于地面以下0.5米(m),也就是花瓶与合理位置之间的相对位置为0.5m,所以将花瓶从第一变更位置往上移动至少0.5m,使得花瓶的底部与地面接触或高于地面。由此,得到虚拟物体属于合理位置的第二变更空间位置。然后,基于目标设备的第二定位结果,获取目标 设备的相机坐标系与世界坐标系之间的第一变换参数。具体获取第一变换参数的方式请参见上述描述。然后使用第一变换参数将虚拟物的第二变更空间位置转换到目标设备的相机坐标系,再使用投影参数将相机坐标系下的虚拟物投影到当前拍摄画面,得到虚拟物在当前拍摄画面中的第二投影位置。并将虚拟物在当前拍摄画面中的第二投影位置作为目标投影位置。通过此种方式可以调整虚拟物体与拍摄画面之间的对齐效果。通过基于第二定位结果和原始空间位置确定目标投影位置,或根据第一变更空间位置调整为属于合理位置的第二变更空间位置并基于第二变更空间位置确定目标投影位置,使得对虚拟物的显示位置进行纠正后,很好地减少了因为投影误差带来的不利影响。The second method is to adjust the first changed space position to a second changed space position belonging to a reasonable position when the first changed space position does not belong to a reasonable position. Based on the second positioning result and the second modified spatial position, a third projection position of the virtual object on the current shooting frame is determined as a target projection position. A manner of adjusting the first changed space position to a second changed space position belonging to a reasonable position may be to acquire a relative position between the first changed space and the reasonable position, and adjust the first changed space position based on the relative position. Following the above example, the bottom of the virtual vase should be placed above the ground, and when the vase is in the first change space position, the bottom of the vase is 0.5 meters (m) below the ground, which is the relative distance between the vase and the reasonable position. The position is 0.5m, so move the vase up at least 0.5m from the first altered position so that the bottom of the vase is in contact with or above the ground. Thus, the second changed space position where the virtual object belongs to a reasonable position is obtained. Then, based on the second positioning result of the target device, the first transformation parameter between the camera coordinate system of the target device and the world coordinate system is obtained. For a specific manner of obtaining the first transformation parameter, please refer to the above description. Then use the first transformation parameter to convert the second changed space position of the virtual object to the camera coordinate system of the target device, and then use the projection parameter to project the virtual object in the camera coordinate system to the current shooting frame, and obtain the virtual object in the current shooting frame The second projection position of . The second projection position of the virtual object in the current shooting frame is used as the target projection position. In this way, the alignment effect between the virtual object and the shooting screen can be adjusted. By determining the target projection position based on the second positioning result and the original space position, or adjusting the second change space position belonging to a reasonable position according to the first change space position and determining the target projection position based on the second change space position, the virtual object After the display position is corrected, the adverse effects caused by projection errors are well reduced.
一些公开实施例中,第一纠正策略为在下一次显示渲染过程中直接将虚拟物渲染至目标投影位置。即,直接根据虚拟物在原始空间位置的位置确定虚拟物在目标设备上的目标投影位置,然后将虚拟物显示在目标设备的目标投影位置上。第二纠正策略为按照预设速度将虚拟物从第一投影位置移动至目标投影位置。在一些实施方式中,第一纠正策略可以认为是立即将虚拟物体的显示位置从第一投影位置变更为目标投影位置,不显示虚拟物体从第一投影为变更为目标投影位置之间的插值过程,而第二纠正策略可以认为是将虚拟物体的显示位置从第一投影位置逐渐移动至目标投影位置。在一些实施方式中,第二纠正策略为将虚拟物从第一变更空间位置按照匀速速度移动至原始空间位置或对应的第二变更空间位置,并依次根据虚拟物当前的位置确定对应的投影位置,并在对应的投影位置进行显示,以实现按照预设速度将虚拟物从第一投影位置移动至目标投影位置进行显示。同理,第一纠正策略为直接将虚拟物的第一变更空间位置切换为原始空间位置或第二变更空间位置,以实现在下一次显示渲染过程中直接将虚拟物渲染至目标投影位置。通过设置不同的纠正策略,使得纠正过程更为灵活。In some disclosed embodiments, the first correction strategy is to directly render the virtual object to the target projection position in the next display rendering process. That is, the target projection position of the virtual object on the target device is determined directly according to the position of the virtual object in the original space position, and then the virtual object is displayed on the target projection position of the target device. The second correction strategy is to move the virtual object from the first projection position to the target projection position at a preset speed. In some implementations, the first correction strategy can be considered as immediately changing the display position of the virtual object from the first projection position to the target projection position, and not displaying the interpolation process between the virtual object changing from the first projection to the target projection position , and the second correction strategy can be considered as gradually moving the display position of the virtual object from the first projection position to the target projection position. In some implementations, the second correction strategy is to move the virtual object from the first changed space position to the original space position or the corresponding second changed space position at a constant speed, and determine the corresponding projected position according to the current position of the virtual object in turn , and display at the corresponding projection position, so as to move the virtual object from the first projection position to the target projection position at a preset speed for display. Similarly, the first correction strategy is to directly switch the first changed space position of the virtual object to the original space position or the second changed space position, so as to directly render the virtual object to the target projection position in the next display rendering process. By setting different correction strategies, the correction process is more flexible.
具体地,响应于虚拟物属于第二类型,采用第一纠正策略将虚拟物的显示位置从第一投影位置变更在目标投影位置。或响应于虚拟物属于第三类型,采用第二纠正策略将虚拟物的显示位置从第二投影位置变更在目标投影位置。响应于第一变更空间位置不属于合理位置,选择第一纠正策略或第二纠正策略将虚拟物的显示位置从第一投影位置变更在目标投影位置。具体地,即便虚拟物对于投影精确度的要求不高,属于第一类型,但是若虚拟物的第一变更空间位置不属于合理位置,则也可以选择第一纠正策略或第二纠正策略将虚拟物的显示位置从第一投影位置变更在目标投影位置。如上述,虚拟物类型的划分可以根据虚拟物对应投影精确度的要求确定。此时,第二类型对投影位置精确度的要求高于第三类型对投影位置精确度的要求,第三类型对投影位置精确度的要求高于第一类型对投影位置精确度的要求。即,对于第二类型而言,如果不执行纠正策略,则会导致更差的用户体验,所以需要立即执行纠正策略。对于第一类型而言,虚拟物在当前拍摄画面中的投影偏差对虚实融合影响不大,一定情况下执行纠偏策略反而会导致跳变影响体验,可不纠正偏差,一定情况指的是虚拟物满足第一预设条件的情况。而对于第三类型而言,虚拟物在当前拍摄画面中的投影偏差带来的影响以及执行纠偏策略带来了跳变影响差别不大,所以可以对其执行纠偏策略。通过对不同类型的虚拟物执行不同的纠正策略,提高了纠正策略方式的灵活度。Specifically, in response to the virtual object belonging to the second type, a first correction strategy is used to change the display position of the virtual object from the first projection position to the target projection position. Or in response to the fact that the virtual object belongs to the third type, the second correction strategy is used to change the display position of the virtual object from the second projection position to the target projection position. In response to the fact that the first changed space position does not belong to a reasonable position, a first correction strategy or a second correction strategy is selected to change the display position of the virtual object from the first projection position to the target projection position. Specifically, even if the virtual object does not have high requirements for projection accuracy and belongs to the first type, if the first change space position of the virtual object does not belong to a reasonable position, you can also choose the first correction strategy or the second correction strategy to make the virtual object The display position of the object is changed from the first projection position to the target projection position. As mentioned above, the classification of the types of virtual objects may be determined according to the requirements of the corresponding projection accuracy of the virtual objects. At this time, the second type has higher requirements on the projection position accuracy than the third type, and the third type has higher requirements on the projection position accuracy than the first type has on the projection position accuracy. That is, for the second type, if the correction strategy is not implemented, it will lead to worse user experience, so the correction strategy needs to be implemented immediately. For the first type, the projection deviation of the virtual object in the current shooting screen has little effect on the fusion of virtual and real. Under certain circumstances, the implementation of the deviation correction strategy will cause jumps and affect the experience. It is not necessary to correct the deviation. The case of the first preset condition. For the third type, there is little difference between the impact of the projection deviation of the virtual object in the current shooting frame and the impact of the jump caused by the implementation of the deviation correction strategy, so the deviation correction strategy can be implemented for it. By implementing different correction strategies for different types of virtual objects, the flexibility of the correction strategy manner is improved.
一些公开实施例中,在预设位置要求包括虚拟物的显示变更过程可见、以及位置偏差小于预设阈值的情况下,响应于获取到的目标设备经校正后的第二定位结果,并且虚拟物不满足第一预设条件,采用第一纠正策略或第二纠正策略将虚拟物的显示位置从第一投影位置变更在目标投影位置的方式可以是:In some disclosed embodiments, when the preset position requires that the display change process including the virtual object be visible, and the position deviation is less than a preset threshold, in response to the acquired second corrected positioning result of the target device, and the virtual object If the first preset condition is not met, the way to change the display position of the virtual object from the first projection position to the target projection position by using the first correction strategy or the second correction strategy may be:
响应于虚拟物符合第二预设条件、虚拟物的显示变更过程可见、且位置偏差不小于预设阈值,采用第一纠正策略将虚拟物的显示位置从第一投影位置变更在目标投影位置。其中,这里的位置偏差为上述虚拟物在原始空间位置和第一变更空间位置之间的位置偏 差。即,虚拟物属于第一类型和/或虚拟物的第一变更空间位置属于合理位置,虚拟物的显示变更过程可见且虚拟物的原始空间位置和第一变更空间位置之间的位置偏差不小于预设阈值,则采用第一纠正策略变更虚拟物的显示位置。In response to the fact that the virtual object meets the second preset condition, the display change process of the virtual object is visible, and the position deviation is not less than a preset threshold, a first correction strategy is used to change the display position of the virtual object from the first projection position to the target projection position. Wherein, the position deviation here is the position deviation between the original space position and the first changed space position of the above-mentioned virtual object. That is, the virtual object belongs to the first type and/or the first changed space position of the virtual object belongs to a reasonable position, the display change process of the virtual object is visible, and the position deviation between the original space position of the virtual object and the first changed space position is not less than If the threshold is preset, the first correction strategy is used to change the display position of the virtual object.
响应于虚拟物符合第二预设条件,且虚拟物的显示变更过程不可见,采用第二纠正策略将虚拟物的显示位置从第一投影位置变更在目标投影位置。其中,这里的位置偏差为上述虚拟物在原始空间位置和第一变更空间位置之间的位置偏差。即,虚拟物属于第一类型和/或虚拟物的第一变更空间位置属于合理位置,虚拟物的显示变更过程不可见,则采用第二纠正策略变更虚拟物的显示位置。另一些公开实施例中,响应于虚拟物符合第二预设条件,且虚拟物的显示变更过程不可见,也可选择第一纠正策略变更虚拟物的显示位置。通过对满足第二预设条件但不满足预设位置要求的虚拟物,在当前拍摄界面上的显示位置进行纠正,使得能够减少因为虚拟物在当前拍摄界面上的投影偏差带来的不利影响。In response to the fact that the virtual object meets the second preset condition and the display changing process of the virtual object is invisible, a second correction strategy is used to change the display position of the virtual object from the first projection position to the target projection position. Wherein, the position deviation here is the position deviation between the original space position and the first changed space position of the above-mentioned virtual object. That is, if the virtual object belongs to the first type and/or the first change space position of the virtual object belongs to a reasonable position, and the display change process of the virtual object is invisible, then the second correction strategy is adopted to change the display position of the virtual object. In some other disclosed embodiments, in response to the fact that the virtual item meets the second preset condition and the display changing process of the virtual item is invisible, the first correction strategy may also be selected to change the display position of the virtual item. By correcting the display position of the virtual object on the current shooting interface that satisfies the second preset condition but does not meet the preset position requirement, it is possible to reduce adverse effects caused by projection deviation of the virtual object on the current shooting interface.
一些公开实施例中,响应于虚拟物满足第一预设条件,将虚拟物保持显示在当前拍摄画面的第一投影位置上的方式可以是保持目标设备显示的画面不变,还有一种方式可以是根据上述方式获取虚拟物的第一变更空间位置,然后基于虚拟物的第一变更空间位置以及目标设备的相机坐标系与世界坐标系之间的第一变换参数、投影参数,获取虚拟物在当前拍摄画面上的投影位置,并作为目标投影位置,以此实现将虚拟物保持显示在当前拍摄画面的第一投影位置上。In some disclosed embodiments, in response to the virtual object meeting the first preset condition, the method of keeping the virtual object displayed at the first projection position of the current shooting screen may be to keep the screen displayed by the target device unchanged, and another method may be The first changed space position of the virtual object is obtained according to the above method, and then based on the first changed space position of the virtual object and the first transformation parameters and projection parameters between the camera coordinate system of the target device and the world coordinate system, the virtual object is obtained at The projection position on the current shooting screen is used as the target projection position, so as to keep the virtual object displayed on the first projection position of the current shooting screen.
为更好地理解上述方案,请参见下例。请同时参见图3,图3是本公开虚实融合方法一实施例的另一流程示意图。本公开实施例提供的虚实融合方法包括以下步骤:To better understand the above scenario, see the example below. Please refer to FIG. 3 at the same time. FIG. 3 is another schematic flowchart of an embodiment of the virtual-real fusion method of the present disclosure. The virtual-real fusion method provided by the embodiment of the present disclosure includes the following steps:
步骤S21:基于目标设备经矫正前的第一定位结果,确定虚拟物在目标设备的当前拍摄画面的第一投影位置。Step S21: Based on the first positioning result of the target device before being corrected, determine the first projection position of the virtual object on the current shooting frame of the target device.
步骤S22:显示当前拍摄画面,并在当前拍摄画面的第一投影位置上显示虚拟物。Step S22: Display the current shooting frame, and display the virtual object on the first projection position of the current shooting frame.
步骤S23:获取目标设备经校正后的第二定位结果。Step S23: Obtain a corrected second positioning result of the target device.
其中,获取目标设备经校正后的第二定位结果的方式如上述。其中,第二定位结果可以用于确定虚拟物的目标投影位置。Wherein, the manner of obtaining the corrected second positioning result of the target device is as above. Wherein, the second positioning result can be used to determine the target projection position of the virtual object.
步骤S24:判断虚拟物是否满足第一预设条件。Step S24: Determine whether the virtual object satisfies the first preset condition.
其中,第一预设条件如上述。在虚拟物满足第一预设条件的情况下,执行步骤S25,否则执行对应的步骤S26、步骤S27或步骤S28之一。Wherein, the first preset condition is as above. If the virtual object satisfies the first preset condition, step S25 is executed; otherwise, one of the corresponding steps S26, S27 or S28 is executed.
步骤S25:响应于虚拟物满足第一预设条件,将虚拟物保持显示在当前拍摄画面的所述第一投影位置上。Step S25: In response to the virtual object meeting the first preset condition, keep displaying the virtual object at the first projection position of the current shooting frame.
其中,将虚拟物保持显示在当前拍摄画面的所述第一投影位置上的方式如上述描述。Wherein, the manner of maintaining and displaying the virtual object at the first projection position of the current shooting frame is as described above.
步骤S26:响应于虚拟物属于第二类型,采用第一纠正策略将虚拟物的显示位置从第一投影位置变更在目标投影位置。Step S26: In response to the fact that the virtual object belongs to the second type, a first correction strategy is adopted to change the display position of the virtual object from the first projection position to the target projection position.
其中,采用第一纠正策略将虚拟物的显示位置从第一投影位置变更在目标投影位置的方式如上述描述。Wherein, the way of using the first correction strategy to change the display position of the virtual object from the first projection position to the target projection position is as described above.
步骤S27:响应于虚拟物属于第三类型,采用第二纠正策略将虚拟物的显示位置从第一投影位置变更在目标投影位置。Step S27: In response to the fact that the virtual object belongs to the third type, a second correction strategy is adopted to change the display position of the virtual object from the first projection position to the target projection position.
其中,采用第二纠正策略将虚拟物的显示位置从第一投影位置变更在目标投影位置的方式如上述描述。Wherein, the method of changing the display position of the virtual object from the first projection position to the target projection position by using the second correction strategy is as described above.
步骤S28:响应于第一变更空间位置不属于合理位置,选择第一纠正策略或第二纠正策略将虚拟物的显示位置从第一投影位置变更在目标投影位置。Step S28: In response to the fact that the first changed spatial position does not belong to a reasonable position, select the first correction strategy or the second correction strategy to change the display position of the virtual object from the first projection position to the target projection position.
具体地,响应于虚拟物属于第一类型,且虚拟物不满足第一预设条件,则选择第一纠正策略或第二纠正策略将虚拟物的显示位置从第一投影位置变更在目标投影位置。Specifically, in response to the fact that the virtual object belongs to the first type and the virtual object does not meet the first preset condition, the first correction strategy or the second correction strategy is selected to change the display position of the virtual object from the first projection position to the target projection position .
上述方案,在获取到目标设备经校正后的第二定位结果后,响应于虚拟物满足第一预设条件,将虚拟物保持显示在当前拍摄画面的第一投影位置上,能够减少虚拟物因为显示位置发生跳变带来的视觉影响。In the above solution, after obtaining the corrected second positioning result of the target device, in response to the fact that the virtual object satisfies the first preset condition, the virtual object is kept displayed at the first projection position of the current shooting screen, which can reduce the risk of the virtual object due to The visual impact caused by the jump of the display position.
本领域技术人员可以理解,在具体实施方式的上述方法中,各步骤的撰写顺序并不意味着严格的执行顺序而对实施过程构成任何限定,各步骤的具体执行顺序应当以其功能和可能的内在逻辑确定。Those skilled in the art can understand that in the above method of specific implementation, the writing order of each step does not mean a strict execution order and constitutes any limitation on the implementation process. The specific execution order of each step should be based on its function and possible The inner logic is OK.
本公开实施例基于虚拟物体类型,虚拟物体的投影,以及定位以后的反投影,确保虚拟物体即使在六自由度跟踪有累积误差的情况下,根据精确位置虚拟物体和非精确位置虚拟物体,分别采用不同的策略防止跳变,来改善虚实融合的用户体验。The embodiment of the present disclosure is based on the virtual object type, the projection of the virtual object, and the back projection after positioning, to ensure that even if the virtual object has cumulative errors in six-degree-of-freedom tracking, according to the virtual object at the precise position and the virtual object at the inaccurate position, respectively Different strategies are used to prevent jumps to improve the user experience of virtual reality fusion.
本公开实施例至少用于以下场景:譬如在机场、工厂、场馆、商场、医院、车库中,增强现实可实现大规模空间的虚实融合效果,通过本公开实施例提供的虚拟融合方法,在定位前后,重新计算虚拟物体的位置,保证虚拟物体的投影位置不变,避免定位前后产生的跳变,用户体验更加自然。The embodiments of the present disclosure are at least used in the following scenarios: for example, in airports, factories, venues, shopping malls, hospitals, and garages, augmented reality can realize the fusion effect of virtual reality in large-scale spaces. Through the virtual fusion method provided by the embodiments of the present disclosure, positioning Before and after, the position of the virtual object is recalculated to ensure that the projection position of the virtual object remains unchanged, avoiding jumps before and after positioning, and the user experience is more natural.
虚实融合方法的执行主体可以是虚实融合装置,例如,虚实融合方法可以由终端设备或服务器或其它处理设备执行,其中,终端设备可以为增强现实设备(AR设备),例如增强现实或虚拟现实的眼镜、头盔等产品用户设备(User Equipment,UE)、移动设备、用户终端、终端、蜂窝电话、无绳电话、个人数字处理(Personal Digital Assistant,PDA)、手持设备、计算设备、车载设备、可穿戴设备以及自动驾驶汽车,机器人等。在一些可能的实现方式中,该虚实融合方法可以通过处理器调用存储器中存储的计算机可读指令的方式来实现。The execution subject of the virtual-real fusion method may be a virtual-real fusion device. For example, the virtual-real fusion method may be executed by a terminal device or a server or other processing equipment, wherein the terminal device may be an augmented reality device (AR device), such as an augmented reality or virtual reality Glasses, helmets and other products User Equipment (UE), mobile devices, user terminals, terminals, cellular phones, cordless phones, personal digital assistants (PDA), handheld devices, computing devices, vehicle-mounted devices, wearable devices as well as self-driving cars, robots, and more. In some possible implementation manners, the virtual-real fusion method may be implemented by calling a computer-readable instruction stored in a memory by a processor.
请参阅图4,图4是本公开虚实融合装置一实施例的结构示意图。虚实融合装置40包括确定部分41以及融合部分42。确定部分41,配置为基于目标设备经校正前的第一定位结果,确定虚拟物在目标设备的当前拍摄画面的第一投影位置,其中,第一投影位置确定为虚拟物在当前拍摄画面中的显示位置;融合部分42,配置为响应于获取到目标设备经校正后的第二定位结果,并且虚拟物满足第一预设条件,将第一投影位置继续确定为虚拟物在当前拍摄画面中的显示位置。Please refer to FIG. 4 . FIG. 4 is a schematic structural diagram of an embodiment of a virtual reality fusion device of the present disclosure. The virtual reality fusion device 40 includes a determination part 41 and a fusion part 42 . The determining part 41 is configured to determine a first projection position of the virtual object in the current shooting frame of the target device based on the first positioning result of the target device before correction, wherein the first projection position is determined as the position of the virtual object in the current shooting frame display position; the fusion part 42 is configured to continue to determine the first projection position as the position of the virtual object in the current shooting frame in response to obtaining the corrected second positioning result of the target device and the virtual object meets the first preset condition Show location.
上述方案,在获取到目标设备经校正后的第二定位结果后,响应于虚拟物满足第一预设条件,将虚拟物保持显示在当前拍摄画面的第一投影位置上,能够减少虚拟物因为显示位置发生跳变带来的视觉影响。In the above solution, after obtaining the corrected second positioning result of the target device, in response to the fact that the virtual object satisfies the first preset condition, the virtual object is kept displayed at the first projection position of the current shooting screen, which can reduce the risk of the virtual object due to The visual impact caused by the jump of the display position.
一些公开实施例中,在确定显示位置之后,融合部分42还配置为:显示当前拍摄画面,并在当前拍摄画面中的显示位置显示虚拟物。In some disclosed embodiments, after the display position is determined, the fusion part 42 is further configured to: display the current shooting frame, and display the virtual object at the display position in the current shooting frame.
上述方案,通过在目标设备经矫正后,虚拟物满足第一预设条件,将虚拟物保持显示在当前拍摄画面的显示位置,能够减少因为显示位置发生跳变带来的视觉影响。In the above solution, after the target device is corrected, the virtual object satisfies the first preset condition, and the virtual object is kept displayed at the display position of the current shooting picture, which can reduce the visual impact caused by the jump of the display position.
一些公开实施例中,第一预设条件包括以下至少一者:虚拟物符合第二预设条件、虚拟物的第一变更空间位置与原始空间位置之间的位置偏差符合预设位置要求,第二预设条件包括虚拟物属于第一类型和/或虚拟物的第一变更空间位置属于合理位置;其中,第一变更空间位置为基于目标设备的第二定位结果确定的空间位置,且第一变更空间位置投影至第一投影位置的空间位置。In some disclosed embodiments, the first preset condition includes at least one of the following: the virtual object meets the second preset condition, the positional deviation between the first changed space position of the virtual object and the original space position meets the preset position requirement, and The second preset condition includes that the virtual object belongs to the first type and/or the first changed spatial position of the virtual object belongs to a reasonable position; wherein, the first changed spatial position is a spatial position determined based on the second positioning result of the target device, and the first Changing the spatial position projected from the spatial position to the first projected position.
上述方案,通过虚拟物的类型、虚拟物的第一变更空间位置处于合理位置以及虚拟物的第一变更空间位置与原始空间位置之间的位置偏差符合预设位置要求,相比于虚拟物的显示位置发生跳变而言,显示位置存在一定的偏差所带来的视觉影响更小。The above scheme, through the type of virtual object, the first changed spatial position of the virtual object is in a reasonable position, and the position deviation between the first changed spatial position of the virtual object and the original spatial position meets the preset position requirements, compared with the virtual object’s As far as the display position jumps, the visual impact caused by a certain deviation in the display position is smaller.
一些公开实施例中,预设位置要求包括位置偏差小于预设阈值。In some disclosed embodiments, the preset position requirement includes a position deviation smaller than a preset threshold.
上述方案,通过虚拟物的第一变更空间位置与原始空间位置之间的位置偏差小于预设阈值,则两个位置在当前拍摄画面上的显示位置之间的偏差也不会大,因此保持虚拟 物的显示位置不发生跳变,相比于虚拟物的显示位置发生跳变而言,前者带来的视觉影响更小。In the above solution, if the position deviation between the first changed space position of the virtual object and the original space position is less than the preset threshold, the deviation between the display positions of the two positions on the current shooting screen will not be large, so the virtual object remains virtual. The display position of the object does not change, compared with the change of the display position of the virtual object, the visual impact caused by the former is smaller.
其中,预设位置要求还包括虚拟物的显示变更过程可见,其中,显示变更过程为虚拟物的显示从第一投影位置变为目标投影位置的过程。Wherein, the preset position requirement also includes that the display change process of the virtual object is visible, wherein the display change process is a process in which the display of the virtual object changes from the first projection position to the target projection position.
因此,通过在虚拟物的显示变更过程可见,且位置偏差小于预设阈值的情况下,保持虚拟物的显示位置不发生跳变,相比于虚拟物的显示位置发生跳变而言,前者带来的视觉影响更小。Therefore, by keeping the display position of the virtual object from jumping when the display change process of the virtual object is visible and the position deviation is smaller than the preset threshold, compared with the jumping of the display position of the virtual object, the former brings Comes with less visual impact.
一些公开实施例中,第一预设条件包括虚拟物符合第二预设条件,且第二预设条件包括虚拟物的第一变更空间位置属于合理位置;其中,合理位置包括非危险区域和属于预设高度范围内中的至少一者;和/或,在响应于虚拟物满足第一预设条件,将第一投影位置继续确定为虚拟物在当前拍摄画面中的显示位置之前,融合部分42还配置为:基于预设地图的语义信息,确定第一变更空间位置是否属于合理位置。In some disclosed embodiments, the first preset condition includes that the virtual object meets the second preset condition, and the second preset condition includes that the first change space position of the virtual object belongs to a reasonable location; wherein, the reasonable location includes a non-dangerous area and belongs to At least one of the preset height ranges; and/or, before the first projection position is continuously determined as the display position of the virtual object in the current shooting frame in response to the virtual object meeting the first preset condition, the fusion part 42 It is further configured to: determine whether the first change space position belongs to a reasonable position based on the semantic information of the preset map.
上述方案,通过结合预设地图的语义信息,确定第一变更空间位置是否属于合理位置,使得合理位置的确定更准确。In the above solution, by combining the semantic information of the preset map, it is determined whether the first changed spatial position belongs to a reasonable position, so that the determination of the reasonable position is more accurate.
一些公开实施例中,融合部分42还配置为:响应于获取到目标设备经校正后的第二定位结果,并且虚拟物不满足第一预设条件,采用第一纠正策略或第二纠正策略将虚拟物的显示位置从第一投影位置变更在目标投影位置。In some disclosed embodiments, the fusion part 42 is further configured to: in response to obtaining the corrected second positioning result of the target device and the virtual object does not satisfy the first preset condition, adopt the first correction strategy or the second correction strategy to The display position of the virtual object is changed from the first projection position to the target projection position.
上述方案,通过在虚拟物不满足第一预设条件的情况下,对虚拟物的显示位置进行变更,能够减少因为虚拟物的投影位置偏差带来的不好的视觉体验。In the above solution, by changing the display position of the virtual object when the virtual object does not satisfy the first preset condition, the bad visual experience caused by the deviation of the projection position of the virtual object can be reduced.
一些公开实施例中,融合部分42响应于获取到目标设备经校正后的第二定位结果,并且虚拟物不满足第一预设条件,采用第一纠正策略或第二纠正策略将虚拟物的显示位置从第一投影位置变更在目标投影位置,包括:响应于虚拟物属于第二类型,采用第一纠正策略将虚拟物的显示位置从第一投影位置变更在目标投影位置;响应于虚拟物属于第三类型,采用第二纠正策略将虚拟物的显示位置从第一投影位置变更在目标投影位置;响应于第一变更空间位置不属于合理位置,选择第一纠正策略或第二纠正策略将虚拟物的显示位置从第一投影位置变更在目标投影位置。In some disclosed embodiments, in response to obtaining the corrected second positioning result of the target device and the virtual object does not meet the first preset condition, the fusion part 42 adopts the first correction strategy or the second correction strategy to change the display of the virtual object to Changing the position from the first projection position to the target projection position includes: in response to the virtual object belonging to the second type, using the first correction strategy to change the display position of the virtual object from the first projection position to the target projection position; in response to the virtual object belonging to The third type is to change the display position of the virtual object from the first projection position to the target projection position by using the second correction strategy; The display position of the object is changed from the first projection position to the target projection position.
上述方案,通过对不同类型的虚拟物执行不同的纠正策略,提高了纠正策略方式的灵活度。The above solution improves the flexibility of the correction strategy by implementing different correction strategies for different types of virtual objects.
一些公开实施例中,预设位置要求包括虚拟物的显示变更过程可见、以及位置偏差小于预设阈值,其中,显示变更过程为虚拟物的显示从第一投影位置变为目标投影位置的过程;融合部分42响应于获取到目标设备经校正后的第二定位结果,并且虚拟物不满足第一预设条件,采用第一纠正策略或第二纠正策略将虚拟物的显示位置从第一投影位置变更在目标投影位置,包括:响应于虚拟物符合第二预设条件、虚拟物的显示变更过程可见、且位置偏差不小于预设阈值,采用第一纠正策略将虚拟物的显示位置从第一投影位置变更在目标投影位置;响应于虚拟物符合第二预设条件、且虚拟物的显示变更过程不可见,采用第二纠正策略将虚拟物的显示位置从第一投影位置变更在目标投影位置。In some disclosed embodiments, the preset position requirements include that the display change process of the virtual object is visible, and the position deviation is less than a preset threshold, wherein the display change process is a process in which the display of the virtual object changes from the first projection position to the target projection position; In response to obtaining the corrected second positioning result of the target device and the virtual object does not satisfy the first preset condition, the fusion part 42 uses the first correction strategy or the second correction strategy to change the display position of the virtual object from the first projection position to Changing the target projection position includes: adopting the first correction strategy to change the display position of the virtual object from the first to The projection position is changed at the target projection position; in response to the fact that the virtual object meets the second preset condition and the display change process of the virtual object is not visible, a second correction strategy is used to change the display position of the virtual object from the first projection position to the target projection position .
上述方案,通过对满足第二预设条件但不满足预设位置要求的虚拟物,在当前拍摄界面上的显示位置进行纠正,使得能够减少因为虚拟物在当前拍摄界面上的投影偏差带来的不利影响。In the above solution, by correcting the display position of the virtual object on the current shooting interface that meets the second preset condition but not meeting the preset position requirements, it is possible to reduce the error caused by the projection deviation of the virtual object on the current shooting interface. Negative Effects.
一些公开实施例中,在采用第一纠正策略或第二纠正策略将虚拟物的显示位置从第一投影位置变更在目标投影位置之前,融合部分42还包括:基于第二定位结果和原始空间位置,确定虚拟物在当前拍摄画面的第二投影位置,以作为目标投影位置;或者,在第一变更空间位置不属于合理位置的情况下,将第一变更空间位置调整为属于合理位 置的第二变更空间位置,基于第二定位结果和第二变更空间位置,确定虚拟物在当前拍摄画面的第三投影位置,以作为目标投影位置。In some disclosed embodiments, before adopting the first correction strategy or the second correction strategy to change the display position of the virtual object from the first projection position to the target projection position, the fusion part 42 further includes: based on the second positioning result and the original spatial position , to determine the second projection position of the virtual object in the current shooting picture as the target projection position; or, in the case that the first change space position does not belong to a reasonable position, adjust the first change space position to the second position belonging to a reasonable position The spatial position is changed, and based on the second positioning result and the second changed spatial position, a third projection position of the virtual object on the current shooting frame is determined as a target projection position.
上述方案,通过基于第二定位结果和原始空间位置确定目标投影位置,或根据第一变更空间位置调整为属于合理位置的第二变更空间位置并基于第二变更空间位置确定目标投影位置,使得对虚拟物的显示位置进行纠正后,很好地减少了因为投影误差带来的不利影响。In the above solution, the target projection position is determined based on the second positioning result and the original space position, or the second change space position is adjusted to a reasonable position according to the first change space position and the target projection position is determined based on the second change space position, so that the After the display position of the virtual object is corrected, the adverse effect caused by the projection error is well reduced.
一些公开实施例中,第一纠正策略为在下一次显示渲染过程中直接将虚拟物渲染至目标投影位置,第二纠正策略为按照预设速度将虚拟物从第一投影位置移动至目标投影位置。In some disclosed embodiments, the first correction strategy is to directly render the virtual object to the target projection position in the next display rendering process, and the second correction strategy is to move the virtual object from the first projection position to the target projection position at a preset speed.
上述方案,通过设置不同的纠正策略,使得纠正过程更为灵活。In the above solution, by setting different correction strategies, the correction process is more flexible.
一些公开实施例中在响应于获取到目标设备经校正后的第二定位结果,并且虚拟物满足第一预设条件,将第一投影位置继续确定为虚拟物在当前拍摄画面中的显示位置之前,确定部分41还配置为:利用第一投影位置、目标设备的投影参数、以及世界坐标系与目标设备的相机坐标系之间的第一变换参数,得到世界坐标系上的第一变更空间位置,其中,第一变换参数基于目标设备的第二定位结果获取得到。In some disclosed embodiments, in response to obtaining the corrected second positioning result of the target device and the virtual object meets the first preset condition, before continuing to determine the first projection position as the display position of the virtual object in the current shooting frame , the determining part 41 is further configured to: use the first projection position, the projection parameters of the target device, and the first transformation parameters between the world coordinate system and the camera coordinate system of the target device to obtain the first changed space position on the world coordinate system , wherein the first transformation parameter is obtained based on the second positioning result of the target device.
上述方案,通过目标设备的第二定位结果以及虚拟物的第一投影位置确定虚拟物的第一变更空间位置,能够保持虚拟物在第一变更空间位置处对应当前拍摄画面中的投影位置不变。In the above scheme, the first changed space position of the virtual object is determined by the second positioning result of the target device and the first projection position of the virtual object, and the projection position of the virtual object corresponding to the current shooting picture at the first changed space position remains unchanged. .
一些公开实施例中,确定部分41基于目标设备经校正前的第一定位结果,确定虚拟物在所述目标设备的当前拍摄画面的第一投影位置,包括:利用虚拟物的原始空间位置、目标设备的投影参数、以及世界坐标系与目标设备的相机坐标系之间的第二变换参数,得到第一投影位置,其中,第二变换参数基于目标设备的第一定位结果获取得到;在获取到目标设备经校正后的第二定位结果后,响应于获取到目标设备经校正后的第二定位结果,并且虚拟物满足第一预设条件,将第一投影位置继续确定为虚拟物在当前拍摄画面中的显示位置之前,融合部分42还配置为:将目标设备与预设地图进行定位匹配,得到目标设备在预设地图中的第二定位结果。In some disclosed embodiments, the determining part 41 determines the first projection position of the virtual object on the current shooting frame of the target device based on the first positioning result of the target device before correction, including: using the original spatial position of the virtual object, the target The projection parameters of the device and the second transformation parameters between the world coordinate system and the camera coordinate system of the target device are obtained to obtain the first projection position, wherein the second transformation parameters are obtained based on the first positioning result of the target device; After the corrected second positioning result of the target device, in response to obtaining the corrected second positioning result of the target device and the virtual object meets the first preset condition, continue to determine the first projection position as the virtual object in the current shooting Before displaying the position in the screen, the fusion part 42 is further configured to: locate and match the target device with the preset map to obtain a second positioning result of the target device in the preset map.
上述方案,通过将目标设备与预设地图进行定位匹配,得到目标设备在预设地图中的第二定位结果,使得第二定位结果相对于校正前的第一定位结果而言更为准确。In the above solution, the second positioning result of the target device in the preset map is obtained by positioning and matching the target device with the preset map, so that the second positioning result is more accurate than the first positioning result before correction.
由于本公开实施例中的装置解决问题的原理与本公开实施例上述虚拟融合方法相似,因此装置实施例的实施可以参见方法实施例的实施。Since the problem-solving principle of the device in the embodiment of the present disclosure is similar to the above-mentioned virtual fusion method in the embodiment of the present disclosure, the implementation of the device embodiment may refer to the implementation of the method embodiment.
在本公开实施例以及其他的实施例中,“部分”可以是部分电路、部分处理器、部分程序或软件等等,当然也可以是单元,还可以是模块也可以是非模块化的。In the embodiments of the present disclosure and other embodiments, a "part" may be a part of a circuit, a part of a processor, a part of a program or software, etc., of course it may also be a unit, a module or a non-modular one.
请参阅图5,图5是本公开电子设备一实施例的结构示意图。电子设备50包括存储器51和处理器52,处理器52配置为执行存储器51中存储的程序指令,以实现上述虚实融合方法实施例中的步骤。在一个具体的实施场景中,电子设备50可以包括但不限于:AR设备、微型计算机、服务器,此外,电子设备50还可以包括笔记本电脑、平板电脑等移动设备,在此不做限定。Please refer to FIG. 5 . FIG. 5 is a schematic structural diagram of an embodiment of the electronic device of the present disclosure. The electronic device 50 includes a memory 51 and a processor 52, and the processor 52 is configured to execute the program instructions stored in the memory 51, so as to realize the steps in the above embodiment of the virtual-real fusion method. In a specific implementation scenario, the electronic device 50 may include, but is not limited to: an AR device, a microcomputer, and a server. In addition, the electronic device 50 may also include mobile devices such as notebook computers and tablet computers, which are not limited here.
具体而言,处理器52配置为控制其自身以及存储器51以实现上述虚实融合方法实施例中的步骤。处理器52还可以称为CPU(Central Processing Unit,中央处理单元)。处理器52可能是一种集成电路芯片,具有信号的处理能力。处理器52还可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field至Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。另外,处理器52可以由集 成电路芯片共同实现。Specifically, the processor 52 is configured to control itself and the memory 51 to implement the steps in the above embodiment of the virtual-real fusion method. The processor 52 may also be called a CPU (Central Processing Unit, central processing unit). The processor 52 may be an integrated circuit chip with signal processing capability. The processor 52 can also be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field to Programmable Gate Array, FPGA) or other Programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. A general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like. In addition, the processor 52 may be jointly realized by an integrated circuit chip.
上述方案,在获取到目标设备经校正后的第二定位结果后,响应于虚拟物满足第一预设条件,将虚拟物保持显示在当前拍摄画面的第一投影位置上,能够减少虚拟物因为显示位置发生跳变带来的视觉影响。In the above solution, after obtaining the corrected second positioning result of the target device, in response to the fact that the virtual object satisfies the first preset condition, the virtual object is kept displayed at the first projection position of the current shooting screen, which can reduce the risk of the virtual object due to The visual impact caused by the jump of the display position.
请参阅图6,图6为本公开计算机可读存储介质一实施例的结构示意图。计算机可读存储介质60存储有程序指令601,程序指令601被处理器执行时,配置为实现上述虚实融合方法实施例中的步骤。Please refer to FIG. 6 . FIG. 6 is a schematic structural diagram of an embodiment of a computer-readable storage medium of the present disclosure. The computer-readable storage medium 60 stores program instructions 601. When the program instructions 601 are executed by the processor, they are configured to implement the steps in the above embodiments of the virtual-real fusion method.
上述方案,在获取到目标设备经校正后的第二定位结果后,响应于虚拟物满足第一预设条件,将虚拟物保持显示在当前拍摄画面的第一投影位置上,能够减少虚拟物因为显示位置发生跳变带来的视觉影响。In the above solution, after obtaining the corrected second positioning result of the target device, in response to the fact that the virtual object satisfies the first preset condition, the virtual object is kept displayed at the first projection position of the current shooting screen, which can reduce the risk of the virtual object due to The visual impact caused by the jump of the display position.
在一些实施例中,本公开实施例提供的装置具有的功能或包含的部分可以配置为执行上文方法实施例描述的方法,其具体实现可以参照上文方法实施例的描述。In some embodiments, the functions or parts included in the apparatus provided by the embodiments of the present disclosure may be configured to execute the methods described in the above method embodiments, and for specific implementation, refer to the descriptions of the above method embodiments.
本公开涉及增强现实领域,通过获取现实环境中的目标对象的图像信息,进而借助各类视觉相关算法实现对目标对象的相关特征、状态及属性进行检测或识别处理,从而得到与具体应用匹配的虚拟与现实相结合的AR效果。示例性的,目标对象可涉及与人体相关的脸部、肢体、手势、动作等,或者与物体相关的标识物、标志物,或者与场馆或场所相关的沙盘、展示区域或展示物品等。视觉相关算法可涉及视觉定位、即时定位于地图构建(Simultaneous Localization and Mapping,SLAM)、三维重建、图像注册、背景分割、对象的关键点提取及跟踪、对象的位姿或深度检测等。具体应用不仅可以涉及跟真实场景或物品相关的导览、导航、讲解、重建、虚拟效果叠加展示等交互场景,还可以涉及与人相关的特效处理,比如妆容美化、肢体美化、特效展示、虚拟模型展示等交互场景。This disclosure relates to the field of augmented reality. By acquiring the image information of the target object in the real environment, and then using various visual correlation algorithms to detect or identify the relevant features, states and attributes of the target object, and thus obtain the image information that matches the specific application. AR effect combining virtual and reality. Exemplarily, the target object may involve faces, limbs, gestures, actions, etc. related to the human body, or markers and markers related to objects, or sand tables, display areas or display items related to venues or places. Vision-related algorithms can involve visual positioning, real-time positioning in map construction (Simultaneous Localization and Mapping, SLAM), 3D reconstruction, image registration, background segmentation, key point extraction and tracking of objects, object pose or depth detection, etc. Specific applications can not only involve interactive scenes such as guided tours, navigation, explanations, reconstructions, virtual effect overlays and display related to real scenes or objects, but also special effects processing related to people, such as makeup beautification, body beautification, special effect display, virtual Interactive scenarios such as model display.
可通过卷积神经网络,实现对目标对象的相关特征、状态及属性进行检测或识别处理。上述卷积神经网络是基于深度学习框架进行模型训练而得到的网络模型。The relevant features, states and attributes of the target object can be detected or identified through the convolutional neural network. The above-mentioned convolutional neural network is a network model obtained by performing model training based on a deep learning framework.
上文对各个实施例的描述倾向于强调各个实施例之间的不同之处,其相同或相似之处可以互相参考。The above descriptions of the various embodiments tend to emphasize the differences between the various embodiments, and the same or similar points can be referred to each other.
本公开实施例可以是系统、方法、计算机可读存储介质和/或计算机程序产品。计算机程序产品可以包括计算机可读存储介质,可以是易失性存储介质或非易失性存储介质,其上载有用于使处理器实现本公开实施例的各个方面的计算机可读程序指令。该计算机程序产品可以通过硬件、软件或其结合的方式实现。在一个可选实施例中,所述计算机程序产品体现为计算机存储介质,在另一个可选实施例中,计算机程序产品体现为软件产品,例如软件开发包(Software Development Kit,SDK)等等。计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备。计算机可读存储介质例如可以是(但不限于)电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。Embodiments of the present disclosure may be a system, method, computer readable storage medium, and/or computer program product. The computer program product may include a computer-readable storage medium, which may be a volatile or non-volatile storage medium, on which are loaded computer-readable program instructions for causing a processor to implement various aspects of the embodiments of the present disclosure. The computer program product can be realized by hardware, software or a combination thereof. In an optional embodiment, the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK) and the like. A computer readable storage medium may be a tangible device that can retain and store instructions for use by an instruction execution device. A computer readable storage medium may be, for example, but is not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing.
在本公开所提供的几个实施例中,应该理解到,所揭露的方法和装置,可以通过其它的方式实现。例如,以上所描述的装置实施方式是示意性的,例如,部分或单元的划分,为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性、机械或其它的形式。In the several embodiments provided in the present disclosure, it should be understood that the disclosed methods and devices may be implemented in other ways. For example, the device implementations described above are schematic, for example, the division of parts or units is a logical function division, and there may be other division methods in actual implementation, for example, units or components can be combined or integrated into another A system, or some feature, can be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
另外,在本公开各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本公开的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本公开各个实施方式方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present disclosure is essentially or part of the contribution to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) execute all or part of the steps of the methods in various embodiments of the present disclosure. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disc, etc., which can store program codes. .
工业实用性Industrial Applicability
本公开实施例中,基于目标设备经校正前的第一定位结果,确定虚拟物在目标设备的当前拍摄画面的第一投影位置,其中,第一投影位置确定为虚拟物在当前拍摄画面中的显示位置;响应于获取到目标设备经校正后的第二定位结果,并且虚拟物满足第一预设条件,将第一投影位置继续确定为虚拟物在当前拍摄画面中的显示位置。上述方案,能够减少因为目标设备的定位结果校正后,虚拟物体跳变带来的不利影响。In the embodiment of the present disclosure, based on the first positioning result of the target device before correction, the first projection position of the virtual object in the current shooting frame of the target device is determined, wherein the first projection position is determined as the position of the virtual object in the current shooting frame Display position: in response to obtaining the corrected second positioning result of the target device and the virtual object meets the first preset condition, continue to determine the first projected position as the display position of the virtual object in the current shooting frame. The above solution can reduce the adverse effect caused by the jump of the virtual object after the positioning result of the target device is corrected.

Claims (29)

  1. 一种虚实融合方法,包括:A virtual reality fusion method, comprising:
    基于目标设备经校正前的第一定位结果,确定虚拟物在所述目标设备的当前拍摄画面的第一投影位置,其中,所述第一投影位置确定为所述虚拟物在所述当前拍摄画面中的显示位置;Based on the first positioning result of the target device before correction, determine a first projection position of the virtual object on the current shooting frame of the target device, wherein the first projection position is determined as the virtual object on the current shooting frame The display position in ;
    响应于获取到所述目标设备经校正后的第二定位结果,并且所述虚拟物满足第一预设条件,将所述第一投影位置继续确定为所述虚拟物在所述当前拍摄画面中的显示位置。In response to obtaining the corrected second positioning result of the target device and the virtual object satisfies a first preset condition, continue to determine the first projection position as the virtual object in the current shooting frame display position of .
  2. 根据权利要求1所述的方法,其中,在确定所述显示位置之后,所述方法还包括:The method according to claim 1, wherein, after determining the display position, the method further comprises:
    显示所述当前拍摄画面,并在所述当前拍摄画面中的所述显示位置显示所述虚拟物。displaying the current shooting frame, and displaying the virtual object at the display position in the current shooting frame.
  3. 根据权利要求1或2所述的方法,其中,所述第一预设条件包括以下至少一者:所述虚拟物符合第二预设条件、所述虚拟物的第一变更空间位置与原始空间位置之间的位置偏差符合预设位置要求,所述第二预设条件包括所述虚拟物属于第一类型和/或所述虚拟物的第一变更空间位置属于合理位置;其中,所述第一变更空间位置为基于所述目标设备的所述第二定位结果确定的空间位置,且所述第一变更空间位置投影至所述第一投影位置。The method according to claim 1 or 2, wherein the first preset condition includes at least one of the following: the virtual object meets the second preset condition, the first changed space position of the virtual object is different from the original space The position deviation between the positions meets the preset position requirements, and the second preset condition includes that the virtual object belongs to the first type and/or the first change space position of the virtual object belongs to a reasonable position; wherein, the second A modified spatial position is a spatial position determined based on the second positioning result of the target device, and the first modified spatial position is projected to the first projected position.
  4. 根据权利要求3所述的方法,其中,所述预设位置要求包括所述位置偏差小于预设阈值。The method according to claim 3, wherein the preset position requirement includes that the position deviation is smaller than a preset threshold.
  5. 根据权利要求4所述的方法,其中,所述预设位置要求还包括所述虚拟物的显示变更过程可见,其中,所述显示变更过程为所述虚拟物的显示从第一投影位置变为目标投影位置的过程。The method according to claim 4, wherein the preset position requirement further includes that the display change process of the virtual object is visible, wherein the display change process is that the display of the virtual object changes from the first projection position to The process of projecting the location of the target.
  6. 根据权利要求3至5任一项所述的方法,其中,所述第一预设条件包括所述虚拟物符合第二预设条件,且所述第二预设条件包括所述虚拟物的第一变更空间位置属于合理位置;其中,The method according to any one of claims 3 to 5, wherein the first preset condition includes that the virtual item meets a second preset condition, and the second preset condition includes the first preset condition of the virtual item 1. Changing the location of the space is a reasonable location; among them,
    所述合理位置包括非危险区域和属于预设高度范围内中的至少一者;和/或,所述将所述第一投影位置继续确定为所述虚拟物在所述当前拍摄画面中的显示位置之前,所述方法还包括:The reasonable position includes at least one of a non-dangerous area and a preset height range; and/or, the first projection position continues to be determined as the display of the virtual object in the current shooting frame Before the location, the method also includes:
    基于预设地图的语义信息,确定所述第一变更空间位置是否属于所述合理位置。Based on the semantic information of the preset map, it is determined whether the first changed space position belongs to the reasonable position.
  7. 根据权利要求1至6任一项所述的方法,其中,所述方法还包括:The method according to any one of claims 1 to 6, wherein the method further comprises:
    响应于获取到所述目标设备经校正后的第二定位结果,并且所述虚拟物不满足所述第一预设条件,采用第一纠正策略或第二纠正策略将所述虚拟物的所述显示位置从所述第一投影位置变更在目标投影位置。In response to obtaining the corrected second positioning result of the target device and the virtual object does not satisfy the first preset condition, adopting a first correction strategy or a second correction strategy to convert the The display position is changed from the first projection position to a target projection position.
  8. 根据权利要求7所述的方法,其中,所述响应于获取到所述目标设备经校正后的第二定位结果,并且所述虚拟物不满足所述第一预设条件,采用第一纠正策略或第二纠正策略将所述虚拟物的所述显示位置从所述第一投影位置变更在目标投影位置,包括:The method according to claim 7, wherein, in response to obtaining the corrected second positioning result of the target device and the virtual object does not satisfy the first preset condition, adopting a first correction strategy Or the second correction strategy changes the display position of the virtual object from the first projection position to a target projection position, including:
    响应于所述虚拟物属于第二类型,采用所述第一纠正策略将所述虚拟物的显示位置从所述第一投影位置变更在目标投影位置;In response to the virtual object belonging to the second type, changing the display position of the virtual object from the first projected position to a target projected position by adopting the first correction strategy;
    响应于所述虚拟物属于第三类型,采用所述第二纠正策略将所述虚拟物的显示位置从所述第一投影位置变更在目标投影位置;In response to the virtual object belonging to the third type, using the second correction strategy to change the display position of the virtual object from the first projection position to a target projection position;
    响应于所述第一变更空间位置不属于合理位置,选择所述第一纠正策略或所述第二纠正策略将所述虚拟物的显示位置从所述第一投影位置变更在目标投影位置。In response to the first changing space position not belonging to a reasonable position, selecting the first correction strategy or the second correction strategy to change the display position of the virtual object from the first projection position to a target projection position.
  9. 根据权利要求7所述的方法,其中,所述预设位置要求包括所述虚拟物的显示变更过程可见、以及所述位置偏差小于预设阈值,其中,所述显示变更过程为所述虚拟 物的显示从第一投影位置变为目标投影位置的过程;The method according to claim 7, wherein the preset position requirement includes that the display change process of the virtual object is visible, and the position deviation is smaller than a preset threshold, wherein the display change process is the virtual object The process of the display changing from the first projection position to the target projection position;
    所述响应于获取到所述目标设备经校正后的第二定位结果,并且所述虚拟物不满足所述第一预设条件,采用第一纠正策略或第二纠正策略将所述虚拟物的所述显示位置从所述第一投影位置变更在目标投影位置,包括:In response to obtaining the corrected second positioning result of the target device and the virtual object does not satisfy the first preset condition, adopting the first correction strategy or the second correction strategy to change the position of the virtual object to The display position is changed from the first projection position to the target projection position, including:
    响应于所述虚拟物符合所述第二预设条件、所述虚拟物的显示变更过程可见、且所述位置偏差不小于所述预设阈值,采用所述第一纠正策略将所述虚拟物的显示位置从所述第一投影位置变更在目标投影位置;In response to the fact that the virtual object meets the second preset condition, the display change process of the virtual object is visible, and the position deviation is not less than the preset threshold, using the first correction strategy to restore the virtual object to The display position of is changed from the first projection position to the target projection position;
    响应于所述虚拟物符合所述第二预设条件、且所述虚拟物的显示变更过程不可见,采用所述第二纠正策略将所述虚拟物的显示位置从所述第一投影位置变更在目标投影位置。In response to the fact that the virtual object meets the second preset condition and the display change process of the virtual object is invisible, using the second correction strategy to change the display position of the virtual object from the first projection position at the target projection position.
  10. 根据权利要求7至9任一项所述的方法,其中,在所述采用第一纠正策略或第二纠正策略将所述虚拟物的所述显示位置从所述第一投影位置变更在目标投影位置之前,所述方法还包括:The method according to any one of claims 7 to 9, wherein, when the first correction strategy or the second correction strategy is used to change the display position of the virtual object from the first projection position to the target projection Before the location, the method also includes:
    基于所述第二定位结果和所述原始空间位置,确定所述虚拟物在所述当前拍摄画面的第二投影位置,以作为所述目标投影位置;或者,Based on the second positioning result and the original spatial position, determine a second projection position of the virtual object on the current shooting frame as the target projection position; or,
    在所述第一变更空间位置不属于合理位置的情况下,将所述第一变更空间位置调整为属于所述合理位置的第二变更空间位置,基于所述第二定位结果和所述第二变更空间位置,确定所述虚拟物在所述当前拍摄画面的第三投影位置,以作为所述目标投影位置。If the first changed space position does not belong to a reasonable position, adjust the first changed space position to a second changed space position belonging to the reasonable position, based on the second positioning result and the second The spatial position is changed, and a third projection position of the virtual object on the current shooting frame is determined as the target projection position.
  11. 根据权利要求7至9任一项所述的方法,其中,所述第一纠正策略为在下一次显示渲染过程中直接将所述虚拟物渲染至所述目标投影位置,所述第二纠正策略为按照预设速度将所述虚拟物从所述第一投影位置移动至所述目标投影位置。The method according to any one of claims 7 to 9, wherein the first correction strategy is to directly render the virtual object to the target projection position in the next display rendering process, and the second correction strategy is The virtual object is moved from the first projection position to the target projection position at a preset speed.
  12. 根据权利要求1至11任一项所述的方法,其中,在所述响应于获取到所述目标设备经校正后的第二定位结果,并且所述虚拟物满足第一预设条件,将所述第一投影位置继续确定为所述虚拟物在所述当前拍摄画面中的显示位置之前,所述方法还包括:The method according to any one of claims 1 to 11, wherein, in response to obtaining the corrected second positioning result of the target device and the virtual object satisfies the first preset condition, the The first projection position continues to be determined as before the display position of the virtual object in the current shooting frame, and the method further includes:
    利用所述第一投影位置、所述目标设备的投影参数、以及世界坐标系与所述目标设备的相机坐标系之间的第一变换参数,得到所述世界坐标系上的所述第一变更空间位置,其中,所述第一变换参数基于所述目标设备的第二定位结果获取得到。Using the first projection position, projection parameters of the target device, and first transformation parameters between the world coordinate system and the camera coordinate system of the target device, to obtain the first modification on the world coordinate system The spatial position, wherein the first transformation parameter is obtained based on the second positioning result of the target device.
  13. 根据权利要求1至12任一项所述的方法,其中,所述基于目标设备经校正前的第一定位结果,确定虚拟物在所述目标设备的当前拍摄画面的第一投影位置,包括:The method according to any one of claims 1 to 12, wherein, based on the first positioning result of the target device before correction, determining the first projection position of the virtual object on the current shooting picture of the target device includes:
    利用所述虚拟物的原始空间位置、所述目标设备的投影参数、以及世界坐标系与所述目标设备的相机坐标系之间的第二变换参数,得到所述第一投影位置,其中,所述第二变换参数基于所述目标设备的第一定位结果获取得到;Using the original spatial position of the virtual object, the projection parameters of the target device, and the second transformation parameters between the world coordinate system and the camera coordinate system of the target device, the first projection position is obtained, wherein the The second transformation parameter is obtained based on the first positioning result of the target device;
    所述响应于获取到所述目标设备经校正后的第二定位结果,并且所述虚拟物满足第一预设条件,将所述第一投影位置继续确定为所述虚拟物在所述当前拍摄画面中的显示位置之前,所述方法还包括:In response to obtaining the corrected second positioning result of the target device and the virtual object satisfies a first preset condition, continue to determine the first projection position as the virtual object in the current shooting Before displaying the position in the picture, the method also includes:
    将所述目标设备与预设地图进行定位匹配,得到所述目标设备在所述预设地图中的所述第二定位结果。Positioning and matching the target device with a preset map to obtain the second positioning result of the target device in the preset map.
  14. 一种虚实融合装置,包括:A virtual reality fusion device, comprising:
    确定部分,配置为基于目标设备经校正前的第一定位结果,确定虚拟物在所述目标设备的当前拍摄画面的第一投影位置,其中,所述第一投影位置确定为所述虚拟物在所述当前拍摄画面中的显示位置;The determining part is configured to determine a first projection position of the virtual object on the current shot frame of the target device based on the first positioning result of the target device before correction, wherein the first projection position is determined as the virtual object at The display position in the current shooting picture;
    融合部分,配置为响应于获取到所述目标设备经校正后的第二定位结果,并且所述虚拟物满足第一预设条件,将所述第一投影位置继续确定为所述虚拟物在所述当前拍摄画面中的显示位置。The fusion part is configured to, in response to obtaining the corrected second positioning result of the target device and the virtual object meets a first preset condition, continue to determine the first projection position as the virtual object at Describe the display position in the current shooting screen.
  15. 根据权利要求14所述的装置,其中,在确定所述显示位置之后,所述融合部分还配置为:显示所述当前拍摄画面,并在所述当前拍摄画面中的所述显示位置显示所述虚拟物。The device according to claim 14, wherein, after determining the display position, the fusion part is further configured to: display the current shooting frame, and display the dummy.
  16. 根据权利要求14或15所述的装置,其中,所述第一预设条件包括以下至少一者:所述虚拟物符合第二预设条件、所述虚拟物的第一变更空间位置与原始空间位置之间的位置偏差符合预设位置要求,所述第二预设条件包括所述虚拟物属于第一类型和/或所述虚拟物的第一变更空间位置属于合理位置;其中,所述第一变更空间位置为基于所述目标设备的所述第二定位结果确定的空间位置,且所述第一变更空间位置投影至所述第一投影位置。The device according to claim 14 or 15, wherein the first preset condition includes at least one of the following: the virtual object meets the second preset condition, the first changed space position of the virtual object is different from the original space The position deviation between the positions meets the preset position requirements, and the second preset condition includes that the virtual object belongs to the first type and/or the first change space position of the virtual object belongs to a reasonable position; wherein, the second A modified spatial position is a spatial position determined based on the second positioning result of the target device, and the first modified spatial position is projected to the first projected position.
  17. 根据权利要求16所述的装置,其中,所述预设位置要求包括所述位置偏差小于预设阈值。The apparatus according to claim 16, wherein the preset position requirement includes that the position deviation is smaller than a preset threshold.
  18. 根据权利要求17所述的装置,其中,所述预设位置要求还包括所述虚拟物的显示变更过程可见,其中,所述显示变更过程为所述虚拟物的显示从第一投影位置变为目标投影位置的过程。The device according to claim 17, wherein the preset position requirement further includes that the display change process of the virtual object is visible, wherein the display change process is that the display of the virtual object changes from the first projection position to The process of projecting the location of the target.
  19. 根据权利要求16至18任一项所述的装置,其中,所述第一预设条件包括所述虚拟物符合第二预设条件,且所述第二预设条件包括所述虚拟物的第一变更空间位置属于合理位置;其中,所述合理位置包括非危险区域和属于预设高度范围内中的至少一者;和/或,所述将所述第一投影位置继续确定为所述虚拟物在所述当前拍摄画面中的显示位置之前,所述融合部分还配置为:基于预设地图的语义信息,确定所述第一变更空间位置是否属于所述合理位置。The device according to any one of claims 16 to 18, wherein the first preset condition includes that the virtual item meets a second preset condition, and the second preset condition includes the first preset condition of the virtual item. A changed spatial position belongs to a reasonable position; wherein, the reasonable position includes at least one of a non-dangerous area and a preset height range; and/or, the first projected position continues to be determined as the virtual Before the display position of the object in the current shooting frame, the fusion part is further configured to: determine whether the first changed spatial position belongs to the reasonable position based on semantic information of a preset map.
  20. 根据权利要求14至19任一项所述的装置,其中,所述融合部分还配置为:响应于获取到所述目标设备经校正后的第二定位结果,并且所述虚拟物不满足所述第一预设条件,采用第一纠正策略或第二纠正策略将所述虚拟物的所述显示位置从所述第一投影位置变更在目标投影位置。The apparatus according to any one of claims 14 to 19, wherein the fusion part is further configured: in response to obtaining the corrected second positioning result of the target device, and the virtual object does not satisfy the The first preset condition is to change the display position of the virtual object from the first projection position to a target projection position by adopting a first correction strategy or a second correction strategy.
  21. 根据权利要求20所述的装置,其中,所述融合部分响应于获取到所述目标设备经校正后的第二定位结果,并且所述虚拟物不满足所述第一预设条件,采用第一纠正策略或第二纠正策略将所述虚拟物的所述显示位置从所述第一投影位置变更在目标投影位置,包括:响应于所述虚拟物属于第二类型,采用所述第一纠正策略将所述虚拟物的显示位置从所述第一投影位置变更在目标投影位置;响应于所述虚拟物属于第三类型,采用所述第二纠正策略将所述虚拟物的显示位置从所述第一投影位置变更在目标投影位置;响应于所述第一变更空间位置不属于合理位置,选择所述第一纠正策略或所述第二纠正策略将所述虚拟物的显示位置从所述第一投影位置变更在目标投影位置。The apparatus according to claim 20, wherein the fusion part adopts a first changing the display position of the virtual object from the first projection position to a target projection position by a correction strategy or a second correction strategy, comprising: adopting the first correction strategy in response to the virtual object belonging to the second type changing the display position of the virtual object from the first projection position to a target projection position; in response to the virtual object belonging to a third type, adopting the second correction strategy to change the display position of the virtual object from the The first projection position is changed to the target projection position; in response to the first changed space position not belonging to a reasonable position, selecting the first correction strategy or the second correction strategy to change the display position of the virtual object from the first A projection position is changed to the target projection position.
  22. 根据权利要求20所述的装置,其中,所述预设位置要求包括所述虚拟物的显示变更过程可见、以及所述位置偏差小于预设阈值,其中,所述显示变更过程为所述虚拟物的显示从第一投影位置变为目标投影位置的过程;所述融合部分响应于获取到所述目标设备经校正后的第二定位结果,并且所述虚拟物不满足所述第一预设条件,采用第一纠正策略或第二纠正策略将所述虚拟物的所述显示位置从所述第一投影位置变更在目标投影位置,包括:The device according to claim 20, wherein the preset position requirement includes that the display change process of the virtual object is visible, and the position deviation is smaller than a preset threshold, wherein the display change process is the virtual object The process of displaying the display from the first projection position to the target projection position; the fusion part responds to obtaining the corrected second positioning result of the target device, and the virtual object does not satisfy the first preset condition Using a first correction strategy or a second correction strategy to change the display position of the virtual object from the first projection position to a target projection position, including:
    响应于所述虚拟物符合所述第二预设条件、所述虚拟物的显示变更过程可见、且所述位置偏差不小于所述预设阈值,采用所述第一纠正策略将所述虚拟物的显示位置从所述第一投影位置变更在目标投影位置;响应于所述虚拟物符合所述第二预设条件、且所述虚拟物的显示变更过程不可见,采用所述第二纠正策略将所述虚拟物的显示位置从所述第一投影位置变更在目标投影位置In response to the fact that the virtual object meets the second preset condition, the display change process of the virtual object is visible, and the position deviation is not less than the preset threshold, using the first correction strategy to restore the virtual object to The display position of the virtual object is changed from the first projection position to the target projection position; in response to the fact that the virtual object meets the second preset condition and the display change process of the virtual object is invisible, the second correction strategy is adopted Changing the display position of the virtual object from the first projection position to a target projection position
  23. 根据权利要求20至22任一项所述的装置,其中,在所述采用第一纠正策略或 第二纠正策略将所述虚拟物的所述显示位置从所述第一投影位置变更在目标投影位置之前,所述融合部分还包括基于所述第二定位结果和所述原始空间位置,确定所述虚拟物在所述当前拍摄画面的第二投影位置,以作为所述目标投影位置;或者,The device according to any one of claims 20 to 22, wherein when the first correction strategy or the second correction strategy is used to change the display position of the virtual object from the first projection position to the target projection Before the position, the fusion part further includes determining a second projection position of the virtual object in the current shot frame as the target projection position based on the second positioning result and the original spatial position; or,
    在所述第一变更空间位置不属于合理位置的情况下,将所述第一变更空间位置调整为属于所述合理位置的第二变更空间位置,基于所述第二定位结果和所述第二变更空间位置,确定所述虚拟物在所述当前拍摄画面的第三投影位置,以作为所述目标投影位置。If the first changed space position does not belong to a reasonable position, adjust the first changed space position to a second changed space position belonging to the reasonable position, based on the second positioning result and the second The spatial position is changed, and a third projection position of the virtual object on the current shooting frame is determined as the target projection position.
  24. 根据权利要求20至22任一项所述的装置,其中,所述第一纠正策略为在下一次显示渲染过程中直接将所述虚拟物渲染至所述目标投影位置,所述第二纠正策略为按照预设速度将所述虚拟物从所述第一投影位置移动至目标投影位置。The device according to any one of claims 20 to 22, wherein the first correction strategy is to directly render the virtual object to the target projection position in the next display rendering process, and the second correction strategy is The virtual object is moved from the first projection position to a target projection position at a preset speed.
  25. 根据权利要求14至24任一项所述的装置,其中,在所述响应于获取到所述目标设备经校正后的第二定位结果,并且所述虚拟物满足第一预设条件,将所述第一投影位置继续确定为所述虚拟物在所述当前拍摄画面中的显示位置之前,所述确定部分还配置为利用所述第一投影位置、所述目标设备的投影参数、以及世界坐标系与所述目标设备的相机坐标系之间的第一变换参数,得到所述世界坐标系上的所述第一变更空间位置,其中,所述第一变换参数基于所述目标设备的第二定位结果获取得到。The device according to any one of claims 14 to 24, wherein, in response to obtaining the corrected second positioning result of the target device and the virtual object satisfies the first preset condition, the Before the first projection position continues to be determined as the display position of the virtual object in the current shooting frame, the determination part is further configured to use the first projection position, the projection parameters of the target device, and the world coordinates system and the camera coordinate system of the target device to obtain the first changed space position on the world coordinate system, wherein the first transformation parameter is based on the second The positioning result is obtained.
  26. 根据权利要求14至25任一项所述的装置,其中,所述确定部分基于目标设备经校正前的第一定位结果,确定虚拟物在所述目标设备的当前拍摄画面的第一投影位置,包括:利用所述虚拟物的原始空间位置、所述目标设备的投影参数、以及世界坐标系与所述目标设备的相机坐标系之间的第二变换参数,得到所述第一投影位置,其中,所述第二变换参数基于所述目标设备的第一定位结果获取得到;The device according to any one of claims 14 to 25, wherein the determining part determines the first projection position of the virtual object on the current shooting frame of the target device based on the first positioning result of the target device before correction, The method includes: obtaining the first projected position by using the original spatial position of the virtual object, the projection parameter of the target device, and the second transformation parameter between the world coordinate system and the camera coordinate system of the target device, wherein , the second transformation parameter is obtained based on the first positioning result of the target device;
    在响应于获取到所述目标设备经校正后的第二定位结果,并且所述虚拟物满足第一预设条件,将所述第一投影位置继续确定为所述虚拟物在所述当前拍摄画面中的显示位置之前,融合部分还配置为将所述目标设备与预设地图进行定位匹配,得到所述目标设备在所述预设地图中的所述第二定位结果。In response to obtaining the corrected second positioning result of the target device and the virtual object meets the first preset condition, continue to determine the first projection position as the virtual object in the current shooting frame Before displaying the position in , the fusion part is further configured to perform positioning and matching of the target device with a preset map to obtain the second positioning result of the target device in the preset map.
  27. 一种电子设备,包括存储器和处理器,所述处理器配置为执行所述存储器中存储的程序指令,以实现权利要求1至13任一项所述的方法。An electronic device, comprising a memory and a processor, the processor configured to execute program instructions stored in the memory, so as to implement the method according to any one of claims 1 to 13.
  28. 一种计算机可读存储介质,其上存储有程序指令,所述程序指令被处理器执行时实现权利要求1至13任一项所述的方法。A computer-readable storage medium, on which program instructions are stored, and when the program instructions are executed by a processor, the method according to any one of claims 1 to 13 is realized.
  29. 一种计算机程序产品,包括计算机可读代码,当所述计算机可读代码在电子设备中运行时,所述电子设备中的处理器执行配置为实现权利要求1至13中任一项所述的方法。A computer program product, comprising computer readable code, when the computer readable code is run in an electronic device, the processor in the electronic device executes and is configured to implement the method described in any one of claims 1 to 13 method.
PCT/CN2022/111199 2021-10-29 2022-08-09 Virtual-real fusion method and apparatus, and device, storage medium and program product WO2023071381A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111272361.8A CN114092668A (en) 2021-10-29 2021-10-29 Virtual-real fusion method, device, equipment and storage medium
CN202111272361.8 2021-10-29

Publications (1)

Publication Number Publication Date
WO2023071381A1 true WO2023071381A1 (en) 2023-05-04

Family

ID=80298233

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/111199 WO2023071381A1 (en) 2021-10-29 2022-08-09 Virtual-real fusion method and apparatus, and device, storage medium and program product

Country Status (2)

Country Link
CN (1) CN114092668A (en)
WO (1) WO2023071381A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114092668A (en) * 2021-10-29 2022-02-25 深圳市慧鲤科技有限公司 Virtual-real fusion method, device, equipment and storage medium
CN115002345B (en) * 2022-05-13 2024-02-13 北京字节跳动网络技术有限公司 Image correction method, device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109671117A (en) * 2018-11-13 2019-04-23 宁波视睿迪光电有限公司 The space-location method and device of virtual reality interactive device
CN111880654A (en) * 2020-07-27 2020-11-03 歌尔光学科技有限公司 Image display method and device, wearable device and storage medium
CN112967405A (en) * 2021-03-23 2021-06-15 深圳市商汤科技有限公司 Pose updating method, device and equipment of virtual object and storage medium
WO2021203902A1 (en) * 2020-04-08 2021-10-14 Oppo广东移动通信有限公司 Virtual image realization method and apparatus, and storage medium and terminal device
CN114092668A (en) * 2021-10-29 2022-02-25 深圳市慧鲤科技有限公司 Virtual-real fusion method, device, equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109671117A (en) * 2018-11-13 2019-04-23 宁波视睿迪光电有限公司 The space-location method and device of virtual reality interactive device
WO2021203902A1 (en) * 2020-04-08 2021-10-14 Oppo广东移动通信有限公司 Virtual image realization method and apparatus, and storage medium and terminal device
CN111880654A (en) * 2020-07-27 2020-11-03 歌尔光学科技有限公司 Image display method and device, wearable device and storage medium
CN112967405A (en) * 2021-03-23 2021-06-15 深圳市商汤科技有限公司 Pose updating method, device and equipment of virtual object and storage medium
CN114092668A (en) * 2021-10-29 2022-02-25 深圳市慧鲤科技有限公司 Virtual-real fusion method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN114092668A (en) 2022-02-25

Similar Documents

Publication Publication Date Title
US11928838B2 (en) Calibration system and method to align a 3D virtual scene and a 3D real world for a stereoscopic head-mounted display
US20210131790A1 (en) Information processing apparatus, information processing method, and recording medium
WO2023071381A1 (en) Virtual-real fusion method and apparatus, and device, storage medium and program product
US8648879B2 (en) Apparatus and method for tracking augmented reality content
US9576183B2 (en) Fast initialization for monocular visual SLAM
CN107004275B (en) Method and system for determining spatial coordinates of a 3D reconstruction of at least a part of a physical object
US8878846B1 (en) Superimposing virtual views of 3D objects with live images
KR101554797B1 (en) Context aware augmentation interactions
US10733798B2 (en) In situ creation of planar natural feature targets
US10768711B2 (en) Mediated reality
US10838515B1 (en) Tracking using controller cameras
JP2018524657A (en) Managing feature data for environment mapping on electronic devices
JP2005256232A (en) Method, apparatus and program for displaying 3d data
KR20010055957A (en) Image Registration Method Using 3D Tracker And Computer Vision For Augmented Reality
CN112912936A (en) Mixed reality system, program, mobile terminal device, and method
US11758100B2 (en) Portable projection mapping device and projection mapping system
KR20100006736A (en) System and apparatus for implementing augmented reality, and method of implementing augmented reality using the said system or the said apparatus
Piérard et al. I-see-3d! an interactive and immersive system that dynamically adapts 2d projections to the location of a user's eyes
CN106384365B (en) Augmented reality system comprising depth information acquisition and method thereof
Ogawa et al. Occlusion Handling in Outdoor Augmented Reality using a Combination of Map Data and Instance Segmentation
CN113923437B (en) Information display method, processing device and display system thereof
WO2023048018A1 (en) Display device, method for controlling display device, and program
WO2024095744A1 (en) Information processing device, information processing method, and program
EP3847621A1 (en) Object tracking
Moemeni Hybrid Marker-Less Camera Pose Tracking with Integrated Sensor Fusion

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: 22885281

Country of ref document: EP

Kind code of ref document: A1