Pose processing method, device, computer device and storage medium
By spline fitting the position of the mandibular motion trajectory of the tooth, smooth second position information is generated, and the problem of incoherent and jitter movement of the pose driving object in the prior art is solved, and a smooth motion trajectory is achieved.
Patent Information
- Application Number
- CN202411261703.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-10
- Publication Date
- 2025-06-17
- Estimated Expiration
- 2044-09-10
AI Technical Summary
When calculating the position of the tooth jaw motion trajectory, due to the presence of noise, the movement of the object driven by the position is incoherent and jittered.
By obtaining the initial position parameters and multiple consecutive first pose information, the first trajectory is determined, and the first trajectory is trajectory fitting process is performed using the preset spline fitting function to obtain a smooth second trajectory. Then, the rotation parameters and translation parameters of the second track point are fitted to obtain smooth second pose information.
The smoothing treatment of position pose is achieved, the smoothness of the object's motion trajectory is ensured, and the problems of motion incoherence and jitter are avoided.
Smart Images

Figure CN118887295B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of data processing, and in particular, to a pose processing method, apparatus, computer device, and storage medium. Background Art
[0002] With the improvement of people's living quality, more and more people pay attention to oral problems. Among them, the mandible is one of the most frequently moving parts of the human body. The mandibular movement of human teeth is a complex three-dimensional movement controlled by the central nervous system, involving muscles, temporomandibular joints, and occlusion, and is closely related to the health status of the human chewing system.
[0003] When dental occlusion is damaged, the mandibular movement trajectory (initial position and a set of consecutive poses) of the patient's teeth can be transmitted to software, and the movement can be simulated by driving a tooth model during the design process to create a suitable prosthesis. However, in the prior art, when calculating the poses of the movement trajectory, due to the existence of noise, etc., the obtained poses usually have errors, resulting in inconsistent and jittery movement of the object driven by the poses. Summary of the Invention
[0004] Embodiments of this application provide a pose processing method, apparatus, computer device, and storage medium, which can smooth multiple poses and drive an object through the smoothed poses to solve the problems of inconsistent and jittery movement of the object.
[0005] In a first aspect, embodiments of this application provide a pose processing method, which includes: obtaining an initial position parameter and multiple consecutive first pose information, where the first pose information includes a first rotation parameter and a first translation parameter;
[0006] Determining a first trajectory according to the initial position parameter and the multiple first pose information, where the first trajectory includes first trajectory points corresponding to the respective first pose information;
[0007] Performing trajectory fitting processing on the first trajectory according to a preset spline fitting function to obtain a second trajectory, where the second trajectory includes second trajectory points corresponding to the respective first trajectory points;
[0008] Performing rotation fitting processing on the multiple first rotation parameters according to the spline fitting function to obtain second rotation parameters corresponding to the respective second trajectory points;
[0009] For each of the second trajectory points, determine a second translation parameter according to the initial position parameter, the corresponding second rotation parameter, and the trajectory point position parameter of the second trajectory point, and determine the corresponding second rotation parameter and the corresponding second translation parameter as the second pose information of the second trajectory point, so as to obtain the second pose information of each of the second trajectory points.
[0010] In a second aspect, an embodiment of the present application further provides a pose processing device, which includes:
[0011] a transceiver unit, configured to obtain an initial position parameter and a plurality of consecutive first pose information, where the first pose information includes a first rotation parameter and a first translation parameter;
[0012] a processing unit, configured to determine a first trajectory according to the initial position parameter and the plurality of first pose information, where the first trajectory includes first trajectory points respectively corresponding to the first pose information; perform trajectory fitting processing on the first trajectory according to a preset spline fitting function to obtain a second trajectory, where the second trajectory includes second trajectory points respectively corresponding to the first trajectory points; perform rotation fitting processing on the plurality of first rotation parameters according to the spline fitting function to obtain second rotation parameters respectively corresponding to the second trajectory points; for each of the second trajectory points, determine a second translation parameter according to the initial position parameter, the corresponding second rotation parameter, and the trajectory point position parameter of the second trajectory point, and determine the corresponding second rotation parameter and the corresponding second translation parameter as the second pose information of the second trajectory point, so as to obtain the second pose information of each of the second trajectory points.
[0013] In a third aspect, an embodiment of the present application further provides a computer device, which includes a memory and a processor, where a computer program is stored on the memory, and when the processor executes the computer program, the above method is implemented.
[0014] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the storage medium, and the computer program includes program instructions, and when the program instructions are executed by a processor, the above method can be implemented.
[0015] The embodiments of the present application provide a pose processing method, apparatus, computer device, and storage medium. Among them, the method includes: first, obtaining an initial position parameter and a plurality of consecutive first pose information, where the first pose information includes a first rotation parameter and a first translation parameter; then determining a first trajectory according to the initial position parameter and the plurality of first pose information, and the first trajectory includes first trajectory points corresponding to the respective first pose information; then performing trajectory fitting processing on the first trajectory according to a preset spline fitting function to obtain a second trajectory, and the second trajectory includes second trajectory points corresponding to the respective first trajectory points; performing rotation fitting processing on the plurality of first rotation parameters according to the spline fitting function to obtain second rotation parameters corresponding to the respective second trajectory points; finally, for each second trajectory point, determining a second translation parameter according to the initial position parameter, the corresponding second rotation parameter, and the trajectory point position parameter of the second trajectory point, and determining the corresponding second rotation parameter and the corresponding second translation parameter as the second pose information of the second trajectory point, so as to obtain the second pose information of each second trajectory point. After obtaining the initial multiple pose information and generating the initial first trajectory in the embodiments of the present application, the first trajectory will be subjected to fitting processing to obtain a smooth second trajectory, and then the pose of each trajectory point will be smoothed based on the smooth second trajectory to obtain the smoothed second pose information corresponding to each trajectory point, realizing the smoothing processing of the pose; in addition, since the present application constrains the second pose information through the smooth second trajectory, it can be ensured that the trajectory generated by the second pose information is smooth. Driving an object through the second pose information can ensure that its motion trajectory is smooth, thereby avoiding problems of inconsistent motion and jitter. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0017] Figure 1 It is a schematic flowchart of the pose processing method provided by the embodiments of the present application;
[0018] Figure 2 It is a schematic sub - flowchart of the pose processing method provided by the embodiments of the present application;
[0019] Figure 3 It is a schematic block diagram of the pose processing apparatus provided by the embodiments of the present application;
[0020] Figure 4 It is a schematic block diagram of the computer device provided by the embodiments of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0021] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are some, but not all, of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without creative efforts shall fall within the protection scope of the present application.
[0022] It should be understood that when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their combinations.
[0023] It should also be understood that the terms used in this specification of the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in this specification of the present application and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an", and "the" are intended to include the plural forms.
[0024] It should be further understood that the term "and / or" used in this specification of the present application and the appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0025] The embodiments of the present application provide a pose processing method, device, computer device, and storage medium.
[0026] The execution subject of the pose processing method may be the pose processing device provided in the embodiments of the present application, or a computer device integrated with the pose processing device. Among them, the pose processing device may be implemented in a hardware or software manner, and the computer device may be a terminal or a server. After obtaining the initial position parameter and a plurality of consecutive first pose information, the plurality of first pose information is smoothed, and the object is driven by the smoothed pose to solve the problems of discontinuous movement and jitter of the object.
[0027] Among them, the pose processing method provided by the embodiments of the present application can be applied to the scenario of smoothing the movement trajectory of the human mandible, and can also be applied to any other scenarios that require smoothing the trajectory with known initial positions and poses, such as the driving scenario of a robot for an object, the scenario of smoothing the movement trajectory of a robot or a machine. The specific application scenarios of the pose processing method in the embodiments of the present application are not limited. Among them, the target object of the pose processing method can be a three-dimensional model or data obtained by scanning, and its data source is an industrial scanner, a facial scanner, or CBCT data or CT data; the target object of the pose processing method can also be a three-dimensional model virtually designed or simulated through algorithms such as artificial intelligence, such as a three-dimensional model after simulated orthodontics or jaw relation treatment; the target object of the pose processing method can also be a robot, a machine, or an object to be driven.
[0028] Figure 1 is a schematic flowchart of the pose processing method provided by the embodiments of the present application. As Figure 1 shown, the method includes the following steps S110 - S150.
[0029] S110. Obtain the initial position parameters and multiple consecutive first pose information, where the first pose information includes a first rotation parameter and a first translation parameter.
[0030] In some embodiments, the initial position parameters and the first pose information are data calculated by monitoring the movement of the patient's mandible or data virtually designed or simulated through algorithms such as artificial intelligence. The multiple consecutive first pose information is a set of consecutive poses, and the initial position parameters are the initial position parameters of the patient's mandible, specifically the position information of the patient's mandible in three-dimensional space, such as the initial position vector p, where , x, y, and z are the coordinate values of the patient's mandible on each axis of the reference coordinate axis before mandibular movement.
[0031] S120. Determine a first trajectory according to the initial position parameters and the multiple first pose information, where the first trajectory includes first trajectory points corresponding to the respective first pose information.
[0032] In this embodiment, the first trajectory is composed of first trajectory points corresponding to the respective first pose information, and each first trajectory point corresponds to a trajectory point position parameter, which can be three-dimensional coordinates.
[0033] S130. Perform trajectory fitting processing on the first trajectory according to a preset spline fitting function to obtain a second trajectory, where the second trajectory includes second trajectory points corresponding to the respective first trajectory points.
[0034] In some embodiments, please refer to Figure 2, specifically, the second trajectory can be obtained through steps S1301 - S1305:
[0035] S1301. Determine the spline curve of the first trajectory.
[0036] In some embodiments, at the beginning, the initial curve construction method of the cubic spline curve can be used to construct the spline curve of the first trajectory.
[0037] S1302. Determine the trajectory error value between the spline curve and the first trajectory according to the spline fitting function.
[0038] Specifically, in this embodiment, the spline fitting function is:
[0039] (1);
[0040] where f SD is the trajectory error value, is the regularization term coefficient, which is an empirical value, f s is the regularization term of the spline curve, e SD,k is the trajectory point P tk on the spline curve and the corresponding trajectory point X k on the first trajectory, and e SD,k is calculated by formula (2):
[0041] (2);
[0042] where T k is the tangent of the trajectory point P tk on the spline curve, N k is the normal of the trajectory point P tk on the spline curve, is the radius of curvature of the trajectory point P tk on the spline curve, is the distance between the trajectory point P tk and the corresponding trajectory point X k .
[0043] In some embodiments, the regularization term of the spline curve is calculated by formula (3):
[0044] (3);
[0045] where F1 is the length of the spline curve, F2 is the change trend value of the spline curve, is the control coefficient of F1, which is an empirical value, such as 0.01, β is the control coefficient of F2, which is an empirical value, such as 0.001, , p(t) is the spline curve.
[0046] S1303. Determine whether the spline curve meets the preset convergence condition according to the error value; if so, execute step S1305, otherwise execute step S1304.
[0047] Among them, the convergence condition includes that the calculated error value is less than the preset error threshold, and / or the change amount between the error values calculated continuously for n times and the error value of the previous iteration period is less than the preset change amount threshold, where n is an integer greater than 1.
[0048] S1304. Update the spline curve according to the preset spline curve fitting rule, and return to execute step S1302.
[0049] Among them, when the obtained error value does not meet the preset convergence condition, it is necessary to update the spline curve to obtain a smooth spline curve with the smallest error value.
[0050] In some embodiments, the spline curve fitting rule can be an interpolation rule, that is, the spline curve is updated by adding control points.
[0051] S1305. Determine the spline curve as the second trajectory.
[0052] In this embodiment, when the error value meets the convergence condition, it means that the current spline curve meets the requirements, and the spline curve is determined as the second trajectory.
[0053] Among them, the trajectory point closest to each first trajectory point in the curve of the second trajectory is determined as the second trajectory point, so as to determine the second trajectory point corresponding to each first trajectory point in the second trajectory.
[0054] In some embodiments, since the motion trajectory (the first trajectory) is sometimes complex, it is difficult for the spline fitting function to directly fit it, and there will be a large error. To reduce the fitting difficulty and improve the fitting accuracy, in this embodiment, before fitting the first trajectory, the first trajectory will be grouped first, and then the trajectories of each group will be smoothed (fitted) separately.
[0055] At this time, before performing the step of performing trajectory fitting processing on the first trajectory according to the preset spline fitting function to obtain the second trajectory, the method further includes:
[0056] Obtain the time parameters of each first pose information; according to the time parameters and the trajectory point position parameters of each first trajectory point, respectively determine the curve slopes of each first trajectory point; according to the curve slopes, determine multiple first trajectory points as first state trajectory points and second state trajectory points, where the first state trajectory points are the trajectory points among the multiple first trajectory points whose curve slopes are greater than or equal to a preset slope threshold, and the second state trajectory points are the trajectory points among the multiple first trajectory points whose curve slopes are less than the preset slope threshold; according to a preset trajectory point quantity threshold, perform grouping processing on consecutive first state trajectory points in the first trajectory to obtain at least one first trajectory point group.
[0057] Specifically, in this embodiment, according to the time parameters of each first pose information, perform time-domain expansion on the first trajectory to obtain the change of the trajectory over time, and calculate the curve slopes of each trajectory point in the first trajectory. Among them, the larger the slope, the greater the movement amplitude of the trajectory point, and the smaller the slope, the smaller the movement amplitude of the trajectory point. In this application, the trajectory points whose curve slopes are greater than or equal to a preset slope threshold (such as 0.5) are determined as first state trajectory points (such as motion state trajectory points), and the trajectory points whose curve slopes are less than the preset slope threshold are determined as second state trajectory points (such as stationary state trajectory points).
[0058] Among them, in this embodiment, the multiple first trajectory points on the first trajectory are sequential and continuous. In this embodiment, segment processing is performed on each trajectory point in order from front to back. Specifically, each first trajectory point is polled in order from front to back, and the consecutive first trajectory points whose slopes are greater than or equal to the preset slope threshold are divided into one segment (i.e., one group). When a trajectory point whose slope is less than the preset slope threshold appears, start the next segment (the next group). When a slope greater than or equal to the preset slope threshold appears again, start the next segment. In this way, multiple segments of trajectory points are usually obtained, and it is also possible to obtain only one segment of trajectory points. Spline fitting is performed within each segment.
[0059] For consecutive first state trajectory points (i.e., consecutive first trajectory points whose slopes are greater than or equal to the preset slope threshold), it is also necessary to control their grouping size. In this embodiment, the consecutive first state trajectory points are grouped with the trajectory point quantity threshold as the limit. Among them, the trajectory point quantity threshold can be set to 30, or can be set to other values according to actual needs. The specific value of the trajectory point quantity threshold is not limited in this embodiment.
[0060] Then, for each first trajectory point group, perform trajectory fitting processing on the first trajectory point group according to the spline fitting function to obtain a second trajectory corresponding to each first trajectory point group.
[0061] Specifically, for each first trajectory point group, the second trajectory of each first trajectory point group is determined through steps S1301 - S1305. At this time, each first trajectory point group is equivalent to the first trajectory in steps S1301 - S1305.
[0062] In addition, if there are second - state trajectory points, the continuous second - state trajectory points in the first trajectory are determined as second trajectory point groups, obtaining at least one second trajectory point group; for each second trajectory point group, the mean value of the trajectory - point position parameters is determined according to the trajectory - point position parameters of the second - state trajectory points in the second trajectory point group, and the second - state trajectory points in the second trajectory point group are smoothed according to the mean value of the trajectory - point position parameters, obtaining the second trajectory corresponding to each second trajectory point group respectively.
[0063] It can be seen that in this embodiment, for the trajectory points in the second - state trajectory point group, the spline fitting function does not need to be used for fitting, and only by calculating their mean values, the smoothing effect can be achieved, thereby reducing the computational amount of the smoothing process and improving the smoothing efficiency.
[0064] S140: Perform rotational fitting processing on multiple first rotation parameters according to the spline fitting function to obtain the second rotation parameters corresponding to each second trajectory point.
[0065] In this embodiment, the spline fitting function is used to perform rotational fitting processing on multiple first rotation parameters to obtain the second rotation parameters corresponding to each second trajectory point.
[0066] It should be noted that the data types of the first rotation parameter and the second rotation parameter in this step are quaternions.
[0067] It should be noted that the specific steps of performing rotational fitting processing on multiple first rotation parameters through the spline fitting function in this embodiment are similar to the specific steps of performing trajectory fitting processing on the first trajectory through the spline fitting function in step S130. The main difference is that in step S130, the trajectory - point position parameters (such as three - dimensional coordinates) of each first trajectory point are used as the input of the spline fitting function, and in step S140, the first rotation parameters of each first trajectory point are used as the input of the spline fitting function. The rotational fitting processing of the first rotation parameter in this step is not elaborated in this embodiment.
[0068] S150: For each second trajectory point, determine the second translation parameter according to the initial position parameter, the corresponding second rotation parameter, and the trajectory - point position parameter of the second trajectory point, and determine the corresponding second rotation parameter and the corresponding second translation parameter as the second pose information of the second trajectory point, obtaining the second pose information of each second trajectory point.
[0069] Specifically, the second translation parameter is determined through a preset translation calculation formula, where the translation calculation formula is:
[0070] (4);
[0071] Wherein, t(x) is the second translation parameter corresponding to the x-th trajectory point in the second trajectory, r(x) is the second rotation parameter corresponding to the x-th trajectory point in the second trajectory, and p(x) is the trajectory point position parameter of the x-th trajectory point in the second trajectory. is the initial position parameter.
[0072] Wherein, in formula (4), the data type of the second rotation parameter is a rotation matrix, that is, before performing step S150, it is first necessary to convert the data type of the second rotation parameter from quaternion to rotation matrix.
[0073] After smoothing each pose, in this embodiment, the target object will be driven according to each second pose information. Among them, the target object can be a human dental and maxillofacial movement model, and the human dental and maxillofacial movement model can be a virtual three-dimensional model in software or a physical model. More specifically, the target object is the teeth in the human dental and maxillofacial movement model.
[0074] Since each second pose information has been smoothed, in this embodiment, when driving the human dental and maxillofacial movement model through each second pose information, the smoothness of the mandibular movement trajectory of the oral cavity can be achieved.
[0075] In summary, after the embodiments of the present application obtain the initial multiple pose information and generate the initial first trajectory, the first trajectory will be fitted to obtain a smooth second trajectory, and then the poses of each trajectory point will be smoothed based on the smooth second trajectory to obtain the smoothed second pose information corresponding to each trajectory point, realizing the smoothing of the pose. In addition, since the embodiments of the present application constrain the second pose information through the smooth second trajectory, it can be ensured that the trajectory generated by the second pose information is smooth, and when driving an object through the second pose information, it can be ensured that its movement trajectory is smooth, thereby avoiding problems of inconsistent movement and jitter.
[0076] Figure 3 is a schematic block diagram of a pose processing device 300 provided by an embodiment of the present application. As Figure 3 shown, corresponding to the above pose processing method, the present application also provides a pose processing device 300. The pose processing device 300 includes units for executing the above pose processing method, and the pose processing device 300 can be in a terminal or a server. Specifically, please refer to Figure 3 , the pose processing device 300 includes a transceiver unit 301 and a processing unit 302.
[0077] A transceiver unit 301, configured to obtain an initial position parameter and a plurality of consecutive first pose information, where the first pose information includes a first rotation parameter and a first translation parameter;
[0078] A processing unit 302, configured to determine a first trajectory according to the initial position parameter and the plurality of first pose information, where the first trajectory includes first trajectory points respectively corresponding to the first pose information; perform trajectory fitting processing on the first trajectory according to a preset spline fitting function to obtain a second trajectory, where the second trajectory includes second trajectory points respectively corresponding to the first trajectory points; perform rotation fitting processing on the plurality of first rotation parameters according to the spline fitting function to obtain second rotation parameters respectively corresponding to the second trajectory points; for each of the second trajectory points, determine a second translation parameter according to the initial position parameter, the corresponding second rotation parameter, and the trajectory point position parameter of the second trajectory point, and determine the corresponding second rotation parameter and the corresponding second translation parameter as the second pose information of the second trajectory point, so as to obtain the second pose information of each of the second trajectory points.
[0079] In some embodiments, before the processing unit 302 executes the step of performing trajectory fitting processing on the first trajectory according to a preset spline fitting function to obtain a second trajectory, it is further configured to:
[0080] Obtain time parameters of the first pose information through the transceiver unit 301; respectively determine the curve slopes of the first trajectory points according to the time parameters and the trajectory point position parameters of the first trajectory points; determine the first trajectory points as first state trajectory points and second state trajectory points according to the curve slopes, where the first state trajectory points are the trajectory points among the first trajectory points whose curve slopes are greater than or equal to a preset slope threshold, and the second state trajectory points are the trajectory points among the first trajectory points whose curve slopes are less than the preset slope threshold; perform grouping processing on the consecutive first state trajectory points in the first trajectory according to a preset trajectory point quantity threshold to obtain at least one first trajectory point group;
[0081] At this time, when the processing unit 302 executes the step of performing trajectory fitting processing on the first trajectory according to a preset spline fitting function to obtain a second trajectory, it is specifically configured to:
[0082] For each of the first trajectory point groups, perform trajectory fitting processing on the first trajectory point group according to the spline fitting function to obtain a second trajectory respectively corresponding to each of the first trajectory point groups.
[0083] In some embodiments, after the processing unit 302 executes the step of determining a plurality of the first trajectory points as first state trajectory points and second state trajectory points according to the curve slope, it is further configured to:
[0084] If there are the second state trajectory points, determine the consecutive second state trajectory points in the first trajectory as a second trajectory point group, to obtain at least one second trajectory point group; for each of the second trajectory point groups, determine a mean value of the trajectory point position parameters according to the trajectory point position parameters of each of the second state trajectory points in the second trajectory point group, and perform smoothing processing on each of the second state trajectory points in the second trajectory point group according to the mean value of the trajectory point position parameters, to obtain a second trajectory corresponding to each of the second trajectory point groups respectively.
[0085] In some embodiments, when the processing unit 302 executes the step of performing rotation fitting processing on a plurality of the first rotation parameters according to the spline fitting function to obtain second rotation parameters corresponding to each of the second trajectory points, it is specifically configured to:
[0086] For each of the trajectory point groups in the first trajectory point group and the second trajectory point group, perform rotation fitting processing on the plurality of the first rotation parameters in the trajectory point group according to the spline fitting function, to obtain the second rotation parameters corresponding to each of the second trajectory points corresponding to the trajectory point group.
[0087] In some embodiments, when the processing unit 302 executes the step of performing trajectory fitting processing on the first trajectory according to a preset spline fitting function to obtain a second trajectory, it is specifically configured to:
[0088] Determine a spline curve of the first trajectory;
[0089] Determine a trajectory error value between the spline curve and the first trajectory according to the spline fitting function;
[0090] Determine whether the spline curve meets a preset convergence condition according to the error value;
[0091] If it does not meet the convergence condition, update the spline curve according to a preset spline curve fitting rule, and return to execute the step of determining the error value between the spline curve and a plurality of the first trajectory points according to the spline fitting function;
[0092] If it meets the convergence condition, determine the spline curve as the second trajectory.
[0093] In some embodiments, the spline fitting function is: ;
[0094] where e SD,kThe trajectory point P on the spline curve tk And the corresponding trajectory point X on the first trajectory k The point error value between them, and , f SD Is the trajectory error value, Is the regularization term coefficient, f s Is the regularization term of the spline curve, T k Is the trajectory point P tk The tangent direction of the trajectory point P on the spline curve, N k Is the trajectory point P tk The normal direction of the trajectory point P on the spline curve, Is the trajectory point P tk The radius of curvature of the trajectory point P on the spline curve, Is the trajectory point P tk And the corresponding trajectory point X k The distance between them.
[0095] In some embodiments, the regularization term of the spline curve is calculated by the following formula:
[0096] ;
[0097] Where F1 is the length of the spline curve, F2 is the change trend value of the spline curve, Is the control coefficient of F1, β is the control coefficient of F2, , p(t) is the spline curve.
[0098] In some embodiments, when the processing unit 302 executes the step of determining the second translation parameter according to the initial position parameter, the corresponding second rotation parameter and the trajectory point position parameter of the second trajectory point, it specifically is used for:
[0099] Determine the second translation parameter through a preset translation calculation formula, where the translation calculation formula is:
[0100] ;
[0101] Where t(x) is the second translation parameter corresponding to the x-th trajectory point in the second trajectory, r(x) is the second rotation parameter corresponding to the x-th trajectory point in the second trajectory, p(x) is the trajectory point position parameter of the x-th trajectory point in the second trajectory, Is the initial position parameter.
[0102] In some embodiments, after the processing unit 302 executes the step of determining the corresponding second rotation parameter and the corresponding second translation parameter as the second pose information of the second trajectory point, and obtaining the second pose information of each second trajectory point, it is further used for:
[0103] Drive the target object according to each of the second pose information.
[0104] In summary, after the pose processing device 300 provided in the embodiment of the present application obtains the initial multiple pose information and generates the initial first trajectory, it will perform fitting processing on the first trajectory to obtain a smooth second trajectory, and then perform smoothing processing on the poses of each trajectory point based on the smooth second trajectory to obtain the smoothed second pose information corresponding to each trajectory point, realizing the smoothing processing of the pose; in addition, since the present application constrains the second pose information through the smooth second trajectory, it can be ensured that the trajectory generated by the second pose information is smooth, and driving the object through the second pose information can ensure that its motion trajectory is smooth, thereby avoiding problems of inconsistent motion and jitter.
[0105] It should be noted that those skilled in the art can clearly understand that the specific implementation processes of the above-mentioned pose processing device and each unit can refer to the corresponding descriptions in the foregoing method embodiments. For the sake of convenience and brevity of description, they will not be elaborated here.
[0106] The above-mentioned pose processing device can be implemented in the form of a computer program, and this computer program can run on a computer device as Figure 4 shown.
[0107] Please refer to Figure 4 , Figure 4 which is a schematic block diagram of a computer device provided in the embodiment of the present application. The computer device 400 can be a terminal or a server.
[0108] Referring to Figure 4 , the computer device 400 includes a processor 402, a memory, and a network interface 405 connected through a system bus 401. Among them, the memory can include a non-volatile storage medium 403 and an internal memory 404.
[0109] The non-volatile storage medium 403 can store an operating system 4031 and a computer program 4032. The computer program 4032 includes program instructions, and when these program instructions are executed, the processor 402 can be made to execute a pose processing method.
[0110] The processor 402 is used to provide computing and control capabilities to support the operation of the entire computer device 400.
[0111] The internal memory 404 provides an environment for the operation of the computer program 4032 in the non-volatile storage medium 403. When the computer program 4032 is executed by the processor 402, the processor 402 can be made to execute a pose processing method.
[0112] The network interface 405 is used for network communication with other devices. Those skilled in the art can understand that Figure 4 the structure shown in is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device 400 to which the solution of this application is applied. The specific computer device 400 may include more or fewer components than those shown in the figure, or combine some components, or have a different component layout.
[0113] wherein, the processor 402 is used to run the computer program 4032 stored in the memory to implement the following steps:
[0114] Obtain an initial position parameter and a plurality of consecutive first pose information, where the first pose information includes a first rotation parameter and a first translation parameter;
[0115] Determine a first trajectory according to the initial position parameter and the plurality of first pose information, where the first trajectory includes first trajectory points respectively corresponding to the first pose information;
[0116] Perform trajectory fitting processing on the first trajectory according to a preset spline fitting function to obtain a second trajectory, where the second trajectory includes second trajectory points respectively corresponding to the first trajectory points;
[0117] Perform rotation fitting processing on the plurality of first rotation parameters according to the spline fitting function to obtain second rotation parameters respectively corresponding to the second trajectory points;
[0118] For each of the second trajectory points, determine a second translation parameter according to the initial position parameter, the corresponding second rotation parameter, and the trajectory point position parameter of the second trajectory point, and determine the corresponding second rotation parameter and the corresponding second translation parameter as the second pose information of the second trajectory point, to obtain the second pose information of each of the second trajectory points.
[0119] It should be understood that in the embodiments of the present application, the processor 402 may be a central processing unit (CPU), and the processor 402 may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0120] Those of ordinary skill in the art can understand that all or part of the processes in the methods of implementing the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program includes program instructions, and the computer program can be stored in a storage medium, and the storage medium is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the embodiments of the above methods.
[0121] Therefore, the present application also provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program, where the computer program includes program instructions. When the program instructions are executed by a processor, the processor is caused to execute the following steps:
[0122] Obtain an initial position parameter and a plurality of consecutive first pose information, where the first pose information includes a first rotation parameter and a first translation parameter;
[0123] Determine a first trajectory according to the initial position parameter and the plurality of first pose information, where the first trajectory includes first trajectory points respectively corresponding to the first pose information;
[0124] Perform trajectory fitting processing on the first trajectory according to a preset spline fitting function to obtain a second trajectory, where the second trajectory includes second trajectory points respectively corresponding to the first trajectory points;
[0125] Perform rotation fitting processing on the plurality of first rotation parameters according to the spline fitting function to obtain second rotation parameters respectively corresponding to the second trajectory points;
[0126] For each of the second trajectory points, determine a second translation parameter according to the initial position parameter, the corresponding second rotation parameter, and the trajectory point position parameter of the second trajectory point, and determine the corresponding second rotation parameter and the corresponding second translation parameter as the second pose information of the second trajectory point, so as to obtain the second pose information of each of the second trajectory points.
[0127] The storage medium may be a U disk, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disc, etc., which are all computer-readable storage media that can store program codes.
[0128] Those of ordinary skill in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the components and steps of the examples have been generally described according to their functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.
[0129] In several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of each unit is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
[0130] The steps in the method embodiments of this application can be adjusted, combined, and deleted according to actual needs. The units in the device embodiments of this application can be combined, divided, and deleted according to actual needs. In addition, the functional units in each embodiment of this application can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit.
[0131] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a terminal, or a network device, etc.) to execute all or part of the steps of the methods described in the embodiments of this application.
[0132] As described above, it is only the specific implementation manner of the present application. However, the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present application can easily think of various equivalent modifications or substitutions, and these modifications or substitutions should all be covered within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims
1. A posture processing method, characterized in that: The method is applied in the smoothing processing scenario of the mandibular motion trajectory, and includes: Acquire initial position parameters of the mandible and a plurality of continuous first pose information, wherein the first pose information includes a first rotation parameter and a first translation parameter; Determine a first trajectory according to the initial position parameter and a plurality of the first posture information, the first trajectory comprising first trajectory points corresponding to each of the first posture information; Performing trajectory fitting processing on the first trajectory according to a preset spline fitting function until a spline curve corresponding to the first trajectory meets a preset convergence condition, thereby obtaining a second trajectory, wherein the second trajectory includes second trajectory points corresponding to each of the first trajectory points, and the second trajectory points are trajectory points in the second trajectory that are closest to the corresponding first trajectory points; Performing rotation fitting processing on the plurality of the first rotation parameters according to the spline fitting function to obtain second rotation parameters corresponding to the second trajectory points; For each of the second trajectory points, a second translation parameter is determined based on the initial position parameter, the corresponding second rotation parameter and the trajectory point position parameter of the second trajectory point, and the corresponding second rotation parameter and the corresponding second translation parameter are determined as the second posture information of the second trajectory point to obtain the second posture information of each of the second trajectory points.
2. The method according to claim 1, characterized in that The method further comprises: performing trajectory fitting processing on the first trajectory according to a preset spline fitting function until a spline curve corresponding to the first trajectory meets a preset convergence condition and before obtaining a second trajectory. Obtaining a time parameter of each of the first posture information; Determining the curve slope of each of the first trajectory points respectively according to the time parameter and the trajectory point position parameter of each of the first trajectory points; Determining the plurality of first trajectory points as first-state trajectory points and second-state trajectory points according to the slope of the curve, the first-state trajectory point being a trajectory point among the plurality of first trajectory points whose slope of the curve is greater than or equal to a preset slope threshold, and the second-state trajectory point being a trajectory point among the plurality of first trajectory points whose slope of the curve is less than the preset slope threshold; According to a preset trajectory point quantity threshold, grouping continuous trajectory points of the first state in the first trajectory to obtain at least one first trajectory point group; The step of performing trajectory fitting processing on the first trajectory according to a preset spline fitting function until a spline curve corresponding to the first trajectory meets a preset convergence condition to obtain a second trajectory includes: For each of the first trajectory point groups, trajectory fitting processing is performed on the first trajectory point group according to the spline fitting function to obtain second trajectories corresponding to each of the first trajectory point groups.
3. The method according to claim 2, characterized in that After determining the plurality of first track points as first state track points and second state track points according to the slope of the curve, the method further includes: If the second state trajectory point exists, determining the continuous second state trajectory points in the first trajectory as a second trajectory point group to obtain at least one second trajectory point group; For each second trajectory point group, a trajectory point position parameter mean is determined according to the trajectory point position parameters of each second-state trajectory point in the second trajectory point group, and each second-state trajectory point in the second trajectory point group is smoothed according to the trajectory point position parameter mean to obtain the second trajectories corresponding to each second trajectory point group.
4. The method according to claim 3, characterized in that The performing rotation fitting processing on the plurality of the first rotation parameters according to the spline fitting function to obtain the second rotation parameters respectively corresponding to the second trajectory points includes: For each trajectory point group in the first trajectory point group and the second trajectory point group, rotation fitting processing is performed on multiple first rotation parameters in the trajectory point group according to the spline fitting function to obtain the second rotation parameters corresponding to each second trajectory point corresponding to the trajectory point group.
5. The method according to claim 1, characterized in that: The step of performing trajectory fitting processing on the first trajectory according to a preset spline fitting function until a spline curve corresponding to the first trajectory meets a preset convergence condition to obtain a second trajectory includes: determining a spline curve of the first trajectory; determining a trajectory error value between the spline curve and the first trajectory according to the spline fitting function; Determining whether the spline curve meets a preset convergence condition according to the error value; If the convergence condition is not met, the spline curve is updated according to a preset spline curve fitting rule, and the step of determining the error value between the spline curve and the plurality of first trajectory points according to the spline fitting function is returned to execute; If the convergence condition is met, the spline curve is determined as the second trajectory.
6. The method according to claim 5, characterized in that The spline fitting function is: ; in, is the trajectory point on the spline curve The trajectory point corresponding to the first trajectory The point error between , is the trajectory error value, is the regularization coefficient, is the regularization term of the spline curve, For trajectory points The tangent direction on the spline, For trajectory points The normal on the spline, For trajectory points The radius of curvature on the spline, For trajectory points The corresponding trajectory points The distance between.
7. The method according to claim 6, characterized in that The regularization term of the spline curve is calculated by the following formula: ; in, is the length of the spline curve, is the changing trend value of the spline curve, for The control coefficient of for The control coefficient of , , is the spline curve.
8. The method according to claim 1, characterized in that The determining the second translation parameter according to the initial position parameter, the corresponding second rotation parameter and the trajectory point position parameter of the second trajectory point comprises: The second translation parameter is determined by a preset translation calculation formula, wherein the translation calculation formula is: ; in, is the second translation parameter corresponding to the x-th trajectory point in the second trajectory, is the second rotation parameter corresponding to the x-th trajectory point in the second trajectory, is the trajectory point position parameter of the x-th trajectory point in the second trajectory, is the initial position parameter.
9. The method according to any one of claims 1 to 8, characterized in that After determining the corresponding second rotation parameter and the corresponding second translation parameter as the second posture information of the second trajectory point and obtaining the second posture information of each second trajectory point, the method further includes: The target object is driven according to each of the second posture information.
10. A posture processing device, characterized in that: The posture processing device is applied in the smoothing processing scenario of the mandibular motion trajectory, and includes: A transceiver unit, used to obtain an initial position parameter of the mandible and a plurality of continuous first posture information, wherein the first posture information includes a first rotation parameter and a first translation parameter; A processing unit is used to determine a first trajectory according to the initial position parameters and multiple first posture information, the first trajectory including first trajectory points corresponding to each of the first posture information; perform trajectory fitting processing on the first trajectory according to a preset spline fitting function until the spline curve corresponding to the first trajectory meets a preset convergence condition, so as to obtain a second trajectory, the second trajectory including second trajectory points corresponding to each of the first trajectory points, the second trajectory points being the trajectory points in the second trajectory closest to the corresponding first trajectory points; perform rotation fitting processing on multiple first rotation parameters according to the spline fitting function, so as to obtain second rotation parameters corresponding to each of the second trajectory points; for each of the second trajectory points, determine a second translation parameter according to the initial position parameters, the corresponding second rotation parameters and the trajectory point position parameters of the second trajectory point, and determine the corresponding second rotation parameters and the corresponding second translation parameters as the second posture information of the second trajectory point, so as to obtain the second posture information of each of the second trajectory points.
11. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, it implements the posture processing method as described in any one of claims 1-9.
12. A storage medium, characterized in that: The storage medium stores a computer program, which includes program instructions. When the program instructions are executed by a processor, the processor executes the posture processing method as described in any one of claims 1 to 9.