技术领域technical field
本发明涉及终端设备领域,尤其涉及一种游戏形象调整方法及其装置。The invention relates to the field of terminal equipment, in particular to a game image adjustment method and device thereof.
背景技术Background technique
目前,各种游戏层出不穷,游戏已经成为人们娱乐休闲的一部分。尤其是是三维游戏,由于其游戏中人物的虚拟形象更加符合人的视觉效果,越来越受到人们的青睐。At present, various games emerge in an endless stream, and games have become a part of people's entertainment and leisure. Especially three-dimensional games, because the virtual images of the characters in the games are more in line with people's visual effects, they are more and more popular among people.
相关技术中,游戏中人物的虚拟形象是通过制作软件来进行构建的。由于人物的虚拟形象为提前构建好的,用户无法对其进行调整,无法满足用户的个性化需求。此外,用户在玩游戏时,只能选择已经构建好的虚拟形象,存在代入感较差的为题。In related technologies, the avatars of the characters in the game are constructed by making software. Since the virtual image of the character is built in advance, the user cannot adjust it, and cannot meet the individual needs of the user. In addition, when playing the game, the user can only choose the avatar that has been built, which has a problem of poor sense of substitution.
发明内容Contents of the invention
本发明旨在至少在一定程度上解决相关技术中的技术问题之一。The present invention aims to solve one of the technical problems in the related art at least to a certain extent.
为此,本发明的第一个目的在于提出一种游戏形象调整方法,以实现根据用户的深度信息构建虚拟形象,由于用户的虚拟形象比游戏中设定的虚拟形象更加接近现实,从而能够提高游戏的代入感。此外,用户可以根据自身需求对虚拟形象进行调整,能够满足用户的个性化需求,提升该方法的适用性,以及解决现有由于人物的虚拟形象为提前构建好的,用户无法对其进行调整,无法满足用户的个性化需求。此外,用户在玩游戏时,只能选择已经构建好的虚拟形象,存在代入感较差的为题。For this reason, the first purpose of the present invention is to propose a game image adjustment method to realize the construction of virtual images according to the user's depth information. Since the user's virtual image is closer to reality than the virtual image set in the game, it can improve The sense of substitution in the game. In addition, the user can adjust the virtual image according to their own needs, which can meet the individual needs of the user, improve the applicability of the method, and solve the problem that the user cannot adjust the virtual image of the character because it is constructed in advance. Can not meet the individual needs of users. In addition, when playing the game, the user can only choose the avatar that has been built, which has a problem of poor sense of substitution.
本发明的第二个目的在于提出一种游戏形象调整装置。The second object of the present invention is to provide a game image adjustment device.
本发明的第三个目的在于提出一种计算机可读存储介质。A third object of the present invention is to provide a computer-readable storage medium.
本发明的第四个目的在于提出一种终端设备。The fourth object of the present invention is to provide a terminal device.
为达上述目的,本发明第一方面实施例提出了一种游戏形象调整方法,包括:In order to achieve the above purpose, the embodiment of the first aspect of the present invention proposes a game image adjustment method, including:
获取携带试图在游戏中构建虚拟形象的用户的深度信息;其中,所述深度信息对用户进行结构光图像处理后生成的;Obtain the depth information of the user who is trying to build an avatar in the game; wherein, the depth information is generated after the structured light image processing is performed on the user;
根据所述深度信息构建所述用户的虚拟形象;Constructing an avatar of the user according to the depth information;
获取对所述用户的虚拟形象进行调整的调整信息;Acquiring adjustment information for adjusting the virtual image of the user;
根据所述调整信息对所述虚拟形象进行调整,形成所述用户的目标虚拟形象。The avatar is adjusted according to the adjustment information to form a target avatar of the user.
本发明实施例的用户表情识别方法,通过获取携带试图在游戏中构建虚拟形象的用户的深度信息;其中,深度信息对用户进行结构光图像处理后生成的,根据深度信息构建用户的虚拟形象,获取对用户的虚拟形象进行调整的调整信息,根据调整信息对虚拟形象进行调整,形成用户的目标虚拟形象。由此,可以实现根据用户的深度信息构建虚拟形象,由于用户的虚拟形象比游戏中设定的虚拟形象更加接近现实,从而能够提高游戏的代入感。此外,用户可以根据自身需求对虚拟形象进行调整,能够满足用户的个性化需求,提升该方法的适用性。The user expression recognition method in the embodiment of the present invention obtains the depth information of the user who is trying to build an avatar in the game; wherein, the depth information is generated after the structured light image processing is performed on the user, and the user's avatar is constructed according to the depth information, The adjustment information for adjusting the virtual image of the user is acquired, and the virtual image is adjusted according to the adjustment information to form the target virtual image of the user. In this way, the avatar can be constructed according to the user's depth information, and since the user's avatar is closer to reality than the avatar set in the game, the sense of substitution in the game can be improved. In addition, users can adjust the virtual image according to their own needs, which can meet the individual needs of users and improve the applicability of the method.
为达上述目的,本发明第二方面实施例提出了一种游戏形象调整装置,包括:In order to achieve the above purpose, the embodiment of the second aspect of the present invention proposes a game image adjustment device, including:
第一获取模块,用于获取携带试图在游戏中构建虚拟形象的用户的深度信息;其中,所述深度信息对用户进行结构光图像处理后生成的;The first acquisition module is used to acquire the depth information of the user who is trying to build an avatar in the game; wherein, the depth information is generated after the structured light image processing is performed on the user;
构建模块,用于根据所述深度信息构建所述用户的虚拟形象;A construction module, configured to construct the avatar of the user according to the depth information;
第二获取模块,用于获取对所述用户的虚拟形象进行调整的调整信息;The second obtaining module is used to obtain adjustment information for adjusting the virtual image of the user;
调整模块,用于根据所述调整信息对所述虚拟形象进行调整,形成所述用户的目标虚拟形象。An adjustment module, configured to adjust the avatar according to the adjustment information to form the user's target avatar.
本发明实施例的游戏形象调整装置,通过获取携带试图在游戏中构建虚拟形象的用户的深度信息;其中,深度信息对用户进行结构光图像处理后生成的,根据深度信息构建用户的虚拟形象,获取对用户的虚拟形象进行调整的调整信息,根据调整信息对虚拟形象进行调整,形成用户的目标虚拟形象。由此,可以实现根据用户的深度信息构建虚拟形象,由于用户的虚拟形象比游戏中设定的虚拟形象更加接近现实,从而能够提高游戏的代入感。此外,用户可以根据自身需求对虚拟形象进行调整,能够满足用户的个性化需求,提升该方法的适用性。The game image adjustment device in the embodiment of the present invention obtains the depth information of the user who is trying to build an avatar in the game; wherein, the depth information is generated after the structured light image processing is performed on the user, and the user's avatar is constructed according to the depth information, The adjustment information for adjusting the virtual image of the user is acquired, and the virtual image is adjusted according to the adjustment information to form the target virtual image of the user. In this way, the avatar can be constructed according to the user's depth information, and since the user's avatar is closer to reality than the avatar set in the game, the sense of substitution in the game can be improved. In addition, users can adjust the virtual image according to their own needs, which can meet the individual needs of users and improve the applicability of the method.
为达上述目的,本发明第三方面实施例提出了一个或多个包含计算机可执行指令的非易失性计算机可读存储介质,当所述计算机可执行指令被一个或多个处理器执行时,使得所述处理器执行如第一方面实施例所述的游戏形象调整方法。To achieve the above purpose, the embodiment of the third aspect of the present invention proposes one or more non-volatile computer-readable storage media containing computer-executable instructions, when the computer-executable instructions are executed by one or more processors , so that the processor executes the game image adjustment method described in the embodiment of the first aspect.
为达上述目的,本发明第四方面实施例提出了一种终端设备,包括存储器及处理器,所述存储器中储存有计算机可读指令,所述指令被所述处理器执行时,使得所述处理器执行如第一方面实施例所述的游戏形象调整方法。To achieve the above purpose, the embodiment of the fourth aspect of the present invention proposes a terminal device, including a memory and a processor, the memory stores computer-readable instructions, and when the instructions are executed by the processor, the The processor executes the game image adjustment method described in the embodiment of the first aspect.
本发明附加的方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本发明的实践了解到。Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
附图说明Description of drawings
本发明上述的和/或附加的方面和优点从下面结合附图对实施例的描述中将变得明显和容易理解,其中:The above and/or additional aspects and advantages of the present invention will become apparent and easy to understand from the following description of the embodiments in conjunction with the accompanying drawings, wherein:
图1为本发明实施例提供的一种游戏形象调整方法的流程示意图;FIG. 1 is a schematic flowchart of a game image adjustment method provided by an embodiment of the present invention;
图2为本发明实施例提供的一个投射结构光的装置组合示意图;Fig. 2 is a schematic diagram of a device for projecting structured light provided by an embodiment of the present invention;
图3为本发明实施例提供的不同形式的结构光的示意图;Fig. 3 is a schematic diagram of different forms of structured light provided by an embodiment of the present invention;
图4为本发明实施例提供的另一种游戏形象调整方法的流程示意图;FIG. 4 is a schematic flowchart of another game image adjustment method provided by an embodiment of the present invention;
图5为本发明实施例提供的另一种游戏形象调整方法的流程示意图;FIG. 5 is a schematic flowchart of another game image adjustment method provided by an embodiment of the present invention;
图6为本发明实施例提供的另一种游戏形象调整方法的流程示意图;FIG. 6 is a schematic flowchart of another game image adjustment method provided by an embodiment of the present invention;
图7为本发明实施例提供的另一种游戏形象调整方法的流程示意图;FIG. 7 is a schematic flowchart of another game image adjustment method provided by an embodiment of the present invention;
图8为本发明实施例中非均匀的结构光的投影集合示意图;FIG. 8 is a schematic diagram of a projection set of non-uniform structured light in an embodiment of the present invention;
图9为本发明实施例提供的一种游戏形象调整装置的结构示意图;9 is a schematic structural diagram of a game image adjustment device provided by an embodiment of the present invention;
图10为本发明实施例提供的另一种游戏形象调整装置的结构示意图;FIG. 10 is a schematic structural diagram of another game image adjustment device provided by an embodiment of the present invention;
图11为一个实施例中图像处理电路的示意图。Fig. 11 is a schematic diagram of an image processing circuit in one embodiment.
具体实施方式Detailed ways
下面详细描述本发明的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,旨在用于解释本发明,而不能理解为对本发明的限制。Embodiments of the present invention are described in detail below, examples of which are shown in the drawings, wherein the same or similar reference numerals designate the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the figures are exemplary and are intended to explain the present invention and should not be construed as limiting the present invention.
下面参考附图描述本发明实施例的游戏形象调整方法及其装置。The game image adjustment method and device thereof according to the embodiments of the present invention will be described below with reference to the accompanying drawings.
图1为本发明实施例提供的用户表情识别方法的流程示意图。FIG. 1 is a schematic flowchart of a method for recognizing user expression provided by an embodiment of the present invention.
如图1所示,该游戏形象调整方法包括以下步骤:As shown in Figure 1, the game image adjustment method includes the following steps:
步骤101,获取携带试图在游戏中构建虚拟形象的用户的深度信息;其中,深度信息对用户进行结构光图像处理后生成的。Step 101, acquiring depth information of a user who is trying to build an avatar in a game; wherein, the depth information is generated after structured light image processing is performed on the user.
其中,已知空间方向光的投影的集合称为结构光。Among them, the collection of projections of light with known spatial direction is called structured light.
作为一种示例,图2为一个投射结构光的装置组合示意图。图2中仅以结构光的投影集合为线的集合进行示例,对于投影集合为散斑图案的结构光的原理类似。如图2所示,该装置中可以包括光学投射器和摄像机,其中,光学投射器将一定模式的结构光投射于被测物体,即用户所处的空间内,在用户身体表面上形成由用户表面的形状所调制的图像。该图像由处于另一位置的摄像机探测,从而获得结构光图像。As an example, FIG. 2 is a schematic diagram of a device for projecting structured light. In FIG. 2 , the projection set of the structured light is used as an example for an example, and the principle of the structured light with the projection set being a speckle pattern is similar. As shown in Figure 2, the device may include an optical projector and a camera, wherein the optical projector projects a certain pattern of structured light onto the measured object, that is, in the space where the user is located, and forms a pattern on the surface of the user's body. The image modulated by the shape of the surface. This image is detected by a camera at another location, thereby obtaining a structured light image.
在获得结构光图像后,从该结构光图像中采集用户的光条图像,将用户的光条图像与参考光条图像按照预定算法进行图像数据计算,获取用户身体上光条图像的各个光条相对于参考光条图像中的参考光条的移动距离。利用三角法转换计算得到光条图像的各个光条的深度值,并根据该深度值得到用户的深度信息。After obtaining the structured light image, collect the user's light strip image from the structured light image, perform image data calculation on the user's light strip image and the reference light strip image according to a predetermined algorithm, and obtain each light strip image of the user's body The distance to move the reference bar in the image relative to the reference bar. The depth value of each light bar of the light bar image is converted and calculated by using the triangulation method, and the user's depth information is obtained according to the depth value.
作为一种示例,结构光的类型包括光栅型、光点型、斑纹型(包括圆形斑纹和十字斑纹),如图3所示,图3为本发明实施例提供的不同形式的结构光的示意图。上述结构光是均匀排布的,对应地,生成结构光的设备可以是将光点、线、光栅、格网或斑纹投影到被测物体上的某种投影设备或仪器,比如光学投射器,也可以是生成激光束的激光器。As an example, the types of structured light include grating type, spot type, and speckle type (including circular speckle and cross speckle), as shown in FIG. schematic diagram. The above-mentioned structured light is uniformly arranged. Correspondingly, the device for generating structured light may be some kind of projection device or instrument that projects light spots, lines, gratings, grids or patterns onto the measured object, such as an optical projector, It can also be a laser that generates a laser beam.
本发明实施例中的摄像机可以为终端如手机、掌上电脑等的前置摄像头。由此,当用户拿起终端,并面向终端时,即可调用终端上的光学投射器和摄像头,获取用户的结构光图像,通过对用户的结构光图像进行处理,可获取用户的深度信息。The camera in the embodiment of the present invention may be a front camera of a terminal such as a mobile phone or a handheld computer. Thus, when the user picks up the terminal and faces the terminal, the optical projector and camera on the terminal can be called to obtain the user's structured light image, and the user's depth information can be obtained by processing the user's structured light image.
步骤102,根据深度信息构建用户的虚拟形象。Step 102, constructing the virtual image of the user according to the depth information.
本实施例中,可以将深度信息与摄像头采集的用户的色彩信息进行融合,得到用户的虚拟形象。具体地,从深度信息和色彩信息中分别提取用户的特征。然后,将从深度信息中提取的用户的特征和从色彩信息中提取的用户的特征进行配准和特征融合处理,最终根据融合后的特征,生成用户的虚拟形象。In this embodiment, the depth information can be fused with the user's color information collected by the camera to obtain the user's avatar. Specifically, user features are extracted from depth information and color information, respectively. Then, the user's features extracted from the depth information and the user's features extracted from the color information are subjected to registration and feature fusion processing, and finally a virtual image of the user is generated according to the fused features.
步骤103,获取对用户的虚拟形象进行调整的调整信息。Step 103, acquiring adjustment information for adjusting the user's avatar.
本实施例中,当构建好用户的虚拟形象后,用户可以根据自己的需求,对虚拟形象进行调整,即对虚拟人物进行美化或者增加特效。In this embodiment, after the user's avatar is constructed, the user can adjust the avatar according to his own needs, that is, beautify the avatar or add special effects.
可以理解的是,用户根据自身需求,对虚拟形象进行美化或者增加特效,是对虚拟形象中的某个身体部位进行调整,因此,调整信息中可以包含需要调整的用户的身体部位,以及具体的调整参数。It can be understood that, beautifying or adding special effects to the avatar according to the user's own needs is to adjust a certain body part in the avatar. Therefore, the adjustment information may include the user's body part to be adjusted, as well as the specific Adjustment parameters.
例如,当用户想要对虚拟形象进行美化时,比如瘦腰、瘦腿、瘦胳膊等,用户可以通过选取操作确定需要进行调整的身体部位。在确定身体部位后,用户可以通过手指连续移动的运动轨迹确定身体部位的调整参数。比如需要调整的身体部位为腿部时,用户可以通过将腿部区域向里拖动的方式,使腿部变细。For example, when the user wants to beautify the avatar, such as thin waist, thin legs, thin arms, etc., the user can determine the body parts that need to be adjusted through a selection operation. After the body part is determined, the user can determine the adjustment parameters of the body part through the motion trajectory of the finger's continuous movement. For example, when the body part to be adjusted is the leg, the user can drag the leg area inward to make the leg thinner.
或者,当用户想要对虚拟形象增加特效时,比如换发型、换服装、用别人的五官替换自己的五官等,用户可以通过选取一个目标素材,而后可以由用户指定目标素材对应的身体部位,则由目标素材和对应的身体部位可以确定调整信息。Or, when the user wants to add special effects to the avatar, such as changing hairstyles, changing clothes, replacing his own facial features with other people's facial features, the user can select a target material, and then the user can specify the body part corresponding to the target material, Adjustment information can then be determined from the target material and the corresponding body parts.
步骤104,根据调整信息对虚拟形象进行调整,形成用户的目标虚拟形象。Step 104, adjust the avatar according to the adjustment information to form the user's target avatar.
在确定调整信息后,可以根据调整信息对虚拟形象进行调整,形成用户的目标虚拟形象,能够根据用户的深度信息构建虚拟形象,由于用户的虚拟形象比游戏中设定的虚拟形象更加接近现实,从而能够提高游戏的代入感。此外,用户可以根据自身需求对虚拟形象进行调整,能够满足用户的个性化需求,提升该方法的适用性。After the adjustment information is determined, the avatar can be adjusted according to the adjustment information to form the user's target avatar, and the avatar can be constructed according to the user's depth information. Since the user's avatar is closer to reality than the avatar set in the game, This can improve the sense of substitution in the game. In addition, users can adjust the virtual image according to their own needs, which can meet the individual needs of users and improve the applicability of the method.
举例而言,当用户试图改变自己的身材时,例如瘦腿,用户可以选中腿部区域,而后可以通过将该腿部区域向里拖动的方式,使得腿部变细,满足用户的个性化需求,提升该方法的适用性。For example, when a user tries to change his figure, such as thin legs, the user can select the leg area, and then drag the leg area inward to make the legs thinner to meet the user's personalization needs to improve the applicability of the method.
或者,当用户试图改变自己的发型时,可以从预先构建的素材中选取一款自己喜欢的发型,该款发型就是目标素材,该目标素材对应的身体部位就是头部。用户的指定位置可以为头顶,可以获取到用户头顶的深度信息,以及发型的深度信息,而后利用用户自己的头顶的深度信息对该发型的深度信息进行调整,使得调整后的发型可以自然地放置到用户的头顶,这样就可以完成对虚拟形象的美化操作。由于用户根据自己的头顶的深度信息对发型的深度信息进行调整,使得发型的大小或者尺寸更加与头顶匹配,从而能够使得发型放置到头顶上,与头顶贴合的更加自然,处理效果更好。Or, when the user tries to change his hairstyle, he can select a hairstyle he likes from the pre-built materials. This hairstyle is the target material, and the body part corresponding to the target material is the head. The designated position of the user can be the top of the head, and the depth information of the top of the user's head and the depth information of the hairstyle can be obtained, and then the depth information of the hairstyle can be adjusted by using the depth information of the user's own top of the head, so that the adjusted hairstyle can be placed naturally to the top of the user's head, so that the beautification operation of the avatar can be completed. Since the user adjusts the depth information of the hairstyle according to the depth information of the top of the head, the size or size of the hairstyle is more matched with the top of the head, so that the hairstyle can be placed on the top of the head, fit more naturally with the top of the head, and have a better processing effect.
本实施例的游戏形象调整方法,通过获取携带试图在游戏中构建虚拟形象的用户的深度信息;其中,深度信息对用户进行结构光图像处理后生成的,根据深度信息构建用户的虚拟形象,获取对用户的虚拟形象进行调整的调整信息,根据调整信息对虚拟形象进行调整,形成用户的目标虚拟形象。由此,可以实现根据用户的深度信息构建虚拟形象,由于用户的虚拟形象比游戏中设定的虚拟形象更加接近现实,从而能够提高游戏的代入感。此外,用户可以根据自身需求对虚拟形象进行调整,能够满足用户的个性化需求,提升该方法的适用性。In the game image adjustment method of this embodiment, by acquiring the depth information of the user who is trying to build an avatar in the game; wherein, the depth information is generated after the structured light image processing is performed on the user, and the user’s avatar is constructed according to the depth information, and the obtained The adjustment information for adjusting the virtual image of the user is used to adjust the virtual image according to the adjustment information to form the target virtual image of the user. In this way, the avatar can be constructed according to the user's depth information, and since the user's avatar is closer to reality than the avatar set in the game, the sense of substitution in the game can be improved. In addition, users can adjust the virtual image according to their own needs, which can meet the individual needs of users and improve the applicability of the method.
作为本发明实施例的一种可能的实现方式,参见图4,在图1所示实施例的基础上,步骤103具体包括以下子步骤:As a possible implementation of the embodiment of the present invention, referring to FIG. 4, on the basis of the embodiment shown in FIG. 1, step 103 specifically includes the following sub-steps:
步骤401,对用户的选取操作进行监控。Step 401, monitor the user's selection operation.
本实施例中,选取操作可以包括点击、移动等操作。In this embodiment, the selection operation may include operations such as clicking and moving.
具体实现时,可以设置一个监听器以监听用户的选取操作。During specific implementation, a listener can be set to monitor the user's selection operation.
步骤402,将监控到的选取操作对应的操作对象确定为身体部位。Step 402, determining the operation object corresponding to the monitored selection operation as a body part.
例如,监听器可以实时对用户的点击操作进行监控,当监控到点击操作后,可以识别出该点击操作所对应的区域,后台可以分析该区域中所对应的操作对象,如果操作对象为虚拟图像中的某个身体部位,则将该操作对象确定为身体部位,如果操作对象不为虚拟图像中的某个身体部位,则忽视此次选取操作。For example, the listener can monitor the user's click operation in real time. When the click operation is monitored, it can identify the area corresponding to the click operation, and the background can analyze the corresponding operation object in the area. If the operation object is a virtual image If the operation object is not a certain body part in the virtual image, then the selection operation is ignored.
或者,监听器可以实时对用户的移动操作进行监控,当监控到用户的手指在屏幕上连续移动时,比方画一个方形、圆形、椭圆形等,根据用户的移动轨迹确定用户选取的区域,后台可以分析该区域所对应的操作对象,如果操作对象为虚拟图像中的某个身体部位,则将该操作对象确定为身体部位,如果操作对象不为虚拟图像中的某个身体部位,则忽视此次选取操作。Or, the monitor can monitor the user's mobile operation in real time. When the user's finger is continuously moved on the screen, for example, draw a square, circle, oval, etc., and determine the area selected by the user according to the user's movement track. The background can analyze the operation object corresponding to this area, if the operation object is a certain body part in the virtual image, then determine the operation object as a body part, if the operation object is not a certain body part in the virtual image, then ignore This selection operation.
步骤403,根据监控到的选取操作的运动轨迹,确定虚拟形象的调整参数。Step 403: Determine adjustment parameters of the avatar according to the monitored motion track of the selection operation.
例如,如果用户想要瘦胳膊,则用户可以通过画圆的方式选取胳膊中想要瘦的区域,而后可以将该区域往里拖,即运动轨迹为用户手指向里拖动,当手指停止移动时,可以得到调整后的胳膊。将调整后的胳膊的粗细程度和调整前的胳膊的粗细程度作比值,可以得到胳膊的调整参数。For example, if the user wants to thin the arm, the user can draw a circle to select the area in the arm that he wants to thin, and then drag the area inward, that is, the motion track is the user's finger dragging inward, when the finger stops moving , you can get the adjusted arm. The adjustment parameter of the arm can be obtained by comparing the thickness of the adjusted arm with the thickness of the arm before adjustment.
步骤404,根据操作对象和调整参数形成调整信息。Step 404, forming adjustment information according to the operation object and the adjustment parameters.
本实施例中,调整信息包括操作对象和调整参数,当确定需要调整的操作对象时,可以根据调整参数对其进行调整,以满足用户的个性化需求。In this embodiment, the adjustment information includes the operation object and the adjustment parameter. When the operation object to be adjusted is determined, it can be adjusted according to the adjustment parameter to meet the personalized needs of the user.
本实施例的游戏形象调整方法,通过对用户的选取操作进行监控,将监控到的选取操作对应的操作对象确定为身体部位,根据监控到的选取操作的运动轨迹,确定虚拟形象的调整参数,根据操作对象和调整参数形成调整信息。由此,可以由用户确定调整信息,能够满足用户的个性化需求,提升该方法的适用性。In the game image adjustment method of this embodiment, by monitoring the user's selection operation, the operation object corresponding to the monitored selection operation is determined as a body part, and the adjustment parameters of the avatar are determined according to the monitored movement track of the selection operation, Adjustment information is formed according to the operation object and the adjustment parameters. Thus, the adjustment information can be determined by the user, which can meet the personalized needs of the user and improve the applicability of the method.
作为本发明实施例的一种可能的实现方式,参见图5,在图1所示实施例的基础上,步骤103具体包括以下子步骤:As a possible implementation of the embodiment of the present invention, referring to FIG. 5, on the basis of the embodiment shown in FIG. 1, step 103 specifically includes the following sub-steps:
步骤501,从游戏中预先构建的素材中选取一个目标素材。Step 501, select a target material from the pre-built materials in the game.
在本发明的实施例中,游戏中可以预先存储有用于对虚拟图像进行调整的多个素材,例如,素材可以为服装、发型、虚拟翅膀、脸型、五官等。游戏也可以从服务器上实时下载新的素材,新下载的素材可以存储到预先构建的素材中。In the embodiment of the present invention, multiple materials for adjusting the virtual image may be pre-stored in the game, for example, the materials may be clothing, hairstyles, virtual wings, face shapes, facial features, and the like. The game can also download new material from the server in real time, and the newly downloaded material can be stored in a pre-built material.
具体地,用户可以点击终端设备的屏幕,从预先构建的素材中选取一个素材作为目标素材。终端设备可以实时对用户的点击操作进行监控,当监控到用户的点击操作后,可以识别出该点击操作对应的区域,后台可以分析该区域中所对应的素材,进而确定出目标素材。Specifically, the user may click on the screen of the terminal device to select a material from pre-built materials as the target material. The terminal device can monitor the user's click operation in real time. When the user's click operation is monitored, the area corresponding to the click operation can be identified, and the background can analyze the material corresponding to the area to determine the target material.
步骤502,获取目标素材对应的身体部位和目标素材的构成参数。Step 502, acquiring body parts corresponding to the target material and composition parameters of the target material.
其中,目标素材的构成参数为目标素材的具体构成信息,例如颜色、大小和/或形状等。Wherein, the composition parameter of the target material is specific composition information of the target material, such as color, size and/or shape, and the like.
本实施例中,用户可以根据自己的美化需求,确定出目标素材放置的位置,一般情况下,可以用户可以通过点击操作或者移动等方式来指定一个位置。例如,用户可以点击一下屏幕,终端对用户的点击操作进行监控,当监控到点击操作后,可以识别点击操作位置所对应的位置。再例如,用户可以通过手指在屏幕上进行连续移动,比方画一个方形、圆形、椭圆形等,根据手指移动的轨迹得到用户指定的位置。上述用户选取的位置即为目标素材对应的身体部位。In this embodiment, the user can determine the location of the target material according to his beautification needs. Generally, the user can specify a location by clicking or moving. For example, the user may click the screen once, and the terminal monitors the user's click operation, and when the click operation is monitored, it may identify the location corresponding to the click operation location. For another example, the user can continuously move the finger on the screen, such as drawing a square, circle, oval, etc., and obtain the location specified by the user according to the trajectory of the finger movement. The position selected by the user is the body part corresponding to the target material.
例如,当用户视图改变自己的发型时,可以从预先构建的素材中选取一款自己喜欢的发型,该款发型就是目标素材,该目标素材对应的身体部位就是头部。For example, when the user wants to change his hairstyle, he can select a hairstyle he likes from the pre-built materials. This hairstyle is the target material, and the body part corresponding to the target material is the head.
或者,当目标素材为手表时,用户可以点击手腕的位置,该目标素材对应的身体部位就是手腕。Alternatively, when the target material is a watch, the user can click on the position of the wrist, and the body part corresponding to the target material is the wrist.
步骤503,利用目标素材对应的身体部位和构成参数,形成调整信息。Step 503, using body parts and composition parameters corresponding to the target material to form adjustment information.
本实施例中,调整信息包括需要美化的身体部位和目标素材的构成参数,当确定需要美化的身体部位时,可以根据目标素材的构成参数,对其进行美化,以满足用户的个性化需求。In this embodiment, the adjustment information includes the body parts to be beautified and the composition parameters of the target material. When the body parts to be beautified are determined, they can be beautified according to the composition parameters of the target material to meet the individual needs of users.
本实施例的游戏形象调整方法,通过从游戏中预先构建的素材中选取一个目标素材,获取目标素材对应的身体部位和目标素材的构成参数,利用目标素材对应的身体部位和构成参数,形成调整信息。由此,可以由用户确定调整信息,能够满足用户的个性化需求,提升该方法的适用性。In the game image adjustment method of this embodiment, a target material is selected from the pre-built materials in the game, the body parts corresponding to the target material and the composition parameters of the target material are obtained, and the body parts and composition parameters corresponding to the target material are used to form an adjustment information. Thus, the adjustment information can be determined by the user, which can meet the personalized needs of the user and improve the applicability of the method.
可选地,参见图6,在图1所示实施例的基础上,步骤104具体包括以下子步骤:Optionally, referring to FIG. 6, on the basis of the embodiment shown in FIG. 1, step 104 specifically includes the following sub-steps:
步骤601,从调整信息中提取需要调整用户的身体部位。Step 601, extract the user's body parts that need to be adjusted from the adjustment information.
可以理解的是,用户根据自己的需求,对虚拟形象进行美化或者增加特效,是对虚拟形象中的某个身体部位进行调整,因此,调整信息中包含需要调整的用户的身体部位,以及具体的调整参数。It can be understood that, beautifying or adding special effects to the avatar according to the user's needs is to adjust a certain body part in the avatar. Therefore, the adjustment information includes the user's body part that needs to be adjusted, as well as specific details. Adjustment parameters.
例如,由步骤404可知,调整信息是根据操作对象和调整参数所形成的。或者,由步骤503可知,由于调整信息是利用目标素材对应的身体部位和构成参数所形成的。因此,可以从调整信息中提取需要调整用户的身体部位。For example, it can be known from step 404 that the adjustment information is formed according to the operation object and the adjustment parameters. Alternatively, it can be known from step 503 that the adjustment information is formed using the body parts and composition parameters corresponding to the target material. Therefore, the user's body parts that need to be adjusted can be extracted from the adjustment information.
步骤602,从虚拟形象中识别出身体部位,并按照调整信息中的调整参数对身体部位进行调整,得到目标虚拟形象。Step 602, identifying the body parts from the avatar, and adjusting the body parts according to the adjustment parameters in the adjustment information to obtain the target avatar.
具体实现时,可以根据每个身体部位的深度信息,从虚拟形象中识别出需要调整的身体部位,而后按照调整信息中的调整参数,对需要调整的身体部位进行调整,得到目标虚拟形象。During specific implementation, the body parts that need to be adjusted can be identified from the virtual image according to the depth information of each body part, and then the body parts that need to be adjusted can be adjusted according to the adjustment parameters in the adjustment information to obtain the target virtual image.
本实施例的游戏形象调整方法,通过从调整信息中提取需要调整用户的身体部位,从虚拟形象中识别出身体部位,并按照调整信息中的调整参数对身体部位进行调整,得到目标虚拟形象。由此,用户可以根据自身需求对虚拟形象进行调整,能够满足用户的个性化需求,提升该方法的适用性。The game image adjustment method of this embodiment extracts the user's body parts to be adjusted from the adjustment information, identifies the body parts from the avatar, and adjusts the body parts according to the adjustment parameters in the adjustment information to obtain the target avatar. Thus, the user can adjust the virtual image according to his own needs, which can meet the individual needs of the user and improve the applicability of the method.
可选地,参见图7,在图1所示实施例的基础上,在步骤101之前,该游戏形象调整方法还可以包括以下步骤:Optionally, referring to FIG. 7 , on the basis of the embodiment shown in FIG. 1 , before step 101, the game image adjustment method may also include the following steps:
步骤701,向用户身体发射结构光。Step 701, emit structured light to the user's body.
终端设备上可以安装有应用程序,通过应用程序可以调用生成结构光的设备即投射装置,然后由投射装置向用户的身体发出结构光。An application program can be installed on the terminal device, through which a device that generates structured light, that is, a projection device, can be called, and then the projection device emits structured light to the user's body.
步骤702,采集结构光在用户身体上的反射光并形成深度信息。Step 702, collect the reflected light of the structured light on the user's body and form depth information.
当向用户的身体发射的结构光到达身体之后,由于身体上各个部位会对结构光造成阻碍,结构光会在身体处发生反射,此时,可以通过终端中设置的摄像头对结构光在身体上的反射光进行采集,通过采集到的反射光可以形成用户的结构光图像,进而对用户的结构光图像进行处理,可以获取用户的深度信息。When the structured light emitted to the user's body reaches the body, since various parts of the body will hinder the structured light, the structured light will reflect at the body. At this time, the structured light can be detected by the camera set in the terminal The reflected light is collected, the collected reflected light can form the user's structured light image, and then the user's structured light image can be processed to obtain the user's depth information.
本实施例的游戏形象调整方法,通过向用户身体发射结构光,采集结构光在用户身体上的反射光并形成深度信息。由此,可以准确获取用户的深度信息,便于用户的后续操作。In the game image adjustment method of this embodiment, the structured light is emitted to the user's body, and the reflected light of the structured light on the user's body is collected to form depth information. In this way, the user's depth information can be accurately obtained, which facilitates the user's subsequent operations.
此处需要说明的是,作为一种示例,上述实施例中采用的结构光可以为非均匀的结构光,非均匀的结构光为多个光斑的集合构成的散斑图案或乱点图案。It should be noted here that, as an example, the structured light used in the above embodiment may be non-uniform structured light, and the non-uniform structured light is a speckle pattern or a random point pattern formed by a collection of multiple light spots.
图8为本发明实施例中非均匀的结构光的投影集合示意图。如图8所示,本发明实施例中采用的是非均匀的结构光,其中,非均匀的结构光为随机排列非均匀的散斑图案,也就是说,该非均匀的结构光为多个光斑的集合,且多个光斑之间采用不均匀的分散方式排布,进而构成一个散斑图案。由于散斑图案所占的存储空间较小,因而,投射装置运行时不会对终端的运行效率造成太大影响,能够节约终端的存储空间。FIG. 8 is a schematic diagram of a collection of projections of non-uniform structured light in an embodiment of the present invention. As shown in Figure 8, non-uniform structured light is used in the embodiment of the present invention, wherein the non-uniform structured light is a randomly arranged non-uniform speckle pattern, that is to say, the non-uniform structured light is a plurality of light spots A collection of multiple light spots are arranged in a non-uniform dispersion manner to form a speckle pattern. Since the storage space occupied by the speckle pattern is small, the operation efficiency of the terminal will not be greatly affected when the projection device is running, and the storage space of the terminal can be saved.
此外,本发明实施例中采用的散斑图案,相较于其他现有的结构光类型而言,散列排布能够降低能量消耗,节省电量,提高终端的续航能力。In addition, the speckle pattern used in the embodiment of the present invention, compared with other existing structured light types, has a hash arrangement that can reduce energy consumption, save power, and improve the battery life of the terminal.
在本发明实施例中,可以在电脑、手机、掌上电脑等终端中设置投射装置和摄像头。投射装置向用户发射非均匀的结构光即散斑图案。具体地,可以利用投射装置中的衍射光学元件形成散斑图案,其中,该衍射光学元件上设置有一定数量的浮雕,不规则的散斑图案就由衍射光学元件上不规则的浮雕产生。本发明实施例中,浮雕凹槽深度和数量可以通过算法设置。In the embodiment of the present invention, a projection device and a camera can be set in terminals such as a computer, a mobile phone, and a handheld computer. The projection device emits non-uniform structured light, that is, a speckle pattern, to the user. Specifically, the diffractive optical element in the projection device can be used to form the speckle pattern, wherein the diffractive optical element is provided with a certain number of reliefs, and the irregular speckle pattern is generated by the irregular relief on the diffractive optical element. In the embodiment of the present invention, the depth and number of embossed grooves can be set by an algorithm.
其中,投射装置可以用于向被测对象所处的空间投射一个预设的散斑图案。摄像头可以用于对已投射散斑图案的被测对象进行采集,以得到带有散斑图案的被测对象的二维畸变图像。Wherein, the projecting device can be used to project a preset speckle pattern to the space where the measured object is located. The camera can be used to collect the measured object on which the speckle pattern has been projected, so as to obtain a two-dimensional distorted image of the measured object with the speckle pattern.
本发明实施例中,当终端的摄像头对准用户时,终端中的投射装置可以向用户所处的空间投射预设的散斑图案,该散斑图案中具有多个散斑点,当该散斑图案被投射到用户身体表面上时,该散斑图案中的好多散斑点会由于身体表面包含的各个部位的原因而发生偏移。通过终端的摄像头对用户的身体进行采集,得到带有散斑图案的用户的二维畸变图像。In the embodiment of the present invention, when the camera of the terminal is aimed at the user, the projection device in the terminal can project a preset speckle pattern to the space where the user is located. The speckle pattern has multiple speckle points. When the speckle When the pattern is projected onto the user's body surface, many speckle spots in the speckle pattern will be shifted due to various parts contained in the body surface. The body of the user is collected through the camera of the terminal to obtain a two-dimensional distorted image of the user with a speckle pattern.
进一步地,将采集到的用户的散斑图像与参考散斑图像按照预定算法进行图像数据计算,获取身体的散斑图像的各个散斑点相对于参考散斑点的移动距离。最后根据该移动距离、参考散斑图像与终端上摄像头的距离以及投射装置与摄像头之间的相对间隔值,利用三角法得到散斑红外图像的各个散斑点的深度值,并根据该深度值得到用户的深度图像,进而根据深度图像可获得用户的虚拟形象。Further, image data calculation is performed on the collected speckle image of the user and the reference speckle image according to a predetermined algorithm, and the moving distance of each speckle point of the speckle image of the body relative to the reference speckle point is obtained. Finally, according to the moving distance, the distance between the reference speckle image and the camera on the terminal, and the relative distance between the projection device and the camera, the depth value of each speckle point in the speckle infrared image is obtained by triangulation, and the depth value is obtained according to the depth value The user's depth image, and then the user's avatar can be obtained according to the depth image.
图9为本发明实施例提供的一种游戏形象调整装置的结构示意图。FIG. 9 is a schematic structural diagram of a game image adjustment device provided by an embodiment of the present invention.
参见图9,该游戏形象调整装置包括:第一获取模块910、构建模块920、第二获取模块930,以及调整模块940。其中,Referring to FIG. 9 , the game image adjustment device includes: a first acquisition module 910 , a construction module 920 , a second acquisition module 930 , and an adjustment module 940 . in,
第一获取模块910,用于获取携带试图在游戏中构建虚拟形象的用户的深度信息;其中,深度信息对用户进行结构光图像处理后生成的。The first acquiring module 910 is used to acquire the depth information of the user who tries to build the avatar in the game; wherein, the depth information is generated after the structured light image processing is performed on the user.
构建模块920,用于根据深度信息构建用户的虚拟形象。A construction module 920, configured to construct the user's avatar according to the depth information.
第二获取模块930,用于获取对用户的虚拟形象进行调整的调整信息。The second obtaining module 930 is configured to obtain adjustment information for adjusting the user's avatar.
作为本发明实施例的一种可能的实现方式,第二获取模块930,具体用于对用户的选取操作进行监控;将监控到的选取操作对应的操作对象确定为身体部位;根据监控到的选取操作的运动轨迹,确定虚拟形象的调整参数;根据操作对象和调整参数形成调整信息。As a possible implementation of the embodiment of the present invention, the second acquisition module 930 is specifically configured to monitor the user's selection operation; determine the operation object corresponding to the monitored selection operation as a body part; The motion track of the operation determines the adjustment parameters of the avatar; the adjustment information is formed according to the operation object and the adjustment parameters.
作为本发明实施例的另一种可能的实现方式,第二获取模块930,具体用于从游戏中预先构建的素材中选取一个目标素材;获取目标素材对应的身体部位和目标素材的构成参数;利用目标素材对应的身体部位和构成参数,形成调整信息。As another possible implementation of the embodiment of the present invention, the second acquisition module 930 is specifically configured to select a target material from the pre-built materials in the game; acquire the body part corresponding to the target material and the composition parameters of the target material; Use the body parts and composition parameters corresponding to the target material to form adjustment information.
调整模块940,用于根据调整信息对虚拟形象进行调整,形成用户的目标虚拟形象。The adjustment module 940 is configured to adjust the avatar according to the adjustment information to form the user's target avatar.
具体实现时,调整模块940,具体用于从调整信息中提取需要调整用户的身体部位;从虚拟形象中识别出身体部位,并按照调整信息中的调整参数对身体部位进行调整,得到目标虚拟形象。During specific implementation, the adjustment module 940 is specifically used to extract the user's body parts that need to be adjusted from the adjustment information; identify the body parts from the avatar, and adjust the body parts according to the adjustment parameters in the adjustment information to obtain the target avatar .
进一步地,在本发明实施例的一种可能的实现方式中,在图9的基础上,参见图10,该游戏形象调整装置还进一步包括:Further, in a possible implementation of the embodiment of the present invention, on the basis of FIG. 9, referring to FIG. 10, the game image adjustment device further includes:
发射模块950,用于向用户身体发射结构光。The emitting module 950 is configured to emit structured light to the user's body.
采集模块960,用于采集结构光在用户身体上的反射光并形成深度信息。The collection module 960 is configured to collect the reflected light of the structured light on the user's body and form depth information.
需要说明的是,前述图1-图7实施例对游戏形象调整方法实施例的解释说明也适用于该实施例的游戏形象调整装置,此处不再赘述。It should be noted that the explanations of the embodiment of the game image adjustment method in the foregoing embodiments in FIGS. 1-7 are also applicable to the game image adjustment device in this embodiment, and details are not repeated here.
本实施例的游戏形象调整装置,通过获取携带试图在游戏中构建虚拟形象的用户的深度信息;其中,深度信息对用户进行结构光图像处理后生成的,根据深度信息构建用户的虚拟形象,获取对用户的虚拟形象进行调整的调整信息,根据调整信息对虚拟形象进行调整,形成用户的目标虚拟形象。由此,可以实现根据用户的深度信息构建虚拟形象,由于用户的虚拟形象比游戏中设定的虚拟形象更加接近现实,从而能够提高游戏的代入感。此外,用户可以根据自身需求对虚拟形象进行调整,能够满足用户的个性化需求,提升该方法的适用性。The game image adjustment device of this embodiment obtains the depth information of the user who is trying to build an avatar in the game; wherein, the depth information is generated after the structured light image processing is performed on the user, and the user's avatar is constructed according to the depth information, and obtains The adjustment information for adjusting the virtual image of the user is used to adjust the virtual image according to the adjustment information to form the target virtual image of the user. In this way, the avatar can be constructed according to the user's depth information, and since the user's avatar is closer to reality than the avatar set in the game, the sense of substitution in the game can be improved. In addition, users can adjust the virtual image according to their own needs, which can meet the individual needs of users and improve the applicability of the method.
上述游戏形象调整装置中各个模块的划分仅用于举例说明,在其他实施例中,可将游戏形象调整装置按照需要划分为不同的模块,以完成上述游戏形象调整装置的全部或部分功能。The division of each module in the above-mentioned game image adjustment device is only for illustration. In other embodiments, the game image adjustment device can be divided into different modules according to needs, so as to complete all or part of the functions of the above-mentioned game image adjustment device.
本发明实施例还提供了一个或多个包含计算机可执行指令的非易失性计算机可读存储介质,当所述计算机可执行指令被一个或多个处理器执行时,使得所述处理器执行以下步骤:Embodiments of the present invention also provide one or more non-volatile computer-readable storage media containing computer-executable instructions that, when executed by one or more processors, cause the processors to perform The following steps:
获取携带试图在游戏中构建虚拟形象的用户的深度信息;其中,所述深度信息对用户进行结构光图像处理后生成的;Obtain the depth information of the user who is trying to build an avatar in the game; wherein, the depth information is generated after the structured light image processing is performed on the user;
根据所述深度信息构建所述用户的虚拟形象;Constructing an avatar of the user according to the depth information;
获取对所述用户的虚拟形象进行调整的调整信息;Acquiring adjustment information for adjusting the virtual image of the user;
根据所述调整信息对所述虚拟形象进行调整,形成所述用户的目标虚拟形象。The avatar is adjusted according to the adjustment information to form a target avatar of the user.
本发明实施例还提供一种终端设备。上述终端设备中包括图像处理电路,图像处理电路可以利用硬件和/或软件组件实现,可包括定义ISP(Image Signal Processing,图像信号处理)管线的各种处理单元。图11为一个实施例中图像处理电路的示意图。如图11所示,为便于说明,仅示出与本发明实施例相关的图像处理技术的各个方面。The embodiment of the present invention also provides a terminal device. The above-mentioned terminal device includes an image processing circuit, which may be implemented by using hardware and/or software components, and may include various processing units defining an ISP (Image Signal Processing, image signal processing) pipeline. Fig. 11 is a schematic diagram of an image processing circuit in one embodiment. As shown in FIG. 11 , for ease of description, only various aspects of the image processing technology related to the embodiment of the present invention are shown.
如图11所示,图像处理电路1100包括成像设备1110、ISP处理器1130和控制逻辑器1140。成像设备1110可包括具有一个或多个透镜1112、图像传感器1114的照相机和结构光投射器1116。结构光投射器1116将结构光投影至被测物。其中,该结构光图案可为激光条纹、格雷码、正弦条纹、或者,随机排列的散斑图案等。图像传感器1114捕捉投影至被测物形成的结构光图像,并将结构光图像发送至ISP处理器1130,由ISP处理器1130对结构光图像进行解调获取被测物的深度信息。同时,图像传感器1114也可以捕捉被测物的色彩信息。当然,也可以由两个图像传感器1114分别捕捉被测物的结构光图像和色彩信息。As shown in FIG. 11 , the image processing circuit 1100 includes an imaging device 1110 , an ISP processor 1130 and a control logic 1140 . Imaging device 1110 may include a camera having one or more lenses 1112 , an image sensor 1114 , and a structured light projector 1116 . The structured light projector 1116 projects the structured light onto the object under test. Wherein, the structured light pattern may be laser stripes, gray codes, sinusoidal stripes, or randomly arranged speckle patterns and the like. The image sensor 1114 captures the structured light image projected onto the measured object, and sends the structured light image to the ISP processor 1130, and the ISP processor 1130 demodulates the structured light image to obtain the depth information of the measured object. At the same time, the image sensor 1114 can also capture the color information of the measured object. Of course, the structured light image and color information of the object under test may also be captured by the two image sensors 1114 respectively.
其中,以散斑结构光为例,ISP处理器1130对结构光图像进行解调,具体包括,从该结构光图像中采集被测物的散斑图像,将被测物的散斑图像与参考散斑图像按照预定算法进行图像数据计算,获取被测物上散斑图像的各个散斑点相对于参考散斑图像中的参考散斑点的移动距离。利用三角法转换计算得到散斑图像的各个散斑点的深度值,并根据该深度值得到被测物的深度信息。Wherein, taking speckle structured light as an example, the ISP processor 1130 demodulates the structured light image, which specifically includes collecting the speckle image of the object under test from the structured light image, and combining the speckle image of the object under test with the reference The image data of the speckle image is calculated according to a predetermined algorithm, and the moving distance of each speckle point in the speckle image on the object under test relative to the reference speckle point in the reference speckle image is obtained. The depth value of each speckle point of the speckle image is converted and calculated by using the triangulation method, and the depth information of the measured object is obtained according to the depth value.
当然,还可以通过双目视觉的方法或基于飞行时差TOF的方法来获取该深度图像信息等,在此不做限定,只要能够获取或通过计算得到被测物的深度信息的方法都属于本实施方式包含的范围。Of course, the depth image information can also be obtained through binocular vision or a method based on time-of-flight TOF, and there is no limitation here, as long as the method that can obtain or calculate the depth information of the measured object belongs to this implementation The range covered by the method.
在ISP处理器1130接收到图像传感器1114捕捉到的被测物的色彩信息之后,可被测物的色彩信息对应的图像数据进行处理。ISP处理器1130对图像数据进行分析以获取可用于确定和/或成像设备1110的一个或多个控制参数的图像统计信息。图像传感器1114可包括色彩滤镜阵列(如Bayer滤镜),图像传感器1114可获取用图像传感器1114的每个成像像素捕捉的光强度和波长信息,并提供可由ISP处理器1130处理的一组原始图像数据。After the ISP processor 1130 receives the color information of the object under test captured by the image sensor 1114 , it may process the image data corresponding to the color information of the object under test. The ISP processor 1130 analyzes the image data to obtain image statistics that may be used to determine and/or control one or more parameters of the imaging device 1110 . Image sensor 1114 may include a color filter array (such as a Bayer filter), and image sensor 1114 may obtain light intensity and wavelength information captured with each imaging pixel of image sensor 1114 and provide a set of raw images that may be processed by ISP processor 1130. image data.
ISP处理器1130按多种格式逐个像素地处理原始图像数据。例如,每个图像像素可具有11、10、12或14比特的位深度,ISP处理器1130可对原始图像数据进行一个或多个图像处理操作、收集关于图像数据的图像统计信息。其中,图像处理操作可按相同或不同的位深度精度进行。The ISP processor 1130 processes raw image data pixel by pixel in various formats. For example, each image pixel may have a bit depth of 11, 10, 12, or 14 bits, and the ISP processor 1130 may perform one or more image processing operations on raw image data, collect image statistics about the image data. Among other things, image processing operations can be performed with the same or different bit depth precision.
ISP处理器1130还可从图像存储器1120接收像素数据。图像存储器1120可为存储器装置的一部分、存储设备、或电子设备内的独立的专用存储器,并可包括DMA(DirectMemory Access,直接直接存储器存取)特征。ISP processor 1130 may also receive pixel data from image memory 1120 . The image memory 1120 may be a part of a memory device, a storage device, or an independent dedicated memory in an electronic device, and may include a DMA (DirectMemory Access) feature.
当接收到原始图像数据时,ISP处理器1130可进行一个或多个图像处理操作。When receiving raw image data, the ISP processor 1130 may perform one or more image processing operations.
在ISP处理器1130获取到被测物的色彩信息和深度信息后,可对其进行融合,得到三维图像。其中,可通过外观轮廓提取方法或轮廓特征提取方法中的至少一种提取相应的被测物的特征。例如通过主动形状模型法ASM、主动外观模型法AAM、主成分分析法PCA、离散余弦变换法DCT等方法,提取被测物的特征,在此不做限定。再将分别从深度信息中提取到被测物的特征以及从色彩信息中提取到被测物的特征进行配准和特征融合处理。这里指的融合处理可以是将深度信息以及色彩信息中提取出的特征直接组合,也可以是将不同图像中相同的特征进行权重设定后组合,也可以有其他融合方式,最终根据融合后的特征,生成三维图像。After the ISP processor 1130 acquires the color information and depth information of the object under test, it can be fused to obtain a three-dimensional image. Wherein, the feature of the corresponding object under test may be extracted by at least one of an appearance contour extraction method or a contour feature extraction method. For example, the features of the measured object are extracted by active shape modeling method ASM, active appearance modeling method AAM, principal component analysis method PCA, discrete cosine transform method DCT and other methods, which are not limited here. Then, the features of the measured object extracted from the depth information and the features of the measured object extracted from the color information are subjected to registration and feature fusion processing. The fusion processing referred to here can be to directly combine the features extracted from the depth information and color information, or to combine the same features in different images after setting weights, or there can be other fusion methods, and finally according to the fused features to generate a 3D image.
三维图像的图像数据可发送给图像存储器1120,以便在被显示之前进行另外的处理。ISP处理器1130从图像存储器1120接收处理数据,并对所述处理数据进行原始域中以及RGB和YCbCr颜色空间中的图像数据处理。三维图像的图像数据可输出给显示器1160,以供用户观看和/或由图形引擎或GPU(Graphics Processing Unit,图形处理器)进一步处理。此外,ISP处理器1130的输出还可发送给图像存储器1120,且显示器1160可从图像存储器1120读取图像数据。在一个实施例中,图像存储器1120可被配置为实现一个或多个帧缓冲器。此外,ISP处理器1130的输出可发送给编码器/解码器1150,以便编码/解码图像数据。编码的图像数据可被保存,并在显示于显示器1160设备上之前解压缩。编码器/解码器1150可由CPU或GPU或协处理器实现。Image data for a three-dimensional image may be sent to image memory 1120 for additional processing before being displayed. The ISP processor 1130 receives the processed data from the image memory 1120 and performs image data processing in the original domain and in the RGB and YCbCr color spaces on the processed data. The image data of the three-dimensional image may be output to the display 1160 for viewing by the user and/or for further processing by a graphics engine or a GPU (Graphics Processing Unit, graphics processor). In addition, the output of the ISP processor 1130 can also be sent to the image memory 1120 , and the display 1160 can read image data from the image memory 1120 . In one embodiment, image memory 1120 may be configured to implement one or more frame buffers. Also, an output of the ISP processor 1130 may be sent to an encoder/decoder 1150 in order to encode/decode image data. The encoded image data may be saved and decompressed prior to display on the display 1160 device. The encoder/decoder 1150 may be implemented by a CPU or GPU or a coprocessor.
ISP处理器1130确定的图像统计信息可发送给控制逻辑器1140单元。控制逻辑器1140可包括执行一个或多个例程(如固件)的处理器和/或微控制器,一个或多个例程可根据接收的图像统计信息,确定成像设备1110的控制参数。The image statistics determined by the ISP processor 1130 may be sent to the control logic 1140 unit. Control logic 1140 may include a processor and/or microcontroller executing one or more routines (eg, firmware) that may determine control parameters for imaging device 1110 based on received image statistics.
以下为运用图11中图像处理技术实现游戏形象调整方法的步骤:The following are the steps of using the image processing technology in Figure 11 to realize the game image adjustment method:
获取携带试图在游戏中构建虚拟形象的用户的深度信息;其中,所述深度信息对用户进行结构光图像处理后生成的;Obtain the depth information of the user who is trying to build an avatar in the game; wherein, the depth information is generated after the structured light image processing is performed on the user;
根据所述深度信息构建所述用户的虚拟形象;Constructing an avatar of the user according to the depth information;
获取对所述用户的虚拟形象进行调整的调整信息;Acquiring adjustment information for adjusting the virtual image of the user;
根据所述调整信息对所述虚拟形象进行调整,形成所述用户的目标虚拟形象。The avatar is adjusted according to the adjustment information to form a target avatar of the user.
在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本发明的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不必须针对的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任一个或多个实施例或示例中以合适的方式结合。此外,在不相互矛盾的情况下,本领域的技术人员可以将本说明书中描述的不同实施例或示例以及不同实施例或示例的特征进行结合和组合。In the description of this specification, descriptions referring to the terms "one embodiment", "some embodiments", "example", "specific examples", or "some examples" mean that specific features described in connection with the embodiment or example , structure, material or characteristic is included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the described specific features, structures, materials or characteristics may be combined in any suitable manner in any one or more embodiments or examples. In addition, those skilled in the art can combine and combine different embodiments or examples and features of different embodiments or examples described in this specification without conflicting with each other.
此外,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。在本发明的描述中,“多个”的含义是至少两个,例如两个,三个等,除非另有明确具体的限定。In addition, the terms "first" and "second" are used for descriptive purposes only, and cannot be interpreted as indicating or implying relative importance or implicitly specifying the quantity of indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include at least one of these features. In the description of the present invention, "plurality" means at least two, such as two, three, etc., unless specifically defined otherwise.
流程图中或在此以其他方式描述的任何过程或方法描述可以被理解为,表示包括一个或更多个用于实现定制逻辑功能或过程的步骤的可执行指令的代码的模块、片段或部分,并且本发明的优选实施方式的范围包括另外的实现,其中可以不按所示出或讨论的顺序,包括根据所涉及的功能按基本同时的方式或按相反的顺序,来执行功能,这应被本发明的实施例所属技术领域的技术人员所理解。Any process or method descriptions in flowcharts or otherwise described herein may be understood to represent a module, segment or portion of code comprising one or more executable instructions for implementing custom logical functions or steps of a process , and the scope of preferred embodiments of the invention includes alternative implementations in which functions may be performed out of the order shown or discussed, including substantially concurrently or in reverse order depending on the functions involved, which shall It is understood by those skilled in the art to which the embodiments of the present invention pertain.
在流程图中表示或在此以其他方式描述的逻辑和/或步骤,例如,可以被认为是用于实现逻辑功能的可执行指令的定序列表,可以具体实现在任何计算机可读介质中,以供指令执行系统、装置或设备(如基于计算机的系统、包括处理器的系统或其他可以从指令执行系统、装置或设备取指令并执行指令的系统)使用,或结合这些指令执行系统、装置或设备而使用。就本说明书而言,"计算机可读介质"可以是任何可以包含、存储、通信、传播或传输程序以供指令执行系统、装置或设备或结合这些指令执行系统、装置或设备而使用的装置。计算机可读介质的更具体的示例(非穷尽性列表)包括以下:具有一个或多个布线的电连接部(电子装置),便携式计算机盘盒(磁装置),随机存取存储器(RAM),只读存储器(ROM),可擦除可编辑只读存储器(EPROM或闪速存储器),光纤装置,以及便携式光盘只读存储器(CDROM)。另外,计算机可读介质甚至可以是可在其上打印所述程序的纸或其他合适的介质,因为可以例如通过对纸或其他介质进行光学扫描,接着进行编辑、解译或必要时以其他合适方式进行处理来以电子方式获得所述程序,然后将其存储在计算机存储器中。The logic and/or steps represented in the flowcharts or otherwise described herein, for example, can be considered as a sequenced listing of executable instructions for implementing logical functions, can be embodied in any computer-readable medium, For use with instruction execution systems, devices, or devices (such as computer-based systems, systems including processors, or other systems that can fetch instructions from instruction execution systems, devices, or devices and execute instructions), or in conjunction with these instruction execution systems, devices or equipment for use. For the purposes of this specification, a "computer-readable medium" may be any device that can contain, store, communicate, propagate or transmit a program for use in or in conjunction with an instruction execution system, device or device. More specific examples (non-exhaustive list) of computer-readable media include the following: electrical connection with one or more wires (electronic device), portable computer disk case (magnetic device), random access memory (RAM), Read Only Memory (ROM), Erasable and Editable Read Only Memory (EPROM or Flash Memory), Fiber Optic Devices, and Portable Compact Disc Read Only Memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program can be printed, since the program can be read, for example, by optically scanning the paper or other medium, followed by editing, interpretation or other suitable processing if necessary. The program is processed electronically and stored in computer memory.
应当理解,本发明的各部分可以用硬件、软件、固件或它们的组合来实现。在上述实施方式中,多个步骤或方法可以用存储在存储器中且由合适的指令执行系统执行的软件或固件来实现。如,如果用硬件来实现和在另一实施方式中一样,可用本领域公知的下列技术中的任一项或他们的组合来实现:具有用于对数据信号实现逻辑功能的逻辑门电路的离散逻辑电路,具有合适的组合逻辑门电路的专用集成电路,可编程门阵列(PGA),现场可编程门阵列(FPGA)等。It should be understood that various parts of the present invention can be realized by hardware, software, firmware or their combination. In the embodiments described above, various steps or methods may be implemented by software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented by any one or a combination of the following techniques known in the art: a discrete Logic circuits, ASICs with suitable combinational logic gates, Programmable Gate Arrays (PGA), Field Programmable Gate Arrays (FPGA), etc.
本技术领域的普通技术人员可以理解实现上述实施例方法携带的全部或部分步骤是可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,该程序在执行时,包括方法实施例的步骤之一或其组合。Those of ordinary skill in the art can understand that all or part of the steps carried by the methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium. During execution, one or a combination of the steps of the method embodiments is included.
此外,在本发明各个实施例中的各功能单元可以集成在一个处理模块中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing module, each unit may exist separately physically, or two or more units may be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules. If the integrated modules are realized in the form of software function modules and sold or used as independent products, they can also be stored in a computer-readable storage medium.
上述提到的存储介质可以是只读存储器,磁盘或光盘等。尽管上面已经示出和描述了本发明的实施例,可以理解的是,上述实施例是示例性的,不能理解为对本发明的限制,本领域的普通技术人员在本发明的范围内可以对上述实施例进行变化、修改、替换和变型。The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, and the like. Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limiting the present invention, those skilled in the art can make the above-mentioned The embodiments are subject to changes, modifications, substitutions and variations.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710676517.6ACN107551549A (en) | 2017-08-09 | 2017-08-09 | Game Image Adjustment Method and Device |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710676517.6ACN107551549A (en) | 2017-08-09 | 2017-08-09 | Game Image Adjustment Method and Device |
| Publication Number | Publication Date |
|---|---|
| CN107551549Atrue CN107551549A (en) | 2018-01-09 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201710676517.6APendingCN107551549A (en) | 2017-08-09 | 2017-08-09 | Game Image Adjustment Method and Device |
| Country | Link |
|---|---|
| CN (1) | CN107551549A (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109091861A (en)* | 2018-06-22 | 2018-12-28 | 网易(杭州)网络有限公司 | Interaction control method, electronic equipment and storage medium in game |
| CN110598035A (en)* | 2019-09-08 | 2019-12-20 | 北京智明星通科技股份有限公司 | Virtual character image recommendation method and device for mobile phone game and mobile terminal |
| CN111200747A (en)* | 2018-10-31 | 2020-05-26 | 百度在线网络技术(北京)有限公司 | Live broadcasting method and device based on virtual image |
| CN111432267A (en)* | 2020-04-23 | 2020-07-17 | 深圳追一科技有限公司 | Video adjusting method and device, electronic equipment and storage medium |
| CN113345054A (en)* | 2021-05-28 | 2021-09-03 | 上海哔哩哔哩科技有限公司 | Virtual image decorating method, detection method and device |
| CN113658298A (en)* | 2018-05-02 | 2021-11-16 | 北京市商汤科技开发有限公司 | Method and device for generating special-effect program file package and special effect |
| CN114187429A (en)* | 2021-11-09 | 2022-03-15 | 北京百度网讯科技有限公司 | Virtual image switching method and device, electronic equipment and storage medium |
| CN114187394A (en)* | 2021-12-13 | 2022-03-15 | 北京百度网讯科技有限公司 | Virtual image generation method and device, electronic equipment and storage medium |
| CN114444768A (en)* | 2021-12-21 | 2022-05-06 | 科大讯飞股份有限公司 | Gamified learning system, gamified learning method and computing device |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103258271A (en)* | 2012-02-15 | 2013-08-21 | 李志强 | System and method of natural person digitalized image design |
| CN103597518A (en)* | 2011-06-06 | 2014-02-19 | 微软公司 | Spawn an avatar that reflects the player's appearance |
| CN103871106A (en)* | 2012-12-14 | 2014-06-18 | 韩国电子通信研究院 | Virtual object fitting method and virtual object fitting service system using human body model |
| CN104137140A (en)* | 2012-03-13 | 2014-11-05 | 新游游戏株式会社 | Online game providing method and system for providing character makeup |
| CN104680574A (en)* | 2013-11-27 | 2015-06-03 | 苏州蜗牛数字科技股份有限公司 | Method for automatically generating 3D face according to photo |
| US20160184699A1 (en)* | 2012-12-03 | 2016-06-30 | Zynga Inc. | Display and navigation of virtual built environments in computer-implemented games |
| CN106204698A (en)* | 2015-05-06 | 2016-12-07 | 北京蓝犀时空科技有限公司 | Virtual image for independent assortment creation generates and uses the method and system of expression |
| CN106371607A (en)* | 2016-09-19 | 2017-02-01 | 深圳奥比中光科技有限公司 | Man-machine interaction method and system based on cooperative game |
| CN106952336A (en)* | 2017-03-13 | 2017-07-14 | 武汉山骁科技有限公司 | A kind of mankind's three-dimensional head portrait production method for protecting feature |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103597518A (en)* | 2011-06-06 | 2014-02-19 | 微软公司 | Spawn an avatar that reflects the player's appearance |
| CN103258271A (en)* | 2012-02-15 | 2013-08-21 | 李志强 | System and method of natural person digitalized image design |
| CN104137140A (en)* | 2012-03-13 | 2014-11-05 | 新游游戏株式会社 | Online game providing method and system for providing character makeup |
| US20160184699A1 (en)* | 2012-12-03 | 2016-06-30 | Zynga Inc. | Display and navigation of virtual built environments in computer-implemented games |
| CN103871106A (en)* | 2012-12-14 | 2014-06-18 | 韩国电子通信研究院 | Virtual object fitting method and virtual object fitting service system using human body model |
| CN104680574A (en)* | 2013-11-27 | 2015-06-03 | 苏州蜗牛数字科技股份有限公司 | Method for automatically generating 3D face according to photo |
| CN106204698A (en)* | 2015-05-06 | 2016-12-07 | 北京蓝犀时空科技有限公司 | Virtual image for independent assortment creation generates and uses the method and system of expression |
| CN106371607A (en)* | 2016-09-19 | 2017-02-01 | 深圳奥比中光科技有限公司 | Man-machine interaction method and system based on cooperative game |
| CN106952336A (en)* | 2017-03-13 | 2017-07-14 | 武汉山骁科技有限公司 | A kind of mankind's three-dimensional head portrait production method for protecting feature |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113658298A (en)* | 2018-05-02 | 2021-11-16 | 北京市商汤科技开发有限公司 | Method and device for generating special-effect program file package and special effect |
| CN109091861A (en)* | 2018-06-22 | 2018-12-28 | 网易(杭州)网络有限公司 | Interaction control method, electronic equipment and storage medium in game |
| CN109091861B (en)* | 2018-06-22 | 2022-06-10 | 网易(杭州)网络有限公司 | Interactive control method in game, electronic device and storage medium |
| CN111200747A (en)* | 2018-10-31 | 2020-05-26 | 百度在线网络技术(北京)有限公司 | Live broadcasting method and device based on virtual image |
| CN110598035A (en)* | 2019-09-08 | 2019-12-20 | 北京智明星通科技股份有限公司 | Virtual character image recommendation method and device for mobile phone game and mobile terminal |
| CN110598035B (en)* | 2019-09-08 | 2023-06-13 | 北京智明星通科技股份有限公司 | Mobile phone game virtual character image recommendation method and device and mobile terminal |
| CN111432267A (en)* | 2020-04-23 | 2020-07-17 | 深圳追一科技有限公司 | Video adjusting method and device, electronic equipment and storage medium |
| CN113345054A (en)* | 2021-05-28 | 2021-09-03 | 上海哔哩哔哩科技有限公司 | Virtual image decorating method, detection method and device |
| CN114187429A (en)* | 2021-11-09 | 2022-03-15 | 北京百度网讯科技有限公司 | Virtual image switching method and device, electronic equipment and storage medium |
| CN114187394A (en)* | 2021-12-13 | 2022-03-15 | 北京百度网讯科技有限公司 | Virtual image generation method and device, electronic equipment and storage medium |
| CN114444768A (en)* | 2021-12-21 | 2022-05-06 | 科大讯飞股份有限公司 | Gamified learning system, gamified learning method and computing device |
| Publication | Publication Date | Title |
|---|---|---|
| CN107481304B (en) | Method and device for constructing virtual image in game scene | |
| CN107551549A (en) | Game Image Adjustment Method and Device | |
| US11503228B2 (en) | Image processing method, image processing apparatus and computer readable storage medium | |
| CN107452034B (en) | Image processing method and device thereof | |
| CN107479801B (en) | Terminal display method and device based on user expression and terminal | |
| CN107481317A (en) | Face adjustment method and device for 3D model of human face | |
| CN107610171B (en) | Image processing method and device | |
| KR102502310B1 (en) | Color identification using infrared imaging | |
| CN107481101B (en) | Dressing recommendation method and device | |
| CN107423716A (en) | Face state monitoring method and device | |
| CN107483845A (en) | Photographing method and device thereof | |
| CN107480615B (en) | Beauty treatment method and device and mobile equipment | |
| CN107656611A (en) | Somatosensory game realization method and device, terminal equipment | |
| CN107742300A (en) | Image processing method, device, electronic device and computer-readable storage medium | |
| CN107481318A (en) | Method, device and terminal equipment for replacing user avatar | |
| CN107469355A (en) | Game character image creation method and device, terminal equipment | |
| CN107392874A (en) | Beauty treatment method, device and mobile device | |
| CN107734265A (en) | Image processing method and device, electronic device, and computer-readable storage medium | |
| CN107610127A (en) | Image processing method, device, electronic installation and computer-readable recording medium | |
| CN107622522B (en) | Method and device for generating game material | |
| CN107613223A (en) | Image processing method and device, electronic device, and computer-readable storage medium | |
| CN107454376A (en) | Fall reminder method, device, electronic device and computer-readable storage medium | |
| CN107451560B (en) | User facial expression recognition method, device and terminal | |
| CN107730450A (en) | Image processing method and device, electronic device, and computer-readable storage medium | |
| CN107527381B (en) | Image processing method and device, electronic device and computer readable storage medium |
| 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 | ||
| RJ01 | Rejection of invention patent application after publication | ||
| RJ01 | Rejection of invention patent application after publication | Application publication date:20180109 |