WO2023005341A1 - 一种姿态估计方法、装置、设备及介质 - Google Patents

一种姿态估计方法、装置、设备及介质 Download PDF

Info

Publication number
WO2023005341A1
WO2023005341A1 PCT/CN2022/092160 CN2022092160W WO2023005341A1 WO 2023005341 A1 WO2023005341 A1 WO 2023005341A1 CN 2022092160 W CN2022092160 W CN 2022092160W WO 2023005341 A1 WO2023005341 A1 WO 2023005341A1
Authority
WO
WIPO (PCT)
Prior art keywords
pose
target
component
translation
rotation
Prior art date
Application number
PCT/CN2022/092160
Other languages
English (en)
French (fr)
Inventor
朱泳明
罗宇轩
林高杰
Original Assignee
北京字跳网络技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京字跳网络技术有限公司 filed Critical 北京字跳网络技术有限公司
Publication of WO2023005341A1 publication Critical patent/WO2023005341A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/60Rotation of whole images or parts thereof

Definitions

  • the present disclosure relates to the technical field of data processing, and in particular to a pose estimation method, device, equipment and medium.
  • attitude estimation technology With the development of computer technology, the application scenarios of attitude estimation technology are becoming more and more extensive, such as virtual try-on based on attitude estimation, driving some virtual materials to fit and other application scenarios.
  • the current attitude estimation method will cause a certain amount of jitter, and the application effect generated according to the attitude estimation is poor in followability and has a certain floating feeling.
  • the present disclosure provides a pose estimation method, device, equipment and medium.
  • an embodiment of the present disclosure provides a pose estimation method, the method comprising:
  • timing information multiple frames of continuous reference images before and after the target image in timing are obtained
  • a third pose estimate of the target object in the target image is generated according to the target rotation pose component and the target translation pose component.
  • the obtaining the first pose estimation of the target object in each frame of the reference image, and the second pose estimation of the target object in the target image includes:
  • each of the first transformation matrices respectively extract the translation of the target object on the horizontal axis, the vertical axis and the vertical axis, obtain the translation posture components of each of the first transformation matrices, and perform the transformation on the second transformation matrix Extract the translation of the target object on the horizontal axis, the vertical axis and the vertical axis, and obtain the translation posture component of the second transformation matrix.
  • the processing is performed on at least one rotational attitude component of the first attitude estimation and the rotational attitude component of the second attitude estimation according to a preset rotational smoothing algorithm to generate a target rotational attitude component, include:
  • it also includes:
  • a minimum value between the third result and a preset second coefficient is taken as the rotation smoothing coefficient.
  • each of the translation pose components of the first pose estimation and the translation pose components of the second pose estimation is processed according to a preset translation smoothing algorithm to generate a target translation pose component, include:
  • a target translation gesture component corresponding to the time point information of the target image is extracted from the translation motion trajectory.
  • it also includes:
  • the translation coefficient is determined according to image frame numbers of the reference image and the target image.
  • the generating the third pose estimation of the target object in the target image according to the target rotation pose component and the target translation pose component includes:
  • an embodiment of the present disclosure provides a pose estimation device, the device comprising:
  • the first acquisition module is used to acquire multiple frames of continuous reference images in time series before and after the target image according to the time series information
  • a second acquiring module configured to acquire a first pose estimate of the target object in each frame of the reference image, and a second pose estimate of the target object in the target image;
  • a first generating module configured to process at least one rotational pose component of the first pose estimate and a rotated pose component of the second pose estimate according to a preset rotational smoothing algorithm, to generate a target rotational pose component;
  • the second generating module is configured to process each translation pose component of the first pose estimation and the translation pose component of the second pose estimation according to a preset translation smoothing algorithm, to generate a target translation pose component;
  • the present disclosure provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the instructions are run on a terminal device, the terminal device is made to implement the above method.
  • the present disclosure provides an electronic device, which includes: a processor; a memory for storing instructions executable by the processor; the above executable instructions, and execute the instructions to implement the above method.
  • the present disclosure provides a computer program product, where the computer program product includes a computer program/instruction, and when the computer program/instruction is executed by a processor, the above method is implemented.
  • the attitude estimation method provided by the embodiments of the present disclosure adopts different smoothing strategies according to the different properties of translation and rotation, and uses the rotation smoothing algorithm to process the rotation attitude components of the first attitude estimation and the second attitude estimation, which can obtain more accurate and accurate Stable target rotation attitude component; using the translation smoothing algorithm to process the translation attitude components of the first attitude estimation and the second attitude estimation, a more accurate and stable target translation attitude component can be obtained, thus, according to the target rotation attitude component and the target translation
  • the third pose estimation generated by the pose component has good stability and followability, which avoids the floating feeling and improves the user experience and satisfaction.
  • FIG. 1 is a schematic flowchart of a pose estimation method provided by an embodiment of the present disclosure
  • FIG. 2 is a schematic flowchart of another attitude estimation method provided by an embodiment of the present disclosure
  • Fig. 3a is a schematic diagram of a previous frame of a target image of a pose estimation method provided by an embodiment of the present disclosure
  • Fig. 3b is a schematic diagram of a target image of a pose estimation method provided by an embodiment of the present disclosure
  • FIG. 3c is a schematic diagram of a target image of another pose estimation method provided by an embodiment of the present disclosure.
  • Fig. 4a is a schematic diagram of the previous frame of the target image of another pose estimation method provided by an embodiment of the present disclosure
  • Fig. 4b is a schematic diagram of a target image of another pose estimation method provided by an embodiment of the present disclosure.
  • FIG. 4c is a schematic diagram of a target image of another pose estimation method provided by an embodiment of the present disclosure.
  • FIG. 5 is a schematic structural diagram of an attitude estimation device provided by an embodiment of the present disclosure.
  • FIG. 6 is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure.
  • the term “comprise” and its variations are open-ended, ie “including but not limited to”.
  • the term “based on” is “based at least in part on”.
  • the term “one embodiment” means “at least one embodiment”; the term “another embodiment” means “at least one further embodiment”; the term “some embodiments” means “at least some embodiments.” Relevant definitions of other terms will be given in the description below.
  • an embodiment of the present disclosure provides a pose estimation method, which will be introduced in conjunction with specific embodiments below.
  • FIG. 1 is a schematic flowchart of a pose estimation method provided by an embodiment of the present disclosure.
  • the method can be executed by a pose estimation device, where the device can be implemented by software and/or hardware, and generally can be integrated into an electronic device. As shown in Figure 1, the method includes:
  • Step 101 acquire the sequential reference images of multiple frames before and after the target image in timing
  • Step 102 obtaining a first pose estimate of the target object in each frame of the reference image, and a second pose estimate of the target object in the target image.
  • Target object perform pose estimation on the target object in the captured video, and perform related applications according to the estimated pose.
  • the target object is a human foot
  • virtual try-on of shoes is performed according to the posture estimation of the foot
  • various special effects are added according to the posture estimation of the hand. Therefore, in order to reduce the jitter of pose estimation and improve the stability and followability of the application effect, it is necessary to estimate the pose of the target object more accurately.
  • the target object can be selected according to the application scenario, which is not limited in this embodiment.
  • a video is composed of multiple frames of continuous images, and timing information can be used to record the sequential relationship between the multiple frames of images. Understandably, it is usually necessary to perform pose estimation on the target object in each frame of image in the video, and the target image may be an image currently undergoing pose estimation.
  • the pose estimation of the target object in each reference image is performed respectively, so as to obtain the first pose estimation of the target object in each frame of the reference image.
  • pose estimation is performed on the target object in the target image, and a second pose estimation of the target object in the target image is obtained.
  • the first pose estimation and the second pose estimation are obtained through the neural network model.
  • Step 103 Process at least one rotation pose component of the first pose estimation and the rotation pose component of the second pose estimation according to a preset rotation smoothing algorithm to generate a target rotation pose component.
  • Step 104 Process each translation pose component of the first pose estimation and each translation pose component of the second pose estimation according to a preset translation smoothing algorithm to generate a target translation pose component.
  • the attitude estimation represents a change process of the target object moving from an initial position to the current position. Therefore, the attitude estimation can be processed from the dimension of the motion direction to obtain the translational attitude component and the rotational attitude component. Specifically, after performing component processing on the first attitude estimate, the rotation attitude component and translation attitude component corresponding to the first attitude estimation are obtained; after performing component processing on the second attitude estimation, the rotation attitude component and translation attitude component corresponding to the second attitude estimation are obtained Attitude weight. It should be noted that, according to the specific expression form of the attitude estimation, a corresponding algorithm may be selected to perform component processing on the attitude estimation to obtain the translation attitude component and the rotation attitude component, which is not limited in this embodiment.
  • the first pose estimation of the target object has a large difference in the translation pose component and the rotation pose component. components are processed.
  • the second pose estimation of the target object has a large difference between the translation pose component and the rotation pose component, that is, the noise performance of the translation pose component and the rotation pose component is different. Therefore, corresponding different algorithms can be used to estimate the second pose
  • the translation pose component and the rotation pose component are processed. Specifically, a preset rotation smoothing algorithm can be used to smooth the rotation pose components of the first pose estimate and the second pose estimate, and a preset translation smoothing algorithm can be used to smooth the translation pose components of the first pose estimate and the second pose estimate. for smoothing.
  • the rotation smoothing algorithm includes, but is not limited to: any one of a linear interpolation algorithm and a spherical linear interpolation algorithm.
  • the rotation component of the first pose estimation and the rotation component of the second pose estimation are performed.
  • the target rotation pose component is obtained, and the target rotation pose component is a component in the rotation direction of the pose estimation of the target object in the target image.
  • the number of reference images and the position of the reference images in time series are determined according to the rotation smoothing algorithm.
  • the spherical linear interpolation algorithm is usually a reference to the target image and its previous frame Therefore, when the spherical linear interpolation algorithm is selected as the rotation smoothing algorithm, when the 100th frame of the video is the target image, the rotation pose component of the pose estimation in the reference image of the 99th frame is selected for smoothing.
  • the translational smoothing algorithm includes but is not limited to: any one of the least squares method and the nonlinear least squares method.
  • the translation component of the first pose estimation and the translation component of the second pose estimation The components are processed to obtain the target translation pose component, which is the component of the target object's pose estimation in the target image in the translation direction.
  • the number of reference images and the position of the reference images in time series are determined according to the translation smoothing algorithm.
  • Step 105 generating a third pose estimate of the target object in the target image according to the target rotation pose component and the target translation pose component.
  • the target rotation pose component is the component of the target object’s pose estimation in the target image in the direction of rotation
  • the target translation pose component is the component of the target object’s pose estimation in the target image in the translation direction.
  • the pose component and the target translation pose component generate a third pose estimate of the target object in the target image. It should be noted that a corresponding algorithm may be selected according to the specific expression forms of the target rotation pose component and the target translation pose component to perform synthesis processing to generate the third pose estimate.
  • the attitude estimation method provided by the embodiments of the present disclosure, firstly, according to the timing information, consecutive multiple frames of reference images before and after the target image are obtained, and the first pose estimation of the target object in the reference image and the first pose estimation of the target object in the target image are obtained.
  • Two Pose Estimation Furthermore, by using the rotation smoothing algorithm to process the rotation attitude components of the first attitude estimation and the second attitude estimation, a more accurate and stable target rotation attitude component can be obtained; using the translation smoothing algorithm to process the first attitude estimation and the second attitude estimation The translational attitude component is processed to obtain a more accurate and stable target translational attitude component. Thus, a third pose estimate is generated based on the target rotation pose component and the target translation pose component.
  • the rotation component and translation component of the multi-frame attitude estimation related to time series are smoothed by the corresponding smoothing algorithm respectively, and the final attitude estimation generated after smoothing has good stability and followability, avoiding the generation of floating feeling, and improving user experience and satisfaction.
  • Fig. 2 is a schematic flowchart of another attitude estimation method provided by the embodiment of the present disclosure. Based on the above embodiment, as shown in Fig. 2, the specific steps include:
  • Step 201 obtain the sequential reference images of multiple frames before and after the target image in timing, obtain the first transformation matrix corresponding to the target position of the target object from the preset initial position to the target position in each frame of the reference image, and convert the first transformation matrix
  • the matrix is determined as the first pose estimation of the target object in each frame of the reference image
  • the second transformation matrix of the target object from the initial position to the target position in the target image is obtained
  • the second transformation matrix is determined as the target object in the target image Second pose estimation.
  • the reference image is a multi-frame continuous image before and after the target image.
  • the reference image can be selected according to the application scenario. This embodiment is not limited.
  • the reference image in the case where the 100th frame of the video is the target image: the reference image can be a video Frames 98, 99, 101, 102 of .
  • the initial position can be preset, and the initial position is set according to the application scenario, which is not limited in this embodiment, for example: the initial position is the target object in the previous frame image of the first frame reference image in time sequence s position.
  • the first transformation matrix to represent the transformation of the target object from the initial position to the target position of the target object in the current reference image
  • the second transformation matrix to represent the transformation of the target object from The transformation from the initial position to the target position in the target image.
  • the initial positions of the first transformation matrix and the second transformation matrix are the same, so as to ensure that the algorithm results between images are consistent.
  • the transformation matrix is obtained by concatenating the translation matrix representing translation behind the rotation matrix representing rotation, where the rotation matrix is a 3 ⁇ 3 matrix, the translation matrix is a 3 ⁇ 1 matrix, and the rotation The matrix and the translation matrix are concatenated to obtain a matrix whose transformation matrix is 3 ⁇ 4. Therefore, both the first transformation matrix and the second transformation matrix in this embodiment can be represented by a 3 ⁇ 4 matrix.
  • the target object is a human foot
  • the preset initial position is the foot in the 97th frame image
  • the first transformation matrix of the target object from the initial position to the target position in the reference image of the 98th, 99th, 101st, and 102nd frames
  • the target object from the initial position to the target image of the 100th frame.
  • the second transformation matrix for the target position.
  • both the first transformation matrix and the second transformation matrix can be calculated to obtain the corresponding translation attitude component and the rotation attitude component represented by the quaternion. It should be noted that the specific values of the transformation matrix of the target object in each frame of image are not exactly the same.
  • a 3 ⁇ 4 transformation matrix M is used as an example described as follows.
  • transformation matrix M Take the transformation matrix M as an example to illustrate how to obtain the rotation attitude component and the translation attitude component according to the transformation matrix, where the transformation matrix M is expressed as:
  • each first transformation matrix For each first transformation matrix, extract the translation of the target object on the horizontal axis, vertical axis and vertical axis respectively, obtain the translation posture component of each first transformation matrix, and extract the translation of the target object in the second transformation matrix
  • the translation on the horizontal axis, the vertical axis and the vertical axis obtains the translation attitude component of the second transformation matrix
  • the transformation matrix M represents the first transformation matrix or the second transformation matrix.
  • [a 14 ; a 24 ; a 34 ] represents translation
  • the value of the translation attitude component V is:
  • V [a 14 a 24 a 34 ]
  • the quaternion can solve the gimbal deadlock problem. Therefore, in order to convert the rotation matrix into a quaternion, at least one first transformation matrix is performed according to the association algorithm represented by the preset quaternion and the rotation matrix.
  • tr() represents the trace of the calculation matrix
  • M :3,:3 represents the matrix composed of the first 3 rows and the first 3 columns of the transformation matrix M.
  • the transformation matrix M can represent the first transformation matrix corresponding to each frame of the reference image, and the second transformation matrix corresponding to the target image, but the specific values in the matrix are different; the rotation of the first transformation matrix and the second transformation matrix
  • the splitting process of the attitude component and the translation attitude component is the same as that of the transformation matrix M, but the specific values in the matrix are different, and will not be described in this embodiment. Therefore, the first transformation matrix component can be processed into the corresponding rotation attitude component and translation attitude component according to the above embodiment; the second transformation matrix component can be processed into the corresponding rotation attitude component and translation attitude component according to the above implementation manner.
  • Step 202 Obtain the rotation pose component of the target object in the first transformation matrix of the reference image frame before the target image, and obtain the rotation pose component of the target object in the second transformation matrix of the target image.
  • Step 203 process the rotation attitude component of the first transformation matrix of the previous frame reference image, the rotation attitude component of the second transformation matrix of the target image, and the preset rotation smoothing coefficient according to the preset spherical linear interpolation algorithm, Generate target rotation pose components.
  • the linear interpolation algorithm processes the rotation attitude component of the first transformation matrix of the previous frame reference image, the rotation attitude component of the second transformation matrix of the target image, and the preset rotation smoothing coefficient to generate the target rotation attitude component.
  • the smoothing of the rotation pose component only select the rotation pose component of the target object transformation matrix in the 99th frame and the 100th frame
  • the rotation pose component of the target object transformation matrix in is involved in the smoothing of the rotation pose.
  • the specific smoothing process of the rotation attitude component is described as follows: the spherical linear interpolation algorithm is used to perform smooth interpolation on the two rotation attitude components, and the spherical linear interpolation algorithm is used to process the rotation attitude component, which can ensure that the interpolation is linear and obtain a comparative Stabilizes the target rotation pose component, which can also be smoothed proportionally to the angle according to the weights.
  • the spherical linear difference algorithm can ensure that the modulus length of the processed quaternion is 1, so that the target rotation attitude component obtained by processing can still represent
  • the rotation movement ensures the stability and accuracy of the third pose estimation, making the visual effect of the special effect obtained by applying the pose estimation obtained by the method more realistic.
  • the spherical interpolation algorithm is expressed as slerp(), and the rotation attitude component Q t-1 of the first transformation matrix M 1 of the previous frame reference image and the second transformation of the target image are transformed using the spherical interpolation algorithm slerp()
  • the rotation attitude component Q t of the matrix M 2 and the preset rotation smoothing coefficient ⁇ are processed to generate the target rotation attitude component Q', namely:
  • Q t-1 [w t-1 ,x t-1 ,y t-1 ,z t-1 ];
  • Q t [w t , x t , y t , z t ];
  • Q 99 [w 99 , x 99 , y 99 , z 99 ];
  • Q 100 [w 100 , x 100 , y 100 , z 100 ].
  • the preset rotation smoothing coefficient ⁇ can be set to a fixed value according to the application scene, and can also be obtained by calculating the rotation attitude components of the first transformation matrix M 1 and the second transformation matrix M 2.
  • the calculation method of the rotation smoothing coefficient ⁇ includes the following step:
  • Step 1 Calculate the rotation pose component of the first transformation matrix M1 of the previous frame reference image and the rotation pose component of the second transformation matrix M2 of the target image according to a preset algorithm to obtain a first result.
  • the preset algorithm can be used to calculate the rotation attitude component of the first transformation matrix M 1 of the reference image and the rotation attitude component of the second transformation matrix M 2 of the target image to generate the first result R 1 , wherein the preset
  • the algorithm can be selected according to the application scenario, which is not limited in this embodiment, for example:
  • R 1 (w t w t-1 -x t x t-1 -y ty t -1 -z t z t-1 -0.9).
  • R 1 (w 100 w 99 -x 100 x 99 -y 100 y 99 -z 100 z 99 -0.9).
  • Step 2 take the maximum value between the first result and the preset first coefficient as the second result.
  • max ⁇ can be used to represent the operation of obtaining the maximum value
  • the first coefficient can be set according to the application scenario, which is not limited in this embodiment, for example: 0.
  • R 2 max ⁇ R 1 ,0 ⁇ .
  • Step 3 Process the second result according to a preset algorithm to generate a third result.
  • the second result is processed by using the preset algorithm to generate the third result.
  • the preset algorithm can be selected according to the application scenario, which is not limited in this embodiment, for example:
  • Step 4 taking the minimum value between the third result and the preset second coefficient as the rotation smoothing coefficient.
  • the rotational smoothing coefficient ⁇ is the minimum value between R2 and the second coefficient.
  • Step 204 Acquire the translation pose component of the target object in the first transformation matrix of each frame of the reference image, and obtain the translation pose component of the target object in the second transformation matrix of the target image.
  • Step 205 based on the translation pose component of the first transformation matrix of each frame of the reference image and the translation pose component of the second transformation matrix of the target image, a translation vector is generated according to the timing information.
  • the reference image can be the 98th, 99th, 101st, and 102nd frames of the video, and the translation pose components of the transformation matrix corresponding to the 98th-102nd frames are obtained respectively: V 98 , V 99 , V 100 , V 101 , V 102 , and then, according to the timing information, the translational attitude components corresponding to each frame of image can be sorted, and a translational vector Y is formed, and the value of the translational vector Y is:
  • Step 206 Process the translation vector and the preset translation coefficient with a linear function fitting algorithm according to the least square method to generate a translation trajectory, and extract the target translation posture component corresponding to the time point information of the target image from the translation trajectory.
  • the preset translation coefficient can be related to the total number of frames of the reference image and the target image.
  • the translation trajectory can be set as a d-degree polynomial function.
  • the preset translation coefficient X can be adjusted according to the application scenario, which is not limited in this embodiment.
  • the preset translation coefficient X can be related to the coefficient d of the polynomial function, the total image frame number l of the reference image and the target image, then the preset translation coefficient X can be expressed as:
  • a point on the translation motion trajectory may represent a translation gesture component corresponding to the time point. Therefore, the corresponding target translation gesture component V' can be extracted from the translation motion trajectory according to the time point information of the target image.
  • Step 207 Generate a third pose estimate of the target object in the target image according to the target rotation pose component and the target translation pose component.
  • the transformation matrix M can be decomposed into a rotation attitude component and a translation attitude component.
  • a third transformation matrix can be generated according to the target rotation attitude component and the target translation attitude component.
  • the third transformation matrix is the target object in the target image
  • the third pose estimate in that is, the synthetic pose estimate after rotation smoothing and translation smoothing.
  • dot product processing can be performed on the target rotation pose component Q' and the target translation pose component V', through which the target rotation pose component and the target translation pose component can be combined to generate the target object in the target image
  • the third transformation matrix, the third transformation matrix is the third pose estimation.
  • the attitude estimation method provided by the embodiments of the present disclosure uses different smoothing algorithms to smooth the rotation attitude component and the translation attitude component respectively. Through experimental observation, it is found that the noise performance of the rotation attitude and translation attitude of the target object is different. Different smoothing methods can obtain better smoothing effects.
  • Fig. 3a is a schematic diagram of a frame before a target image of a pose estimation method provided by an embodiment of the present disclosure, wherein the target object is a human head, and the application effect is to virtually wear a hat on the human head. As shown in Figure 3a, the position of the hat is more appropriate at this time.
  • multiple consecutive reference images before and after the target image are acquired according to the timing information, the first pose estimation of the target object in the reference image, and the second pose estimation of the target object in the target image are obtained, using rotation
  • the smoothing algorithm processes the rotation attitude components of the first attitude estimation and the second attitude estimation to generate the target rotation attitude component, and uses the translation smoothing algorithm to process the translation attitude components of the first attitude estimation and the second attitude estimation to generate the target translation attitude portion.
  • a third pose estimate of the target object in the target image is generated according to the target rotation pose component and the target translation pose component.
  • Fig. 3b is a schematic diagram of a target image of a pose estimation method provided by an embodiment of the present disclosure.
  • the application effect added according to the third pose estimation is shown in Fig. 3b.
  • the head moves clockwise, and the hat is adjusted accordingly. At this time, the position of the hat is more appropriate.
  • the application effect may be as shown in Fig. 3c.
  • Fig. 3c the position of the hat is inappropriate.
  • Fig. 4a is a schematic diagram of a previous frame of a target image of another pose estimation method provided by an embodiment of the present disclosure, wherein the target object is a human hand, and the application effect is to virtually add a heart to the human hand. As shown in Figure 4a, the position of the love heart is more appropriate at this time.
  • multiple consecutive reference images before and after the target image are acquired according to the timing information, the first pose estimation of the target object in the reference image, and the second pose estimation of the target object in the target image are obtained, using rotation
  • the smoothing algorithm processes the rotation attitude components of the first attitude estimation and the second attitude estimation to generate the target rotation attitude component, and uses the translation smoothing algorithm to process the translation attitude components of the first attitude estimation and the second attitude estimation to generate the target translation attitude portion.
  • a third pose estimate of the target object in the target image is generated according to the target rotation pose component and the target translation pose component.
  • Fig. 4b is a schematic diagram of a target image of another pose estimation method provided by an embodiment of the present disclosure.
  • the application effect added according to the third pose estimation is shown in Fig. 4b.
  • the hand moves in translation, and the love heart is adjusted accordingly. At this time, the position of love is more appropriate.
  • the applied effect may be as shown in Figure 4c.
  • the love heart has poor followability to the target object.
  • the application scenario includes but is not limited to adding special effects to the target object in the video. This method can improve the stability and followability of the application of the special effects, and improve the user experience.
  • FIG. 5 is a schematic structural diagram of an apparatus for pose estimation provided by an embodiment of the present disclosure.
  • the apparatus may be implemented by software and/or hardware, and may generally be integrated into an electronic device. As shown in Figure 5, the device includes:
  • the first acquiring module 501 is configured to acquire, according to the timing information, consecutive reference images of multiple frames before and after the target image in timing;
  • a second acquiring module 502 configured to acquire a first pose estimate of the target object in each frame of the reference image, and a second pose estimate of the target object in the target image;
  • the first generating module 503 is configured to process at least one rotational attitude component of the first attitude estimation and the rotational attitude component of the second attitude estimation according to a preset rotational smoothing algorithm, to generate a target rotational attitude component;
  • the second generation module 504 is configured to process each translation pose component of the first pose estimate and the translation pose component of the second pose estimate according to a preset translation smoothing algorithm, to generate a target translation pose component;
  • a third generating module 505 configured to generate a third pose estimate of the target object in the target image according to the target rotation pose component and the target translation pose component.
  • the second obtaining module 502 is configured to:
  • the device also includes:
  • the first calculation module is configured to calculate at least one of the first transformation matrices according to a preset association algorithm of quaternion and rotation representation to obtain a rotation attitude component of at least one of the first transformation matrices, and to calculate the first transformation matrix. performing calculations on the second transformation matrix to obtain the rotation attitude component of the second transformation matrix; and,
  • the second calculation module is configured to extract the translation of the target object on the horizontal axis, the vertical axis, and the vertical axis for each of the first transformation matrices, and obtain a translation posture component of each of the first transformation matrices, and Extract the translation of the target object on the horizontal axis, the vertical axis and the vertical axis from the second transformation matrix, and obtain the translation posture component of the second transformation matrix.
  • the first generating module 503 is configured to:
  • the device also includes:
  • a third acquisition module configured to calculate the rotation pose component of the first transformation matrix of the previous frame reference image and the rotation pose component of the second transformation matrix of the target image according to a preset algorithm to obtain a first result
  • a fourth obtaining module configured to take the maximum value between the first result and the preset first coefficient as the second result
  • a fourth generating module configured to process the second result according to a preset algorithm to generate a third result
  • the fifth obtaining module is configured to take the minimum value between the third result and a preset second coefficient as the rotation smoothing coefficient.
  • the second generating module 504 is configured to:
  • a target translation gesture component corresponding to the time point information of the target image is extracted from the translation motion trajectory.
  • the device also includes:
  • a first determining module configured to determine the translation coefficient according to the number of image frames of the reference image and the target image.
  • the third generation module 505 is configured to:
  • the pose estimation device provided by the embodiments of the present disclosure can execute the pose estimation method provided by any embodiment of the present disclosure, and has corresponding functional modules and beneficial effects for executing the method.
  • An embodiment of the present disclosure further provides a computer program product, including a computer program/instruction, and when the computer program/instruction is executed by a processor, the pose estimation method provided by any embodiment of the present disclosure is implemented.
  • FIG. 6 is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure.
  • FIG. 6 shows a schematic structural diagram of an electronic device 600 suitable for implementing an embodiment of the present disclosure.
  • the electronic device 600 in the embodiment of the present disclosure may include, but is not limited to, mobile phones, notebook computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Tablet Computers), PMPs (Portable Multimedia Players), vehicle-mounted terminals ( Mobile terminals such as car navigation terminals), wearable electronic devices, etc., and fixed terminals such as digital TVs, desktop computers, smart home devices, etc.
  • the electronic device shown in FIG. 6 is only an example, and should not limit the functions and application scope of the embodiments of the present disclosure.
  • an electronic device 600 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 601, which may be randomly accessed according to a program stored in a read-only memory (ROM) 602 or loaded from a storage device 608.
  • a processing device such as a central processing unit, a graphics processing unit, etc.
  • RAM memory
  • various programs and data necessary for the operation of the electronic device 600 are also stored.
  • the processing device 601, ROM 602, and RAM 603 are connected to each other through a bus 604.
  • An input/output (I/O) interface 605 is also connected to the bus 604 .
  • the following devices can be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, a liquid crystal display (LCD), speaker, vibration an output device 607 such as a computer; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609.
  • the communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While FIG. 6 shows electronic device 600 having various means, it should be understood that implementing or having all of the means shown is not a requirement. More or fewer means may alternatively be implemented or provided.
  • embodiments of the present disclosure include a computer program product, which includes a computer program carried on a non-transitory computer readable medium, where the computer program includes program code for executing the method shown in the flowchart.
  • the computer program may be downloaded and installed from a network via communication means 609, or from storage means 608, or from ROM 602.
  • the processing device 601 the above-mentioned functions defined in the pose estimation method of the embodiment of the present disclosure are executed.
  • the above-mentioned computer-readable medium in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two.
  • a computer readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable Programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave carrying computer-readable program code therein. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • a computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can transmit, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device .
  • Program code embodied on a computer readable medium may be transmitted by any appropriate medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
  • the client and the server can communicate using any currently known or future network protocols such as HTTP (HyperText Transfer Protocol, Hypertext Transfer Protocol), and can communicate with digital data in any form or medium
  • HTTP HyperText Transfer Protocol
  • the communication eg, communication network
  • Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), internetworks (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network of.
  • the above-mentioned computer-readable medium may be included in the above-mentioned electronic device, or may exist independently without being incorporated into the electronic device.
  • the above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by the electronic device, the electronic device: acquires multiple frames of continuous reference images before and after the target image in time series according to the time series information; acquires The first pose estimation of the target object in each frame of the reference image, and the second pose estimation of the target object in the target image; the rotation pose component of at least one first pose estimate and the second pose estimate according to a preset rotation smoothing algorithm
  • the rotation attitude component is processed to generate the target rotation attitude component; the translation attitude component of each first attitude estimation and the translation attitude component of the second attitude estimation are processed according to the preset translation smoothing algorithm, and the target translation attitude component is generated; according to the target rotation
  • the pose component and the target translation pose component generate a third pose estimate of the target object in the target image.
  • the third pose estimation generated by the embodiment of the present disclosure has good stability and followability, and avoids the floating feeling, thereby improving the user experience and satisfaction.
  • Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, or combinations thereof, including but not limited to object-oriented programming languages—such as Java, Smalltalk, C++, and Includes conventional procedural programming languages - such as the "C" language or similar programming languages.
  • the program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server.
  • the remote computer may be connected to the user computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (such as through an Internet Service Provider). Internet connection).
  • LAN local area network
  • WAN wide area network
  • Internet Service Provider such as AT&T, MCI, Sprint, EarthLink, MSN, GTE, etc.
  • each block in a flowchart or block diagram may represent a module, program segment, or portion of code that contains one or more logical functions for implementing specified executable instructions.
  • the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations can be implemented by a dedicated hardware-based system that performs the specified functions or operations , or may be implemented by a combination of dedicated hardware and computer instructions.
  • the units involved in the embodiments described in the present disclosure may be implemented by software or by hardware. Wherein, the name of a unit does not constitute a limitation of the unit itself under certain circumstances.
  • FPGAs Field Programmable Gate Arrays
  • ASICs Application Specific Integrated Circuits
  • ASSPs Application Specific Standard Products
  • SOCs System on Chips
  • CPLD Complex Programmable Logical device
  • a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device.
  • a machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
  • a machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing.
  • machine-readable storage media would include one or more wire-based electrical connections, portable computer discs, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, compact disk read only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the foregoing.
  • RAM random access memory
  • ROM read only memory
  • EPROM or flash memory erasable programmable read only memory
  • CD-ROM compact disk read only memory
  • magnetic storage or any suitable combination of the foregoing.
  • the present disclosure provides a pose estimation method, including:
  • timing information multiple frames of continuous reference images before and after the target image in timing are obtained
  • a third pose estimate of the target object in the target image is generated according to the target rotation pose component and the target translation pose component.
  • the acquiring the first pose estimation of the target object in each frame of the reference image, and the target object in the target The second pose estimation in the image, including:
  • a pose estimation method provided in the present disclosure further includes:
  • each of the first transformation matrices respectively extract the translation of the target object on the horizontal axis, the vertical axis and the vertical axis, obtain the translation posture components of each of the first transformation matrices, and perform the transformation on the second transformation matrix Extract the translation of the target object on the horizontal axis, the vertical axis and the vertical axis, and obtain the translation posture component of the second transformation matrix.
  • the at least one rotational pose component of the first pose estimation and the second pose estimation according to the preset rotation smoothing algorithm are processed to generate the target rotation attitude components, including:
  • a pose estimation method provided in the present disclosure further includes:
  • a minimum value between the third result and a preset second coefficient is taken as the rotation smoothing coefficient.
  • the translation pose component estimated for each of the first poses and the second pose estimation according to the preset translation smoothing algorithm The translational attitude components of the target are processed to generate the translational attitude components of the target, including:
  • a target translation gesture component corresponding to the time point information of the target image is extracted from the translation motion track.
  • a pose estimation method provided in the present disclosure further includes:
  • the translation coefficient is determined according to image frame numbers of the reference image and the target image.
  • the generating of the target object in the target image according to the target rotation pose component and the target translation pose component including:
  • the present disclosure provides a pose estimation device, including:
  • the first acquisition module is used to acquire sequential reference images of multiple frames before and after the target image in time series according to the time series information
  • a second acquiring module configured to acquire a first pose estimate of the target object in each frame of the reference image, and a second pose estimate of the target object in the target image;
  • a first generating module configured to process at least one rotational pose component of the first pose estimate and a rotated pose component of the second pose estimate according to a preset rotational smoothing algorithm, to generate a target rotational pose component;
  • the second generating module is configured to process each translation pose component of the first pose estimation and the translation pose component of the second pose estimation according to a preset translation smoothing algorithm, to generate a target translation pose component;
  • a third generating module configured to generate a third pose estimate of the target object in the target image according to the target rotation pose component and the target translation pose component.
  • the second acquisition module is configured to:
  • the device further includes:
  • the first calculation module is configured to calculate at least one of the first transformation matrices according to a preset association algorithm of quaternion and rotation representation to obtain a rotation attitude component of at least one of the first transformation matrices, and to calculate the first transformation matrix. performing calculations on the second transformation matrix to obtain the rotation attitude component of the second transformation matrix; and,
  • the second calculation module is configured to extract the translation of the target object on the horizontal axis, the vertical axis, and the vertical axis for each of the first transformation matrices, and obtain a translation posture component of each of the first transformation matrices, and Extract the translation of the target object on the horizontal axis, the vertical axis and the vertical axis from the second transformation matrix, and obtain the translation posture component of the second transformation matrix.
  • the first generating module is configured to:
  • the device further includes:
  • a third acquisition module configured to calculate the rotation pose component of the first transformation matrix of the previous frame reference image and the rotation pose component of the second transformation matrix of the target image according to a preset algorithm to obtain a first result
  • a fourth obtaining module configured to take the maximum value between the first result and the preset first coefficient as the second result
  • a fourth generating module configured to process the second result according to a preset algorithm to generate a third result
  • the fifth obtaining module is configured to take the minimum value between the third result and a preset second coefficient as the rotation smoothing coefficient.
  • the second generating module is configured to:
  • a target translation gesture component corresponding to the time point information of the target image is extracted from the translation motion track.
  • the device further includes:
  • a first determining module configured to determine the translation coefficient according to the number of image frames of the reference image and the target image.
  • the third generating module is configured to:
  • the present disclosure provides an electronic device, including:
  • the processor is configured to read the executable instructions from the memory, and execute the instructions to implement any pose estimation method provided in the present disclosure.
  • the present disclosure provides a computer-readable storage medium, the storage medium stores a computer program, and the computer program is used to perform any of the gestures provided in the present disclosure Estimation method.

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)

Abstract

本公开实施例涉及一种姿态估计方法、装置、设备及介质,其中该方法包括:根据时序信息获取目标图像在时序上的前后多帧连续参考图像;获取目标对象在每帧参考图像中的第一姿态估计,以及目标对象在目标图像中的第二姿态估计;根据预设旋转平滑算法对至少一个第一姿态估计的旋转姿态分量和第二姿态估计的旋转姿态分量进行处理,生成目标旋转姿态分量;根据预设平移平滑算法对每个第一姿态估计的平移姿态分量和第二姿态估计的平移姿态分量进行处理,生成目标平移姿态分量;根据目标旋转姿态分量和目标平移姿态分量生成目标对象在目标图像中的第三姿态估计。本公开实施例生成的第三姿态估计具有良好的稳定性、跟随性,提升了用户的体验感和满意度。

Description

一种姿态估计方法、装置、设备及介质
相关申请的交叉引用
本申请要求于2021年07月29日提交的,申请号为202110867072.6、发明名称为“一种姿态估计方法、装置、设备及介质”的中国专利申请的优先权,该申请的全部内容通过引用结合在本申请中。
技术领域
本公开涉及数据处理技术领域,尤其涉及一种姿态估计方法、装置、设备及介质。
背景技术
随着计算机技术的发展,姿态估计技术的应用场景愈加广泛,比如根据姿态估计进行虚拟试穿、驱动一些虚拟素材贴合等应用场景。
然而,目前的姿态估计方法会造成一定的抖动,并且根据姿态估计生成的应用效果跟随性较差、有一定的漂浮感。
发明内容
为了解决上述技术问题或者至少部分地解决上述技术问题,本公开提供了一种姿态估计方法、装置、设备及介质。
第一方面,本公开实施例提供了一种姿态估计方法,所述方法包括:
根据时序信息获取目标图像在时序上的前后多帧连续参考图像;
获取目标对象在每帧所述参考图像中的第一姿态估计,以及所述目标对象在所述目标图像中的第二姿态估计;
根据预设旋转平滑算法对至少一个所述第一姿态估计的旋转姿态分量和所述第二姿态估计的旋转姿态分量进行处理,生成目标旋转姿态分量;
根据预设平移平滑算法对每个所述第一姿态估计的平移姿态分量和所述第二姿态估计的平移姿态分量进行处理,生成目标平移姿态分量;
根据所述目标旋转姿态分量和所述目标平移姿态分量生成所述目标对象在所述目标图像中的第三姿态估计。
一种可选的实施方式中,所述获取目标对象在每帧所述参考图像中的第一姿态估计,以及所述目标对象在所述目标图像中的第二姿态估计,包括:
获取所述目标对象从预设的初始位置到每帧所述参考图像中的目标位置对应的第一变 换矩阵,将所述第一变换矩阵确定为所述目标对象在每帧所述参考图像中的第一姿态估计;以及
获取所述目标对象从所述初始位置到所述目标图像中目标位置的第二变换矩阵,将所述第二变换矩阵确定为所述目标对象在所述目标图像中的第二姿态估计。一种可选的实施方式中,还包括:
根据预设的四元数和旋转表示的关联算法对至少一个所述第一变换矩阵进行计算获取至少一个所述第一变换矩阵的旋转姿态分量,且对所述第二变换矩阵进行计算获取所述第二变换矩阵的旋转姿态分量;以及,
对每个所述第一变换矩阵分别提取所述目标对象在横轴、竖轴和纵轴上的平移,获取每个所述第一变换矩阵的平移姿态分量,且对所述第二变换矩阵提取所述目标对象在横轴、竖轴和纵轴上的平移,获取所述第二变换矩阵的平移姿态分量。
一种可选的实施方式中,所述根据预设旋转平滑算法对至少一个所述第一姿态估计的旋转姿态分量和所述第二姿态估计的旋转姿态分量进行处理,生成目标旋转姿态分量,包括:
获取所述目标对象在所述目标图像前一帧参考图像的第一变换矩阵的旋转姿态分量;
获取所述目标对象在所述目标图像的第二变换矩阵的旋转姿态分量;
根据预设的球面线性插值算法对所述前一帧参考图像的第一变换矩阵的旋转姿态分量、所述目标图像的第二变换矩阵的旋转姿态分量,以及预设的旋转平滑系数进行处理,生成目标旋转姿态分量。
一种可选的实施方式中,还包括:
根据预设算法对所述前一帧参考图像的第一变换矩阵的旋转姿态分量和所述目标图像的第二变换矩阵的旋转姿态分量进行计算获取第一结果;
取所述第一结果和预设的第一系数之间的最大值作为第二结果;
根据预设算法对所述第二结果进行处理生成第三结果;
取所述第三结果和预设的第二系数之间的最小值作为所述旋转平滑系数。
一种可选的实施方式中,所述根据预设平移平滑算法对每个所述第一姿态估计的平移姿态分量和所述第二姿态估计的平移姿态分量进行处理,生成目标平移姿态分量,包括:
获取所述目标对象在每一帧所述参考图像的第一变换矩阵的平移姿态分量;
获取所述目标对象在所述目标图像的第二变换矩阵的平移姿态分量;
基于每一帧所述参考图像的第一变换矩阵的平移姿态分量和所述目标图像的第二变换矩阵的平移姿态分量,根据时序信息生成平移向量;
根据最小二乘法采用线性函数拟合算法对所述平移向量和预设的平移系数进行处理, 生成平移运动轨迹;
从所述平移运动轨迹中提取与所述目标图像的时间点信息对应的目标平移姿态分量。
一种可选的实施方式中,还包括:
根据所述参考图像和所述目标图像的图像帧数确定所述平移系数。
一种可选的实施方式中,所述根据所述目标旋转姿态分量和所述目标平移姿态分量生成所述目标对象在所述目标图像中的第三姿态估计,包括:
对所述目标旋转姿态分量和所述目标平移姿态分量进行点乘处理,生成所述目标对象在所述目标图像中的第三变换矩阵,将所述第三变换矩阵确定为所述目标对象在所述目标图像中的第三姿态估计。
第二方面,本公开实施例提供了一种姿态估计装置,所述装置包括:
第一获取模块,用于根据时序信息获取目标图像在时序上的前后多帧连续参考图像
第二获取模块,用于获取目标对象在每帧所述参考图像中的第一姿态估计,以及所述目标对象在所述目标图像中的第二姿态估计;
第一生成模块,用于根据预设旋转平滑算法对至少一个所述第一姿态估计的旋转姿态分量和所述第二姿态估计的旋转姿态分量进行处理,生成目标旋转姿态分量;
第二生成模块,用于根据预设平移平滑算法对每个所述第一姿态估计的平移姿态分量和所述第二姿态估计的平移姿态分量进行处理,生成目标平移姿态分量;
第三方面,本公开提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当所述指令在终端设备上运行时,使得所述终端设备实现上述的方法。
第四方面,本公开提供了一种电子设备,所述电子设备包括:处理器;用于存储所述处理器可执行指令的存储器;所述处理器,用于从所述存储器中读取所述可执行指令,并执行所述指令以实现上述的方法。
第五方面,本公开提供了一种计算机程序产品,所述计算机程序产品包括计算机程序/指令,所述计算机程序/指令被处理器执行时实现上述的方法。
本公开实施例提供的技术方案与现有技术相比至少具有如下优点:
本公开实施例提供的姿态估计方法,根据平移和旋转的不同性质采用对应不同的平滑策略,使用旋转平滑算法对第一姿态估计和第二姿态估计的旋转姿态分量进行处理,可以获得更精准且稳定的目标旋转姿态分量;使用平移平滑算法对第一姿态估计和第二姿态估计的平移姿态分量进行处理,可以获得更精准且稳定的目标平移姿态分量,从而,根据目标旋转姿态分量和目标平移姿态分量生成的第三姿态估计具有良好的稳定性,以及跟随性,避免了漂浮感的产生,提升了用户的体验感和满意度。
附图说明
结合附图并参考以下具体实施方式,本公开各实施例的上述和其他特征、优点及方面将变得更加明显。贯穿附图中,相同或相似的附图标记表示相同或相似的元素。应当理解附图是示意性的,原件和元素不一定按照比例绘制。
图1为本公开实施例提供的一种姿态估计方法的流程示意图;
图2为本公开实施例提供的另一种姿态估计方法的流程示意图;
图3a为本公开实施例提供的一种姿态估计方法的目标图像前一帧的示意图;
图3b为本公开实施例提供的一种姿态估计方法的目标图像的示意图;
图3c为本公开实施例提供的另一种姿态估计方法的目标图像的示意图;
图4a为本公开实施例提供的另一种姿态估计方法的目标图像前一帧的示意图;
图4b为本公开实施例提供的另一种姿态估计方法的目标图像的示意图;
图4c为本公开实施例提供的另一种姿态估计方法的目标图像的示意图;
图5为本公开实施例提供的一种姿态估计装置的结构示意图;
图6为本公开实施例提供的一种电子设备的结构示意图。
具体实施方式
下面将参照附图更详细地描述本公开的实施例。虽然附图中显示了本公开的某些实施例,然而应当理解的是,本公开可以通过各种形式来实现,而且不应该被解释为限于这里阐述的实施例,相反提供这些实施例是为了更加透彻和完整地理解本公开。应当理解的是,本公开的附图及实施例仅用于示例性作用,并非用于限制本公开的保护范围。
应当理解,本公开的方法实施方式中记载的各个步骤可以按照不同的顺序执行,和/或并行执行。此外,方法实施方式可以包括附加的步骤和/或省略执行示出的步骤。本公开的范围在此方面不受限制。
本文使用的术语“包括”及其变形是开放性包括,即“包括但不限于”。术语“基于”是“至少部分地基于”。术语“一个实施例”表示“至少一个实施例”;术语“另一实施例”表示“至少一个另外的实施例”;术语“一些实施例”表示“至少一些实施例”。其他术语的相关定义将在下文描述中给出。
需要注意,本公开中提及的“第一”、“第二”等概念仅用于对不同的装置、模块或单元进行区分,并非用于限定这些装置、模块或单元所执行的功能的顺序或者相互依存关系。
需要注意,本公开中提及的“一个”、“多个”的修饰是示意性而非限制性的,本领域技术人员应当理解,除非在上下文另有明确指出,否则应该理解为“一个或多个”。
本公开实施方式中的多个装置之间所交互的消息或者信息的名称仅用于说明性的目 的,而并不是用于对这些消息或信息的范围进行限制。
为了解决上述问题,本公开实施例提供了一种姿态估计方法,下面结合具体的实施例对该方法进行介绍。
图1为本公开实施例提供的一种姿态估计方法的流程示意图,该方法可以由姿态估计装置执行,其中该装置可以采用软件和/或硬件实现,一般可集成在电子设备中。如图1所示,该方法包括:
步骤101,根据时序信息获取目标图像在时序上的前后多帧连续参考图像;
步骤102,获取目标对象在每帧参考图像中的第一姿态估计,以及目标对象在目标图像中的第二姿态估计。
对目标对象拍摄视频,对所拍摄视频中的目标对象进行姿态估计后,根据估计的姿态进行相关应用。例如,当目标对象为人的脚,根据脚的姿态估计进行鞋子的虚拟试穿;当目标对象为人的手掌,根据手的姿态估计添加各种特效效果等。因此,为了降低姿态估计的抖动,提升应用效果的稳定性以及跟随性,需要更加准确的对目标对象进行姿态估计。需要说明的是,目标对象可以根据应用场景进行选择,本实施例不作限制。
视频是由多帧连续图像组成的,时序信息可以用来记录该多帧图像之间的顺序关系。可以理解地,通常需要对视频中的每帧图像中的目标对象分别进行姿态估计,目标图像可以为当前进行姿态估计的图像。为了对目标图像中的目标对象进行姿态估计,首先通过时序信息获取目标图像在时序上的前后多帧连续参考图像,其中,参考图像的帧数可以根据应用场景进行设定,本实施例不作限制,例如:在视频的第100帧为目标图像的情况下,可以将视频的前后各N帧作为参考图像(N为正整数),例如,N=2,将视频的第98、99、101、102帧作为参考图像;也可以将视频的前K帧以及后J帧作为参考图像(K和J均为正整数;且K≠J),例如,K=2,J=1时,将视频的第98、99、101帧作为参考图像。
进而分别对每个参考图像中的目标对象进行姿态估计,从而获取目标对象在每帧参考图像中的第一姿态估计。同时,对目标图像中的目标对象进行姿态估计,获取目标对象在目标图像中的第二姿态估计。需要说明的是,获取第一姿态估计和第二姿态估计的方法有多种,可以根据应用场景进行选择,本实施例不作限制。例如:通过神经网络模型获取第一姿态估计和第二姿态估计。
步骤103,根据预设旋转平滑算法对至少一个第一姿态估计的旋转姿态分量和第二姿态估计的旋转姿态分量进行处理,生成目标旋转姿态分量。
步骤104,根据预设平移平滑算法对每个第一姿态估计的平移姿态分量和第二姿态估计的平移姿态分量进行处理,生成目标平移姿态分量。
可以理解地,姿态估计表示目标对象从一个初始位置运动到当前位置的一个变化过程,因此,可以从运动方向的维度将姿态估计进行分量处理获取平移姿态分量和旋转姿态分量。具体地,对第一姿态估计进行分量处理后,得到第一姿态估计对应的旋转姿态分量和平移姿态分量;对第二姿态估计进行分量处理后,得到第二姿态估计对应的旋转姿态分量和平移姿态分量。需要说明的是,可以根据姿态估计的具体表达形式,选择相应的算法对姿态估计进行分量处理获取平移姿态分量和旋转姿态分量,本实施例对此不做限制。
根据多次试验观察以及推理分析,发现目标对象的第一姿态估计在平移姿态分量和旋转姿态分量的差异也较大,也需要采用对应的不同算法对第一姿态估计的平移姿态分量和旋转姿态分量进行处理。类似的,目标对象的第二姿态估计在平移姿态分量和旋转姿态分量的差异较大,即平移姿态分量和旋转姿态分量的噪声表现不同,因此,可以采用对应的不同算法对第二姿态估计的平移姿态分量和旋转姿态分量进行处理。具体地,可以采用预设的旋转平滑算法对第一姿态估计和第二姿态估计的旋转姿态分量进行平滑处理,采用预设的平移平滑算法对第一姿态估计和第二姿态估计的平移姿态分量进行平滑处理。
需要说明的是,该旋转平滑算法包括但不限于:线性插值算法、球面线性插值算法中的任一种,根据该旋转平滑算法对第一姿态估计的旋转分量和第二姿态估计的旋转分量进行处理,得到目标旋转姿态分量,该目标旋转姿态分量为目标对象在目标图像中的姿态估计在旋转方向的分量。其中,需要强调的是,在一些应用场景中,根据旋转平滑算法确定参考图像的数量和该参考图像在时序上的位置,例如,球面线性插值算法通常是对目标图像及其前一帧的参考图像进行处理,因而当选用球面线性插值算法作为旋转平滑算法时,在视频的第100帧为目标图像的情况下,选取第99帧的参考图像中的姿态估计的旋转姿态分量进行平滑处理。
另外,需要说明的是,平移平滑算法包括但不限于:最小二乘法、非线性最小二乘法中的任一种,根据该平移平滑算法对第一姿态估计的平移分量和第二姿态估计的平移分量进行处理,得到目标平移姿态分量,该目标平移姿态分量为目标对象在目标图像中的姿态估计在平移方向的分量。其中,需要强调的是,在一些应用场景中,根据平移平滑算法确定参考图像的数量和该参考图像在时序上的位置,例如,最小二乘法算法通常是对目标图像及其前L帧和后N帧的参考图像进行处理(L和N为整数,L和N的相对数量不作限制),因而当选用最小二乘法算法时,可以选取L=N=2,在视频的第100帧为目标图像的情况下,选取第98、99、101、102帧的参考图像中的姿态估计的平移姿态分量进行平滑处理。
步骤105,根据目标旋转姿态分量和目标平移姿态分量生成目标对象在目标图像中的第三姿态估计。
如上所述,目标旋转姿态分量为目标对象在目标图像中的姿态估计在旋转方向的分量, 目标平移姿态分量为目标对象在目标图像中的姿态估计在平移方向的分量,进而,可以根据目标旋转姿态分量和目标平移姿态分量生成目标对象在目标图像中的第三姿态估计。需要说明的是,可以根据目标旋转姿态分量和目标平移姿态分量的具体表达形式选择对应的算法进行合成处理生成第三姿态估计。
本公开实施例提供的姿态估计方法,首先根据时序信息获取目标图像在时序上的前后多帧连续参考图像,获取目标对象在参考图像中的第一姿态估计,以及目标对象在目标图像中的第二姿态估计。进而通过使用旋转平滑算法对第一姿态估计和第二姿态估计的旋转姿态分量进行处理,可以获得更精准且稳定的目标旋转姿态分量;使用平移平滑算法对第一姿态估计和第二姿态估计的平移姿态分量进行处理,可以获得更精准且稳定的目标平移姿态分量。从而,根据目标旋转姿态分量和目标平移姿态分量生成的第三姿态估计。这样经过对时序相关的多帧姿态估计的旋转分量和平移分量分别采用对应的平滑算法进行平滑处理后生成的最终的姿态估计具有良好的稳定性,以及跟随性,避免了漂浮感的产生,提升了用户的体验感和满意度。
图2为本公开实施例提供的另一种姿态估计方法的流程示意图,基于上述实施例,如图2所示,具体步骤,包括:
步骤201,根据时序信息获取目标图像在时序上的前后多帧连续参考图像,获取目标对象从预设的初始位置到每帧参考图像中的目标位置对应的第一变换矩阵,将该第一变换矩阵确定为目标对象在每帧参考图像中的第一姿态估计,获取目标对象从初始位置到目标图像中目标位置的第二变换矩阵,将该第二变换矩阵确定为目标对象在目标图像中的第二姿态估计。
参考图像是目标图像的前后多帧连续的图像,参考图像可以根据应用场景进行选取,本实施例不作限制,举例而言,在视频的第100帧为目标图像的情况下:参考图像可以为视频的第98、99、101、102帧。
在每一帧图像中,目标对象的位置是发生变化的,变换矩阵可以用于表示目标对象从一个位置到另一个位置的变换。因此,在本公开一些实施例中,可以预设初始位置,初始位置根据应用场景进行设置,本实施例不作限制,例如:初始位置为时序上第一帧参考图像的上一帧图像中目标对象的位置。针对每帧参考图像,使用第一变换矩阵表示目标对象从初始位置到当前参考图像中的目标对象所在目标位置的变换;在待进行姿态估计的目标图像中,使用第二变换矩阵表示目标对象从初始位置到目标图像中目标位置的变换。其中,第一变换矩阵和第二变换矩阵的初始位置相同,从而保证图像间的算法结果是一致的。需要说明的是,在一些应用场景中,变换矩阵是在表示旋转的旋转矩阵后面拼接表示平移的 平移矩阵得到的,其中旋转矩阵为3×3的矩阵,平移矩阵为3×1的矩阵,旋转矩阵和平移矩阵拼接得到变换矩阵为3×4的矩阵。因而,本实施例中的第一变换矩阵和第二变换矩阵均可采用3×4的矩阵进行表示。
一种可选的实施方式中,继续以第100帧为目标图像,第98、99、101、102帧为参考图像为例,目标对象为人的脚,预设初始位置为第97帧图像中脚的位置,则获得目标对象从初始位置到第98、第99、第101、第102帧的参考图像中的目标位置的第一变换矩阵,以及目标对象从初始位置到第100帧的目标图像的目标位置的第二变换矩阵。进而,第一变换矩阵和第二变换矩阵都可以通过计算,得到对应的平移姿态分量和使用四元数表示的旋转姿态分量。需要说明的是,目标对象在每一帧图像的变换矩阵的具体数值不完全相同,为了说明如何对变换矩阵进行旋转姿态分量和平移姿态分量的拆分,用3×4的变换矩阵M为例说明如下。
以变换矩阵M为例,说明如何根据变换矩阵获取旋转姿态分量和平移姿态分量的过程,其中,变换矩阵M表示为:
Figure PCTCN2022092160-appb-000001
对每个第一变换矩阵分别提取所述目标对象在横轴、竖轴和纵轴上的平移,获取每个第一变换矩阵的平移姿态分量,且对第二变换矩阵提取所述目标对象在横轴、竖轴和纵轴上的平移,获取所述第二变换矩阵的平移姿态分量,以变换矩阵M代表第一变换矩阵或第二变换矩阵,变换矩阵M中,[a 14;a 24;a 34]表示平移,则平移姿态分量V的值为:
V=[a 14 a 24 a 34]
四元数相对于旋转矩阵,能够解决万向节死锁问题,因而为了将旋转矩阵转换为四元数,根据预设的四元数和旋转矩阵表示的关联算法对至少一个第一变换矩阵进行计算获取至少一个第一变换矩阵的旋转姿态分量,且对第二变换矩阵进行计算获取第二变换矩阵的旋转姿态分量,以变换矩阵M代表第一变换矩阵或第二变换矩阵,变换矩阵M中,[a 11a 12a 13;a 21a 22a 23;a 31a 32a 33]表示旋转矩阵,根据预设的四元数和旋转矩阵表示的关联算法获取的旋转姿态分量Q的值为:
Q=[w,x,y,z]
旋转姿态分量Q中,w的值为:
Figure PCTCN2022092160-appb-000002
其中,tr()表示计算矩阵的迹,M :3,:3表示取变换矩阵M的前3行,前3列构成的矩阵。
旋转姿态分量Q中,x的值为:
Figure PCTCN2022092160-appb-000003
旋转姿态分量Q中,y的值为:
Figure PCTCN2022092160-appb-000004
旋转姿态分量Q中,z的值为:
Figure PCTCN2022092160-appb-000005
需要说明的是,变换矩阵M可以代表每帧参考图像对应的第一变换矩阵,以及目标图像对应的第二变换矩阵,只是矩阵里面具体的数值不同;第一变换矩阵和第二变换矩阵的旋转姿态分量和平移姿态分量的拆分过程与变换矩阵M相同,只是矩阵里面具体的数值不同,本实施例不再赘述。因此,可以按照上述实施方式将第一变换矩阵分量处理为对应的旋转姿态分量和平移姿态分量;可以按照上述实施方式,将第二变换矩阵分量处理为对应的旋转姿态分量和平移姿态分量。
步骤202,获取目标对象在目标图像前一帧参考图像的第一变换矩阵的旋转姿态分量,获取目标对象在目标图像的第二变换矩阵的旋转姿态分量。
步骤203,根据预设的球面线性插值算法对该前一帧参考图像的第一变换矩阵的旋转姿态分量、目标图像的第二变换矩阵的旋转姿态分量,以及预设的旋转平滑系数进行处理,生成目标旋转姿态分量。
由于旋转姿态分量相对于平移姿态分量的运动误差较小,因此,可以只选取与目标图像相邻的上一帧的参考图像的第一变换矩阵的旋转姿态分量即可,进而根据预设的球面线性插值算法对前一帧参考图像的第一变换矩阵的旋转姿态分量、目标图像的第二变换矩阵的旋转姿态分量,以及预设的旋转平滑系数进行处理,生成目标旋转姿态分量。继续以第100帧为目标图像,第98、99、101、102帧为参考图像为例,针对旋转姿态分量的平滑处理,只选择第99帧中目标对象变换矩阵的旋转姿态分量以及第100帧中目标对象变换矩阵的旋转姿态分量参与旋转姿态的平滑处理。
具体的旋转姿态分量的平滑处理过程说明如下:使用球面线性插值算法对两个旋转姿态分量进行平滑插值运算,采用球面线性插值算法对旋转姿态分量进行处理,能够保证插值是线性的,并得到较为稳定的目标旋转姿态分量,还可以根据权重对角度等比例地平滑。此外,由于模长不为1的四元数不可以表示旋转运动,而球面线性差值算法能够保证处理后的四元数的模长为1,从而使得处理获得的目标旋转姿态分量仍可以表示旋转运动,确保了第三姿态估计的稳定和精准性,使得应用根据该方法获取到的姿态估计的特效的视觉效果较为真实。
在本实施例中,球面插值算法表示为slerp(),使用球面插值算法slerp()对前一帧参考图像的第一变换矩阵M 1的旋转姿态分量Q t-1、目标图像的第二变换矩阵M 2的旋转姿态分量Q t,以及预设的旋转平滑系数λ进行处理,生成目标旋转姿态分量Q',即:
Q'=slerp(Q t-1,Q t,λ)。
与步骤201中的计算过程类似,上述公式中:
Q t-1的值为:Q t-1=[w t-1,x t-1,y t-1,z t-1];
Q t的值为:Q t=[w t,x t,y t,z t];
举例而言,在视频的第100帧为目标图像的情况下:
目标旋转姿态分量Q'的值为:Q'=slerp(Q 99,Q 100,λ);
Q 99的值为:Q 99=[w 99,x 99,y 99,z 99];
Q 100的值为:Q 100=[w 100,x 100,y 100,z 100]。
预设的旋转平滑系数λ可以根据应用场景设定为固定值,也可以通过第一变换矩阵M 1和第二变换矩阵M 2的旋转姿态分量计算获得,该旋转平滑系数λ的计算方法包括以下步骤:
步骤1,根据预设算法对前一帧参考图像的第一变换矩阵M 1的旋转姿态分量和目标图像的第二变换矩阵M 2的旋转姿态分量进行计算获取第一结果。
其中,预设算法可以用于对参考图像的第一变换矩阵M 1的旋转姿态分量和目标图像的第二变换矩阵M 2的旋转姿态分量进行计算,生成第一结果R 1,其中,预设算法可以根据应用场景进行选择,本实施例不作限制,例如:
R 1的值为:R 1=(w tw t-1-x tx t-1-y ty t-1-z tz t-1-0.9)。
举例而言,在视频的第100帧为目标图像的情况下:
R 1的值为:R 1=(w 100w 99-x 100x 99-y 100y 99-z 100z 99-0.9)。
步骤2,取第一结果和预设的第一系数之间的最大值作为第二结果。
其中,max{}可以用来表示取最大值的运算,第一系数可以根据应用场景进行设定,本实施例不作限制,例如:0。
若第一系数为0,第二结果R 2的值为:R 2=max{R 1,0}。
步骤3,根据预设算法对第二结果进行处理生成第三结果。
可以理解地,采用预设算法的处理第二结果,生成第三结果。预设算法可以根据应用场景进行选择,本实施例不作限制,例如:
第三结果R 3的值为:R 3=(R2×10) 72
步骤4,取第三结果和预设的第二系数之间的最小值作为旋转平滑系数。
旋转平滑系数λ为R 2和第二系数之间的最小值。其中,第二系数可根据具体应用情况进行设置,若第二系数为0.9,旋转平滑系数λ的值为:λ=min{0.9,R 2}。
其中,min{}可以用来表示取最小值的运算,第二系数可以根据应用场景进行设定,本实施例不作限制。步骤204,获取目标对象在每一帧参考图像的第一变换矩阵的平移姿态分量,获取目标对象在目标图像的第二变换矩阵的平移姿态分量。
步骤205,基于每一帧参考图像的第一变换矩阵的平移姿态分量和目标图像的第二变换矩阵的平移姿态分量,根据时序信息生成平移向量。
举例而言,在视频的第100帧为目标图像的情况下,参考图像可以为视频的第98、99、101、102帧,获取第98-102帧对应的变换矩阵的平移姿态分量分别为:V 98、V 99、V 100、V 101、V 102,之后,可以根据时序信息对每帧图像对应的平移姿态分量进行排序,并组成平移向量Y,平移向量Y的值为:
Y=[V 98,V 99,V 100,V 101,V 102] T
步骤206,根据最小二乘法采用线性函数拟合算法对平移向量和预设的平移系数进行处理,生成平移运动轨迹,从平移运动轨迹中提取与目标图像的时间点信息对应的目标平移姿态分量。
其中,预设的平移系数可以与参考图像以及目标图像的总帧数相关,在本申请一些实施例中,可以设平移运动轨迹为d次多项式函数,通过对视频中多帧的观察,根据最小二乘法,采用线性函数拟合算法对平移向量Y和预设的平移系数X进行处理,采用线性函数拟合算法生成平移运动轨迹,使通过平移运动轨迹获得的平移姿态分量的误差最小,由于利用了与目标图像相邻的参考图像的平移姿态分量,还能够解决目标平移姿态分量滞后的问题,从而确保了第三姿态估计具有良好的稳定性和跟随性。
线性函数拟合算法处理的数据中,预设的平移系数X可以根据应用场景进行调整,本实施例不做限制。例如:预设平移系数X可以与多项式函数的系数d、参考图像和目标图 像的总图像帧数l相关,那么,预设平移系数X可以表示为:
Figure PCTCN2022092160-appb-000006
根据平移向量Y和预设平移系数X,可以获得平移运动轨迹F,平移运动轨迹F的表达式为:F=(X TX) -1X TY。
可以理解地,平移运动轨迹上的点可以表示在该时间点对应的平移姿态分量。因而可以根据目标图像的时间点信息从平移运动轨迹上提取对应的目标平移姿态分量V'。
步骤207,根据目标旋转姿态分量和目标平移姿态分量生成目标对象在目标图像中的第三姿态估计。
综上所述,变换矩阵M可以分解为旋转姿态分量和平移姿态分量,类似的,根据目标旋转姿态分量和目标平移姿态分量可以生成第三变换矩阵,该第三变化矩阵就是目标对象在目标图像中的第三姿态估计,即,经过旋转平滑和平移平滑后的合成的姿态估计。
具体来说,可以对目标旋转姿态分量Q'和目标平移姿态分量V'进行点乘处理,通过点乘处理可以将目标旋转姿态分量和目标平移姿态分量进行合并,生成目标对象在目标图像中的第三变换矩阵,该第三变换矩阵即为第三姿态估计。
本公开实施例提供的姿态估计方法,分别采用不同的平滑算法对旋转姿态分量和平移姿态分量进行平滑处理,通过试验观察,发现目标对象的旋转姿态和平移姿态的噪声表现不同,对两者采用不同的平滑处理方法可以获取更好的平滑效果。
基于上述实施例,为了更加清楚的说明本公开提供的姿态估计方法的应用效果,通过图3a、3b、3c所示的虚拟试穿和图4a、4b、4c所示的虚拟素材添加的具体应用进行说明,具体如下:
图3a为本公开实施例提供的一种姿态估计方法的目标图像前一帧的示意图,其中,目标对象为人的头,应用效果为在人头上虚拟佩戴帽子。如图3a所示,此时帽子的位置较为恰当。
在本申请一些实施例中,根据时序信息获取目标图像的前后多帧连续参考图像,获取目标对象在参考图像中的第一姿态估计,以及目标对象在目标图像中的第二姿态估计,使用旋转平滑算法对第一姿态估计和第二姿态估计的旋转姿态分量进行处理,生成目标旋转姿态分量,使用平移平滑算法对第一姿态估计和第二姿态估计的平移姿态分量进行处理, 生成目标平移姿态分量。根据目标旋转姿态分量和目标平移姿态分量生成目标对象在目标图像中的第三姿态估计。
图3b为本公开实施例提供的一种姿态估计方法的目标图像的示意图,根据第三姿态估计添加的应用效果如图3b所示,人头进行了顺时针的移动,帽子进行了相应的调整,此时帽子的位置较为恰当。
若第三姿态估计的效果不佳,则应用效果可能如图3c所示,图3c中,帽子的位置不恰当。
图4a为本公开实施例提供的另一种姿态估计方法的目标图像前一帧的示意图,其中,目标对象为人的手,应用效果为在人手上虚拟添加爱心。如图4a所示,此时爱心的位置较为恰当。
在本申请一些实施例中,根据时序信息获取目标图像的前后多帧连续参考图像,获取目标对象在参考图像中的第一姿态估计,以及目标对象在目标图像中的第二姿态估计,使用旋转平滑算法对第一姿态估计和第二姿态估计的旋转姿态分量进行处理,生成目标旋转姿态分量,使用平移平滑算法对第一姿态估计和第二姿态估计的平移姿态分量进行处理,生成目标平移姿态分量。根据目标旋转姿态分量和目标平移姿态分量生成目标对象在目标图像中的第三姿态估计。
图4b为本公开实施例提供的另一种姿态估计方法的目标图像的示意图,根据第三姿态估计添加的应用效果如图4b所示,手进行了平移的移动,爱心进行了相应的调整,此时爱心的位置较为恰当。
若第三姿态的效果不佳,则应用效果可能如图4c所示。图4c中,爱心对于目标对象的跟随性较差。
根据本申请实施例的姿态估计方法,应用场景包括但不限于视频中的目标对象添加特效,本方法可以提高应用特效的稳定性和跟随性,提高用户的体验。
图5为本公开实施例提供的一种姿态估计装置的结构示意图,该装置可由软件和/或硬件实现,一般可集成在电子设备中。如图5所示,该装置,包括:
第一获取模块501,用于根据时序信息获取目标图像在时序上的前后多帧连续参考图像;
第二获取模块502,用于获取目标对象在每帧所述参考图像中的第一姿态估计,以及所述目标对象在所述目标图像中的第二姿态估计;
第一生成模块503,用于根据预设旋转平滑算法对至少一个所述第一姿态估计的旋转姿态分量和所述第二姿态估计的旋转姿态分量进行处理,生成目标旋转姿态分量;
第二生成模块504,用于根据预设平移平滑算法对每个所述第一姿态估计的平移姿态分量和所述第二姿态估计的平移姿态分量进行处理,生成目标平移姿态分量;
第三生成模块505,用于根据所述目标旋转姿态分量和所述目标平移姿态分量生成所述目标对象在所述目标图像中的第三姿态估计。
可选地,所述第二获取模块502,用于:
获取所述目标对象从预设的初始位置到每帧所述参考图像中的目标位置对应的第一变换矩阵,将所述第一变换矩阵确定为所述目标对象在每帧所述参考图像中的第一姿态估计;以及
获取所述目标对象从所述初始位置到所述目标图像中目标位置的第二变换矩阵,将所述第二变换矩阵确定为所述目标对象在所述目标图像中的第二姿态估计。可选地,所述装置,还包括:
第一计算模块,用于根据预设的四元数和旋转表示的关联算法对至少一个所述第一变换矩阵进行计算获取至少一个所述第一变换矩阵的旋转姿态分量,且对所述第二变换矩阵进行计算获取所述第二变换矩阵的旋转姿态分量;以及,
第二计算模块,用于对每个所述第一变换矩阵分别提取所述目标对象在横轴、竖轴和纵轴上的平移,获取每个所述第一变换矩阵的平移姿态分量,且对所述第二变换矩阵提取所述目标对象在横轴、竖轴和纵轴上的平移,获取所述第二变换矩阵的平移姿态分量。
可选地,所述第一生成模块503,用于:
获取所述目标对象在所述目标图像前一帧参考图像的第一变换矩阵的旋转姿态分量;
获取所述目标对象在所述目标图像的第二变换矩阵的旋转姿态分量;
根据预设的球面线性插值算法对所述前一帧参考图像的第一变换矩阵的旋转姿态分量、所述目标图像的第二变换矩阵的旋转姿态分量,以及预设的旋转平滑系数进行处理,生成目标旋转姿态分量。
可选地,所述装置,还包括:
第三获取模块,用于根据预设算法对所述前一帧参考图像的第一变换矩阵的旋转姿态分量和所述目标图像的第二变换矩阵的旋转姿态分量进行计算获取第一结果;
第四获取模块,用于取所述第一结果和预设的第一系数之间的最大值作为第二结果;
第四生成模块,用于根据预设算法对所述第二结果进行处理生成第三结果;
第五获取模块,用于取所述第三结果和预设的第二系数之间的最小值作为所述旋转平滑系数。
可选地,第二生成模块504,用于:
获取所述目标对象在每一帧所述参考图像的第一变换矩阵的平移姿态分量;
获取所述目标对象在所述目标图像的第二变换矩阵的平移姿态分量;
基于每一帧所述参考图像的第一变换矩阵的平移姿态分量和所述目标图像的第二变换矩阵的平移姿态分量,根据时序信息生成平移向量;
根据最小二乘法采用线性函数拟合算法对所述平移向量和预设的平移系数进行处理,生成平移运动轨迹;
从所述平移运动轨迹中提取与所述目标图像的时间点信息对应的目标平移姿态分量。
可选地,所述装置,还包括:
第一确定模块,用于根据所述参考图像和所述目标图像的图像帧数确定所述平移系数。
可选地,所述第三生成模块505,用于:
对所述目标旋转姿态分量和所述目标平移姿态分量进行点乘处理,生成所述目标对象在所述目标图像中的第三变换矩阵,将所述第三变换矩阵确定为所述目标对象在所述目标图像中的第三姿态估计。
本公开实施例所提供的姿态估计装置可执行本公开任意实施例所提供的姿态估计方法,具备执行方法相应的功能模块和有益效果。
本公开实施例还提供了一种计算机程序产品,包括计算机程序/指令,该计算机程序/指令被处理器执行时实现本公开任意实施例所提供的姿态估计方法。
图6为本公开实施例提供的一种电子设备的结构示意图。
下面具体参考图6,其示出了适于用来实现本公开实施例中的电子设备600的结构示意图。本公开实施例中的电子设备600可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、车载终端(例如车载导航终端)、可穿戴电子设备等等的移动终端以及诸如数字TV、台式计算机、智能家居设备等等的固定终端。图6示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。
如图6所示,电子设备600可以包括处理装置(例如中央处理器、图形处理器等)601,其可以根据存储在只读存储器(ROM)602中的程序或者从存储装置608加载到随机访问存储器(RAM)603中的程序而执行各种适当的动作和处理。在RAM 603中,还存储有电子设备600操作所需的各种程序和数据。处理装置601、ROM 602以及RAM 603通过总线604彼此相连。输入/输出(I/O)接口605也连接至总线604。
通常,以下装置可以连接至I/O接口605:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置606;包括例如液晶显示器(LCD)、扬声 器、振动器等的输出装置607;包括例如磁带、硬盘等的存储装置608;以及通信装置609。通信装置609可以允许电子设备600与其他设备进行无线或有线通信以交换数据。虽然图6示出了具有各种装置的电子设备600,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在非暂态计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置609从网络上被下载和安装,或者从存储装置608被安装,或者从ROM 602被安装。在该计算机程序被处理装置601执行时,执行本公开实施例的姿态估计方法中限定的上述功能。
需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。
在一些实施方式中,客户端、服务器可以利用诸如HTTP(HyperText Transfer Protocol,超文本传输协议)之类的任何当前已知或未来研发的网络协议进行通信,并且可以与任意形式或介质的数字数据通信(例如,通信网络)互连。通信网络的示例包括局域网(“LAN”),广域网(“WAN”),网际网(例如,互联网)以及端对端网络(例如,ad hoc端对端网络),以及任何当前已知或未来研发的网络。
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:根据时序信息获取目标图像在时序上的前后多帧连续参考图像;获取目标对象在每帧参考图像中的第一姿态估计,以及目标对象在目标图像中的第二姿态估计;根据预设旋转平滑算法对至少一个第一姿态估计的旋转姿态分量和第二姿态估计的旋转姿态分量进行处理,生成目标旋转姿态分量;根据预设平移平滑算法对每个第一姿态估计的平移姿态分量和第二姿态估计的平移姿态分量进行处理,生成目标平移姿态分量;根据目标旋转姿态分量和目标平移姿态分量生成目标对象在目标图像中的第三姿态估计。本公开实施例生成的第三姿态估计具有良好的稳定性,以及跟随性,避免了漂浮感的产生,从而提升了用户的体验感和满意度。
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括但不限于面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本公开实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,单元的名称在某种情况下并不构成对该单元本身的限定。
本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、片上系统(SOC)、复杂可编程逻辑设备(CPLD)等等。
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。
根据本公开的一个或多个实施例,本公开提供了一种姿态估计方法,包括:
根据时序信息获取目标图像在时序上的前后多帧连续参考图像;
获取目标对象在每帧所述参考图像中的第一姿态估计,以及所述目标对象在所述目标图像中的第二姿态估计;
根据预设旋转平滑算法对至少一个所述第一姿态估计的旋转姿态分量和所述第二姿态估计的旋转姿态分量进行处理,生成目标旋转姿态分量;
根据预设平移平滑算法对每个所述第一姿态估计的平移姿态分量和所述第二姿态估计的平移姿态分量进行处理,生成目标平移姿态分量;
根据所述目标旋转姿态分量和所述目标平移姿态分量生成所述目标对象在所述目标图像中的第三姿态估计。
根据本公开的一个或多个实施例,本公开提供的一种姿态估计方法中,所述获取目标对象在每帧所述参考图像中的第一姿态估计,以及所述目标对象在所述目标图像中的第二姿态估计,包括:
获取所述目标对象从预设的初始位置到每帧所述参考图像中的目标位置对应的第一变换矩阵,将所述第一变换矩阵确定为所述目标对象在每帧所述参考图像中的第一姿态估计;以及
获取所述目标对象从所述初始位置到所述目标图像中目标位置的第二变换矩阵,将所述第二变换矩阵确定为所述目标对象在所述目标图像中的第二姿态估计。
根据本公开的一个或多个实施例,本公开提供的一种姿态估计方法中,还包括:
根据预设的四元数和旋转表示的关联算法对至少一个所述第一变换矩阵进行计算获取至少一个所述第一变换矩阵的旋转姿态分量,且对所述第二变换矩阵进行计算获取所述第二变换矩阵的旋转姿态分量;以及,
对每个所述第一变换矩阵分别提取所述目标对象在横轴、竖轴和纵轴上的平移,获取 每个所述第一变换矩阵的平移姿态分量,且对所述第二变换矩阵提取所述目标对象在横轴、竖轴和纵轴上的平移,获取所述第二变换矩阵的平移姿态分量。
根据本公开的一个或多个实施例,本公开提供的一种姿态估计方法中,所述根据预设旋转平滑算法对至少一个所述第一姿态估计的旋转姿态分量和所述第二姿态估计的旋转姿态分量进行处理,生成目标旋转姿态分量,包括:
获取所述目标对象在所述目标图像前一帧参考图像的第一变换矩阵的旋转姿态分量;
获取所述目标对象在所述目标图像的第二变换矩阵的旋转姿态分量;
根据预设的球面线性插值算法对所述前一帧参考图像的第一变换矩阵的旋转姿态分量、所述目标图像的第二变换矩阵的旋转姿态分量,以及预设的旋转平滑系数进行处理,生成目标旋转姿态分量。
根据本公开的一个或多个实施例,本公开提供的一种姿态估计方法中,还包括:
根据预设算法对所述前一帧参考图像的第一变换矩阵的旋转姿态分量和所述目标图像的第二变换矩阵的旋转姿态分量进行计算获取第一结果;
取所述第一结果和预设的第一系数之间的最大值作为第二结果;
根据预设算法对所述第二结果进行处理生成第三结果;
取所述第三结果和预设的第二系数之间的最小值作为所述旋转平滑系数。
根据本公开的一个或多个实施例,本公开提供的一种姿态估计方法中,所述根据预设平移平滑算法对每个所述第一姿态估计的平移姿态分量和所述第二姿态估计的平移姿态分量进行处理,生成目标平移姿态分量,包括:
获取所述目标对象在每一帧所述参考图像的第一变换矩阵的平移姿态分量;
获取所述目标对象在所述目标图像的第二变换矩阵的平移姿态分量;
基于每一帧所述参考图像的第一变换矩阵的平移姿态分量和所述目标图像的第二变换矩阵的平移姿态分量,根据时序信息生成平移向量;
根据最小二乘法采用线性函数拟合算法对所述平移向量和预设的平移系数进行处理,生成平移运动轨迹;
从所述平移运动轨迹中提取与所述目标图像的时间点信息对应的目标平移姿态分量。
根据本公开的一个或多个实施例,本公开提供的一种姿态估计方法中,还包括:
根据所述参考图像和所述目标图像的图像帧数确定所述平移系数。
根据本公开的一个或多个实施例,本公开提供的一种姿态估计方法中,所述根据所述目标旋转姿态分量和所述目标平移姿态分量生成所述目标对象在所述目标图像中的第三姿态估计,包括:
对所述目标旋转姿态分量和所述目标平移姿态分量进行点乘处理,生成所述目标对象 在所述目标图像中的第三变换矩阵,将所述第三变换矩阵确定为所述目标对象在所述目标图像中的第三姿态估计。
根据本公开的一个或多个实施例,本公开提供了一种姿态估计装置,包括:
第一获取模块,用于根据时序信息获取目标图像在时序上的前后多帧连续参考图像;
第二获取模块,用于获取目标对象在每帧所述参考图像中的第一姿态估计,以及所述目标对象在所述目标图像中的第二姿态估计;
第一生成模块,用于根据预设旋转平滑算法对至少一个所述第一姿态估计的旋转姿态分量和所述第二姿态估计的旋转姿态分量进行处理,生成目标旋转姿态分量;
第二生成模块,用于根据预设平移平滑算法对每个所述第一姿态估计的平移姿态分量和所述第二姿态估计的平移姿态分量进行处理,生成目标平移姿态分量;
第三生成模块,用于根据所述目标旋转姿态分量和所述目标平移姿态分量生成所述目标对象在所述目标图像中的第三姿态估计。
根据本公开的一个或多个实施例,本公开提供的一种姿态估计装置中,所述第二获取模块,用于:
获取所述目标对象从预设的初始位置到每帧所述参考图像中的目标位置对应的第一变换矩阵,将所述第一变换矩阵确定为所述目标对象在每帧所述参考图像中的第一姿态估计;以及
获取所述目标对象从所述初始位置到所述目标图像中目标位置的第二变换矩阵,将所述第二变换矩阵确定为所述目标对象在所述目标图像中的第二姿态估计。
根据本公开的一个或多个实施例,本公开提供的一种姿态估计装置中,所述装置,还包括:
第一计算模块,用于根据预设的四元数和旋转表示的关联算法对至少一个所述第一变换矩阵进行计算获取至少一个所述第一变换矩阵的旋转姿态分量,且对所述第二变换矩阵进行计算获取所述第二变换矩阵的旋转姿态分量;以及,
第二计算模块,用于对每个所述第一变换矩阵分别提取所述目标对象在横轴、竖轴和纵轴上的平移,获取每个所述第一变换矩阵的平移姿态分量,且对所述第二变换矩阵提取所述目标对象在横轴、竖轴和纵轴上的平移,获取所述第二变换矩阵的平移姿态分量。
根据本公开的一个或多个实施例,本公开提供的一种姿态估计装置中,所述第一生成模块,用于:
获取所述目标对象在所述目标图像前一帧参考图像的第一变换矩阵的旋转姿态分量;
获取所述目标对象在所述目标图像的第二变换矩阵的旋转姿态分量;
根据预设的球面线性插值算法对所述前一帧参考图像的第一变换矩阵的旋转姿态分量、所述目标图像的第二变换矩阵的旋转姿态分量,以及预设的旋转平滑系数进行处理,生成目标旋转姿态分量。
根据本公开的一个或多个实施例,本公开提供的一种姿态估计装置中,所述装置,还包括:
第三获取模块,用于根据预设算法对所述前一帧参考图像的第一变换矩阵的旋转姿态分量和所述目标图像的第二变换矩阵的旋转姿态分量进行计算获取第一结果;
第四获取模块,用于取所述第一结果和预设的第一系数之间的最大值作为第二结果;
第四生成模块,用于根据预设算法对所述第二结果进行处理生成第三结果;
第五获取模块,用于取所述第三结果和预设的第二系数之间的最小值作为所述旋转平滑系数。
根据本公开的一个或多个实施例,本公开提供的一种姿态估计装置中,第二生成模块,用于:
获取所述目标对象在每一帧所述参考图像的第一变换矩阵的平移姿态分量;
获取所述目标对象在所述目标图像的第二变换矩阵的平移姿态分量;
基于每一帧所述参考图像的第一变换矩阵的平移姿态分量和所述目标图像的第二变换矩阵的平移姿态分量,根据时序信息生成平移向量;
根据最小二乘法采用线性函数拟合算法对所述平移向量和预设的平移系数进行处理,生成平移运动轨迹;
从所述平移运动轨迹中提取与所述目标图像的时间点信息对应的目标平移姿态分量。
根据本公开的一个或多个实施例,本公开提供的一种姿态估计装置中,所述装置,还包括:
第一确定模块,用于根据所述参考图像和所述目标图像的图像帧数确定所述平移系数。
根据本公开的一个或多个实施例,本公开提供的一种姿态估计装置中,所述第三生成模块,用于:
对所述目标旋转姿态分量和所述目标平移姿态分量进行点乘处理,生成所述目标对象在所述目标图像中的第三变换矩阵,将所述第三变换矩阵确定为所述目标对象在所述目标图像中的第三姿态估计。
根据本公开的一个或多个实施例,本公开提供了一种电子设备,包括:
处理器;
用于存储所述处理器可执行指令的存储器;
所述处理器,用于从所述存储器中读取所述可执行指令,并执行所述指令以实现如本公开提供的任一所述的姿态估计方法。
根据本公开的一个或多个实施例,本公开提供了一种计算机可读存储介质,所述存储介质存储有计算机程序,所述计算机程序用于执行如本公开提供的任一所述的姿态估计方法。
以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开中所涉及的公开范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述公开构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。
此外,虽然采用特定次序描绘了各操作,但是这不应当理解为要求这些操作以所示出的特定次序或以顺序次序执行来执行。在一定环境下,多任务和并行处理可能是有利的。同样地,虽然在上面论述中包含了若干具体实现细节,但是这些不应当被解释为对本公开的范围的限制。在单独的实施例的上下文中描述的某些特征还可以组合地实现在单个实施例中。相反地,在单个实施例的上下文中描述的各种特征也可以单独地或以任何合适的子组合的方式实现在多个实施例中。
尽管已经采用特定于结构特征和/或方法逻辑动作的语言描述了本主题,但是应当理解所附权利要求书中所限定的主题未必局限于上面描述的特定特征或动作。相反,上面所描述的特定特征和动作仅仅是实现权利要求书的示例形式。

Claims (12)

  1. 一种姿态估计方法,其特征在于,包括:
    根据时序信息获取目标图像在时序上的前后多帧连续参考图像;
    获取目标对象在每帧所述参考图像中的第一姿态估计,以及所述目标对象在所述目标图像中的第二姿态估计;
    根据预设旋转平滑算法对至少一个所述第一姿态估计的旋转姿态分量和所述第二姿态估计的旋转姿态分量进行处理,生成目标旋转姿态分量;
    根据预设平移平滑算法对每个所述第一姿态估计的平移姿态分量和所述第二姿态估计的平移姿态分量进行处理,生成目标平移姿态分量;
    根据所述目标旋转姿态分量和所述目标平移姿态分量生成所述目标对象在所述目标图像中的第三姿态估计。
  2. 根据权利要求1所述的方法,其特征在于,所述获取目标对象在每帧所述参考图像中的第一姿态估计,以及所述目标对象在所述目标图像中的第二姿态估计,包括:
    获取所述目标对象从预设的初始位置到每帧所述参考图像中的目标位置对应的第一变换矩阵,将所述第一变换矩阵确定为所述目标对象在每帧所述参考图像中的第一姿态估计;以及
    获取所述目标对象从所述初始位置到所述目标图像中目标位置的第二变换矩阵,将所述第二变换矩阵确定为所述目标对象在所述目标图像中的第二姿态估计。
  3. 根据权利要求2所述的方法,其特征在于,还包括:
    根据预设的四元数和旋转表示的关联算法对至少一个所述第一变换矩阵进行计算获取至少一个所述第一变换矩阵的旋转姿态分量,且对所述第二变换矩阵进行计算获取所述第二变换矩阵的旋转姿态分量;以及,
    对每个所述第一变换矩阵分别提取所述目标对象在横轴、竖轴和纵轴上的平移,获取每个所述第一变换矩阵的平移姿态分量,且对所述第二变换矩阵提取所述目标对象在横轴、竖轴和纵轴上的平移,获取所述第二变换矩阵的平移姿态分量。
  4. 根据权利要求2所述的方法,其特征在于,所述根据预设旋转平滑算法对至少一个所述第一姿态估计的旋转姿态分量和所述第二姿态估计的旋转姿态分量进行处理,生成目标旋转姿态分量,包括:
    获取所述目标对象在所述目标图像前一帧参考图像的第一变换矩阵的旋转姿态分量;
    获取所述目标对象在所述目标图像的第二变换矩阵的旋转姿态分量;
    根据预设的球面线性插值算法对所述前一帧参考图像的第一变换矩阵的旋转姿态分量、所述目标图像的第二变换矩阵的旋转姿态分量,以及预设的旋转平滑系数进行处理,生成目标旋转姿态分量。
  5. 根据权利要求4所述的方法,其特征在于,还包括:
    根据预设算法对所述前一帧参考图像的第一变换矩阵的旋转姿态分量和所述目标图像的第二变换矩阵的旋转姿态分量进行计算获取第一结果;
    取所述第一结果和预设的第一系数之间的最大值作为第二结果;
    根据预设算法对所述第二结果进行处理生成第三结果;
    取所述第三结果和预设的第二系数之间的最小值作为所述旋转平滑系数。
  6. 根据权利要求2所述的方法,其特征在于,所述根据预设平移平滑算法对每个所述第一姿态估计的平移姿态分量和所述第二姿态估计的平移姿态分量进行处理,生成目标平移姿态分量,包括:
    获取所述目标对象在每一帧所述参考图像的第一变换矩阵的平移姿态分量;
    获取所述目标对象在所述目标图像的第二变换矩阵的平移姿态分量;
    基于每一帧所述参考图像的第一变换矩阵的平移姿态分量和所述目标图像的第二变换矩阵的平移姿态分量,根据时序信息生成平移向量;
    根据最小二乘法采用线性函数拟合算法对所述平移向量和预设的平移系数进行处理,生成平移运动轨迹;
    从所述平移运动轨迹中提取与所述目标图像的时间点信息对应的目标平移姿态分量。
  7. 根据权利要求6所述的方法,其特征在于,还包括:
    根据所述参考图像和所述目标图像的图像帧数确定所述平移系数。
  8. 根据权利要求2-7任一所述的方法,其特征在于,所述根据所述目标旋转姿态分量和所述目标平移姿态分量生成所述目标对象在所述目标图像中的第三姿态估计,包括:
    对所述目标旋转姿态分量和所述目标平移姿态分量进行点乘处理,生成所述目标对象在所述目标图像中的第三变换矩阵,将所述第三变换矩阵确定为所述目标对象在所述目标图像中的第三姿态估计。
  9. 一种姿态估计装置,其特征在于,所述装置包括:
    第一获取模块,用于根据时序信息获取目标图像在时序上的前后多帧连续参考图像;
    第二获取模块,用于获取目标对象在每帧所述参考图像中的第一姿态估计,以及所述目标对象在所述目标图像中的第二姿态估计;
    第一生成模块,用于根据预设旋转平滑算法对至少一个所述第一姿态估计的旋转姿态分量和所述第二姿态估计的旋转姿态分量进行处理,生成目标旋转姿态分量;
    第二生成模块,用于根据预设平移平滑算法对每个所述第一姿态估计的平移姿态分量和所述第二姿态估计的平移姿态分量进行处理,生成目标平移姿态分量;
    第三生成模块,用于根据所述目标旋转姿态分量和所述目标平移姿态分量生成所述目 标对象在所述目标图像中的第三姿态估计。
  10. 一种电子设备,其特征在于,所述电子设备包括:
    处理器;
    存储器,用于存储所述处理器可执行指令;
    所述处理器,用于从所述存储器中读取所述可执行指令,并执行所述指令以实现上述权利要求1-8中任一项所述的姿态估计方法。
  11. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有指令,当所述指令在终端设备上运行时,使得所述终端设备实现如权利要求1-8任一项所述的姿态估计方法。
  12. 一种计算机程序产品,其特征在于,所述计算机程序产品包括计算机程序/指令,所述计算机程序/指令被处理器执行时实现如权利要求1-8任一项所述的姿态估计方法。
PCT/CN2022/092160 2021-07-29 2022-05-11 一种姿态估计方法、装置、设备及介质 WO2023005341A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110867072.6 2021-07-29
CN202110867072.6A CN115689898A (zh) 2021-07-29 2021-07-29 一种姿态估计方法、装置、设备及介质

Publications (1)

Publication Number Publication Date
WO2023005341A1 true WO2023005341A1 (zh) 2023-02-02

Family

ID=85059338

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/092160 WO2023005341A1 (zh) 2021-07-29 2022-05-11 一种姿态估计方法、装置、设备及介质

Country Status (2)

Country Link
CN (1) CN115689898A (zh)
WO (1) WO2023005341A1 (zh)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106296598A (zh) * 2016-07-29 2017-01-04 厦门美图之家科技有限公司 三维姿态处理方法、系统及拍摄终端
US20170132794A1 (en) * 2015-11-05 2017-05-11 Samsung Electronics Co., Ltd. Pose estimation method and apparatus
CN109788189A (zh) * 2017-11-13 2019-05-21 三星电子株式会社 将相机与陀螺仪融合在一起的五维视频稳定化装置及方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170132794A1 (en) * 2015-11-05 2017-05-11 Samsung Electronics Co., Ltd. Pose estimation method and apparatus
CN106296598A (zh) * 2016-07-29 2017-01-04 厦门美图之家科技有限公司 三维姿态处理方法、系统及拍摄终端
CN109788189A (zh) * 2017-11-13 2019-05-21 三星电子株式会社 将相机与陀螺仪融合在一起的五维视频稳定化装置及方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
DU DENG-CHONG, JIANG XIAO-YU, YAO JUN: "Electronic image stabilization algorithm for estimating rotation and translation simultaneously", COMPUTER ENGINEERING AND APPLICATIONS, HUABEI JISUAN JISHU YANJIUSUO, CN, vol. 46, no. 4, 1 February 2010 (2010-02-01), CN , pages 233 - 235, XP093029169, ISSN: 1002-8331, DOI: 10.3778/j.issn.1002-8331.2010.04.073 *

Also Published As

Publication number Publication date
CN115689898A (zh) 2023-02-03

Similar Documents

Publication Publication Date Title
WO2019205852A1 (zh) 确定图像捕捉设备的位姿的方法、装置及其存储介质
WO2020186935A1 (zh) 虚拟对象的显示方法、装置、电子设备和计算机可读存储介质
US20150279083A1 (en) Real-time three-dimensional reconstruction of a scene from a single camera
CN111292420B (zh) 用于构建地图的方法和装置
JP7361060B2 (ja) 3d関節点回帰モデル生成方法及び装置、電子機器、コンピュータ可読記憶媒体並びにコンピュータプログラム
CN109754464B (zh) 用于生成信息的方法和装置
CN110555798B (zh) 图像变形方法、装置、电子设备及计算机可读存储介质
WO2023029893A1 (zh) 纹理映射方法、装置、设备及存储介质
CN110956131A (zh) 单目标追踪方法、装置及系统
CN112204621A (zh) 基于计算设备能力简档的虚拟骨架
WO2022033444A1 (zh) 动态流体效果处理方法、装置、电子设备和可读介质
CN111652675A (zh) 展示方法、装置和电子设备
CN111915532B (zh) 图像追踪方法、装置、电子设备及计算机可读介质
WO2023005341A1 (zh) 一种姿态估计方法、装置、设备及介质
US8872832B2 (en) System and method for mesh stabilization of facial motion capture data
WO2023151558A1 (zh) 用于显示图像的方法、装置和电子设备
WO2023025085A1 (zh) 视频处理方法、装置、设备、介质及程序产品
CN110069195B (zh) 图像拖拽变形方法和装置
CN110717467A (zh) 头部姿势的估计方法、装置、设备及存储介质
WO2022218104A1 (zh) 虚拟形象的碰撞处理方法、装置、电子设备和存储介质
CN114116081B (zh) 交互式动态流体效果处理方法、装置及电子设备
CN116071454A (zh) 发丝处理方法、装置、设备及存储介质
WO2023005725A1 (zh) 一种姿态估计方法、装置、设备及介质
CN110070479B (zh) 图像变形拖拽点定位方法和装置
WO2022135022A1 (zh) 动态流体显示方法、装置、电子设备和可读介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22847955

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 18566494

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE