3D data acquisition method, device and electronic equipment
By obtaining and converting the 3D key point coordinate information of the data acquisition object, and generating the target bone vector, the problem of inefficient acquisition of 3D data is solved and the efficient acquisition of rich 3D data is achieved.
Patent Information
- Application Number
- CN202111547657.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-16
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2041-12-16
AI Technical Summary
3D data acquisition is inefficient and small in quantity, making it difficult to meet the needs of high-performance data acquisition equipment.
By obtaining multiple 3D key points and coordinate information of the data acquisition object, the initial bone vector is determined, and the coordinate conversion process is performed to generate the target bone vector, and multiple sets of target bone vectors are used to generate bone assembly data and rotation data.
The efficiency and quantity of 3D data acquisition are improved, and diversified data acquisition of data acquisition objects under different poses is realized.
Smart Images

Figure CN114187343B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the fields of data generation, 3D and posture estimation, and in particular to a 3D data acquisition method, device and electronic equipment. Background Art
[0002] With the development of science and technology, the application of 3D technology is becoming more and more extensive. In the application of 3D technology, it is often necessary to generate a large amount of 3D data for the data acquisition object, so as to improve the 3D effect of the data acquisition object.
[0003] However, collecting 3D data requires high performance of the data acquisition equipment, and obtaining 3D data by acquiring images of the data acquisition object in different postures is inefficient, and the amount of 3D data that can be obtained is small. Summary of the Invention
[0004] The purpose of the embodiments of the present application is to provide a 3D data acquisition method, device, and electronic device to solve the problem of low efficiency and small amount of 3D data acquisition.
[0005] To solve the above technical problems, the embodiments of the present application are implemented as follows:
[0006] In a first aspect, an embodiment of the present application provides a 3D data acquisition method, comprising:
[0007] Acquire multiple 3D key points of the data acquisition object and multiple sets of key point coordinate information of the data acquisition object;
[0008] Each set of key point coordinate information includes the coordinate information of each 3D key point of the data acquisition object at the same time point;
[0009] For each set of key point coordinate information, determine a set of initial bone vectors of the corresponding data acquisition object;
[0010] Perform coordinate transformation on each set of initial bone vectors to obtain a corresponding set of target bone vectors;
[0011] According to the obtained multiple groups of target bone vectors, bone assembly data and bone rotation data of the data acquisition object are generated.
[0012] In a second aspect, an embodiment of the present application provides a 3D data acquisition device, comprising:
[0013] A processor is used to obtain multiple 3D key points of a data acquisition object and multiple groups of key point coordinate information of the data acquisition object; each group of key point coordinate information includes the coordinate information of each 3D key point of the data acquisition object at the same time point; for each group of key point coordinate information, a group of initial bone vectors of the corresponding data acquisition object is determined; coordinate transformation processing is performed on each group of initial bone vectors to obtain a corresponding group of target bone vectors; and based on the obtained multiple groups of target bone vectors, bone assembly data and bone rotation data of the data acquisition object are generated.
[0014] In a third aspect, an embodiment of the present application provides an electronic device comprising: a processor, and a memory electrically connected to the processor, wherein the memory stores a computer program, and the processor is configured to retrieve and execute the computer program from the memory to implement the steps of the above-mentioned 3D data acquisition method.
[0015] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned 3D data acquisition method are implemented.
[0016] In an embodiment of the present application, a 3D data acquisition method includes: acquiring multiple 3D key points of a data acquisition object and multiple sets of key point coordinate information of the data acquisition object; each set of key point coordinate information includes the coordinate information of each 3D key point of the data acquisition object at the same time point; for each set of key point coordinate information, determining a set of initial bone vectors of the corresponding data acquisition object; performing coordinate transformation processing on each set of initial bone vectors to obtain a corresponding set of target bone vectors; and generating bone assembly data and bone rotation data of the data acquisition object based on the obtained multiple sets of target bone vectors. The embodiment of the present application uses coordinate transformation processing to enable multiple bone vectors of the data acquisition object to perform operations such as movement, assembly, and rotation, thereby obtaining a large amount of 3D data of the data acquisition object in different postures using multiple sets of key point coordinate information with a relatively small amount of data. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments recorded in this application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0018] Figure 1 A flowchart of a 3D data acquisition method provided in an embodiment of this specification;
[0019] Figure 2AA schematic diagram of a first set of target bone vectors and a second set of target bone vectors to be assembled in a 3D data acquisition method provided in an embodiment of this specification;
[0020] Figure 2B A first schematic diagram of a set of skeleton assembly vectors provided in an embodiment of this specification;
[0021] Figure 2C A second schematic diagram of a set of skeleton assembly vectors provided in an embodiment of this specification;
[0022] Figure 3 A schematic flow chart of another 3D data acquisition method provided in an embodiment of this specification;
[0023] Figure 4 A schematic diagram of the module composition of a 3D data acquisition device provided in an embodiment of this specification;
[0024] Figure 5 This is a schematic diagram of the composition of an electronic device provided in an embodiment of this specification. DETAILED DESCRIPTION
[0025] In order to enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.
[0026] Figure 1 A flowchart of a 3D data acquisition method is provided for one or more embodiments of this specification. The method may specifically include the following steps:
[0027] Step 102 : Acquire multiple 3D key points of the data acquisition object and multiple groups of key point coordinate information of the data acquisition object; each group of key point coordinate information includes coordinate information of each 3D key point of the data acquisition object at the same time point.
[0028] The data collection object can be a human body, an animal, or other moving objects.
[0029] To obtain multiple 3D key points of the data acquisition object, in specific implementation, a camera can be used to perform a shooting operation, and an algorithm model of 3D posture key points can be used to detect multiple 3D key points of the data acquisition object from a frame of image obtained by shooting, and the number and coordinate information of the 3D key points can be manually corrected.
[0030] In one embodiment, after step 102 is executed, any set of key point coordinate information obtained can be modified using annotation tools based on user operations to make the values of multiple sets of key point coordinate information obtained more accurate. The modification method can be to modify the coordinate information of any 3D key point, add 3D key points, or reduce 3D key points, etc.
[0031] Acquiring multiple 3D key points of the data acquisition object can be implemented by equipping the data acquisition object with a wearable device to obtain multiple 3D key points.
[0032] Acquiring multiple 3D key points of the data acquisition object can be implemented by performing a shooting operation through a camera with a depth information acquisition function, and using an algorithm model of 2D posture key points to detect multiple 2D key points of the data acquisition object from a frame of image obtained by shooting, and then combining the depth information obtained when the camera with a depth information acquisition function shoots the image to convert the 2D key points into 3D key points.
[0033] Cameras with depth information acquisition capabilities include but are not limited to binocular cameras, RGBD depth cameras, and laser cameras.
[0034] In one embodiment, the camera with depth information acquisition function can also be calibrated. Calibration of the camera refers to obtaining the intrinsic parameters of the camera. The intrinsic parameters include but are not limited to the camera focal length, camera offset, and camera distortion parameters.
[0035] The number of 3D key points can be 17 or a preset number. The embodiment of the present application does not impose any special restrictions on the number of 3D key points.
[0036] Acquiring multiple 3D key points of a data acquisition object and multiple sets of key point coordinate information of the data acquisition object. In a specific implementation, a shooting operation can be performed through a camera with a depth information acquisition function to obtain a segment of video data including multiple frames of images. In the multiple frames of images included in the video data, multiple 3D key points of the data acquisition object can be detected in each frame of the image, and each 3D key point can be located to obtain the coordinate information of each 3D key point.
[0037] The coordinate information of the 3D key point may be coordinate information in a camera coordinate system, and the coordinate information of the 3D key point may be coordinate information in a Cartesian coordinate system. For example, the coordinate information of the 3D key point P is (x1, y1, z1).
[0038] For example, when the data collection object is a human body, the designated person being filmed by the camera can adopt a variety of preset postures during filming, such as with both hands raised, hands on hips, or standing on one leg. Each frame of the video data corresponds to a posture of the designated person being filmed. In the video data, if the interval between the time points corresponding to two frames of image is less than a preset time interval threshold, the posture of the designated person in the two frames of image can be considered to be the same.
[0039] Among the multiple sets of key point coordinate information of the data acquisition object, each set of key point coordinate information includes the coordinate information of each 3D key point of the data acquisition object at the same time point, that is, each set of key point coordinate information includes the coordinate information of each 3D key point of the data acquisition object in a frame image corresponding to the set of key point coordinate information in the video data.
[0040] For example, the human body is the target of data collection. The 3D key points of a person may include, but are not limited to, the neck, head, left shoulder, left elbow, right shoulder, right elbow, left hip, left knee, left foot, right hip, right knee, and right foot. A set of key point coordinates for a person's neck, head, left shoulder, and right foot can be the coordinates of the person's neck, head, left shoulder, and right foot in the camera coordinate system at the same point in time.
[0041] Step 104: For each set of key point coordinate information, determine a set of initial bone vectors of the corresponding data acquisition object.
[0042] A set of initial bone vectors of the data acquisition object may be multiple bone vectors of the data acquisition object in the camera coordinate system at the same time point, and the multiple bone vectors in the set of initial bone vectors are determined by a set of corresponding key point coordinate information.
[0043] Optionally, for each set of key point coordinate information, a set of initial skeleton vectors of the corresponding data acquisition object is determined, including: determining a parent node set and a child node set among multiple 3D key points of the data acquisition object; determining multiple main trunk vectors and multiple sub-trunk vectors of the data acquisition object based on the parent node set, the child node set and the coordinate information of each 3D key point in each set of key point coordinate information, as a set of initial skeleton vectors of the data acquisition object corresponding to each set of key point coordinate information; each main trunk vector is associated with at least one sub-trunk vector.
[0044] Among the multiple 3D key points of the data acquisition object, a parent node set and a child node set are determined.
[0045] Taking the human body as an example, nine torsos can be defined based on the body's multiple 3D key points. Each torso consists of a parent node and a child node, with the parent node pointing to the child node. Each torso corresponds to a bone vector, which can be calculated using the coordinate information of the parent node and the child node.
[0046] The 9 torsos are:
[0047] (1) Neck -> Head
[0048] (2)Left shoulder—>Left elbow
[0049] (3) Left elbow—>Left wrist
[0050] (4) Right shoulder -> right elbow
[0051] (5) Right elbow—>right wrist
[0052] (6) Left hip -> left knee
[0053] (7) Left knee -> left foot
[0054] (8) Right hip -> right knee
[0055] (9) Right knee -> right foot
[0056] Among them, the left elbow can be both a child node in the torso "left shoulder -> left elbow" and a parent node in the torso "left elbow -> left wrist". The right elbow, left knee, and right knee are similar to the left elbow and are not mentioned here.
[0057] The parent node set can be: neck, left shoulder, left elbow, right shoulder, right elbow, left hip, left knee, right hip, right knee; the child node set can be: head, left elbow, left wrist, right elbow, right wrist, left knee, left foot, right knee, right foot.
[0058] Among the 9 torsos, a main torso and a sub-torso can be defined. The main torso can include "left shoulder -> left elbow", "right shoulder -> right elbow", "left hip -> left knee" and "right hip -> right knee"; the sub-torso can include "left elbow -> left wrist", "right elbow -> right wrist", "left knee -> left foot", "right knee -> right foot" and "neck -> head".
[0059] Among them, the main trunk's "left shoulder -> left elbow" can be associated with the sub-torso's "left elbow -> left wrist"; the main trunk's "right shoulder -> right elbow" can be associated with the sub-torso's "right elbow -> right wrist"; the main trunk's "left hip -> left knee" can be associated with the sub-torso's "left knee -> left foot"; the main trunk's "right hip -> right knee" can be associated with the sub-torso's "right knee -> right foot".
[0060] When a sub-trunk changes, it will not affect the associated main trunk, but when the main trunk changes, it will definitely cause the associated sub-trunk to change.
[0061] Based on the parent node set, child node set and the coordinate information of each 3D key point in each set of key point coordinate information, the coordinate information of each parent node and each child node of the data acquisition object at the same time point can be determined. For example, the coordinate information of the left shoulder of the parent node is (x2, y2, z2), and the coordinate information of the left elbow of the child node is (x3, y3, z3). Then, based on the coordinate information of the parent node and the corresponding child node, the bone vector corresponding to the torso formed by the parent node pointing to the child node can be determined. For example, the bone vector corresponding to the torso "left shoulder -> left elbow" is (x3-x2, y3-y2, z3-z2).
[0062] If the torso is the main torso, the corresponding bone vector is the main torso vector; if the torso is the sub-torso, the corresponding bone vector is the sub-torso vector.
[0063] Based on the parent node set, child node set and the coordinate information of each 3D key point in each set of key point coordinate information, multiple main trunk vectors and multiple sub-trunk vectors of the data acquisition object at the same time point can be determined as a set of initial bone vectors of the data acquisition object corresponding to each set of key point coordinate information.
[0064] Step 106: Perform coordinate transformation on each set of initial bone vectors to obtain a corresponding set of target bone vectors.
[0065] The target bone vector may be a bone vector in a local coordinate system, and the target bone vector may be a bone vector in a spherical coordinate system.
[0066] The initial bone vector is converted from the Cartesian coordinate system under the camera coordinate system to the target bone vector in the spherical coordinate system under the local coordinate system, which requires two coordinate conversion processes.
[0067] A set of target bone vectors can be multiple bone vectors of the spherical coordinate system of the data acquisition object at the same time point in the local coordinate system. Each set of target bone vectors is obtained by coordinate transformation from a set of initial bone vectors, so each set of initial bone vectors corresponds to a set of target bone vectors.
[0068] Taking the human body as an example, using the local coordinate system, we can perform operations such as limb movement, splicing, and rotation based on the relative positions of the human joints. If we use the camera coordinate system, it will be difficult to achieve these operations.
[0069] Optionally, the initial bone vectors include bone vectors in a camera coordinate system; coordinate transformation processing is performed on each group of initial bone vectors to obtain a corresponding set of target bone vectors, including: constructing at least one local coordinate system according to the data acquisition object; converting each bone vector in each group of initial bone vectors from the camera coordinate system to the local coordinate system; normalizing each bone vector to obtain the azimuth and polar angle of the bone vector in a spherical coordinate system with a radius of a preset value; counting the azimuth and polar angle of each bone vector to obtain a set of target bone vectors of the data acquisition object corresponding to each group of initial bone vectors.
[0070] The initial bone vector includes the bone vector in the camera coordinate system.
[0071] At least one local coordinate system is constructed based on the data acquisition object. Taking the data acquisition object as a human body as an example, a local coordinate system for the upper body and a local coordinate system for the lower body can be constructed. After the local coordinate system for the upper body and the local coordinate system for the lower body are constructed, the bone vectors in each set of initial bone vectors corresponding to the upper body of the human body can be converted from the camera coordinate system to the local coordinate system of the upper body, and the bone vectors in each set of initial bone vectors corresponding to the lower body of the human body can be converted from the camera coordinate system to the local coordinate system of the lower body.
[0072] The local coordinate system of the upper body can be:
[0073] A1 vector: left shoulder to right shoulder;
[0074] B1 vector: hip to neck (or spine to neck, can be adjusted based on the actual position of 3D key points);
[0075] C1 vector: the vector product of A1 vector and B1 vector.
[0076] The local coordinate system of the upper body is then orthogonalized by Schmidt orthogonalization.
[0077] Schmidt orthogonalization is a method for finding an orthogonal basis in Euclidean space. Starting from any linearly independent set of vectors α1, α2, …, αm in Euclidean space, one can find the orthogonal set of vectors β1, β2, …, βm, making α1, α2, …, αm equivalent to the set of vectors β1, β2, …, βm. By normalizing each vector in the orthogonal set, one obtains a standard orthogonal set of vectors.
[0078] After obtaining the orthogonalized local coordinate system (A1, B1, C1), the bone vectors in the camera coordinate system that need to be converted are converted to the bone vectors in the local coordinate system of the upper body. The conversion formula is:
[0079] The bone vector in the local coordinate system = the transpose of (A1, B1, C1) multiplied by the bone vector in the camera coordinate system.
[0080] Similar to the local coordinate system of the upper body, the local coordinate system of the lower body can be:
[0081] A2 vector: left hip to right hip;
[0082] B2 vector: hip to neck (or spine to neck, can be adjusted based on the actual position of 3D key points);
[0083] C2 vector: the vector product of A2 vector and B2 vector.
[0084] The local coordinate system of the lower body is then orthogonalized by Schmidt orthogonalization.
[0085] After obtaining the orthogonalized local coordinate system (A1, B1, C1), the bone vectors in the camera coordinate system that need to be converted are converted to the bone vectors in the local coordinate system of the lower body. The conversion formula is similar to that of converting the bone vectors in the camera coordinate system to the bone vectors in the local coordinate system of the upper body, so it will not be repeated here.
[0086] Normalizing each bone vector means that when the bone vector in the local coordinate system is converted from the Cartesian coordinate system to the spherical coordinate system, the spherical radius of the spherical coordinate system can be set to a preset value, which can be 1.
[0087] In a spherical coordinate system, the azimuth angle is the angle between the projection of the line from the origin to point P on the xy plane and the positive x-axis; the polar angle is the angle between the line from the origin to point P and the positive z-axis. Assuming the radius of the spherical coordinate system is 1, a unique bone vector can be determined in the spherical coordinate system using a set of azimuth and polar angles.
[0088] The conversion relationship between the spherical coordinate system and the Cartesian coordinate system can be referred to as follows:
[0089] Spherical coordinate system The conversion relationship with the rectangular coordinate system (x, y, z) is:
[0090]
[0091]
[0092] z=rcosθ (a3)
[0093] On the contrary, the rectangular coordinate system (x, y, z) and the spherical coordinate system The conversion relationship is:
[0094]
[0095] θ=arccos(z / r)(a5)
[0096]
[0097] Each bone vector can be normalized by formulas (a4)-(a6) to obtain the azimuth and polar angle of the bone vector in a spherical coordinate system with a radius of a preset value.
[0098] Taking the human body as an example, the spherical coordinate system can express the length and angle of the bone vectors formed between the human joints, but the Cartesian coordinate system cannot express the length and angle of the bone vectors.
[0099] By calculating the azimuth and polar angle of each skeletal vector, a set of target skeletal vectors corresponding to each set of initial skeletal vectors can be obtained for the data acquisition subject at the same time point. In practice, the azimuth and polar angle of each skeletal vector can be stored in historical data to determine the maximum range of motion that the data acquisition subject can make.
[0100] It should be noted that at a point in time, the posture of the data acquisition object is fixed, so the azimuth angle and polar angle of each bone vector of the data acquisition object are also unique.
[0101] Step 108: Generate skeleton assembly data and skeleton rotation data of the data acquisition object according to the obtained multiple groups of target skeleton vectors.
[0102] Skeleton assembly data can be obtained by splicing and assembling the skeleton vectors of the same data acquisition object in different postures. Skeleton rotation data can be obtained by changing the azimuth and polar angle of at least one skeleton vector of the data acquisition object.
[0103] Optionally, based on the obtained multiple groups of target bone vectors, skeletal assembly data of the data acquisition object is generated, including: determining multiple pairs of first and second target bone vectors to be assembled in the obtained multiple groups of target bone vectors; determining at least one first bone vector in the first group of target bone vectors; determining a second bone vector corresponding to the first bone vector in the second group of target bone vectors; at least one first bone vector includes a target bone vector corresponding to a sub-trunk vector, or a main trunk vector and a target bone vector corresponding to a sub-trunk vector associated with the main trunk vector; in the first group of target bone vectors, the first bone vector is replaced by the second bone vector to obtain a group of bone assembly vectors; and the obtained multiple groups of bone assembly vectors are statistically analyzed to obtain the skeletal assembly data of the data acquisition object.
[0104] Figure 2A A schematic diagram of a first set of target bone vectors and a second set of target bone vectors to be assembled in a 3D data acquisition method provided in an embodiment of this specification; Figure 2B A first schematic diagram of a set of skeleton assembly vectors provided in an embodiment of this specification; Figure 2C This is a second schematic diagram of a set of skeleton assembly vectors provided in the embodiment of this specification; Figure 2A 、 Figure 2B as well as Figure 2C Together, it explains how to obtain the skeletal assembly data of the data collection object.
[0105] Among the multiple sets of target bone vectors obtained, multiple first set of target bone vectors and second set of target bone vectors to be assembled can be determined. Figure 2A , Figure 2A In the figure, the position information and connection relationship of each 3D key point in the first set of target bone vectors are shown to the left of “+”, and the position information and connection relationship of each 3D key point in the second set of target bone vectors are shown to the right of “+”.
[0106] In one embodiment, the corresponding sub-torso of the same data acquisition object can be interchanged. At least one first bone vector is determined in the first set of target bone vectors, such as Figure 2A As shown, at least one first bone vector can be a target bone vector corresponding to a sub-torso vector, such as target bone vector 201, and the second bone vector corresponding to the target bone vector 201 determined in the second group of target bone vectors can be a target bone vector corresponding to a sub-torso vector, such as target bone vector 203.
[0107] The position of the target bone vector 201 in the first set of target bone vectors is the same as the position of the target bone vector 203 in the second set of target bone vectors. Figure 2B As shown, in the first set of target bone vectors, the target bone vector 201 can be replaced by the target bone vector 203 to obtain a set of bone assembly vectors.
[0108] In another embodiment, the trunk set formed by the main trunk and the sub-torso corresponding to the same person can be interchanged. Figure 2AAs shown, at least one first bone vector can be a target bone vector corresponding to a main trunk vector and a sub-trunk vector associated with the main trunk vector, such as a vector set 202 of target bone vectors, and the second bone vector corresponding to the vector set 202 of target bone vectors determined in the second group of target bone vectors can be a target bone vector corresponding to a main trunk vector and a sub-trunk vector associated with the main trunk vector, such as a vector set 204 of target bone vectors.
[0109] The position of the vector set 202 of target bone vectors in the first set of target bone vectors is the same as the position of the vector set 204 of target bone vectors in the second set of target bone vectors. Figure 2C As shown, in the first set of target bone vectors, the vector set 202 of the target bone vectors can be replaced by the vector set 204 of the target bone vectors to obtain a set of bone assembly vectors.
[0110] The multiple groups of bone assembly vectors obtained by statistics are used as the bone assembly data of the data collection object.
[0111] For example, a person being captured by a camera can assume a variety of preset poses, such as with both hands raised or facing downward. However, this person never poses with one hand raised and the other facing downward. By generating skeletal assembly data for the subject, the limbs of the person in these different poses can be pieced together to produce skeletal assembly data for a scene with one hand raised and the other facing downward. This enriches the subject's pose information and yields more 3D data.
[0112] Optionally, obtaining multiple sets of key point coordinate information of the data acquisition object includes: obtaining multiple sets of key point coordinate information of the data acquisition object through video data including multiple frames of images; each set of key point coordinate information corresponds to one frame of image; determining multiple pairs of first and second target bone vectors to be assembled from the multiple sets of target bone vectors obtained, including: determining multiple pairs of first and second images according to a preset time interval in the multiple frames of images included in the video data; for each pair of first and second images, determining a set of target bone vectors corresponding to the first image and a set of target bone vectors corresponding to the second image from the multiple sets of target bone vectors obtained as a pair of first and second target bone vectors to be assembled.
[0113] Acquiring multiple sets of key point coordinate information for a data acquisition object may involve acquiring multiple sets of key point coordinate information for the data acquisition object from video data comprising multiple frames of images, wherein each set of key point coordinate information corresponds to a frame of image. For example, a depth camera may be used to capture a one-minute video of a designated person, where the designated person changes their posture every three seconds during the recording. After removing duplicate image frames, the one-minute video may include multiple frames of imagery, with the number of frames exceeding 20, and a set of key point coordinate information may be acquired from each frame of imagery.
[0114] Among the multiple groups of target bone vectors obtained, determining multiple pairs of first and second groups of target bone vectors to be assembled can be to use two groups of target bone vectors with large posture differences of the data acquisition objects as a pair of first and second groups of target bone vectors to be assembled.
[0115] In specific implementation, multiple pairs of first images and second images can be determined from the multiple frames of images included in the video data according to a preset time interval. For example, a 1-minute video of a designated person is shot by a depth camera, and the preset time interval can be 30 seconds. Then, a frame image corresponding to 10 seconds can be used as the first image, and a frame image corresponding to 40 seconds can be used as the second image; a frame image corresponding to 20 seconds can be used as the first image, and a frame image corresponding to 50 seconds can be used as the second image.
[0116] Among the multiple groups of target bone vectors obtained, a group of key point coordinate information corresponding to the first image can be determined, and then based on the group of key point coordinate information corresponding to the first image, a group of target bone vectors of the data acquisition object corresponding to the group of key point coordinate information can be determined, and this group of target bone vectors can be used as the first group of target bone vectors.
[0117] Among the multiple groups of target bone vectors obtained, a group of key point coordinate information corresponding to the second image can be determined, and then based on the group of key point coordinate information corresponding to the second image, a group of target bone vectors of the data acquisition object corresponding to the group of key point coordinate information can be determined, and this group of target bone vectors can be used as the second group of target bone vectors.
[0118] Optionally, based on the obtained multiple sets of target bone vectors, bone rotation data of the data acquisition object is generated, including: determining a first numerical range interval of the azimuth angle of each bone vector and a second numerical range interval of the polar angle of each bone vector based on the azimuth angle and polar angle of each bone vector in the obtained multiple sets of target bone vectors; for each bone vector, rotating the bone vector by taking a value according to a first preset interval in the first numerical range interval, and / or taking a value according to a second preset interval in the second numerical range interval to generate the rotation data of the bone vector; and counting the rotation data of each bone vector to obtain the bone rotation data of the data acquisition object.
[0119] During specific implementation, can read the azimuth and polar angle of each skeleton vector stored in step 106 from historical data, i.e. the azimuth and polar angle of each skeleton vector in the multiple groups of target skeleton vectors that obtain in step 106.According to the azimuth of each skeleton vector that reads, can determine the maximum and minimum of each skeleton vector, thereby determine the first numerical range interval of the azimuth of each skeleton vector.When the azimuth of skeleton vector is positioned at the first numerical range interval, the rotation of skeleton vector is reasonable, and the data acquisition object can actually make corresponding posture.When the azimuth of skeleton vector is positioned at outside the first numerical range interval, the rotation of skeleton vector may have exceeded the action limit of data acquisition object, so in the process generating skeleton rotation data, can traverse each azimuth in the historical data, also can take value to azimuth in the first numerical range interval according to the first preset interval, to obtain reasonable skeleton rotation data.
[0120] Similarly, a second numerical range of the polar angle of each bone vector can be determined. Furthermore, in the process of generating bone rotation data, each polar angle in the historical data can be traversed, or the polar angle can be evaluated within the second numerical range at a second preset interval to obtain reasonable bone rotation data.
[0121] The first preset interval can be 5 degrees or other values, and the second preset interval can be 5 degrees or other values. The first preset interval and the second preset interval can be the same or different.
[0122] For each bone vector, in the process of generating the rotation data of the bone vector, the bone vector can be rotated only by taking values according to the first preset interval within the first numerical range to generate the rotation data of the bone vector; the bone vector can be rotated only by taking values according to the second preset interval within the second numerical range to generate the rotation data of the bone vector; the bone vector can also be rotated by taking values according to the first preset interval within the first numerical range and by taking values according to the second preset interval within the second numerical range to generate the rotation data of the bone vector.
[0123] Optionally, each group of target bone vectors includes target bone vectors of multiple main trunk vector objects and target bone vectors corresponding to multiple sub-trunk vectors; each main trunk vector is associated with at least one sub-trunk vector; in the case where the bone vector is a target bone vector corresponding to the main trunk vector, the rotation data of the target bone vector corresponding to the sub-trunk vector associated with the main trunk vector is determined according to the values of the azimuth and polar angle of the bone vector and the values of the azimuth and polar angle of the target bone vector corresponding to the sub-trunk vector associated with the main trunk vector.
[0124] It should be noted that, when the bone vector to be rotated is the target bone vector corresponding to the sub-torso vector, the rotation data of the bone vector is only based on the values of the azimuth and polar angle of the bone vector; when the bone vector to be rotated is the target bone vector corresponding to the main torso vector, the rotation data of the target bone vector corresponding to the sub-torso vector associated with the main torso vector is determined according to the values of the azimuth and polar angle of the bone vector and the values of the azimuth and polar angle of the target bone vector corresponding to the sub-torso vector associated with the main torso vector.
[0125] Rotating the target bone vector corresponding to the main trunk vector will cause the target bone vector corresponding to the associated sub-torso vector to rotate as well. Therefore, when the bone vector to be rotated is the target bone vector corresponding to the main trunk vector, it is necessary to simultaneously take values for the target bone vector corresponding to the main trunk vector and the target bone vector corresponding to the associated sub-torso vector.
[0126] After step 108, the acquired skeletal assembly data and skeletal rotation data of the data acquisition subject may be converted from the spherical coordinate system to the Cartesian coordinate system. The conversion formulas may refer to the aforementioned formulas (a1)-(a3). After the acquired skeletal assembly data and skeletal rotation data of the data acquisition subject are converted from the spherical coordinate system to the Cartesian coordinate system, the acquired data may be converted from the local coordinate system to the camera coordinate system.
[0127] Converting data from the local coordinate system to the camera coordinate system can refer to the aforementioned process of converting data from the camera coordinate system to the local coordinate system. The difference is that after obtaining the orthogonalized local coordinate system, the bone vector in the local coordinate system is multiplied by the orthogonalized local coordinate system to obtain the bone vector in the camera coordinate system.
[0128] After the skeleton assembly data and skeleton rotation data of the data acquisition object in the camera coordinate system are obtained, they can be used as 3D data of the data acquisition object and stored.
[0129] After acquiring the 3D data of the data acquisition object and storing it as a 3D dataset, a corresponding 2D dataset can be generated based on the stored 3D dataset. In specific implementation, the 3D data in the camera coordinate system can be converted into 2D data in the world coordinate system based on the camera imaging principle.
[0130] For example, it is known that the coordinate information of a point in the 3D data in the camera coordinate system is (X c , Y c , Z c ), the correspondence between the camera coordinate system and the image coordinate system can refer to the following formula (a7):
[0131]
[0132] Among them, f x , f y is the focal length of the camera, c x and c y is the camera offset, γ is the distortion parameter of the camera, (u′, v′, w′) is the distance between a point (X c , Y c , Z c ) The 3D coordinate information in the world coordinate system is obtained by converting from the camera coordinate system to the world coordinate system.
[0133] The camera internal parameters such as camera focal length, camera offset, camera distortion parameters, etc. can be the internal parameters of the depth camera obtained through the aforementioned depth camera calibration step.
[0134] Then, the point (X c , Y c , Z c ) corresponding to the 2D coordinate information (u, v), where
[0135]
[0136]
[0137] The 3D data of the data acquisition object can be used for dynamic display of posture, for example, by reconstructing the data acquisition object with mesh assistance, so as to dynamically display various postures of the data acquisition object; the corresponding 2D data set can also be generated based on the stored 3D data set, so as to establish a 2D and 3D data set pair, which can be used to train a 3D posture network; the 3D posture data set of the data acquisition object can also be constructed based on the 3D data of the data acquisition object, and the data set includes 3D data in which each bone vector is within the bone extension limit range of the data acquisition object. Then, the 3D posture data set of the data acquisition object can be used to determine whether any 3D posture data is valid, that is, whether the 3D posture data exceeds the bone extension limit range of the data acquisition object, and so on.
[0138] In such Figure 1In the illustrated method embodiment, the 3D data acquisition method includes: acquiring multiple 3D key points of a data acquisition object and multiple sets of key point coordinate information of the data acquisition object; each set of key point coordinate information includes coordinate information of each 3D key point of the data acquisition object at the same time point; for each set of key point coordinate information, determining a set of initial bone vectors of the corresponding data acquisition object; performing coordinate transformation processing on each set of initial bone vectors to obtain a corresponding set of target bone vectors; and generating bone assembly data and bone rotation data of the data acquisition object based on the obtained multiple sets of target bone vectors. The embodiment of the present application uses coordinate transformation processing to enable multiple bone vectors of the data acquisition object to perform operations such as movement, assembly, and rotation, thereby obtaining a large amount of 3D data of the data acquisition object in different postures using multiple sets of key point coordinate information with a relatively small amount of data.
[0139] Based on the same technical concept, one or more embodiments of this specification further provide a 3D data acquisition method, in which the data acquisition object may be a human body. Figure 3 A flow chart of another 3D data acquisition method provided in an embodiment of this specification is shown as follows: Figure 3 As shown, the method includes:
[0140] Step 302: depth camera calibration.
[0141] Step 304: Acquire 3D key points of the human body.
[0142] Step 306: Split the nine limbs of the human body into the upper and lower body, and establish local coordinate systems for each.
[0143] Step 308: Convert the bone vectors in the local coordinate system to the spherical coordinate system.
[0144] Step 310: Generate 3D data of human limb splicing and 3D data of human posture rotation.
[0145] After step 310 is executed, the generated 3D data of the human body can also be used to realize the application of various 3D data. For example, the 3D data of the spliced human limbs and the 3D data of the human body posture rotation are used to reconstruct the human body mesh, so as to dynamically display various postures of the human body. For another example, the 3D data of the human body are used to construct a data set of human body posture, and the data set includes 3D data in which each bone vector is within the extension limit of the human skeleton. Then, through the data set of human body posture, it can be determined whether any 3D posture data is valid, that is, whether the 3D posture data exceeds the extension limit of the human skeleton. For another example, corresponding 2D data can also be generated based on the 3D data of the human body, so as to construct a 2D and 3D data set pair, which can be used to train a 3D posture network.
[0146] The application of 3D data is not limited to the above examples, and the embodiments of this application will not list them one by one.
[0147] In addition, for Figure 3 As for the embodiment of the 3D data acquisition method shown in FIG. Figure 1 The 3D data acquisition method embodiments shown are basically similar, so the description is relatively simple. For related details, see Figure 1 The partial description of the embodiment of the 3D data acquisition method shown is sufficient.
[0148] Based on the same technical concept, one or more embodiments of this specification further provide a 3D data acquisition device. Figure 4 A schematic diagram of the module composition of a 3D data acquisition device provided in an embodiment of the present application is shown as follows: Figure 4 As shown, the device includes:
[0149] Processor 401 is used to obtain multiple 3D key points of the data acquisition object and multiple groups of key point coordinate information of the data acquisition object; each group of key point coordinate information includes the coordinate information of each 3D key point of the data acquisition object at the same time point; for each group of key point coordinate information, a group of initial bone vectors of the corresponding data acquisition object is determined; coordinate transformation processing is performed on each group of initial bone vectors to obtain a corresponding group of target bone vectors; and based on the obtained multiple groups of target bone vectors, bone assembly data and bone rotation data of the data acquisition object are generated.
[0150] Optionally, the initial bone vector includes a bone vector in a camera coordinate system; the processor 401 is further configured to:
[0151] Perform coordinate transformation on each set of initial bone vectors to obtain a corresponding set of target bone vectors, including:
[0152] Construct at least one local coordinate system according to the data collection object;
[0153] Convert each bone vector in each set of initial bone vectors from the camera coordinate system to the local coordinate system;
[0154] Normalize each bone vector to obtain the azimuth and polar angle of the bone vector in a spherical coordinate system with a preset radius;
[0155] The azimuth angle and polar angle of each bone vector are counted to obtain a group of target bone vectors of the data acquisition object corresponding to each group of initial bone vectors.
[0156] Optionally, the processor 401 is further configured to:
[0157] For each set of key point coordinate information, determine a set of initial bone vectors of the corresponding data acquisition object, including:
[0158] Determine a parent node set and a child node set among multiple 3D key points of the data acquisition object;
[0159] Based on the parent node set, the child node set and the coordinate information of each 3D key point in each set of key point coordinate information, multiple main trunk vectors and multiple sub-trunk vectors of the data acquisition object are determined as a set of initial bone vectors of the data acquisition object corresponding to each set of key point coordinate information; each main trunk vector is associated with at least one sub-trunk vector.
[0160] Optionally, the processor 401 is further configured to:
[0161] Based on the obtained multiple sets of target bone vectors, the bone assembly data of the data acquisition object is generated, including:
[0162] Determine a first group of target bone vectors and a second group of target bone vectors to be assembled from the obtained multiple groups of target bone vectors;
[0163] Determine at least one first bone vector in the first group of target bone vectors; determine a second bone vector corresponding to the first bone vector in the second group of target bone vectors; the at least one first bone vector includes a target bone vector corresponding to a sub-torso vector, or a main trunk vector and a target bone vector corresponding to a sub-torso vector associated with the main trunk vector;
[0164] In the first set of target bone vectors, the first bone vector is replaced by the second bone vector to obtain a set of bone assembly vectors;
[0165] The multiple groups of skeleton assembly vectors obtained are statistically analyzed to obtain the skeleton assembly data of the data collection object.
[0166] Optionally, the processor 401 is further configured to:
[0167] Based on the obtained multiple sets of target bone vectors, bone rotation data of the data acquisition object is generated, including:
[0168] Determine a first numerical range of the azimuth angle of each bone vector and a second numerical range of the polar angle of each bone vector according to the azimuth angle and polar angle of each bone vector in the obtained multiple groups of target bone vectors;
[0169] For each bone vector, rotating the bone vector by taking a value within a first numerical range according to a first preset interval and / or taking a value within a second numerical range according to a second preset interval to generate rotation data of the bone vector;
[0170] The rotation data of each bone vector is counted to obtain the bone rotation data of the data collection object.
[0171] Optionally, each group of target bone vectors includes target bone vectors of multiple main trunk vector objects and target bone vectors corresponding to multiple sub-trunk vectors; each main trunk vector is associated with at least one sub-trunk vector;
[0172] In the case where the bone vector is the target bone vector corresponding to the main trunk vector, the rotation data of the target bone vector corresponding to the sub-torso vector associated with the main trunk vector is determined according to the values of the azimuth and polar angle of the bone vector and the values of the azimuth and polar angle of the target bone vector corresponding to the sub-torso vector associated with the main trunk vector.
[0173] Optionally, the processor 401 is further configured to:
[0174] Obtain multiple sets of key point coordinate information of the data collection object, including:
[0175] Acquire multiple sets of key point coordinate information of a data acquisition object through video data including multiple frames of images; each set of key point coordinate information corresponds to one frame of image;
[0176] Determining a plurality of first and second target bone vectors to be assembled from the obtained plurality of target bone vectors includes:
[0177] Determining, from a plurality of frames of images included in the video data, a plurality of pairs of first images and second images according to a preset time interval;
[0178] For each pair of first and second images, among the multiple sets of target bone vectors obtained, a set of target bone vectors corresponding to the first image and a set of target bone vectors corresponding to the second image are determined as a pair of first and second sets of target bone vectors to be assembled.
[0179] The 3D data acquisition device provided by the embodiment of the present application and the 3D data acquisition method include: acquiring multiple 3D key points of the data acquisition object and multiple sets of key point coordinate information of the data acquisition object; each set of key point coordinate information includes the coordinate information of each 3D key point of the data acquisition object at the same time point; for each set of key point coordinate information, determining a set of initial bone vectors of the corresponding data acquisition object; performing coordinate transformation processing on each set of initial bone vectors to obtain a corresponding set of target bone vectors; and generating bone assembly data and bone rotation data of the data acquisition object based on the obtained multiple sets of target bone vectors. The embodiment of the present application uses coordinate transformation processing to enable multiple bone vectors of the data acquisition object to perform operations such as movement, assembly, and rotation, thereby obtaining a large amount of 3D data of the data acquisition object in different postures using multiple sets of key point coordinate information with a relatively small amount of data.
[0180] In addition, the above-mentioned embodiment of the 3D data acquisition device is generally similar to the embodiment of the 3D data acquisition method, so the description is relatively simple. For relevant details, please refer to the description of the embodiment of the 3D data acquisition method. Furthermore, it should be noted that the various components of the 3D data acquisition device of the present invention are logically divided according to their intended functions. However, the present invention is not limited thereto, and the various components may be re-divided or re-combined as needed.
[0181] Based on the same technical concept, the embodiment of the present application also provides an electronic device, such as Figure 5 shown. Figure 5 This is a schematic diagram of the structure of an electronic device provided in one embodiment of the present invention. Figure 5 , the electronic device includes a processor, an internal bus, a network interface, a memory and a non-volatile memory, and of course may also include hardware required for other services. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming a 3D data acquisition device at the logical level. Of course, in addition to software implementation, this application does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0182] The network interface, processor, and memory can be connected to each other through a bus system. The bus can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or one type of bus.
[0183] The memory is used to store programs. Specifically, the program may include program code, which includes computer operating instructions. The memory may include read-only memory and random access memory, and provides instructions and data to the processor. The memory may include high-speed random access memory (RAM) and may also include non-volatile memory (non-volatile memory), such as at least one disk storage device.
[0184] The processor is used to execute the program stored in the memory and specifically perform the following:
[0185] Acquire multiple 3D key points of the data acquisition object and multiple sets of key point coordinate information of the data acquisition object;
[0186] Each set of key point coordinate information includes the coordinate information of each 3D key point of the data acquisition object at the same time point;
[0187] For each set of key point coordinate information, determine a set of initial bone vectors of the corresponding data acquisition object;
[0188] Perform coordinate transformation on each set of initial bone vectors to obtain a corresponding set of target bone vectors;
[0189] According to the obtained multiple groups of target bone vectors, bone assembly data and bone rotation data of the data acquisition object are generated.
[0190] The above application Figure 3 The 3D data acquisition method performed by the 3D data acquisition device disclosed in the illustrated embodiment can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by hardware integrated logic circuits in the processor or software instructions. The above processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be an audio processing device (digital signal processor, DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The various methods, steps, and logic block diagrams disclosed in the embodiments of this application can be implemented or executed. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the 3D data acquisition method disclosed in the embodiments of this application can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium well-known in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. The storage medium is located in the memory, and the processor reads the information in the memory and, in conjunction with its hardware, completes the steps of the above-described 3D data acquisition method.
[0191] Based on the same technical concept, an embodiment of the present application also provides a computer-readable storage medium, which stores one or more programs. When the one or more programs are executed by an electronic device including multiple application programs, the electronic device executes the 3D data acquisition method provided by the aforementioned method embodiment.
[0192] The various embodiments in this specification are described in a progressive manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the system embodiments are generally similar to the method embodiments, so the description is relatively simple. For relevant parts, refer to the description of the method embodiments.
[0193] The foregoing description of this specification describes specific embodiments. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0194] It will be understood by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0195] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0196] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0197] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0198] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0199] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0200] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0201] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0202] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0203] The foregoing is merely an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.
Claims
1. A 3D data acquisition method, characterized in that: include: Acquire multiple 3D key points of a data acquisition object and multiple sets of key point coordinate information of the data acquisition object; Each set of key point coordinate information includes coordinate information of each 3D key point of the data acquisition object at the same time point; For each set of key point coordinate information, determining a set of initial bone vectors of the corresponding data acquisition object; Performing coordinate transformation processing on each group of the initial bone vectors to obtain a corresponding group of target bone vectors; generating skeleton assembly data and skeleton rotation data of the data acquisition object according to the obtained multiple sets of target skeleton vectors; The skeleton assembly data is obtained by splicing and assembling the skeleton vectors of the data acquisition object in different postures, and the skeleton rotation data is obtained by changing the azimuth angle and / or polar angle of at least one skeleton vector of the data acquisition object.
2. The method according to claim 1, characterized in that The initial bone vectors include bone vectors in a camera coordinate system; performing coordinate transformation processing on each group of the initial bone vectors to obtain a corresponding group of target bone vectors includes: Constructing at least one local coordinate system according to the data acquisition object; Convert each bone vector in each set of the initial bone vectors from the camera coordinate system to the local coordinate system; Normalizing each of the bone vectors to obtain the azimuth and polar angle of the bone vector in a spherical coordinate system with a radius of a preset value; The azimuth angle and polar angle of each of the bone vectors are counted to obtain a group of target bone vectors of the data acquisition object corresponding to each group of the initial bone vectors.
3. The method according to claim 1, characterized in that The step of determining a set of initial bone vectors of the corresponding data acquisition object for each set of key point coordinate information includes: Determining a parent node set and a child node set among the plurality of 3D key points of the data acquisition object; Based on the parent node set, the child node set and the coordinate information of each 3D key point in each group of key point coordinate information, multiple main trunk vectors and multiple sub-trunk vectors of the data acquisition object are determined as a group of initial bone vectors of the data acquisition object corresponding to each group of key point coordinate information; each main trunk vector is associated with at least one sub-trunk vector.
4. The method according to claim 3, characterized in that Generating the skeleton assembly data of the data acquisition object according to the obtained multiple groups of target skeleton vectors includes: Determine a plurality of first and second target bone vectors to be assembled from the obtained plurality of target bone vectors; Determine at least one first bone vector in the first group of target bone vectors; determine a second bone vector corresponding to the first bone vector in the second group of target bone vectors; the at least one first bone vector includes a target bone vector corresponding to the sub-torso vector, or a target bone vector corresponding to the main torso vector and a sub-torso vector associated with the main torso vector; In the first group of target bone vectors, the first bone vector is replaced by the second bone vector to obtain a group of bone assembly vectors; The multiple groups of skeleton assembly vectors obtained are statistically analyzed to obtain the skeleton assembly data of the data collection object.
5. The method according to claim 2, characterized in that Generating the bone rotation data of the data acquisition object according to the obtained multiple groups of target bone vectors includes: Determine a first numerical range of the azimuth angle of each bone vector and a second numerical range of the polar angle of each bone vector according to the azimuth angle and polar angle of each bone vector in the obtained multiple groups of target bone vectors; For each of the bone vectors, rotating the bone vector by taking a value within the first numerical range according to a first preset interval and / or taking a value within the second numerical range according to a second preset interval, thereby generating rotation data of the bone vector; The rotation data of each bone vector is counted to obtain the bone rotation data of the data acquisition object.
6. The method according to claim 5, characterized in that Each group of target bone vectors includes target bone vectors of multiple main trunk vector objects and target bone vectors corresponding to multiple sub-trunk vectors; each main trunk vector is associated with at least one sub-trunk vector; In the case where the bone vector is the target bone vector corresponding to the main trunk vector, the rotation data of the target bone vector corresponding to the sub-trunk vector associated with the main trunk vector is determined according to the values of the azimuth and polar angle of the bone vector and the values of the azimuth and polar angle of the target bone vector corresponding to the sub-trunk vector associated with the main trunk vector.
7. The method according to claim 4, characterized in that Acquiring multiple sets of key point coordinate information of the data acquisition object, including: Acquire multiple sets of key point coordinate information of the data acquisition object through video data including multiple frames of images, wherein each set of key point coordinate information corresponds to one frame of image; Determining a plurality of first and second target bone vectors to be assembled from the obtained plurality of target bone vectors comprises: Determining, from the plurality of frames of images included in the video data, a plurality of pairs of first images and second images according to a preset time interval; For each pair of the first image and the second image, among the multiple groups of target bone vectors obtained, a group of target bone vectors corresponding to the first image and a group of target bone vectors corresponding to the second image are determined as a pair of first group of target bone vectors and second group of target bone vectors to be assembled.
8. A 3D data acquisition device, characterized in that: include: A processor, configured to obtain a plurality of 3D key points of a data acquisition object and a plurality of sets of key point coordinate information of the data acquisition object; Each set of key point coordinate information includes coordinate information of each 3D key point of the data acquisition object at the same time point; for each set of key point coordinate information, determining a set of initial bone vectors of the corresponding data acquisition object; Performing coordinate transformation processing on each group of the initial bone vectors to obtain a corresponding group of target bone vectors; generating bone assembly data and bone rotation data of the data acquisition object based on the obtained multiple groups of target bone vectors; The skeleton assembly data is obtained by splicing and assembling the skeleton vectors of the data acquisition object in different postures, and the skeleton rotation data is obtained by changing the azimuth angle and / or polar angle of at least one skeleton vector of the data acquisition object.
9. An electronic device, characterized in that: include: A processor, a memory electrically connected to the processor; the memory stores a computer program, and the processor is used to call and execute the computer program from the memory to perform the steps of the 3D data acquisition method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the 3D data acquisition method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Skeleton driving method and device for three-dimensional model
CN113628307A