CN110688018A - Control method, device, terminal device and storage medium for virtual screen - Google Patents
Control method, device, terminal device and storage medium for virtual screen Download PDFInfo
- Publication number
- CN110688018A CN110688018A CN201911073061.XA CN201911073061A CN110688018A CN 110688018 A CN110688018 A CN 110688018A CN 201911073061 A CN201911073061 A CN 201911073061A CN 110688018 A CN110688018 A CN 110688018A
- Authority
- CN
- China
- Prior art keywords
- virtual content
- virtual
- terminal device
- information
- target object
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/011—Arrangements for interaction with the human body, e.g. for user immersion in virtual reality
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0481—Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
- G06F3/04815—Interaction with a metaphor-based environment or interaction object displayed as three-dimensional, e.g. changing the user viewpoint with respect to the environment or object
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T19/00—Manipulating 3D models or images for computer graphics
- G06T19/006—Mixed reality
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2203/00—Indexing scheme relating to G06F3/00 - G06F3/048
- G06F2203/01—Indexing scheme relating to G06F3/01
- G06F2203/012—Walk-in-place systems for allowing a user to walk in a virtual environment while constraining him to a given position in the physical environment
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Computer Graphics (AREA)
- Computer Hardware Design (AREA)
- Software Systems (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
本申请公开了一种虚拟画面的控制方法、装置、终端设备及存储介质,涉及显示技术领域。该虚拟画面的控制方法应用于终端设备,方法包括:获取包含有目标物体的目标图像;根据所述目标图像获取所述目标物体的轮廓信息;确定当前显示的虚拟画面中待切换的第一虚拟内容;根据所述轮廓信息获取第二虚拟内容,并将所述第一虚拟内容切换显示为所述第二虚拟内容。本方法利用物体的轮廓信息可以实现对虚拟内容简单快速的切换。
The present application discloses a control method, device, terminal device and storage medium for a virtual screen, and relates to the technical field of display. The method for controlling a virtual image is applied to a terminal device, and the method includes: acquiring a target image containing a target object; acquiring outline information of the target object according to the target image; determining a first virtual image to be switched in the currently displayed virtual image content; acquiring second virtual content according to the outline information, and switching and displaying the first virtual content as the second virtual content. The method can realize the simple and fast switching of virtual content by using the outline information of the object.
Description
技术领域technical field
本申请涉及计算机技术领域,更具体地,涉及一种虚拟画面的控制方法、装置、终端设备及存储介质。The present application relates to the field of computer technology, and more particularly, to a method, device, terminal device and storage medium for controlling a virtual screen.
背景技术Background technique
近年来,随着科技的进步,增强现实(AR,Augmented Reality)和虚拟现实(VR,Virtual Reality)等技术已逐渐成为国内外研究的热点。以增强现实为例,增强现实是通过计算机系统提供的信息增加用户对现实世界感知的技术,其将计算机生成的虚拟对象、场景或系统提示信息等内容对象叠加到真实场景中,来增强或修改对现实世界环境或表示现实世界环境的数据的感知。在AR/VR技术中,对虚拟画面的控制较为繁琐,特别是对虚拟画面内容切换方面,故如何快速有效的对虚拟画面的内容进行切换是亟待解决的问题。In recent years, with the advancement of science and technology, technologies such as augmented reality (AR, Augmented Reality) and virtual reality (VR, Virtual Reality) have gradually become the focus of research at home and abroad. Taking augmented reality as an example, augmented reality is a technology that increases users' perception of the real world through information provided by a computer system. Perception of a real-world environment or data representing a real-world environment. In AR/VR technology, the control of virtual images is cumbersome, especially in the aspect of content switching of virtual images, so how to quickly and effectively switch the contents of virtual images is an urgent problem to be solved.
发明内容SUMMARY OF THE INVENTION
本申请实施例提出了一种虚拟画面的控制方法、装置、终端设备及存储介质,可以利用物体的轮廓信息快速有效的将第一虚拟内容切换显示为第二虚拟内容。The embodiments of the present application provide a method, device, terminal device and storage medium for controlling a virtual screen, which can quickly and effectively switch and display a first virtual content to a second virtual content by using the outline information of an object.
第一方面,本申请实施例提供了一种虚拟画面的控制方法,应用于终端设备,方法包括:获取包含有目标物体的目标图像;根据目标图像获取目标物体的轮廓信息;确定当前显示的虚拟画面中待切换的第一虚拟内容;根据轮廓信息获取第二虚拟内容,并将第一虚拟内容切换显示为第二虚拟内容。In a first aspect, an embodiment of the present application provides a method for controlling a virtual image, which is applied to a terminal device. The method includes: acquiring a target image containing a target object; acquiring outline information of the target object according to the target image; determining a currently displayed virtual image The first virtual content to be switched in the screen; the second virtual content is acquired according to the outline information, and the first virtual content is switched and displayed as the second virtual content.
第二方面,本申请实施例提供了一种虚拟画面的控制装置,应用于终端设备,装置包括:图像获取模块、信息识别模块、内容确定模块以及内容切换模块,其中,图像获取模块用于获取包含有目标物体的目标图像;信息识别模块用于根据目标图像获取目标物体的轮廓信息;内容确定模块用于确定当前显示的虚拟画面中待切换的第一虚拟内容;内容切换模块用于根据轮廓信息获取第二虚拟内容,并将第一虚拟内容切换显示为第二虚拟内容。In a second aspect, an embodiment of the present application provides a virtual screen control device, which is applied to a terminal device. The device includes: an image acquisition module, an information identification module, a content determination module, and a content switching module, wherein the image acquisition module is used to acquire Contains a target image of the target object; the information identification module is used to obtain the outline information of the target object according to the target image; the content determination module is used to determine the first virtual content to be switched in the currently displayed virtual picture; the content switching module is used to according to the outline The information acquires the second virtual content, and switches and displays the first virtual content as the second virtual content.
第三方面,本申请实施例提供了一种终端设备,包括:一个或多个处理器;存储器;一个或多个应用程序,其中一个或多个应用程序被存储在存储器中并被配置为由一个或多个处理器执行,一个或多个应用程序配置用于执行上述第一方面提供的虚拟画面的控制方法。In a third aspect, embodiments of the present application provide a terminal device, including: one or more processors; a memory; and one or more application programs, wherein the one or more application programs are stored in the memory and configured to be One or more processors execute, and one or more application programs are configured to execute the method for controlling a virtual screen provided by the first aspect.
第四方面,本申请实施例提供了一种计算机可读取存储介质,计算机可读取存储介质中存储有程序代码,程序代码可被处理器调用执行上述第一方面提供的虚拟画面的控制方法。In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where a program code is stored in the computer-readable storage medium, and the program code can be invoked by a processor to execute the control method for the virtual screen provided in the first aspect above .
本申请实施例提供的方案,终端设备可以获取包含有目标物体的目标图像,以根据目标图像获取目标物体的轮廓信息,然后终端设备可以确定当前显示的虚拟画面中待切换的第一虚拟内容,最后终端设备可以根据轮廓信息获取第二虚拟内容,并将第一虚拟内容切换显示为第二虚拟内容,即本申请可以利用物体的轮廓信息实现对虚拟内容的快速切换,且在进行虚拟内容切换操作时不仅操作简单而且更加智能化。In the solution provided by the embodiment of the present application, the terminal device may acquire a target image containing the target object, so as to acquire the outline information of the target object according to the target image, and then the terminal device may determine the first virtual content to be switched in the currently displayed virtual screen, Finally, the terminal device can obtain the second virtual content according to the outline information, and switch and display the first virtual content as the second virtual content, that is, the present application can use the outline information of the object to quickly switch the virtual content, and the virtual content can be switched. Operation is not only simple but also more intelligent.
附图说明Description of drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions in the embodiments of the present application more clearly, the following briefly introduces the drawings that are used in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those skilled in the art, other drawings can also be obtained from these drawings without creative effort.
图1示出了一种适用于本申请实施例的应用环境示意图;FIG. 1 shows a schematic diagram of an application environment suitable for an embodiment of the present application;
图2示出了本申请一个实施例提供的虚拟画面的控制方法的流程图;FIG. 2 shows a flowchart of a method for controlling a virtual screen provided by an embodiment of the present application;
图3a及图3b示出了本申请一个实施例提供的虚拟画面的控制方法中的一种手势示意图;3a and 3b show a schematic diagram of a gesture in a method for controlling a virtual screen provided by an embodiment of the present application;
图4示出了本申请一个实施例提供的虚拟画面的控制方法中的另一种手势示意图;FIG. 4 shows a schematic diagram of another gesture in a method for controlling a virtual screen provided by an embodiment of the present application;
图5示出了本申请另一个实施例提供的虚拟画面的控制方法的流程图;FIG. 5 shows a flowchart of a method for controlling a virtual screen provided by another embodiment of the present application;
图6示出了本申请另一个实施例提供的虚拟画面的控制方法中步骤S240的流程图;6 shows a flowchart of step S240 in a method for controlling a virtual screen provided by another embodiment of the present application;
图7示出了本申请另一个实施例提供的虚拟画面的控制方法中步骤S242的一种流程图;FIG. 7 shows a flowchart of step S242 in the method for controlling a virtual screen provided by another embodiment of the present application;
图8示出了本申请另一个实施例提供的虚拟画面的控制方法中步骤S242的另一种流程图;FIG. 8 shows another flowchart of step S242 in a method for controlling a virtual screen provided by another embodiment of the present application;
图9示出了本申请另一个实施例提供的虚拟画面的控制方法中第一虚拟内容的示意图;9 shows a schematic diagram of a first virtual content in a method for controlling a virtual screen provided by another embodiment of the present application;
图10示出了本申请另一个实施例提供的虚拟画面的控制方法中虚拟内容切换的示意图;10 shows a schematic diagram of virtual content switching in a method for controlling a virtual screen provided by another embodiment of the present application;
图11示出了本申请另一个实施例提供的虚拟画面的控制方法中步骤S242的又一种流程图;FIG. 11 shows yet another flowchart of step S242 in the method for controlling a virtual screen provided by another embodiment of the present application;
图12示出了本申请另一个实施例提供的虚拟画面的控制方法中步骤S242的再一种流程图;FIG. 12 shows yet another flowchart of step S242 in the method for controlling a virtual screen provided by another embodiment of the present application;
图13示出了本申请另一个实施例提供的虚拟画面的控制方法中步骤S242的还一种流程图;FIG. 13 shows yet another flowchart of step S242 in the method for controlling a virtual screen provided by another embodiment of the present application;
图14示出了本申请又一个实施例提供的虚拟画面的控制方法的流程图;FIG. 14 shows a flowchart of a method for controlling a virtual screen provided by another embodiment of the present application;
图15示出了本申请又一个实施例提供的虚拟画面的控制方法中步骤S330的流程图;FIG. 15 shows a flowchart of step S330 in a method for controlling a virtual screen provided by another embodiment of the present application;
图16示出了本申请一个实施例提供的虚拟画面的控制装置的框图;FIG. 16 shows a block diagram of an apparatus for controlling a virtual screen provided by an embodiment of the present application;
图17是本申请实施例的用于执行根据本申请实施例的虚拟画面的控制方法的终端设备的框图;FIG. 17 is a block diagram of a terminal device for executing a virtual screen control method according to an embodiment of the present application according to an embodiment of the present application;
图18是本申请实施例的用于保存或者携带实现根据本申请实施例的虚拟画面的控制方法的程序代码的存储单元。FIG. 18 is a storage unit for storing or carrying a program code for implementing the control method of a virtual screen according to an embodiment of the present application according to an embodiment of the present application.
具体实施方式Detailed ways
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。In order to make those skilled in the art better understand the solutions of the present application, the following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application.
在AR/VR技术中,对虚拟内容的调整或者切换与是必不可少的操作,例如,根据用户的需求切换不同的虚拟界面,或者根据用户的需求对虚拟界面中某些特定的虚拟物体进行切换。虚拟内容切换通常需要显示独立的切换窗口,而后再由用户选取目标虚拟内容进行切换,显然,用户在进行虚拟内容切换时其操作较为复杂,如此也导致了虚拟内容的切换非常繁琐。In AR/VR technology, the adjustment or switching of virtual content is an essential operation, for example, switching different virtual interfaces according to the needs of users, or performing certain virtual objects in the virtual interface according to the needs of users. switch. Virtual content switching usually needs to display an independent switching window, and then the user selects the target virtual content for switching. Obviously, the user's operation is complicated when switching virtual content, which also makes the switching of virtual content very cumbersome.
发明人经过研究,提出了本申请实施例中的虚拟画面的控制方法、装置、终端设备及存储介质,可以降低虚拟内容切换的繁琐程度。After research, the inventor proposes the control method, device, terminal device and storage medium of the virtual screen in the embodiments of the present application, which can reduce the complexity of switching virtual content.
下面对本申请实施例提供的虚拟画面的控制方法的一种应用场景进行介绍。An application scenario of the virtual picture control method provided by the embodiment of the present application is introduced below.
请参见图1,示出了本申请实施例提供的一种显示系统,包括终端设备100以及手持物体200。Referring to FIG. 1 , a display system provided by an embodiment of the present application is shown, including a
在一些实施例中,终端设备100可以是头戴显示装置、手机、平板电脑、个人计算机等,其中,头戴显示装置可以为一体式头戴显示装置,也可以为与外置电子设备连接的头戴显示装置。终端设备100也可以是与外接式/接入式头戴显示装置连接的手机等智能终端,即终端设备100可作为头戴显示装置的处理和存储设备,插入或者接入外接式头戴显示装置,通过头戴显示装置对虚拟内容300进行显示。In some embodiments, the
其中,虚拟内容300可以是虚拟界面,也可以是虚拟界面中的窗口,或者是虚拟界面中的某些虚拟物体,而虚拟物体则可以是虚拟人物或者是与虚拟人物适配的某些虚拟道具,例如,枪机游戏中的枪支或者弹药等都可以被称为虚拟物体,即虚拟物体可以包括游戏配件。The
在一些实施例中,用户可通过手持物体200与终端设备100显示的虚拟内容300进行交互。其中,手持物体200的具体形态结构及尺寸大小不受限制,可以是各种形态,如手机、书、杯子、瓶子、棍棒等。例如,请再次参阅图1,用户手持物体200为棍棒时,虚拟内容300中虚拟人物的手持武器也是虚拟棍棒303。In some embodiments, the user may interact with the
在另一些实施例中,用户也可以通过手部的手势等与虚拟内容300进行交互,此时,终端设备100可以接收用户的手势指令,并根据该手势指令对虚拟内容300进行相应的控制。In other embodiments, the user may also interact with the
请参阅图2,本申请实施例提供了一种虚拟画面的控制方法,应用于终端设备,该方法可以包括:Referring to FIG. 2 , an embodiment of the present application provides a method for controlling a virtual screen, which is applied to a terminal device, and the method may include:
步骤S110:获取包含有目标物体的目标图像。Step S110: Acquire a target image including the target object.
由于目前的虚拟内容切换通常需要显示独立的切换窗口,而后再由用户选取目标虚拟内容进行切换,导致虚拟内容的切换非常繁琐。因此,在本申请实施例中,终端设备可通过物体的轮廓信息实现对虚拟内容的快速切换,实现了切换操作的简单化。具体地,终端设备可以获取包含有目标物体的目标图像,以确定目标物体的轮廓信息。Since the current virtual content switching usually needs to display an independent switching window, and then the user selects the target virtual content for switching, the switching of the virtual content is very cumbersome. Therefore, in the embodiment of the present application, the terminal device can quickly switch the virtual content by using the outline information of the object, which simplifies the switching operation. Specifically, the terminal device may acquire a target image containing the target object to determine the contour information of the target object.
其中,目标物体可以是手持物体也可以是用户手部。当目标物体为手持物体时,用户可以通过操作手持物体来控制终端设备中显示的虚拟内容,而当目标物体为用户手部时,用户则可以通过控制手部变化不同的手势来控制终端设备中显示的虚拟内容。The target object may be a handheld object or a user's hand. When the target object is a handheld object, the user can control the virtual content displayed in the terminal device by operating the handheld object, and when the target object is the user's hand, the user can control the terminal device by changing different gestures of the hand. Displayed virtual content.
在一些实施方式中,终端设备可以实时获取包含有用户的手部区域的场景图像,以从场景图像中截取到包含有目标物体的目标图像。作为一种方式,当目标物体为用户手部时,终端设备可以通过分析场景图像中是否出现手指的特征形状和手掌的特征形状等信息,以判断获取到的场景图像中是否包含用户的手部区域。当场景图像中出现手指的特征形状和手掌的特征形状等信息时,终端设备可确定场景图像中包含用户的手部,从而可直接将包含手指的特征形状和手掌的特征形状等信息在内的局部图像截取出来,即可得到上述包含有目标物体的目标图像。在另一些实施方式中,终端设备也可以直接将图像采集装置的视野范围定位到用户的手部区域,从而可以实时获取到包含有目标物体的目标图像。In some embodiments, the terminal device may acquire a scene image including the user's hand region in real time, so as to capture a target image including a target object from the scene image. As a method, when the target object is the user's hand, the terminal device can determine whether the acquired scene image contains the user's hand by analyzing whether the characteristic shape of the finger and the characteristic shape of the palm appear in the scene image. area. When information such as the characteristic shape of the finger and the characteristic shape of the palm appears in the scene image, the terminal device can determine that the scene image contains the user's hand, so that the information including the characteristic shape of the finger and the characteristic shape of the palm can be directly The above-mentioned target image containing the target object can be obtained by cutting out the partial image. In other embodiments, the terminal device can also directly locate the field of view of the image acquisition device to the hand region of the user, so that the target image containing the target object can be acquired in real time.
其中,上述场景图像或上述目标图像可以是终端设备利用其自身配置的图像采集装置获取的,也可以是通过外置图像采集装置获取的,即外置图像采集装置采集到多个场景图像或目标图像后可以通过有线或者无线的方式传输至终端设备,以供终端设备使用。本申请实施例中不管是终端设备自身配置的图像采集装置还是外置图像采集装置其均可以用于采集现实物体的图像以及采集目标场景的场景图像,且这二者既可以是红外相机也可以是可见相机,具体类型在本申请实施例中并不作为限定。The above-mentioned scene image or the above-mentioned target image may be acquired by the terminal device using an image acquisition device configured by itself, or may be acquired by an external image acquisition device, that is, the external image acquisition device may acquire multiple scene images or targets. The image can then be transmitted to the terminal device in a wired or wireless manner for use by the terminal device. In the embodiment of the present application, no matter it is the image acquisition device configured by the terminal device itself or the external image acquisition device, it can be used to collect the image of the real object and the scene image of the target scene, and the two can be either an infrared camera or an external image acquisition device. It is a visible camera, and the specific type is not limited in the embodiments of the present application.
需要说明的是,不论目标物体是手持物体还是用户手部,终端设备都可以对其进行跟踪,且跟踪的方式可以相同也可以不同,显然,为了实现对目标物体的跟踪目的终端设备获取的目标图像中必须包含有目标物体的图像。It should be noted that, regardless of whether the target object is a handheld object or a user's hand, the terminal device can track it, and the tracking method can be the same or different. Obviously, in order to achieve the purpose of tracking the target object, the terminal device obtains the target. The image must contain an image of the target object.
在一些实施方式中,目标图像中除了包含有目标物体之外还可以包括其他物体,这些物体可以与目标物体相关,也可以与目标物体无关。例如,当目标物体为棍棒时,该棍棒上可以设置有标记物,该标记物即与目标物体相关,本申请实施例中标记物可以是具有拓扑结构的图案也可以是光点式的标记,终端设备通过对该标记物的追踪可以获取棍棒的相对位置、姿态等空间位置信息,进而可实现对棍棒的定位及追踪。与目标物体无关的物体可以称为干扰物体,该干扰物体可以是现实场景中与虚拟内容显示无关的人或者物,具体的无关的人和物在本申请实施例中并不作详细赘述。In some embodiments, the target image may include other objects besides the target object, and these objects may or may not be related to the target object. For example, when the target object is a stick, a marker may be set on the stick, and the marker is related to the target object. The terminal device can obtain spatial position information such as the relative position and posture of the stick by tracking the marker, and then can realize the positioning and tracking of the stick. An object unrelated to the target object may be called an interfering object, and the interfering object may be a person or thing irrelevant to the display of virtual content in a real scene.
步骤S120:根据目标图像获取目标物体的轮廓信息。Step S120: Obtain contour information of the target object according to the target image.
在一种实施方式中,终端设备获取到目标图像后,可以通过对目标图像的识别与分析来获取目标图像中目标物体的轮廓信息。其中,目标物体的轮廓信息可以包括目标物体的外形的轮廓关键点。终端设备可以提取出目标图像中目标物体外形的轮廓关键点,以根据各轮廓关键点的位置分布,确定目标物体的轮廓信息。其中,目标物体外形的轮廓关键点,可以是等间隔排布,也可以是根据不同的特征位置对应排布,在此并不作限定。进一步地,当终端设备获取到包含有目标物体的多个目标图像,终端设备也可以对多个目标图像进行分析与识别,以准确获取到目标物体的三维轮廓信息。In one embodiment, after acquiring the target image, the terminal device may acquire contour information of the target object in the target image by identifying and analyzing the target image. The contour information of the target object may include contour key points of the contour of the target object. The terminal device can extract the contour key points of the shape of the target object in the target image, so as to determine the contour information of the target object according to the position distribution of each contour key point. The contour key points of the shape of the target object may be arranged at equal intervals, or may be arranged correspondingly according to different feature positions, which is not limited herein. Further, when the terminal device acquires multiple target images containing the target object, the terminal device can also analyze and identify the multiple target images, so as to accurately acquire the three-dimensional contour information of the target object.
在另一些实施方式中,终端设备获取到的目标物体的轮廓信息,也可以直接是目标物体的外形的线条、尺寸等信息。其中,线条可以是平滑的曲线,也可以是简化的折线。In other embodiments, the outline information of the target object acquired by the terminal device may also directly be information such as lines and dimensions of the outline of the target object. The lines can be smooth curves or simplified polylines.
步骤S130:确定当前显示的虚拟画面中待切换的第一虚拟内容。Step S130: Determine the first virtual content to be switched in the currently displayed virtual screen.
在本申请实施例中,终端设备在根据目标物体的轮廓信息进行虚拟内容的切换之前,可以确定当前显示的虚拟画面中待切换的第一虚拟内容。In the embodiment of the present application, before switching the virtual content according to the outline information of the target object, the terminal device may determine the first virtual content to be switched in the currently displayed virtual screen.
在一些实施例中,终端设备可以从虚拟画面中默认区域对应的显示内容,确定待切换的第一虚拟内容,也即在当前应用场景下,终端设备根据目标物体的轮廓信息,能切换的可以只有默认区域的虚拟内容。例如,枪击游戏场景中,虚拟游戏画面中虚拟人物的手持武器区域为用于切换的默认区域,该区域内的具体的枪支即为待切换的第一虚拟内容。In some embodiments, the terminal device can determine the first virtual content to be switched from the display content corresponding to the default area in the virtual screen, that is, in the current application scenario, the terminal device can switch the content according to the outline information of the target object. Only the virtual content of the default area. For example, in a shooting game scene, the area of the weapon held by the avatar in the virtual game screen is the default area for switching, and the specific gun in this area is the first virtual content to be switched.
在另一些实施例中,终端设备也可以是根据目标物体的轮廓信息确定的待切换的区域,从而可根据待切换的区域对应的显示内容,确定待切换的第一虚拟内容。作为一种方式,终端设备获取到目标物体的轮廓信息时,可以将该轮廓信息与预设轮廓信息进行匹配。如果目标物体的轮廓信息与预设轮廓信息匹配,则可以确定当前显示的虚拟画面中待切换的区域,从而根据待切换的区域的显示内容确定待切换的第一虚拟内容。例如,枪击游戏场景中,请参见图3a,目标物体为用户手部时,手部比出“枪”手势时对应的轮廓信息与预设装备轮廓信息匹配,终端设备可确定待切换的区域为虚拟游戏画面中虚拟人物的手持武器区域,待切换的第一虚拟内容即为手持武器区域内具体的手持武器。又例如,请参见图3b,手部比出“电话”手势时对应的轮廓信息与预设应用轮廓信息匹配,终端设备可确定待切换的区域为虚拟游戏画面的显示区域,待切换的第一虚拟内容即为整个虚拟游戏画面,也即待切换的第一虚拟内容是该游戏应用。In other embodiments, the terminal device may also be the area to be switched determined according to the outline information of the target object, so that the first virtual content to be switched may be determined according to the display content corresponding to the area to be switched. In one way, when the terminal device obtains the contour information of the target object, the contour information can be matched with the preset contour information. If the contour information of the target object matches the preset contour information, the area to be switched in the currently displayed virtual image can be determined, so as to determine the first virtual content to be switched according to the display content of the area to be switched. For example, in the shooting game scene, see Figure 3a, when the target object is the user's hand, the contour information corresponding to the hand showing the "gun" gesture matches the preset equipment contour information, and the terminal device can determine that the area to be switched is In the handheld weapon area of the avatar in the virtual game screen, the first virtual content to be switched is the specific handheld weapon in the handheld weapon area. For another example, referring to FIG. 3b, when the hand shows the "phone" gesture, the corresponding outline information matches the preset application outline information, and the terminal device can determine that the area to be switched is the display area of the virtual game screen, and the first area to be switched is the display area of the virtual game screen. The virtual content is the entire virtual game screen, that is, the first virtual content to be switched is the game application.
在一些实施方式中,终端设备中可以存储有多个类型的预设轮廓信息,每个类型的预设轮廓信息可包括多个具体的预设轮廓信息,该预设轮廓信息可以根据实际需要进行设定。例如,装备类型的预设武器轮廓信息可包括预设枪支轮廓信息、预设拳头轮廓信息、预设手雷轮廓信息等。预设轮廓信息的类型不相同,则其对应的待切换区域也不相同,即预设轮廓信息的类型和待切换区域通过一定的对应的关系存储于映射表中。换句话说,当目标物体的轮廓信息与目标类型的预设轮廓信息匹配时,终端设备可以从存储器中获取预设轮廓信息的类型和待切换区域之间的映射表,并基于所获取的映射表,根据目标类型获取其对应的待切换区域,从而根据待切换区域的显示内容确定第一虚拟内容。如映射表可设置为:预设轮廓信息的类型为A,其对应的待切换区域则为a;预设轮廓信息的类型为B,其对应的待切换区域则为b。In some embodiments, multiple types of preset contour information may be stored in the terminal device, each type of preset contour information may include multiple specific preset contour information, and the preset contour information may be performed according to actual needs set up. For example, the preset weapon outline information of the equipment type may include preset gun outline information, preset fist outline information, preset grenade outline information, and the like. If the types of the preset contour information are different, the corresponding to-be-switched regions are also different, that is, the types of the preset contour information and the to-be-switched regions are stored in the mapping table through a certain corresponding relationship. In other words, when the contour information of the target object matches the preset contour information of the target type, the terminal device can acquire the mapping table between the type of preset contour information and the area to be switched from the memory, and based on the acquired mapping table, and obtain the corresponding to-be-switched area according to the target type, so as to determine the first virtual content according to the display content of the to-be-switched area. For example, the mapping table can be set as: the type of the preset outline information is A, and the corresponding to-be-switched area is a; the type of the preset outline information is B, and the corresponding to-be-switched area is b.
在一些实施方式中,预设轮廓信息可以是预先设置好并存储于终端设备中的,也可以通过对用户的行为习惯分析后获取的,如用户习惯利用某个目标物体对虚拟内容进行切换操作时,可以将该目标物体的轮廓信息进行记录。需要说明的是,预设轮廓信息可以是固定不变的,也可以根据实际情况不断进行优化。例如,在第一时间段内终端设备由用户A使用,则可以根据用户A的操作习惯获取到第一预设轮廓信息a,在第二时间段内终端设备由用户B使用,则可以根据用户B的操作习惯获取到第二预设轮廓信息b,此时预设轮廓信息可以是最新获取的第二预设轮廓信息b,也可以是结合第一预设轮廓信息a和第二预设轮廓信息b综合获取的第三预设轮廓信息等。例如,第一预设轮廓信息为大致的长条形轮廓,第二预设轮廓信息为一定宽度的长方体轮廓时,第三预设轮廓信息可以是综合得到的一定宽度的长条形轮廓。可以理解的是,具体的预设轮廓信息设置方法在本申请实施例中并不作限定。In some embodiments, the preset outline information may be preset and stored in the terminal device, or may be obtained after analyzing the user's behavioral habits, such as the user's habit of using a certain target object to switch virtual content When , the contour information of the target object can be recorded. It should be noted that the preset contour information may be fixed, or may be continuously optimized according to the actual situation. For example, if the terminal device is used by user A in the first time period, the first preset profile information a can be obtained according to the operation habits of user A; in the second time period, the terminal device is used by user B, the B's operating habit acquires the second preset contour information b. At this time, the preset contour information may be the newly acquired second preset contour information b, or may be a combination of the first preset contour information a and the second preset contour information. Information b is the third preset contour information obtained comprehensively, and so on. For example, when the first preset contour information is a roughly elongated contour, and when the second preset contour information is a cuboid contour of a certain width, the third preset contour information may be a comprehensively obtained elongated contour of a certain width. It can be understood that, the specific method for setting the preset contour information is not limited in the embodiments of the present application.
步骤S140:根据轮廓信息获取第二虚拟内容,并将第一虚拟内容切换显示为第二虚拟内容。Step S140: Acquire the second virtual content according to the outline information, and switch and display the first virtual content as the second virtual content.
由于目标物体的轮廓信息可以包括目标物体外形的轮廓关键点、线条以及尺寸等,当终端设备获取到轮廓信息时,即可根据轮廓信息确定与轮廓信息匹配的第二虚拟内容,然后将该上述待切换的第一虚拟内容切换显示为该第二虚拟内容。从而仅通过目标物体的轮廓信息就可实现虚拟内容的快速切换,实现了切换操作的简单化。Since the contour information of the target object may include the contour key points, lines and dimensions of the target object, when the terminal device obtains the contour information, it can determine the second virtual content matching the contour information according to the contour information, and then use the above-mentioned contour information to determine the second virtual content that matches the contour information. The first virtual content to be switched is switched and displayed as the second virtual content. Therefore, the rapid switching of virtual content can be realized only through the outline information of the target object, and the simplification of the switching operation is realized.
在一些实施例中,与轮廓信息匹配的第二虚拟内容,可以是目标物体外形的轮廓信息与第二虚拟内容的轮廓信息匹配。例如,目标物体为长棍时,长棍的轮廓信息与虚拟长剑的轮廓信息匹配,则可确定与长棍的轮廓信息匹配的第二虚拟内容为虚拟长剑。In some embodiments, the second virtual content that matches the contour information may be that the contour information of the shape of the target object matches the contour information of the second virtual content. For example, when the target object is a long stick, and the outline information of the long stick matches the outline information of the virtual long sword, it can be determined that the second virtual content matching the outline information of the long stick is the virtual long sword.
在另一些实施例中,与轮廓信息匹配的第二虚拟内容,可以是目标物体外形的轮廓信息所表征的功能属性与第二虚拟内容的功能属性匹配。例如,请参见图4,目标物体为用户手部时,手部比出“方框”手势时对应的轮廓信息所表征的功能属性可以是相框,与虚拟相册应用程序的功能属性匹配,则可确定与手部的轮廓信息匹配的的第二虚拟内容为虚拟相册应用程序。In other embodiments, the second virtual content matched with the outline information may be that the functional attributes represented by the outline information of the shape of the target object match the functional attributes of the second virtual content. For example, referring to Fig. 4, when the target object is the user's hand, the functional attribute represented by the corresponding outline information when the hand is compared with the "box" gesture can be a photo frame, which matches the functional attribute of the virtual photo album application. It is determined that the second virtual content matching the contour information of the hand is a virtual photo album application.
在一些实施例中,上述第一虚拟内容与第二虚拟内容可具有相似属性和相似的功能,但二者的关键属性以及关键功能可以不同。作为一种方式,第一虚拟内容位于当前显示的虚拟画面中,且其在虚拟画面中起着重要的作用,即第一虚拟内容在终端设备中的状态是“被使用状态”或者“被选择状态”。第二虚拟内容可以位于当前显示的虚拟画面中,也可以未处于当前显示的虚拟画面中,第二虚拟内容在终端设备中的状态是“未使用状态”或者是“待选择状态”,任意一个第二虚拟内容均可以代替当前显示的第一虚拟内容。例如,当前显示的虚拟画面中待切换的第一虚拟内容为游戏装备中的枪支A,根据目标物体的轮廓信息获取的第二虚拟内容为拳头。其中,枪支A正在被游戏人物a使用,即枪支A所处的状态是“被使用”状态。拳头也可以位于虚拟画面中,不过其未被游戏人物a使用,或者其未显示于虚拟画面中,即拳头所处的状态是“未使用”状态,只有接收到对应的调用指令后拳头才能够显示于虚拟画面中。显然,枪支A与拳头具有相似的属性和功能,如拳头与枪支A都属于攻击属性,都可用于攻击敌人,但是这二者的关键属性和关键功能却不相同,如枪支A和拳头的外形不相同,或者枪支A的武力值比拳头的武力值更高。In some embodiments, the first virtual content and the second virtual content may have similar attributes and similar functions, but their key attributes and key functions may be different. As a way, the first virtual content is located in the currently displayed virtual picture, and it plays an important role in the virtual picture, that is, the state of the first virtual content in the terminal device is "used state" or "selected" state". The second virtual content may be located in the currently displayed virtual screen, or may not be in the currently displayed virtual screen, and the state of the second virtual content in the terminal device is an "unused state" or a "to-be-selected state", whichever one Either the second virtual content can replace the currently displayed first virtual content. For example, the first virtual content to be switched in the currently displayed virtual picture is the gun A in the game equipment, and the second virtual content obtained according to the outline information of the target object is the fist. Among them, the gun A is being used by the game character a, that is, the state of the gun A is the "used" state. The fist can also be located in the virtual screen, but it is not used by the game character a, or it is not displayed in the virtual screen, that is, the state of the fist is "unused", and the fist can only be used after receiving the corresponding call command. displayed on the virtual screen. Obviously, gun A and fist have similar properties and functions. For example, both fist and gun A are attack properties and can be used to attack the enemy, but the key attributes and key functions of the two are different, such as the shape of gun A and fist. Not the same, or the force value of gun A is higher than the force value of fist.
终端设备在得到第二虚拟内容之后,可以将第一虚拟内容切换显示为第二虚拟内容。具体的,终端设备可以获取目标切换指令,该目标切换指令可以是在获取到与轮廓信息匹配的第二虚拟内容时自动生成的指令。当终端设备获取到目标切换指令时,即可将虚拟画面中的第一虚拟内容切换为第二虚拟内容进行显示。作为一种方式,终端设备根据目标切换指令分别获取第一虚拟内容对应的第一标识和第二虚拟内容对应的第二标识;将第一虚拟内容对应的第一标识修改为第二虚拟内容对应的第二标识,进而可以将第一虚拟内容切换显示为第二虚拟内容。After obtaining the second virtual content, the terminal device may switch and display the first virtual content as the second virtual content. Specifically, the terminal device may acquire a target switching instruction, and the target switching instruction may be an instruction automatically generated when the second virtual content matching the outline information is acquired. When the terminal device obtains the target switching instruction, it can switch the first virtual content in the virtual screen to the second virtual content for display. As a method, the terminal device obtains the first identifier corresponding to the first virtual content and the second identifier corresponding to the second virtual content respectively according to the target switching instruction; the first identifier corresponding to the first virtual content is modified to correspond to the second virtual content The second identifier of the first virtual content can be switched to display the second virtual content.
本申请实施例提供的虚拟画面的控制方法中,终端设备通过分析包含目标物体的目标图像来获取目标物体的轮廓信息,然后通过对目标物体的轮廓信息确认,终端设备可以快速获取第一虚拟内容和第二虚拟内容。其中,第一虚拟内容处于当前显示的虚拟画面中,而第二虚拟内容则用于替换该第一虚拟内容。通过轮廓信息的确认,本申请实施例可以准确有效的将第一虚拟内容切换为第二虚拟内容,其切换操作简单且容易实现更加符合用户对虚拟内容的操作需求。In the virtual image control method provided by the embodiment of the present application, the terminal device obtains the outline information of the target object by analyzing the target image including the target object, and then by confirming the outline information of the target object, the terminal device can quickly obtain the first virtual content and second virtual content. The first virtual content is in the currently displayed virtual picture, and the second virtual content is used to replace the first virtual content. Through the confirmation of the profile information, the embodiment of the present application can accurately and effectively switch the first virtual content to the second virtual content, and the switching operation is simple and easy to implement, which more satisfies the user's operation requirements for the virtual content.
请参阅图5,本申请另一实施例提供了一种虚拟画面的控制方法,应用于终端设备,该方法可以包括:Referring to FIG. 5, another embodiment of the present application provides a method for controlling a virtual screen, which is applied to a terminal device. The method may include:
步骤S210:获取包含有目标物体的目标图像。Step S210: Acquire a target image including the target object.
步骤S220:根据目标图像获取目标物体的轮廓信息。Step S220: Obtain contour information of the target object according to the target image.
步骤S230:确定当前显示的虚拟画面中待切换的第一虚拟内容。Step S230: Determine the first virtual content to be switched in the currently displayed virtual screen.
步骤S240:根据轮廓信息获取第二虚拟内容,并将第一虚拟内容切换显示为第二虚拟内容。Step S240: Acquire the second virtual content according to the outline information, and switch and display the first virtual content as the second virtual content.
在一些实施例中,终端设备可根据目标物体的具体形状,进行虚拟内容的快速切换。具体地,如图6所示,上述根据轮廓信息获取第二虚拟内容,可以包括:步骤S241至步骤S242。In some embodiments, the terminal device can quickly switch the virtual content according to the specific shape of the target object. Specifically, as shown in FIG. 6 , the obtaining of the second virtual content according to the outline information may include steps S241 to S242 .
步骤S241:根据轮廓信息获取目标物体的形状。Step S241: Obtain the shape of the target object according to the contour information.
在一些实施方式中,终端设备获取到的轮廓信息为目标物体的外形的轮廓关键点时,可将各个轮廓关键点用线条依次连接,以得到目标物体的外形的轮廓线,从而终端设备可根据该轮廓线确定目标物体的形状。其中,线条可以是平滑的曲线,也可以是折线,在此并不作限定。例如,目标物体为长棍时,对应的轮廓线构成的形状可以是一个圆柱体形状;目标物体为手指时,手指比出的“枪”手势对应的轮廓线构成的形状可以是一个由两个长方体组成的组合体形状(类似手枪)。In some embodiments, when the contour information obtained by the terminal device is the contour key points of the shape of the target object, each of the contour key points can be sequentially connected with lines to obtain the contour line of the shape of the target object, so that the terminal device can The contour line determines the shape of the target object. The line may be a smooth curve or a polyline, which is not limited herein. For example, when the target object is a long stick, the shape formed by the corresponding contour line can be a cylinder shape; when the target object is a finger, the shape formed by the contour line corresponding to the "gun" gesture compared with the finger can be a shape composed of two The combined shape of a cuboid (similar to a pistol).
作为一种方式,可以预见建立形状数据库,该形状数据库中存储有多个形状。终端设备可将目标物体的轮廓线与形状数据库中的形状的轮廓线进行匹配,以获取到与目标物体的轮廓线匹配成功的目标形状,从而终端设备可以确定目标物体的形状为目标形状。其中,与目标物体的轮廓线匹配成功的目标形状,可以是匹配度大于匹配阈值的形状,如匹配度大于90%,也可以是最高匹配度对应的形状,在此并不进行限定。As one approach, it is envisaged to create a shape database in which a plurality of shapes are stored. The terminal device can match the contour line of the target object with the contour line of the shape in the shape database to obtain a target shape that successfully matches the contour line of the target object, so that the terminal device can determine the shape of the target object as the target shape. The target shape that successfully matches the contour of the target object may be a shape with a matching degree greater than a matching threshold, such as a matching degree greater than 90%, or a shape corresponding to the highest matching degree, which is not limited here.
步骤S242:获取与形状匹配的第二虚拟内容。Step S242: Acquire second virtual content that matches the shape.
终端设备在确定出目标物体的形状后,可以获取与形状匹配的第二虚拟内容。其中,与形状匹配的第二虚拟内容,可以第二虚拟内容的形状与目标物体的形状匹配,例如,目标物体为棍棒时,第二虚拟内容可以为虚拟棍棒;也可以是第二虚拟内容的功能属性与目标物体的形状所表征的功能属性匹配,例如,目标物体为手指时,手指比出的“电话”手势时,第二虚拟内容可为电话呼叫应用程序,二者的功能属性都为电话呼叫功能。After determining the shape of the target object, the terminal device may acquire second virtual content that matches the shape. The shape of the second virtual content that matches the shape of the second virtual content may match the shape of the target object. For example, when the target object is a stick, the second virtual content may be a virtual stick; The function attribute matches the function attribute represented by the shape of the target object. For example, when the target object is a finger, when the finger indicates the "telephone" gesture, the second virtual content can be a phone call application, and the function attributes of both are Phone call function.
在一些实施方式中,终端设备中可以存储有多个预设形状,预设轨迹可以根据实际需要进行设定,预设形状不相同则其对应的第一虚拟内容可以不相同,即预设形状和第二虚拟内容通过一定的对应的关系存储于映射表中,当目标物体的形状与预设形状匹配时,终端设备可以从起其存储器中获取预设形状与第二虚拟内容之间的映射表,并基于所获取的映射表,根据目标物体的形状获取其对应的第二虚拟内容。In some embodiments, the terminal device may store multiple preset shapes, and the preset trajectories may be set according to actual needs. If the preset shapes are different, the corresponding first virtual content may be different, that is, the preset shapes and the second virtual content are stored in the mapping table through a certain corresponding relationship. When the shape of the target object matches the preset shape, the terminal device can obtain the mapping between the preset shape and the second virtual content from its memory. table, and based on the acquired mapping table, acquire the corresponding second virtual content according to the shape of the target object.
在一些实施例中,当与形状匹配的虚拟内容有多个时,终端设备可根据用户的使用习惯确定第二虚拟内容。具体地,如图7所示,上述获取与形状匹配的第二虚拟内容,可以包括:步骤S2421至步骤S2423。In some embodiments, when there are multiple virtual contents matching the shape, the terminal device may determine the second virtual content according to the user's usage habits. Specifically, as shown in FIG. 7 , obtaining the second virtual content that matches the shape may include steps S2421 to S2423.
步骤S2421:获取与形状匹配的候选对象。Step S2421: Obtain candidate objects matching the shape.
终端设备在确定目标物体的形状时,可以根据该形状,获取所有与该形状匹配的候选对象。具体地,终端设备可以从存储器中查找是否存储有与目标物体的形状匹配的候选对象。如果未查找到终端设备中存储有与目标物体的形状匹配的候选对象,则表明没有与目标物体的形状匹配的虚拟内容,进而可以表明终端设备无法对第一虚拟内容进行虚拟内容切换操作。如果终端设备中存储有与目标物体的形状匹配的候选对象,终端设备可以获取其查找到的候选对象。When the terminal device determines the shape of the target object, it can acquire all candidate objects matching the shape according to the shape. Specifically, the terminal device may look up whether a candidate object matching the shape of the target object is stored in the memory. If no candidate object matching the shape of the target object is found stored in the terminal device, it indicates that there is no virtual content matching the shape of the target object, which further indicates that the terminal device cannot perform a virtual content switching operation on the first virtual content. If a candidate object matching the shape of the target object is stored in the terminal device, the terminal device can acquire the candidate object found by the terminal device.
在一些实施方式中,当其查找到的候选对象为一个时,终端设备可以直接将该候选对象作为上述第二虚拟内容进行切换显示,也即将当前显示的第一虚拟内容切换显示为该候选对象。并候选对象显示于虚拟画面中以供用户选择,In some embodiments, when it finds one candidate object, the terminal device can directly switch and display the candidate object as the second virtual content, that is, switch and display the currently displayed first virtual content as the candidate object . and the candidate objects are displayed in the virtual screen for the user to select,
在一种实施方式中,当其查找到的候选对象为多个时,终端设备可以将该多个候选对象显示于虚拟画面中以供用户选择,也可以自动选择最佳的候选对象。其中,最佳的候选对象可以根据具体应用场景具体确定。例如,游戏场景中,最佳的候选对象可以是最高攻击力对应的候选对象,也可以是最佳综合属性对应的候选对象。In an implementation manner, when there are multiple candidate objects found by the terminal device, the terminal device may display the multiple candidate objects on a virtual screen for the user to select, or may automatically select the best candidate object. Among them, the best candidate object can be specifically determined according to a specific application scenario. For example, in a game scene, the best candidate object may be the candidate object corresponding to the highest attack power, or the candidate object corresponding to the best comprehensive attribute.
步骤S2422:当候选对象为多个时,获取每个候选对象的使用频率。Step S2422: When there are multiple candidate objects, obtain the usage frequency of each candidate object.
在一些实施方式中,当终端设备获取到的候选对象为多个时,终端设备可以根据每个候选对象的使用频率确定第二虚拟内容。作为一种方式,终端设备可以实时记录每个候选对象处于“使用”状态的次数,并进行实时统计和排序,得到所有候选对象的使用频率排行榜。从而当终端设备获取到多个候选对象时,可以根据该使用频率排行榜确定每个候选对象的使用频率。In some embodiments, when there are multiple candidate objects acquired by the terminal device, the terminal device may determine the second virtual content according to the usage frequency of each candidate object. As a method, the terminal device can record the number of times each candidate object is in the "use" state in real time, and perform real-time statistics and sorting to obtain a ranking list of the use frequency of all candidate objects. Therefore, when the terminal device acquires multiple candidate objects, the usage frequency of each candidate object can be determined according to the usage frequency ranking list.
作为另一种方式,终端设备也可以实施记录每个候选对象处于“使用”状态的时长,并进行实时统计和排序,得到所有候选对象的使用频率排行榜,从而当终端设备获取到多个候选对象时,可以根据该使用频率排行榜确定每个候选对象的使用频率。As another method, the terminal device can also record the duration of each candidate object in the "use" state, and perform real-time statistics and sorting to obtain the usage frequency ranking of all candidate objects, so that when the terminal device obtains multiple candidates When the object is selected, the usage frequency of each candidate object can be determined according to the usage frequency ranking list.
例如,终端设备中与目标物体的形状匹配的候选对象有三个,分别是枪支301、枪支302以及枪支303,终端设备可以获取到枪支301的使用频率为55%,枪支302的使用频率为12%,枪支303的使用频率为33%,对这三个枪支的使用频率进行从高到低的排序得到的是枪支301、枪支303以及枪支302。For example, there are three candidate objects matching the shape of the target object in the terminal device, namely gun 301, gun 302, and
在一些实施方式中,获取到候选对象的使用频率频率的排序结果后终端设备可以对其进行显示,而用户则可以根据显示结果从高到低依次选取第二虚拟内容进行切换显示。In some embodiments, after obtaining the sorting result of the frequency of use of the candidate objects, the terminal device can display it, and the user can select the second virtual content from high to low for switching display according to the display result.
步骤S2423:获取最高使用频率对应的候选对象,作为第二虚拟内容。Step S2423: Obtain the candidate object corresponding to the highest frequency of use as the second virtual content.
在一些实施方式中,终端设备在获取每个候选对象的使用频率时,可以直接获取最高使用频率对应的候选对象,作为第二虚拟内容。具体地,终端设备可以根据上述实施更新的使用频率排行榜,从与形状匹配的多个候选对象中确定出最高使用频率对应的候选对象,作为第二虚拟内容。例如,上述举例中,终端设备可以将最高使用频率对应枪支301,作为第二虚拟内容。In some embodiments, when acquiring the usage frequency of each candidate object, the terminal device may directly acquire the candidate object corresponding to the highest usage frequency as the second virtual content. Specifically, the terminal device may determine the candidate object corresponding to the highest usage frequency from the plurality of candidate objects matching the shape according to the above-mentioned updated usage frequency ranking list, as the second virtual content. For example, in the above example, the terminal device may correspond to the firearm 301 with the highest frequency of use as the second virtual content.
在另一些实施例中,当目标物体为手部时,终端设备可以根据不同的手部确定,不同第二虚拟内容。具体地,在获取与形状匹配的第二虚拟内容之前,该虚拟内容的控制方法还可以包括:In other embodiments, when the target object is a hand, the terminal device may determine different second virtual content according to different hands. Specifically, before acquiring the second virtual content that matches the shape, the method for controlling the virtual content may further include:
根据目标图像确定手部对应的模式,模式包括左手模式、右手模式以及双手模式中的任一种。The mode corresponding to the hand is determined according to the target image, and the mode includes any one of a left-hand mode, a right-hand mode, and a two-hand mode.
在此实施例下,如图8所示,上述获取与形状匹配的第二虚拟内容,可以包括:步骤S2424至步骤S2425。In this embodiment, as shown in FIG. 8 , the obtaining of the second virtual content that matches the shape may include steps S2424 to S2425.
步骤S2424:根据形状确定手部对应的手势。Step S2424: Determine the gesture corresponding to the hand according to the shape.
步骤S2425:获取与模式以及手势匹配的第二虚拟内容。Step S2425: Acquire second virtual content matching the pattern and gesture.
在一些实施方式中,终端设备可以根据目标图像中的手指或手掌的数量,确定目标图像中包含用户的单手还是双手。当终端设备检测到目标图像中包含用户的双手时,确定此时处于双手模式,终端设备可以根据双手模式下的手势确定第二虚拟内容。当终端设备检测到目标图像中包含用户的单手时,确定此时处于单手模式,终端设备可以根据单手模式下的手势确定第二虚拟内容。其中,双手模式下确定的第二虚拟内容与单手模式下的手势确定第二虚拟内容,可以相同,也可以不相同,在此并不作限定。In some embodiments, the terminal device may determine whether the target image contains one hand or both hands of the user according to the number of fingers or palms in the target image. When the terminal device detects that the target image contains both hands of the user, it is determined that it is in the two-hand mode, and the terminal device can determine the second virtual content according to the gesture in the two-hand mode. When the terminal device detects that the target image contains a single hand of the user, it is determined that it is in the one-hand mode at this time, and the terminal device can determine the second virtual content according to the gesture in the one-hand mode. The second virtual content determined in the two-hand mode and the second virtual content determined by the gesture in the one-hand mode may be the same or different, which is not limited herein.
在一些实施方式中,当终端设备检测到目标图像中包含用户的单手时,终端设备可以根据目标图像中手部的具体姿态、手指的朝向、各个手指间的位置排布等信息,确定出手部为用户的左手还是用户的右手。当终端设备检测到目标图像中包含用户的左手时,终端设备可以根据左手模式下的手势确定第二虚拟内容。当终端设备检测到目标图像中包含用户的右手时,终端设备可以根据右手模式下的手势确定第二虚拟内容。其中,左手模式下确定的第二虚拟内容与右手模式下的手势确定第二虚拟内容,可以相同,也可以不相同,在此并不作限定。In some embodiments, when the terminal device detects that the target image contains a single hand of the user, the terminal device can determine the shot according to the specific posture of the hand in the target image, the orientation of the fingers, the positional arrangement between the fingers, and other information. Either the user's left hand or the user's right hand. When the terminal device detects that the target image contains the user's left hand, the terminal device may determine the second virtual content according to the gesture in the left-hand mode. When the terminal device detects that the target image contains the user's right hand, the terminal device may determine the second virtual content according to the gesture in the right-hand mode. The second virtual content determined in the left-hand mode and the second virtual content determined by the gesture in the right-hand mode may be the same or different, which is not limited herein.
例如,请参阅图9和图10,游戏场景中,第一虚拟内容为游戏人物a使用的武器拳头(图9)时,当用户用右手比出“枪”的手势时,终端设备可跟右手模式和“枪”的手势时,确定第二虚拟内容为默认枪支(图10中的203),并将当前游戏人物a使用的武器由拳头切换为默认枪支进行显示。又例如,当用户用左手比出“枪”的手势时,终端设备可跟左手模式和“枪”的手势时,确定第二虚拟内容为子弹,并将当前游戏人物a使用的武器默认枪支进行子弹装夹显示。又例如,当用户用双手比出“枪”的手势时,终端设备可跟双手模式和“枪”的手势时,确定第二虚拟内容为机枪(图10中的204),并将当前游戏人物a使用的武器由默认枪支切换为机枪进行显示。For example, please refer to FIG. 9 and FIG. 10. In the game scene, when the first virtual content is the weapon fist (FIG. 9) used by the game character a, when the user shows the "gun" gesture with the right hand, the terminal device can follow the right hand. When the mode and the "gun" gesture are selected, the second virtual content is determined as the default gun (203 in Figure 10), and the weapon used by the current game character a is switched from the fist to the default gun for display. For another example, when the user shows the "gun" gesture with the left hand, the terminal device can follow the left-hand mode and the "gun" gesture to determine that the second virtual content is a bullet, and use the default gun as the weapon used by the current game character a. Bullet loading display. For another example, when the user makes a gesture of "gun" with both hands, the terminal device can follow the two-hand mode and the gesture of "gun", determine that the second virtual content is a machine gun (204 in FIG. 10 ), and assign the current game character aThe weapon used is switched from the default gun to a machine gun for display.
在又一些实施例中,终端设备也可以根据目标物体的具体尺寸,确定第二虚拟内容。具体地,如图11所示,上述获取与形状匹配的第二虚拟内容,可以包括:步骤S2426至步骤S2428。In still other embodiments, the terminal device may also determine the second virtual content according to the specific size of the target object. Specifically, as shown in FIG. 11 , obtaining the second virtual content that matches the shape may include steps S2426 to S2428 .
步骤S2426:根据轮廓信息获取目标物体的形状和轮廓参数。Step S2426: Obtain the shape and contour parameters of the target object according to the contour information.
在一些实施方式中,终端设备获取到的轮廓信息为目标物体的外形的轮廓关键点时,可将各个轮廓关键点用线条依次连接,以得到目标物体的外形的轮廓线,从而终端设备可根据该轮廓线确定目标物体的轮廓参数。其中,轮廓参数可以是目标物体的长、宽、高等参数,也可以是目标物体的各个边的边长,曲面的弯曲角度等参数,在此并不作限定。In some embodiments, when the contour information obtained by the terminal device is the contour key points of the shape of the target object, each of the contour key points can be sequentially connected with lines to obtain the contour line of the shape of the target object, so that the terminal device can The contour line determines the contour parameters of the target object. The contour parameters may be parameters such as the length, width, and height of the target object, and may also be parameters such as the length of each side of the target object, the bending angle of the curved surface, etc., which are not limited here.
步骤S2427:获取与形状匹配的一个或多个候选对象。Step S2427: Obtain one or more candidate objects matching the shape.
步骤S2428:从一个或多个候选对象中获取与轮廓参数匹配的候选对象,作为第二虚拟内容。Step S2428: Obtain a candidate object matching the contour parameters from one or more candidate objects as the second virtual content.
在一些实施方式中,终端设备在获取到与目标物体的形状匹配的一个或多个候选对象时,可根据轮廓参数从一个或多个候选对象中确定第二虚拟内容。作为一种方式,当终端设备获取到与目标物体的形状匹配的一个候选对象时,终端设备可以直接将该候选对象作为第二虚拟内容进行切换显示。作为另一种方式,终端设备也可以根据具体地轮廓参数对候选对象的轮廓参数进行调整,以贴合目标物体的轮廓参数,并将调整后的候选对象作为第二虚拟内容进行切换显示。例如,当目标物体为塑料棒,匹配的候选对象仅为虚拟长剑时,终端设备可调整虚拟长剑的长度为塑料棒的长度,并将调整后的虚拟长剑进行切换显示。In some embodiments, when acquiring one or more candidate objects matching the shape of the target object, the terminal device may determine the second virtual content from the one or more candidate objects according to the contour parameter. In one way, when the terminal device acquires a candidate object that matches the shape of the target object, the terminal device can directly switch and display the candidate object as the second virtual content. As another way, the terminal device may also adjust the contour parameters of the candidate object according to the specific contour parameters to fit the contour parameters of the target object, and switch and display the adjusted candidate object as the second virtual content. For example, when the target object is a plastic rod and the matching candidate is only a virtual long sword, the terminal device can adjust the length of the virtual long sword to the length of the plastic rod, and switch the adjusted virtual long sword to display.
作为再一种方式,当终端设备获取到与目标物体的形状匹配的多个候选对象时,终端设备可以从多个候选对象中,获取到与目标物体的轮廓参数匹配的候选对象作为第二虚拟内容。其中,与目标物体的轮廓参数匹配的候选对象,可以是匹配度最高的候选对象,也可以是匹配度大于匹配阈值的候选对象,在此并不作限定。As a further way, when the terminal device acquires multiple candidate objects that match the shape of the target object, the terminal device may acquire, from the multiple candidate objects, the candidate object that matches the contour parameters of the target object as the second virtual object content. The candidate object matching the contour parameter of the target object may be the candidate object with the highest matching degree, or may be the candidate object whose matching degree is greater than the matching threshold, which is not limited herein.
在再一些实施例中,当与形状匹配的候选对象属于不同对象类别时,终端设备可先根据目标物体的具体尺寸,确定第二虚拟内容所属的对象类别后,再确定具体的第二虚拟内容。具体地,如图12所示,上述获取与形状匹配的第二虚拟内容,可以包括:步骤S2429至步骤S2433。In still other embodiments, when the candidate objects matching the shape belong to different object categories, the terminal device may first determine the object category to which the second virtual content belongs according to the specific size of the target object, and then determine the specific second virtual content . Specifically, as shown in FIG. 12 , obtaining the second virtual content that matches the shape may include steps S2429 to S2433 .
步骤S2429:根据轮廓信息获取目标物体的形状和轮廓参数。Step S2429: Obtain the shape and contour parameters of the target object according to the contour information.
步骤S2430:获取与形状匹配的一个或多个对象类别,并确定每个对象类别对应的参数条件。Step S2430: Acquire one or more object categories matching the shape, and determine the parameter conditions corresponding to each object category.
在一些实施方式中,当目标物体的形状比较普通时,与该形状匹配的候选对象可能有不同对象类别。因此,当终端设备在确定出目标物体的形状时,可以先确定出与形状匹配的一个或多个对象类别,并确定每个对象类别对应的参数条件,以便后续根据参数条件确定合适的对象类别。例如,当目标物体为棍棒时,棍棒的形状的细长条形,与该形状匹配的对象类别可以是匕首,棍棒,剑等,其中,匕首的长度参数条件是10cm~30cm,棍棒的长度参数条件是31cm~45cm,剑的长度参数条件是46cm~70cm。In some embodiments, when the shape of the target object is relatively common, candidate objects matching the shape may have different object categories. Therefore, when the terminal device determines the shape of the target object, it can first determine one or more object categories that match the shape, and determine the parameter conditions corresponding to each object category, so that the appropriate object category can be subsequently determined according to the parameter conditions. . For example, when the target object is a stick, the shape of the stick is a slender bar, and the object category matching this shape can be a dagger, a stick, a sword, etc., wherein the length parameter condition of the dagger is 10cm~30cm, and the length parameter of the stick The condition is 31cm~45cm, and the length parameter condition of the sword is 46cm~70cm.
步骤S2431:将轮廓参数与每个对象类别对应的参数条件进行匹配,获取轮廓参数对应的对象类别。Step S2431: Match the contour parameters with the parameter conditions corresponding to each object category to obtain the object category corresponding to the contour parameters.
在一些实施方式中,终端设备可以将目标物体的轮廓参数与上述每个对象类别对应的参数条件进行匹配,以获取与该轮廓参数对应的对象类别。具体地,可以判断目标物体的轮廓参数处于哪个对象类别的参数条件范围内,当轮廓参数处于目标对象类别的参数条件范围内时,可确定目标物体属于目标对象类别。例如,上述例子中,棍棒的长度为47cm时,对应的对象类别为剑。In some implementation manners, the terminal device may match the contour parameters of the target object with the parameter conditions corresponding to each of the foregoing object categories, so as to obtain the object category corresponding to the contour parameters. Specifically, it can be determined which object category the contour parameter of the target object is within the parameter condition range of the target object category, and when the contour parameter is within the parameter condition range of the target object category, it can be determined that the target object belongs to the target object category. For example, in the above example, when the length of the stick is 47cm, the corresponding object type is sword.
步骤S2432:获取对应的对象类别包含的一个或多个候选对象。Step S2432: Obtain one or more candidate objects included in the corresponding object category.
步骤S2433:从一个或多个候选对象中获取与轮廓参数匹配的候选对象,作为第二虚拟内容。Step S2433: Obtain candidate objects matching the contour parameters from one or more candidate objects as the second virtual content.
在一些实施方式中,终端设备确定候选对象的对象类别时,可以获取该对象类别下的一个或多个候选对象。当该对象类别下仅有一个候选对象时,终端设备可以直接将该候选对象作为第二虚拟内容进行切换显示,也可以根据目标物体的轮廓参数具体调整该候选对象的轮廓参数。当该对象类别下有多个候选对象时,终端设备可以从多个候选对象中,获取到与目标物体的轮廓参数匹配的候选对象作为第二虚拟内容。其中,与目标物体的轮廓参数匹配的候选对象,可以是匹配度最高的候选对象,也可以是匹配度大于匹配阈值的候选对象,在此并不作限定。In some embodiments, when the terminal device determines the object category of the candidate object, it can acquire one or more candidate objects under the object category. When there is only one candidate object under the object category, the terminal device can directly switch and display the candidate object as the second virtual content, or can specifically adjust the outline parameters of the candidate object according to the outline parameters of the target object. When there are multiple candidate objects under the object category, the terminal device may obtain, from the multiple candidate objects, a candidate object that matches the contour parameters of the target object as the second virtual content. The candidate object matching the contour parameter of the target object may be the candidate object with the highest matching degree, or may be the candidate object whose matching degree is greater than the matching threshold, which is not limited herein.
在还一些实施例中,终端设备还可以根据目标物体的材质信息,对第二虚拟内容进行渲染,以贴合目标物体的视觉效果。具体地,如图13所示,上述获取与形状匹配的第二虚拟内容,可以包括:步骤S2434至步骤S2437。In still other embodiments, the terminal device may further render the second virtual content according to the material information of the target object, so as to fit the visual effect of the target object. Specifically, as shown in FIG. 13 , the obtaining of the second virtual content that matches the shape may include steps S2434 to S2437 .
步骤S2434:根据目标图像获取目标物体的材质信息。Step S2434: Acquire material information of the target object according to the target image.
在一些实施方式中,材质信息可以是目标物体中最大面积所对应的材质信息。作为一种方式,终端设备可以对目标物体表面的颜色、纹路、图案以及组合进行识别和分析,以确定出布局面积最大的特征区域,然后终端设备可以从特征区域中提取部分区域的图像作为目标物体的材质信息。In some embodiments, the material information may be material information corresponding to the largest area in the target object. As a way, the terminal device can identify and analyze the color, texture, pattern and combination of the surface of the target object to determine the feature area with the largest layout area, and then the terminal device can extract the image of a part of the area from the feature area as the target The material information of the object.
步骤S2435:根据轮廓信息获取第二虚拟内容。Step S2435: Acquire the second virtual content according to the outline information.
步骤S2436:获取与材质信息匹配的预设纹理信息。Step S2436: Acquire preset texture information matching the material information.
在一些实施方式中,终端设备可以存储有多个预设纹理信息,当确定目标物体的材质信息后,终端设备可以根据将该材质信息与预设纹理信息进行匹配,以从多个预设纹理信息获取到与材质信息匹配的预设纹理信息。其中,与材质信息匹配的预设纹理信息,可以是匹配度最高的预设纹理信息,也可以是匹配度大于匹配阈值的预设纹理信息。In some embodiments, the terminal device may store a plurality of preset texture information. After determining the material information of the target object, the terminal device may match the material information with the preset texture information to obtain the information from the multiple preset textures. The information obtains the preset texture information that matches the material information. The preset texture information that matches the material information may be preset texture information with the highest matching degree, or may be preset texture information whose matching degree is greater than a matching threshold.
步骤S2437:根据预设纹理信息渲染第二虚拟内容,并将第一虚拟内容切换显示为渲染后的第二虚拟内容。Step S2437: Render the second virtual content according to the preset texture information, and switch and display the first virtual content as the rendered second virtual content.
终端设备在获取到预设纹理信息后,可以根据预设纹理信息渲染第二虚拟内容,并将第一虚拟内容切换显示为渲染后的第二虚拟内容,从而可以使切换后的虚拟内容与目标物体贴合,同时也使切换后的虚拟内容具有个性化效果。After acquiring the preset texture information, the terminal device can render the second virtual content according to the preset texture information, and switch the first virtual content to be displayed as the rendered second virtual content, so that the switched virtual content can be connected to the target. The objects fit together, and at the same time, the switched virtual content has a personalized effect.
本申请实施例提供的虚拟画面的控制方法中,终端设备通过分析包含目标物体的目标图像来获取目标物体的轮廓信息,然后通过轮廓信息确认目标物体的形状和轮廓参数,终端设备可以快速获取第一虚拟内容和第二虚拟内容。其中,第一虚拟内容处于当前显示的虚拟画面中,而第二虚拟内容则用于替换该第一虚拟内容。通过目标物体的形状和轮廓参数的确认,本申请实施例可以准确有效的将第一虚拟内容切换为第二虚拟内容,其切换操作简单且容易实现更加符合用户对虚拟内容的操作需求。In the virtual screen control method provided by the embodiment of the present application, the terminal device obtains the contour information of the target object by analyzing the target image including the target object, and then confirms the shape and contour parameters of the target object through the contour information, so that the terminal device can quickly obtain the first A virtual content and a second virtual content. The first virtual content is in the currently displayed virtual picture, and the second virtual content is used to replace the first virtual content. Through the confirmation of the shape and contour parameters of the target object, the embodiment of the present application can accurately and effectively switch the first virtual content to the second virtual content, and the switching operation is simple and easy to implement, which better meets the user's operation requirements for the virtual content.
请参阅图14,本申请又一实施例提供了一种虚拟画面的控制方法,应用于终端设备,该方法可以包括:Referring to FIG. 14, another embodiment of the present application provides a method for controlling a virtual screen, which is applied to a terminal device. The method may include:
步骤S310:获取包含有目标物体的目标图像。Step S310: Acquire a target image including the target object.
步骤S320:根据目标图像获取目标物体的轮廓信息。Step S320: Obtain contour information of the target object according to the target image.
步骤S330:确定当前显示的虚拟画面中待切换的第一虚拟内容。Step S330: Determine the first virtual content to be switched in the currently displayed virtual screen.
其中,如图15所示步骤S330可以包括步骤S331至步骤S332。Wherein, as shown in FIG. 15, step S330 may include steps S331 to S332.
步骤S331:获取用户身份信息,并根据用户身份信息读取用户个人数据。Step S331: Obtain user identity information, and read user personal data according to the user identity information.
在一种实施方式中,用户的身份信息可以包括用户身份标识和登录密码等,终端设备可以从智能卡或芯片中获取用户身份信息,其中,智能卡可以包括用户识别模块(SIM)卡;也可以从无线网络中获取用户身份信息等。用户身份信息和用户个人数据通过一一对应的方式存储于终端设备或者云端,当获取到用户的身份信息后,即可以根据该身份信息查找到与其对应的用户个人数据,用户个人数据可以包括用户的基础数据、操作数据以及状态数据等。其中,基础数据指的是用户的个人基础信息,如用户的性别、年龄、爱好等;操作数据指的是用户使用终端设备时惯用的一些操作,如用户在利用终端设备玩游戏时,其习惯通过“电话”手速来实现微信应用程序的切换;状态数据则指的是终端设备所处的状态以及该状态所对应的时间,常见的状态包括在线、离线、隐身以及勿打扰等。In one embodiment, the user's identity information may include a user's identity identifier and a login password, etc., and the terminal device may obtain the user's identity information from a smart card or chip, wherein the smart card may include a Subscriber Identity Module (SIM) card; Obtain user identity information in wireless network, etc. User identity information and user personal data are stored in the terminal device or the cloud through a one-to-one correspondence. After the user's identity information is obtained, the corresponding user personal data can be found according to the identity information. User personal data can include the user's personal data. basic data, operational data, and status data. Among them, basic data refers to the user's personal basic information, such as the user's gender, age, hobbies, etc.; operation data refers to some operations that the user is accustomed to when using the terminal device, such as the user's habits when using the terminal device to play games. The switching of WeChat applications is realized through the "telephone" hand speed; the status data refers to the status of the terminal device and the time corresponding to the status. Common statuses include online, offline, invisible, and do not disturb.
步骤S332:根据用户个人数据确定当前显示的虚拟画面中待切换的第一虚拟内容。Step S332: Determine the first virtual content to be switched in the currently displayed virtual screen according to the user's personal data.
在一些实施方式中,终端设备通过用户的身份信息获取到其对应的用户个人数据后,可以对用户的个人数据进行分析,得到个人数据分析结果,而后可以根据其获取的个人数据分析结果确定当前显示的虚拟画面中轮廓信息对应的待切换的第一虚拟内容。对于相同的轮廓信息,不同的用户所切换的第一虚拟内容可以是相同的也可以是不同的,而每个用户都具有自己特有的行为习惯,因此,终端设备可以根据不同用户的行为习惯制定不同的虚拟内容切换方案。在一种实施方式中,可以利用终端设备的内置图像采集装置或者外置的图像采集装置获取不同时刻包括用户行为动作的图像,而后可以对这些不同时刻的图像进行特征提取、识别以及分析,进而可以得到用户的行为习惯,而根据该行为习惯即可确定当前显示的虚拟画面中与运动轨迹对应的第一虚拟内容。In some embodiments, after obtaining the corresponding user personal data through the user's identity information, the terminal device can analyze the user's personal data to obtain a personal data analysis result, and then can determine the current state according to the obtained personal data analysis result. The first virtual content to be switched corresponding to the outline information in the displayed virtual picture. For the same profile information, the first virtual content switched by different users may be the same or different, and each user has its own unique behavior. Different virtual content switching scenarios. In an embodiment, the built-in image acquisition device or the external image acquisition device of the terminal device can be used to acquire images including user behaviors at different times, and then feature extraction, identification, and analysis can be performed on the images at different times, and then The behavior habit of the user can be obtained, and according to the behavior habit, the first virtual content corresponding to the motion track in the currently displayed virtual picture can be determined.
步骤S340:根据轮廓信息获取第二虚拟内容,并将第一虚拟内容切换显示为第二虚拟内容。Step S340: Acquire the second virtual content according to the outline information, and switch and display the first virtual content as the second virtual content.
本申请实施例提供的虚拟画面的控制方法中,终端设备通过分析包含目标物体的目标图像来获取目标物体的轮廓信息,然后通过对目标物体轮廓信息的确认终端设备可以快速获取第一虚拟内容和第二虚拟内容,其中,第一虚拟内容处于当前显示的虚拟画面中,该第一虚拟内容可以通过用户的个人数据获取,其中,用户的个人数据包括用户的行为习惯数据,该行为习惯数据可以借助人工智能算法获取,本申请实施例通过用户的行为习惯数据获取第一虚拟内容,可以使虚拟画面的控制更加智能化,其不仅操作简单而且更符合用户对虚拟内容的操作需求。In the virtual image control method provided by the embodiment of the present application, the terminal device obtains the contour information of the target object by analyzing the target image including the target object, and then the terminal device can quickly obtain the first virtual content and the first virtual content by confirming the contour information of the target object. The second virtual content, wherein the first virtual content is in the currently displayed virtual screen, the first virtual content can be obtained through the user's personal data, wherein the user's personal data includes the user's behavioral habit data, and the behavioral habit data can be With the help of the artificial intelligence algorithm, the embodiment of the present application obtains the first virtual content through the user's behavior habit data, which can make the control of the virtual screen more intelligent, which is not only simple to operate, but also more in line with the user's operation requirements for the virtual content.
请参阅图16,其示出了本申请实施例提供的一种虚拟画面的控制装置400的结构框图,该装置可以包括:图像获取模块410、信息识别模块420、内容确定模块430以及内容切换模块440,其中,图像获取模块410用于获取包含有目标物体的目标图像;信息识别模块420用于根据目标图像获取目标物体的轮廓信息;内容确定模块430用于确定当前显示的虚拟画面中待切换的第一虚拟内容;内容切换模块440用于根据轮廓信息获取第二虚拟内容,并将第一虚拟内容切换显示为第二虚拟内容。Please refer to FIG. 16 , which shows a structural block diagram of an apparatus 400 for controlling a virtual screen provided by an embodiment of the present application. The apparatus may include: an image acquisition module 410 , an information identification module 420 , a content determination module 430 , and a content switching module 440, wherein, the image acquisition module 410 is used to acquire the target image containing the target object; the information recognition module 420 is used to acquire the outline information of the target object according to the target image; the content determination module 430 is used to determine the currently displayed virtual screen to be switched The content switching module 440 is configured to acquire the second virtual content according to the outline information, and switch and display the first virtual content as the second virtual content.
在一些实施例中,内容切换模块可以包括:形状获取单元和内容获取单元。其中,形状获取单元用于根据轮廓信息获取目标物体的形状;内容获取单元用于获取与形状匹配的第二虚拟内容。In some embodiments, the content switching module may include: a shape acquisition unit and a content acquisition unit. Wherein, the shape obtaining unit is used for obtaining the shape of the target object according to the outline information; the content obtaining unit is used for obtaining the second virtual content matching the shape.
在一些实施方式中,内容获取单元可以具体用于:获取与形状匹配的候选对象;当候选对象为多个时,获取每个候选对象的使用频率;获取最高使用频率对应的候选对象,作为第二虚拟内容。In some embodiments, the content acquisition unit may be specifically configured to: acquire candidate objects matching the shape; when there are multiple candidate objects, acquire the usage frequency of each candidate object; acquire the candidate object corresponding to the highest usage frequency as the first candidate object 2. Virtual content.
在一些实施方式中,目标物体为手部,虚拟画面的控制装置400还可以包括:模式确定模块。其中,模式确定模块用于根据目标图像确定手部对应的模式,模式包括左手模式、右手模式以及双手模式中的任一种。In some embodiments, the target object is a hand, and the control device 400 of the virtual picture may further include: a mode determination module. The mode determination module is configured to determine the mode corresponding to the hand according to the target image, and the mode includes any one of a left-hand mode, a right-hand mode, and a two-hand mode.
在该实施方式下,内容获取单元可以具体用于:根据形状确定手部对应的手势;获取与模式以及手势匹配的第二虚拟内容。In this implementation manner, the content acquisition unit may be specifically configured to: determine the gesture corresponding to the hand according to the shape; and acquire the second virtual content matching the mode and the gesture.
在一些实施例中,内容切换模块440可以具体用于:根据轮廓信息获取目标物体的形状和轮廓参数;获取与形状匹配的一个或多个候选对象;从一个或多个候选对象中获取与轮廓参数匹配的候选对象,作为第二虚拟内容。In some embodiments, the content switching module 440 may be specifically configured to: obtain the shape and contour parameters of the target object according to the contour information; obtain one or more candidate objects matching the shape; obtain and contour from the one or more candidate objects The candidate object matched by the parameter is used as the second virtual content.
在一些实施例中,内容切换模块440还可以具体用于:根据轮廓信息获取目标物体的形状和轮廓参数;获取与形状匹配的一个或多个对象类别,并确定每个对象类别对应的参数条件;将轮廓参数与每个对象类别对应的参数条件进行匹配,获取轮廓参数对应的对象类别;获取对应的对象类别包含的一个或多个候选对象;从一个或多个候选对象中获取与轮廓参数匹配的候选对象,作为第二虚拟内容。In some embodiments, the content switching module 440 may also be specifically configured to: obtain the shape and contour parameters of the target object according to the contour information; obtain one or more object categories matching the shape, and determine the parameter conditions corresponding to each object category ; Match the contour parameters with the parameter conditions corresponding to each object category, and obtain the object category corresponding to the contour parameters; obtain one or more candidate objects contained in the corresponding object category; obtain and contour parameters from one or more candidate objects The matched candidate object is used as the second virtual content.
在一些实施例中,内容切换模块440还可以具体用于:根据目标图像获取目标物体的材质信息;根据轮廓信息获取第二虚拟内容;获取与材质信息匹配的预设纹理信息;根据预设纹理信息渲染第二虚拟内容,并将第一虚拟内容切换显示为渲染后的第二虚拟内容。In some embodiments, the content switching module 440 may also be specifically configured to: obtain the material information of the target object according to the target image; obtain the second virtual content according to the outline information; obtain preset texture information matching the material information; The information renders the second virtual content, and switches and displays the first virtual content as the rendered second virtual content.
本申请实施例提供的虚拟画面的控制装置中,通过分析包含目标物体的目标图像来获取目标物体的轮廓信息,然后通过对目标物体的轮廓信息确认,终端设备可以快速获取第一虚拟内容和第二虚拟内容。其中,第一虚拟内容处于当前显示的虚拟画面中,而第二虚拟内容则用于替换该第一虚拟内容。通过轮廓信息的确认,本申请实施例可以准确有效的将第一虚拟内容切换为第二虚拟内容,其切换操作简单且容易实现更加符合用户对虚拟内容的操作需求。In the virtual screen control device provided by the embodiment of the present application, the contour information of the target object is obtained by analyzing the target image including the target object, and then the terminal device can quickly obtain the first virtual content and the first virtual content by confirming the contour information of the target object. 2. Virtual content. The first virtual content is in the currently displayed virtual picture, and the second virtual content is used to replace the first virtual content. Through the confirmation of the profile information, the embodiment of the present application can accurately and effectively switch the first virtual content to the second virtual content, and the switching operation is simple and easy to implement, which more satisfies the user's operation requirements for the virtual content.
请参考图17,其示出了本申请实施例提供的一种终端设备的结构框图。该终端设备100可以是头戴显示装置等能够运行应用程序的终端设备。本申请中的终端设备100可以包括一个或多个如下部件:处理器110、存储器120,其中存储器120中存储有一个或多个应用程序,一个或多个应用程序被配置为由一个或多个处理器110执行,一个或多个程序配置用于执行如前述方法实施例所描述的方法。Please refer to FIG. 17 , which shows a structural block diagram of a terminal device provided by an embodiment of the present application. The
处理器110可以包括一个或者多个处理核。处理器110利用各种接口和线路连接整个终端设备100内的各个部分,通过运行或执行存储在存储器120内的指令、程序、代码集或指令集,以及调用存储在存储器120内的数据,执行终端设备100的各种功能和处理数据。可选地,处理器110可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable LogicArray,PLA)中的至少一种硬件形式来实现。处理器110可集成中央处理器(CentralProcessing Unit,CPU)、图像处理器(Graphics Processing Unit,GPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责显示内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器110中,单独通过一块通信芯片进行实现。The
存储器120可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory)。存储器120可用于存储指令、程序、代码、代码集或指令集。存储器120可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于实现至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现下述各个方法实施例的指令等。存储数据区还可以存储终端设备100在使用中所创建的数据等。The
在一些实施例中,终端设备100还可以包括图像传感器130,用于采集现实物体的图像以及采集目标场景的场景图像。图像传感器130可以为红外相机,也可以是可见光相机,具体类型在本申请实施例中并不作为限定。In some embodiments, the
在一个实施例中,终端设备为头戴显示装置,除了包括上述的处理器、存储器及图像采集装置外,还可包括如下一个或多个部件:图像采集装置、显示模组、光学模组、通信模块以及电源。In one embodiment, the terminal device is a head-mounted display device, which, in addition to the above-mentioned processor, memory, and image acquisition device, may also include one or more of the following components: an image acquisition device, a display module, an optical module, Communication module and power supply.
图像采集装置,用于采集现实物体的图像以及采集目标场景的场景图像。图像采集装置可以为红外相机,也可以是可见光相机,具体类型在本申请实施例中并不作为限定。The image acquisition device is used to collect the image of the real object and the scene image of the target scene. The image acquisition device may be an infrared camera or a visible light camera, and the specific type is not limited in the embodiments of the present application.
显示模组可包括显示控制单元。显示控制单元用于接收处理器渲染后的虚拟内容的显示图像,然后将该显示图像显示并投射至光学模组上,使用户能够通过光学模组观看到虚拟内容。其中,显示模组可以是显示屏或投射装置等,可用于显示图像。The display module may include a display control unit. The display control unit is configured to receive the display image of the virtual content rendered by the processor, and then display and project the display image to the optical module, so that the user can view the virtual content through the optical module. The display module may be a display screen or a projection device, etc., and may be used to display images.
光学模组可采用离轴光学系统或波导光学系统,显示模组显示的显示图像经光学模组后,能够被投射至用户的眼睛。用户在通过光学模组看到显示模组投射的显示图像的同时。在一些实施方式中,用户还能够透过光学模组观察到现实环境,感受虚拟内容与现实环境叠加后的增强现实效果。The optical module may adopt an off-axis optical system or a waveguide optical system, and the display image displayed by the display module can be projected to the user's eyes after passing through the optical module. The user sees the display image projected by the display module through the optical module. In some embodiments, the user can also observe the real environment through the optical module, and feel the augmented reality effect after the virtual content and the real environment are superimposed.
通信模块可以是蓝牙、WiFi(Wireless-Fidelity,无线保真)、ZigBEE(紫峰技术)等模块,头戴显示装置可通过通信模块与终端设备建立通信连接。与终端设备通信连接的头戴显示装置,可以与终端设备进行信息以及指令的交互。例如,头戴显示装置可以通过通信模块接收终端设备的发送的图像数据,根据所接收的图像数据生成虚拟世界的虚拟内容进行显示。The communication module may be a module such as Bluetooth, WiFi (Wireless-Fidelity, wireless fidelity), ZigBEE (Zifeng technology), etc. The head-mounted display device can establish a communication connection with the terminal device through the communication module. The head-mounted display device communicatively connected with the terminal device can interact with the terminal device for information and instructions. For example, the head-mounted display device may receive image data sent by the terminal device through the communication module, and generate virtual content of the virtual world for display according to the received image data.
电源可为整个头戴显示装置进行供电,保证头戴显示装置各个部件的正常运行。The power supply can supply power to the entire head-mounted display device to ensure the normal operation of each component of the head-mounted display device.
请参考图18,其示出了本申请实施例提供的一种计算机可读存储介质的结构框图。该计算机可读存储介质900中存储有程序代码,程序代码可被处理器调用执行上述方法实施例中所描述的方法。Please refer to FIG. 18 , which shows a structural block diagram of a computer-readable storage medium provided by an embodiment of the present application. The computer-readable storage medium 900 stores program codes, and the program codes can be invoked by the processor to execute the methods described in the above method embodiments.
该计算机可读存储介质900可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。可选地,计算机可读存储介质900包括非易失性计算机可读介质(non-transitory computer-readable storage medium)。计算机可读存储介质900具有执行上述方法中的任何方法步骤的程序代码910的存储空间。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。程序代码910可以例如以适当形式进行压缩。The computer-readable storage medium 900 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM. Optionally, the computer-readable storage medium 900 includes a non-transitory computer-readable storage medium. Computer readable storage medium 900 has storage space for
最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不驱使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand: it can still be Modifications are made to the technical solutions described in the foregoing embodiments, or some technical features thereof are equivalently replaced; and these modifications or replacements do not drive the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201911073061.XA CN110688018B (en) | 2019-11-05 | 2019-11-05 | Virtual screen control method, device, terminal equipment and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201911073061.XA CN110688018B (en) | 2019-11-05 | 2019-11-05 | Virtual screen control method, device, terminal equipment and storage medium |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN110688018A true CN110688018A (en) | 2020-01-14 |
| CN110688018B CN110688018B (en) | 2023-12-19 |
Family
ID=69116671
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201911073061.XA Active CN110688018B (en) | 2019-11-05 | 2019-11-05 | Virtual screen control method, device, terminal equipment and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN110688018B (en) |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111638794A (en) * | 2020-06-04 | 2020-09-08 | 上海商汤智能科技有限公司 | Display control method and device for virtual cultural relics |
| CN113327329A (en) * | 2020-12-15 | 2021-08-31 | 广州富港万嘉智能科技有限公司 | Indoor projection method, device and system based on three-dimensional model |
| CN115965715A (en) * | 2021-10-13 | 2023-04-14 | 腾讯科技(深圳)有限公司 | Information display method, information display device, computer equipment and storage medium |
| CN116489468A (en) * | 2023-03-24 | 2023-07-25 | 深圳市千岩科技有限公司 | Position determination method, device, terminal device and storage medium |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| AU2014100583A4 (en) * | 2013-06-09 | 2014-07-03 | Apple Inc. | Device, method, and graphical user interface for switching between camera interfaces |
| US20140362274A1 (en) * | 2013-06-09 | 2014-12-11 | Apple Inc. | Device, method, and graphical user interface for switching between camera interfaces |
| US9383895B1 (en) * | 2012-05-05 | 2016-07-05 | F. Vinayak | Methods and systems for interactively producing shapes in three-dimensional space |
| US20180075661A1 (en) * | 2014-12-30 | 2018-03-15 | Qingdao Goertek Technology Co., Ltd. | Method for reproducing object in 3d scene and virtual reality head-mounted device |
| WO2018076912A1 (en) * | 2016-10-28 | 2018-05-03 | 捷开通讯(深圳)有限公司 | Virtual scene adjusting method and head-mounted intelligent device |
| US20180345146A1 (en) * | 2015-11-27 | 2018-12-06 | Earthbeat, Inc. | Game image processing system and program |
-
2019
- 2019-11-05 CN CN201911073061.XA patent/CN110688018B/en active Active
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9383895B1 (en) * | 2012-05-05 | 2016-07-05 | F. Vinayak | Methods and systems for interactively producing shapes in three-dimensional space |
| AU2014100583A4 (en) * | 2013-06-09 | 2014-07-03 | Apple Inc. | Device, method, and graphical user interface for switching between camera interfaces |
| US20140362274A1 (en) * | 2013-06-09 | 2014-12-11 | Apple Inc. | Device, method, and graphical user interface for switching between camera interfaces |
| US20180075661A1 (en) * | 2014-12-30 | 2018-03-15 | Qingdao Goertek Technology Co., Ltd. | Method for reproducing object in 3d scene and virtual reality head-mounted device |
| US20180345146A1 (en) * | 2015-11-27 | 2018-12-06 | Earthbeat, Inc. | Game image processing system and program |
| WO2018076912A1 (en) * | 2016-10-28 | 2018-05-03 | 捷开通讯(深圳)有限公司 | Virtual scene adjusting method and head-mounted intelligent device |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111638794A (en) * | 2020-06-04 | 2020-09-08 | 上海商汤智能科技有限公司 | Display control method and device for virtual cultural relics |
| CN113327329A (en) * | 2020-12-15 | 2021-08-31 | 广州富港万嘉智能科技有限公司 | Indoor projection method, device and system based on three-dimensional model |
| CN115965715A (en) * | 2021-10-13 | 2023-04-14 | 腾讯科技(深圳)有限公司 | Information display method, information display device, computer equipment and storage medium |
| CN116489468A (en) * | 2023-03-24 | 2023-07-25 | 深圳市千岩科技有限公司 | Position determination method, device, terminal device and storage medium |
Also Published As
| Publication number | Publication date |
|---|---|
| CN110688018B (en) | 2023-12-19 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN111580652B (en) | Video playback control method, device, augmented reality device and storage medium | |
| JP7703596B2 (en) | Method, device, terminal and storage medium for controlling virtual objects | |
| US10814221B2 (en) | Method for locking target in game scenario and terminal | |
| CN111766937B (en) | Virtual content interaction method and device, terminal equipment and storage medium | |
| CN110688018B (en) | Virtual screen control method, device, terminal equipment and storage medium | |
| CN111158469A (en) | Viewing angle switching method, device, terminal device and storage medium | |
| CN108876878B (en) | Head portrait generation method and device | |
| WO2022247592A1 (en) | Virtual prop switching method and apparatus, terminal, and storage medium | |
| JP2019537763A (en) | Method and system for gesture-based interaction | |
| CN111913674B (en) | Virtual content display method, device, system, terminal equipment and storage medium | |
| CN108273265A (en) | The display methods and device of virtual objects | |
| CN111913565A (en) | Virtual content control method, device, system, terminal device and storage medium | |
| CN108038726A (en) | Article display method and device | |
| CN110866940B (en) | Virtual screen control method, device, terminal equipment and storage medium | |
| CN107527046A (en) | Solve lock control method and Related product | |
| CN113411537A (en) | Video call method, device, terminal and storage medium | |
| CN111273777A (en) | Control method, device, electronic device and storage medium for virtual content | |
| CN111766936A (en) | Control method, device, terminal device and storage medium for virtual content | |
| CN108563327B (en) | Augmented reality method, device, storage medium and electronic device | |
| JP6514376B1 (en) | Game program, method, and information processing apparatus | |
| CN108255397A (en) | Control performs method, apparatus, storage medium and electronic device | |
| CN116954367A (en) | Virtual reality interaction method, system and equipment | |
| CN105468249A (en) | Intelligent interaction system and control method therefor | |
| CN108543308B (en) | Method and device for selecting virtual object in virtual scene | |
| CN111913560A (en) | Virtual content display method, device, system, terminal equipment and storage medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| PE01 | Entry into force of the registration of the contract for pledge of patent right | ||
| PE01 | Entry into force of the registration of the contract for pledge of patent right |
Denomination of invention: Control methods, devices, terminal devices, and storage media for virtual screens Granted publication date: 20231219 Pledgee: China Merchants Bank Limited by Share Ltd. Guangzhou branch Pledgor: GUANGDONG VIRTUAL REALITY TECHNOLOGY Co.,Ltd. Registration number: Y2024980016796 |
|
| PC01 | Cancellation of the registration of the contract for pledge of patent right | ||
| PC01 | Cancellation of the registration of the contract for pledge of patent right |
Granted publication date: 20231219 Pledgee: China Merchants Bank Limited by Share Ltd. Guangzhou branch Pledgor: GUANGDONG VIRTUAL REALITY TECHNOLOGY Co.,Ltd. Registration number: Y2024980016796 |
