Virtual character display method and device, equipment, medium and program
By detecting the length of bones of human limbs and adjusting the corresponding length of virtual characters, the problem of fixing the image of existing virtual characters is solved, and the authenticity of user experience and interaction is improved.
Patent Information
- Application Number
- CN202311361599.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-19
- Publication Date
- 2025-04-22
AI Technical Summary
The images of existing virtual characters in online games and chat rooms are preset fixed images, and users cannot flexibly adjust the length of the limbs and bones of the virtual characters, resulting in poor user experience.
By obtaining images of human limbs, automatically detecting and determining the bone length of human limbs, adjusting the length of limbs of virtual characters based on these lengths, thereby achieving flexible adjustments to the length of limbs of virtual characters.
It improves the user experience, makes the virtual characters more in line with the user's actual body shape, and the movements are more natural and reasonable, enhancing the authenticity and fun of the interaction.
Smart Images

Figure CN119863550A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer vision technology, and in particular, to a method, device, setting, medium and program for displaying a virtual character. Background Art
[0002] Avatar, also known as virtual character, is the embodiment of the virtual image of network users in the virtual world dominated by images. Virtual characters can be used in online games and appear in game scenes as game characters. Virtual characters can also be used in chat rooms to communicate with other users as chat virtual people. Users can interact with virtual characters, for example, control the movement of virtual characters, control the virtual to perform corresponding tasks, etc. However, the images of virtual characters in existing applications are all preset fixed images, and users cannot flexibly adjust the virtual characters. Summary of the invention
[0003] The embodiments of the present application provide a method, device, equipment, medium and program for displaying a virtual character, which can automatically detect the bone length of human limbs, adjust the bone length of the virtual character's limbs according to the bone length of the human limbs, achieve flexible adjustment of the bone length of the virtual character's limbs, and improve the user experience.
[0004] In a first aspect, an embodiment of the present application provides a method for displaying a virtual character, the method comprising:
[0005] Acquiring images of human body parts;
[0006] Determine the bone length of the corresponding human limb according to the limb image;
[0007] A virtual character is displayed, wherein the length of the limb bones of the virtual character is determined according to the length of the bones of the human limbs.
[0008] In some embodiments, the method further comprises:
[0009] Determine the length of other bones of the human body according to the length of the bones of the human body limbs;
[0010] The lengths of other bones of the virtual character are adjusted according to the lengths of other bones of the human body.
[0011] In some embodiments, the method further comprises:
[0012] Get the height of the human body;
[0013] Determining the length of other bones of the human body according to the length of the bones of the human limbs includes:
[0014] The lengths of other bones of the human body are determined according to the height of the human body and the lengths of the bones of the human body's limbs.
[0015] In some embodiments, determining the bone length of the corresponding human limb according to the limb image includes:
[0016] Identify the joints of the human limbs according to the limb image;
[0017] Determine the three-dimensional 3D coordinates of the joint points of the human limbs according to the limb image;
[0018] The bone length of the human limb is determined according to the 3D coordinates of the joint points of the human limb.
[0019] In some embodiments, the head mounted device uses a binocular camera to capture the limb image;
[0020] Determining the three-dimensional 3D coordinates of the joint points of the human limbs according to the limb image includes:
[0021] The 3D coordinates of the joint points of the human limbs are determined according to the limb image and binocular parallax principle.
[0022] In some embodiments, the identifying the joint points of the human limbs according to the limb image includes:
[0023] The limb image is input into a human body key point recognition network to obtain the joint points of the human limb.
[0024] In some embodiments, obtaining the height of the person includes: receiving the height of the person input by a user or detecting the height of the person.
[0025] In some embodiments, acquiring an image of a human limb includes:
[0026] Collecting the limb image through a camera of a head-mounted device;
[0027] Wherein, the virtual character is displayed in an extended reality scene of the head mounted device.
[0028] In some embodiments, the limb image is a limb image of a human body wearing the head mounted device.
[0029] In some embodiments, the method further comprises:
[0030] Acquiring posture information of the human body;
[0031] The display of the virtual character comprises:
[0032] The virtual character is displayed according to the posture information of the human body.
[0033] In some embodiments, the method further comprises:
[0034] When it is detected that the user starts the application, a start option of a virtual character's skeleton adjustment function is displayed, where the virtual character's skeleton adjustment function is used to adjust the virtual character's skeleton length;
[0035] In response to a confirmation instruction of the startup option, a skeleton adjustment function of the virtual character is enabled;
[0036] Prompt information is displayed, where the prompt information is used to prompt the user to raise both hands forward and kick the legs forward and left and right.
[0037] In some embodiments, the acquiring the posture information of the human body includes:
[0038] The posture information of the human body is determined by measuring the inertial data obtained by the inertial sensor IMU worn by the human body.
[0039] In some embodiments, the limb image includes an upper limb image and a lower limb image, the upper limb image includes a left upper limb and a right upper limb, and the lower limb image includes a left lower limb image and a right lower limb image;
[0040] Determining the bone length of the corresponding human limb according to the limb image includes:
[0041] Determining the bone length of the upper limb of the human body according to the upper limb image;
[0042] The bone length of the human lower limbs is determined according to the left lower limb image and the right lower limb image.
[0043] In some embodiments, the joint points of the upper limb include: shoulder nodes, elbow nodes, wrist nodes, and finger nodes;
[0044] The joint points of the lower limbs include: a hip node, a knee node, an ankle node and a toe node.
[0045] In a second aspect, an embodiment of the present application provides a display device for a virtual character, the device comprising:
[0046] An image acquisition module, used for acquiring images of human limbs;
[0047] A determination module, used to determine the bone length of the corresponding human limb according to the limb image;
[0048] The display module is used to display a virtual character, wherein the length of the limb bones of the virtual character is determined according to the length of the bones of the human limbs.
[0049] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a memory, wherein the memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to execute any of the methods described above.
[0050] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and the computer program enables a computer to execute any of the methods described above.
[0051] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which implements any of the methods described above when executed by a processor.
[0052] The display method, device, equipment, medium and program of the virtual character provided in the embodiment of the present application obtains the limb image of the human body, determines the corresponding limb bone length of the human body according to the limb image, and displays the virtual character, and the limb bone length of the virtual character is determined according to the limb bone length of the human body. The method can automatically detect the limb bone length of the human body, adjust the limb bone length of the virtual character according to the limb bone length of the human body, realize flexible adjustment of the limb bone length of the virtual character, and improve the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0054] Figure 1 A flowchart of a method for displaying a virtual character provided in Embodiment 1 of the present application;
[0055] Figure 2 A flowchart of a method for displaying a virtual character provided in Embodiment 2 of the present application;
[0056] Figure 3 A flowchart of a method for displaying a virtual character provided in Embodiment 3 of the present application;
[0057] Figure 4 A schematic diagram of an upper limb image captured by a binocular camera;
[0058] Figure 5 A schematic diagram of the left lower limb image captured by a binocular camera;
[0059] Figure 6A schematic diagram of the right lower limb image captured by a binocular camera;
[0060] Figure 7 A flowchart of a method for displaying a virtual character provided in Embodiment 4 of the present application;
[0061] Figure 8 A schematic diagram of the structure of a display device for a virtual character provided in Embodiment 5 of the present application;
[0062] Fig. 9 A structural schematic diagram of an electronic device provided in Example 6 of the present application. DETAILED DESCRIPTION
[0063] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0064] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.
[0065] The embodiment of the present application provides a method for displaying a virtual character, which can be applied in an electronic device, wherein an application (application, for short) of the electronic device provides a virtual scene, and the virtual character is displayed in the virtual scene. The electronic device can be a mobile phone, a tablet computer, a personal computer, a server, a smart wearable device, an extended reality (Extended Reality, XR) device, etc.
[0066] When the method provided in the embodiment of the present application is applied to a mobile phone, tablet computer, personal computer, server, or smart wearable device, the virtual scene provided by the electronic device is a 2D virtual scene. When the method provided in the embodiment of the present application is applied to an XR device or a server providing an XR application, the virtual scene provided by the electronic device is a 3D virtual scene, which is also called an extended implementation scene.
[0067] XR refers to the combination of reality and virtuality through computers to create a virtual environment for human-computer interaction. XR is also a general term for multiple technologies such as Virtual Reality (VR), Augmented Reality (AR) and Mixed Reality (MR). By integrating the visual interaction technologies of the three, it brings the experiencer an "immersive feeling" of seamless transition between the virtual world and the real world. XR devices are usually worn on the user's head, so XR devices are also called head-mounted devices.
[0068] VR: Technology for creating and experiencing a virtual world. It generates a virtual environment by computation. It is a multi-source information (the virtual reality mentioned in this article includes at least visual perception, and can also include auditory perception, tactile perception, motion perception, and even taste perception, olfactory perception, etc.). It realizes the simulation of the fusion and interactive three-dimensional dynamic vision and entity behavior of the virtual environment, immersing users in a simulated virtual reality environment, and realizing applications in various virtual environments such as maps, games, videos, education, medical care, simulation, collaborative training, sales, assisted manufacturing, maintenance and repair.
[0069] VR device refers to a terminal that realizes virtual reality effects, which can usually be provided in the form of glasses, helmet-mounted displays (Head Mount Display, HMD), and contact lenses to realize visual perception and other forms of perception. Of course, the form of virtual reality devices is not limited to this, and can be further miniaturized or enlarged as needed.
[0070] AR: AR scenery refers to a simulated scenery in which at least one virtual object is superimposed on a physical scenery or a representation thereof. For example, an electronic system may have an opaque display and at least one imaging sensor for capturing images or videos of a physical scenery, which are representations of the physical scenery. The system combines the image or video with the virtual object and displays the combination on the opaque display. An individual uses the system to indirectly view the physical scenery via an image or video of the physical scenery and observes the virtual object superimposed on the physical scenery. When the system uses one or more image sensors to capture images of the physical scenery and uses those images to present the AR scenery on an opaque display, the displayed image is referred to as video transmission. Alternatively, an electronic system for displaying an AR scenery may have a transparent or translucent display through which an individual can directly view the physical scenery. The system may display virtual objects on a transparent or translucent display so that an individual uses the system to observe virtual objects superimposed on the physical scenery. As another example, the system may include a projection system that projects virtual objects into a physical scenery. Virtual objects can be projected, for example, on a physical surface or as a hologram, so that individuals using the system observe virtual objects superimposed on a physical setting. Specifically, a technology that calculates the camera's attitude information parameters in the real world (or three-dimensional world, real world) in real time during the process of the camera capturing images, and adds virtual elements to the images captured by the camera based on the camera attitude information parameters. Virtual elements include, but are not limited to: images, videos, and three-dimensional models. The goal of AR technology is to integrate the virtual world into the real world on the screen for interaction.
[0071] MR: By presenting virtual scene information in the real scene, an interactive feedback information loop is established between the real world, the virtual world and the user to enhance the realism of the user experience. For example, computer-created sensory input (e.g., virtual objects) is integrated with sensory input from the physical scene or its representation in the simulated scene. In some MR scenes, the computer-created sensory input can adapt to changes in sensory input from the physical scene. In addition, some electronic systems used to present MR scenes can monitor orientation and / or position information relative to the physical scene so that virtual objects can interact with real objects (i.e., physical elements from the physical scene or their representations). For example, the system can monitor movement so that virtual plants appear stationary relative to physical buildings.
[0072] Optionally, the XR device described in the embodiments of the present application, also known as a virtual reality device, may include but is not limited to the following types:
[0073] 1) Mobile virtual reality devices support the configuration of mobile terminals (such as smart phones) in various ways (such as head-mounted displays with dedicated card slots). Through wired or wireless connection with the mobile terminal, the mobile terminal performs relevant calculations of virtual reality functions and outputs data to the mobile virtual reality device, such as watching virtual reality videos through the mobile terminal's APP.
[0074] 2) All-in-one virtual reality devices have a processor for performing relevant calculations of virtual functions, and thus have independent virtual reality input and output functions. They do not need to be connected to a PC or mobile terminal and have a high degree of freedom in use.
[0075] 3) Computer-based virtual reality (PCVR) devices use the PC to perform relevant calculations and data output for virtual reality functions. External computer-based virtual reality devices use the data output by the PC to achieve virtual reality effects.
[0076] After introducing some concepts involved in the embodiments of the present application, a method for displaying a virtual character provided in the embodiments of the present application is specifically described below with reference to the accompanying drawings.
[0077] Figure 1 This is a flowchart of a method for displaying a virtual character provided in Embodiment 1 of the present application. The method of this embodiment is executed by an electronic device, which may be an XR device, a server, a mobile phone, a tablet computer, a personal computer, a smart wearable device, etc. Figure 1 As shown, the method provided in this embodiment includes the following steps.
[0078] S101, obtaining a human body limb image.
[0079] The human body's limbs include upper limbs and lower limbs, wherein the upper limbs may include upper arms, forearms and hands, and the lower limbs may include thighs, calves and feet. The human body limb images acquired in this step may only include upper limb images, or only include lower limb images, or may include both upper limb images and lower limb images of the human body, such as full-body images.
[0080] The image of the human body limbs may be an image captured in real time by a camera, or an image of the limbs captured offline. The image of the human body limbs may be captured by a camera of an electronic device that executes the method of this embodiment, or may be captured by a camera of another electronic device, which captures the image of the human body limbs and sends it to the electronic device that executes the method of this embodiment.
[0081] Taking XR application as an example, when the method of this implementation is executed by the first head-mounted device, and the captured human limb image is a limb image of user A wearing the first head-mounted device, the human limb image can be obtained in the following ways.
[0082] In a first implementation manner, one or more cameras are installed on the first head mounted device, and body limb images of user A are collected through the cameras of the first head mounted device.
[0083] For example, a common head-mounted device is equipped with 6 cameras, which are installed in different positions and at different angles. Different cameras take different images, and the two cameras on the front side of the head-mounted device can be used to capture images of the upper and lower limbs of the human body.
[0084] In a second implementation manner, a body image of user A is collected by a camera of the second head mounted device, and the second head mounted device sends the collected body image of user A to the first head mounted device.
[0085] The second head mounted device is in the same physical space as the first head mounted device, and the second head mounted device is worn by user B. One or more cameras are installed on the second head mounted device. Optionally, in this implementation, the head mounted devices of the two users can take images of each other's body parts and send them to the other head mounted device, which is applicable to some multiplayer game scenarios, where multiple users are in the same physical space and establish connections with each other.
[0086] In a third implementation, the first head mounted device receives body limb images of user A captured by a camera installed in a physical space.
[0087] In this implementation, one or more cameras are deployed in the physical space, and the multiple cameras are connected to the first head-mounted device. The cameras deployed in the physical space collect limb images of user A and send them to the first head-mounted device.
[0088] S102: Determine the bone length of the corresponding human limb according to the limb image.
[0089] Human limbs include multiple bones. The bones of the upper limbs and the bones of the lower limbs both include multiple bones. Among them, the upper limbs of the human body include the left upper limb and the right upper limb, and the lower limbs of the human body include the left lower limb and the right lower limb. Usually, the bones of the left upper limb and the right upper limb of the human body are the same length, and the bones of the left lower limb and the right lower limb of the human body are the same length. Therefore, they are collectively referred to as the bone length of the upper limb and the bone length of the lower limb.
[0090] Exemplarily, the bone length of a human limb is determined in the following manner: the joints of the human limb are identified based on a limb image, the 3D coordinates of the joints of the human limb are determined based on the limb image, and the bone length of the human limb is determined based on the 3D coordinates of the joints of the human limb.
[0091] When the limb image only includes the upper limb image of the human body, the obtained skeletal length of the human limb is the skeletal length of the upper limb. When the limb image only includes the lower limb image of the human body, the obtained skeletal length of the human limb is the skeletal length of the lower limb. When the limb image includes the upper limb image and the lower limb image of the human body, the obtained skeletal length of the human limb includes the skeletal length of the upper limb and the skeletal length of the lower limb. The determination method of the skeletal length of the upper limb and the skeletal length of the lower limb are the same.
[0092] It is understood that in different human models, the joints of human limbs may be different. In an exemplary manner, the joints of the upper limbs include: shoulder nodes, elbow nodes, wrist nodes and finger nodes. The joints of the lower limbs include: hip nodes, knee nodes, ankle nodes and toe nodes.
[0093] Optionally, the hand may include one or more joints. For example, the hand includes two joints: a metacarpophalangeal joint and a finger-end joint. When determining the joints of the upper limbs, the finger nodes may be the metacarpophalangeal joints or the finger-end joints of the hand, or may include both the metacarpophalangeal joints and the finger-end joints of the hand.
[0094] Identifying the joints of human limbs refers to identifying the 2D coordinates (i.e., pixel coordinates) of the joints in the image. The joints of the limbs can be determined through the existing Human Keypoints Detection algorithm. Human Keypoints Detection is a basic task in computer vision and a prerequisite task for human motion recognition, behavior analysis, and human-computer interaction.
[0095] Optionally, the joint points of human limbs can be identified through a neural network, and the human limb image is input into a human key point recognition network to obtain the joint points of the limbs. Optionally, the human key point recognition network is a deep learning network.
[0096] After determining the 2D coordinates of the joints of the limbs, the 3D coordinates of the joints of the limbs can be determined based on the depth information of the joints or other methods. Taking a head-mounted device as an example, when the head-mounted device uses a binocular camera, the 3D coordinates of the joints of the limbs can be determined based on the limb image and the binocular parallax principle. The 3D coordinates of the joints can be coordinates in the world coordinate system or in the coordinate system of the head-mounted device.
[0097] It is understandable that other methods can also be used to calculate the 3D coordinates of the joints of the limbs. This is just an example. For example, for a monocular camera, the 3D coordinates of the joints of the limbs can be calculated using images captured at different times.
[0098] The adjacent joints of the human body are connected to form the human skeleton. For example, the joints of the upper limbs include the shoulder joint, elbow joint, wrist joint and finger joint. The four joints form the three bones of the upper limbs, which are called the upper arm, lower arm and hand. Similarly, when the joints of the lower limbs include the hip joint, knee joint, ankle joint and toe joint, the three bones of the lower limbs are called the thigh, calf and foot.
[0099] The length of a bone refers to the length between two joints connecting the bone. The length of the upper limb bones includes the length of the upper arm, forearm and hand, and the length of the lower limb bones includes the length of the thigh, calf and foot. After determining the 3D coordinates of each joint point of the upper and lower limbs, the length of the bone can be determined based on the 3D coordinates of the two joint points that form the bone.
[0100] In this embodiment, the 3D coordinates of each joint point of the left upper limb and the right upper limb can be determined respectively, and the length of each bone of the left upper limb and the right upper limb can be determined according to the 3D coordinates of each joint point of the left upper limb and the right upper limb. Then, the bone length of the upper limb can be determined according to the bone length of the left upper limb and the bone length of the right upper limb. Exemplarily, the average value of the length of the same bone of the left upper limb and the right upper limb can be taken as the bone length of the upper limb. For example, the average value of the bone length of the left upper arm and the bone length of the right upper arm is calculated as the bone length of the upper arm of the upper limb. The same method is used to calculate the bone length of the lower limb.
[0101] Optionally, in order to improve the accuracy of the determined bone length, images of the limbs at multiple times can be collected, the bone lengths of the limbs at multiple times can be calculated respectively, and the bone lengths of the limbs at multiple times can be fused, for example, by using an averaging algorithm, voting or other methods to fuse the bone lengths of the limbs at multiple times.
[0102] The key point detection method used in the above method is 2D key point detection. Optionally, a 3D key point detection method can also be used to determine the 3D coordinates of the joints of the human body. Optionally, the 3D key point detection method can use a deep learning network.
[0103] Deep learning is a type of machine learning. Deep learning combines low-level features to form more abstract high-level representations of attribute categories or features to discover distributed feature representations of data. The motivation for deep learning is to build a neural network that simulates the human brain for analysis and learning. The deep learning network can be a convolutional neural network (CNN) or a deep belief network (DBN).
[0104] S103: Display a virtual character, wherein the length of the limb bones of the virtual character is determined according to the length of the limb bones of the human body.
[0105] After determining the bone length of the human limb, the limb bone length of the virtual character can be determined (or called setting or adjusting) according to the bone length of the human limb, and the virtual character is displayed in a virtual scene according to the determined bone length of the virtual character. The virtual scene can be a 2D virtual scene or a 3D extended reality scene.
[0106] The virtual character's limb bone length is determined according to the human limb bone length, so that the virtual character's limb bone length matches the human limb bone length. The virtual character's limb bone length matches the human limb bone length, and the virtual character's limb bone length can be the same as the human limb bone length. Thus, the displayed virtual character's image is closer to the human image, the virtual character's movements are more natural, meet user expectations, and improve user experience.
[0107] In this embodiment, by acquiring a human limb image, determining the corresponding human limb bone length according to the limb image, and displaying a virtual character, the limb bone length of the virtual character is determined according to the limb bone length of the human body. The method can automatically detect the limb bone length of the human body, adjust the limb bone length of the virtual character according to the limb bone length of the human body, realize flexible adjustment of the limb bone length of the virtual character, and improve user experience.
[0108] On the basis of the first embodiment, the second embodiment of the present application provides a method for displaying a virtual character. For the same contents, refer to the relevant description of the first embodiment. Figure 2 This is a flow chart of a method for displaying a virtual character provided in Embodiment 2 of the present application, such as Figure 2 As shown, the method provided in this embodiment includes the following steps.
[0109] S201, obtaining a human body limb image.
[0110] S202: Determine the bone length of the corresponding human limb according to the limb image.
[0111] S203. Determine the length of other bones of the human body according to the length of bones of the human limbs.
[0112] In addition to the bones of the upper limbs and lower limbs, the human body also includes other bones, such as: bones from the neck to the chest, bones from the chest to the waist (or abdomen), bones of the head, etc.
[0113] The other bones of the human body include one or more of the remaining bones of the human body. The remaining bones of the human body refer to all the remaining bones of the human body except the bones of the human limbs determined according to the limb images.
[0114] In an exemplary manner, a standard human body model can be defined. For this standard human body model, there is a certain proportional relationship between the lengths of various bones of the human body. Therefore, the bone length from the neck to the chest, the bone length from the chest to the waist, etc. can be determined based on the bone length of the upper limbs and / or the bone length of the lower limbs, and the proportional relationship of the bone length of the human body model, thereby predicting the lengths of other bones of the human body.
[0115] In another exemplary embodiment, the remaining bone length of the human body can be predicted by a neural network model, and the bone length of the upper limbs and / or the bone length of the lower limbs can be input into a pre-trained bone prediction model to obtain the remaining bone length of the human body.
[0116] In another exemplary embodiment, the height of a person is obtained, and the lengths of other bones of the person are determined based on the height of the person and the determined bone lengths of the person's limbs.
[0117] Optionally, the height of the human body can be obtained by: receiving the height of the human body input by the user or detecting the height of the human body. The height of the human body can be measured by a positioning module or sensor of an electronic device.
[0118] Through this step, the lengths of all bones of the human body can be obtained. Further, the bone lengths of the virtual character can be adjusted according to the bone lengths of the human body so that the bone lengths of the virtual character match the bone lengths of the human body.
[0119] S204: Acquire human body posture information.
[0120] This step is an optional step. The posture information of the human body refers to the posture information of each joint of the human body. The posture information of the joint point can refer to the rotation angle of the joint point, or it can refer to the relative rotation angle of the joint point with respect to other related joint points.
[0121] The posture information of the human body can be obtained by the electronic device based on various sensors or further calculations, or it can be detected by other devices and sent to the electronic device. In this embodiment, there is no restriction on the method of obtaining the posture information of the human body, and any existing human motion capture method can be used to obtain the posture information of the human body.
[0122] S205. Displaying a virtual character according to the posture information of the human body, wherein the length of the limb bones of the virtual character is determined according to the length of the limb bones of the human body, and the length of other bones of the virtual character is determined according to the length of other bones of the human body.
[0123] The bone length of human limbs and the length of other bones of the human body can be collectively referred to as the bone length of the human body. Optionally, the electronic device can determine the bone length of the virtual character based on the bone length of the human body after obtaining the bone length of the human body. It can also determine the bone length of the virtual character's limbs first after obtaining the bone length of the human limbs, and then determine the bone length of the virtual character based on the length of other bones of the human body after obtaining the length of other bones of the human body.
[0124] Optionally, the electronic device displays a virtual character according to the posture information of the human body. The human body corresponding to the posture information of the human body is the human body in the aforementioned limb image, and the virtual character can be driven to move according to the posture information of the human body, for example, to drive the movement of an animated image in a 3D animation, or to drive the movement of a virtual person in a live broadcast scene, or to drive the movement of a game character in a game scene.
[0125] In this embodiment, after determining the bone length of a human limb, the length of other bones of the human body is determined according to the bone length of the human limb, and the posture information of the human body is obtained, and a virtual character is displayed according to the posture information of the human body, and the limb bone length of the virtual character is determined according to the bone length of the human limb, and the other bone lengths of the virtual character are determined according to the other bone lengths of the human body. This method can not only obtain the bone length of the human limb, but also obtain the length of other bones of the human body, so that the bone length of the virtual character can be adjusted according to the bone length of the human body, and the bone length of the virtual character can be flexibly adjusted, thereby improving the user experience.
[0126] The method of the embodiment of the present application is applied in XR applications. In XR applications, human body posture information can be obtained through motion capture methods, and virtual characters in the extended real space can be driven according to the human body posture information.
[0127] The posture information of the human body refers to the posture information of each joint of the human body. The posture information of the joint may refer to the rotation angle of the joint, or may refer to the relative rotation angle of the joint with respect to other related joints.
[0128] In different applications, the human body models defined may be different, and the joints of different models may be different. Exemplarily, the human body model includes a head node, a left shoulder joint, a right shoulder joint, a left elbow node, a right elbow node, a left wrist node, a right wrist node, a left hand node, a right hand node, a waist node, a left hip node, a right hip node, a left knee node, a right knee node, a left ankle node, a left foot node, a right foot node, etc., wherein the left hip node and the right hip node can also be understood as a left hip joint and a right hip joint.
[0129] The waist node is the root node of the human body. The root node is a node assumed to be located in the pelvis, which is used to represent the position of the human body in the world coordinate system.
[0130] The human skeleton is tightly connected together through joints. The human skeleton is piece by piece. To form the human frame, joints are needed to connect them. The joints can rotate. The direction of the joint can be expressed by the rotation amount of the coordinate system of each joint. The rotation angle of the joint can be expressed by the rotation matrix of the joint.
[0131] When driving the movement of the virtual character according to the posture information of the human body, the movement of the root node of the virtual character is controlled according to the movement (i.e., displacement) of the position information of the root node of the human body, and the rotation of each joint of the virtual character is controlled according to the posture information of each joint of the human body, thereby completing the driving of the virtual character.
[0132] In actual applications, the length of the virtual character's bones may not match the length of the human body's bones that drive the virtual character's movements. For example, the length of the virtual character's bones may be greater or less than the length of the human body's bones. When the length of the virtual character's bones does not match the length of the human body's bones, it may cause the virtual character's movements to be stiff, unnatural, or incorrect. For example, the virtual character may experience problems such as clipping through the model or sliding.
[0133] Avatar penetration refers to the phenomenon that when a avatar's body parts come into contact with itself or other virtual objects, the avatar's body parts pass through itself or other virtual objects. Under normal circumstances, a avatar's body parts will not pass through itself or other virtual objects when they come into contact with the surface of itself or other virtual objects.
[0134] Take the hand penetration of a virtual character as an example. Hand penetration refers to the problem that the two hands of a virtual character pass through each other when they are in contact. For example, in the real space (i.e., physical space), when the user puts his hands together, the two hands of the virtual character pass through each other due to hand penetration. When the virtual character is driven according to the posture information of the human body, the human skeleton and the skeleton of the virtual character rotate at the same angle. Since the length of the skeleton of the virtual character is different from that of the human body, after rotating at the same angle, the human hands just come together, and the hands of the virtual character pass through.
[0135] The feet of virtual characters may also experience problems such as foot penetration and foot sliding. Foot penetration refers to the virtual character's feet passing through (sinking into) the ground, and foot sliding refers to the foot sliding on the ground. The foot penetration problem is caused by the difference between the virtual character's bone length and the human body's bone length. After rotating the same angle according to the human body's posture information, the Y-axis coordinate of the foot is lower than the ground, making it appear to the user that the virtual character's foot passes through the ground. Foot sliding is caused by the difference between the virtual character's bone length and the human body's bone length. When moving the same distance, the virtual character may slide due to its short legs. For example, the distance of a human stride is 0.5 meters, but the virtual character's legs are shorter, so the distance of a virtual character's stride is 0.4 meters. In order for the virtual character to move 0.5 meters, the virtual character's legs will slide.
[0136] The method provided in the embodiments of the present application can solve this problem, which is specifically described by the following embodiments: Figure 3 This is a flowchart of a method for displaying a virtual character provided in Embodiment 3 of the present application. The method of this embodiment is executed by an XR device. When the XR device is an all-in-one device, the XR device is a head-mounted device. When the XR device is not an all-in-one device, the XR device includes a head-mounted device and a terminal device (such as a mobile phone or a computer, etc.) connected to the head-mounted device. Figure 3 As shown, the method for displaying the virtual character includes the following steps.
[0137] S301. Capture upper limb images and lower limb images of a human body through a camera of a head-mounted device.
[0138] This embodiment is explained by taking the head-mounted device itself collecting limb images of a person wearing the head-mounted device as an example. It can be understood that in other embodiments of the present application, the upper limb images and lower limb images of the human body can also be collected by other head-mounted devices.
[0139] One or more cameras are installed on the head mounted device, through which images of the upper limbs and lower limbs of the human body are captured.
[0140] Optionally, the upper limb image captured by the camera includes the left upper limb and the right upper limb. After the bone length adjustment function of the virtual character of the APP is started, the head-mounted device can output a prompt message, which is used to prompt the user to raise both hands forward. The user can raise both hands forward at the same time, and the camera of the head-mounted device captures the upper limb image, and the captured upper limb image includes the left upper limb and the right upper limb.
[0141] Reference Figure 4 , Figure 4This is a schematic diagram of upper limb images taken by binocular cameras. The left image is taken by the left camera, and the right image is taken by the right camera. The two upper limb images taken by the binocular cameras are images at the same time. The two cameras have different angles, so the upper limb images taken are also different.
[0142] Optionally, the lower limb images captured by the camera include left lower limb images and right lower limb images. After capturing the image of the human body's upper limbs, the head-mounted device can output prompt information, which is used to prompt the user to kick the left leg forward. After capturing the image of the left lower limb, the user is prompted to kick the right leg forward, and the camera captures the image of the right lower limb.
[0143] Reference Figure 5 and Figure 6 , Figure 5 This is a schematic diagram of the left lower limb image captured by a binocular camera. Figure 6 This is a schematic diagram of the right lower limb image captured by the binocular camera. The two cameras have different angles, so the left and right lower limb images captured are also different.
[0144] Optionally, in one implementation, the upper limb image may include a left upper limb image and a right upper limb image, that is, the camera takes pictures of the left upper limb and the right upper limb respectively.
[0145] S302: determining the bone length of the upper limbs of the human body according to the upper limb image, and determining the bone length of the lower limbs of the human body according to the lower limb image.
[0146] Exemplarily, the bone length of the human upper limbs and the bone length of the human lower limbs are determined in the following manner: identifying the joints of the upper limbs based on the upper limb image, and identifying the joints of the lower limbs based on the lower limb image; determining the 3D coordinates of the joints of the upper limbs based on the upper limb image, and determining the 3D coordinates of the joints of the lower limbs based on the lower limb image; determining the bone length of the upper limbs based on the 3D coordinates of the joints of the upper limbs, and determining the bone length of the lower limbs based on the 3D coordinates of the joints of the lower limbs.
[0147] The specific implementation method of this step refers to the description of the aforementioned related embodiments and will not be repeated here.
[0148] S303: Determine the length of other bones of the human body according to the length of the bones of the upper limbs of the human body and / or the length of the bones of the lower limbs of the human body.
[0149] Other bones of the human body include but are not limited to bones from the neck to the chest, bones from the chest to the waist (or abdomen), bones of the head, etc.
[0150] In an exemplary method, the bone length from the neck to the chest, the bone length from the chest to the waist, etc. can be determined based on the bone length of the human upper limbs and / or the bone length of the human lower limbs, as well as the proportional relationship of the bone length of a predefined human body model, thereby predicting other bone lengths of the human body.
[0151] In another exemplary embodiment, the bone length of the human upper limbs and / or the bone length of the human lower limbs are input into a pre-trained bone prediction model to obtain the lengths of other bones of the human body.
[0152] In another exemplary embodiment, the height of a person is obtained, and the lengths of other bones of the person are determined based on the height of the person, the lengths of bones of the person's upper limbs, and / or the lengths of bones of the person's lower limbs.
[0153] S304: Determine the bone length of the virtual character in the extended reality scene according to the bone length of the human body.
[0154] The bone length of the human body includes the bone length of the upper limbs of the human body, the bone length of the lower limbs of the human body, and other bone lengths. According to the determined bone length of the human body, the bone length of the virtual character is adjusted, and the adjusted bone length of the virtual character matches the bone length of the human body. The bone length of the virtual character matches the bone length of the human body, which can be the same as the bone length of the human body.
[0155] S305: Acquire the posture information of the human body, and display the virtual character according to the posture information of the human body.
[0156] For example, the posture information of the human body can be determined by using inertial data measured by an inertial measurement unit (IMU) worn by the human body.
[0157] The user can wear multiple IMUs to determine the posture information of the human body. For example, the user wears IMUs on two wrists, two ankles and waist, and calculates the posture information of related joints based on the inertial data measured by the IMU and the constraint relationship between the limbs of the human body. Optionally, the posture of the human body can also be determined based on the inertial data measured by the IMU and the position information of the head-mounted device, where the position information of the head-mounted device is the position information of the human head, and the position information of the head-mounted device can be obtained through the visual simultaneous localization and mapping (SLAM) method.
[0158] This is just an example, and the head-mounted device can also use other methods to obtain human body posture information, and the embodiments of the present application are not limited to this.
[0159] After acquiring the posture information of the human body, the movement of the virtual character is controlled according to the position information of the human body, and the rotation of the joints of the virtual character is controlled according to the posture information of each joint of the human body, thereby driving the virtual character to move. Since the bone length of the human body corresponding to the posture information matches the bone length of the virtual character, the movement of the virtual character can be made more natural, avoiding problems such as virtual character penetrating the model and foot sliding, thereby improving the user experience.
[0160] In this embodiment, the upper limb image and the lower limb image of the human body are captured by the camera of the head-mounted device, and the bone length of the upper limb of the human body is determined according to the upper limb image, and the bone length of the lower limb of the human body is determined according to the lower limb image; according to the bone length of the upper limb of the human body and / or the bone length of the lower limb of the human body, the length of other bones of the human body is determined; according to the determined bone length of the human body, the bone length of the virtual character in the extended reality scene is determined, and the posture information of the human body is obtained, and the virtual character is displayed according to the posture information of the human body. Since the adjusted bone length of the virtual character matches the bone length of the human body, the movement of the virtual character is driven according to the posture information of the human body, which can make the movement of the virtual character more natural, avoid the problems of the virtual character wearing the model, sliding, etc., and improve the user experience.
[0161] On the basis of the third embodiment, the fourth embodiment of the present application provides a method for driving a virtual character. The same contents refer to the description of the previous embodiment. Figure 7 This is a flowchart of a method for displaying a virtual character provided in Embodiment 4 of the present application, such as Figure 7 As shown, the method provided in this embodiment includes the following steps:
[0162] S401. Obtain the height of a human body.
[0163] In one implementation, the height of the body input by the user is received. The user opens a skeleton adjustment page and inputs the height of the body in the page.
[0164] In another implementation, the height between the head mounted device and the ground is detected, and the height of the person is determined based on the height between the head mounted device and the ground.
[0165] When the user is in a standing posture, the height of the head-mounted device and the ground is detected. The height of the head-mounted device and the ground can be detected by a SLAM module of the head-mounted device, or by other methods, such as measuring the height of the head-mounted device and the ground by an ultrasonic sensor, an infrared ranging sensor, etc.
[0166] The head-mounted device is worn on the human head. The height of the head-mounted device and the ground can be directly used as the height of the person, or the height of the head-mounted device and the ground can be adjusted to obtain the height of the person. For example, the height of the person can be obtained by adding 2 cm to the height of the head-mounted device and the ground, or by subtracting 2 cm from the height of the head-mounted device and the ground.
[0167] Optionally, when detecting the height between the head mounted device and the ground, the height between the head mounted device and the ground may be obtained through multiple detections.
[0168] Optionally, the application provides an adjustment option for the virtual character's bone length, and the user can choose whether to adjust the virtual character's bone length. When it is detected that the user starts the application, the adjustment option for the virtual character's bone length is displayed, and the adjustment option is used to select whether to adjust the virtual character's bone length. The user can choose to adjust the virtual character's bone length according to their needs, or they can choose not to adjust it.
[0169] In response to a confirmation instruction for the adjustment option, the adjustment function of the virtual character's bone length is turned on, and the virtual character's bone length is adjusted. In response to a negative instruction for the adjustment option, the adjustment function of the virtual character's bone length is turned off, and the virtual character's default bone length or the most recently used bone length is adopted. By providing an adjustment option for the virtual character's bone length, users can flexibly choose whether to adjust according to their needs, giving users a better experience.
[0170] After starting the virtual character's bone length adjustment function, some prompt information can be output to help the user complete the adjustment of the virtual character's bone length. For example, the virtual character's bone length adjustment function is turned on, and a bone adjustment page is displayed, which includes a height input item. After the user enters the human body height, further, a prompt information is displayed, which is used to prompt the user to raise his hands forward and kick his legs forward and left and right. The prompt information can be displayed to the user in text and / or voice.
[0171] Optionally, in one implementation, the application does not provide an option for adjusting the length of the virtual character's bones, and the virtual character's bones must be adjusted by default. Only after the adjustment of the virtual character's bones is completed, can the application's functions be executed.
[0172] S402: Capture upper limb images and lower limb images of a human body through a camera of the head-mounted device.
[0173] S403, determining the bone length of the upper limbs of the human body according to the upper limb image, and determining the bone length of the lower limbs of the human body according to the lower limb image.
[0174] S404: Determine the length of other bones of the human body according to the height of the human body, the length of bones of the human body's upper limbs and / or the length of bones of the human body's lower limbs.
[0175] In an exemplary method, the bone length from neck to waist is determined based on the body's height, the bone length of the lower limbs and the head height, wherein the head height can be a preset fixed value. The bone length from neck to waist and the bone length of the body are obtained based on the proportional relationship between the bone length from neck to waist and the bone length of the body.
[0176] In another exemplary embodiment, the length of other bones of the human body is predicted by a neural network model, and the height of the human body, the length of the bones of the upper limbs of the human body and / or the length of the bones of the lower limbs of the human body are input into a pre-trained bone prediction model to obtain the length of other bones of the human body.
[0177] It should be noted that there is no specific order in which step S401 and step S402 are executed, and they may be executed simultaneously.
[0178] S405: Determine the bone length of the virtual character in the extended reality scene according to the bone length of the human body.
[0179] S406: Acquire the posture information of the human body, and display the virtual character according to the posture information of the human body.
[0180] In this embodiment, by obtaining the height of a human body, the upper limb image and the lower limb image of the human body are captured by the camera of the head-mounted device, the bone length of the upper limb of the human body is determined according to the upper limb image, the bone length of the lower limb of the human body is determined according to the lower limb image, and the other bone lengths of the human body are determined according to the height of the human body, the bone length of the upper limb and / or the bone length of the lower limb. According to the bone length of the human body, the bone length of the virtual character in the extended reality scene is determined, so that the bone length of the virtual character matches the bone length of the human body. In this method, by determining the other bone lengths of the human body in combination with the height of the human body, the accuracy of the other bone lengths of the human body is improved, and the movement of the virtual character is driven according to the posture information of the human body, which can make the movement of the virtual character more natural.
[0181] In order to better implement the method for displaying a virtual character according to the embodiment of the present application, the embodiment of the present application also provides a device for displaying a virtual character. Figure 8 This is a schematic diagram of the structure of a display device for a virtual character provided in Embodiment 5 of the present application, such as Figure 8 As shown, the display device 100 of the virtual character may include:
[0182] An image acquisition module 11 is used to acquire images of human limbs;
[0183] A determination module 12, configured to determine a corresponding human limb according to the limb image;
[0184] The display module 13 is used to display a virtual character, wherein the length of the limb bones of the virtual character is determined according to the length of the bones of the human limbs.
[0185] In some embodiments, the determination module 12 is further used to determine the length of other bones of the human body according to the length of the bones of the human limbs; the display module 13 is further used to adjust the length of other bones of the virtual character according to the length of other bones of the human body.
[0186] In some embodiments, the device further comprises a height acquisition module for acquiring the height of a person;
[0187] The determination module 12 is specifically used to determine the length of other bones of the human body according to the height of the human body and the bone length of the human body limbs.
[0188] In some embodiments, the determination module 12 is specifically used to:
[0189] Identify the joints of the human limbs according to the limb image;
[0190] Determine the three-dimensional 3D coordinates of the joint points of the human limbs according to the limb image;
[0191] The bone length of the human limb is determined according to the 3D coordinates of the joint points of the human limb.
[0192] In some embodiments, the head mounted device uses a binocular camera to capture the limb image;
[0193] The determination module 12 is specifically used to determine the 3D coordinates of the joint points of the human limbs according to the limb image and the binocular parallax principle.
[0194] In some embodiments, the determination module 12 is specifically used to: input the limb image into a human key point recognition network to obtain the joint points of the human limb.
[0195] In some embodiments, the height acquisition module is specifically used to: receive the height of the human body input by a user or detect the height of the human body.
[0196] In some embodiments, the image acquisition module 11 is specifically used to: collect the limb image through a camera of a head-mounted device; wherein the virtual character is displayed in an extended reality scene of the head-mounted device.
[0197] In some embodiments, the device further includes: a posture acquisition module, used to acquire the posture information of the human body; the display module 13 is specifically used to: display the virtual character according to the posture information of the human body.
[0198] In some embodiments, the device further comprises a prompt module, configured to:
[0199] When it is detected that the user starts the application, a start option of a virtual character's skeleton adjustment function is displayed, where the virtual character's skeleton adjustment function is used to adjust the virtual character's skeleton length;
[0200] In response to a confirmation instruction of the startup option, a skeleton adjustment function of the virtual character is enabled;
[0201] Prompt information is displayed, where the prompt information is used to prompt the user to raise both hands forward and kick the legs forward and left and right.
[0202] In some embodiments, the posture acquisition module is specifically used to determine the posture information of the human body through inertial data measured by an inertial sensor IMU worn by the human body.
[0203] In some embodiments, the upper limb image includes a left upper limb and a right upper limb, and the lower limb image includes a left lower limb image and a right lower limb image;
[0204] The determining module 12 is specifically used for:
[0205] Determining the bone length of the upper limb of the human body according to the upper limb image;
[0206] The bone length of the human lower limbs is determined according to the left lower limb image and the right lower limb image.
[0207] In some embodiments, the joint points of the upper limb include: shoulder nodes, elbow nodes, wrist nodes, and finger nodes;
[0208] The joint points of the lower limbs include: a hip node, a knee node, an ankle node and a toe node.
[0209] It should be understood that the device embodiment and the method embodiment may correspond to each other, and similar descriptions may refer to the method embodiment. To avoid repetition, they will not be described here.
[0210] The above describes the device 100 of the embodiment of the present application from the perspective of the functional module in conjunction with the accompanying drawings. It should be understood that the functional module can be implemented in hardware form, can be implemented by instructions in software form, and can also be implemented by a combination of hardware and software modules. Specifically, the steps of the method embodiment in the embodiment of the present application can be completed by the hardware integrated logic circuit and / or software form instructions in the processor, and the steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or a combination of hardware and software modules in the decoding processor to perform. Optionally, the software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory, and completes the steps in the above method embodiment in conjunction with its hardware.
[0211] An embodiment of the present application also provides an electronic device. Fig. 9 A structural diagram of an electronic device provided in Embodiment 6 of the present application, such as Fig. 9 As shown, the electronic device 200 may include:
[0212] The memory 21 and the processor 22, the memory 21 is used to store the computer program and transmit the program code to the processor 22. In other words, the processor 22 can call and run the computer program from the memory 21 to implement the method in the embodiment of the present application.
[0213] For example, the processor 22 may be configured to execute the above method embodiments according to instructions in the computer program.
[0214] In some embodiments of the present application, the processor 22 may include but is not limited to:
[0215] General-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc.
[0216] In some embodiments of the present application, the memory 21 includes but is not limited to:
[0217] Volatile memory and / or non-volatile memory. Among them, the non-volatile memory can be read-only memory (ROM), programmable ROM (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM) or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus random access memory (DR RAM).
[0218] In some embodiments of the present application, the computer program may be divided into one or more modules, which are stored in the memory 21 and executed by the processor 22 to complete the method provided by the present application. The one or more modules may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program in the electronic device.
[0219] like Fig. 9 As shown, the electronic device 200 may further include: a transceiver 23 , which may be connected to the processor 22 or the memory 21 .
[0220] The processor 22 may control the transceiver 23 to communicate with other devices, specifically, to send information or data to other devices, or to receive information or data sent by other devices. The transceiver 23 may include a transmitter and a receiver. The transceiver 23 may further include an antenna, and the number of antennas may be one or more.
[0221] Understandable, although Fig. 9 Not shown, the electronic device 200 may also include a camera module, a wireless fidelity WIFI module, a positioning module, a Bluetooth module, a display, a controller, etc., which will not be repeated here.
[0222] It should be understood that the various components in the electronic device are connected via a bus system, wherein the bus system includes not only a data bus but also a power bus, a control bus and a status signal bus.
[0223] The present application also provides a computer storage medium on which a computer program is stored, and when the computer program is executed by a computer, the computer can perform the method of the above method embodiment. In other words, the present application embodiment also provides a computer program product containing instructions, and when the instructions are executed by a computer, the computer can perform the method of the above method embodiment.
[0224] The present application also provides a computer program product, which includes a computer program, and the computer program is stored in a computer-readable storage medium. The processor of the electronic device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the electronic device executes the corresponding process in the human motion capture method in the embodiment of the present application, which will not be described here for the sake of brevity.
[0225] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the module is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0226] The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. For example, each functional module in each embodiment of the present application may be integrated into a processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
[0227] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for displaying a virtual character, characterized in that: include: Acquiring images of human body parts; Determine the bone length of the corresponding human limb according to the limb image; A virtual character is displayed, wherein the length of the limb bones of the virtual character is determined according to the length of the bones of the human limbs.
2. The method according to claim 1, characterized in that Also includes: Determine the length of other bones of the human body according to the length of the bones of the human body limbs; The lengths of other bones of the virtual character are adjusted according to the lengths of other bones of the human body.
3. The method according to claim 2, characterized in that Also includes: Get the height of the human body; Determining the length of other bones of the human body according to the length of the bones of the human limbs includes: The lengths of other bones of the human body are determined according to the height of the human body and the lengths of the bones of the human body's limbs.
4. The method according to claim 1, characterized in that Determining the bone length of the corresponding human limb according to the limb image includes: Identify the joints of the human limbs according to the limb image; Determine the three-dimensional 3D coordinates of the joint points of the human limbs according to the limb image; The bone length of the human limb is determined according to the 3D coordinates of the joint points of the human limb.
5. The method according to claim 4, characterized in that The head-mounted device uses a binocular camera to capture the limb image; Determining the three-dimensional 3D coordinates of the joint points of the human limbs according to the limb image includes: The 3D coordinates of the joint points of the human limbs are determined according to the limb image and binocular parallax principle.
6. The method according to claim 4, characterized in that The step of identifying the joint points of the human limbs according to the limb image comprises: The limb image is input into a human body key point recognition network to obtain the joint points of the human limb.
7. The method according to claim 3, characterized in that The obtaining of the height of the human body comprises: Receive the height of the person input by the user or detect the height of the person.
8. The method according to any one of claims 1 to 7, characterized in that: The step of obtaining a limb image of a human body comprises: Collecting the limb image through a camera of a head-mounted device; Wherein, the virtual character is displayed in an extended reality scene of the head mounted device.
9. The method according to claim 8, characterized in that The limb image is a limb image of a human body wearing the head mounted device.
10. The method according to claim 1, characterized in that Also includes: Acquiring posture information of the human body; The display of the virtual character comprises: The virtual character is displayed according to the posture information of the human body.
11. The method according to any one of claims 1 to 7, characterized in that: Also includes: When it is detected that the user launches the application, an adjustment option for the virtual character's bone length is displayed; In response to a confirmation instruction for the adjustment option, a function of adjusting the bone length of the virtual character is enabled; Prompt information is displayed, where the prompt information is used to prompt the user to raise both hands forward and kick the legs forward and left and right.
12. The method according to claim 10, characterized in that The acquiring the posture information of the human body includes: The posture information of the human body is determined by measuring the inertial data obtained by the inertial sensor IMU worn by the human body.
13. The method according to any one of claims 1 to 7, characterized in that: The limb images include upper limb images and lower limb images, the upper limb images include left upper limb and right upper limb, and the lower limb images include left lower limb images and right lower limb images; Determining the bone length of the corresponding human limb according to the limb image includes: Determining the bone length of the upper limb of the human body according to the upper limb image; The bone length of the human lower limbs is determined according to the left lower limb image and the right lower limb image.
14. The method according to claim 4, characterized in that The limbs include upper limbs and lower limbs, and the joints of the upper limbs include: shoulder nodes, elbow nodes, wrist nodes and finger nodes; The joint points of the lower limbs include: a hip node, a knee node, an ankle node and a toe node.
15. A display device for a virtual character, characterized in that: include: An image acquisition module, used for acquiring images of human limbs; A determination module, used to determine the bone length of the corresponding human limb according to the limb image; The display module is used to display a virtual character, wherein the length of the limb bones of the virtual character is determined according to the length of the bones of the human limbs.
16. An electronic device, characterized in that: include: A processor and a memory, the memory being used to store a computer program, and the processor being used to call and run the computer program stored in the memory to execute the method according to any one of claims 1 to 14.
17. A computer-readable storage medium, characterized in that: Used to store a computer program, wherein the computer program causes a computer to execute the method according to any one of claims 1 to 14.
18. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 14 is implemented.
Citation Information
Cited By
Method, apparatus, device, medium and program for displaying a virtual character
EP4541438A1