Human body skeleton point position determination method, device, equipment and storage medium

CN118365700BActive Publication Date: 2026-11-27TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310084590.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-17
Publication Date
2026-11-27
Estimated Expiration
2043-01-17

AI Technical Summary

Technical Problem

[0002]在计算机视觉相关的应用场景中,可以通过姿态估计输出二维图像上与人体重合的二维骨骼点,但是在虚实融合等场景应用中,往往需要真实人物与虚拟场景中的物体进行交互,因此,需要获取世界坐标系中人体的三维骨骼点,以便于在相机视角下,能够与真人完美重合,然而,相关技术中,针对世界坐标系中人体的三维骨骼点的定位效率低、准确性差

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118365700B_ABST
    Figure CN118365700B_ABST
Patent Text Reader

Abstract

The application provides a human skeleton point position determination method and device, electronic equipment, computer readable storage medium and computer program product, including: obtaining the first position of each skeleton point of a target object in a three-dimensional human coordinate system, the second position of each skeleton point in a two-dimensional image coordinate system, and the camera parameters of a camera used for image acquisition of the target object; determining the third position of each skeleton point in a three-dimensional camera coordinate system based on the first position, the second position and the camera parameters; scaling the third position based on a scaling factor for scaling the third position to obtain the fourth position of each skeleton point in the three-dimensional camera coordinate system; and then performing coordinate system conversion on the fourth position to obtain the target position of each skeleton point of the target object in a three-dimensional world coordinate system. Through the application, not only can the skeleton point be quickly positioned in the three-dimensional world coordinate system, but also the positioning accuracy for the skeleton point can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to computer vision technology, and more particularly to a method, apparatus, electronic device, computer-readable storage medium, and computer program product for determining the position of human skeletal points. Background Technology

[0002] In computer vision applications, pose estimation can output two-dimensional skeletal points on a two-dimensional image that coincide with the human body. However, in applications such as virtual-real fusion, real people often need to interact with objects in a virtual scene. Therefore, it is necessary to obtain the three-dimensional skeletal points of the human body in the world coordinate system so that they can perfectly coincide with the real person from the camera's perspective. However, in related technologies, the localization efficiency and accuracy of the three-dimensional skeletal points of the human body in the world coordinate system are low. Summary of the Invention

[0003] This application provides a method, apparatus, electronic device, computer-readable storage medium, and computer program product for determining the position of human skeletal points, which can not only achieve rapid positioning of skeletal points in a three-dimensional world coordinate system, but also improve the positioning accuracy of skeletal points.

[0004] The technical solution of this application embodiment is implemented as follows: This application provides a method for determining the location of human skeletal points, including: The first position of each skeletal point of the target object in the three-dimensional human body coordinate system, the second position of each skeletal point in the two-dimensional image coordinate system, and the camera parameters of the camera used to acquire images of the target object are obtained. Based on the first position, the second position, and the camera parameters, determine the third position of each skeleton point in the three-dimensional camera coordinate system; A scaling factor is determined for scaling the third position, and the third position of each of the bone points is scaled based on the scaling factor to obtain the fourth position of each of the bone points in the three-dimensional camera coordinate system. The fourth position of each of the aforementioned bone points is transformed to obtain the target position of each bone point of the target object in the three-dimensional world coordinate system.

[0005] This application provides a device for determining the position of human skeletal points, including: The acquisition module is used to acquire the first position of each skeletal point of the target object in the three-dimensional human body coordinate system, the second position of each skeletal point in the two-dimensional image coordinate system, and the camera parameters of the camera used to acquire images of the target object. The determination module is used to determine the third position of each of the skeleton points in the three-dimensional camera coordinate system based on the first position, the second position and the camera parameters; A scaling module is used to determine a scaling factor for scaling the third position, and to scale the third position of each of the bone points based on the scaling factor to obtain the fourth position of each of the bone points in the three-dimensional camera coordinate system. The transformation module is used to perform coordinate system transformation on the fourth position of each of the bone points to obtain the target position of each bone point of the target object in the three-dimensional world coordinate system.

[0006] This application provides an electronic device, including: Memory, used to store executable instructions; The processor, when executing executable instructions stored in the memory, implements the method for determining the position of human skeletal points provided in the embodiments of this application.

[0007] This application provides a computer-readable storage medium storing computer-executable instructions. When the computer-executable instructions are executed by a processor, the processor will execute the method for determining the position of human skeletal points provided in this application.

[0008] This application provides a computer program product, which includes a computer program or computer-executable instructions stored in a computer-readable storage medium. The processor of an electronic device reads the computer-executable instructions from the computer-readable storage medium and executes the computer-executable instructions, causing the electronic device to perform the method for determining the location of human skeletal points provided in this application.

[0009] The embodiments of this application have the following beneficial effects: By combining the first position of the skeleton point in the three-dimensional human body coordinate system, the second position of the current skeleton point in the two-dimensional image coordinate system, and camera parameters, the third position of the skeleton point in the three-dimensional camera coordinate system is determined. Then, the third position is scaled using a scaling factor to obtain the fourth position in the three-dimensional camera coordinate system corresponding to the third position. This ensures the correctness of the perspective relationship between the positions of the skeleton points in the three-dimensional coordinate system and the two-dimensional image coordinate system. Finally, by performing coordinate system transformation on the fourth position, the target position of each skeleton point in the three-dimensional world coordinate system is obtained. This not only enables rapid positioning of skeleton points in the three-dimensional world coordinate system but also improves the accuracy of skeleton point positioning. Attached Figure Description

[0010] Figure 1This is a schematic diagram of the relevant coordinate system in the pinhole camera model provided in the embodiments of this application; Figure 2 This is a schematic diagram of the structure of human skeletal points provided in the embodiments of this application; Figure 3 This is a schematic diagram of the architecture of the human skeleton point position determination system 100 provided in the embodiments of this application; Figure 4 This is a schematic diagram of the structure of the electronic device 500 that implements the method for determining the position of human skeletal points according to an embodiment of this application; Figure 5 This is a flowchart illustrating the method for determining the location of human skeletal points provided in an embodiment of this application; Figure 6 This is a flowchart illustrating the method for calculating the position of skeleton points in a three-dimensional camera coordinate system, as provided in an embodiment of this application. Figure 7 This is a flowchart of a method for correcting a third position provided in an embodiment of this application; Figure 8 This is the normalization operation method flow for the second position provided in the embodiments of this application; Figure 9 This is a flowchart of a method for determining the corrected position corresponding to the third position, provided in an embodiment of this application. Figure 10 This is a flowchart of the scaling factor determination method provided in the embodiments of this application; Figure 11 This is a flowchart of the method for determining the fifth position provided in the embodiments of this application; Figure 12 This is a flowchart illustrating the specific implementation of the scaling factor determination method provided in the embodiments of this application; Figures 13A-13C This is an example diagram illustrating the application of the target location in virtual-real fusion provided in the embodiments of this application; Figure 14 This is a flowchart of the target location determination method provided in the embodiments of this application; Figures 15A-15B This is a flowchart of a method for determining the location of human skeletal points provided in an embodiment of this application; Figure 16A This is a schematic diagram illustrating the process of coarsely calculating 3D skeleton points at a relative scale, as provided in an embodiment of this application. Figure 16B This is a flowchart of the 3D skeleton refinement process provided in the embodiments of this application; Figure 16C This is a flowchart illustrating the scaling factor calculation method provided in the embodiments of this application; Figure 16D This is a schematic diagram illustrating the process of scaling to obtain fine 3D skeletal points of absolute scale according to the embodiments of this application. Detailed Implementation

[0011] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0012] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0013] In the following description, the terms "first, second, third" are used merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first, second, third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.

[0014] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0015] Before providing a further detailed description of the embodiments of this application, the nouns and terms involved in the embodiments of this application will be explained, and the nouns and terms involved in the embodiments of this application shall be interpreted as follows.

[0016] 1) Camera Model: This describes the process of mapping coordinate points in the 3D world coordinate system to a 2D image plane, serving as the link between points in 3D space and points in the 2D plane. Camera models include at least: pinhole camera models and fisheye camera models. Taking the pinhole camera model as an example, it contains four coordinate systems: the 3D world coordinate system, the 3D camera coordinate system, the 2D image physical coordinate system, and the 2D image pixel coordinate system.

[0017] See Figure 1 , Figure 1This is a schematic diagram of the coordinate system in the pinhole camera model provided in this application embodiment. It explains the world coordinate system, which is a three-dimensional coordinate system established in the real-world three-dimensional space with any point as the center. Also known as the three-dimensional world coordinate system, it is the absolute coordinate system of the objective three-dimensional world, also called the objective coordinate system. It represents the coordinates of an object in the real world. The world coordinate system changes with the size and position of the object, and its unit is a unit of length. Since the camera is placed in three-dimensional space, the world coordinate system is used as a reference coordinate system to describe the camera's position, and also to describe the position of any other object placed in this three-dimensional environment.

[0018] The camera coordinate system is a three-dimensional rectangular coordinate system, also known as a 3D camera coordinate system. The origin O is the optical center of the camera. The x-axis and y-axis are parallel to the two perpendicular sides of the camera's imaging plane, respectively. That is, the x-axis and y-axis are parallel to the x and y directions of the image, and the z-axis is the optical axis of the camera (or the z-axis is parallel to the optical axis). The x, y, and z axes are perpendicular to each other, and the unit is a unit of length.

[0019] The physical coordinate system of an image is described below. The physical coordinate system of an image (also known as a two-dimensional image coordinate system) takes the intersection of the optical axis of the camera and the physical imaging plane (also known as the image plane) as the origin O'. The x' axis and y' axis are parallel to the two vertical sides of the image plane, and the unit is length.

[0020] The image pixel coordinate system (also known as the pixel coordinate system) is explained below. The origin O is the vertex of the image. pixel The u and v directions are parallel to the x' and y' axes, respectively, and are measured in pixels. In practical applications, images captured by a camera are first converted into standard electrical signals, and then transformed into digital images through analog-to-digital conversion. Each image is stored as an M×N array, where the value of each element in the M rows and N columns represents the grayscale level of an image point. Each such element is called a pixel, and the pixel coordinate system is the image coordinate system with pixels as the unit.

[0021] The transformations between the coordinate systems described above are explained below. The process of imaging a geometric object P through a camera is as follows: The three-dimensional coordinates P of the geometric object P in world coordinates are obtained. w (x) w y w , z w P is obtained through rigid body transformation. w The corresponding 3D coordinates P in the camera coordinate system o (x, y, z), and then obtain the coordinates P through projection transformation. oIn the image plane, the (two-dimensional) coordinates of the projected point in the image coordinate system are P'(x', y'). Finally, through discretization, the coordinates of P' in the pixel coordinate system are obtained as p(u, v). Since both the world coordinate system and the camera coordinate system are right-handed coordinate systems, geometric objects in the world coordinate system will not deform when undergoing coordinate system transformation to obtain the position of the geometric object in the camera coordinate system. Rigid body transformation can be used to transform coordinates in the world coordinate system to coordinates in the camera coordinate system. Rigid body transformation refers to the rotation and translation of a geometric object in three-dimensional space without deformation. Rigid body transformation reflects the relative motion relationship between the geometric object and the camera.

[0022] Furthermore, points in the 3D camera coordinate system are transformed into their corresponding points in the 2D image coordinate system through perspective projection. Perspective projection uses central projection to project a shape onto a projection plane, thus obtaining a one-sided projection image that closely resembles the visual effect (similar to shadow puppetry). Perspective projection conforms to human psychological habits, namely, objects closer to the viewpoint appear larger, and objects farther from the viewpoint appear smaller, and parallel lines that are not parallel to the image plane intersect at vanish points.

[0023] 2) Mediapipe: An AI-powered framework for skeletal modeling, recognition, classification, and tracking, supporting functions such as face recognition, human feature point recognition, and human skeletal point recognition. See also... Figure 2 , Figure 2 This is a schematic diagram of the structure of human skeletal points provided in the embodiments of this application. The figure shows a human model composed of 32 skeletal points (also called skeletal key points). When detecting human skeletal key points, these 32 skeletal points are used as the standard to obtain the skeletal information of the skeletal points. The skeletal information may include skeletal motion data, which is described by the rotation data and displacement data of the skeletal points.

[0024] 3) Human 2D Skeleton: Also known as the human 2D skeleton, it refers to a data structure composed of the coordinates of human 2D skeleton points (such as head, hand, etc.) on an image, and the lines connecting the corresponding skeleton points of human limbs (the line connecting the shoulder node and the elbow node to represent the arm). It is specifically used to reflect the movement of the human body in a 2D image.

[0025] 4) Human 3D Skeleton: Also known as the human 3D (Dimensions) skeleton, this refers to a data structure in three-dimensional space consisting of the coordinates of human 3D skeleton points (such as nodes for the head, hands, etc.) and the lines connecting the corresponding skeleton points to human limbs (the line connecting the shoulder node and the elbow node, used to represent the arm). It is specifically used to reflect human movements in three-dimensional space. It is important to note that the human 3D skeleton can be represented in different coordinate systems, such as human 3D skeleton points in a human coordinate system centered on the human body, or human 3D skeleton points in a world coordinate system. The human coordinate system can be a three-dimensional Cartesian coordinate system constructed with the hip skeleton points as the origin.

[0026] 5) Relative Scale: This refers to a scale value that is only meaningful when relative to the size. Taking the depth of a skeleton point relative to the camera as an example, the relative scale of a skeleton point is only meaningful when comparing two skeleton points (which has a greater depth). Taking the relative 3D coordinates of a single skeleton point is meaningless and cannot be combined with other data at the absolute scale (such as intrinsic and extrinsic parameters after camera tracking). For data at the relative scale, the scaling factor to the absolute scale needs to be calculated before its absolute scale value can be determined.

[0027] 6) Absolute scale: refers to data recorded in units that can be converted to the metric system, such as meters.

[0028] 7) Scale scaling factor: A coefficient that, when multiplied by data at a relative scale, yields data at an absolute scale. In the description of the embodiments in this application, the scale scaling factor can be collectively referred to as the scaling factor.

[0029] 8) Human skeletal keypoint detection, also known as pose estimation, primarily detects joints, facial features, etc., describing skeletal information through keypoints. Human skeletal keypoint detection is one of the fundamental algorithms in computer vision, playing a foundational role in other related fields such as behavior recognition, person following, and gait recognition. Specific applications are mainly concentrated in patient monitoring systems, human-computer interaction, virtual reality, human animation, smart homes, smart security, and athlete training assistance, among others.

[0030] 9) Homogeneous coordinates: To facilitate matrix operations, an n-dimensional vector (coordinate) is represented by an n+1-dimensional vector (coordinate).

[0031] 10) The Perspective-n-Point (PnP) problem is a method for solving the motion of 3D to 2D point pairs, aiming to determine the pose of the camera coordinate system relative to the world coordinate system. It describes the known... nWhen given the coordinates (relative to the world coordinate system) of a 3D point and its pixel coordinates, the corresponding perspective projection relationship is calculated to obtain the camera pose (or camera position) or object pose (or object position). The `solvepnp` function provided by OpenCV can be used to solve the PnP problem. The `solvepnp` function can be used to calculate camera pose or object pose, and also for spatial localization.

[0032] 11) Camera Calibration: In image measurement and machine vision applications, to determine the 3D geometric position of a point on the surface of a spatial object and its corresponding point in the image, a geometric model of the camera's imaging, i.e., a camera model, must be established. The parameters of this camera model are called camera parameters. The process of solving for these camera parameters is called camera calibration. Camera parameters include intrinsic and extrinsic parameters. Intrinsic parameters are determined by the camera and do not change due to external environmental factors.

[0033] Based on the above explanation of the nouns and terms used in the embodiments of this application, the following describes the human skeletal point location determination system provided in the embodiments of this application. See also... Figure 3 , Figure 3 This is a schematic diagram of the architecture of the human skeleton point location determination system 100 provided in the embodiments of this application. In order to support an exemplary application, the terminal (terminal 400-1 and terminal 400-2 are shown as examples) connects to the server 200 through the network 300. The network 300 can be a wide area network or a local area network, or a combination of the two, and data transmission is achieved using wireless or wired links.

[0034] In some embodiments, the terminal (such as terminal 400-1 and terminal 400-2) is deployed with a target application (such as a virtual-real fusion scene), which is used to send a positioning request for the human skeleton points of the target object in the real scene to a server for realizing rapid positioning of skeleton points in the three-dimensional world coordinate system, and send an image acquisition instruction for the target object to an image acquisition device (such as a camera), and receive the target position of the human skeleton points of the target object in the three-dimensional world coordinate system returned by the server, so that the target application can perform corresponding business processing based on the received target position of the human skeleton points in the three-dimensional world coordinate system (such as realizing the control of virtual objects in the virtual-real fusion scene by real people).

[0035] In some embodiments, the server 200, upon receiving a request to locate the skeletal points of a target object, acquires the first position of each skeletal point in a three-dimensional human coordinate system, the second position of each skeletal point in a two-dimensional image coordinate system, and the camera parameters of the camera used to acquire images of the target object; based on the first position, the second position, and the camera parameters, determines the third position of each skeletal point in a three-dimensional camera coordinate system; scales the third position based on a scaling factor to obtain the fourth position of each skeletal point in the three-dimensional camera coordinate system; then performs a coordinate system transformation on the fourth position to obtain the target position of each skeletal point of the target object in a three-dimensional world coordinate system. Finally, the target positions of each skeletal point in the three-dimensional world coordinate system are sent to the terminal.

[0036] In practical applications, server 200 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. Terminals (such as terminals 400-1 and 400-2) can be smartphones, tablets, laptops, desktop computers, smart speakers, smart TVs, smartwatches, etc., but are not limited to these. Terminals (such as terminals 400-1 and 400-2) and server 200 can be directly or indirectly connected via wired or wireless communication; this application does not impose any restrictions on this connection.

[0037] The electronic device that implements the method for determining the position of human skeletal points provided in the embodiments of this application will be described next. See Figure 4 , Figure 4 This is a schematic diagram of the structure of an electronic device 500 that implements the method for determining the position of human skeletal points according to an embodiment of this application. The electronic device 500 can be... Figure 1 The server 200 and electronic device 500 shown can also be terminals capable of implementing the method for determining the position of human skeletal points provided in this application, with electronic device 500 as the example. Figure 1Taking the server shown as an example, an electronic device implementing the method for determining the location of human skeletal points according to an embodiment of this application will be described. The electronic device 500 provided in this embodiment includes: at least one processor 510, a memory 550, at least one network interface 520, and a user interface 530. The various components in the electronic device 500 are coupled together through a bus system 540. It is understood that the bus system 540 is used to realize the connection and communication between these components. In addition to a data bus, the bus system 540 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in... Figure 4 The general labeled all buses as Bus System 540.

[0038] The processor 510 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc.

[0039] User interface 530 includes one or more output devices 531 that enable the presentation of media content, including one or more speakers and / or one or more visual displays. User interface 530 also includes one or more input devices 532, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.

[0040] The memory 550 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state storage, hard disk drives, optical disk drives, etc. The memory 550 may optionally include one or more storage devices physically located away from the processor 510.

[0041] The memory 550 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), and the volatile memory may be random access memory (RAM). The memory 550 described in this application embodiment is intended to include any suitable type of memory.

[0042] In some embodiments, memory 550 is capable of storing data to support various operations, examples of which include programs, modules, and data structures or subsets or supersets thereof, as illustrated below.

[0043] Operating system 551 includes system programs for handling various basic system services and performing hardware-related tasks, such as framework layer, core library layer, driver layer, etc., for implementing various basic business functions and handling hardware-based tasks; network communication module 552 is used to reach other computing devices via one or more (wired or wireless) network interfaces 520, exemplary network interfaces 520 include: Bluetooth, WiFi, and Universal Serial Bus (USB), etc.; presentation module 553 is used to enable the presentation of information (e.g., user interface for operating peripheral devices and displaying content and information) via one or more output devices 531 associated with user interface 530 (e.g., display screen, speaker, etc.); input processing module 554 is used to detect and translate one or more user inputs or interactions from one or more input devices 532.

[0044] In some embodiments, the human skeletal point location determination device provided in this application can be implemented in software. Figure 4 A device 555 for determining the position of human skeletal points stored in memory 550 is shown. It can be software in the form of programs and plug-ins, including the following software modules: acquisition module 5551, determination module 5552, scaling module 5554, and conversion module 5553. These modules are logical and can therefore be arbitrarily combined or further split according to the functions they implement. The functions of each module will be described below.

[0045] In other embodiments, the human skeleton point location determination device provided in this application can be implemented using a combination of hardware and software. As an example, the human skeleton point location determination device provided in this application can be a processor in the form of a hardware decoding processor, which is programmed to execute the human skeleton point location determination method provided in this application. For example, the processor in the form of a hardware decoding processor can be one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.

[0046] In some embodiments, the terminal or server can implement the method for determining the location of human skeletal points provided in this application by running a computer program. For example, the computer program can be a native program or software module in an operating system; it can be a native application (APP), that is, a program that needs to be installed in the operating system to run, such as an instant messaging APP or a web browser APP; it can also be a mini-program, that is, a program that only needs to be downloaded into a browser environment to run; or it can be a mini-program that can be embedded in any APP. In short, the above-mentioned computer program can be any form of application, module, or plugin.

[0047] Based on the above description of the human skeletal point location determination system and electronic device provided in the embodiments of this application, the method for determining the location of human skeletal points provided in the embodiments of this application is described below. In actual implementation, the method for determining the location of human skeletal points provided in the embodiments of this application can be implemented by a terminal or a server alone, or by a terminal and a server working together, so that... Figure 3 The method for determining the location of human skeletal points provided in this application embodiment is illustrated by taking server 200 as an example, which executes the method separately. See also Figure 5 , Figure 5 This is a flowchart illustrating the method for determining the location of human skeletal points provided in an embodiment of this application, which will be combined with... Figure 5 The steps shown are explained.

[0048] In step 101, the server obtains the first position of each skeletal point of the target object in the three-dimensional human body coordinate system, the second position of each skeletal point in the two-dimensional image coordinate system, and the camera parameters of the camera used to acquire images of the target object.

[0049] In practice, the positions of the target object's skeletal points are typically determined in a 3D human body coordinate system. There are various ways to construct this system. For example, the 3D human body coordinate system can be constructed with the hip bone point of the target object as the origin, the target object's orientation as the x-axis, the direction perpendicular to the orientation and to the right as the y-axis, and the direction perpendicular to the orientation and upward as the z-axis. The first position of each skeletal point in the human body coordinate system is determined. Then, in the (frame) image obtained by the camera capturing images of the target object, the second position of each skeletal point in the corresponding 2D image coordinate system is determined. It should be noted that the first positions of all the target object's skeletal points can be viewed as an N×3 matrix, where N is the number of skeletal points, and each row represents the first position of each skeletal point. Knowing the first position and corresponding second position of each skeletal point, the server can combine this with the camera parameters to determine the target object's pose in the 3D camera coordinate system. It should be noted that the camera parameters here refer to the camera intrinsic parameters. In actual calculations, camera intrinsic parameters are usually represented in matrix form, which can be called intrinsic parameter matrices. Camera intrinsic parameters are parameters related to the camera's own characteristics, such as the camera's focal length and pixel size. Camera intrinsic parameters can be used to map points in the three-dimensional camera coordinate system to the two-dimensional pixel coordinate system.

[0050] For example, with Figure 2 The human skeleton points shown are the standard. There are 32 skeleton points in the human model associated with the target object, that is, the target object has 32 first positions and 32 second positions.

[0051] In step 102, based on the first position, the second position, and the camera parameters, the third position of each bone point in the three-dimensional camera coordinate system is determined.

[0052] In actual implementation, for each skeleton point of each target object, given the first position of each skeleton point and its corresponding second position, the server can determine the third position of each skeleton point in the 3D camera coordinate system by combining the camera parameters.

[0053] In some embodiments, see Figure 6 , Figure 6 This is a flowchart illustrating the method for calculating the position of skeleton points in a 3D camera coordinate system, based on embodiments of this application. Figure 5 Step 102 can be implemented by steps 1021-1022.

[0054] Step 1021: Based on the first position, the second position, and camera parameters, perform 3D pose prediction on the target object to obtain the 3D pose of the target object.

[0055] Among them, 3D pose is used to characterize the pose of the target object in the 3D camera coordinate system.

[0056] In practice, the server can predict the 3D pose of the target object by combining the first position and corresponding second position of each skeletal point with camera parameters. This yields the 3D pose of the target object, i.e., its pose in the 3D camera coordinate system. Here, pose indicates the position of each skeletal point of the target object in the 3D camera coordinate system. It should be noted that the 3D pose can be represented by the rotation matrix and translation vector of all skeletal points from the 3D world coordinate system to the 3D camera coordinate system.

[0057] For example, Figure 2 The human skeleton points shown are used as the human skeleton points of the target object. For any one of the 32 skeleton points, let the first position be P, the corresponding second position be P2, and the camera's intrinsic parameter matrix be I. P1, P2, and I are used as input information and input to the corresponding algorithm for 3D pose estimation, such as the solvepnp algorithm, to obtain the pose P of the skeleton point transformed from the 3D human coordinate system to the 3D camera coordinate system. The poses of all the skeleton points of the target object constitute the 3D pose M of the target object.

[0058] Step 1022: Based on the 3D pose and camera parameters, perform coordinate system transformation on the first position of each bone point to obtain the third position of each bone point in the 3D camera coordinate system.

[0059] In practice, after the server obtains the third position of each bone point in the 3D camera coordinate system, when it projects the third position of each bone point to the image coordinate system, there is often a problem that it cannot perfectly coincide with the human body. Before the server performs projection processing on the third position, it can first correct the third position so that the corrected position can minimize the coincidence error.

[0060] The correction process for the third position is described below. In some embodiments, see [link to documentation]. Figure 7 , Figure 7 This is a flowchart of a method for correcting the third position provided in an embodiment of this application. After step 102, the server executes the following steps for the third position of each skeletal point: Figure 7 Steps 201-203 shown implement the correction operation for the third position.

[0061] Step 201: Obtain the distance from the third position to the focal plane of the camera.

[0062] In actual implementation, the server determines the distance from the third position of the skeletal point to the focal plane of the camera. That is, after calculating the third position of point P in the human coordinate system in the camera coordinate system, the distance from the third position to the focal plane (i.e. the imaging plane of the camera) in the pinhole camera model is calculated. This can be determined by the method of calculating the distance from a point to a plane.

[0063] Step 202: Based on the focal length in the camera parameters, normalize the second position to obtain the normalized position corresponding to the second position.

[0064] In actual implementation, the server uses the focal length (i.e., the distance from the optical center to the image plane) in the camera parameters to normalize the second position of the current skeleton point, thereby obtaining the normalized position corresponding to the skeleton point. The normalization operation for the second position can be performed on the components of the second position in the x-axis and y-axis directions in the two-dimensional image coordinate system.

[0065] The normalization operation for the components of the second position in the x-axis and y-axis directions in the two-dimensional image coordinate system is described below. In some embodiments, see [link to documentation]. Figure 8 , Figure 8 This is a normalization operation method flow for the second position provided in the embodiments of this application, based on Figure 7 Step 202 can be implemented by steps 2021 to 2024.

[0066] Step 2021: In the two-dimensional image coordinate system, obtain the first component of the camera's focal length projection in the first direction of the two-dimensional image coordinate system, and the second component of the focal length projection in the second direction of the two-dimensional image coordinate system.

[0067] The first direction and the second direction are perpendicular to each other.

[0068] In actual implementation, the server determines the first component of the camera's focal length in a first direction in the two-dimensional image coordinate system. The first direction can be either the x-axis direction or the y-axis direction of the two-dimensional image coordinate system. The server also determines the second component of the focal length in a second direction in the two-dimensional image coordinate system. When the first direction is the x-axis direction, the second direction is the y-axis direction. When the first direction is the y-axis direction, the second direction is the x-axis direction.

[0069] For example, taking the first direction as the x-axis direction of the two-dimensional image coordinate system, let the focal length of the camera be... f The component of the focal length in the x-axis direction is f x The component of the focal length in the y-axis direction is f y .

[0070] Step 2022: Obtain the third component of the second position in the first direction, and normalize the third component based on the first component to obtain the first normalized component.

[0071] Continuing from the previous example, the second position is the projection position of the skeletal point P in the two-dimensional image coordinate system, denoted as P(P). x P y ), where P x Let P be the third component along the x-axis at the second position. x / f x This is the first normalized component of the second position in the x-axis direction.

[0072] Step 2023: Obtain the fourth component of the second position in the second direction, and normalize the second component based on the fourth component to obtain the second normalized component.

[0073] Continuing from the previous example, P y If P is the fourth component in the y-axis direction at the second position, then... y / f y This is the second normalized component of the second position in the y-axis direction.

[0074] Step 2024: Based on the first normalized component and the second normalized component, determine the normalized position corresponding to the second position.

[0075] Continuing from the previous example, let the coordinates (P) x / f x P y / f y This is the normalized position corresponding to the second position of the skeleton point in the two-dimensional image coordinate system.

[0076] Step 203: Based on the normalized position and distance, correct the third position to obtain the corrected position corresponding to the third position.

[0077] Following the previous example, see [link to example]. Figure 1 It can be seen that the relationship between the two-dimensional image coordinate system and the three-dimensional camera coordinate system is that the origin of the two-dimensional image coordinate system is the projection point of the origin of the three-dimensional camera coordinate system (i.e., the optical center of the camera) on the camera imaging plane. Therefore, the corrected position of the skeleton point in the three-dimensional camera coordinate system can be determined by combining the distance of the skeleton point's position (the third position) from the camera focal plane and the normalized position of the skeleton point in the two-dimensional image coordinate system (the normalized position corresponding to the first position).

[0078] In some embodiments, see Figure 9 , Figure 9This is a flowchart of a method for determining the correction position corresponding to the third position provided in an embodiment of this application, based on... Figure 7 Step 203 can be implemented by steps 2031-2033.

[0079] Step 2031: Determine the product of the first normalized component and the distance, and use the product as the first correction component of the third position in the third direction of the three-dimensional camera coordinate system.

[0080] Continuing the previous example, the third position of the bone point is transformed by projection to obtain the second position of the current bone point in the two-dimensional image coordinate system. After normalizing the second position, the corresponding normalized position is obtained. Then, the first component P of the normalized position in the x-axis direction is determined. x / f x The product of the distance z from the third position to the camera's focal plane is used as the correction component (z) in the x-axis direction of the 3D camera coordinate system, i.e., the first correction component. · P x / f x ).

[0081] Step 2032: Determine the product of the second normalized component and the distance, and use the product as the second correction component of the third position in the fourth direction of the three-dimensional camera coordinate system.

[0082] In this system, the third direction of the 3D camera coordinate system is parallel to the first direction of the 2D image coordinate system, and the fourth direction of the 3D camera coordinate system is parallel to the second direction of the 2D image coordinate system.

[0083] Continuing from the previous example, determine the second component P whose normalized position is in the y-axis direction. y / f y The product of the distance z from the third position to the camera's focal plane is used as the correction component (z) in the y-axis direction of the 3D camera coordinate system, i.e., the second correction component. · P y / f y ).

[0084] It should be noted that the x-axis and y-axis of the 3D camera coordinate system are parallel to the two perpendicular sides of the camera's imaging plane (i.e., the image plane). This can also be viewed as the x-axis of the 3D camera coordinate system being parallel to the x-axis of the 2D image coordinate system, and the y-axis of the 3D camera coordinate system being parallel to the y-axis of the 2D image coordinate system. See [link to relevant documentation]. Figure 1 The relationship between the 3D camera coordinate system and the 2D image coordinate system.

[0085] Step 2033: Based on the first correction component, the second correction component, and the distance, determine the correction position corresponding to the third position.

[0086] Continuing from the previous example, let's consider the coordinates (z... · P x / f x , z · P y / f y z) is the corrected position in the 3D camera coordinate system corresponding to the third position of the skeleton point in the 2D image coordinate system.

[0087] In step 103, a scaling factor is determined for scaling the third position, and the third position of each bone point is scaled based on the scaling factor to obtain the fourth position of each bone point in the three-dimensional camera coordinate system.

[0088] In practice, the third position of a skeleton point in the 3D camera coordinate system represents its relative scale position information. To determine the absolute scale position information of this third position in the world coordinate system, the server can determine a scaling factor from the 3D camera coordinate system to the 3D world coordinate system. This scaling factor, as a coefficient, is multiplied by the relative scale position information in the 3D camera coordinate system to obtain the absolute scale position information in the world coordinate system. Therefore, the server first determines the scaling factor used to scale the third position in the 3D camera coordinate system. In other words, after obtaining the third position of each skeleton point of the target object in the 3D camera coordinate system, the server can determine the position information of each third position in the 3D world coordinate system using the scaling factor. Therefore, the server needs to transform all relevant information into the 3D world coordinate system.

[0089] The method for determining the scaling factor is described. In some embodiments, see [link to documentation]. Figure 10 , Figure 10 This is a flowchart of the scaling factor determination method provided in the embodiments of this application, based on... Figure 5 Step 103 can be implemented by steps 1031-1033.

[0090] Step 1031: Obtain the fifth position of the third position in the three-dimensional world coordinate system.

[0091] In practice, the server determines the fifth position in the 3D world coordinate system by transforming the third position of each skeletal point of the target object. It should be noted that the fifth position is absolute scale position information. The fifth position can be determined by combining the camera's pose in the 3D world coordinate system.

[0092] The method for determining the fifth position is described below. In some embodiments, see [link to documentation]. Figure 11 , Figure 11 This is a flowchart of the method for determining the fifth position provided in the embodiments of this application, based on... Figure 10 Step 1031 can be implemented by steps 301-302.

[0093] Step 301: Obtain the camera pose in the three-dimensional world coordinate system. The camera pose is used to characterize the camera's pose in the three-dimensional world coordinate system.

[0094] In practice, determining the camera's pose in the 3D world coordinate system involves calculating rotation and translation data from the 3D camera coordinate system to the 3D world coordinate system. During coordinate system-related calculations, rotation data can be represented by a rotation matrix, and translation data by a translation vector. It's important to note that the camera pose here refers to the camera's absolute position in the 3D world coordinate system.

[0095] For example, with Figure 1 Taking the pinhole camera model shown as an example, determine the camera pose M in the three-dimensional world coordinate system. c .

[0096] Step 302: Based on the camera pose, perform coordinate system transformation on the third position to obtain the fifth position of the third position in the three-dimensional world coordinate system.

[0097] In practice, after the server determines the camera's pose, it can use a coordinate system transformation involving rotation and translation to determine the absolute position (i.e., the fifth position) in the 3D world coordinate system relative to the third position in the 3D camera coordinate system. It should be noted that at this point, the z-axis of the 3D world coordinate system is in the negative direction of gravity, and the ground is completely perpendicular to gravity.

[0098] In some embodiments, the server can implement coordinate transformation for the third position by: inverting the camera pose to obtain the inverse result; and multiplying the inverse result with the third position to obtain the multiplied result as the fifth position of the third position in the three-dimensional world coordinate system.

[0099] In practice, the server can perform coordinate system transformation on the third position based on the camera pose by inverting the camera pose. This inversion involves finding the inverse matrix of the camera pose in matrix form, and then multiplying the inverse matrix with the third position. The resulting product is then used as the fifth position.

[0100] Continuing from the previous example, let's set the position of the skeleton point in the 3D camera coordinate system, i.e., the third position, as P. C The camera pose is M c Then the fifth position Pw = .

[0101] Step 1032: Obtain the focal position of the camera in the three-dimensional world coordinate system.

[0102] In practice, the position of the camera's focus F is relative to the three-dimensional camera coordinate system. After determining the camera's pose, the server transforms the camera's focus to the focus position in three-dimensional world coordinates, that is, it performs coordinate system transformation on the camera's focus.

[0103] Step 1033: Based on the fifth position and the focus position, determine the scaling factor used to scale the third position.

[0104] In practice, the server obtains the fifth position of each skeleton point in the 3D world coordinate system, and the focal position F of the camera's focus F in the 3D world coordinate system. w Determine the scaling factor for scaling the third position.

[0105] In some embodiments, see Figure 12 , Figure 12 This is a flowchart illustrating the specific implementation of the scaling factor determination method provided in this application embodiment, based on... Figure 10 Step 1033 can be implemented by steps 401-404.

[0106] Step 401: Obtain the third-direction component of each fifth position in the three-dimensional world coordinate system.

[0107] The third direction is used to indicate the direction opposite to the direction of gravity, which is perpendicular to the horizontal direction of the ground.

[0108] Continuing the previous example, the server obtains the component of the fifth position of each bone point in the z-axis direction of the 3D world coordinate system, that is, the fifth position P. w (x) p y p , z p z in ) p Quantity. With Figure 2 The human skeleton shown is a standard. The target object's human skeleton consists of 32 skeleton points. In three-dimensional world coordinates, there are 32 fifth positions corresponding to the skeleton points, which means there are 32 z-coordinates. p Quantity.

[0109] Step 402: Obtain the constraints when performing a scaling operation on the third position, select the target component that satisfies the constraints from each component, and take the fifth position corresponding to the target component as the constraint position.

[0110] In practice, the scaling operation for the third position of each skeletal point is subject to certain constraints. These constraints limit the scaling operation for each skeletal point of the target object, ensuring that the scaled third positions conform to the actual situation. Specifically, all scaled third positions and their relative relationships must conform to the structure of the target object's human skeletal points. Figure 2 The positional and hierarchical relationships among the 32 skeletal points are shown. Specific constraints are explained below. These constraints can be set based on the influence of gravity on a person, assuming that at least one skeletal point always falls on the target contact surface. The target contact surface refers to the horizontal plane with the lowest height in the third direction of the 3D world coordinate system, such as the ground. It can also be a non-ground surface, such as when the target object is standing on a platform, in which case the target contact surface is the horizontal plane of the platform. The server selects the component closest to or directly on the target contact surface as the target component that satisfies the constraints, and uses the fifth position corresponding to this target component as the constraint position.

[0111] Step 403: Determine the straight line passing through the focal position and the constraint position, and obtain the intersection point where the straight line intersects with the target contact surface of the target object.

[0112] In actual implementation, the server determines the straight line L that passes through the focal position and the constraint position. That is, two points can determine a straight line. The straight line L intersects with the target contact surface to obtain the corresponding intersection point position.

[0113] Step 404: Determine the scaling factor based on the focus position, constraint position, and intersection position.

[0114] In practice, the server determines the scaling factor for scaling the third position based on the focal position, constraint position, and intersection position obtained in the three-dimensional world coordinate system.

[0115] In some embodiments, the server can determine the scaling factor based on the focus position, constraint position, and intersection position in the following manner: the server determines a first modulus between the focus position and the intersection position; determines a second modulus between the constraint position and the intersection position; determines the ratio of the first modulus to the second modulus, and uses the ratio as the scaling factor.

[0116] In actual implementation, the server determines a first vector formed by the focal position and the intersection position. This first vector is located in a three-dimensional world coordinate system, and its magnitude is calculated using a vector magnitude calculation method, serving as the first magnitude. The server also determines a second vector formed by the constraint position and the intersection position. This second vector is also located in a three-dimensional world coordinate system, and its magnitude is calculated, serving as the second magnitude.

[0117] Continuing from the previous example, the constraint position is... (x) p y p , The focus position is F w (x) f y f , z f The intersection point is P cross (x) c y c , z c Determine the focus position F w Intersection position P cross The first vector = (x f -x c y f -y c , z f -z c ), and obtain model As the first module length, determine the constraint position. Intersection position P cross The second vector = (x p -x c y p -y c , z p -z c ), and obtain model As the second module length, the scaling factor α will then be determined. / .

[0118] In actual implementation, after the server determines the scaling factor used to scale the third position, it can determine the product of the scaling factor and the third position of each bone point to realize the scaling operation for the third position of each bone point, and use this product as the fourth position of the bone point in the 3D camera coordinate system. It should be noted that the fourth position is position data with absolute scale.

[0119] In some embodiments, the server via Figure 9 After obtaining the corrected position of the third position using the method shown, the fourth position can also be determined in the following way: the server determines a scaling factor for scaling the corrected position; the corrected position of each bone point is scaled based on the scaling factor to obtain the fourth position of each bone point in the 3D camera coordinate system.

[0120] In practice, the server determines the scaling factor for scaling the correction position by obtaining the scaling factor used for scaling the third position as described above. The correction position is obtained through normalization of the third position. The correction position effectively solves the problem that the third positions projected onto the camera's imaging plane do not perfectly coincide with the second positions in the two-dimensional image coordinate system. The correction position is then scaled using this scaling factor, and the new scaled position is used as the fourth position of each skeleton point in the three-dimensional camera coordinate system.

[0121] In step 104, the fourth position of each bone point is transformed to obtain the target position of each bone point of the target object in the three-dimensional world coordinate system.

[0122] In practice, after obtaining the scaling factor, the server scales the third position or its corresponding modified position to obtain the fourth position. Then, through coordinate transformation, the target positions of each skeletal point of the target object in the 3D world coordinate system are obtained. It should be noted that the target positions here are absolute scale (e.g., in meters) positional information in the 3D world coordinate system. The target positions of each skeletal point can be applied to interactive scenarios between real people and the virtual world in virtual-real fusion. In virtual-real fusion scenarios, real people can interact with virtual scenes in real time. Real people can push, pull, and manipulate virtual objects in the virtual scene, thereby increasing the degree of integration between real people and the virtual scene and improving the realism and coherence of virtual fusion.

[0123] For example, Figures 13A-13C This is an example diagram illustrating the application of the target location in virtual-real fusion provided in the embodiments of this application. Figure 13A Number 1 represents a real person, and number 2 represents a virtual object in the virtual scene. After obtaining the target position of each skeletal point of the real person in the three-dimensional world coordinate system, interactive operations can be performed on the virtual objects, such as... Figure 13A The real person shown in number 1 is holding the virtual object "fan" shown in number 2; Figure 13B The real person "kicking" shown in number 1 and the virtual object "box" shown in number 2; or as... Figure 13C The image shown in number 1 depicts a real person walking on virtual snow in a virtual scene and leaving virtual "footprints" as shown in number 2.

[0124] In some embodiments, see Figure 14 , Figure 14 This is a flowchart of a method for determining a target location provided in an embodiment of this application, based on... Figure 5 Step 104 can be implemented by steps 1041-1042.

[0125] Step 1041: The server obtains the camera pose in the three-dimensional world coordinate system. The camera pose is used to characterize the camera's pose in the three-dimensional world coordinate system.

[0126] In actual implementation, the server obtains the camera pose, which is represented by rotation and translation data from the 3D camera coordinate system to the 3D world coordinate system. The rotation and translation data are represented in the form of matrices.

[0127] Step 1042: Based on the camera pose, perform coordinate system transformation on the fourth position of each bone point to obtain the target position of each bone point in the three-dimensional world coordinate system.

[0128] In practice, the server uses the camera pose to perform a coordinate transformation on the fourth position, obtaining the target position of the skeleton point in the 3D world coordinate system. The matrix corresponding to the camera pose is multiplied by the fourth position to achieve a coordinate transformation for the fourth position, and the resulting product is used as the target position of the skeleton point in the 3D world coordinate system.

[0129] For example, setting the camera pose M c The fourth position of the skeletal point The target location is ,in, .

[0130] By applying the above embodiments of this application, the three-dimensional pose of the target object is predicted by combining the first position of the skeleton point in the three-dimensional human body coordinate system, the second position of the current skeleton point in the two-dimensional image coordinate system, and the camera's intrinsic parameters. This yields the three-dimensional pose of the target object in the three-dimensional camera coordinate system. Then, the first position is transformed using the target object's three-dimensional pose to obtain the third position of the skeleton point in the three-dimensional camera coordinate system. By correcting the third position, a corresponding corrected position is obtained so that the corrected position of the skeleton point in the three-dimensional camera coordinate system can completely coincide with the skeleton point of the target object. Then, a scaling factor is determined based on constraints to scale the third position or the corrected position. Based on the scaling factor, a fourth position in the three-dimensional camera coordinate system corresponding to the third position is obtained. This ensures the correctness of the perspective relationship between the skeleton point positions in the three-dimensional coordinate system and the two-dimensional image coordinate system. Finally, the fourth position is transformed using the obtained camera pose in the three-dimensional world coordinate system to obtain the target position of each skeleton point in the three-dimensional world coordinate system. This allows for the acquisition of skeleton points with high absolute scale accuracy.

[0131] The following will describe an exemplary application of the embodiments of this application in a real-world application scenario.

[0132] In related technologies, pose estimation can output 2D skeletal points on a 2D image that precisely overlap with the human body. To obtain 3D skeletal points in the human coordinate system, projection transformation can be calculated. However, from the camera's perspective, the accuracy of perspective is poor, causing the projected 3D skeletal points to not overlap with the real person. Furthermore, the obtained 3D skeletal points only have relative scales, lacking absolute scales, thus limiting the application scenarios of the skeletal points.

[0133] Based on this, embodiments of this application provide a method for determining the position of human skeletal points, which can quickly calculate the position of human 3D skeletal points in three-dimensional world coordinates.

[0134] The method for determining the position of human skeleton points provided in this application not only obtains 3D human skeleton points that perfectly overlap with real people from the camera's perspective, but also the obtained 3D human skeleton points have absolute scale and can be used in various fields, such as virtual-real fusion.

[0135] The method for determining the location of human skeletal points provided in the embodiments of this application will be described. In actual implementation, Figures 15A-15B This is a flowchart of a method for determining the location of human skeletal points provided in an embodiment of this application. See also... Figure 15A In summary, this method mainly includes the following four steps: Step 501, calculate the 3D human skeleton points in the 3D camera coordinate system with relative scale (i.e., the third position mentioned above); Step 502, correct the 3D human skeleton points in the 3D camera coordinate system with relative scale; Step 503, calculate the scaling factor; Step 504, based on the scaling factor, scale the corrected 3D human skeleton points in the 3D camera coordinate system with relative scale (i.e., the corrected position mentioned above) to obtain the 3D human skeleton points in the 3D camera coordinate system with absolute scale (i.e., the fourth position mentioned above); Step 505, perform coordinate system transformation on the 3D human skeleton points in the 3D camera coordinate system with absolute scale to obtain the 3D human skeleton points in the 3D world coordinate system with absolute scale (i.e., the target position mentioned above). Figure 15B The shown is for implementation Figure 15A The detailed process of steps 501-504 will be discussed next. Figure 15B The following provides a detailed explanation of steps 501-504.

[0136] First, the process of calculating 3D skeleton points with relative scale in the 3D camera coordinate system is explained. See [link to documentation]. Figure 16A , Figure 16AThis is a schematic diagram illustrating the process of coarsely calculating 3D skeletal points at a relative scale, as provided in an embodiment of this application. This process essentially determines the position information of 3D skeletal points in the human coordinate system relative to the position in the 3D camera coordinate system. It is a coarse calculation of 3D skeletal points at a relative scale, obtaining human 3D skeletal points in the 3D camera coordinate system with a relative scale. At this point, the position information of the human 3D skeletal points is initial and coarse, and more refined processing can be performed in subsequent processes. Specifically, the SolvePnP algorithm can be used to calculate 3D skeletal points centered on the human body and projected onto the camera imaging plane. The specific processing steps are as follows: Step 1: Calculate the human pose centered on the camera; whereby this human pose (i.e., the 3D pose of the target object mentioned above) is denoted as M. H .

[0137] 1) Set the camera's internal parameters to I, the 3D human skeleton points in the 3D human coordinate system to P3, and the 2D human skeleton points in the 2D image coordinate system to P2. I is usually represented in matrix form, and the skeleton point data is stored in row-major order.

[0138] 2) The camera intrinsic parameters, the 3D human skeleton point P3 in the 3D human coordinate system, and the 2D human skeleton point P2 in the 2D image coordinate system are used as input parameters and input into the solvepnp algorithm to determine the human pose (Pose) in the 3D camera coordinate system described by the relative scale, denoted as M1.

[0139] 3) Calculate the inverse matrix M of the human body's pose (Pose) M1 in the 3D camera coordinate system. H This allows us to obtain the human pose centered on the camera.

[0140] Step 2: Calculate the relative homogeneous coordinates P of each 3D skeleton point in the 3D camera coordinate system. c Among them, P c = M H P3 The process of correcting 3D skeletal points with relative scale in the 3D camera coordinate system is explained. Because the 3D skeletal points obtained in the 3D camera coordinate system described above do not perfectly coincide with the human body after being projected onto the camera's imaging plane, further refinement, i.e., correction, can be performed on the 3D skeletal points in the 3D camera coordinate system. This process is a refinement of 3D skeletal points with relative scale. See [link to documentation]. Figure 16B , Figure 16B This is a flowchart of the 3D skeleton point refinement process provided in the embodiments of this application. In summary, for each pair of human skeleton points, the following steps are performed: Figure 16BThe processing shown yields refined 3D skeleton points in the 3D camera coordinate system (i.e., the corrected position of each skeleton point in the 3D camera coordinate system mentioned earlier). Each pair of human skeleton points here includes the 2D skeleton point on the camera imaging plane (i.e., the skeleton point in the 2D image coordinate system mentioned earlier), and the 3D skeleton point in the 3D camera coordinate system obtained by the skeleton point in step 1 above. The specific processing steps are as follows: Step 1: Normalize the 2D skeleton points on the camera's imaging plane.

[0141] 1) Let the coordinates of the 2D skeleton point in the two-dimensional image coordinate system be (x2, y2), and the focal length component in the x-axis direction be fx (i.e., the focal length along the x-axis in the figure) and the focal length component in the y-axis direction be fy (i.e., the focal length along the y-axis in the figure).

[0142] 2) Determine the components of the normalized 2D skeleton points on the x-axis as x2 / fx (x-axis coordinates in the figure) and on the y-axis as y2 / fy (y-axis coordinates in the figure).

[0143] Step 2: Based on the normalized 2D skeleton points, determine the corresponding 3D human skeleton points in the 3D camera coordinate system. Among them, the human 3D skeleton points in the refined 3D camera coordinate system can be denoted as (That is, the correction position mentioned above). The specific determination process is as follows: 1) Obtain the distance z from each 3D skeleton point of the human body to the camera focal plane in the 3D camera coordinate system. 2) The coordinates of the 3D skeleton points in the refined 3D camera coordinate system are (x2•z / fx, y2•z / fy, z).

[0144] After obtaining the refined 3D human skeleton points in the 3D camera coordinate system, a scaling factor can be further calculated to scale the refined 3D human skeleton points in the 3D camera coordinate system.

[0145] The calculation method for the scaling factor is explained below. In reality, due to the influence of gravity, it is assumed that at least one skeletal point of the human body is always on the ground. Therefore, the scaling factor can be calculated based on this ground constraint. It should be noted that the calculation of the scaling factor is not limited to the ground constraint method described above; height constraints (i.e., constraints based on the human body's height) can also be used. See [link to documentation]. Figure 16C , Figure 16C This is a flowchart of the scaling factor calculation method provided in the embodiments of this application. The specific processing steps are shown in the following figure: Step 1: Transform the 3D human skeleton points in the 3D camera coordinate system to the 3D world coordinate system to obtain the 3D human skeleton points in the 3D world coordinate system.

[0146] In this context, the 3D skeleton point of the human body in the 3D camera coordinate system is the aforementioned position point (x2•z / fx, y2•z / fy, z), and the 3D skeleton point of the human body in the 3D world coordinate system is denoted as P. w .

[0147] For example, the camera pose in the three-dimensional world coordinate system is set to... Then, through formula P w = Determine P w .

[0148] Step 2: Calculate the scaling factor 1) Traverse all 3D human skeleton points Pw in the 3D world coordinate system and extract the skeleton point with the smallest height along the z-axis in the 3D world coordinate system. Also known as the lowest point of the skeleton (i.e., the constraint position mentioned above), in the default three-dimensional world coordinate system, gravity is along the negative z-axis, and the ground is completely perpendicular to the direction of gravity.

[0149] 2) Let P be the focal position of the camera in three-dimensional world coordinates. f .

[0150] 3) Calculate the two points P mentioned above. f , The intersection point P with the ground z=0 low (i.e., the intersection point mentioned above).

[0151] 4) Determine the scaling factor and the focus position P. f Intersection point P low corresponding vector ,as well as Intersection point P low corresponding vector Determine the scale scaling factor α = | | / | |, where, | | and | | represents the magnitude of the vector.

[0152] This section explains the scaling process for obtaining 3D human skeleton points in a 3D world coordinate system with absolute scale. After obtaining the scaling factor, the 3D human skeleton points in the 3D camera coordinate system are scaled and subjected to coordinate system transformation to obtain the 3D human skeleton points in a 3D world coordinate system with absolute scale (i.e., the target position mentioned earlier). See [link to documentation]. Figure 16D , Figure 16D This is a schematic diagram illustrating the process of scaling to obtain detailed 3D skeletal points at absolute scale according to an embodiment of this application. The specific processing steps are as follows: Step 1: Based on the scaling factor, scale the human 3D skeleton points in the 3D camera coordinate system with relative scale to obtain the human 3D skeleton points in the 3D camera coordinate system with absolute scale.

[0153] For example, the product of the scaling factor α and the human 3D skeleton points in the 3D camera coordinate system with relative scale is determined to obtain the human 3D skeleton points in the 3D camera coordinate system with absolute scale.

[0154] Step 2: Perform coordinate system transformation on the 3D human skeleton points in the 3D camera coordinate system with absolute scale to obtain the 3D human skeleton points in the 3D world coordinate system with absolute scale.

[0155] For example, it can be achieved through The calculation yielded that, These are the 3D skeletal points of the human body in a three-dimensional world coordinate system with absolute scale. The camera pose in the three-dimensional world coordinate system. These are the 3D skeleton points of the human body in a 3D camera coordinate system with absolute scale.

[0156] In practical implementation, 3D skeletal points of the human body in a three-dimensional world coordinate system with absolute scale can be applied to interactive scenarios between real people and the virtual world in virtual-real fusion. In virtual-real fusion scenarios, real people can interact with the virtual world in real time, pushing, pulling, and manipulating virtual objects. Thus, when virtual-real fusion is applied to video production, it can make shooting more intelligent (achieving intelligent human tracking through skeletal animation), and also make video footage richer, more interesting, and more attractive to users. When combined with motion recognition and used in cultural and creative products and interactive games, it can provide users with more novel experiences—real people can manipulate virtual objects, fight monsters, and even emit energy blasts, etc. Figure 13A The real person shown in number 1 is holding the virtual object "fan" shown in number 2; Figure 13B The real person "kicking" shown in number 1 and the virtual object "box" shown in number 2; or as... Figure 13C The image shown in Figure 1 depicts a real person walking on virtual snow in a virtual scene, leaving virtual "footprints" as shown in Figure 2. Furthermore, the 3D skeletal points of the human body in a three-dimensional world coordinate system with absolute scale can be used to drive the virtual avatar, achieving a better fit with the real scene based on correct perspective. Simultaneously, the 3D skeletal points of the human body in a three-dimensional world coordinate system with absolute scale can also be used to measure human proportions, height, etc.

[0157] Applying the above embodiments of this application has the following beneficial effects: 1) High real-time performance: Capable of processing 1080P video at 60FPS or 4K video at 30FPS. 2) Low hardware requirements and high versatility: It can run in real time without a central processing unit (CPU) and achieve the above processing speed using a graphics processing unit (GPU), and is compatible with all platforms (Windows, Linux, and mobile devices). 3) Ensures correct perspective: Compared with other similar algorithms, it can obtain skeletal points with correct perspective from the camera's viewpoint and accurately overlap with real people, ensuring that it can be used in scenarios such as virtual-real fusion.

[0158] 4) High accuracy, capable of obtaining human 3D skeleton points at absolute scale in a three-dimensional world coordinate system: Compared with other human skeleton algorithms that can only obtain relative scale, the embodiments of this application can obtain human 3D skeleton points at absolute scale (e.g., in meters) in a three-dimensional world coordinate system, which can be used in interactive scenarios of real people and virtual worlds in virtual-real fusion.

[0159] It should be noted that in this application embodiment, data related to user attributes is involved. When this application embodiment is applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0160] The following description continues to illustrate the exemplary structure of the human skeletal point location determination device 555 provided in the embodiments of this application as a software module. In some embodiments, such as... Figure 4 As shown, the software module in the human skeletal point position determination device 555 stored in the memory 550 may include: The acquisition module 5551 is used to acquire the first position of each skeletal point of the target object in the three-dimensional human body coordinate system, the second position of each skeletal point in the two-dimensional image coordinate system, and the camera parameters of the camera used to acquire images of the target object. The determining module 5552 is used to determine the third position of each of the skeleton points in the three-dimensional camera coordinate system based on the first position, the second position and the camera parameters; The scaling module 5554 is used to determine a scaling factor for scaling the third position, and to scale the third position of each of the bone points based on the scaling factor to obtain the fourth position of each of the bone points in the three-dimensional camera coordinate system. The conversion module 5553 is used to perform coordinate system transformation on the fourth position of each of the bone points to obtain the target position of each bone point of the target object in the three-dimensional world coordinate system.

[0161] In some embodiments, the determining module is further configured to perform three-dimensional pose prediction on the target object based on the first position, the second position, and the camera parameters to obtain the three-dimensional pose of the target object, wherein the three-dimensional pose is used to characterize the pose of the target object in the three-dimensional camera coordinate system; and based on the three-dimensional pose and the camera parameters, perform coordinate system transformation on the first position of each of the skeleton points to obtain the third position of each of the skeleton points in the three-dimensional camera coordinate system.

[0162] In some embodiments, the determining module is further configured to perform the following processing for each of the third positions of the skeletal points: obtaining the distance from the third position to the focal plane of the camera; normalizing the second position based on the focal length in the camera parameters to obtain a normalized position corresponding to the second position; correcting the third position based on the normalized position and the distance to obtain a corrected position corresponding to the third position; accordingly, The scaling module is further configured to determine a scaling factor for scaling the corrected position; and to scale the corrected position of each of the skeleton points based on the scaling factor to obtain the fourth position of each of the skeleton points in the three-dimensional camera coordinate system.

[0163] In some embodiments, the determining module is further configured to: obtain, in the two-dimensional image coordinate system, a first component of the focal length projection of the camera in a first direction and a second component of the focal length projection in a second direction; wherein the first direction and the second direction are perpendicular to each other; obtain a third component of the second position in the first direction, and normalize the third component based on the first component to obtain a first normalized component; obtain a fourth component of the second position in the second direction, and normalize the fourth component based on the second component to obtain a second normalized component; and determine the normalized position corresponding to the second position based on the first normalized component and the second normalized component.

[0164] In some embodiments, the determining module is further configured to: determine the product of the first normalized component and the distance, and use the product as a first correction component of the third position in the third direction of the three-dimensional camera coordinate system; determine the product of the second normalized component and the distance, and use the product as a second correction component of the third position in the fourth direction of the three-dimensional camera coordinate system; wherein the third direction of the three-dimensional camera coordinate system is parallel to the first direction of the two-dimensional image coordinate system, and the fourth direction of the three-dimensional camera coordinate system is parallel to the second direction of the two-dimensional image coordinate system; and determine the corrected position corresponding to the third position based on the first correction component, the second correction component, and the distance.

[0165] In some embodiments, the scaling module is further configured to obtain the fifth position of the third position in the three-dimensional world coordinate system; obtain the focal position of the camera's focus in the three-dimensional world coordinate system; and determine a scaling factor for scaling the third position based on the fifth position and the focal position.

[0166] In some embodiments, the scaling module is further configured to obtain the camera pose of the camera in the three-dimensional world coordinate system, the camera pose being used to characterize the pose of the camera in the three-dimensional world coordinate system; and based on the camera pose, to perform coordinate system transformation on the third position to obtain the fifth position of the third position in the three-dimensional world coordinate system.

[0167] In some embodiments, the scaling module is further configured to invert the camera pose to obtain an inversion result; and to multiply the inversion result with each of the third positions to obtain the multiplication result as the fifth position of the third position in the three-dimensional world coordinate system.

[0168] In some embodiments, the scaling module is further configured to: obtain the components of each of the fifth positions in the three-dimensional world coordinate system in a third direction; wherein the third direction indicates a direction opposite to the direction of gravity; obtain the constraint conditions when performing a scaling operation on the third position, select a target component that satisfies the constraint conditions from the components, and take the fifth position corresponding to the target component as the constraint position; determine a straight line passing through the focal position and the constraint position, and obtain the intersection point position of the straight line and the target contact surface of the target object; and determine the scaling factor based on the focal position, the constraint position, and the intersection point position.

[0169] In some embodiments, the scaling module is further configured to determine a first modulus between the focal position and the intersection position; determine a second modulus between the constraint position and the intersection position; determine the ratio of the first modulus to the second modulus, and use the ratio as the scaling factor.

[0170] In some embodiments, the conversion module is further configured to obtain the camera pose of the camera in the three-dimensional world coordinate system, the camera pose being used to characterize the pose of the camera in the three-dimensional world coordinate system; and based on the camera pose, to perform coordinate system transformation on the fourth position of each of the skeleton points to obtain the target position of each of the skeleton points in the three-dimensional world coordinate system.

[0171] This application provides a computer program product, including a computer program or computer-executable instructions, stored in a computer-readable storage medium. A processor of an electronic device reads the computer program or computer-executable instructions from the computer-readable storage medium and executes the computer program or computer-executable instructions, causing the electronic device to perform the human skeletal point location determination method described above in this application.

[0172] This application provides a computer-readable storage medium storing computer-executable instructions. When these computer-executable instructions are executed by a processor, they cause the processor to execute the method for determining the position of human skeletal points provided in this application. For example... Figure 5 The method for determining the location of human skeletal points is shown.

[0173] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or it may be a variety of devices including one or any combination of the above-mentioned memories.

[0174] In some embodiments, executable instructions may take the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a standalone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.

[0175] As an example, executable instructions may, but do not necessarily, correspond to files in a file system. They may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a Hyper Text Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple collaborating files (e.g., a file that stores one or more modules, subroutines, or code sections).

[0176] As an example, executable instructions can be deployed to execute on a single electronic device, or on multiple electronic devices located in one location, or on multiple electronic devices distributed across multiple locations and interconnected via a communication network.

[0177] In summary, the embodiments of this application have the following beneficial effects: By combining the first position of the skeleton point in the three-dimensional human body coordinate system, the second position of the current skeleton point in the two-dimensional image coordinate system, and the camera's intrinsic parameters, the three-dimensional pose of the target object is predicted, and the three-dimensional pose of the target object in the three-dimensional camera coordinate system is obtained. Then, the first position is transformed by the three-dimensional pose of the target object to obtain the third position of the skeleton point in the three-dimensional camera coordinate system. By correcting the third position, the corresponding corrected position is obtained so that the corrected position of the skeleton point in the three-dimensional camera coordinate system can completely coincide with the skeleton point of the target object. Then, based on the constraint conditions, the scaling factor used to scale the third position or the corrected position is determined, and based on the scaling factor, the fourth position in the three-dimensional camera coordinate system corresponding to the third position is obtained. In this way, the correctness of the perspective relationship of the skeleton point position from the three-dimensional coordinate system to the two-dimensional image coordinate system can be guaranteed. Finally, by using the camera pose obtained in the three-dimensional world coordinate system, the fourth position is transformed by the coordinate system to obtain the target position of each skeleton point in the three-dimensional world coordinate system. In this way, skeleton points with high accuracy and absolute scale can be obtained.

[0178] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.

Claims

1. A method for determining the location of human skeletal points, characterized in that, The method includes: The first position of each skeletal point of the target object in the three-dimensional human body coordinate system, the second position of each skeletal point in the two-dimensional image coordinate system, and the camera parameters of the camera used to acquire images of the target object are obtained. Based on the first position, the second position, and the camera parameters, determine the third position of each skeleton point in the three-dimensional camera coordinate system; Obtain the fifth position of the third position in the three-dimensional world coordinate system, and obtain the focus position of the camera in the three-dimensional world coordinate system; Obtain the component of each of the fifth positions in the three-dimensional world coordinate system in a third direction; wherein, the third direction is used to indicate the direction opposite to the direction of gravity; Obtain the constraint conditions when performing a scaling operation on the third position, select the target component that satisfies the constraint conditions from each component, and take the fifth position corresponding to the target component as the constraint position; Determine the intersection point of the straight line passing through the focal position and the constraint position with the target contact surface of the target object; wherein, the target contact surface is used to indicate a horizontal plane whose direction is perpendicular to the third direction and whose height is lowest in the third direction; The scaling factor is determined based on the focus position, the constraint position, and the intersection position. Based on the scaling factor, the third position of each of the bone points is scaled to obtain the fourth position of each of the bone points in the three-dimensional camera coordinate system. The fourth position of each of the aforementioned bone points is transformed to obtain the target position of each bone point of the target object in the three-dimensional world coordinate system.

2. The method as described in claim 1, characterized in that, The step of determining the third position of each skeleton point in the three-dimensional camera coordinate system based on the first position, the second position, and the camera parameters includes: Based on the first position, the second position, and the camera parameters, the target object is predicted in three dimensions to obtain the three-dimensional pose of the target object. The three-dimensional pose is used to characterize the pose of the target object in the three-dimensional camera coordinate system. Based on the three-dimensional pose and the camera parameters, the first position of each skeleton point is transformed to obtain the third position of each skeleton point in the three-dimensional camera coordinate system.

3. The method as described in claim 1, characterized in that, After determining the third position of each skeleton point in the three-dimensional camera coordinate system based on the first position, the second position, and the camera parameters, the method further includes: For each of the three positions of the skeleton points, the following processing is performed: the distance from the third position to the focal plane of the camera is obtained; the second position is normalized based on the focal length in the camera parameters to obtain the normalized position corresponding to the second position; the third position is corrected based on the normalized position and the distance to obtain the corrected position corresponding to the third position. The scaling of the third position of each of the skeleton points based on the scaling factor to obtain the fourth position of each of the skeleton points in the three-dimensional camera coordinate system includes: The corrected positions of each of the skeleton points are scaled based on the scaling factor to obtain the fourth position of each of the skeleton points in the three-dimensional camera coordinate system.

4. The method as described in claim 3, characterized in that, The step of normalizing the second position based on the focal length in the camera parameters to obtain the normalized position corresponding to the second position includes: In the two-dimensional image coordinate system, the first component of the focal length projection of the camera in the first direction and the second component of the focal length projection in the second direction are obtained. Wherein, the first direction and the second direction are perpendicular to each other; Obtain the third component of the second position in the first direction, and normalize the third component based on the first component to obtain the first normalized component; Obtain the fourth component of the second position in the second direction, and normalize the fourth component based on the second component to obtain the second normalized component; Based on the first normalized component and the second normalized component, the normalized position corresponding to the second position is determined.

5. The method as described in claim 4, characterized in that, The step of correcting the third position based on the normalized position and the distance to obtain the corrected position corresponding to the third position includes: Determine the product of the first normalized component and the distance, and use the product as the first correction component of the third position in the third direction of the three-dimensional camera coordinate system; Determine the product of the second normalized component and the distance, and use the product as the second correction component of the third position in the fourth direction of the three-dimensional camera coordinate system; Wherein, the third direction of the three-dimensional camera coordinate system is parallel to the first direction of the two-dimensional image coordinate system, and the fourth direction of the three-dimensional camera coordinate system is parallel to the second direction of the two-dimensional image coordinate system; Based on the first correction component, the second correction component, and the distance, the correction position corresponding to the third position is determined.

6. The method as described in claim 1, characterized in that, Obtaining the fifth position of the third position in the three-dimensional world coordinate system includes: The camera pose in the three-dimensional world coordinate system is obtained, and the camera pose is used to characterize the pose of the camera in the three-dimensional world coordinate system. Based on the camera pose, the coordinate system of the third position is transformed to obtain the fifth position of the third position in the three-dimensional world coordinate system.

7. The method as described in claim 6, characterized in that, The step of performing a coordinate system transformation on the third position based on the camera pose to obtain the fifth position of the third position in the three-dimensional world coordinate system includes: The inverse of the camera pose is obtained to get the inverse result; The inverse result is multiplied by each of the third positions to obtain the multiplication result as the fifth position of the third position in the three-dimensional world coordinate system.

8. The method as described in claim 1, characterized in that, Determining the scaling factor based on the focus position, the constraint position, and the intersection position includes: Determine the first modulus between the focal position and the intersection position; Determine the second modulus between the constraint position and the intersection position; Determine the ratio of the first module length to the second module length, and use the ratio as the scaling factor.

9. The method as described in claim 1, characterized in that, The step of performing coordinate system transformation on the fourth position of each of the aforementioned bone points to obtain the target position of each bone point of the target object in the three-dimensional world coordinate system includes: The camera pose in the three-dimensional world coordinate system is obtained, and the camera pose is used to characterize the pose of the camera in the three-dimensional world coordinate system. Based on the camera pose, the fourth position of each of the skeleton points is transformed to obtain the target position of each of the skeleton points in the three-dimensional world coordinate system.

10. A device for determining the position of human skeletal points, characterized in that, The device includes: The acquisition module is used to acquire the first position of each skeletal point of the target object in the three-dimensional human body coordinate system, the second position of each skeletal point in the two-dimensional image coordinate system, and the camera parameters of the camera used to acquire images of the target object. The determination module is used to determine the third position of each of the skeleton points in the three-dimensional camera coordinate system based on the first position, the second position and the camera parameters; A scaling module is used to obtain the fifth position of the third position in a three-dimensional world coordinate system, obtain the focal position of the camera's focus in the three-dimensional world coordinate system; obtain the components of each fifth position in a third direction in the three-dimensional world coordinate system; wherein, the third direction indicates a direction opposite to the direction of gravity; obtain the constraint conditions when performing a scaling operation on the third position, select a target component that satisfies the constraint conditions from each component, and take the fifth position corresponding to the target component as the constraint position; determine the intersection point of the straight line passing through the focal position and the constraint position with the target contact surface of the target object; wherein, the target contact surface indicates a horizontal plane with a direction perpendicular to the third direction and the lowest height in the third direction; determine a scaling factor based on the focal position, the constraint position, and the intersection point; and scale the third position of each skeleton point based on the scaling factor to obtain the fourth position of each skeleton point in the three-dimensional camera coordinate system. The transformation module is used to perform coordinate system transformation on the fourth position of each of the bone points to obtain the target position of each bone point of the target object in the three-dimensional world coordinate system.

11. The apparatus as claimed in claim 10, characterized in that, The determining module is further configured to perform three-dimensional pose prediction on the target object based on the first position, the second position and the camera parameters to obtain the three-dimensional pose of the target object, wherein the three-dimensional pose is used to characterize the pose of the target object in the three-dimensional camera coordinate system; Based on the three-dimensional pose and the camera parameters, the first position of each skeleton point is transformed to obtain the third position of each skeleton point in the three-dimensional camera coordinate system.

12. The apparatus as claimed in claim 10, characterized in that, The determining module is further configured to perform the following processing on the third position of each of the skeleton points: obtain the distance from the third position to the focal plane of the camera; normalize the second position based on the focal length in the camera parameters to obtain the normalized position corresponding to the second position; and correct the third position based on the normalized position and the distance to obtain the corrected position corresponding to the third position. The scaling module is further configured to scale the corrected position of each of the skeleton points based on the scaling factor to obtain the fourth position of each of the skeleton points in the three-dimensional camera coordinate system.

13. The apparatus as claimed in claim 12, characterized in that, The determining module is further configured to obtain, in the two-dimensional image coordinate system, a first component of the focal length projection of the camera in a first direction and a second component of the focal length projection in a second direction. Wherein, the first direction and the second direction are perpendicular to each other; Obtain the third component of the second position in the first direction, and normalize the third component based on the first component to obtain the first normalized component; Obtain the fourth component of the second position in the second direction, and normalize the fourth component based on the second component to obtain the second normalized component; Based on the first normalized component and the second normalized component, the normalized position corresponding to the second position is determined.

14. The apparatus as claimed in claim 13, characterized in that, The determining module is further configured to determine the product of the first normalized component and the distance, and use the product as the first correction component of the third position in the third direction of the three-dimensional camera coordinate system; Determine the product of the second normalized component and the distance, and use the product as the second correction component of the third position in the fourth direction of the three-dimensional camera coordinate system; Wherein, the third direction of the three-dimensional camera coordinate system is parallel to the first direction of the two-dimensional image coordinate system, and the fourth direction of the three-dimensional camera coordinate system is parallel to the second direction of the two-dimensional image coordinate system; Based on the first correction component, the second correction component, and the distance, the correction position corresponding to the third position is determined.

15. The apparatus as claimed in claim 10, characterized in that, The scaling module is also used to obtain the camera pose of the camera in the three-dimensional world coordinate system, and the camera pose is used to characterize the pose of the camera in the three-dimensional world coordinate system; Based on the camera pose, the coordinate system of the third position is transformed to obtain the fifth position of the third position in the three-dimensional world coordinate system.

16. The apparatus as claimed in claim 15, characterized in that, The scaling module is also used to invert the camera pose to obtain the inverse result; The inverse result is multiplied by each of the third positions to obtain the multiplication result as the fifth position of the third position in the three-dimensional world coordinate system.

17. The apparatus as claimed in claim 10, characterized in that, The scaling module is further configured to determine a first modulus between the focal position and the intersection position; Determine the second modulus between the constraint position and the intersection position; Determine the ratio of the first module length to the second module length, and use the ratio as the scaling factor.

18. The apparatus as claimed in claim 10, characterized in that, The conversion module is also used to obtain the camera pose of the camera in the three-dimensional world coordinate system, and the camera pose is used to characterize the pose of the camera in the three-dimensional world coordinate system; Based on the camera pose, a coordinate system transformation is performed on the fourth position of each of the skeleton points to obtain the target position of each of the skeleton points in the three-dimensional world coordinate system.

19. An electronic device, characterized in that, include: Memory, used to store executable instructions; A processor, when executing executable instructions stored in the memory, implements the method for determining the position of human skeletal points as described in any one of claims 1 to 9.

20. A computer-readable storage medium storing computer-executable instructions, characterized in that, When the computer-executable instructions are executed by the processor, they implement the method for determining the position of human skeletal points as described in any one of claims 1 to 9.

21. A computer program product, comprising a computer program or computer-executable instructions, characterized in that, When the computer program or computer-executable instructions are executed by the processor, the method for determining the position of human skeletal points as described in any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • Method for mapping human skeleton points to virtual three-dimensional space points in three-dimensional display

    CN103543830A

  • Monocular camera object pose estimation method and system based on key points, equipment and storage medium

    CN113724330A