WO2019184889A1 - Method and apparatus for adjusting augmented reality model, storage medium, and electronic device - Google Patents

Method and apparatus for adjusting augmented reality model, storage medium, and electronic device Download PDF

Info

Publication number
WO2019184889A1
WO2019184889A1 PCT/CN2019/079588 CN2019079588W WO2019184889A1 WO 2019184889 A1 WO2019184889 A1 WO 2019184889A1 CN 2019079588 W CN2019079588 W CN 2019079588W WO 2019184889 A1 WO2019184889 A1 WO 2019184889A1
Authority
WO
WIPO (PCT)
Prior art keywords
augmented reality
virtual model
electronic device
reality virtual
positional relationship
Prior art date
Application number
PCT/CN2019/079588
Other languages
French (fr)
Chinese (zh)
Inventor
王健
谭筱
蓝和
邹奎
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2019184889A1 publication Critical patent/WO2019184889A1/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/011Arrangements for interaction with the human body, e.g. for user immersion in virtual reality

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Graphics (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Human Computer Interaction (AREA)
  • Processing Or Creating Images (AREA)

Abstract

Disclosed is a method for adjusting an augmented reality model, comprising: obtaining an image corresponding to a scene of an electronic device, and creating a spatial coordinate system according to the image; adding an augmented reality virtual model into the scene; obtaining a positional relationship between the augmented reality virtual model and the electronic device according to the spatial coordinate system; and adjusting the augmented reality virtual model according to the positional relationship. The present application also provides an apparatus for adjusting an augmented reality model, a storage medium, and an electronic device.

Description

增强现实模型的调整方法、装置、存储介质和电子设备Method, device, storage medium and electronic device for adjusting augmented reality model
本申请要求于2018年03月26日提交中国专利局、申请号为201810252914.5、申请名称为“增强现实模型的调整方法、装置、存储介质和电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed on March 26, 2018, the Chinese Patent Office, the application number is 201810252914.5, and the application name is "adjustment method, device, storage medium and electronic device of the augmented reality model". This is incorporated herein by reference.
技术领域Technical field
本申请涉及电子设备领域,具体涉及一种增强现实模型的调整方法、装置、存储介质和电子设备。The present application relates to the field of electronic devices, and in particular, to a method, an apparatus, a storage medium, and an electronic device for adjusting an augmented reality model.
背景技术Background technique
AR(Augmented Reality,增强现实)是一种将真实世界信息和虚拟世界信息“无缝”集成的新技术,是把原本在现实世界的一定时间空间范围内很难体验到的实体信息(视觉信息、声音、味道、触觉等)通过电脑等科学技术,模拟仿真后,把真实的环境和虚拟的物体实时地叠加到了同一个画面或空间同时存在,将虚拟的信息应用到真实世界,被人类感官所感知,从而达到超越现实的感官体验。增强现实技术,不仅展现了真实世界的信息,而且将虚拟的信息同时显示出来,两种信息充、叠加。AR (Augmented Reality) is a new technology that integrates real world information and virtual world information "seamlessly". It is an entity information (visual information) that is difficult to experience in a certain time and space of the real world. , sound, taste, touch, etc.) through computer and other scientific techniques, after simulation, the real environment and virtual objects are superimposed in real time on the same picture or space, and the virtual information is applied to the real world, being sensed by humans. Perceived to achieve a sensory experience that transcends reality. Augmented reality technology not only displays the information of the real world, but also displays the virtual information at the same time, and the two kinds of information are charged and superimposed.
申请内容Application content
本申请实施例提供一种增强现实模型的调整方法、装置、存储介质和电子设备,可以将增强现实虚拟模型与现实场景进行融合,并且能大幅提高融合的精确度。The embodiment of the present application provides an adjustment method, device, storage medium, and electronic device for an augmented reality model, which can fuse the augmented reality virtual model with a real scene, and can greatly improve the accuracy of the fusion.
第一方面,本申请实施例提供一种增强现实模型的调整方法,包括:In a first aspect, an embodiment of the present application provides an adjustment method of an augmented reality model, including:
获取电子设备当前所在场景对应的图像,并根据所述图像建立空间坐标系;Obtaining an image corresponding to the current scene of the electronic device, and establishing a spatial coordinate system according to the image;
在所述场景中添加增强现实虚拟模型;Adding an augmented reality virtual model to the scene;
根据所述空间坐标系获取所述增强现实虚拟模型与所述电子设备之间的位置关系;Acquiring a positional relationship between the augmented reality virtual model and the electronic device according to the space coordinate system;
根据所述位置关系对所述增强现实虚拟模型进行调整。The augmented reality virtual model is adjusted according to the positional relationship.
第二方面,本申请实施例还提供了一种增强现实模型的调整装置,包括:图像获取模块、添加模块、位置获取模块以及调整模块;In a second aspect, the embodiment of the present application further provides an apparatus for adjusting an augmented reality model, including: an image acquiring module, an adding module, a position acquiring module, and an adjusting module;
所述图像获取模块,用于获取电子设备当前所在场景对应的图像,并根据 所述图像建立空间坐标系;The image acquisition module is configured to acquire an image corresponding to a scene where the electronic device is currently located, and establish a spatial coordinate system according to the image;
所述添加模块,用于在所述场景中添加增强现实虚拟模型;The adding module is configured to add an augmented reality virtual model to the scene;
所述位置获取模块,用于根据所述空间坐标系获取所述增强现实虚拟模型与所述电子设备之间的位置关系;The location obtaining module is configured to acquire a positional relationship between the augmented reality virtual model and the electronic device according to the spatial coordinate system;
所述调整模块,用于根据所述位置关系对所述增强现实虚拟模型进行调整。The adjusting module is configured to adjust the augmented reality virtual model according to the positional relationship.
第三方面,本申请实施例还提供一种存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现上述增强现实模型的调整方法的步骤。In a third aspect, the embodiment of the present application further provides a storage medium, where a computer program is stored thereon, and the computer program is executed by the processor to implement the step of adjusting the augmented reality model.
第四方面,本申请实施例还提供一种电子设备,包括处理器和存储器,所述存储器存储有多条指令,所述处理器加载所述存储器中的指令用于执行以下步骤:In a fourth aspect, an embodiment of the present application further provides an electronic device, including a processor and a memory, where the memory stores a plurality of instructions, and the processor loads the instructions in the memory to perform the following steps:
获取电子设备当前所在场景对应的图像,并根据所述图像建立空间坐标系;Obtaining an image corresponding to the current scene of the electronic device, and establishing a spatial coordinate system according to the image;
在所述场景中添加增强现实虚拟模型;Adding an augmented reality virtual model to the scene;
根据所述空间坐标系获取所述增强现实虚拟模型与所述电子设备之间的位置关系;Acquiring a positional relationship between the augmented reality virtual model and the electronic device according to the space coordinate system;
根据所述位置关系对所述增强现实虚拟模型进行调整。The augmented reality virtual model is adjusted according to the positional relationship.
附图说明DRAWINGS
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings used in the description of the embodiments will be briefly described below. It is obvious that the drawings in the following description are only some embodiments of the present application. Other drawings can also be obtained from those skilled in the art based on these drawings without paying any creative effort.
图1为本申请实施例提供的增强现实模型的调整方法的一种流程示意图。FIG. 1 is a schematic flowchart of a method for adjusting an augmented reality model according to an embodiment of the present application.
图2为本申请实施例提供的一种选取增强现实虚拟模型的流程示意图。FIG. 2 is a schematic flowchart of selecting an augmented reality virtual model according to an embodiment of the present application.
图3为本申请实施例提供的增强现实模型的调整方法的另一种流程示意图。FIG. 3 is another schematic flowchart of a method for adjusting an augmented reality model according to an embodiment of the present application.
图4为本申请实施例提供的增强现实模型的调整装置的一种结构示意图。FIG. 4 is a schematic structural diagram of an apparatus for adjusting an augmented reality model according to an embodiment of the present application.
图5为本申请实施例提供的增强现实模型的调整装置的另一种结构示意图。FIG. 5 is another schematic structural diagram of an apparatus for adjusting an augmented reality model according to an embodiment of the present application.
图6为本申请实施例提供的电子设备的另一种结构示意图。FIG. 6 is another schematic structural diagram of an electronic device according to an embodiment of the present application.
图7为本申请实施例提供的电子设备的另一种结构示意图。FIG. 7 is another schematic structural diagram of an electronic device according to an embodiment of the present application.
具体实施方式detailed description
请参照图式,其中相同的组件符号代表相同的组件,本申请的原理是以实施在一适当的运算环境中来举例说明。以下的说明是基于所例示的本申请具体实施例,其不应被视为限制本申请未在此详述的其它具体实施例。Referring to the drawings, wherein like reference numerals represent the same components, the principles of the present application are illustrated by the implementation in a suitable computing environment. The following description is based on the specific embodiments of the present invention as illustrated, and should not be construed as limiting the specific embodiments that are not described herein.
在以下的说明中,本申请的具体实施例将参考由一部或多部计算机所执行的步骤及符号来说明,除非另有述明。因此,这些步骤及操作将有数次提到由计算机执行,本文所指的计算机执行包括了由代表了以一结构化型式中的数据的电子信号的计算机处理单元的操作。此操作转换该数据或将其维持在该计算机的内存系统中的位置处,其可重新配置或另外以本领域测试人员所熟知的方式来改变该计算机的运作。该数据所维持的数据结构为该内存的实体位置,其具有由该数据格式所定义的特定特性。但是,本申请原理以上述文字来说明,其并不代表为一种限制,本领域测试人员将可了解到以下所述的多种步骤及操作亦可实施在硬件当中。In the following description, specific embodiments of the present application will be described with reference to the steps and symbols executed by one or more computers, unless otherwise stated. Thus, these steps and operations will be referred to several times by a computer, and the computer execution referred to herein includes the operation of a computer processing unit that represents an electronic signal in data in a structured version. This operation converts the data or maintains it at a location in the computer's memory system, which can be reconfigured or otherwise altered in a manner well known to those skilled in the art. The data structure maintained by the data is the physical location of the memory, which has specific characteristics defined by the data format. However, the principles of the present application are described in the above text, which is not intended to be a limitation, and those skilled in the art will appreciate that the various steps and operations described below can also be implemented in hardware.
本申请的原理使用许多其它泛用性或特定目的运算、通信环境或组态来进行操作。所熟知的适合用于本申请的运算系统、环境与组态的范例可包括(但不限于)手持电话、个人计算机、服务器、多处理器系统、微电脑为主的系统、主架构型计算机、及分布式运算环境,其中包括了任何的上述系统或装置。The principles of the present application operate using many other general purpose or special purpose computing, communication environments, or configurations. Examples of well-known computing systems, environments, and configurations suitable for use in the present application may include, but are not limited to, hand-held phones, personal computers, servers, multi-processor systems, microcomputer-based systems, mainframe computers, and A distributed computing environment, including any of the above systems or devices.
以下将分别进行详细说明。The details will be described separately below.
本实施例将从增强现实模型的调整装置的角度进行描述,该装置具体可以集成在电子设备中,该电子设备可以为移动互连接网络设备(如智能手机、平板电脑)等具备网络功能的电子设备。The embodiment will be described from the perspective of an adjustment device of an augmented reality model, and the device may be integrated into an electronic device, and the electronic device may be a network-enabled electronic device such as a mobile internet device (such as a smart phone or a tablet computer). device.
本申请实施例提供一种增强现实模型的调整方法,包括:An embodiment of the present application provides an adjustment method of an augmented reality model, including:
获取电子设备当前所在场景对应的图像,并根据所述图像建立空间坐标系;Obtaining an image corresponding to the current scene of the electronic device, and establishing a spatial coordinate system according to the image;
在所述场景中添加增强现实虚拟模型;Adding an augmented reality virtual model to the scene;
根据所述空间坐标系获取所述增强现实虚拟模型与所述电子设备之间的位置关系;Acquiring a positional relationship between the augmented reality virtual model and the electronic device according to the space coordinate system;
根据所述位置关系对所述增强现实虚拟模型进行调整。The augmented reality virtual model is adjusted according to the positional relationship.
在一实施例中,所述位置关系包括距离;In an embodiment, the positional relationship includes a distance;
所述根据所述位置关系对所述增强现实虚拟模型进行调整,包括:And adjusting the augmented reality virtual model according to the location relationship, including:
根据所述增强现实虚拟模型与所述电子设备之间的距离,对所述增强现实 虚拟模型的尺寸进行调整。The size of the augmented reality virtual model is adjusted according to a distance between the augmented reality virtual model and the electronic device.
在一实施例中,所述位置关系包括相对角度;In an embodiment, the positional relationship includes a relative angle;
所述根据所述位置关系对所述增强现实虚拟模型进行调整,包括:And adjusting the augmented reality virtual model according to the location relationship, including:
根据所述增强现实虚拟模型与所述电子设备之间的相对角度,对所述增强现实虚拟模型的朝向进行调整。Adjusting the orientation of the augmented reality virtual model according to a relative angle between the augmented reality virtual model and the electronic device.
在一实施例中,所述在所述场景中添加增强现实虚拟模型,包括:In an embodiment, the adding an augmented reality virtual model in the scene includes:
获取所述场景中的目标对象,并根据所述目标对象生成对应的增强现实虚拟模型;Obtaining a target object in the scene, and generating a corresponding augmented reality virtual model according to the target object;
在所述空间坐标系中提取所述目标对象的坐标信息;Extracting coordinate information of the target object in the space coordinate system;
根据所述坐标信息添加所述增强现实虚拟模型。Adding the augmented reality virtual model according to the coordinate information.
在一实施例中,在根据所述位置关系对所述增强现实虚拟模型进行调整之后,所述方法还包括:In an embodiment, after the augmented reality virtual model is adjusted according to the location relationship, the method further includes:
将所述调整后的增强现实虚拟模型与所述场景进行深度融合;Deeply merging the adjusted augmented reality virtual model with the scene;
显示所述深度融合后的增强现实画面。The augmented reality picture after the depth blending is displayed.
在一实施例中,根据所述图像建立空间坐标系,包括:In an embodiment, establishing a spatial coordinate system according to the image comprises:
根据所述图像建立当前场景的三维模型;Establishing a three-dimensional model of the current scene according to the image;
在所述三维模型当中建立空间坐标系。A spatial coordinate system is established in the three-dimensional model.
在一实施例中,根据所述空间坐标系获取所述增强现实虚拟模型与所述电子设备之间的位置关系,包括:In an embodiment, acquiring a positional relationship between the augmented reality virtual model and the electronic device according to the spatial coordinate system, including:
在所述空间坐标系当中获取所述增强现实虚拟模型的第一坐标信息;Obtaining first coordinate information of the augmented reality virtual model in the space coordinate system;
根据所述图像获取所述电子设备的拍摄姿态信息,并根据所述拍摄姿态信息计算所述电子设备在所述空间坐标系当中的第二坐标信息;Acquiring the shooting posture information of the electronic device according to the image, and calculating second coordinate information of the electronic device in the space coordinate system according to the shooting posture information;
根据所述第一坐标信息和第二坐标信息生成所述增强现实虚拟模型与所述电子设备之间的位置关系。And generating a positional relationship between the augmented reality virtual model and the electronic device according to the first coordinate information and the second coordinate information.
首先参考图1,图1为本申请实施例提供的增强现实模型的调整方法的一种流程示意图,包括以下步骤:Referring first to FIG. 1 , FIG. 1 is a schematic flowchart of a method for adjusting an augmented reality model according to an embodiment of the present application, including the following steps:
步骤S101,获取电子设备当前所在场景对应的图像,并根据图像建立空间坐标系。Step S101: Acquire an image corresponding to a scene where the electronic device is currently located, and establish a spatial coordinate system according to the image.
在一实施例中,可以通过摄像头对当前场景进行图像采集,以获取场景图 像。其中,上述场景中可以包括人物、动物或是风景等用户想要拍摄的场景。In an embodiment, the current scene may be image captured by the camera to acquire a scene image. The above scene may include a scene that a user, an animal, or a landscape wants to capture.
在本实施例当中,摄像头针对当前场景拍摄的画面,获取该图片。其中,该图片的格式可以为Bmp、jpg或其他格式。In this embodiment, the camera acquires the picture for the picture taken by the current scene. The format of the image can be Bmp, jpg or other formats.
进一步的,可以在获取场景图像之后,还可以对该图像进行预处理,该预处理可以包括降噪处理和平滑处理。Further, after acquiring the scene image, the image may also be pre-processed, and the pre-processing may include noise reduction processing and smoothing processing.
在一实施例当中,在获取当前场景对应的场景图像之后,还可以根据场景图像建立当前场景的三维模型。建模的基本流程可以为:数据获取与处理(实训场地数据、设备尺寸数据等)、专业三维软件建模(如:用Pro/E、3DMax建模)、可视化编辑软件修正(如:用Cosmo Wrolds修正误差、添加材质和交互)、文本编辑软件完善(如:用Vrmlpad优化结构、减少代码、压缩文件)等阶段。In an embodiment, after acquiring the scene image corresponding to the current scene, the three-dimensional model of the current scene may also be established according to the scene image. The basic process of modeling can be: data acquisition and processing (training site data, device size data, etc.), professional 3D software modeling (such as: Pro/E, 3DMax modeling), visual editing software correction (such as: Cosmo Wrolds corrects errors, adds materials and interactions, and text editing software is perfect (eg, using Vrmlpad to optimize structure, reduce code, compress files).
在一实施例中,在建立三维模型后,可以对该三维模型进行图像渲染,通过图像渲染最终使图像符合3D场景的阶段。渲染有多种软件,如:各CG软件自带渲染引擎,还有诸如RenderMan等。得到三维场景图像,然后将该三维场景图像投射至增强现实设备的显示屏,用户可以通过观看增强现实设备的显示屏对三维场景图像进行查看。In an embodiment, after the three-dimensional model is established, the three-dimensional model may be image-rendered, and the image is finally rendered to conform to the stage of the 3D scene. Rendering has a variety of software, such as: each CG software comes with a rendering engine, as well as such as RenderMan. A three-dimensional scene image is obtained, and then the three-dimensional scene image is projected onto a display screen of the augmented reality device, and the user can view the three-dimensional scene image by watching the display screen of the augmented reality device.
在建立当前场景的三维模型后,可以在该三维模型中建立空间坐标系,比如利用Marker-less技术确定初始坐标平面,并初始化具有真实尺度的坐标系。After establishing the three-dimensional model of the current scene, a spatial coordinate system can be established in the three-dimensional model, for example, using the Marker-less technique to determine the initial coordinate plane, and initializing the coordinate system with the true scale.
步骤S102,在场景中添加增强现实虚拟模型。Step S102, adding an augmented reality virtual model to the scene.
在一实施例中,电子设备可以根据当前场景生成对应的增强现实虚拟模型,从而基于增强现实技术将获取的虚拟模型与所识别到的真实场景进行结合,生成增强现实的场景画面。可选的,上述增强现实虚拟模型也可以由用户自行选择,如图2所示,在电子设备获取到当前场景后,根据场景自动推荐预设个数的虚拟模型可供用户选择,用户可以通过点击的方式选取目标虚拟模型,并在场景中添加该增强现实虚拟模型。In an embodiment, the electronic device may generate a corresponding augmented reality virtual model according to the current scene, so as to combine the acquired virtual model with the recognized real scene based on the augmented reality technology to generate a scene image of the augmented reality. Optionally, the augmented reality virtual model may also be selected by the user. As shown in FIG. 2, after the electronic device acquires the current scene, the preset virtual number is automatically recommended according to the scenario, and the user can pass the user. Click the way to select the target virtual model and add the augmented reality virtual model to the scene.
其中,上述增强现实虚拟模型可以有多种表现形式,比如文字、图像或者视频等等,因此也可以将各种不同类型的虚拟模型有序地与所识别到的真实场景进行结合,以得到增强现实的场景画面。比如,首先可将增强现实虚拟模型以文字的形式叠加于真实场景中,并投射于电子设备的显示屏中进行展示。然后,可将增强现实虚拟模型的图像信息结合音频信息叠加于真实场景中,并投 射于电子设备的显示屏中进行展示,同时可通过电子设备的扬声器发声以实现音频信息的播放。The augmented reality virtual model may have multiple expressions, such as text, image or video, etc., so that various types of virtual models may be combined with the recognized real scenes in order to be enhanced. Realistic scene picture. For example, the augmented reality virtual model can be superimposed in the real scene in the form of text and projected on the display screen of the electronic device for display. Then, the image information of the augmented reality virtual model can be superimposed on the real scene in combination with the audio information, and projected on the display screen of the electronic device for display, and the audio information can be played through the speaker of the electronic device.
在一实施例中,将虚拟模型与真实场景融合需要将计算机产生的虚拟模型与使用者的真实环境全方位对准。由于应用增强现实的目的是使虚拟环境与真实环境合成起来,使它们看起来象一个整体。如果没有准确的匹配,虚拟模型看起来会漂浮在真实环境之上,因此准确的三维匹配对AR至关重要。In one embodiment, merging the virtual model with the real scene requires omnidirectional alignment of the computer generated virtual model with the user's real environment. The purpose of applying augmented reality is to combine virtual environments with real environments to make them look like a whole. If there is no exact match, the virtual model will appear to float above the real environment, so accurate 3D matching is critical for AR.
上述三维匹配可以包含多种方法,比如:基准点法、基于表面法、模板法、无定标发等等。以基准点法为例对本发明实施例进行说明,该法是在真实环境中人为放置一些基准点,根据基准点匹配的方法实现系统的三维匹配。这些基准点可以是LED或是特定的标志点,它们在真实环境中的位置已知,可以通过图像处理来识别,之后经计算得到不同空间的变换矩阵,最后用最小二乘法完成匹配。这种方法可简化计算量,而且准确性好。The above three-dimensional matching may include various methods such as a reference point method, a surface based method, a template method, an indefinite standard, and the like. The reference point method is taken as an example to describe the embodiment of the present invention. The method is to manually place some reference points in a real environment, and implement three-dimensional matching of the system according to the method of matching the reference points. These reference points can be LEDs or specific landmarks. Their position in the real environment is known, can be identified by image processing, and then the transformation matrix of different spaces is calculated, and finally the matching is done by least squares method. This method simplifies the calculation and is accurate.
步骤S103,根据空间坐标系获取增强现实虚拟模型与电子设备之间的位置关系。Step S103: Acquire a positional relationship between the augmented reality virtual model and the electronic device according to the spatial coordinate system.
在一实施例中,可以在当前场景的空间坐标系当中直接获取上述增强现实虚拟模型的坐标信息。进一步的由于在当前场景中不存在电子设备的本体,因此获取电子设备的坐标信息则需要通过计算,比如,根据拍摄当前场景的图像获取电子设备的拍摄姿态信息,该拍摄姿态信息可以包括拍摄的高度和方向信息,然后根据该拍摄姿态信息计算电子设备在当前场景中对应的坐标系中的坐标信息。In an embodiment, the coordinate information of the augmented reality virtual model may be directly acquired in a spatial coordinate system of the current scene. Further, since the body of the electronic device does not exist in the current scene, acquiring the coordinate information of the electronic device requires calculation, for example, acquiring the shooting posture information of the electronic device according to the image capturing the current scene, and the shooting posture information may include shooting. Height and direction information, and then calculating coordinate information in the coordinate system corresponding to the electronic device in the current scene according to the shooting posture information.
在一实施例中,上述获取增强现实虚拟模型与电子设备之间的位置关系还可以通过获取虚拟模型的景深信息的方式获取,比如,在当前场景中添加增强现实虚拟模型后,确定场景当中添加该虚拟模型的位置,然后通过电子设备中的景深摄像头来获取该位置与电子设备之间的位置关系。其中,上述位置信息可以包括距离信息和相对角度信息。In an embodiment, the obtaining the positional relationship between the augmented reality virtual model and the electronic device may also be obtained by acquiring the depth information of the virtual model. For example, after adding the augmented reality virtual model to the current scene, determining to add the scene to the scene The location of the virtual model is then obtained by a depth of field camera in the electronic device to obtain a positional relationship between the location and the electronic device. The location information may include distance information and relative angle information.
步骤S104,根据位置关系对增强现实虚拟模型进行调整。Step S104, adjusting the augmented reality virtual model according to the positional relationship.
在一实施例中,上述位置关系可以包括增强现实虚拟模型与电子设备之间的距离。因为在现有技术当中,上述虚拟模型往往不会随着与电子设备之间的距离的变化而变化,降低了真实性。因此本实施例可以根据增强现实虚拟模型 与电子设备之间的距离改变虚拟模型的大小,也即上述根据位置关系对所述增强现实虚拟模型进行调整的步骤可以包括:In an embodiment, the location relationship may include a distance between the augmented reality virtual model and the electronic device. Because in the prior art, the above virtual model often does not change with the distance from the electronic device, which reduces the authenticity. Therefore, the embodiment may change the size of the virtual model according to the distance between the augmented reality virtual model and the electronic device, that is, the step of adjusting the augmented reality virtual model according to the positional relationship may include:
根据增强现实虚拟模型与电子设备之间的距离,对增强现实虚拟模型的尺寸进行调整。The size of the augmented reality virtual model is adjusted according to the distance between the augmented reality virtual model and the electronic device.
在一实施例中,上述位置关系还可以包括增强现实虚拟模型与电子设备之间的相对角度。考虑到虚拟模型在电子设备的不同位置时会呈现出不同的方式,因此本实施例还可以对虚拟模型的朝向进行调整。如卡通人物模型等,可以使该虚拟人物始终保持面向电子设备,提高趣味性和真实性。也即,上述根据位置关系对所述增强现实虚拟模型进行调整的步骤还可以包括:In an embodiment, the positional relationship may further include a relative angle between the augmented reality virtual model and the electronic device. In this embodiment, the orientation of the virtual model can also be adjusted in consideration of the fact that the virtual model presents different ways in different positions of the electronic device. Such as cartoon character models, etc., can make the virtual character always face the electronic device, improving the fun and authenticity. That is, the step of adjusting the augmented reality virtual model according to the positional relationship may further include:
根据增强现实虚拟模型与电子设备之间的相对角度,对增强现实虚拟模型的朝向进行调整。The orientation of the augmented reality virtual model is adjusted according to the relative angle between the augmented reality virtual model and the electronic device.
本发明实施例中,上述电子设备可以是任何具有拍摄功能的设备,例如:手机、平板电脑(Tablet Personal Computer)、膝上型电脑(Laptop Computer)、个人数字助理(personal digital assistant,简称PDA)、移动上网装置(Mobile Internet Device,MID)或可穿戴式设备(Wearable Device)等。In the embodiment of the present invention, the electronic device may be any device having a shooting function, such as a mobile phone, a tablet personal computer, a laptop computer, and a personal digital assistant (PDA). , Mobile Internet Device (MID) or Wearable Device.
由上可知,本申请实施例可以获取电子设备当前所在场景对应的图像,并根据图像建立空间坐标系,在场景中添加增强现实虚拟模型,根据空间坐标系获取增强现实虚拟模型与电子设备之间的位置关系,根据位置关系对增强现实虚拟模型进行调整。本申请可以将增强现实虚拟模型与现实场景进行融合,并且根据位置关系对增强现实虚拟模型进行调整,从而大幅提高融合的精确度。It can be seen that the embodiment of the present application can acquire an image corresponding to the current scene of the electronic device, and establish a spatial coordinate system according to the image, add an augmented reality virtual model to the scene, and obtain an augmented reality virtual model and the electronic device according to the spatial coordinate system. The positional relationship adjusts the augmented reality virtual model according to the positional relationship. The application can fuse the augmented reality virtual model with the real scene, and adjust the augmented reality virtual model according to the positional relationship, thereby greatly improving the accuracy of the fusion.
根据上一实施例的描述,以下将进一步地来说明本申请的增强现实模型的调整方法。According to the description of the previous embodiment, the adjustment method of the augmented reality model of the present application will be further explained below.
请参阅图3,图3为本申请实施例提供的另一种增强现实模型的调整方法的流程示意图,包括以下步骤:Referring to FIG. 3, FIG. 3 is a schematic flowchart of another method for adjusting an augmented reality model according to an embodiment of the present application, including the following steps:
步骤S201,获取电子设备当前所在场景对应的图像,并根据图像建立空间坐标系。Step S201: Acquire an image corresponding to the current scene of the electronic device, and establish a spatial coordinate system according to the image.
在一实施例中,可以通过摄像头对当前场景进行图像采集,以获取场景图像。其中,上述场景中可以包括人物、动物或是风景等用户想要拍摄的场景。In an embodiment, the current scene may be image-collected by the camera to acquire a scene image. The above scene may include a scene that a user, an animal, or a landscape wants to capture.
进一步的,在建立当前场景的三维模型后,可以在该三维模型中建立空间 坐标系,比如利用Marker-less技术确定初始坐标平面,并初始化具有真实尺度的坐标系。Further, after establishing the three-dimensional model of the current scene, a spatial coordinate system can be established in the three-dimensional model, for example, using the Marker-less technique to determine the initial coordinate plane, and initializing the coordinate system with the true scale.
步骤S202,获取场景中的目标对象,并根据目标对象生成对应的增强现实虚拟模型。Step S202: Acquire a target object in the scene, and generate a corresponding augmented reality virtual model according to the target object.
其中,上述场景中的目标对象可以由电子设备自动选取也可以由用户手动选取,比如,用户可以在取景框中对当前场景的画面中的对象进行点击,从而确定目标对象。The target object in the above scenario may be automatically selected by the electronic device or manually selected by the user. For example, the user may click on the object in the current scene in the finder frame to determine the target object.
在确定目标对象之后,生成该目标对象对应的增强现实虚拟模型,其中,该增强现实虚拟模型中可包含有多种不同类型的虚拟模型,比如文字信息、图像信息和/或音频信息等。After the target object is determined, an augmented reality virtual model corresponding to the target object is generated, wherein the augmented reality virtual model may include a plurality of different types of virtual models, such as text information, image information, and/or audio information.
步骤S203,在空间坐标系中提取目标对象的坐标信息。Step S203, extracting coordinate information of the target object in the space coordinate system.
步骤S204,根据坐标信息添加增强现实虚拟模型。Step S204, adding an augmented reality virtual model according to the coordinate information.
在一实施例中,可以根据增强现实虚拟模型的不同类型,有序地将同一类型虚拟模型中的不同虚拟模型依次与当前场景进行结合,同时将相应的其他类型的虚拟模型进行叠加一同展示,以生成增强现实的场景画面。In an embodiment, different virtual models in the same type of virtual model may be sequentially combined with the current scene according to different types of the augmented reality virtual model, and the corresponding other types of virtual models are superimposed and displayed together. To generate augmented reality scenes.
比如,首先可将虚拟模型以文字的形式叠加于真实场景中,并投射于增强现实设备的显示屏中进行展示。然后,可将虚拟模型的图像信息结合音频信息叠加于真实场景中,并投射于增强现实设备的显示屏中进行展示,同时可通过增强现实设备的扬声器发声以实现音频信息的播放;其中,图像信息可以为虚拟三维图像,并将其与真实场景契合,实现无缝显示,同时将文字信息以半透明的方式显示于虚拟三维图像与真实场景交接处的旁边,以进行相关说明。最后,以文字信息、图像信息结合音频信息的方式,将虚拟模型内容投射于增强现实设备的显示屏中进行展示。For example, the virtual model can be superimposed in the real scene in the form of text and projected onto the display screen of the augmented reality device for display. Then, the image information of the virtual model may be superimposed on the real scene in combination with the audio information, and projected on the display screen of the augmented reality device for display, and the audio information may be played by the speaker of the augmented reality device; wherein the image The information can be a virtual three-dimensional image and fits it with the real scene to achieve seamless display, and the text information is displayed in a semi-transparent manner next to the intersection of the virtual three-dimensional image and the real scene for related description. Finally, the virtual model content is projected onto the display screen of the augmented reality device by means of text information, image information and audio information.
步骤S205,根据空间坐标系获取增强现实虚拟模型与电子设备之间的位置关系。Step S205: Acquire a positional relationship between the augmented reality virtual model and the electronic device according to the spatial coordinate system.
在一实施例中,可以在当前场景的空间坐标系当中直接获取上述增强现实虚拟模型的坐标信息。进一步的由于在当前场景中不存在电子设备的本体,因此获取电子设备的坐标信息则需要通过计算,比如,根据拍摄当前场景的图像获取电子设备的拍摄姿态信息,该拍摄姿态信息可以包括拍摄的高度和方向信 息,然后根据该拍摄姿态信息计算电子设备在当前场景中对应的坐标系中的坐标信息。In an embodiment, the coordinate information of the augmented reality virtual model may be directly acquired in a spatial coordinate system of the current scene. Further, since the body of the electronic device does not exist in the current scene, acquiring the coordinate information of the electronic device requires calculation, for example, acquiring the shooting posture information of the electronic device according to the image capturing the current scene, and the shooting posture information may include shooting. Height and direction information, and then calculating coordinate information in the coordinate system corresponding to the electronic device in the current scene according to the shooting posture information.
步骤S206,根据位置关系对增强现实虚拟模型进行调整。Step S206, adjusting the augmented reality virtual model according to the positional relationship.
在一实施例中,上述位置关系可以包括增强现实虚拟模型与电子设备之间的距离,因此本实施例可以根据增强现实虚拟模型与电子设备之间的距离改变虚拟模型的大小。In an embodiment, the location relationship may include a distance between the augmented reality virtual model and the electronic device, so the embodiment may change the size of the virtual model according to the distance between the augmented reality virtual model and the electronic device.
在一实施例中,上述位置关系还可以包括增强现实虚拟模型与电子设备之间的相对角度,因此本实施例可以根据增强现实虚拟模型与电子设备之间的相对角度,对增强现实虚拟模型的朝向进行调整。In an embodiment, the positional relationship may further include a relative angle between the augmented reality virtual model and the electronic device. Therefore, the embodiment may be based on the relative angle between the augmented reality virtual model and the electronic device, and the augmented reality virtual model. Adjust towards orientation.
步骤S207,将调整后的增强现实虚拟模型与场景进行深度融合。Step S207, deeply integrating the adjusted augmented reality virtual model with the scene.
可选的,本实施例还可以利用深度相机,获取场景深度数据,然后根据三维引擎中获得的虚拟物体距离数据进行深度融合,从而达到遮挡的效果,让真实的物体和虚拟模型直接具有很强的交互感。本申请具有很强的鲁棒性、实现真实物体和虚拟数据能够遮挡交互。Optionally, the embodiment may further obtain depth depth data by using a depth camera, and then perform depth fusion according to the virtual object distance data obtained in the three-dimensional engine, thereby achieving an occlusion effect, so that the real object and the virtual model are directly strong. The sense of interaction. The application is robust and enables real objects and virtual data to occlude interactions.
步骤S208,显示深度融合后的增强现实画面。Step S208, displaying the augmented reality picture after the depth fusion.
本发明实施例中,上述电子设备可以是任何能够进行拍摄的设备,例如:手机、平板电脑(Tablet Personal Computer)、膝上型电脑(Laptop Computer)、个人数字助理(personal digital assistant,简称PDA)、移动上网装置(Mobile Internet Device,MID)或可穿戴式设备(Wearable Device)等。In the embodiment of the present invention, the electronic device may be any device capable of shooting, such as a mobile phone, a tablet personal computer, a laptop computer, or a personal digital assistant (PDA). , Mobile Internet Device (MID) or Wearable Device.
由上可知,本申请实施例可以获取电子设备当前所在场景对应的图像,并根据图像建立空间坐标系,获取场景中的目标对象,并根据目标对象生成对应的增强现实虚拟模型,在空间坐标系中提取目标对象的坐标信息,根据坐标信息添加增强现实虚拟模型,根据空间坐标系获取增强现实虚拟模型与电子设备之间的位置关系,根据位置关系对增强现实虚拟模型进行调整,将调整后的增强现实虚拟模型与场景进行深度融合,显示深度融合后的增强现实画面。本申请实施例可以将增强现实虚拟模型与现实场景进行融合,并且根据位置关系对增强现实虚拟模型进行调整,从而大幅提高融合的精确度。It can be seen that the embodiment of the present application can acquire an image corresponding to the current scene of the electronic device, and establish a spatial coordinate system according to the image, acquire a target object in the scene, and generate a corresponding augmented reality virtual model according to the target object, in the space coordinate system. The coordinate information of the target object is extracted, the augmented reality virtual model is added according to the coordinate information, the positional relationship between the augmented reality virtual model and the electronic device is obtained according to the spatial coordinate system, and the augmented reality virtual model is adjusted according to the positional relationship, and the adjusted The augmented reality virtual model is deeply integrated with the scene to display the augmented reality picture after deep fusion. The embodiment of the present application can fuse the augmented reality virtual model with the real scene, and adjust the augmented reality virtual model according to the positional relationship, thereby greatly improving the accuracy of the fusion.
为了便于更好的实施本申请实施例提供的增强现实模型的调整方法,本申请实施例还提供了一种基于上述增强现实模型的调整方法的装置。其中名词的 含义与上述增强现实模型的调整方法中相同,具体实现细节可以参考方法实施例中的说明。In order to facilitate the implementation of the method for adjusting the augmented reality model provided by the embodiment of the present application, the embodiment of the present application further provides an apparatus for adjusting the method based on the augmented reality model described above. The meaning of the noun is the same as that of the augmented reality model described above. For specific implementation details, refer to the description in the method embodiment.
请参阅图4,图4为本申请实施例提供的一种增强现实模型的调整装置的结构示意图,该增强现实模型的调整装置30包括:图像获取模块301、添加模块302、位置获取模块303以及调整模块304;Referring to FIG. 4 , FIG. 4 is a schematic structural diagram of an apparatus for adjusting an augmented reality model according to an embodiment of the present disclosure. The apparatus for adjusting the augmented reality model includes: an image acquiring module 301, an adding module 302, and a location acquiring module 303. Adjustment module 304;
该图像获取模块301,用于获取电子设备当前所在场景对应的图像,并根据图像建立空间坐标系;The image obtaining module 301 is configured to acquire an image corresponding to a scene where the electronic device is currently located, and establish a spatial coordinate system according to the image;
该添加模块302,用于在场景中添加增强现实虚拟模型;The adding module 302 is configured to add an augmented reality virtual model to the scene;
该位置获取模块303,用于根据空间坐标系获取增强现实虚拟模型与电子设备之间的位置关系;The location obtaining module 303 is configured to acquire a positional relationship between the augmented reality virtual model and the electronic device according to the spatial coordinate system;
该调整模块304,用于根据位置关系对增强现实虚拟模型进行调整。The adjustment module 304 is configured to adjust the augmented reality virtual model according to the positional relationship.
在一实施例中,所述位置关系包括距离;In an embodiment, the positional relationship includes a distance;
所述调整模块,具体用于根据所述增强现实虚拟模型与所述电子设备之间的距离,对所述增强现实虚拟模型的尺寸进行调整。The adjusting module is specifically configured to adjust a size of the augmented reality virtual model according to a distance between the augmented reality virtual model and the electronic device.
在一实施例中,所述位置关系包括相对角度;In an embodiment, the positional relationship includes a relative angle;
所述调整模块,具体用于根据所述增强现实虚拟模型与所述电子设备之间的相对角度,对所述增强现实虚拟模型的朝向进行调整。The adjusting module is specifically configured to adjust an orientation of the augmented reality virtual model according to a relative angle between the augmented reality virtual model and the electronic device.
在一实施例中,如图5所示,添加模块302可以具体包括:获取子模块3021、提取子模块3022以及添加子模块3023;In an embodiment, as shown in FIG. 5, the adding module 302 may specifically include: an obtaining submodule 3021, an extracting submodule 3022, and an adding submodule 3023;
该获取子模块3021,用于获取场景中的目标对象,并根据目标对象生成对应的增强现实虚拟模型;The acquiring sub-module 3021 is configured to acquire a target object in the scene, and generate a corresponding augmented reality virtual model according to the target object;
该提取子模块3022,用于在空间坐标系中提取目标对象的坐标信息;The extraction submodule 3022 is configured to extract coordinate information of the target object in a spatial coordinate system;
该添加子模块3023,用于根据坐标信息添加增强现实虚拟模型。The adding submodule 3023 is configured to add an augmented reality virtual model according to the coordinate information.
在一实施例中,增强现实模型的调整装置30还可以包括:融合模块305和显示模块306;In an embodiment, the augmented reality model adjustment device 30 may further include: a fusion module 305 and a display module 306;
该融合模块305,用于将调整后的增强现实虚拟模型与场景进行深度融合;The fusion module 305 is configured to deeply integrate the adjusted augmented reality virtual model with the scene;
该显示模块306,用于显示深度融合后的增强现实画面。The display module 306 is configured to display the augmented reality picture after the depth fusion.
由上可知,本申请实施例提供的增强现实模型的调整装置30可以获取电子设备当前所在场景对应的图像,并根据图像建立空间坐标系,在场景中添加增 强现实虚拟模型,根据空间坐标系获取增强现实虚拟模型与电子设备之间的位置关系,根据位置关系对增强现实虚拟模型进行调整。本申请可以将增强现实虚拟模型与现实场景进行融合,并且根据位置关系对增强现实虚拟模型进行调整,从而大幅提高融合的精确度。It can be seen that the adjusting device 30 of the augmented reality model provided by the embodiment of the present application can acquire an image corresponding to the current scene of the electronic device, and establish a spatial coordinate system according to the image, add an augmented reality virtual model to the scene, and obtain according to the spatial coordinate system. The positional relationship between the augmented reality virtual model and the electronic device is adjusted, and the augmented reality virtual model is adjusted according to the positional relationship. The application can fuse the augmented reality virtual model with the real scene, and adjust the augmented reality virtual model according to the positional relationship, thereby greatly improving the accuracy of the fusion.
本申请还提供一种存储介质,其上存储有计算机程序,其中,所述计算机程序被处理器执行时实现方法实施例提供的增强现实模型的调整方法。The application further provides a storage medium on which a computer program is stored, wherein the computer program is executed by the processor to implement an adjustment method of the augmented reality model provided by the method embodiment.
本申请还提供一种电子设备,包括存储器,处理器及存储在存储器上并可在处理器上运行的计算机程序,其中,所述处理器加载所述存储器中的指令用于执行以下步骤:The application further provides an electronic device comprising a memory, a processor and a computer program stored on the memory and operable on the processor, wherein the processor loads instructions in the memory for performing the following steps:
获取电子设备当前所在场景对应的图像,并根据所述图像建立空间坐标系;Obtaining an image corresponding to the current scene of the electronic device, and establishing a spatial coordinate system according to the image;
在所述场景中添加增强现实虚拟模型;Adding an augmented reality virtual model to the scene;
根据所述空间坐标系获取所述增强现实虚拟模型与所述电子设备之间的位置关系;Acquiring a positional relationship between the augmented reality virtual model and the electronic device according to the space coordinate system;
根据所述位置关系对所述增强现实虚拟模型进行调整。The augmented reality virtual model is adjusted according to the positional relationship.
在一实施例中,所述位置关系包括距离,所述根据所述位置关系对所述增强现实虚拟模型进行调整时,所述处理器用于执行以下步骤:In an embodiment, the positional relationship includes a distance, and when the augmented reality virtual model is adjusted according to the positional relationship, the processor is configured to perform the following steps:
根据所述增强现实虚拟模型与所述电子设备之间的距离,对所述增强现实虚拟模型的尺寸进行调整。And adjusting a size of the augmented reality virtual model according to a distance between the augmented reality virtual model and the electronic device.
在一实施例中,所述位置关系包括相对角度,所述根据所述位置关系对所述增强现实虚拟模型进行调整时,所述处理器用于执行以下步骤:In an embodiment, the positional relationship includes a relative angle, and when the augmented reality virtual model is adjusted according to the positional relationship, the processor is configured to perform the following steps:
根据所述增强现实虚拟模型与所述电子设备之间的相对角度,对所述增强现实虚拟模型的朝向进行调整。Adjusting the orientation of the augmented reality virtual model according to a relative angle between the augmented reality virtual model and the electronic device.
在一实施例中,所述在所述场景中添加增强现实虚拟模型时,所述处理器用于执行以下步骤:In an embodiment, when the augmented reality virtual model is added to the scene, the processor is configured to perform the following steps:
获取所述场景中的目标对象,并根据所述目标对象生成对应的增强现实虚拟模型;Obtaining a target object in the scene, and generating a corresponding augmented reality virtual model according to the target object;
在所述空间坐标系中提取所述目标对象的坐标信息;Extracting coordinate information of the target object in the space coordinate system;
根据所述坐标信息添加所述增强现实虚拟模型。Adding the augmented reality virtual model according to the coordinate information.
在一实施例中,在根据所述位置关系对所述增强现实虚拟模型进行调整之 后,所述处理器还用于执行以下步骤:In an embodiment, after adjusting the augmented reality virtual model according to the positional relationship, the processor is further configured to perform the following steps:
将所述调整后的增强现实虚拟模型与所述场景进行深度融合;Deeply merging the adjusted augmented reality virtual model with the scene;
显示所述深度融合后的增强现实画面。The augmented reality picture after the depth blending is displayed.
在一实施例中,根据所述图像建立空间坐标系时,所述处理器用于执行以下步骤:In an embodiment, when the spatial coordinate system is established according to the image, the processor is configured to perform the following steps:
根据所述图像建立当前场景的三维模型;Establishing a three-dimensional model of the current scene according to the image;
在所述三维模型当中建立空间坐标系。A spatial coordinate system is established in the three-dimensional model.
在一实施例中,根据所述空间坐标系获取所述增强现实虚拟模型与所述电子设备之间的位置关系时,所述处理器用于执行以下步骤:In an embodiment, when acquiring the positional relationship between the augmented reality virtual model and the electronic device according to the spatial coordinate system, the processor is configured to perform the following steps:
在所述空间坐标系当中获取所述增强现实虚拟模型的第一坐标信息;Obtaining first coordinate information of the augmented reality virtual model in the space coordinate system;
根据所述图像获取所述电子设备的拍摄姿态信息,并根据所述拍摄姿态信息计算所述电子设备在所述空间坐标系当中的第二坐标信息;Acquiring the shooting posture information of the electronic device according to the image, and calculating second coordinate information of the electronic device in the space coordinate system according to the shooting posture information;
根据所述第一坐标信息和第二坐标信息生成所述增强现实虚拟模型与所述电子设备之间的位置关系。And generating a positional relationship between the augmented reality virtual model and the electronic device according to the first coordinate information and the second coordinate information.
在本申请又一实施例中还提供一种电子设备,该电子设备可以是智能手机、平板电脑等设备。如图6所示,电子设备400包括处理器401、存储器402。其中,处理器401与存储器402电性连接。In another embodiment of the present application, an electronic device is further provided, and the electronic device may be a device such as a smart phone or a tablet computer. As shown in FIG. 6, the electronic device 400 includes a processor 401 and a memory 402. The processor 401 is electrically connected to the memory 402.
处理器401是电子设备400的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或加载存储在存储器402内的应用程序,以及调用存储在存储器402内的数据,执行电子设备的各种功能和处理数据,从而对电子设备进行整体监控。The processor 401 is a control center of the electronic device 400, which connects various parts of the entire electronic device using various interfaces and lines, executes the electronic by running or loading an application stored in the memory 402, and calling data stored in the memory 402. The various functions and processing data of the device enable overall monitoring of the electronic device.
在本实施例中,电子设备400中的处理器401会按照如下的步骤,将一个或一个以上的应用程序的进程对应的指令加载到存储器402中,并由处理器401来运行存储在存储器402中的应用程序,从而实现各种功能:In this embodiment, the processor 401 in the electronic device 400 loads the instructions corresponding to the process of one or more applications into the memory 402 according to the following steps, and is stored and stored in the memory 402 by the processor 401. In the application, thus implementing various functions:
获取电子设备当前所在场景对应的图像,并根据所述图像建立空间坐标系;Obtaining an image corresponding to the current scene of the electronic device, and establishing a spatial coordinate system according to the image;
在所述场景中添加增强现实虚拟模型;Adding an augmented reality virtual model to the scene;
根据所述空间坐标系获取所述增强现实虚拟模型与所述电子设备之间的位置关系;Acquiring a positional relationship between the augmented reality virtual model and the electronic device according to the space coordinate system;
根据所述位置关系对所述增强现实虚拟模型进行调整。The augmented reality virtual model is adjusted according to the positional relationship.
请参阅图7,图7为本申请实施例提供的电子设备结构示意图。该电子设备500可以包括射频(RF,Radio Frequency)电路501、包括有一个或一个以上计算机可读存储介质的存储器502、输入单元503、显示单元504、传感器504、音频电路506、无线保真(WiFi,Wireless Fidelity)模块507、包括有一个或者一个以上处理核心的处理器508、以及电源509等部件。本领域技术人员可以理解,图7中示出的电子设备结构并不构成对电子设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Please refer to FIG. 7. FIG. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application. The electronic device 500 can include a radio frequency (RF) circuit 501, a memory 502 including one or more computer readable storage media, an input unit 503, a display unit 504, a sensor 504, an audio circuit 506, and wireless fidelity ( WiFi, Wireless Fidelity module 507, processor 508 including one or more processing cores, and power supply 509 and the like. It will be understood by those skilled in the art that the electronic device structure illustrated in FIG. 7 does not constitute a limitation on the electronic device, and may include more or less components than those illustrated, or a combination of certain components, or different component arrangements.
射频电路501可用于收发信息,或通话过程中信号的接收和发送,特别地,将基站的下行信息接收后,交由一个或者一个以上处理器508处理;另外,将涉及上行的数据发送给基站。通常,射频电路501包括但不限于天线、至少一个放大器、调谐器、一个或多个振荡器、用户身份模块(SIM,Subscriber Identity Module)卡、收发信机、耦合器、低噪声放大器(LNA,Low Noise Amplifier)、双工器等。此外,射频电路501还可以通过无线通信与网络和其他设备通信。该无线通信可以使用任一通信标准或协议,包括但不限于全球移动通信系统(GSM,Global System of Mobile communication)、通用分组无线服务(GPRS,General Packet Radio Service)、码分多址(CDMA,Code Division Multiple Access)、宽带码分多址(WCDMA,Wideband Code Division Multiple Access)、长期演进(LTE,Long Term Evolution)、电子邮件、短消息服务(SMS,Short Messaging Service)等。The radio frequency circuit 501 can be used for transmitting and receiving information, or receiving and transmitting signals during a call. Specifically, after receiving the downlink information of the base station, the radio network is processed by one or more processors 508; in addition, the data related to the uplink is sent to the base station. . Generally, the radio frequency circuit 501 includes, but is not limited to, an antenna, at least one amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, and a low noise amplifier (LNA, Low Noise Amplifier), duplexer, etc. In addition, the radio frequency circuit 501 can also communicate with the network and other devices through wireless communication. The wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile communication (GSM), General Packet Radio Service (GPRS), and Code Division Multiple Access (CDMA). Code Division Multiple Access), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), e-mail, Short Messaging Service (SMS), and the like.
存储器502可用于存储应用程序和数据。存储器502存储的应用程序中包含有可执行代码。应用程序可以组成各种功能模块。处理器508通过运行存储在存储器502的应用程序,从而执行各种功能应用以及数据处理。存储器502可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据电子设备的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器502可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。相应地,存储器502还可以包括存储器控制器,以提供处理器508和输入单元503对存储器502的访问。 Memory 502 can be used to store applications and data. The application stored in the memory 502 contains executable code. Applications can form various functional modules. The processor 508 executes various functional applications and data processing by running an application stored in the memory 502. The memory 502 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may be stored according to Data created by the use of electronic devices (such as audio data, phone books, etc.). Moreover, memory 502 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, memory 502 may also include a memory controller to provide access to memory 502 by processor 508 and input unit 503.
输入单元503可用于接收输入的数字、字符信息或用户特征信息(比如指纹),以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。具体地,在一个具体的实施例中,输入单元503可包括触敏表面以及其他输入设备。触敏表面,也称为触摸显示屏或者触控板,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触敏表面上或在触敏表面附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触敏表面可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器508,并能接收处理器508发来的命令并加以执行。The input unit 503 can be configured to receive input numbers, character information or user characteristic information (such as fingerprints), and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls. In particular, in one particular embodiment, input unit 503 can include a touch-sensitive surface as well as other input devices. Touch-sensitive surfaces, also known as touch screens or trackpads, collect touch operations on or near the user (such as the user using a finger, stylus, etc., any suitable object or accessory on a touch-sensitive surface or touch-sensitive Operation near the surface), and drive the corresponding connecting device according to a preset program. Alternatively, the touch sensitive surface may include two parts of a touch detection device and a touch controller. Wherein, the touch detection device detects the touch orientation of the user, and detects a signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts the touch information into contact coordinates, and sends the touch information. The processor 508 is provided and can receive commands from the processor 508 and execute them.
显示单元504可用于显示由用户输入的信息或提供给用户的信息以及电子设备的各种图形用户接口,这些图形用户接口可以由图形、文本、图标、视频和其任意组合来构成。显示单元504可包括显示面板。可选的,可以采用液晶显示器(LCD,Liquid Crystal Display)、有机发光二极管(OLED,Organic Light-Emitting Diode)等形式来配置显示面板。进一步的,触敏表面可覆盖显示面板,当触敏表面检测到在其上或附近的触摸操作后,传送给处理器508以确定触摸事件的类型,随后处理器508根据触摸事件的类型在显示面板上提供相应的视觉输出。虽然在图7中,触敏表面与显示面板是作为两个独立的部件来实现输入和输入功能,但是在某些实施例中,可以将触敏表面与显示面板集成而实现输入和输出功能。 Display unit 504 can be used to display information entered by the user or information provided to the user, as well as various graphical user interfaces of the electronic device, which can be composed of graphics, text, icons, video, and any combination thereof. The display unit 504 can include a display panel. Optionally, the display panel can be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch-sensitive surface can cover the display panel, and when the touch-sensitive surface detects a touch operation on or near it, it is transmitted to the processor 508 to determine the type of the touch event, and then the processor 508 displays the type according to the type of the touch event. A corresponding visual output is provided on the panel. Although in FIG. 7, the touch-sensitive surface and display panel are implemented as two separate components to perform input and input functions, in some embodiments, the touch-sensitive surface can be integrated with the display panel to implement input and output functions.
电子设备还可包括至少一种传感器505,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板的亮度,接近传感器可在电子设备移动到耳边时,关闭显示面板和/或背光。作为运动传感器的一种,重力加速度传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于电子设备还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他 传感器,在此不再赘述。The electronic device can also include at least one type of sensor 505, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel according to the brightness of the ambient light, and the proximity sensor may close the display panel when the electronic device moves to the ear, and/or Backlighting. As a kind of motion sensor, the gravity acceleration sensor can detect the magnitude of acceleration in all directions (usually three axes). When it is stationary, it can detect the magnitude and direction of gravity. It can be used to identify the gesture of the mobile phone (such as horizontal and vertical screen switching, related Game, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for the electronic device can also be configured with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors, not here Let me repeat.
音频电路506可通过扬声器、传声器提供用户与电子设备之间的音频接口。音频电路506可将接收到的音频数据转换成电信号,传输到扬声器,由扬声器转换为声音信号输出;另一方面,传声器将收集的声音信号转换为电信号,由音频电路506接收后转换为音频数据,再将音频数据输出处理器508处理后,经射频电路501以发送给比如另一电子设备,或者将音频数据输出至存储器502以便进一步处理。音频电路506还可能包括耳塞插孔,以提供外设耳机与电子设备的通信。The audio circuit 506 can provide an audio interface between the user and the electronic device through a speaker and a microphone. The audio circuit 506 can convert the received audio data into an electrical signal, which is transmitted to a speaker, and converted into a sound signal output by the speaker. On the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 506 and converted into The audio data is processed by the audio data output processor 508, transmitted via the RF circuit 501 to, for example, another electronic device, or the audio data is output to the memory 502 for further processing. The audio circuit 506 may also include an earbud jack to provide communication of the peripheral earphones with the electronic device.
无线保真(WiFi)属于短距离无线传输技术,电子设备通过无线保真模块507可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图7示出了无线保真模块507,但是可以理解的是,其并不属于电子设备的必须构成,完全可以根据需要在不改变发明的本质的范围内而省略。Wireless Fidelity (WiFi) is a short-range wireless transmission technology. The wireless device can help users send and receive e-mail, browse web pages and access streaming media through the wireless fidelity module 507, which provides users with wireless broadband Internet access. Although FIG. 7 shows the wireless fidelity module 507, it can be understood that it does not belong to the essential configuration of the electronic device, and may be omitted as needed within the scope of not changing the essence of the invention.
处理器508是电子设备的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或执行存储在存储器502内的应用程序,以及调用存储在存储器502内的数据,执行电子设备的各种功能和处理数据,从而对电子设备进行整体监控。可选的,处理器508可包括一个或多个处理核心;优选的,处理器508可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器508中。The processor 508 is a control center of the electronic device, connects various parts of the entire electronic device using various interfaces and lines, executes the electronic device by running or executing an application stored in the memory 502, and calling data stored in the memory 502. The various functions and processing of data to provide overall monitoring of the electronic device. Optionally, the processor 508 may include one or more processing cores; preferably, the processor 508 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, a user interface, an application, and the like. The modem processor primarily handles wireless communications. It will be appreciated that the above described modem processor may also not be integrated into the processor 508.
电子设备还包括给各个部件供电的电源509(比如电池)。优选的,电源可以通过电源管理系统与处理器508逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。电源509还可以包括一个或一个以上的直流或交流电源、再充电系统、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。The electronic device also includes a power source 509 (such as a battery) that supplies power to the various components. Preferably, the power source can be logically coupled to the processor 508 through the power management system to manage functions such as charging, discharging, and power management through the power management system. The power supply 509 may also include any one or more of a DC or AC power source, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
尽管图7中未示出,电子设备还可以包括摄像头、蓝牙模块等,在此不再赘述。Although not shown in FIG. 7, the electronic device may further include a camera, a Bluetooth module, and the like, and details are not described herein again.
具体实施时,以上各个模块可以作为独立的实体来实现,也可以进行任意组合,作为同一或若干个实体来实现,以上各个模块的具体实施可参见前面的 方法实施例,在此不再赘述。For the specific implementation, the foregoing modules may be implemented as a separate entity, or may be implemented in any combination, and may be implemented as the same or a plurality of entities. For the specific implementation of the foregoing modules, refer to the foregoing method embodiments, and details are not described herein.
需要说明的是,本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于计算机可读存储介质中,如存储在电子设备的存储器中,并被该电子设备内的至少一个处理器执行,在执行过程中可包括如增强现实模型的调整方法的实施例的流程。其中,存储介质可以包括:只读存储器(ROM,Read Only Memory)、随机存取记忆体(RAM,Random Access Memory)、磁盘或光盘等。It should be noted that those skilled in the art can understand that all or part of the steps of the foregoing embodiments can be completed by a program to instruct related hardware, and the program can be stored in a computer readable storage medium, such as Stored in a memory of the electronic device and executed by at least one processor within the electronic device, the flow of an embodiment of an adjustment method such as an augmented reality model may be included during execution. The storage medium may include: a read only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
以上对本申请实施例提供的一种增强现实模型的调整方法、装置、存储介质和电子设备进行了详细介绍,其各功能模块可以集成在一个处理芯片中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。The method, device, storage medium and electronic device for adjusting an augmented reality model provided by the embodiments of the present application are described in detail. The functional modules may be integrated into one processing chip, or each module may exist physically separately. Two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules. The principles and implementations of the present application are described in the following by using specific examples. The description of the above embodiments is only for helping to understand the method of the present application and its core ideas. Meanwhile, for those skilled in the art, according to the present application, There is a change in the scope of the present invention and the scope of application, and the contents of this specification should not be construed as limiting the present application.

Claims (20)

  1. 一种增强现实模型的调整方法,其中,包括以下步骤:An adjustment method of an augmented reality model, comprising the following steps:
    获取电子设备当前所在场景对应的图像,并根据所述图像建立空间坐标系;Obtaining an image corresponding to the current scene of the electronic device, and establishing a spatial coordinate system according to the image;
    在所述场景中添加增强现实虚拟模型;Adding an augmented reality virtual model to the scene;
    根据所述空间坐标系获取所述增强现实虚拟模型与所述电子设备之间的位置关系;Acquiring a positional relationship between the augmented reality virtual model and the electronic device according to the space coordinate system;
    根据所述位置关系对所述增强现实虚拟模型进行调整。The augmented reality virtual model is adjusted according to the positional relationship.
  2. 根据权利要求1所述的增强现实模型的调整方法,其中,所述位置关系包括距离;The method of adjusting an augmented reality model according to claim 1, wherein the positional relationship comprises a distance;
    所述根据所述位置关系对所述增强现实虚拟模型进行调整,包括:And adjusting the augmented reality virtual model according to the location relationship, including:
    根据所述增强现实虚拟模型与所述电子设备之间的距离,对所述增强现实虚拟模型的尺寸进行调整。And adjusting a size of the augmented reality virtual model according to a distance between the augmented reality virtual model and the electronic device.
  3. 根据权利要求1所述的增强现实模型的调整方法,其中,所述位置关系包括相对角度;The method of adjusting an augmented reality model according to claim 1, wherein the positional relationship comprises a relative angle;
    所述根据所述位置关系对所述增强现实虚拟模型进行调整,包括:And adjusting the augmented reality virtual model according to the location relationship, including:
    根据所述增强现实虚拟模型与所述电子设备之间的相对角度,对所述增强现实虚拟模型的朝向进行调整。Adjusting the orientation of the augmented reality virtual model according to a relative angle between the augmented reality virtual model and the electronic device.
  4. 根据权利要求1所述的增强现实模型的调整方法,其中,所述在所述场景中添加增强现实虚拟模型,包括:The method for adjusting an augmented reality model according to claim 1, wherein the adding an augmented reality virtual model to the scene comprises:
    获取所述场景中的目标对象,并根据所述目标对象生成对应的增强现实虚拟模型;Obtaining a target object in the scene, and generating a corresponding augmented reality virtual model according to the target object;
    在所述空间坐标系中提取所述目标对象的坐标信息;Extracting coordinate information of the target object in the space coordinate system;
    根据所述坐标信息添加所述增强现实虚拟模型。Adding the augmented reality virtual model according to the coordinate information.
  5. 根据权利要求1所述的增强现实模型的调整方法,其中,在根据所述位置关系对所述增强现实虚拟模型进行调整之后,所述方法还包括:The method of adjusting an augmented reality model according to claim 1, wherein after the augmented reality virtual model is adjusted according to the positional relationship, the method further comprises:
    将所述调整后的增强现实虚拟模型与所述场景进行深度融合;Deeply merging the adjusted augmented reality virtual model with the scene;
    显示所述深度融合后的增强现实画面。The augmented reality picture after the depth blending is displayed.
  6. 根据权利要求1所述的增强现实模型的调整方法,其中,根据所述图像建立空间坐标系,包括:The method for adjusting an augmented reality model according to claim 1, wherein the establishing a spatial coordinate system according to the image comprises:
    根据所述图像建立当前场景的三维模型;Establishing a three-dimensional model of the current scene according to the image;
    在所述三维模型当中建立空间坐标系。A spatial coordinate system is established in the three-dimensional model.
  7. 根据权利要求1所述的增强现实模型的调整方法,其中,根据所述空间坐标系获取所述增强现实虚拟模型与所述电子设备之间的位置关系,包括:The method for adjusting an augmented reality model according to claim 1, wherein the obtaining a positional relationship between the augmented reality virtual model and the electronic device according to the spatial coordinate system comprises:
    在所述空间坐标系当中获取所述增强现实虚拟模型的第一坐标信息;Obtaining first coordinate information of the augmented reality virtual model in the space coordinate system;
    根据所述图像获取所述电子设备的拍摄姿态信息,并根据所述拍摄姿态信息计算所述电子设备在所述空间坐标系当中的第二坐标信息;Acquiring the shooting posture information of the electronic device according to the image, and calculating second coordinate information of the electronic device in the space coordinate system according to the shooting posture information;
    根据所述第一坐标信息和第二坐标信息生成所述增强现实虚拟模型与所述电子设备之间的位置关系。And generating a positional relationship between the augmented reality virtual model and the electronic device according to the first coordinate information and the second coordinate information.
  8. 一种增强现实模型的调整装置,其中,所述装置包括:图像获取模块、添加模块、位置获取模块以及调整模块;An apparatus for adjusting an augmented reality model, wherein the apparatus comprises: an image acquisition module, an addition module, a position acquisition module, and an adjustment module;
    所述图像获取模块,用于获取电子设备当前所在场景对应的图像,并根据所述图像建立空间坐标系;The image acquisition module is configured to acquire an image corresponding to a scene where the electronic device is currently located, and establish a spatial coordinate system according to the image;
    所述添加模块,用于在所述场景中添加增强现实虚拟模型;The adding module is configured to add an augmented reality virtual model to the scene;
    所述位置获取模块,用于根据所述空间坐标系获取所述增强现实虚拟模型与所述电子设备之间的位置关系;The location obtaining module is configured to acquire a positional relationship between the augmented reality virtual model and the electronic device according to the spatial coordinate system;
    所述调整模块,用于根据所述位置关系对所述增强现实虚拟模型进行调整。The adjusting module is configured to adjust the augmented reality virtual model according to the positional relationship.
  9. 根据权利要求8所述的增强现实模型的调整装置,其中,所述位置关系包括距离;The adjustment device of the augmented reality model according to claim 8, wherein the positional relationship includes a distance;
    所述调整模块,具体用于根据所述增强现实虚拟模型与所述电子设备之间的距离,对所述增强现实虚拟模型的尺寸进行调整。The adjusting module is specifically configured to adjust a size of the augmented reality virtual model according to a distance between the augmented reality virtual model and the electronic device.
  10. 根据权利要求8所述的增强现实模型的调整装置,其中,所述位置关系包括相对角度;The adjustment device of the augmented reality model according to claim 8, wherein the positional relationship includes a relative angle;
    所述调整模块,具体用于根据所述增强现实虚拟模型与所述电子设备之间的相对角度,对所述增强现实虚拟模型的朝向进行调整。The adjusting module is specifically configured to adjust an orientation of the augmented reality virtual model according to a relative angle between the augmented reality virtual model and the electronic device.
  11. 根据权利要求8所述的增强现实模型的调整装置,其中,所述添加模块包括:获取子模块、提取子模块以及添加子模块;The apparatus for adjusting an augmented reality model according to claim 8, wherein the adding module comprises: an obtaining submodule, an extracting submodule, and adding a submodule;
    所述获取子模块,用于获取所述场景中的目标对象,并根据所述目标对象生成对应的增强现实虚拟模型;The acquiring sub-module is configured to acquire a target object in the scene, and generate a corresponding augmented reality virtual model according to the target object;
    所述提取子模块,用于在所述空间坐标系中提取所述目标对象的坐标信息;The extraction submodule is configured to extract coordinate information of the target object in the space coordinate system;
    所述添加子模块,用于根据所述坐标信息添加所述增强现实虚拟模型。And the adding submodule is configured to add the augmented reality virtual model according to the coordinate information.
  12. 根据权利要求8所述的增强现实模型的调整装置,其中,所述装置还包括:融合模块和显示模块;The apparatus for adjusting an augmented reality model according to claim 8, wherein the apparatus further comprises: a fusion module and a display module;
    所述融合模块,用于将所述调整后的增强现实虚拟模型与所述场景进行深度融合;The fusion module is configured to deeply integrate the adjusted augmented reality virtual model with the scene;
    所述显示模块,用于显示所述深度融合后的增强现实画面。The display module is configured to display the augmented reality picture after the depth fusion.
  13. 一种存储介质,其上存储有计算机程序,其中,所述计算机程序被处理器执行时实现如权利要求1-7任一项所述方法的步骤。A storage medium having stored thereon a computer program, wherein the computer program is executed by a processor to perform the steps of the method of any of claims 1-7.
  14. 一种电子设备,包括处理器和存储器,所述存储器存储有多条指令,其中,所述处理器加载所述存储器中的指令用于执行以下步骤:An electronic device includes a processor and a memory, the memory storing a plurality of instructions, wherein the processor loads instructions in the memory for performing the following steps:
    获取电子设备当前所在场景对应的图像,并根据所述图像建立空间坐标系;Obtaining an image corresponding to the current scene of the electronic device, and establishing a spatial coordinate system according to the image;
    在所述场景中添加增强现实虚拟模型;Adding an augmented reality virtual model to the scene;
    根据所述空间坐标系获取所述增强现实虚拟模型与所述电子设备之间的位置关系;Acquiring a positional relationship between the augmented reality virtual model and the electronic device according to the space coordinate system;
    根据所述位置关系对所述增强现实虚拟模型进行调整。The augmented reality virtual model is adjusted according to the positional relationship.
  15. 根据权利要求14所述的电子设备,其中,所述位置关系包括距离,所述根据所述位置关系对所述增强现实虚拟模型进行调整时,所述处理器用于执行以下步骤:The electronic device according to claim 14, wherein the positional relationship comprises a distance, and when the augmented reality virtual model is adjusted according to the positional relationship, the processor is configured to perform the following steps:
    根据所述增强现实虚拟模型与所述电子设备之间的距离,对所述增强现实虚拟模型的尺寸进行调整。And adjusting a size of the augmented reality virtual model according to a distance between the augmented reality virtual model and the electronic device.
  16. 根据权利要求14所述的电子设备,其中,所述位置关系包括相对角度,所述根据所述位置关系对所述增强现实虚拟模型进行调整时,所述处理器用于执行以下步骤:The electronic device according to claim 14, wherein the positional relationship comprises a relative angle, and when the augmented reality virtual model is adjusted according to the positional relationship, the processor is configured to perform the following steps:
    根据所述增强现实虚拟模型与所述电子设备之间的相对角度,对所述增强现实虚拟模型的朝向进行调整。Adjusting the orientation of the augmented reality virtual model according to a relative angle between the augmented reality virtual model and the electronic device.
  17. 根据权利要求14所述的电子设备,其中,所述在所述场景中添加增强现实虚拟模型时,所述处理器用于执行以下步骤:The electronic device of claim 14, wherein when the augmented reality virtual model is added to the scene, the processor is configured to perform the following steps:
    获取所述场景中的目标对象,并根据所述目标对象生成对应的增强现实虚 拟模型;Obtaining a target object in the scene, and generating a corresponding augmented reality virtual model according to the target object;
    在所述空间坐标系中提取所述目标对象的坐标信息;Extracting coordinate information of the target object in the space coordinate system;
    根据所述坐标信息添加所述增强现实虚拟模型。Adding the augmented reality virtual model according to the coordinate information.
  18. 根据权利要求14所述的电子设备,其中,在根据所述位置关系对所述增强现实虚拟模型进行调整之后,所述处理器还用于执行以下步骤:The electronic device of claim 14, wherein the processor is further configured to perform the following steps after adjusting the augmented reality virtual model according to the location relationship:
    将所述调整后的增强现实虚拟模型与所述场景进行深度融合;Deeply merging the adjusted augmented reality virtual model with the scene;
    显示所述深度融合后的增强现实画面。The augmented reality picture after the depth blending is displayed.
  19. 根据权利要求14所述的电子设备,其中,根据所述图像建立空间坐标系时,所述处理器用于执行以下步骤:The electronic device of claim 14, wherein the processor is configured to perform the following steps when establishing a spatial coordinate system based on the image:
    根据所述图像建立当前场景的三维模型;Establishing a three-dimensional model of the current scene according to the image;
    在所述三维模型当中建立空间坐标系。A spatial coordinate system is established in the three-dimensional model.
  20. 根据权利要求14所述的电子设备,其中,根据所述空间坐标系获取所述增强现实虚拟模型与所述电子设备之间的位置关系时,所述处理器用于执行以下步骤:The electronic device according to claim 14, wherein the processor is configured to perform the following steps when acquiring a positional relationship between the augmented reality virtual model and the electronic device according to the spatial coordinate system:
    在所述空间坐标系当中获取所述增强现实虚拟模型的第一坐标信息;Obtaining first coordinate information of the augmented reality virtual model in the space coordinate system;
    根据所述图像获取所述电子设备的拍摄姿态信息,并根据所述拍摄姿态信息计算所述电子设备在所述空间坐标系当中的第二坐标信息;Acquiring the shooting posture information of the electronic device according to the image, and calculating second coordinate information of the electronic device in the space coordinate system according to the shooting posture information;
    根据所述第一坐标信息和第二坐标信息生成所述增强现实虚拟模型与所述电子设备之间的位置关系。And generating a positional relationship between the augmented reality virtual model and the electronic device according to the first coordinate information and the second coordinate information.
PCT/CN2019/079588 2018-03-26 2019-03-25 Method and apparatus for adjusting augmented reality model, storage medium, and electronic device WO2019184889A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810252914.5A CN108537889A (en) 2018-03-26 2018-03-26 Method of adjustment, device, storage medium and the electronic equipment of augmented reality model
CN201810252914.5 2018-03-26

Publications (1)

Publication Number Publication Date
WO2019184889A1 true WO2019184889A1 (en) 2019-10-03

Family

ID=63484794

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/079588 WO2019184889A1 (en) 2018-03-26 2019-03-25 Method and apparatus for adjusting augmented reality model, storage medium, and electronic device

Country Status (2)

Country Link
CN (1) CN108537889A (en)
WO (1) WO2019184889A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112911356A (en) * 2020-05-29 2021-06-04 腾讯科技(深圳)有限公司 Virtual reality VR video playing method and related equipment

Families Citing this family (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108537889A (en) * 2018-03-26 2018-09-14 广东欧珀移动通信有限公司 Method of adjustment, device, storage medium and the electronic equipment of augmented reality model
CN109345560B (en) * 2018-09-20 2021-02-19 网易(杭州)网络有限公司 Motion tracking precision testing method and device of augmented reality equipment
CN110070600B (en) * 2018-11-02 2023-09-15 北京微播视界科技有限公司 Three-dimensional model generation method, device and hardware device
CN111325798B (en) * 2018-12-13 2023-08-18 浙江宇视科技有限公司 Camera model correction method, device, AR implementation equipment and readable storage medium
CN111464577B (en) * 2019-01-21 2022-05-27 阿里巴巴集团控股有限公司 Equipment control method and device
CN109981983B (en) * 2019-03-26 2021-04-23 Oppo广东移动通信有限公司 Augmented reality image processing method and device, electronic equipment and storage medium
CN109961523B (en) * 2019-04-18 2023-07-04 广州市百果园信息技术有限公司 Method, device, system, equipment and storage medium for updating virtual target
CN110111428B (en) * 2019-05-28 2023-06-20 艾瑞迈迪科技石家庄有限公司 Virtual target calibration method and device applied to augmented reality
CN110232744A (en) * 2019-06-18 2019-09-13 北京华捷艾米科技有限公司 A kind of display methods and device
CN110456957B (en) * 2019-08-09 2022-05-03 北京字节跳动网络技术有限公司 Display interaction method, device, equipment and storage medium
CN111739169A (en) * 2019-10-31 2020-10-02 北京京东尚科信息技术有限公司 Product display method, system, medium and electronic device based on augmented reality
CN111077999B (en) * 2019-11-14 2021-08-13 联想(北京)有限公司 Information processing method, equipment and system
CN112807683B (en) * 2019-11-18 2024-01-16 深圳云天励飞技术有限公司 Game role adjustment method and related device
CN111026276A (en) * 2019-12-12 2020-04-17 Oppo(重庆)智能科技有限公司 Visual aid method and related product
CN111127661B (en) * 2019-12-17 2023-08-29 北京超图软件股份有限公司 Data processing method and device and electronic equipment
WO2021197016A1 (en) * 2020-04-01 2021-10-07 Guangdong Oppo Mobile Telecommunications Corp., Ltd. System and method for enhancing subjects in videos
CN111652979A (en) * 2020-05-06 2020-09-11 福建工程学院 Method and system for realizing AR
CN111651047B (en) * 2020-06-05 2023-09-19 浙江商汤科技开发有限公司 Virtual object display method and device, electronic equipment and storage medium
CN114078102A (en) * 2020-08-11 2022-02-22 北京芯海视界三维科技有限公司 Image processing apparatus and virtual reality device
CN114125183A (en) * 2020-09-01 2022-03-01 华为技术有限公司 Image processing method, mobile terminal and storage medium
CN115248501B (en) * 2021-04-27 2023-11-21 广州视享科技有限公司 Display method and device of augmented reality equipment and augmented reality equipment
CN113838201B (en) * 2021-09-23 2022-06-07 北京百度网讯科技有限公司 Model adaptation method and device, electronic equipment and readable storage medium
CN114418918B (en) * 2022-03-15 2022-07-05 深圳市北海轨道交通技术有限公司 Intelligent auxiliary station reporting method and system based on augmented reality

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140207434A1 (en) * 2013-01-21 2014-07-24 GM Global Technology Operations LLC Virtual model merging systems and methods
CN106548519A (en) * 2016-11-04 2017-03-29 上海玄彩美科网络科技有限公司 Augmented reality method based on ORB SLAM and the sense of reality of depth camera
CN107393017A (en) * 2017-08-11 2017-11-24 北京铂石空间科技有限公司 Image processing method, device, electronic equipment and storage medium
CN108537889A (en) * 2018-03-26 2018-09-14 广东欧珀移动通信有限公司 Method of adjustment, device, storage medium and the electronic equipment of augmented reality model

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102147658B (en) * 2011-02-12 2013-01-09 华为终端有限公司 Method and device for realizing interaction of augment reality (AR) and mobile terminal
CN103035003B (en) * 2012-12-11 2015-09-09 华为技术有限公司 A kind of method and device realizing augmented reality
CN104539925B (en) * 2014-12-15 2016-10-05 北京邮电大学 The method and system of three-dimensional scenic augmented reality based on depth information
CN105005970B (en) * 2015-06-26 2018-02-16 广东欧珀移动通信有限公司 The implementation method and device of a kind of augmented reality
CN106200914B (en) * 2016-06-28 2019-04-05 Oppo广东移动通信有限公司 Triggering method, device and the photographing device of augmented reality
CN106909223B (en) * 2017-02-28 2020-07-10 杭州乐见科技有限公司 Camera orientation correction method and device based on 3D scene
CN106896940B (en) * 2017-02-28 2020-01-07 杭州乐见科技有限公司 Virtual article presentation effect control method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140207434A1 (en) * 2013-01-21 2014-07-24 GM Global Technology Operations LLC Virtual model merging systems and methods
CN106548519A (en) * 2016-11-04 2017-03-29 上海玄彩美科网络科技有限公司 Augmented reality method based on ORB SLAM and the sense of reality of depth camera
CN107393017A (en) * 2017-08-11 2017-11-24 北京铂石空间科技有限公司 Image processing method, device, electronic equipment and storage medium
CN108537889A (en) * 2018-03-26 2018-09-14 广东欧珀移动通信有限公司 Method of adjustment, device, storage medium and the electronic equipment of augmented reality model

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112911356A (en) * 2020-05-29 2021-06-04 腾讯科技(深圳)有限公司 Virtual reality VR video playing method and related equipment
CN112911356B (en) * 2020-05-29 2022-04-05 腾讯科技(深圳)有限公司 Virtual reality VR video playing method and related equipment

Also Published As

Publication number Publication date
CN108537889A (en) 2018-09-14

Similar Documents

Publication Publication Date Title
WO2019184889A1 (en) Method and apparatus for adjusting augmented reality model, storage medium, and electronic device
US11605214B2 (en) Method, device and storage medium for determining camera posture information
US10055879B2 (en) 3D human face reconstruction method, apparatus and server
WO2018171429A1 (en) Image stitching method, device, terminal, and storage medium
CN110059685B (en) Character area detection method, device and storage medium
WO2019233229A1 (en) Image fusion method, apparatus, and storage medium
JP2021524957A (en) Image processing methods and their devices, terminals and computer programs
CN111417028A (en) Information processing method, information processing apparatus, storage medium, and electronic device
US9760998B2 (en) Video processing method and apparatus
EP3561667B1 (en) Method for displaying 2d application in vr device, and terminal
EP3748533A1 (en) Method, apparatus, and storage medium for obtaining object information
CN111986250A (en) Object volume measuring method, device, measuring equipment and storage medium
WO2019029379A1 (en) Interaction object control method and device, terminal and computer-readable storage medium
KR102242324B1 (en) Illuminating a Virtual Environment With Camera Light Data
WO2019196871A1 (en) Modeling method and related device
CN110717964B (en) Scene modeling method, terminal and readable storage medium
WO2021078182A1 (en) Playback method and playback system
WO2019071562A1 (en) Data processing method and terminal
CN108829600B (en) Method and device for testing algorithm library, storage medium and electronic equipment
KR102084161B1 (en) Electro device for correcting image and method for controlling thereof
CN113780291A (en) Image processing method and device, electronic equipment and storage medium
CN114093020A (en) Motion capture method, motion capture device, electronic device and storage medium
CN111986251A (en) Object volume measuring method, device, measuring equipment and storage medium
KR102069228B1 (en) Method and apparatus for filling color of image
CN108959073B (en) Method and device for testing algorithm library, storage medium and electronic equipment

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19775567

Country of ref document: EP

Kind code of ref document: A1