A method, device and terminal device for predicting prosthetic movement
By collecting and processing point cloud data around the prosthetic limb, extracting feature point groups, and combining the motion status of the prosthetic limb, it solves the problem of failing to fully utilize visual information in the existing technology, and improves the accuracy and adaptability of prosthetic limb motion prediction.
Patent Information
- Application Number
- CN202311037552.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-16
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2043-08-16
AI Technical Summary
Existing prosthetic limb motion prediction methods fail to make full use of the visual information obtained by the visual perception system, resulting in poor adaptability of prosthetic limbs in different environments.
By collecting point cloud data around the prosthetic limb, obstacles are identified and feature point groups are extracted, and predictions are made based on the motion status of the prosthetic limb. The connection between the displacement of the point cloud data and the motion status of the prosthetic limb is used to improve prediction accuracy and efficiency.
It improves the accuracy and efficiency of prediction of the prosthetic limb's motion status, enhances its ability to adapt to the environment, and ensures the stable movement of the prosthetic limb in different environments.
Smart Images

Figure CN117218152B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application belong to the technical field of medical auxiliary equipment, and in particular, relate to a prosthetic motion prediction method, device and terminal device. Background Art
[0002] In the prior art, information about the surrounding environment is often obtained through a visual perception system installed on a powered thigh prosthesis. The visual perception system can identify the height and width of obstacles. Based on the shape parameters of the identified obstacles, the control system can add an additional repulsive force term when controlling the prosthesis to avoid the identified obstacles. However, when controlling the movement of the prosthesis in the face of obstacles, the motion state information of the prosthesis itself is often ignored.
[0003] Existing methods for predicting the movement trends of prostheses often use convolutional neural networks for learning and training to obtain terrain information around the prosthesis, thereby helping the prosthesis predict the movement trends of the person wearing the prosthesis based on the parameters of obstacles obtained by the visual perception system. However, this method does not maximize the use of the visual information obtained by the visual perception system, resulting in poor adaptability of the prosthesis in different environments. Summary of the invention
[0004] In view of this, embodiments of the present application provide a prosthetic motion prediction method, apparatus, and terminal device to improve the efficiency and accuracy of predicting prosthetic motion.
[0005] A first aspect of an embodiment of the present application provides a prosthetic motion prediction method, comprising:
[0006] After the prosthesis starts to move, point cloud data of the terrain around the prosthesis is collected;
[0007] Based on the point cloud data, determining obstacles present in the surrounding terrain;
[0008] Extracting a plurality of feature point groups in the obstacle, the feature point groups being a plurality of point clouds located at the ends of a target horizontal line of the obstacle at various moments during the movement of the prosthesis;
[0009] The motion state of the prosthesis is predicted based on the plurality of feature point groups.
[0010] A second aspect of an embodiment of the present application provides a prosthetic motion prediction device, comprising:
[0011] The acquisition module is used to collect point cloud data of the terrain around the prosthesis after the prosthesis starts to move;
[0012] A determination module, used to determine obstacles existing in the surrounding terrain based on the point cloud data;
[0013] An extraction module, used to extract a plurality of feature point groups in the obstacle, wherein the feature point groups are a plurality of point clouds located at the ends of a target horizontal line of the obstacle at various moments during the movement of the prosthesis;
[0014] The prediction module is used to predict the motion state of the prosthesis according to the plurality of feature point groups.
[0015] A third aspect of an embodiment of the present application provides a terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the prosthetic motion prediction method as described in the first aspect above is implemented.
[0016] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the prosthetic motion prediction method as described in the first aspect above is implemented.
[0017] A fifth aspect of the embodiments of the present application provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the prosthetic motion prediction method described in the first aspect.
[0018] Compared with the prior art, the embodiments of the present application have the following advantages:
[0019] In an embodiment of the present application, point cloud data around the prosthesis body is collected and processed to obtain point cloud data of the terrain around the prosthesis body. Based on the point cloud data, it is determined whether there are obstacles around the prosthesis body that may hinder the movement of the person wearing the prosthesis. If there are obstacles, feature point groups are extracted from the point cloud data corresponding to the obstacles. Based on the point clouds in multiple feature point groups, the motion state of the prosthesis body is predicted. By linking the displacement of the point cloud and the motion state of the prosthesis body, the point cloud data acquired through the visual perception system is fully utilized, thereby improving the accuracy and efficiency of predicting the motion state of the prosthesis. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or prior art descriptions. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0021] Figure 1 It is a schematic diagram of the process of a prosthetic motion prediction method provided in an embodiment of the present application;
[0022] Figure 2 is a schematic flow chart of collecting point cloud data provided by an embodiment of the present application;
[0023] Figure 3 It is a schematic diagram of a point cloud dimensionality reduction provided in an embodiment of the present application;
[0024] Figure 4 It is a schematic diagram of a process of extracting a feature point group provided in an embodiment of the present application;
[0025] Figure 5 This is a flow chart of extracting feature points provided by an embodiment of the present application;
[0026] Figure 6 is a schematic flow chart of determining a target horizontal line provided in an embodiment of the present application;
[0027] Figure 7 is a schematic flow chart of predicting the motion state of a prosthesis provided in an embodiment of the application;
[0028] Figure 8 is a schematic diagram of a point cloud registration provided in an embodiment of the present application;
[0029] Fig. 9 is a schematic flow chart of a feature point registration provided in an embodiment of the present application;
[0030] Fig.10 is a schematic diagram of a prosthetic connecting rod model provided in an embodiment of the present application;
[0031] Fig.11 is a schematic diagram of a prosthetic motion prediction system provided in an embodiment of the present application;
[0032] Fig.12 is a schematic diagram of a prosthetic motion prediction device provided in an embodiment of the present application;
[0033] Fig.13 It is a schematic diagram of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0034] In the following description, specific details such as specific system structures, technologies, etc. are proposed for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from hindering the description of the present application.
[0035] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0036] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0037] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0038] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0039] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0040] Before explaining the technical solution of the present application, it is necessary to understand that when acquiring visual data in the environment, a visual perception system can be used to collect visual information of the environment. In specific applications, a depth camera can be used as a visual sensing system. The depth camera can be used to obtain the distance between each point in the image and the camera of the depth camera. Combined with the two-dimensional coordinates of each point in the two-dimensional graphic, the three-dimensional point cloud data of each point in the image can be obtained.
[0041] The present application provides a method for predicting the motion of a prosthesis. The method determines whether there are obstacles in the terrain around the prosthesis body through collected point cloud data. If there are obstacles, a feature point group is determined on the obstacle. The position and motion speed of the prosthesis body are determined through the displacement of the point cloud in the feature point group calculated from the moment the prosthesis starts to move. The visual data of the surrounding environment is linked to the motion of the prosthesis body, making full use of the visual data. In the calculation, the three-dimensional point cloud data is converted into two-dimensional point cloud data for processing, which reduces the calculation burden and the complexity of the calculation, thereby improving the accuracy of the calculation.
[0042] The technical solution of the present application is described below through specific embodiments.
[0043] like Figure 1 FIG. 1 is a flow chart of a prosthetic motion prediction method provided in an embodiment of the present application, which may specifically include steps S101-S104:
[0044] S101. After the prosthesis starts to move, point cloud data of the terrain around the prosthesis body is collected.
[0045] In an embodiment of the present application, during the movement of the prosthesis, point cloud data of the terrain around the prosthesis body can be collected. The captured point cloud data can reflect the shape of the ground or obstacles that are about to approach the person wearing the prosthesis. The point cloud data can help the person wearing the prosthesis achieve environmental adaptability control.
[0046] In a possible implementation of the embodiment of the present application, as Figure 2 As shown, it is a schematic flowchart of collecting point cloud data provided by an embodiment of the present application, which may specifically include steps S1011-S1014:
[0047] S1011. After the prosthesis starts to move, a depth camera installed at the knee joint of the prosthesis body is used to collect original three-dimensional point cloud data around the prosthesis body.
[0048] In the embodiment of the present application, after the prosthesis starts to move, a depth camera installed at the knee joint position of the prosthesis body can be used to collect original three-dimensional point cloud data around the prosthesis body.
[0049] In actual application scenarios, the CamBoard picoflexx2 depth camera produced by the German company Pmdtechnologies can be used to obtain the original three-dimensional point cloud data of the terrain around the prosthesis. Based on the collected original three-dimensional point cloud data, the terrain type and parameters around the prosthesis can be identified.
[0050] S1012: Use an inertial measurement unit fixed to the depth camera to obtain the Euler angle of the depth camera.
[0051] In actual application scenarios, the MTi-3 inertial measurement unit (IMU) produced by the Netherlands Xsense company can be used to obtain the Euler angle, acceleration, angular velocity and other motion information of the depth camera.
[0052] In a possible implementation of the embodiment of the present application, since the frequencies of data collection by the depth camera and the IMU are inconsistent, the collected data needs to be synchronized. Specifically, the three-dimensional point cloud data collected by the depth camera at the same time can be associated with the motion information collected by the IMU, and the data that cannot be associated can be discarded.
[0053] S1013. Obtain three-dimensional point cloud data based on a ground coordinate system based on the original three-dimensional point cloud data and the Euler angles.
[0054] In the embodiment of the present application, since the original three-dimensional point cloud data collected by the depth camera is based on the depth camera coordinate system, during the walking process of the person wearing the prosthesis, due to the swing of the prosthesis, the depth camera will change its direction with the movement of the prosthesis in each gait cycle, resulting in a large rotation of the point cloud. If the rotation is taken into account during the calculation process, the situation will become complicated, resulting in the calculation being prone to errors and time-consuming. Therefore, it is necessary to convert the original three-dimensional data from the depth camera coordinate system to the ground coordinate system through Euler angles.
[0055] In a possible implementation of the embodiment of the present application, the IMU can be used to measure the Euler angle of the depth camera, and the rotation matrix from the depth camera coordinate system to the ground coordinate system can be obtained through the Euler angle. The rotation matrix and original 3D point cloud dataCamera p By multiplying, the 3D point cloud data can be converted from the camera coordinate system to the ground coordinate system to obtain the 3D point cloud data Ground based on the ground coordinate system p , the specific calculation formula can be:
[0056]
[0057] S1014: Project the three-dimensional point cloud data onto a plane perpendicular to the first coordinate axis to obtain two-dimensional point cloud data.
[0058] In an embodiment of the present application, in order to reduce the amount of calculation and calculation time for processing the point cloud, thereby facilitating real-time control of the prosthesis, the three-dimensional point cloud data can be processed by dimensionality reduction, and the three-dimensional point cloud data can be projected onto a plane perpendicular to the first coordinate axis to obtain two-dimensional point cloud data. It should be noted that the first coordinate axis is parallel to the ground and perpendicular to the translation direction of the prosthesis.
[0059] In a possible implementation of the embodiment of the present application, as Figure 3 As shown, it is a schematic diagram of a point cloud dimensionality reduction provided in an embodiment of the present application. Specifically, by projecting the step-shaped three-dimensional point cloud data onto the XOZ plane, two-dimensional point cloud data in the shape of the outer contour of the step can be obtained, thereby realizing point cloud dimensionality reduction.
[0060] The specific calculation process can be:
[0061]
[0062] Among them, (x i ,y i ,z i ) are the points in the three-dimensional point cloud data, and the point cloud with coordinates from -0.1m to 0.1m on the y-axis is projected onto the XOZ plane to obtain the two-dimensional point cloud data (x j ,z j ).
[0063] In a possible implementation of the embodiment of the present application, in order to avoid the appearance of noise in the acquired three-dimensional point cloud data due to the ground material of the terrain around the prosthesis body or the performance of the depth camera, which interferes with the accuracy of point cloud registration, the K-nearest neighbor algorithm can be used to smooth and reduce noise on the obtained two-dimensional point cloud data before performing point cloud registration.
[0064] S102: Determine obstacles existing in the surrounding terrain based on the point cloud data.
[0065] In a possible implementation of the embodiment of the present application, before extracting the feature point group in the two-dimensional point cloud data, it is necessary to first determine whether there are objects with multiple horizontal planes and height differences between the horizontal planes in the terrain around the prosthesis body, such as stairs or obstacles.
[0066] In a specific implementation, the two-dimensional point cloud data can be converted into a binary image, and then the binary image can be processed using a pre-trained convolutional neural network to identify whether there are stairs or obstacles in the binary image.
[0067] S103: extracting multiple feature point groups from the obstacle.
[0068] In an embodiment of the present application, after obstacles existing in the terrain around the prosthesis body are determined, multiple feature point groups in the obstacles can be extracted. It should be noted that after the prosthesis starts to move, each frame of data collected corresponds to a feature point group, that is, for obstacles in the terrain, there is a corresponding feature point group at each moment, and each feature point group includes multiple point clouds, wherein the feature point group is a plurality of point clouds located at the end of the target horizontal line of the obstacle at each moment during the movement of the prosthesis.
[0069] In a possible implementation of the embodiment of the present application, as Figure 4 As shown, it is a schematic diagram of a process of extracting a feature point group provided in an embodiment of the present application, which may specifically include steps S401-S402:
[0070] S401. Determine the target horizontal line based on the two-dimensional point cloud data.
[0071] In an embodiment of the present application, after converting the three-dimensional point cloud data into two-dimensional point cloud data, a two-dimensional point cloud image describing the outer contour of the obstacle can be obtained based on the two-dimensional point cloud data. At this time, the obstacle is converted into a line composed of multiple continuous point clouds, in which the target horizontal line is determined.
[0072] In a possible implementation of the embodiment of the present application, as Figure 5 As shown, a flow chart of extracting feature points provided in an embodiment of the present application is shown, referring to FIG. (a). In a stepped scene, a stepped line composed of multiple continuous point clouds can be obtained based on two-dimensional point cloud data.
[0073] In a possible implementation of the embodiment of the present application, as Figure 6 As shown, it is a schematic flowchart of determining a target horizontal line provided by an embodiment of the present application, which may specifically include steps S601-S604:
[0074] S601. Based on the two-dimensional point cloud data, extract the center lines corresponding to the planes of the obstacles respectively, wherein the center lines are parallel to the ground around the prosthesis body.
[0075] In an embodiment of the present application, based on the two-dimensional point cloud data, the center lines corresponding to the planes of the obstacle are first extracted. In the specific implementation, the random sample consensus algorithm (RANSAC) can be used to extract the center lines corresponding to the planes of the obstacle. It should be noted that the center line is parallel to the ground around the prosthesis body, that is, the plane corresponding to the center line is parallel to the ground around the prosthesis body.
[0076] It should be noted that the RANSAC algorithm is often used to fit straight lines in point cloud data. In the embodiment of the present application, the center line obtained by using the RANSAC algorithm is the horizontal line with the largest number of point clouds.
[0077] See also Figure 5 In Figure (b), after the first fitting by the RANSAC algorithm, multiple center lines can be obtained.
[0078] S602: Determine the median line with the largest number of internal points and the median line with the second largest number of internal points.
[0079] In the embodiment of the present application, the midline with the largest number of inliers and the second largest number of inliers is determined, wherein the inliers are point clouds whose distance from the midline is less than or equal to the second preset distance, see Figure 5 , take the point cloud with a distance d from the midline as the inner point, after determining the inner points corresponding to each midline, calculate the number of inner points corresponding to each midline, and determine the midline with the largest and second largest number of inner points.
[0080] In a possible implementation of the present application embodiment, see Figure 5 In Figure (c), we can first remove the fitted straight line corresponding to the midline with the largest number of inliers, and then remove the fitted straight line corresponding to the midline with the second largest number of inliers.
[0081] S603, respectively calculating the average values of the target coordinates of the inner points on the two midlines with the largest number of inner points and the second largest number of inner points.
[0082] In an embodiment of the present application, after determining the midlines with the largest and second largest number of inliers, it is necessary to extract a group of feature points from the end of the midline with the higher altitude. Therefore, it is necessary to calculate the average value of the target coordinates of the inliers on the midlines with the largest and second largest number of inliers, wherein the target coordinates are the coordinates corresponding to the coordinate axis perpendicular to the ground around the prosthesis body. In other words, it is necessary to calculate the average value of the coordinates at the heights of the midlines with the largest and second largest number of inliers. In actual application scenarios, this is equivalent to confirming which midline corresponds to the plane corresponding to the top of the obstacle or the upper level of the stairs.
[0083] S604. Determine the median line with the larger average value as the target horizontal line.
[0084] In the embodiment of the present application, after calculating the average values corresponding to the midlines with the largest number of inliers and the second largest number of inliers, the midline with the larger average value is determined as the target horizontal line.
[0085] S402: taking an inner point whose distance from the end of the target horizontal line is less than or equal to a first preset distance as a point cloud in the feature point group.
[0086] In an embodiment of the present application, after the target horizontal line is determined, a feature point group can be determined based on the target horizontal line. Specifically, an inner point whose distance to the end of the target horizontal line is less than or equal to a first preset distance can be determined as a point cloud in the feature point group.
[0087] In a possible implementation of the embodiment of the present application, a preset distance may be determined, and a point cloud whose distance from the end of the horizontal line corresponding to the target horizontal plane is less than or equal to the preset distance is used as a point cloud in the feature point group.
[0088] In a specific implementation, the calculation process may be:
[0089]
[0090] Among them, P2D is two-dimensional point cloud data based on the ground coordinate system, Pinliners1 is the center line zinliers1 corresponding to the horizontal plane with the largest number of point clouds, extending upward by a preset distance d, and extending downward by a distance d with a width of 2d and a length of a preset distance, zinliers1 is the center line corresponding to the horizontal plane with the largest number of point clouds, the value of d can be set as needed, and the embodiment of the present application is not limited to this.
[0091] Similarly, Pinliners2 is the horizontal line with the second largest number of point clouds, and zinliers2 is the median line corresponding to the horizontal plane with the second largest number of point clouds. |Pinliners1| is the number of point clouds contained in the horizontal line Pinliners1, and |Pinliners2| is the number of point clouds contained in the horizontal line Pinliners2.
[0092] zmean1 is the average value of the z-axis coordinates of horizontal line Pinliners1, zmean2 is the average value of the z-axis coordinates of horizontal line Pinliners2, and the horizontal plane corresponding to the horizontal line with the larger z-axis average value is selected as the target horizontal plane.
[0093] Pfea is a determined feature point group. In a possible implementation of the embodiment of the present application, in a scene where a person with a prosthesis goes upstairs, the inner point of the end of the target horizontal line close to the side where the person with the prosthesis is worn can be selected as the point cloud in the feature point group; in a scene where a person with a prosthesis is going downstairs, the inner point of the end of the target horizontal line far from the side where the person with the prosthesis is worn can be selected as the point cloud in the feature point group. Specifically, the point cloud whose distance to the end of the target horizontal line is less than or equal to w is selected as the point cloud in the feature point group. The value of w can be set as needed, and this embodiment does not limit this.
[0094] In a possible implementation of the embodiment of the present application, refer to Figure 5 Figure (d)
[0095] S104: predicting the motion state of the prosthesis according to the plurality of feature point groups.
[0096] In the embodiment of the present application, after the feature point groups at each moment are determined, the motion state of the prosthesis is predicted based on the multiple feature point groups.
[0097] In a possible implementation of the embodiment of the present application, as Figure 7 As shown, it is a schematic flowchart of a method for predicting the motion state of a prosthesis provided in an embodiment of the present application, which may specifically include steps S701-S704:
[0098] S701: Determine the point cloud located at the same position in the feature point group at each moment.
[0099] In the embodiment of the present application, after determining the feature point groups at each time, it is necessary to determine the point clouds at the same position on the obstacle in each feature point group, that is, it is necessary to perform registration processing on the point clouds in each feature point group, such as Figure 8 As shown, it is a schematic diagram of a point cloud registration provided in an embodiment of the present application. As the depth camera moves, point clouds at multiple times are captured. The registration process is to associate point clouds at different times but at the same position on the horizontal plane of the object. Specifically, the registration process can subtract the coordinate means of the feature points extracted from two consecutive times. If the result of the subtraction is within a preset threshold range, the two points can be considered to be the same point on the object.
[0100] In a specific implementation, the Iterative Closest Point (ICP) method can be used for registration processing. In an embodiment of the present application, registration processing is performed based on two-dimensional point cloud data. Compared with directly performing registration processing on three-dimensional point cloud data, the movement of the depth camera is simplified to a translation movement in a two-dimensional coordinate system. Therefore, there is no need to consider the rotation situation, and only the translation situation needs to be taken into consideration. Therefore, the amount of calculation can be reduced and the accuracy of the registration is improved.
[0101] In a possible implementation of the embodiment of the present application, as Fig. 9 As shown, it is a schematic flowchart of a feature point registration provided in an embodiment of the present application, which may specifically include steps S901-S906:
[0102] S901, determine a source point cloud, a target point cloud and a predicted value.
[0103] In the embodiment of the present application, when registering multiple point clouds in feature point groups at different times, a source point cloud P at time t-1 may be first determined. S , a target point cloud P at time tt , and a predicted value T0.
[0104] S902 , performing an initial conversion on the source point cloud to obtain a converted source point cloud, and searching in the converted source point cloud for a point cloud that is closest to a point cloud in the target point cloud.
[0105] In the embodiment of the present application, for the target point cloud P t Each point cloud P in i , after the initial transformation, the transformed source point cloud P i ′, the point cloud closest to each point cloud in the target point cloud is searched. Specifically, the calculation formula can be:
[0106] P i ′=P j
[0107] j=arg min||P i -(TP j )||
[0108] P j ∈P S
[0109] Among them, P j is the point cloud in the converted source point cloud, j is the order ||P i -TP j )||The value of j when it takes the minimum value.
[0110] S903: Estimate the displacement between point clouds.
[0111] In the embodiment of the present application, when converting the source point cloud P i After searching for the point cloud closest to each point cloud in the target point cloud in ′, the corresponding point cloud is used to estimate the displacement between the point clouds to minimize the error. Specifically, the formula for calculating the displacement between the point clouds can be:
[0112] ΔT=arg min||P-(ΔT-P′)||
[0113] Among them, ΔT is the displacement between point clouds, and ΔT is the value of ΔT when ||P-(ΔT-P′)|| is minimized.
[0114] S904, inject the displacement as an increment into the initial displacement.
[0115] In the embodiment of the present application, after the displacement between the point clouds is calculated, the displacement between the point clouds is injected into the initial displacement. Specifically, the calculation formula may be:
[0116] T n+1 =ΔT+T n
[0117] Among them, T n is the initial displacement, T n+1 It is the displacement obtained after injecting the displacement between point clouds into the initial displacement.
[0118] In the embodiments of this application
[0119] S905: Determine whether the number of iterations is greater than a preset number.
[0120] In the embodiment of the present application, the number of iterations is to repeat steps S903-S904 until the number of iterations is greater than the preset number. When the number of iterations is greater than the preset number, step S906 is performed; when the number of iterations is less than or equal to the preset number, steps S903-S904 are repeated.
[0121] S906: Register the feature points.
[0122] In the embodiment of the present application, in order to determine whether the extracted point cloud is a point cloud at the same position on the obstacle, the displacement ΔT between the point clouds can be compared with the preset threshold T th When the displacement ΔT between the point clouds is less than or equal to the preset threshold T th When , the two point clouds can be considered to be aligned; when the displacement ΔT between the point clouds is greater than the preset threshold T th , it is considered that the extracted point cloud is not the same point cloud.
[0123] In a possible implementation of the embodiment of the present application, the displacement ΔT between the point clouds is greater than the preset threshold value T th After the comparison, the positions of the feature points in the feature point group can be corrected using the extracted size parameters of the obstacle. For example, size parameters such as the width and height of a step-shaped obstacle can be extracted.
[0124] In the specific implementation, when the mean value of the feature point coordinates extracted at time t is much larger than that at time t-1, it can be considered that the wrong feature point of the stepped obstacle has been extracted. The coordinates of the currently extracted feature points are subtracted from the width and height of the stepped obstacle to calculate the position of the original feature point. This process continues until the mean value of the feature point coordinates is below the preset threshold, and the ICP algorithm is continued to be used to align the point cloud to calculate the displacement T(t) from time t-1 to time t.
[0125] S702, calculating the displacement of the point cloud located at the same position after the prosthesis starts to move.
[0126] In the embodiment of the present application, after the point clouds located at the same position in the feature point group are determined, the displacements of the point clouds located at the same position after the prosthesis starts to move are calculated respectively.
[0127] S703: Calculate the average displacement of the feature points at different positions to obtain an average displacement of the feature point group.
[0128] In the embodiment of the present application, after obtaining the displacement of the point cloud at the same position after the prosthesis starts to move, the average displacement of the feature points at different positions is calculated to obtain the average displacement of the feature point group.
[0129] S704: Predict the motion state of the prosthesis based on the average displacement of the feature point group.
[0130] In an embodiment of the present application, after calculating the displacement of the point cloud at each different position in the feature point group, the average value of the multiple displacements is calculated to obtain the average displacement of the feature points. Based on the average displacement of the feature points, the motion state of the prosthesis can be predicted. For example, the position and movement speed of the joints of the prosthesis can be calculated.
[0131] In a possible implementation of the embodiment of the present application, the position of the knee joint of the prosthesis can be determined according to the average displacement of the feature points. When the moment when the prosthesis starts to move is time t-1, the displacement T(i) of each frame of the prosthesis from time t-1 to time t is added to obtain the position of the depth camera in the coordinate system with the position of the depth camera of the prosthesis at time t-1 as the origin. It should be noted that the position of the depth camera is also the position of the knee joint of the prosthesis, because the depth camera is fixed at the position of the knee joint of the prosthesis. Specifically, the calculation formula can be:
[0132]
[0133] In the embodiment of the present application, the position of the depth camera is calculated After that, the movement speed of the depth camera can be calculated. Specifically, the calculation formula can be:
[0134]
[0135] Among them, δt is the time length from time t-1 to time t, and T(t) is the displacement of the depth camera from time t-1 to time t in the ground coordinate system.
[0136] In a possible implementation of the embodiment of the present application, as Fig.10 Shown is a schematic diagram of a prosthetic connecting rod model provided in an embodiment of the present application.
[0137] Among them, L1 is the length of the connecting rod between the knee joint and ankle joint of the prosthesis, L2 is the length from the ankle joint to the heel of the prosthesis, and L3 is the length from the heel to the toe of the prosthesis. The angle θ between the prosthesis and the coronal plane of the human body can be measured by using multiple IMUs installed on the prosthesis. hip(t), the angle θ of the prosthetic knee joint rotating clockwise knee (t) and the angle θ of the prosthetic ankle joint rotation ankle (t).
[0138] In a possible implementation of the embodiment of the present application, the homogeneous transformation matrix T can be calculated based on the forward kinematics model of the connecting rod model: 01 , T 01 , T 01 , the specific calculation process can be:
[0139]
[0140]
[0141]
[0142] θ1(t)=θ knee (t)-θ hip (t)
[0143] θ2(t)=-θ ankle (t)
[0144] In a possible implementation of the embodiment of the present application, the calculation formula for the positions of the ankle joint, heel, and toe of the prosthesis in the ground coordinate system may be:
[0145]
[0146]
[0147]
[0148] in, The position of the prosthetic ankle joint, The position of the prosthetic heel. For the position of the prosthetic toe, after calculating the position of each joint of the prosthesis, the speed of each joint can be calculated according to the differential of its position relative to time.
[0149] After calculating the position and movement speed of each part of the prosthesis, the real-time movement status of the prosthesis can be viewed through a display screen, mobile phone APP, etc., allowing users to adapt to the prosthesis more quickly and enhance their sense of control and trust in the movement of the prosthesis. At the same time, the designer can also adjust the program design that controls the movement of the prosthesis through the real-time movement status of the prosthesis.
[0150] In a possible implementation of the embodiment of the present application, the prosthetic motion prediction method can be implemented by a prosthetic motion prediction system, such as Fig.11, which is a schematic diagram of a prosthetic motion prediction system provided by an embodiment of the present application, which may specifically include a depth point cloud perception module 1101, a depth point cloud post-processing module 1102, a depth point cloud feature point extraction module 1103, a depth point cloud feature point registration module 1104 and a thigh prosthesis whole body motion state estimation module 1105, wherein:
[0151] The depth point cloud perception module 1101 may include a depth camera and an IMU. Therefore, the depth point cloud perception module 1101 may be used to obtain three-dimensional point cloud data of the terrain around the prosthesis and motion information such as Euler acceleration and angular velocity of the position where the IMU is installed.
[0152] The depth point cloud post-processing module 1102 can be used to convert three-dimensional point cloud data from the depth camera coordinate system to the ground coordinate system, and reduce the dimension of the three-dimensional point cloud data to obtain two-dimensional point cloud data. It can also be used to smooth and reduce noise on the point cloud data.
[0153] The depth point cloud feature point extraction module 1103 may be used to determine a group of feature points in obstacles existing in the terrain surrounding the prosthesis.
[0154] The depth point cloud feature point registration module 1104 may be used to determine the point clouds at the same position in the feature point group at each moment.
[0155] The thigh prosthesis whole body motion state estimation module 1105 can be used to calculate the motion state of the prosthesis, wherein the motion state of the prosthesis may include the position and motion speed of each part of the prosthesis.
[0156] It should be noted that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0157] Reference Fig.12 , shows a schematic diagram of a prosthetic motion prediction device provided in an embodiment of the present application, which may specifically include a collection module 1201, a determination module 1202, an extraction module 1203, and a prediction module 1204, wherein:
[0158] The acquisition module 1201 is used to acquire point cloud data of the terrain around the prosthesis after the prosthesis starts to move.
[0159] In the embodiment of the present application, the acquisition module 1201 may also be used for:
[0160] After the prosthesis starts to move, a depth camera installed at the knee joint position of the prosthesis body is used to collect original three-dimensional point cloud data around the prosthesis body, wherein the original three-dimensional point cloud data is data based on the coordinate system of the depth camera;
[0161] Using an inertial measurement unit fixed to the depth camera, obtaining the Euler angle of the depth camera;
[0162] Based on the original three-dimensional point cloud data and the Euler angles, obtaining three-dimensional point cloud data based on a ground coordinate system;
[0163] The three-dimensional point cloud data is projected onto a plane perpendicular to a first coordinate axis to obtain two-dimensional point cloud data, wherein the first coordinate axis is parallel to the ground and perpendicular to the translation direction of the prosthesis.
[0164] The determination module 1202 is used to determine obstacles existing in the surrounding terrain based on the point cloud data.
[0165] In the embodiment of the present application, the determination module 1202 may also be used to: convert the point cloud data into a binary image;
[0166] The binary image is recognized by using a pre-trained convolutional neural network to determine the obstacle existing in the binary image, wherein the obstacle includes a plurality of planes with height differences.
[0167] The extraction module 1203 is used to extract multiple feature point groups in the obstacle, where the feature point groups are multiple point clouds located at the ends of the target horizontal line of the obstacle at various moments during the movement of the prosthesis.
[0168] In the embodiment of the present application, the extraction module 1203 may also be used to:
[0169] Determining the target horizontal line based on the two-dimensional point cloud data;
[0170] An inner point whose distance from the end of the target horizontal line is less than or equal to a first preset distance is used as a point cloud in the feature point group, and the inner point is a point cloud whose distance from the target horizontal line is less than or equal to a second preset distance.
[0171] In the embodiment of the present application, the extraction module 1203 may also be used to:
[0172] Based on the two-dimensional point cloud data, respectively extract the center line corresponding to each plane of the obstacle, wherein the center line is parallel to the ground around the prosthesis body;
[0173] Determine the median line with the largest number of interior points and the second largest number of interior points;
[0174] Calculating the average values of target coordinates of the inner points on the two midlines with the largest number of inner points and the second largest number of inner points respectively, wherein the target coordinates are coordinates corresponding to the coordinate axis perpendicular to the ground around the prosthesis body;
[0175] The center line with the larger average value is determined as the target horizontal line.
[0176] The prediction module 1204 is used to predict the motion state of the prosthesis according to the plurality of feature point groups.
[0177] In the embodiment of the present application, the prediction module 1204 may also be used for:
[0178] Determine the point cloud located at the same position in the feature point group at each time;
[0179] Calculating the displacement of the point cloud located at the same position after the prosthesis starts to move;
[0180] Calculate the average value of the displacement of the point clouds at different positions to obtain the average displacement of the feature point group;
[0181] The motion state of the prosthesis is predicted based on the average displacement of the feature point group.
[0182] In the embodiment of the present application, the prediction module 1204 may also be used for:
[0183] Determining the position of the knee joint of the prosthesis according to the average displacement of the feature point group;
[0184] Obtaining the rotation angle of each joint of the prosthesis body and the length of multiple connecting rods constituting the prosthesis body, each of the joints is respectively connected to two of the connecting rods;
[0185] Based on the multiple angles, the multiple lengths and the position of the knee joint, the position and movement speed of each joint are calculated.
[0186] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment part.
[0187] Reference Fig.13 , shows a schematic diagram of a terminal device provided in an embodiment of the present application. Fig.13 As shown, the terminal device 1300 in the embodiment of the present application includes: a processor 1310, a memory 1320, and a computer program 1321 stored in the memory 1320 and executable on the processor 1310. When the processor 1310 executes the computer program 1321, the steps in each embodiment of the above-mentioned prosthetic motion prediction method are implemented, such as Figure 1 Alternatively, when the processor 1310 executes the computer program 1321, the functions of each module / unit in the above-mentioned device embodiments are realized, for example Fig.12 Functions of modules 1201 to 1204 are shown.
[0188] Exemplarily, the computer program 1321 may be divided into one or more modules / units, which are stored in the memory 1320 and executed by the processor 1310 to complete the present application. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which may be used to describe the execution process of the computer program 1321 in the terminal device 1300.
[0189] The terminal device 1300 may include, but is not limited to, a processor 1310 and a memory 1320. Those skilled in the art will appreciate that Fig.13 It is only an example of the terminal device 1300 and does not constitute a limitation of the terminal device 1300. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal device 1300 may also include input and output devices, network access devices, buses, etc.
[0190] The processor 1310 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0191] The memory 1320 may be an internal storage unit of the terminal device 1300, such as a hard disk or memory of the terminal device 1300. The memory 1320 may also be an external storage device of the terminal device 1300, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the terminal device 1300. Further, the memory 1320 may also include both an internal storage unit of the terminal device 1300 and an external storage device. The memory 1320 is used to store the computer program 1321 and other programs and data required by the terminal device 1300. The memory 1320 may also be used to temporarily store data that has been output or is to be output.
[0192] An embodiment of the present application also discloses a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the prosthetic motion prediction method as described in the aforementioned embodiments is implemented.
[0193] The embodiment of the present application further discloses a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the prosthetic motion prediction method as described in the above-mentioned embodiments is implemented.
[0194] The embodiments of the present application further disclose a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the prosthetic motion prediction method described in the aforementioned embodiments.
[0195] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application is described in detail with reference to the above-mentioned embodiments, a person skilled in the art should understand that the technical solutions described in the above-mentioned embodiments can still be modified, or some of the technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.
Claims
1. A method for predicting prosthetic motion, characterized in that: include: After the prosthesis starts to move, point cloud data of the terrain around the prosthesis is collected; Based on the point cloud data, determining obstacles present in the surrounding terrain; Extracting a plurality of feature point groups in the obstacle, the feature point groups being a plurality of point clouds located at the ends of a target horizontal line of the obstacle at various moments during the movement of the prosthesis; Determine the point cloud located at the same position in the feature point group at each time; Calculating the displacement of the point cloud located at the same position after the prosthesis starts to move; Calculate the average value of the displacement of the point clouds at different positions to obtain the average displacement of the feature point group; The motion state of the prosthesis is predicted based on the average displacement of the feature point group.
2. The method according to claim 1, characterized in that After the prosthesis starts to move, collecting point cloud data of the terrain around the prosthesis body includes: After the prosthesis starts to move, a depth camera installed at the knee joint position of the prosthesis body is used to collect original three-dimensional point cloud data around the prosthesis body, wherein the original three-dimensional point cloud data is data based on the coordinate system of the depth camera; Using an inertial measurement unit fixed to the depth camera, obtaining the Euler angle of the depth camera; Based on the original three-dimensional point cloud data and the Euler angles, obtaining three-dimensional point cloud data based on a ground coordinate system; The three-dimensional point cloud data is projected onto a plane perpendicular to a first coordinate axis to obtain two-dimensional point cloud data, wherein the first coordinate axis is parallel to the ground and perpendicular to the translation direction of the prosthesis.
3. The method according to claim 2, characterized in that The extracting a plurality of feature point groups from the obstacle comprises: Determining the target horizontal line based on the two-dimensional point cloud data; An inner point whose distance from the end of the target horizontal line is less than or equal to a first preset distance is used as a point cloud in the feature point group, and the inner point is a point cloud whose distance from the target horizontal line is less than or equal to a second preset distance.
4. The method according to claim 3, characterized in that: The step of determining the target horizontal line based on the two-dimensional point cloud data comprises: Based on the two-dimensional point cloud data, respectively extract the center line corresponding to each plane of the obstacle, wherein the center line is parallel to the ground around the prosthesis body; Determine the median with the largest and second largest number of interior points; Calculating the average values of target coordinates of the inner points on the two midlines with the largest number of inner points and the second largest number of inner points respectively, wherein the target coordinates are coordinates corresponding to the coordinate axis perpendicular to the ground around the prosthesis body; The center line with the larger average value is determined as the target horizontal line.
5. The method according to claim 1, characterized in that The predicting of the motion state of the prosthesis based on the average displacement of the feature point group includes: Determining the position of the knee joint of the prosthesis according to the average displacement of the feature point group; Obtaining the rotation angle of each joint of the prosthesis body and the length of multiple connecting rods constituting the prosthesis body, each of the joints is respectively connected to two of the connecting rods; Based on the multiple angles, the multiple lengths and the position of the knee joint, the position and movement speed of each joint are calculated.
6. The method according to any one of claims 1 to 5, characterized in that: The step of determining obstacles existing in the surrounding terrain based on the point cloud data includes: Converting the point cloud data into a binary image; The binary image is recognized using a pre-trained convolutional neural network to determine the obstacle present in the binary image, wherein the obstacle includes a plurality of planes with height differences.
7. A prosthetic motion prediction device, characterized in that: include: The acquisition module is used to collect point cloud data of the terrain around the prosthesis after the prosthesis starts to move; A determination module, used to determine obstacles existing in the surrounding terrain based on the point cloud data; An extraction module, used to extract a plurality of feature point groups in the obstacle, wherein the feature point groups are a plurality of point clouds located at the ends of a target horizontal line of the obstacle at various moments during the movement of the prosthesis; A prediction module, used to determine the point cloud located at the same position in the feature point group at each moment; Calculating the displacement of the point cloud located at the same position after the prosthesis starts to move; Calculate the average value of the displacement of the point clouds at different positions to obtain the average displacement of the feature point group; The motion state of the prosthesis is predicted based on the average displacement of the feature point group.
8. A terminal 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, the prosthetic motion prediction method according to any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the prosthetic motion prediction method according to any one of claims 1 to 6 is implemented.
