HK40070373B - Video processing method and related apparatus - Google Patents
Video processing method and related apparatus Download PDFInfo
- Publication number
- HK40070373B HK40070373B HK42022060070.4A HK42022060070A HK40070373B HK 40070373 B HK40070373 B HK 40070373B HK 42022060070 A HK42022060070 A HK 42022060070A HK 40070373 B HK40070373 B HK 40070373B
- Authority
- HK
- Hong Kong
- Prior art keywords
- game
- video data
- target
- video
- entity
- Prior art date
Links
Description
技术领域Technical Field
本申请涉及数据处理领域,特别是涉及一种视频处理方法和相关装置。This application relates to the field of data processing, and in particular to a video processing method and related apparatus.
背景技术Background Technology
针对游戏类的应用程序,除了需要通过游戏本身为用户提供游戏服务外,还可以通过线下搭建游戏环境为用户提供沉浸式体验。For game applications, in addition to providing game services to users through the game itself, they can also provide immersive experiences by setting up offline game environments.
目前的线下体验主要采用制作的实体游戏道具(例如服装、持握道具、饰品等)来为用户提供游戏角色扮演的体验服务,频繁穿脱道具不仅麻烦,而且也难以为用户带来沉浸感。Currently, offline experiences mainly use physical game props (such as clothing, grips, and accessories) to provide users with a game role-playing experience. However, frequently changing into and out of props is not only inconvenient but also makes it difficult to create a sense of immersion for users.
由此可见,如何提供高质量的线下游戏沉浸式体验是目前亟需解决的技术问题。Therefore, it is clear that providing a high-quality offline immersive gaming experience is a pressing technical problem that needs to be solved.
发明内容Summary of the Invention
为了解决上述技术问题,本申请提供了一种视频处理方法和相关装置,通过生成目标视频起到了实体对象扮演目标游戏对象在目标游戏场景中的观感,不仅带来了较好的沉浸式体验,还能具有趣味性。To address the aforementioned technical issues, this application provides a video processing method and related apparatus that generates target videos to create the illusion of physical objects acting as target game objects within a target game scene. This not only provides a better immersive experience but also adds entertainment value.
本申请实施例公开了如下技术方案:The embodiments of this application disclose the following technical solutions:
一方面,本申请实施例提供了一种视频处理方法,所述方法包括:On one hand, embodiments of this application provide a video processing method, the method comprising:
获取针对显示区域采集的视频数据,所述显示区域用于显示目标游戏的游戏环境图像,在所述显示区域中具有实体对象;Acquire video data collected for a display area, the display area being used to display game environment images of the target game, and the display area containing entity objects;
确定所述视频数据中所述实体对象的外形参数;Determine the shape parameters of the entity object in the video data;
根据所述外形参数,在所述目标游戏的多个游戏对象中确定目标游戏对象;Based on the shape parameters, the target game object is determined from among the multiple game objects in the target game;
将所述目标游戏对象对应的虚拟道具渲染在所述视频数据中的所述实体对象上,得到目标视频。The virtual props corresponding to the target game object are rendered onto the entity object in the video data to obtain the target video.
另一方面,本申请实施例提供了一种视频处理装置,所述装置包括获取单元、确定单元和渲染单元:On the other hand, embodiments of this application provide a video processing apparatus, the apparatus including an acquisition unit, a determination unit, and a rendering unit:
所述获取单元,用于获取针对显示区域采集的视频数据,所述显示区域用于显示目标游戏的游戏环境图像,在所述显示区域中具有实体对象;The acquisition unit is used to acquire video data collected from the display area, which is used to display the game environment image of the target game and has entity objects in the display area;
所述确定单元,用于确定所述视频数据中所述实体对象的外形参数;The determining unit is used to determine the shape parameters of the entity object in the video data;
所述确定单元还用于根据所述外形参数,在所述目标游戏的多个游戏对象中确定目标游戏对象;The determining unit is further configured to determine the target game object among multiple game objects in the target game based on the shape parameters;
所述渲染单元,用于将所述目标游戏对象对应的虚拟道具渲染在所述视频数据中的所述实体对象上,得到目标视频。The rendering unit is used to render the virtual props corresponding to the target game object onto the entity object in the video data to obtain the target video.
另一方面,本申请实施例提供了一种计算机设备,所述计算机设备包括处理器以及存储器:On the other hand, embodiments of this application provide a computer device, the computer device including a processor and a memory:
所述存储器用于存储程序代码,并将所述程序代码传输给所述处理器;The memory is used to store program code and transmit the program code to the processor;
所述处理器用于根据所述程序代码中的指令执行上述方面所述的方法。The processor is configured to execute the methods described above according to instructions in the program code.
另一方面,本申请实施例提供了一种计算机可读存储介质,其特征在于,所述计算机可读存储介质用于存储计算机程序,所述计算机程序用于执行上述方面所述的方法。On the other hand, embodiments of this application provide a computer-readable storage medium, characterized in that the computer-readable storage medium is used to store a computer program, the computer program being used to execute the methods described above.
另一方面,本申请实施例提供了一种包括指令的计算机程序产品,当其在计算机上运行时,使得所述计算机执行上述方面所述的方法。On the other hand, embodiments of this application provide a computer program product including instructions that, when run on a computer, cause the computer to perform the methods described above.
由上述技术方案可以看出,通过设置的显示区域可以显示目标游戏的游戏环境图像,当显示区域中进入实体对象时,可针对显示区域采集视频数据,由于显示区域所显示的游戏环境图像作为实体对象的背景,视频数据中实体对象犹如处于目标游戏的场景中,起到了临场感的作用。通过识别视频数据中实体对象的外形参数,可以基于外形参数从目标游戏的多个游戏对象中确定出目标游戏对象,并将目标游戏对象对应的虚拟道具渲染在视频数据中的实体对象上,得到目标视频。由于目标游戏对象是基于外形参数确定的,在外形上与实体对象具有相关性,起到了实体对象扮演目标游戏对象在目标游戏场景中的观感,不仅带来了较好的沉浸式体验,还能具有趣味性。As can be seen from the above technical solution, the set display area can display the game environment image of the target game. When a physical object enters the display area, video data can be collected for the display area. Since the game environment image displayed in the display area serves as the background of the physical object, the physical object in the video data appears to be in the scene of the target game, creating a sense of presence. By identifying the shape parameters of the physical object in the video data, the target game object can be determined from multiple game objects in the target game based on the shape parameters. The virtual props corresponding to the target game object are then rendered onto the physical object in the video data to obtain the target video. Since the target game object is determined based on the shape parameters and has a correlation with the physical object in appearance, it gives the impression that the physical object is playing the role of the target game object in the target game scene, which not only brings a better immersive experience but also adds fun.
附图说明Attached Figure Description
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
图1为本申请实施例提供的一种视频处理场景的示意图;Figure 1 is a schematic diagram of a video processing scenario provided in an embodiment of this application;
图2为本申请实施例提供的一种视频处理方法的方法流程图;Figure 2 is a flowchart of a video processing method provided in an embodiment of this application;
图3为本申请实施例提供的一种人体的关节关键点示意图;Figure 3 is a schematic diagram of key joint points of the human body provided in an embodiment of this application;
图4为本申请实施例提供的一种针对不同人体的特效渲染示意图;Figure 4 is a schematic diagram of special effects rendering for different human bodies provided in an embodiment of this application;
图5a为本申请实施例提供的一种视频处理的流程示意图;Figure 5a is a schematic diagram of a video processing flow provided in an embodiment of this application;
图5b为本申请实施例提供的一种线下体验场景的示意图;Figure 5b is a schematic diagram of an offline experience scenario provided in an embodiment of this application;
图6a为本申请实施例提供的一种操作台的显示内容之一;Figure 6a shows one of the display contents of an operation console provided in an embodiment of this application;
图6b为本申请实施例提供的一种操作台的显示内容之二;Figure 6b shows a second display content of an operating console provided in an embodiment of this application;
图6c为本申请实施例提供的一种操作台的显示内容之三;Figure 6c shows a third display content of an operation console provided in an embodiment of this application;
图7为本申请实施例提供的一种三面屏展示的游戏场景图;Figure 7 is a game scene diagram of a three-sided screen display provided in an embodiment of this application;
图8为本申请实施例提供的一种虚拟道具渲染的效果图;Figure 8 is a rendering effect of a virtual prop provided in an embodiment of this application;
图9a为本申请实施例提供的一种单人体验的流程示意图;Figure 9a is a schematic diagram of a single-person experience provided in an embodiment of this application;
图9b为本申请实施例提供的一种多人体验的流程示意图;Figure 9b is a schematic diagram of a multi-user experience provided in an embodiment of this application;
图10为本申请实施例提供的一种视频处理装置的装置结构图;Figure 10 is a structural diagram of a video processing apparatus provided in an embodiment of this application;
图11为本申请实施例提供的一种终端设备的结构图;Figure 11 is a structural diagram of a terminal device provided in an embodiment of this application;
图12为本申请实施例提供的一种服务器的结构图。Figure 12 is a structural diagram of a server provided in an embodiment of this application.
具体实施方式Detailed Implementation
下面结合附图,对本申请的实施例进行描述。The embodiments of this application will now be described with reference to the accompanying drawings.
构建高质量的线下游戏沉浸式体验是增强用户粘性,传播游戏受众的重要方式,而相关技术中主要采用制作的实体游戏道具进行,复杂的操作导致难以起到足够沉浸感。Building high-quality offline immersive gaming experiences is an important way to enhance user engagement and expand the game's audience. However, the relevant technologies mainly rely on the production of physical game props, and the complex operation makes it difficult to achieve a sufficient sense of immersion.
为此,本申请实施例提供了一种视频处理方法,通过生成目标视频起到了实体对象扮演目标游戏对象在目标游戏场景中的观感,不仅带来了较好的沉浸式体验,还能具有趣味性。Therefore, this application provides a video processing method that generates a target video to give the impression that an entity object is playing the role of a target game object in a target game scene, which not only brings a better immersive experience but also adds fun.
本申请实施例所提供的视频处理方法可以通过计算机设备实施,该计算机设备可以是终端设备或服务器,其中,服务器可以是独立的物理服务器,也可以是多个物理服务器构成的服务器集群或者分布式系统,还可以是提供云计算服务的云服务器。终端设备包括但不限于手机、电脑、智能语音交互设备、智能家电、车载终端等。终端设备以及服务器可以通过有线或无线通信方式进行直接或间接地连接,本申请在此不做限制。本申请实施例可应用于各种场景,包括但不限于云技术、人工智能、智慧交通、辅助驾驶等。The video processing method provided in this application can be implemented using computer equipment, which can be a terminal device or a server. The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. Terminal devices include, but are not limited to, mobile phones, computers, smart voice interaction devices, smart home appliances, and vehicle terminals. Terminal devices and servers can be directly or indirectly connected via wired or wireless communication, which is not limited herein. This application can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, smart transportation, and assisted driving.
本申请实施例可以应用于人工智能,人工智能(Artificial Intelligence,AI)是利用数字计算机或者数字计算机控制的机器模拟、延伸和扩展人的智能,感知环境、获取知识并使用知识获得最佳结果的理论、方法、技术及应用系统。换句话说,人工智能是计算机科学的一个综合技术,它企图了解智能的实质,并生产出一种新的能以人类智能相似的方式做出反应的智能机器。人工智能也就是研究各种智能机器的设计原理与实现方法,使机器具有感知、推理与决策的功能。The embodiments of this application can be applied to artificial intelligence (AI). AI is the theory, methods, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results. In other words, AI is a comprehensive technology within computer science that attempts to understand the essence of intelligence and produce a new kind of intelligent machine that can react in a way similar to human intelligence. AI studies the design principles and implementation methods of various intelligent machines, enabling them to possess perception, reasoning, and decision-making capabilities.
人工智能技术是一门综合学科,涉及领域广泛,既有硬件层面的技术也有软件层面的技术。人工智能基础技术一般包括如传感器、专用人工智能芯片、云计算、分布式存储、大数据处理技术、操作/交互系统、机电一体化等技术。人工智能软件技术主要包括计算机视觉技术、语音处理技术、自然语言处理技术以及机器学习/深度学习、自动驾驶、智慧交通等几大方向。Artificial intelligence (AI) is a comprehensive discipline encompassing a wide range of fields, including both hardware and software technologies. Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating/interactive systems, and mechatronics. AI software technologies primarily include computer vision, speech processing, natural language processing, as well as machine learning/deep learning, autonomous driving, and intelligent transportation.
本申请涉及计算机视觉技术(Computer Vision,CV),计算机视觉是一门研究如何使机器“看”的科学,更进一步的说,就是指用摄影机和电脑代替人眼对目标进行识别和测量等,并进一步做图形处理,使电脑处理成为更适合人眼观察或传送给仪器检测的图像。作为一个科学学科,计算机视觉研究相关的理论和技术,试图建立能够从图像或者多维数据中获取信息的人工智能系统。计算机视觉技术通常包括图像处理、图像识别、图像语义理解、图像检索、OCR、视频处理、视频语义理解、视频内容/行为识别、三维物体重建、3D技术、虚拟现实、增强现实等。例如本申请可以通过计算机视觉技术识别视频数据中实体对象的动作。This application relates to Computer Vision (CV) technology. Computer vision is a science that studies how to enable machines to "see." More specifically, it refers to using cameras and computers to replace human eyes in recognizing and measuring targets, and further processing the images to create images more suitable for human observation or transmission to instruments for detection. As a scientific discipline, computer vision researches related theories and technologies, attempting to establish artificial intelligence systems capable of extracting information from images or multidimensional data. Computer vision technologies typically include image processing, image recognition, image semantic understanding, image retrieval, OCR, video processing, video semantic understanding, video content/behavior recognition, 3D object reconstruction, 3D technology, virtual reality, and augmented reality. For example, this application can use computer vision technology to recognize the actions of entities in video data.
可以理解的是,在本申请的具体实施方式中,涉及到的外形参数等可能与用户信息相关的数据,当本申请以上实施例运用到具体产品或技术中时,需要获得用户单独的许可或者同意,且相关数据的收集、使用和处理需要遵守相关国家和地区的相关法律法规和标准。It is understood that, in the specific embodiments of this application, data such as shape parameters that may be related to user information, when applied to specific products or technologies, require separate permission or consent from the user, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
图1为本申请实施例提供的一种视频处理场景的示意图,在图1中,以终端设备100作为前述计算机设备为例进行说明。摄像头200用于采集显示区域300的视频数据,终端设备100通过摄像头200获取所采集的视频数据。显示区域300中显示目标游戏的游戏环境图像。Figure 1 is a schematic diagram of a video processing scenario provided in an embodiment of this application. In Figure 1, the terminal device 100 is used as an example of the aforementioned computer device for illustration. The camera 200 is used to collect video data from the display area 300, and the terminal device 100 acquires the collected video data through the camera 200. The game environment image of the target game is displayed in the display area 300.
在摄像头200采集视频数据的过程中,用户a作为实体对象处于显示区域300中,由于显示区域所显示的游戏环境图像作为用户a的背景,视频数据中用户a犹如处于目标游戏的场景中,起到了临场感的作用。During the process of camera 200 acquiring video data, user a, as an entity, is located in display area 300. Since the game environment image displayed in the display area serves as the background for user a, user a appears to be in the scene of the target game in the video data, creating a sense of presence.
终端设备100可以基于视频数据确定用户a的外形参数,例如身高参数为一米八。根据身高参数在目标游戏的多个游戏对象中确定与用户a匹配的目标游戏对象,例如一个身材高大的男性格斗家,将该男性格斗家对应的虚拟道具例如拳套渲染在视频数据中的用户a上,得到目标视频,如终端设备100的显示界面20所示。Terminal device 100 can determine the physical parameters of user a based on video data, such as a height of 1.8 meters. Based on the height parameter, it can determine the target game object that matches user a among multiple game objects in the target game, such as a tall male fighter. The virtual prop corresponding to the male fighter, such as boxing gloves, is rendered onto user a in the video data to obtain the target video, as shown in the display interface 20 of terminal device 100.
由于基于身高参数确定出的男性格斗家与用户a在身高上较为类似,使得目标视频中被渲染了拳套的用户a会与目标游戏中的男性格斗家更为相似,起到了用户a在目标游戏场景中扮演该男性格斗家的观感,不仅带来了较好的沉浸式体验,还能具有趣味性,吸引用户尝试自己能够扮演哪个游戏对象。Since the male fighter determined based on height parameters is similar in height to user A, user A, who is rendered with boxing gloves in the target video, will look more like the male fighter in the target game. This gives the impression that user A is playing the male fighter in the target game scene, which not only brings a better immersive experience, but also adds fun and attracts users to try to play which game character they can play.
图2为本申请实施例提供的一种视频处理方法的方法流程图,在本实施例中以终端设备作为前述计算机设备为例进行说明,所述方法包括:Figure 2 is a flowchart of a video processing method provided in an embodiment of this application. In this embodiment, a terminal device is used as the aforementioned computer device for illustration. The method includes:
S201:获取针对显示区域采集的视频数据。S201: Acquire video data collected for the display area.
其中,所述显示区域用于显示目标游戏的游戏环境图像,在采集视频数据时,在所述显示区域中具有实体对象,在视频采集方向上,实体对象处于采集装置和显示区域之间,从而采集到的视频数据中实体对象处于游戏环境图像的背景中,能够带来置身目标游戏场景中的临场感。The display area is used to display the game environment image of the target game. When collecting video data, there are physical objects in the display area. In the video acquisition direction, the physical objects are located between the acquisition device and the display area, so that the physical objects in the acquired video data are in the background of the game environment image, which can bring a sense of presence to the target game scene.
游戏环境图像可以是静态图像,也可以是动态图像,本申请对此不做限定。The game environment image can be a static image or a dynamic image; this application does not limit this.
实体对象可以是各种具有实体的实际对象,例如可以是人体、动物或者各种物体等,本申请对此不做限定。An entity object can be any actual object with a physical form, such as a human body, an animal, or various objects, and this application does not limit it.
为了提高显示区域所能体现的临场感,在一种可能的实现方式中,所述显示区域为三面屏,所述三面屏的三个显示屏幕相互垂直设置。To enhance the sense of presence in the display area, in one possible implementation, the display area is a three-sided screen, with the three display screens arranged perpendicularly to each other.
三面屏的三个显示屏通过垂直设置可以形成一个矩形角形状的空间,立体的显示区域能够带来立体的显示效果,提高了真实感,当实体对象处于三面屏的显示区域中时,左右两侧和上方或者下方都有逼真的游戏环境图像,增强了置身目标游戏场景中的临场感。The three displays of the three-sided screen can be vertically arranged to form a rectangular corner space. The three-dimensional display area can bring a three-dimensional display effect and improve the sense of realism. When a physical object is in the display area of the three-sided screen, there are realistic game environment images on the left, right, top or bottom sides, which enhances the sense of being in the target game scene.
本申请不限定视频数据中实体对象的数量和类型,可以有多个实体对象或者一个实体对象,实体对象可以均为同一个类型,例如都是人体,也可以包括不同类型,例如有人体和动物。This application does not limit the number and type of entity objects in the video data. There can be multiple entity objects or one entity object. Entity objects can all be of the same type, such as all being human bodies, or they can include different types, such as human bodies and animals.
S202:确定所述视频数据中所述实体对象的外形参数。S202: Determine the shape parameters of the entity object in the video data.
外形参数用于标识实体对象的外形特点,该外形特点可以通过体型进行体现,也可以通过外貌进行体现。从而终端设备通过外形特点,可以有效的描述实体对象的体貌特征,便于后续识别与实体对象在外形上匹配的目标游戏对象。Shape parameters are used to identify the shape characteristics of an entity object. These characteristics can be represented by its size or appearance. Thus, the terminal device can effectively describe the physical features of the entity object through these shape characteristics, facilitating the subsequent identification of target game objects that match the entity object in shape.
当实体对象为人体时,S202包括:确定所述视频数据中所述人体的人脸特征、身高参数、体型参数中的至少一个作为所述外形参数。When the entity object is a human body, S202 includes: determining at least one of the facial features, height parameters, and body shape parameters of the human body in the video data as the shape parameter.
需要注意的是,虽然确定的外形参数包括人体的人脸特征、身高参数、体型参数中的至少一个,但是这些外形参数仅用于临时的游戏对象匹配,在匹配结束后,不会继续保存外形参数或作他用。且确定的外形参数也相对较为粗粒度,只要能够体现出外形特点即可,不会涉及到用户隐私信息。It's important to note that while the defined appearance parameters include at least one of the following: facial features, height, and body shape, these parameters are only used for temporary game object matching. After matching is complete, these parameters will not be saved or used for other purposes. Furthermore, the defined appearance parameters are relatively coarse-grained; they only need to reflect the physical characteristics and will not involve user privacy information.
当实体对象为动物时,外形参数还可以标识出动物的体貌特点、种类特点等。When the entity is an animal, the shape parameters can also identify the animal's physical characteristics, species characteristics, etc.
当实体对象为物体时,外形参数还可以标识物体的结构特点和物理形态等。When the entity object is a physical object, the shape parameters can also identify the object's structural features and physical form.
S203:根据所述外形参数,在所述目标游戏的多个游戏对象中确定目标游戏对象。S203: Based on the shape parameters, determine the target game object among the multiple game objects of the target game.
目标游戏中的多个游戏对象具有对应的虚拟形象,该虚拟形象例如可以通过虚拟模型进行体现。基于虚拟形象可以确定出游戏对象的形象特点,而外形参数能够体现实体对象的外形特点,故终端设备可以根据外形参数从多个游戏对象中确定出目标游戏对象。Multiple game objects in the target game have corresponding virtual appearances, which can be represented, for example, by virtual models. Based on the virtual appearances, the visual characteristics of the game objects can be determined, while shape parameters can represent the physical characteristics of the objects. Therefore, the terminal device can determine the target game object from multiple game objects based on the shape parameters.
确定出的目标游戏对象在外形上与视频数据中的实体对象具有相关性,该外形上的相关性可以体现出较为相符的外形,也可以体现出差异较大的外形上。相符的外形可以使得目标视频中实体对象像在扮演该目标游戏对象,差异大的外形可以使得目标视频中实体对象被渲染虚拟道具后具有反差感,为线下体验带来趣味性。The identified target game object is correlated in appearance with the entity object in the video data. This correlation can show a close match or a significant difference in appearance. A close match makes the entity object in the target video appear to be playing the target game object, while a significant difference creates a sense of contrast when the entity object in the target video is rendered as a virtual prop, adding fun to the offline experience.
本申请不限定游戏对象的种类,可以是各种形态、种类的游戏角色,游戏对象的具体形象、种类可以与目标游戏相关。This application does not limit the type of game object; it can be game characters of various forms and types. The specific appearance and type of the game object can be related to the target game.
在一种可能的实现方式中,S203包括:根据所述外形参数,在所述目标游戏的多个游戏对象中确定与所述实体对象匹配的目标游戏对象。In one possible implementation, S203 includes: determining a target game object that matches the entity object among a plurality of game objects in the target game based on the shape parameters.
在此方式下,匹配得到的目标游戏对象与实体对象的外形较为类似,例如基于高大的实体对象匹配到目标游戏对象可以是高大的游戏角色,娇小的实体对象匹配到的目标游戏对象可以是娇小的游戏角色,作为实体对象的小狗匹配到的目标游戏对象可以是目标游戏中的小狗虚拟形象等。In this method, the matched target game object is similar in appearance to the physical object. For example, a tall physical object can be matched with a tall game character, a small physical object can be matched with a small game character, and a dog can be matched with a virtual dog avatar in the target game.
由于目标游戏对象在外形上与实体对象较为类似,使得目标视频中被渲染了虚拟道具的实体对象会与目标游戏对象更为相似,起到了实体对象扮演目标游戏对象在目标游戏场景中的观感。Because the target game object is similar in appearance to the physical object, the physical object rendered with virtual props in the target video will be more similar to the target game object, giving the impression that the physical object is playing the role of the target game object in the target game scene.
S204:将所述目标游戏对象对应的虚拟道具渲染在所述视频数据中的所述实体对象上,得到目标视频。S204: Render the virtual props corresponding to the target game object onto the entity object in the video data to obtain the target video.
目标游戏对象对应的虚拟道具可以用于标识目标游戏对象的外形特征,且起到一定程度上区别于其他游戏对象的作用。该虚拟道具可以为在目标游戏中用于装饰或穿戴在目标游戏对象上的虚拟道具,例如可以是虚拟的饰品、服装、皮肤、头发或持握道具等中至少一个。该虚拟道具还可以包括与目标游戏对象相关的额外虚拟道具,例如虚拟宠物、光晕特效素材等,本申请对此不做限定。Virtual props corresponding to the target game object can be used to identify the appearance of the target game object and serve to distinguish it from other game objects to a certain extent. These virtual props can be items used for decoration or worn on the target game object in the target game, such as at least one of virtual accessories, clothing, skins, hair, or holding props. The virtual props may also include additional virtual props related to the target game object, such as virtual pets or halo effect materials; this application does not limit this.
由于匹配得到的目标游戏对象与实体对象的外形较为类似,终端设备通过将目标游戏对象对应的虚拟道具渲染到视频数据中的实体对象上,可以使得在目标视频中,实体对象就像是在扮演目标游戏对象一样,起到了实体对象扮演目标游戏对象在目标游戏场景中的观感,通过目标视频的播放能够带来较好的沉浸式体验,而且还能够吸引更多的参加者进行尝试,来确定自己能够匹配到哪一个目标游戏对象,将线下体验进一步带来趣味性。Since the matched target game object and the physical object are similar in appearance, the terminal device renders the virtual props corresponding to the target game object onto the physical object in the video data. This makes the physical object appear to be playing the target game object in the target video, giving the impression that the physical object is playing the target game object in the target game scene. Playing the target video can bring a better immersive experience and can also attract more participants to try and determine which target game object they can match, further enhancing the fun of the offline experience.
如前所述,通过外形参数确定出的目标游戏对象在外形上与视频数据中的实体对象可能有所区别(例如外形相符时可能也会有些差异,外形差异大时的区别就更大),故为了能够更好的进行虚拟道具的渲染,提高真实感,在一种可能的实现方式中,所述方法还包括:As mentioned earlier, the target game object determined by the shape parameters may differ in appearance from the entity object in the video data (for example, there may be some differences even when the shapes match, and the differences are greater when the shapes are significantly different). Therefore, in order to better render virtual props and improve realism, in one possible implementation, the method further includes:
S41:根据所述目标游戏对象的游戏形象参数和所述外形参数,确定所述视频数据中所述实体对象与所述目标游戏对象的外形差异。S41: Determine the difference in appearance between the entity object and the target game object in the video data based on the game image parameters and the appearance parameters of the target game object.
S42:根据所述外形差异调整所述目标游戏对象的游戏形象参数,得到与所述外形参数适配的调整形象参数。S42: Adjust the game appearance parameters of the target game object according to the appearance differences to obtain adjusted appearance parameters that are compatible with the appearance parameters.
相应的S204包括:根据所述调整形象参数,将所述目标游戏对象对应的虚拟道具渲染在所述视频数据中的所述实体对象上,得到目标视频。The corresponding S204 includes: rendering the virtual props corresponding to the target game object onto the entity object in the video data according to the adjusted image parameters, thereby obtaining the target video.
该外形差异标识了目标游戏对象的外形相对于视频数据中实体对象的差异,通过确定出的外形差异对目标游戏对象的游戏形象参数进行调整后得到条形形象参数,该调整形象参数能够标识出虚拟道具与视频数据中实体对象间的映射关系,使得在视频数据的实体对象上渲染目标游戏对象的虚拟道具时,原本具有外形区别的虚拟道具可以贴合的渲染在视频数据中的实体对象上,而且与实体对象比例协调,因此画面更为美观,具有更好的真实感。This shape difference identifies the difference between the target game object's shape and the physical object in the video data. After adjusting the game image parameters of the target game object based on the determined shape difference, a bar-shaped image parameter is obtained. This adjusted image parameter can identify the mapping relationship between virtual props and physical objects in the video data. This allows the virtual props of the target game object to be rendered on the physical objects in the video data when they are rendered on the physical objects. The virtual props, which originally had different shapes, can be rendered on the physical objects in the video data in a way that is consistent with the proportions of the physical objects. As a result, the picture is more beautiful and has a better sense of realism.
由此可见,通过设置的显示区域可以显示目标游戏的游戏环境图像,当显示区域中进入实体对象时,可针对显示区域采集视频数据,由于显示区域所显示的游戏环境图像作为实体对象的背景,视频数据中实体对象犹如处于目标游戏的场景中,起到了临场感的作用。通过识别视频数据中实体对象的外形参数,可以基于外形参数从目标游戏的多个游戏对象中确定出目标游戏对象,并将目标游戏对象对应的虚拟道具渲染在视频数据中的实体对象上,得到目标视频。由于目标游戏对象是基于外形参数确定的,在外形上与实体对象具有相关性,起到了实体对象扮演目标游戏对象在目标游戏场景中的观感,不仅带来了较好的沉浸式体验,还能具有趣味性。Therefore, the set display area can display the game environment image of the target game. When a physical object enters the display area, video data can be captured for that area. Since the game environment image displayed in the display area serves as the background for the physical object, the physical object in the video data appears to be in the target game scene, creating a sense of immersion. By identifying the shape parameters of the physical object in the video data, the target game object can be determined from multiple game objects in the target game based on these parameters. The virtual props corresponding to the target game object are then rendered onto the physical object in the video data, resulting in the target video. Because the target game object is determined based on shape parameters and has a correlation with the physical object in appearance, it gives the impression that the physical object is playing the role of the target game object in the target game scene, providing not only a better immersive experience but also added entertainment value.
在一种可能的实现方式中,S203包括:In one possible implementation, S203 includes:
S2031:获取所述多个游戏对象分别对应的游戏形象参数。S2031: Obtain the game character parameters corresponding to the multiple game objects respectively.
S2032:根据所述外形参数与所述游戏形象参数进行相似性比对,从相似性满足阈值的游戏对象中确定所述目标游戏对象。S2032: Based on the similarity comparison between the appearance parameters and the game character parameters, determine the target game object from game objects whose similarity meets the threshold.
游戏形象参数可以标识出所对应游戏对象的形象特点,而外形参数可以体现出实体对象的外形特点,故此可以基于外形参数与游戏形象参数进行相似性比对,从相似性满足阈值的游戏对象中确定所述目标游戏对象。该阈值可以设置为一个比较高的数值。Game character parameters identify the visual characteristics of the corresponding game object, while appearance parameters reflect the physical appearance of the object. Therefore, a similarity comparison can be performed between appearance parameters and game character parameters to determine the target game object from game objects whose similarity meets a threshold. This threshold can be set to a relatively high value.
相似性满足阈值的游戏对象可以有至少一个,在有多个的情况下,可以随机选取或者选取相似性最高的最为目标游戏对象。There can be at least one game object whose similarity meets the threshold. If there are multiple similar game objects, the one with the highest similarity can be randomly selected as the target game object.
为了进一步提高实体对象与目标游戏对象的相似度,还可以在实体对象为人体时,引入人体的性别参数作为匹配依据。性别参数可以标识男或女。To further improve the similarity between entity objects and target game objects, when the entity object is a human body, a gender parameter can be introduced as a matching criterion. The gender parameter can identify male or female.
在一种可能的实现方式中,所述方法还包括:获取所述人体的性别参数。In one possible implementation, the method further includes: obtaining the sex parameter of the human body.
相应的,S203包括:Accordingly, S203 includes:
S2033:从所述多个游戏对象中确定符合所述性别参数的待定游戏对象。S2033: Determine the candidate game object that matches the gender parameter from the plurality of game objects.
S2034:根据所述外形参数,在所述待定游戏对象中确定与所述实体对象匹配的目标游戏对象。S2034: Based on the shape parameters, determine the target game object that matches the entity object from the list of undetermined game objects.
这一场景主要涉及对游戏对象具有性别区分的目标游戏,由此可以基于实体对象的性别参数所标识的性别,从多个游戏对象中确定出与该性别一致的待定游戏对象,然后通过实体对象的外形参数在待定游戏对象中确定目标游戏对象,从而确定出的目标游戏对象与实体对象的性别一致,提高了用户体验。This scenario primarily involves target games that differentiate game objects by gender. Based on the gender parameter of an entity object, a candidate game object matching that gender can be identified from multiple game objects. Then, the target game object is determined from the candidate game objects using the entity object's shape parameter. This ensures that the identified target game object matches the gender of the entity object, thus improving the user experience.
在一些应用场景中,视频数据中包括的实体对象的数量并不限定,可以在显示区域中包括一个或多个实体对象。针对不同数量的实体对象,可以具有不同的处理方式。In some applications, the number of entities included in video data is not limited; one or more entities can be included in the display area. Different processing methods can be used for different numbers of entities.
在一种可能的实现方式中,所述方法还包括:In one possible implementation, the method further includes:
S11:确定所述视频数据中所述实体对象的对象数量,若所述对象数量为指定数量,执行S12,若所述对象数量不为所述指定数量,执行S14。S11: Determine the number of entities in the video data. If the number of entities is a specified number, execute S12. If the number of entities is not the specified number, execute S14.
本申请不限定指定数量的具体数值,例如可以为1,也可以为大于1的整数。对象数量可以是某一个类型的实体对象的数量(例如包括了几个人体),也可以是全部类型的实体对象的总数量(例如人体和动物一共包括多少个)。This application does not limit the specific numerical value of the specified quantity; for example, it can be 1 or an integer greater than 1. The number of objects can be the number of entity objects of a certain type (e.g., including several human bodies) or the total number of entity objects of all types (e.g., how many human bodies and animals are included in total).
S12:识别所述实体对象在所述视频数据中做出的动作。S12: Identify the actions performed by the entity object in the video data.
S13:响应于所述动作为指定动作,执行所述将所述目标游戏对象对应的虚拟道具渲染在所述视频数据中的实体对象上,得到目标视频的操作。S13: In response to the action being a specified action, perform the operation of rendering the virtual props corresponding to the target game object onto the entity object in the video data to obtain the target video.
S14:执行S204的将所述目标游戏对象对应的虚拟道具渲染在所述视频数据中的实体对象上,得到目标视频的操作。S14: Execute the operation of S204 to render the virtual props corresponding to the target game object onto the entity object in the video data to obtain the target video.
当实体对象的对象数量为指定数量时,此时需要基于实体对象做出的动作是否符合要求来确定是否进行得到目标视频的操作。这一机制可以为线下体验带来额外的互动体验,通过指导实体对象做出指定动作,提高实体对象的参与感。When the number of entity objects reaches a specified quantity, the decision to retrieve the target video is made based on whether the actions performed by the entity objects meet the requirements. This mechanism can bring additional interactive elements to the offline experience by guiding entity objects to perform specified actions, thereby enhancing their sense of participation.
本申请对指定动作不做限定,可以与实体对象的类型相关,也可以与指定数量相关,也可以与目标游戏相关。例如实体对象为人体时,若指定数量为1,指定动作可以是张开双手、比心等单人动作。若指定数量为大于1的整数,指定动作可以是组合动作,也可以是多个单人动作。其中,组合动作可以是要求指定数量的实体对象一起配合做出一个完成的动作,例如多人手拉手、多人比心等。This application does not limit the specified action; it can be related to the type of entity object, the specified quantity, or the target game. For example, when the entity object is a human body, if the specified quantity is 1, the specified action can be a single action such as opening arms or making a heart shape with hands. If the specified quantity is an integer greater than 1, the specified action can be a combined action or multiple single actions. A combined action can require a specified number of entity objects to cooperate in performing a complete action, such as multiple people holding hands or multiple people making a heart shape with hands.
针对作为实体对象的人体,可以通过识别人体的关节关键点位置来识别实体对象在视频数据中做出的动作。For the human body as a physical object, the actions performed by the physical object in video data can be identified by recognizing the positions of the key joints of the human body.
在一种可能的实现方式中,S12包括:In one possible implementation, S12 includes:
S121:确定所述视频数据中所述指定数量的人体的关节关键点位置。S121: Determine the positions of the specified number of key joints of the human body in the video data.
S122:根据所述关节关键点位置识别所述指定数量的人体在所述视频数据中做出的动作。S122: Identify the actions of the specified number of human bodies in the video data based on the positions of the joint key points.
人体的关节关键点用于标识人体的关节,例如肩、颈、肘、踝、盆骨等可以产生位移和旋转的关节,而关节关键点位置用于标识所对应关节关键点的位置,基于关节关键点位置能够识别出人体做出的动作、姿势。The key points of the human joints are used to identify the joints of the human body, such as the shoulder, neck, elbow, ankle, and pelvis, which can produce displacement and rotation. The key point locations are used to identify the positions of the corresponding key points. Based on the key point locations, the actions and postures performed by the human body can be identified.
通过对视频数据所包括视频帧的识别,可以确定各个视频帧中人体的关节关键点位置,继而通过关节关键点位置和视频帧的时序关系,确定指定数量的人体在视频数据中做出何种动作。By identifying the video frames included in the video data, the positions of the key joints of the human body in each video frame can be determined. Then, by using the position of the key joints and the temporal relationship between the video frames, it can be determined what kind of action a specified number of human bodies are performing in the video data.
可以基于所需识别的指定动作选择对应的关节关键点的位置进行识别,或者基于默认的关节关键点的位置进行识别,本申请对此不做限定。The identification can be performed by selecting the position of the corresponding joint key point based on the specified action to be identified, or by identifying the position of the default joint key point. This application does not limit this.
本申请实施例中,除了可以基于实体对象的外形特点确定对应的目标游戏对象外,还可以提供更丰富的互动方式,例如可以基于用户所选择的游戏对象对实体对象进行虚拟道具的渲染。也就是说,除了可以提供与实体对象外形匹配的游戏对象的AR渲染之外,还可以基于用户的选择进行基于指定对象的AR渲染。In this embodiment, besides determining the corresponding target game object based on the shape characteristics of the physical object, richer interaction methods can also be provided. For example, virtual props can be rendered on the physical object based on the game object selected by the user. That is to say, in addition to providing AR rendering of game objects that match the shape of the physical object, AR rendering based on a specified object can also be performed based on the user's selection.
故在一种可能的实现方式中,所述方法还包括:Therefore, in one possible implementation, the method further includes:
S21:获取针对指定对象的游戏对象选择指令,所述指定对象为所述多个游戏对象中的一个游戏对象。S21: Obtain a game object selection instruction for a specified object, wherein the specified object is one of the plurality of game objects.
S22:将所述指定对象对应的虚拟道具渲染在所述视频数据中的所述实体对象上,得到指定视频。S22: Render the virtual props corresponding to the specified object onto the entity object in the video data to obtain the specified video.
通过上述方式,使得用户可以选择任意想要通过实体对象进行扮演的游戏对象,提高了虚拟道具渲染的多样性和可选择性。例如作为实体对象的用户想要扮演与自己外形特点不符的游戏对象时,可以通过选择该游戏对象生成游戏对象选择指令,然后终端设备基于指定对象对应的虚拟道具在视频数据中的实体对象上进行渲染,得到指定视频。从而满足了用户希望扮演不同性别、外形的游戏对象的需求。This method allows users to choose any game object they want to role-play using a physical object, increasing the diversity and selectivity of virtual prop rendering. For example, if a user, as a physical object, wants to role-play a game object that doesn't match their physical characteristics, they can generate a game object selection command by selecting that object. Then, the terminal device renders the video based on the virtual prop corresponding to the specified object on the physical object in the video data, resulting in the specified video. This satisfies users' needs to role-play game objects of different genders and appearances.
接下来以指定数量为1,指定动作为“张开双手”的具体场景为例进行说明。The following example illustrates the specific scenario where the specified quantity is 1 and the specified action is "open your arms".
终端设备可以通过识别模型进行“张开双手”这一指定动作的识别,该识别模型可以识别人体的多个关节关键点位置。例如图3示出的场景中,针对人体右手部分,通过识别关节关键点6(右肩)、8(右手肘)和10(右手腕)的位置,可以明确人体是否做出了张开右手的动作,同理还可以通过识别关节关键点5(左肩)、7(左手肘)和9(左手腕)的位置确定人体是否做出了张开左手的动作。从而在满足条件后即可识别人体做出“张开双手”。The terminal device can recognize the specified action of "opening both hands" using a recognition model. This model can identify the positions of multiple key joints on the human body. For example, in the scenario shown in Figure 3, for the right hand, by recognizing the positions of key joints 6 (right shoulder), 8 (right elbow), and 10 (right wrist), it can be determined whether the person has made the action of opening their right hand. Similarly, by recognizing the positions of key joints 5 (left shoulder), 7 (left elbow), and 9 (left wrist), it can be determined whether the person has made the action of opening their left hand. Thus, once the conditions are met, the device can recognize that the person has made the action of "opening both hands".
例如通过计算手腕和肘部的角度以及肩部和肘部的角度,当左右肩部与肘部的角度小于180以及手腕和肘部的角度大于25度时判断为“张开双手”。代码可以如下所示:For example, by calculating the angles of the wrist and elbow, and the angles of the shoulder and elbow, the action is defined as "open arms" when the angle between the left and right shoulders and elbows is less than 180 degrees and the angle between the wrist and elbow is greater than 25 degrees. The code can be shown below:
if(left_shoulder_angleA>25&&left_shoulder_angle A<180if(left_shoulder_angleA>25&&left_shoulder_angle A<180
&&left_shoulder_angleB>25&&left_shoulder_angleB<180&&left_shoulder_angleB>25&&left_shoulder_angleB<180
&&right_shoulder_angleA>25&&right_shoulder_angleA<180&&right_shoulder_angleA>25&&right_shoulder_angleA<180
&&right_shoulder_angleB>25&&right_shoulder_angleB<180){&&right_shoulder_angleB>25&&right_shoulder_angleB<180){
armOpen=1;armOpen = 1;
}else{}else{
armOpen=0;armOpen = 0;
}}
其中A、B分别指代左和右。A and B refer to left and right, respectively.
在确定了人体做出了“张开双手”的动作后,可以通过识别到的关节关键点6(右肩),12(右胯),16(右脚踝),5(左肩)的位置,计算虚拟道具、虚拟特效的位置与大小,实现为不同位置和身高的人体匹配不同样式的道具和特效。After determining that the human body has made the "open arms" action, the position and size of virtual props and virtual effects can be calculated by identifying the positions of key joints 6 (right shoulder), 12 (right hip), 16 (right ankle), and 5 (left shoulder), so as to match different styles of props and effects to human bodies of different positions and heights.
本申请的终端设备可以基于不同位置和身高的人体所匹配的道具和特效有所区别。The terminal device of this application can have different props and special effects matched to people of different positions and heights.
故在一种可能的实现方式中,所述方法还包括:确定所述视频数据中所述实体对象所处的视频位置。Therefore, in one possible implementation, the method further includes: determining the video position of the entity object in the video data.
相应的,S204包括:根据所述视频位置确定所述虚拟道具对应的显示形态;基于所述显示形态将所述虚拟道具渲染在所述视频数据中的所述实体对象上,得到目标视频。Accordingly, S204 includes: determining the display form corresponding to the virtual prop based on the video position; rendering the virtual prop onto the entity object in the video data based on the display form to obtain the target video.
在显示区域中实体对象可以处于任意位置,该位置在视频数据中记为视频位置。相应的,在采集的视频数据中,同一个实体对象在视频数据中处于不同视频位置时,其大小也会有所区别。Within the display area, an entity object can be positioned anywhere; this position is recorded as the video position in the video data. Consequently, the size of the same entity object will differ depending on its position within the captured video data.
故为了能够更好的让虚拟道具贴合的渲染在视频数据的实体对象上,可以基于实体对象的视频位置所体现出与视频采集装置间的远近、偏移关系,为不同游戏对象对应的虚拟道具设置至少两种不同的显示形态。在进行渲染之前,基于视频数据中实体对象的视频位置,选择虚拟道具对应的显示形态,并根据该显示形态将所述虚拟道具渲染在所述视频数据中的所述实体对象上,得到目标视频,提高虚拟道具的渲染真实感。Therefore, in order to better render virtual props onto the physical objects in the video data, at least two different display formats can be set for virtual props corresponding to different game objects, based on the distance and offset relationship between the physical object's video position and the video capture device. Before rendering, the display format corresponding to the virtual prop is selected based on the video position of the physical object in the video data, and the virtual prop is rendered onto the physical object in the video data according to the display format to obtain the target video, thereby improving the realism of the virtual prop rendering.
如图4所示,左侧图和右侧图分别对应不同的人体(实体对象),如左侧图中人体身高相对于右侧图中的人体更高,且站位相对于右侧图中的人体更加靠后。左侧图中特效相对右侧图更大,通过特效中飞龙飞向人体胸口闪光,在人体上渲染所对应目标游戏对象的虚拟道具。As shown in Figure 4, the left and right images correspond to different human figures (entity objects). For example, the human figure in the left image is taller than the human figure in the right image, and is positioned further back. The special effects in the left image are larger than those in the right image. The special effects include a flying dragon flashing towards the human figure's chest, and virtual props corresponding to the target game object are rendered on the human figure.
代码可以如下所示:The code can be as follows:
let left=(left_hip.y-left_shoulder.y)/2+(left_shoulder.y);let left=(left_hip.y-left_shoulder.y)/2+(left_shoulder.y);
let humanMidx=1920-(1920-right_shoulder.x)+(1920-right_shoulder.x)-(1920-left_shoulder.x))/2;let humanMidx=1920-(1920-right_shoulder.x)+(1920-right_shoulder.x)-(1920-left_shoulder.x))/2;
let humanMidy;let humanMidy;
if(left_shouldlr.y>right_shoulder.y){if(left_shouldlr.y>right_shoulder.y){
humanMidy=left_shoulder.y+(left_shoulder.y-right_shoulder.y)/2;humanMidy=left_shoulder.y+(left_shoulder.y-right_shoulder.y)/2;
}else{}else{
humanMidy=right_shoulder.y+(right_shoulder.y-left_shoulder.y)/2;humanMidy=right_shoulder.y+(right_shoulder.y-left_shoulder.y)/2;
}}
let topHeight=1080-humanMidy;let topHeight=1080-humanMidy;
其中,x,y分别标识关节关键点位置中的横轴坐标和纵轴坐标。Where x and y represent the horizontal and vertical coordinates of the joint key points, respectively.
上述代码是通过计算人体的左右肩部与胯部的中点作为渲染虚拟道具的中点,并且根据人肩部到脚部的距离来计算并设置虚拟道具的比例。The code above calculates the midpoint between the left and right shoulders and hips of the human body as the midpoint for rendering the virtual prop, and calculates and sets the proportion of the virtual prop based on the distance from the person's shoulders to their feet.
确定出的目标视频可以为无音乐的增强现实(Augmented Reality,AR)视频。AR技术是一种将虚拟信息与真实世界巧妙融合的技术,将计算机生成的文字、图像、三维模型、音乐、视频等虚拟信息模拟仿真后,应用到真实世界中,两种信息互为补充,从而实现对真实世界的“增强”。The identified target video can be an augmented reality (AR) video without music. AR technology is a technology that cleverly integrates virtual information with the real world. It simulates and applies computer-generated text, images, 3D models, music, videos, and other virtual information to the real world. The two types of information complement each other, thereby achieving "enhancement" of the real world.
可以调用用于制作视频的接口生成目标视频,利用该接口可以记录视频数据中画布的动态内容,画布中绘制了摄像头拍摄的真实内容以及虚拟道具(或者还有虚拟特效等),其中针对人体和三面屏的内容为摄像头采集的真实内容,虚拟道具为绘制在canvas上指定位置的多个透明AR视频。最终会生成WEBM格式的AR视频(即目标视频),该AR视频体现出人体与虚拟道具的互动。具体的,可以通过data数组存储录制的信息,录制结束后将data转换为文件,得到目标视频。The target video can be generated by calling an interface used for video creation. This interface records the dynamic content of the canvas in the video data. The canvas depicts the real content captured by the camera and virtual props (or virtual effects, etc.). The content related to the human body and the three screens is the real content captured by the camera, while the virtual props are multiple transparent AR videos drawn at specified positions on the canvas. The final result is a WEBM format AR video (i.e., the target video), which demonstrates the interaction between the human body and the virtual props. Specifically, the recorded information can be stored in a `data` array. After recording, the `data` is converted into a file to obtain the target video.
由于前述的目标视频在一些场景下可以是无声音的,故需要进行音视频融合以在目标视频中融入背景音乐。音视频融合使用的ffmpeg工具(是一个开放源代码的自由软件,可以执行音频和视频多种格式的录影、转换、串流功能),通过该工具可以实现本方案中的无声WEBM+MP3(背景音频)的融合,将获取到的无声视频与服务器的音频利用ffmpeg命令进行融合,得到具有背景声音的目标视频,该目标视频可以是MP4格式的文件。Since the target video may be silent in some scenarios, audio-video fusion is necessary to incorporate background music. The ffmpeg tool (an open-source, free software capable of recording, converting, and streaming various audio and video formats) is used for this audio-video fusion. This tool enables the fusion of silent WEBM + MP3 (background audio) in this solution. The acquired silent video is then fused with the server's audio using ffmpeg commands to obtain a target video with background sound. This target video can be an MP4 file.
在生成目标视频后,还可以为用户提供目标视频的获取途径。以便于用户可以在自己的终端上保存目标视频,并在需要时重复观看或分享。After generating the target video, the system can also provide users with a way to access it. This allows users to save the target video on their devices and watch or share it repeatedly when needed.
在一种可能的实现方式中,所述方法还包括:In one possible implementation, the method further includes:
S31:将所述目标视频在存储位置进行保存。S31: Save the target video to the storage location.
S32:基于所述存储位置生成对应的地址码,并展示所述地址码。S32: Generate a corresponding address code based on the storage location, and display the address code.
S33:若基于所述地址码获取终端设备发送的视频下载请求,从所述存储位置向所述终端设备返回所述目标视频。S33: If a video download request sent by a terminal device is obtained based on the address code, the target video is returned to the terminal device from the storage location.
在生成目标视频后,可以将其进行保存,保存目标视频的存储位置可以在终端设备本地,也可以是云端的服务器。After the target video is generated, it can be saved. The target video can be stored locally on the terminal device or on a cloud server.
在存储完目标视频后,可以基于存储位置生成地址码,该地址码可以是二维码、条形码等数字形式。After storing the target video, an address code can be generated based on the storage location. This address code can be in digital form such as a QR code or barcode.
用户通过自己的终端设备例如手机对地址码进行扫码可以生成并发送视频下载请求,作为前述计算机设备的终端设备可以获取该视频下载请求后,从存储位置返回该目标视频给用户的终端设备。Users can generate and send a video download request by scanning an address code using their terminal device, such as a mobile phone. The terminal device, which is the aforementioned computer device, can then receive the video download request and return the target video from its storage location to the user's terminal device.
例如,用户通过小程序扫描作为地址码的二维码后,终端设备拿到相关参数,并以此进行网络请求,之后判断目标视频的存储地址(可以为链接的形式)是否有效,若链接有效则访问目标视频,并询问用户是否保存。若链接无效则继续请求,等到云端WEBM格式的目标视频成功转为MP4格式后即可访问到。For example, after a user scans a QR code (which serves as an address code) via a mini-program, the terminal device obtains the relevant parameters and uses them to make a network request. It then checks if the storage address of the target video (which can be a link) is valid. If the link is valid, it accesses the target video and asks the user if they want to save it. If the link is invalid, it continues the request until the target video, originally in WEBM format, is successfully converted to MP4 format in the cloud, at which point it can be accessed.
基于图5a和图5b继续说明本申请提供的视频处理方法,如图5b所示,线下场景中包括终端设备100、摄像头200、三面屏300和操作台400。其中,指定数量为1,指定动作为张开双手。Continuing with Figures 5a and 5b, the video processing method provided in this application is further described. As shown in Figure 5b, the offline scenario includes a terminal device 100, a camera 200, a three-sided screen 300, and an operating table 400. The specified quantity is 1, and the specified action is opening both hands.
也就是说,一共包括两台主机与三个屏幕。两台主机分别为操作台和终端设备,其中操作台还用来作为服务器,操作台用来选择互动体验的模式以及确认或删除最终生成的视频,终端设备用来录制用户与英雄特效的沉浸式互动AR视频。In other words, it includes two main units and three screens. The two main units are the control panel and the terminal device. The control panel also serves as a server. The control panel is used to select the interactive experience mode and confirm or delete the final generated video. The terminal device is used to record immersive interactive AR videos of the user and hero effects.
三台屏幕分别是与操作端和展示端相连的屏幕,以及与展示端实时同步的对外大屏幕,除此之外,为了更还原游戏场景,线下环境中还配置了三面屏用来循环播放游戏场景,用户可以在三面屏中沉浸式体验化身英雄角色的快感。The three screens are connected to the control terminal and the display terminal, as well as a large external screen that is synchronized with the display terminal in real time. In addition, in order to better restore the game scene, three screens are also configured in the offline environment to play the game scene in a loop. Users can immerse themselves in the thrill of becoming a hero character on the three screens.
用户可以作为实体对象,摄像头200可以在用户处于三面屏标识的显示区域300中时进行视频采集,得到视频数据。终端设备100基于对视频数据的识别、匹配,根据目标游戏对象的虚拟道具在视频数据中的用户身上进行渲染。The user can be treated as a physical object, and the camera 200 can capture video data when the user is within the display area 300 of the three-sided screen. Based on the recognition and matching of the video data, the terminal device 100 renders the virtual props of the target game object onto the user in the video data.
在开始实施本申请实施例之前,操作台400的显示界面10可以如图6a所示,包括参与线下体验的步骤一、二、三,以及单人和多人的选项。Before implementing the embodiments of this application, the display interface 10 of the operating console 400 may be as shown in FIG6a, including steps one, two, and three for participating in the offline experience, as well as single and multi-person options.
其中,步骤一用于指示用户进入视频采集区域(即显示区域),步骤二用于指示进行虚拟道具渲染,步骤三用于指示扫码获取目标视频。用户还可以基于参与人数,选择单人或者多人。Step one instructs the user to enter the video capture area (i.e., the display area); step two instructs the rendering of virtual props; and step three instructs the user to scan a QR code to obtain the target video. Users can also choose to participate individually or in groups, depending on the number of participants.
如图5a所示,在单人参与的情况下,通过触发图6a的“单人”控件点击开始,或者通过触发图6a的“多人”控件点击开始。As shown in Figure 5a, in the case of a single person participating, the start can be initiated by triggering the "Single Person" control in Figure 6a or by triggering the "Multi-Person" control in Figure 6a.
点击开始后,操作台400显示如图6b的内容,通过“请到合影区进行互动”指示用户进入显示区域300中,摄像头200采集对应的视频数据,其中,显示区域300显示的内容可以如图7所示。After clicking "Start", the control panel 400 displays the content shown in Figure 6b. The user is instructed to enter the display area 300 by saying "Please go to the photo area for interaction". The camera 200 collects the corresponding video data. The content displayed in the display area 300 can be as shown in Figure 7.
操作台400还可以展示如图6c的内容,通过图案和文字“请举起张开双臂召唤神龙”指示用户做出指定动作。The control panel 400 can also display the content shown in Figure 6c, and instruct the user to perform a specified action through the image and text "Please raise your arms and open them to summon the dragon".
终端设备100基于视频数据确定用户是否做出张开双手的动作,如果识别成功,判断是否点击特效,即是否需要渲染虚拟道具。Terminal device 100 determines whether the user has made an action of opening their arms based on video data. If the recognition is successful, it determines whether to click on the special effect, that is, whether to render the virtual prop.
在确定点击特效时,终端设备100基于确定出的目标游戏对象,将对应的虚拟道具渲染在视频数据中的用户身上,生成目标视频,该目标视频可以如图8所示,图8示出的是两个用户同时处于显示区域300中的情况,通过终端设备100的显示界面20进行显示。When determining the click effect, the terminal device 100 renders the corresponding virtual props onto the user in the video data based on the determined target game object, and generates the target video. The target video can be shown in Figure 8, which shows the situation where two users are simultaneously in the display area 300, and is displayed through the display interface 20 of the terminal device 100.
图8中左侧用户所匹配的目标游戏对象的虚拟道具为服装和头饰,右侧用户所匹配的目标游戏对象的虚拟道具为挂在肩上的机枪。相应的,此情况下用户可以在图6a中触发“多人”的控件。In Figure 8, the virtual items of the target game object matched with the user on the left are clothing and headwear, while the virtual item of the target game object matched with the user on the right is a machine gun hanging on the shoulder. Accordingly, in this case, the user can trigger the "multiplayer" control in Figure 6a.
终端设备100对目标视频处理完成后在存储位置进行存储,并基于存储位置生成地址码,该地址码可以在图5b所示场景中的终端设备100上进行展示,也可以在操作台400进行展示。After the terminal device 100 processes the target video, it stores it in the storage location and generates an address code based on the storage location. This address code can be displayed on the terminal device 100 in the scenario shown in Figure 5b, or it can be displayed on the operation console 400.
用户通过小程序对地址码进行扫码,若已经授权,终端设备100将目标视频返回给用户,保存在用户手机的相册中,若没有授权,则无法获取目标视频。Users scan the address code via the mini-program. If authorized, the terminal device 100 will return the target video to the user and save it in the user's phone's album. If not authorized, the target video cannot be obtained.
单人体验的流程可以参见图9a,用户在操作台点击单人拍摄按钮。随后用户站在显示区域中的最佳拍摄区域张开双手,基于传递的视频数据在终端设备大屏显示摄像头拍摄的当前环境。在识别做出张开双手的动作后,终端设备会在根据用户的位置与身高适配游戏英雄的虚拟道具特效,并与摄像头拍摄的内容渲染在一起。然后用户可以与英雄特效进行互动,互动结束后会生成整个AR互动体验的目标视频,完成目标视频的拍摄后,可以融合音频。并在操作台显示目标视频,用户点击保存视频后,终端设备保存目标视频并生成对应的地址码,地址码被传递到显示端进行显示,用户可用小程序扫码进行保存。The single-player experience flow is shown in Figure 9a. The user clicks the single-player shooting button on the control panel. The user then stands in the optimal shooting area of the display area with arms outstretched. Based on the transmitted video data, the current environment captured by the camera is displayed on the large screen of the terminal device. After recognizing the outstretched arms gesture, the terminal device adapts the virtual prop effects of the game hero according to the user's position and height, rendering them together with the content captured by the camera. The user can then interact with the hero effects. After the interaction, a target video for the entire AR interactive experience is generated. After the target video is captured, audio can be integrated. The target video is then displayed on the control panel. After the user clicks to save the video, the terminal device saves the target video and generates a corresponding address code. This address code is transmitted to the display end for display, and the user can scan the code using a mini-program to save it.
多人体验的流程可以参见图9b,用户在操作台点击多人拍摄按钮。由于在一些情况下,多人张开双手时利用tendorflow.js识别时多人直接会造成互相干扰,影响到对动作的识别,所以可选的,采用在操作台主动触发开启摄像头与英雄特效的方式。开启之后的互动与单人体验的一致,不再一一赘述。The multi-player experience flow can be seen in Figure 9b, where users click the multi-player shooting button on the control panel. Because in some situations, when multiple people have their arms outstretched, the recognition using tendorflow.js can cause mutual interference, affecting the recognition of actions, it is optional to actively trigger the camera and hero effects on the control panel. The interaction after activation is the same as the single-player experience, and will not be elaborated further.
本申请实施例可以基于web端实现,并通过技术和线下环境的结合打造沉浸式的游戏角色体验。The embodiments of this application can be implemented on the web platform, and create an immersive game character experience through the combination of technology and offline environment.
在前述图1-图9b的基础上,图10为本申请实施例提供的一种视频处理装置的装置结构图,所述视频处理装置1000包括获取单元1001、确定单元1002和渲染单元1003:Based on Figures 1-9b above, Figure 10 is a structural diagram of a video processing apparatus provided in an embodiment of this application. The video processing apparatus 1000 includes an acquisition unit 1001, a determination unit 1002, and a rendering unit 1003.
所述获取单元1001,用于获取针对显示区域采集的视频数据,所述显示区域用于显示目标游戏的游戏环境图像,在所述显示区域中具有实体对象;The acquisition unit 1001 is used to acquire video data collected from a display area, the display area being used to display game environment images of the target game, and having entity objects in the display area;
所述确定单元1002,用于确定所述视频数据中所述实体对象的外形参数;The determining unit 1002 is used to determine the shape parameters of the entity object in the video data;
所述确定单元1002还用于根据所述外形参数,在所述目标游戏的多个游戏对象中确定目标游戏对象;The determining unit 1002 is further configured to determine the target game object among multiple game objects of the target game based on the shape parameters;
所述渲染单元1003,用于将所述目标游戏对象对应的虚拟道具渲染在所述视频数据中的所述实体对象上,得到目标视频。The rendering unit 1003 is used to render the virtual props corresponding to the target game object onto the entity object in the video data to obtain the target video.
在一种可能的实现方式中,所述确定单元还用于根据所述外形参数,在所述目标游戏的多个游戏对象中确定与所述实体对象匹配的目标游戏对象。In one possible implementation, the determining unit is further configured to determine, based on the shape parameters, a target game object that matches the entity object among a plurality of game objects in the target game.
在一种可能的实现方式中,所述确定单元还用于:In one possible implementation, the determining unit is further configured to:
根据所述目标游戏对象的游戏形象参数和所述外形参数,确定所述视频数据中所述实体对象与所述目标游戏对象的外形差异;Based on the game image parameters and appearance parameters of the target game object, determine the appearance differences between the entity object in the video data and the target game object;
根据所述外形差异调整所述目标游戏对象的游戏形象参数,得到与所述外形参数适配的调整形象参数;Adjust the game appearance parameters of the target game object according to the appearance differences to obtain adjusted appearance parameters that are compatible with the appearance parameters;
所述渲染单元还用于根据所述调整形象参数,将所述目标游戏对象对应的虚拟道具渲染在所述视频数据中的所述实体对象上,得到目标视频。The rendering unit is also used to render the virtual props corresponding to the target game object onto the entity object in the video data according to the adjusted image parameters, so as to obtain the target video.
在一种可能的实现方式中,若所述实体对象为人体,所述确定单元还用于确定所述视频数据中所述人体的人脸特征、身高参数、体型参数中的至少一个作为所述外形参数。In one possible implementation, if the entity object is a human body, the determining unit is further configured to determine at least one of the facial features, height parameters, and body shape parameters of the human body in the video data as the shape parameter.
在一种可能的实现方式中,所述确定单元还用于:In one possible implementation, the determining unit is further configured to:
获取所述多个游戏对象分别对应的游戏形象参数;Obtain the game character parameters corresponding to the multiple game objects;
根据所述外形参数与所述游戏形象参数进行相似性比对,从相似性满足阈值的游戏对象中确定所述目标游戏对象。The target game object is determined from game objects whose similarity meets the threshold by comparing the appearance parameters with the game character parameters.
在一种可能的实现方式中,所述获取单元还用于获取所述人体的性别参数;In one possible implementation, the acquisition unit is further configured to acquire the gender parameter of the human body;
所述确定单元还用于:The determining unit is further configured to:
从所述多个游戏对象中确定符合所述性别参数的待定游戏对象;From the plurality of game objects, determine the candidate game object that matches the gender parameter;
根据所述外形参数,在所述待定游戏对象中确定与所述实体对象匹配的目标游戏对象。Based on the shape parameters, a target game object matching the entity object is determined from the undetermined game objects.
在一种可能的实现方式中,所述装置还包括识别单元:In one possible implementation, the device further includes an identification unit:
所述确定单元还用于确定所述视频数据中所述实体对象的对象数量;The determining unit is also used to determine the number of objects of the entity object in the video data;
所述识别单元用于若所述对象数量为指定数量,识别所述实体对象在所述视频数据中做出的动作;The recognition unit is used to recognize the actions performed by the entity objects in the video data if the number of objects is a specified number.
所述识别单元还用于响应于所述动作为指定动作,触发所述渲染单元;The identification unit is also configured to trigger the rendering unit in response to the action being a specified action;
所述确定单元还用于若所述对象数量不为所述指定数量,触发所述渲染单元。The determining unit is further configured to trigger the rendering unit if the number of objects is not the specified number.
在一种可能的实现方式中,所述实体对象为人体,所述识别单元还用于:In one possible implementation, the entity object is a human body, and the recognition unit is further configured to:
确定所述视频数据中所述指定数量的人体的关节关键点位置;Determine the locations of the specified number of key joints of the human body in the video data;
根据所述关节关键点位置识别所述指定数量的人体在所述视频数据中做出的动作。Based on the location of the key joint points, identify the actions performed by the specified number of human bodies in the video data.
在一种可能的实现方式中,所述获取单元还用于:In one possible implementation, the acquisition unit is further configured to:
获取针对指定对象的游戏对象选择指令,所述指定对象为所述多个游戏对象中的一个游戏对象;Obtain a game object selection instruction for a specified object, wherein the specified object is one of the plurality of game objects;
将所述指定对象对应的虚拟道具渲染在所述视频数据中的所述实体对象上,得到指定视频。The virtual props corresponding to the specified object are rendered onto the entity object in the video data to obtain the specified video.
在一种可能的实现方式中,所述确定单元还用于确定所述视频数据中所述实体对象所处的视频位置;In one possible implementation, the determining unit is further configured to determine the video position of the entity object in the video data;
所述渲染单元还用于:The rendering unit is also used for:
根据所述视频位置确定所述虚拟道具对应的显示形态;The display form of the virtual prop is determined based on the video location;
基于所述显示形态将所述虚拟道具渲染在所述视频数据中的所述实体对象上,得到目标视频。Based on the display format, the virtual props are rendered onto the entity objects in the video data to obtain the target video.
在一种可能的实现方式中,所述装置还包括存储单元,所述存储单元用于:In one possible implementation, the device further includes a storage unit, the storage unit being used for:
将所述目标视频在存储位置进行保存;Save the target video at the storage location;
基于所述存储位置生成对应的地址码,并展示所述地址码;Generate a corresponding address code based on the storage location, and display the address code;
若基于所述地址码获取终端设备发送的视频下载请求,从所述存储位置向所述终端设备返回所述目标视频。If a video download request sent by a terminal device is obtained based on the address code, the target video is returned to the terminal device from the storage location.
在一种可能的实现方式中,所述显示区域为三面屏,所述三面屏的三个显示屏幕相互垂直设置。In one possible implementation, the display area is a three-sided screen, with the three display screens of the three-sided screen arranged perpendicularly to each other.
由此可见,通过设置的显示区域可以显示目标游戏的游戏环境图像,当显示区域中进入实体对象时,可针对显示区域采集视频数据,由于显示区域所显示的游戏环境图像作为实体对象的背景,视频数据中实体对象犹如处于目标游戏的场景中,起到了临场感的作用。通过识别视频数据中实体对象的外形参数,可以基于外形参数从目标游戏的多个游戏对象中确定出与实体对象相匹配的目标游戏对象,并将目标游戏对象对应的虚拟道具渲染在视频数据中的实体对象上,得到目标视频。由于目标游戏对象在外形上与实体对象较为类似,使得目标视频中被渲染了虚拟道具的实体对象会与目标游戏对象更为相似,起到了实体对象扮演目标游戏对象在目标游戏场景中的观感,不仅带来了较好的沉浸式体验,还能具有趣味性。Therefore, the set display area can display the game environment image of the target game. When a physical object enters the display area, video data can be captured for that area. Since the game environment image displayed in the display area serves as the background for the physical object, the physical object in the video data appears to be in the target game scene, creating a sense of immersion. By identifying the shape parameters of the physical object in the video data, a target game object matching the physical object can be determined from multiple game objects in the target game based on these parameters. The virtual props corresponding to the target game object are then rendered onto the physical object in the video data, resulting in the target video. Because the target game object is similar in appearance to the physical object, the physical object rendered with virtual props in the target video will resemble the target game object even more closely, creating the illusion that the physical object is playing the role of the target game object in the target game scene. This not only provides a better immersive experience but also adds a sense of fun.
本申请实施例还提供了一种计算机设备,该计算机设备为前述介绍的计算机设备,可以包括终端设备或服务器,前述的视频处理装置可以配置在该计算机设备中。下面结合附图对该计算机设备进行介绍。This application also provides a computer device, which is the computer device described above, and may include a terminal device or a server. The aforementioned video processing apparatus may be configured in this computer device. The computer device will now be described in conjunction with the accompanying drawings.
若该计算机设备为终端设备,请参见图11所示,本申请实施例提供了一种终端设备,以终端设备为手机为例:If the computer device is a terminal device, please refer to Figure 11. This application embodiment provides a terminal device, taking a mobile phone as an example:
图11示出的是与本申请实施例提供的终端设备相关的手机的部分结构的框图。参考图11,手机包括:射频(Radio Frequency,简称RF)电路1410、存储器1420、输入单元1430、显示单元1440、传感器1450、音频电路1460、无线保真(简称WiFi)模块1470、处理器1480、以及电源1490等部件。本领域技术人员可以理解,图11中示出的手机结构并不构成对手机的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Figure 11 shows a block diagram of a portion of the structure of a mobile phone related to the terminal device provided in the embodiments of this application. Referring to Figure 11, the mobile phone includes components such as a radio frequency (RF) circuit 1410, a memory 1420, an input unit 1430, a display unit 1440, a sensor 1450, an audio circuit 1460, a Wi-Fi module 1470, a processor 1480, and a power supply 1490. Those skilled in the art will understand that the mobile phone structure shown in Figure 11 does not constitute a limitation on the mobile phone and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
下面结合图11对手机的各个构成部件进行具体的介绍:The following section, with reference to Figure 11, provides a detailed introduction to the various components of the mobile phone:
RF电路1410可用于收发信息或通话过程中,信号的接收和发送,特别地,将基站的下行信息接收后,给处理器1480处理;另外,将设计上行的数据发送给基站。The RF circuit 1410 can be used to receive and transmit signals during information transmission or calls. In particular, it receives downlink information from the base station and processes it with the processor 1480; in addition, it transmits uplink data to the base station.
存储器1420可用于存储软件程序以及模块,处理器1480通过运行存储在存储器1420的软件程序以及模块,从而执行手机的各种功能应用以及数据处理。The memory 1420 can be used to store software programs and modules, and the processor 1480 executes various functions and data processing of the mobile phone by running the software programs and modules stored in the memory 1420.
输入单元1430可用于接收输入的数字或字符信息,以及产生与手机的用户设置以及功能控制有关的键信号输入。具体地,输入单元1430可包括触控面板1431以及其他输入设备1432。触控面板1431,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板1431上或在触控面板1431附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触控面板1431可包括触摸检测装置和触摸控制器两个部分。The input unit 1430 can be used to receive input numerical or character information, and to generate key signal inputs related to user settings and function control of the mobile phone. Specifically, the input unit 1430 may include a touch panel 1431 and other input devices 1432. The touch panel 1431, also known as a touch screen, can collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near the touch panel 1431), and drive the corresponding connected devices according to a pre-set program. Optionally, the touch panel 1431 may include two parts: a touch detection device and a touch controller.
显示单元1440可用于显示由用户输入的信息或提供给用户的信息以及手机的各种菜单。显示单元1440可包括显示面板1441。The display unit 1440 can be used to display information input by the user or information provided to the user, as well as various menus of the mobile phone. The display unit 1440 may include a display panel 1441.
手机还可包括至少一种传感器1450,比如光传感器、运动传感器以及其他传感器。The mobile phone may also include at least one sensor 1450, such as a light sensor, a motion sensor, and other sensors.
音频电路1460、扬声器1461,传声器1462可提供用户与手机之间的音频接口。音频电路1460可将接收到的音频数据转换后的电信号,传输到扬声器1461,由扬声器1461转换为声音信号输出;另一方面,传声器1462将收集的声音信号转换为电信号,由音频电路1460接收后转换为音频数据,再将音频数据输出处理器1480处理后,经RF电路1410以发送给比如另一手机,或者将音频数据输出至存储器1420以便进一步处理。Audio circuit 1460, speaker 1461, and microphone 1462 provide an audio interface between the user and the mobile phone. Audio circuit 1460 converts received audio data into electrical signals and transmits them to speaker 1461, where speaker 1461 converts them into sound signals for output. On the other hand, microphone 1462 converts collected sound signals into electrical signals, which are received by audio circuit 1460, converted into audio data, and then processed by processor 1480 before being transmitted via RF circuit 1410 to, for example, another mobile phone, or the audio data can be output to memory 1420 for further processing.
WiFi属于短距离无线传输技术,手机通过WiFi模块1470可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图11示出了WiFi模块1470,但是可以理解的是,其并不属于手机的必须构成,完全可以根据需要在不改变发明的本质的范围内而省略。WiFi is a short-range wireless transmission technology. A mobile phone using the WiFi module 1470 can help users send and receive emails, browse web pages, and access streaming media, providing wireless broadband internet access. Although Figure 11 shows the WiFi module 1470, it is understood that it is not an essential component of a mobile phone and can be omitted as needed without altering the essence of the invention.
处理器1480是手机的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器1420内的软件程序和/或模块,以及调用存储在存储器1420内的数据,执行手机的各种功能和处理数据。The processor 1480 is the control center of the mobile phone. It connects to various parts of the mobile phone through various interfaces and lines. It performs various functions of the mobile phone and processes data by running or executing software programs and/or modules stored in the memory 1420 and calling data stored in the memory 1420.
在本实施例中,该终端设备所包括的处理器1480还具有以下功能:In this embodiment, the processor 1480 included in the terminal device also has the following functions:
获取针对显示区域采集的视频数据,所述显示区域用于显示目标游戏的游戏环境图像,在所述显示区域中具有实体对象;Acquire video data collected for a display area, the display area being used to display game environment images of the target game, and the display area containing entity objects;
确定所述视频数据中所述实体对象的外形参数;Determine the shape parameters of the entity object in the video data;
根据所述外形参数,在所述目标游戏的多个游戏对象中确定与所述实体对象匹配的目标游戏对象;Based on the shape parameters, a target game object matching the entity object is determined from among multiple game objects in the target game;
将所述目标游戏对象对应的虚拟道具渲染在所述视频数据中的所述实体对象上,得到目标视频。The virtual props corresponding to the target game object are rendered onto the entity object in the video data to obtain the target video.
若计算机设备为服务器,本申请实施例还提供一种服务器,请参见图12所示,图12为本申请实施例提供的服务器1500的结构图,服务器1500可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上中央处理器(Central Processing Units,简称CPU)1522(例如,一个或一个以上处理器)和存储器1532,一个或一个以上存储应用程序1542或数据1544的存储介质1530(例如一个或一个以上海量存储设备)。其中,存储器1532和存储介质1530可以是短暂存储或持久存储。存储在存储介质1530的程序可以包括一个或一个以上模块(图示没标出),每个模块可以包括对服务器中的一系列指令操作。更进一步地,中央处理器1522可以设置为与存储介质1530通信,在服务器1500上执行存储介质1530中的一系列指令操作。If the computer device is a server, this application embodiment also provides a server, as shown in Figure 12. Figure 12 is a structural diagram of the server 1500 provided in this application embodiment. The server 1500 can vary considerably due to different configurations or performance, and may include one or more central processing units (CPUs) 1522 (e.g., one or more processors) and memory 1532, and one or more storage media 1530 (e.g., one or more mass storage devices) for storing application programs 1542 or data 1544. The memory 1532 and storage media 1530 can be temporary or persistent storage. The program stored in the storage media 1530 may include one or more modules (not shown in the figure), each module may include a series of instruction operations on the server. Furthermore, the central processing unit 1522 may be configured to communicate with the storage media 1530 and execute the series of instruction operations in the storage media 1530 on the server 1500.
服务器1500还可以包括一个或一个以上电源1526,一个或一个以上有线或无线网络接口1550,一个或一个以上输入输出接口1558,和/或,一个或一个以上操作系统1541,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM等等。Server 1500 may also include one or more power supplies 1526, one or more wired or wireless network interfaces 1550, one or more input/output interfaces 1558, and/or one or more operating systems 1541, such as Windows Server ™ , Mac OS X ™ , Unix ™ , Linux ™ , FreeBSD ™ , etc.
上述实施例中由服务器所执行的步骤可以基于图12所示的服务器结构。The steps performed by the server in the above embodiments can be based on the server structure shown in Figure 12.
另外,本申请实施例还提供了一种存储介质,所述存储介质用于存储计算机程序,所述计算机程序用于执行上述实施例提供的方法。In addition, this application embodiment also provides a storage medium for storing a computer program for executing the method provided in the above embodiment.
本申请实施例还提供了一种包括指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述实施例提供的方法。This application also provides a computer program product including instructions that, when run on a computer, cause the computer to perform the methods provided in the above embodiments.
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质可以是下述介质中的至少一种:只读存储器(英文:Read-only Memory,缩写:ROM)、RAM、磁碟或者光盘等各种可以存储程序代码的介质。Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium can be at least one of the following media: read-only memory (ROM), RAM, magnetic disk or optical disk, and other media that can store program code.
需要说明的是,本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于设备及系统实施例而言,由于其基本相似于方法实施例,所以描述得比较简单,相关之处参见方法实施例的部分说明即可。以上所描述的设备及系统实施例仅仅是示意性的,其中作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。It should be noted that the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for the device and system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiments. The device and system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of the solution in this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.
以上所述,仅为本申请的一种具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本申请的保护范围之内。而且本申请在上述各方面提供的实现方式的基础上,还可以进行进一步组合以提供更多实现方式。因此,本申请的保护范围应该以权利要求的保护范围为准。The above description is merely one specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Moreover, based on the implementation methods provided in the above aspects, this application can be further combined to provide more implementation methods. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims (13)
Publications (2)
| Publication Number | Publication Date |
|---|---|
| HK40070373A HK40070373A (en) | 2022-10-28 |
| HK40070373B true HK40070373B (en) | 2025-05-02 |
Family
ID=
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11308672B2 (en) | Telepresence of users in interactive virtual spaces | |
| JP6700463B2 (en) | Filtering and parental control methods for limiting visual effects on head mounted displays | |
| CN111580652B (en) | Video playback control method, device, augmented reality device and storage medium | |
| US20180373413A1 (en) | Information processing method and apparatus, and program for executing the information processing method on computer | |
| US20090202114A1 (en) | Live-Action Image Capture | |
| US12511827B2 (en) | Interactive method and apparatus based on virtual scene, device, and medium | |
| CN106303555A (en) | A kind of live broadcasting method based on mixed reality, device and system | |
| CN108876878B (en) | Head portrait generation method and device | |
| CN113194329B (en) | Live interaction method, device, terminal and storage medium | |
| CN106730815A (en) | The body-sensing interactive approach and system of a kind of easy realization | |
| US12020389B2 (en) | Systems and methods for providing real-time composite video from multiple source devices featuring augmented reality elements | |
| US20230330541A1 (en) | Method and apparatus for man-machine interaction based on story scene, device and medium | |
| US20230386147A1 (en) | Systems and Methods for Providing Real-Time Composite Video from Multiple Source Devices Featuring Augmented Reality Elements | |
| WO2023201937A1 (en) | Human-machine interaction method and apparatus based on story scene, device, and medium | |
| US20250271944A1 (en) | Hand gesture magnitude analysis and gearing for communicating context-correct communication | |
| US20240037832A1 (en) | Metaverse system | |
| CN116912463A (en) | 3D virtual image processing method, device, electronic device and readable storage medium | |
| CN114425162B (en) | A video processing method and related device | |
| HK40070373B (en) | Video processing method and related apparatus | |
| CN116506675A (en) | Processing method, device, computer equipment and storage medium of interactive video | |
| HK40070373A (en) | Video processing method and related apparatus | |
| CN120381657A (en) | A game processing method and related device | |
| CN121222078A (en) | Methods, devices, equipment, and storage media for generating skills and actions of virtual characters | |
| JP2025136644A (en) | Programs and systems | |
| CN118118700A (en) | Live interaction method, live interaction device, computer equipment and computer readable storage medium |