Gait data processing method, system and device and storage medium
By scanning the surface of the human leg with a two-dimensional lidar, a high-precision two-dimensional scanning point cloud is obtained, which is converted into leg coordinate points in the Cartesian coordinate system. The coordinates of the centers of the left and right leg circles are determined, which solves the accuracy and anti-interference problems of existing gait analysis methods and realizes efficient and accurate gait analysis.
Patent Information
- Application Number
- CN202510866078.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-26
- Publication Date
- 2025-09-19
AI Technical Summary
Existing gait analysis methods have problems such as low measurement accuracy, poor anti-interference ability and insufficient adaptability. In particular, video-based computer vision technology leads to privacy leakage, sensor-based inertial measurement technology has low accuracy, and pressure sensor-based methods have low accuracy when walking is incomplete.
A two-dimensional laser radar is used to scan the surface of the human leg to obtain the original two-dimensional scanning point cloud, which is converted into leg coordinate points in the Cartesian coordinate system and divided into left leg and right leg coordinate point sets. The coordinates of the center of the left and right leg circles are determined for gait analysis.
The accuracy and reliability of gait analysis are improved, external environmental interference is reduced, hardware costs and data processing volume are reduced, and data output efficiency is improved.
Smart Images

Figure CN120661129A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of gait analysis, and in particular to a gait data processing method, system, device and storage medium. Background Art
[0002] Gait analysis is a method for studying walking patterns. It aims to capture various gait parameters to reveal the key aspects and influencing factors of gait abnormalities, thereby guiding rehabilitation assessment and treatment, and aiding clinical diagnosis, efficacy evaluation, and mechanism research. Therefore, gait analysis is the scientific study of human movement patterns and is widely used in medicine, sports science, intelligent monitoring, rehabilitation therapy, and other fields. Gait analysis can obtain human movement parameters such as stride length, cadence, and gait cycle. These parameters are important for understanding gait health status, motor ability, and gait abnormalities.
[0003] There are numerous gait analysis methods, including video-based computer vision, sensor-based inertial measurement, and pressure sensor-based plantar analysis. Each method has its own advantages and applicable scenarios, but due to the complexity of gait analysis and the inherent complexity of the scenarios, traditional methods often face challenges in measurement accuracy, interference immunity, and adaptability. For example, video-based computer vision requires capturing the person's walking process, which undoubtedly leads to privacy breaches. Sensor-based inertial measurement typically uses posture sensors to collect posture data during walking. However, due to the accuracy limitations of posture sensors, the accuracy of the leg data collected is also low, resulting in low gait analysis accuracy. Pressure sensor-based plantar analysis requires the person to step on the pressure sensor while walking to obtain data. However, if the person's foot does not fully step on the pressure sensor during walking, the collected data will also be less accurate. Summary of the Invention
[0004] The purpose of the present invention is to provide a gait data processing method, system, device and storage medium. Because the scanning accuracy of the two-dimensional laser radar itself is relatively high, the original two-dimensional scanning point cloud obtained by scanning the surface of the human leg during walking by the two-dimensional laser radar has a high accuracy, and then converted into leg coordinate points in the Cartesian coordinate system to locate the specific position of the human leg surface, thereby determining the coordinates of the center of the left leg circle and the center of the right leg circle, so as to determine the movements of the left and right legs, thereby performing gait analysis.
[0005] To solve the above technical problems, the present invention provides a gait data processing method, comprising:
[0006] Obtaining the original two-dimensional scanning point cloud obtained by the two-dimensional laser radar scanning the surface of the human leg in the current scanning cycle;
[0007] Converting the original two-dimensional scanning point cloud into each leg coordinate point in a Cartesian coordinate system;
[0008] Dividing each of the leg coordinate points into a left leg coordinate point set and a right leg coordinate point set;
[0009] The center coordinates of the left leg circle are determined based on the left leg coordinate point set, and the center coordinates of the right leg circle are determined based on the right leg coordinate point set. The center coordinates of the left leg circle and the center coordinates of the right leg circle are used for gait analysis.
[0010] Preferably, converting the original two-dimensional scanning point cloud into coordinate points of each leg in a Cartesian coordinate system comprises:
[0011] Determine each polar coordinate point of the original two-dimensional scan point cloud in a polar coordinate system;
[0012] A Cartesian coordinate system is established with the position of the two-dimensional laser radar as the origin, the direction perpendicular to the coronal plane of the human body as the x-axis, and the direction perpendicular to the x-axis as the y-axis;
[0013] converting each of the polar coordinate points into each leg coordinate point in the Cartesian coordinate system based on the first expression and the second expression;
[0014] The first expression is:
[0015] ;
[0016] The second expression is:
[0017] ;
[0018] Among them, x is the horizontal coordinate of the leg coordinate point, y is the vertical coordinate of the leg coordinate point, distance is the distance between the point on the surface of the human leg corresponding to the polar coordinate point and the position of the two-dimensional laser radar, and angle is the azimuth angle of the point on the surface of the human leg corresponding to the polar coordinate point relative to the initial angle of the two-dimensional laser radar.
[0019] Preferably, it also includes:
[0020] Scaling processing is performed on each leg coordinate point, and each leg coordinate point after the scaling processing is displayed on a display screen.
[0021] Preferably, scaling the respective leg coordinate points includes:
[0022] performing scaling processing on the abscissa of the leg coordinate point based on the third expression, and performing scaling processing on the ordinate of the leg coordinate point based on the fourth expression;
[0023] The third expression is:
[0024] ;
[0025] The fourth expression is:
[0026] ;
[0027] in, is the horizontal coordinate of the leg coordinate point after scaling, is the vertical coordinate of the leg coordinate point after scaling, and d is a number greater than 1 set based on the resolution of the display screen.
[0028] Preferably, the leg coordinate points are divided into a left leg coordinate point set and a right leg coordinate point set, including:
[0029] S51: Randomly select a first center of mass and a second center of mass in the Cartesian coordinate system;
[0030] S52: Calculating a first absolute distance between the abscissa of each of the leg coordinate points and the abscissa of the first center of mass;
[0031] S53: Calculating a second absolute distance between the abscissa of each of the leg coordinate points and the abscissa of the second center of mass;
[0032] S54: dividing the leg coordinate points whose first absolute distance is greater than the second absolute distance into a first leg coordinate point set;
[0033] S56: Divide the leg coordinate points whose first absolute distance is not greater than the second absolute distance into a second leg coordinate point set;
[0034] S57: updating the first center of mass and the second center of mass based on each leg coordinate point in the first leg coordinate point set and each leg coordinate point in the second leg coordinate point set;
[0035] S58: Calculate a first mass center absolute distance between the updated first mass center and the first mass center before the update, and a second mass center absolute distance between the updated second mass center and the second mass center before the update;
[0036] S59: If both the first mass center absolute distance and the second mass center absolute distance are not greater than a preset threshold, determining the first leg coordinate point set and the second leg coordinate point set as the left leg coordinate point set and the right leg coordinate point set, respectively;
[0037] S60: If the first mass center absolute distance and / or the second mass center absolute distance is greater than the preset threshold, return to step S52.
[0038] Preferably, determining the first leg coordinate point set and the second leg coordinate point set as the left leg coordinate point set and the right leg coordinate point set, respectively, includes:
[0039] determining a relative scanning order of the leg coordinate points in the first leg coordinate point set and the leg coordinate points in the second leg coordinate point set within the current scanning cycle;
[0040] If the scanning order of the leg coordinate points in the first leg coordinate point set is before the scanning order of the leg coordinate points in the second leg coordinate point set, the first leg coordinate point set is determined as the left leg coordinate point set, and the second leg coordinate point set is determined as the right leg coordinate point set;
[0041] Alternatively, if the scanning order of the leg coordinate points in the first leg coordinate point set is after the scanning order of the leg coordinate points in the second leg coordinate point set, the first leg coordinate point set is determined as the right leg coordinate point set, and the second leg coordinate point set is determined as the left leg coordinate point set.
[0042] Preferably, determining the coordinates of the center of the left leg circle based on the left leg coordinate point set, and determining the coordinates of the center of the right leg circle based on the right leg coordinate point set, comprises:
[0043] Performing leg circle restoration processing on the left leg coordinate point set based on the fifth expression to determine the coordinates of the center of the left leg circle;
[0044] Performing leg circle restoration processing on the right leg coordinate point set based on the sixth expression to determine the coordinates of the center of the right leg circle;
[0045] The fifth expression is:
[0046] ;
[0047] The sixth expression is:
[0048] ;
[0049] in, is the sum of squared errors for the left leg, is the horizontal coordinate of the i-th leg coordinate point in the left leg coordinate point set, is the ordinate of the i-th leg coordinate point in the left leg coordinate point set, n is the total number of leg coordinate points in the left leg coordinate point set, is the sum of squared errors for the right leg, is the horizontal coordinate of the i-th leg coordinate point in the right leg coordinate point set, is the ordinate of the i-th leg coordinate point in the right leg coordinate point set, and m is the total number of leg coordinate points in the right leg coordinate point set;
[0050] When the sum of squares of the left leg errors is not greater than the preset error threshold, the corresponding is the horizontal coordinate of the center of the left leg circle, is the ordinate of the center coordinate of the left leg circle, is the radius of the left leg circle;
[0051] When the sum of squares of the right leg errors is not greater than the preset error threshold, the corresponding is the horizontal coordinate of the center of the right leg circle, is the ordinate of the center coordinate of the right leg circle, is the radius of the right leg circle.
[0052] Preferably, after determining the coordinates of the center of the left leg circle based on the left leg coordinate point set and determining the coordinates of the center of the right leg circle based on the right leg coordinate point set, the method further includes:
[0053] Performing sliding window averaging processing on the center coordinates of the left leg circle and the center coordinates of the right leg circle determined in each scanning cycle of the two-dimensional laser radar;
[0054] The center coordinates of the left leg circle and the right leg circle after sliding window averaging are used for gait analysis.
[0055] To solve the above technical problems, the present invention provides a gait data processing system, comprising:
[0056] An acquisition unit, configured to acquire an original two-dimensional scanning point cloud obtained by a two-dimensional laser radar scanning the surface of a human leg in a current scanning cycle;
[0057] A conversion unit, configured to convert the original two-dimensional scanning point cloud into coordinate points of each leg in a Cartesian coordinate system;
[0058] a division unit, configured to divide each of the leg coordinate points into a left leg coordinate point set and a right leg coordinate point set;
[0059] A determination unit is used to determine the center coordinates of the left leg circle based on the left leg coordinate point set, and to determine the center coordinates of the right leg circle based on the right leg coordinate point set. The center coordinates of the left leg circle and the center coordinates of the right leg circle are used for gait analysis.
[0060] To solve the above technical problems, the present invention provides a gait data processing device, comprising:
[0061] memory for storing computer programs;
[0062] The processor is configured to implement the steps of the gait data processing method as described above when executing the computer program.
[0063] In order to solve the above technical problems, the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the gait data processing method as described above are implemented.
[0064] The present application provides a gait data processing method, system, device and storage medium, which obtains the original two-dimensional scanning point cloud obtained by scanning the surface of the human leg with a two-dimensional laser radar, and then converts the original two-dimensional scanning point cloud into each leg coordinate point in a Cartesian coordinate system, and divides it into a set of left leg coordinate points and a set of right leg coordinate points, and finally determines the coordinates of the center of the left leg circle and the coordinates of the center of the right leg circle respectively, so as to perform gait analysis through the coordinates of the center of the left leg circle and the coordinates of the center of the right leg circle. Because the scanning accuracy of the two-dimensional laser radar itself is relatively high, the accuracy of the original two-dimensional scanning point cloud obtained after scanning the surface of the human leg during walking with the two-dimensional laser radar is relatively high, and then converted into leg coordinate points in a Cartesian coordinate system to locate the specific position of the surface of the human leg, thereby determining the coordinates of the center of the left leg circle and the coordinates of the center of the right leg circle, so as to determine the movements of the left and right legs, and thus perform gait analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] In order to more clearly illustrate the embodiments of the present invention, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0066] Figure 1 A flowchart of a gait data processing method provided in this application;
[0067] Figure 2 A schematic diagram of the installation position of a two-dimensional laser radar on a fixed walker provided in this application;
[0068] Figure 3 A schematic diagram of the installation position of a two-dimensional laser radar on a mobile walker provided in this application;
[0069] Figure 4 A schematic structural diagram of a gait data processing system provided in this application;
[0070] Figure 5 A schematic structural diagram of a gait data processing device provided in this application;
[0071] Figure 6 A schematic diagram of the structure of a computer-readable storage medium provided in this application. DETAILED DESCRIPTION
[0072] The core of the present invention is to provide a gait data processing method, system, device and storage medium. Because the scanning accuracy of the two-dimensional laser radar itself is relatively high, the original two-dimensional scanning point cloud obtained by scanning the surface of the human leg during walking by the two-dimensional laser radar has a high accuracy, and then converted into leg coordinate points in the Cartesian coordinate system to locate the specific position of the human leg surface, thereby determining the coordinates of the center of the left leg circle and the center of the right leg circle, so as to determine the movements of the left and right legs, thereby performing gait analysis.
[0073] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0074] Please refer to Figure 1 , Figure 1 A flow chart of a gait data processing method provided in this application, the method comprising:
[0075] S11: Obtaining an original two-dimensional scanning point cloud obtained by scanning the surface of the human leg by the two-dimensional laser radar in the current scanning cycle;
[0076] Gait analysis is often used in patient diagnosis scenarios. Many pathological gaits have very subtle abnormal features. A difference of a few millimeters in step length or width can make it appear to be within the normal range, leading to missed diagnosis or insufficient judgment of the severity of the problem. Therefore, it is necessary to improve the detection accuracy of gait data to improve the accuracy of gait analysis results.
[0077] For three-dimensional laser radar, it achieves stereoscopic perception of the spatial environment through multi-beam laser scanning. Its core is to simultaneously obtain the distance, azimuth and pitch angle information of a large number of points to form a dense 3D point cloud. Therefore, multiple groups of laser diodes are required to emit pulses at specific vertical angle intervals. This undoubtedly requires a large number of laser diodes to be set up in the space, which will cause space occupation and increase costs. In addition, the three-dimensional laser radar can not only scan the human leg data, but also scan the data of the entire space. The amount of data it needs to process is large, so its data output efficiency is low. In addition, when performing gait analysis, the analysis is mainly based on the human leg data. The human head data and upper limb data obtained by the three-dimensional laser radar are not very meaningful for gait analysis, which further causes a waste of cost.
[0078] Based on this, in this application, when obtaining the leg data of a human body when walking, the surface of the human leg is scanned by a two-dimensional laser radar. The two-dimensional laser radar is a sensor that measures the distance and angle of the surrounding environment by emitting a laser beam and receiving its reflected signal. It outputs point cloud data in a two-dimensional plane, that is, data composed of distance and angle values. Therefore, only one laser diode needs to be set up to scan the surface data of the human leg, which reduces the hardware cost. In addition, the amount of data to be processed is small and the data output efficiency is high. The laser diode inside the two-dimensional laser radar emits infrared laser pulses. The laser has high directivity and monochromaticity and can accurately point to a specific direction. The laser beam is scanned in the horizontal plane through a rotating reflector. The typical scanning range is 0°~360°, and the scanning speed can reach several to tens of revolutions per second. By setting the two-dimensional laser radar in a position where it can scan the legs of a person walking, the laser is reflected after encountering the surface of the human leg, and part of the light returns to the radar. The receiver captures the reflected light signal and converts it into an electrical signal. The two-dimensional laser radar calculates the time difference from the laser emission to the return, and calculates the distance between the laser emission point and the laser reflection point on the surface of the human leg based on the speed of light, which is the ranging point. The azimuth angle of the current laser beam relative to the initial angle of the two-dimensional laser radar is recorded in real time by the scanning motor or encoder, and each ranging point is bound to the azimuth angle to form polar coordinate data. All polar coordinate data calculated within a scanning range is the original two-dimensional scanning point cloud.
[0079] It should be noted that, since the trainee usually pushes or holds the walker by hand during walking training, the walker and the human body move in coordination. Therefore, the two-dimensional laser radar can be set on the walker, specifically at a position on the same horizontal plane as the preset position of the human calf, such as Figure 2 As shown, Figure 2 This is a schematic diagram of the installation position of a two-dimensional laser radar on a fixed walker provided in this application. It can be seen that Figure 2 The trainee walks on the treadmill of the walker, and the two-dimensional laser radar can scan the distance between the human leg surface and itself at the same horizontal plane and the corresponding azimuth angle of the laser beam relative to the initial angle of the two-dimensional laser radar. Figure 2 The walker shown in the figure is a fixed walker, which means the trainee can just walk on the treadmill. Figure 3 , Figure 3 This is a schematic diagram of the installation position of a two-dimensional laser radar on a mobile walker provided in this application. The trainee can push it by hand. Figure 3 If the walker moves with the trainee, the 2D LiDAR can also move with the trainee, scanning the surface of the leg in real time. Therefore, whether it is a fixed or mobile walker, the LiDAR can maintain a relatively fixed angle and position with the trainee, accurately and continuously capturing data on the surface of the leg without being disturbed by the external environment, ensuring data reliability.
[0080] In addition, for two-dimensional lidar, before outputting the original two-dimensional scanning point cloud, it can perform confidence screening on each data obtained from the scan, that is, screen the data with a confidence level greater than 97% from all the scanning data and output it as the original two-dimensional scanning point cloud, thereby improving the accuracy of the output original two-dimensional scanning point cloud.
[0081] S12: converting the original two-dimensional scanning point cloud into the coordinate points of each leg in the Cartesian coordinate system;
[0082] After obtaining the original two-dimensional scanning point cloud, since each point in the original two-dimensional scanning point cloud is a polar coordinate point composed of distance and angle, it is only possible to determine how many meters each point is in a certain direction, but it is impossible to intuitively determine the relative position between each point. Therefore, the original two-dimensional scanning point cloud is converted into each leg coordinate point in the Cartesian coordinate system, so as to locate the corresponding points on the surface of the human leg, that is, to determine the position of each point on the surface of the human leg in the plane.
[0083] S13: Divide each leg coordinate point into a left leg coordinate point set and a right leg coordinate point set;
[0084] In the current scanning cycle, each leg coordinate point includes the coordinate point of the left leg and the coordinate point of the right leg. This is because, in order to further determine the running status of the left leg and the right leg, as well as the motion status between the two legs, each leg coordinate point is divided into a left leg coordinate point set and a right leg coordinate point set. The left leg coordinate point set only includes the coordinate points of the left leg, and the right leg coordinate point set only includes the coordinate points of the right leg.
[0085] S14: Determine the center coordinates of the left leg circle based on the left leg coordinate point set, and determine the center coordinates of the right leg circle based on the right leg coordinate point set. The center coordinates of the left leg circle and the center coordinates of the right leg circle are used for gait analysis.
[0086] Since the two-dimensional laser radar may only scan data on one side of the human leg surface during scanning, such as only scanning data on the front of the human leg but not scanning data on the back of the human leg, the center coordinates of the left leg circle can be determined based on the left leg coordinate point set to determine the center coordinates of the entire left leg cross section, and the center coordinates of the right leg circle can be determined based on the right leg coordinate point set to determine the center coordinates of the entire right leg cross section.
[0087] Based on this, the step lengths of the left and right legs when walking, as well as the relative distance between the left and right legs, can be determined according to the coordinates of the center of the left leg circle and the center of the right leg circle, thereby determining the step width for gait analysis.
[0088] It should be noted that in this application, data processing is performed on the original two-dimensional scanning point cloud obtained in each scanning cycle to determine the coordinates of the center of the left leg circle and the center of the right leg circle in each scanning cycle. Because the legs of the human body are in a state of motion during walking, the coordinates of the center of the left leg circle and the center of the right leg circle determined in each scanning cycle are different. Because the two-dimensional laser radar scans several or dozens of times per second, its scanning accuracy is relatively high, and the degree of change of the coordinates of the center of the left leg circle and the center of the right leg circle in multiple scanning cycles is more accurate, thereby making the gait analysis results more accurate.
[0089] In summary, because the scanning accuracy of the two-dimensional laser radar itself is relatively high, the original two-dimensional scanning point cloud obtained after scanning the surface of the human leg during walking by the two-dimensional laser radar has a high accuracy, and then converted into leg coordinate points in the Cartesian coordinate system to locate the specific position of the human leg surface, thereby determining the coordinates of the center of the left leg circle and the center of the right leg circle, so as to determine the movements of the left and right legs and perform gait analysis.
[0090] Based on the above embodiment:
[0091] As a preferred embodiment, converting the original two-dimensional scanning point cloud into the coordinate points of each leg in the Cartesian coordinate system includes:
[0092] Determine each polar coordinate point of the original two-dimensional scanning point cloud in the polar coordinate system;
[0093] A Cartesian coordinate system is established with the location of the two-dimensional laser radar as the origin, the direction perpendicular to the coronal plane of the human body as the x-axis, and the direction perpendicular to the x-axis as the y-axis;
[0094] Convert each polar coordinate point into each leg coordinate point in a Cartesian coordinate system based on the first expression and the second expression;
[0095] The first expression is:
[0096] ;
[0097] The second expression is:
[0098] ;
[0099] Where x is the horizontal coordinate of the leg coordinate point, y is the vertical coordinate of the leg coordinate point, distance is the distance between the point on the surface of the human leg corresponding to the polar coordinate point and the location of the two-dimensional laser radar, and angle is the azimuth of the point on the surface of the human leg corresponding to the polar coordinate point relative to the initial angle of the two-dimensional laser radar.
[0100] In this embodiment, when converting the original two-dimensional scanning point cloud into each leg coordinate point in the Cartesian coordinate system, the polar coordinate points of the original two-dimensional scanning point cloud in the polar coordinate system are first determined. Specifically, when the two-dimensional laser radar scans the surface of the human leg within one scanning cycle, it starts from the 0° position, and one rotation of the laser is a scanning cycle. Then, the polar coordinates in the original two-dimensional scanning point cloud are the azimuth angle of the laser relative to 0° and the distance between the point on the human leg surface and the two-dimensional laser radar after the laser is emitted until it encounters a point on the human leg surface and is reflected back to the two-dimensional laser radar. Based on this, the first expression can be used to determine the coordinate point of the polar coordinate point in the Cartesian coordinate system, that is, the position of the corresponding point on the human leg surface in the Cartesian coordinate system.
[0101] When establishing a Cartesian coordinate system, the origin is the location of the two-dimensional laser radar, such as Figure 2 and Figure 3 As shown, the two-dimensional laser radar is set in front of the trainee, then the x-axis is the direction perpendicular to the human body's coronal plane, that is, the x-axis is the direction from the position of the two-dimensional laser radar to the front of the human body, or the opposite direction, and the y-axis is the direction perpendicular to the x-axis. When the two-dimensional laser radar is set in the middle position of the front of the trainee, then the preset direction is the direction extending from the origin along the x-axis, and this application does not limit this.
[0102] Based on this, the distance between each leg coordinate point and the origin in the Cartesian coordinate system is the distance between the corresponding point on the surface of the human leg and the position of the two-dimensional laser radar, so that the specific position of each point on the surface of the human leg can be located in the plane space.
[0103] In addition, by limiting the radar detection range within the Cartesian coordinate system, that is, limiting the trainee's range of motion from the Cartesian coordinate system, external interference can be reduced, and focus can be placed on data collection and gait analysis relative to the trainee, thereby improving the accuracy of data processing and the accuracy of gait analysis results.
[0104] As a preferred embodiment, the present invention further comprises:
[0105] Each leg coordinate point is scaled, and each scaled leg coordinate point is displayed on a display screen.
[0106] In addition, the various leg coordinate points in the Cartesian coordinate system determined in the present application can not only be subsequently processed for gait analysis, but also each leg coordinate point can be scaled, so that each leg coordinate point after scaling can be displayed through a display screen, so that the trainer or staff can view the position of the points of the outer circle of the trainer's leg cross-section in the plane during the current scanning cycle, and determine the changes in the trainer's legs when walking through the positions of the points of the outer circle of the trainer's leg cross-section in the plane during multiple scanning cycles.
[0107] As a preferred embodiment, scaling processing is performed on each leg coordinate point, including:
[0108] Scaling the horizontal coordinate of the leg coordinate point based on the third expression, and scaling the vertical coordinate of the leg coordinate point based on the fourth expression;
[0109] The third expression is:
[0110] ;
[0111] The fourth expression is:
[0112] ;
[0113] in, is the horizontal coordinate of the leg coordinate point after scaling. is the vertical coordinate of the leg coordinate point after scaling, and d is a number greater than 1 set based on the resolution of the display screen.
[0114] Specifically, since in actual scenarios, all leg coordinate points occupy a large space, it is not easy to directly set a display screen with a size equivalent to the trainee's walking range. Therefore, the leg coordinate points can be scaled according to the resolution of the display screen, and can also be scaled according to the contrast of the display screen. That is, when the contrast of the display screen is 2000:1, d can be 2000. Of course, this application does not limit this, and each leg coordinate point can be fully displayed on the display screen.
[0115] As a preferred embodiment, each leg coordinate point is divided into a left leg coordinate point set and a right leg coordinate point set, including:
[0116] S51: Randomly select the first and second centroids in the Cartesian coordinate system;
[0117] S52: Calculating a first absolute distance between the abscissa of each leg coordinate point and the abscissa of the first center of mass;
[0118] S53: Calculating a second absolute distance between the abscissa of each leg coordinate point and the abscissa of the second center of mass;
[0119] S54: dividing the leg coordinate points whose first absolute distance is greater than the second absolute distance into the first leg coordinate point set;
[0120] S56: grouping the leg coordinate points whose first absolute distance is not greater than the second absolute distance into a second leg coordinate point set;
[0121] S57: updating the first center of mass and the second center of mass based on each leg coordinate point in the first leg coordinate point set and each leg coordinate point in the second leg coordinate point set;
[0122] S58: Calculate the first center of mass absolute distance between the updated first center of mass and the first center of mass before the update, and the second center of mass absolute distance between the updated second center of mass and the second center of mass before the update;
[0123] S59: If both the first mass center absolute distance and the second mass center absolute distance are not greater than a preset threshold, determining the first leg coordinate point set and the second leg coordinate point set as a left leg coordinate point set and a right leg coordinate point set, respectively;
[0124] S60: If the first mass center absolute distance and / or the second mass center absolute distance is greater than the preset threshold, return to step S52.
[0125] In this embodiment, when dividing the left leg coordinate point set and the right leg coordinate point set, specifically, first randomly select two centroids from the Cartesian coordinate system, namely the first centroid and the second centroid, and calculate the absolute distance between each leg coordinate point and the two centroids. If the first absolute distance between the horizontal coordinate of a leg coordinate point and the first centroid is greater than the second absolute distance between the horizontal coordinate of the leg coordinate point and the second centroid, then the leg coordinate point is first divided into the first leg coordinate point set, otherwise it is divided into the second leg coordinate point set, and then the first centroid is updated based on each leg coordinate point in the first leg coordinate point set, and the second centroid is updated based on each leg coordinate point in the second leg coordinate point set, and the calculation is performed. The absolute distance between the first center of mass before the update and the first center of mass after the update, that is, the moving distance of the first center of mass before and after the update, and the moving distance of the second center of mass before and after the update. If the moving distances of the first center of mass and the second center of mass are not greater than the preset threshold, it can be determined that the first center of mass and the second center of mass converge, and the first leg coordinate point set and the second leg coordinate point set can be directly determined as the left leg coordinate point set and the right leg coordinate point set respectively. However, in order to improve the accuracy, multiple verifications can be performed until it is determined that the first center of mass and the second center of mass have absolutely converged, and then the first leg coordinate point set and the second leg coordinate point set are determined as the left leg coordinate point set and the right leg coordinate point set respectively.
[0126] However, if the moving distance of the first center of mass and the moving distance of the second center of mass before and after the update are not both greater than the preset threshold, then the center of mass does not converge, and it is necessary to further redivide the first leg coordinate point set and the second leg coordinate point set, that is, recalculate the first absolute distance and the second absolute distance between all leg coordinate points and the updated first center of mass and the second center of mass, and redivide the first leg coordinate point set and the second leg coordinate point set according to the size of the first absolute distance and the second absolute distance, until the first center of mass and the second center of mass converge.
[0127] As a preferred embodiment, the first leg coordinate point set and the second leg coordinate point set are respectively determined as a left leg coordinate point set and a right leg coordinate point set, including:
[0128] Determining a relative scanning order of the leg coordinate points in the first leg coordinate point set and the leg coordinate points in the second leg coordinate point set within a current scanning cycle;
[0129] If the scanning order of the leg coordinate points in the first leg coordinate point set is before the scanning order of the leg coordinate points in the second leg coordinate point set, the first leg coordinate point set is determined as the left leg coordinate point set, and the second leg coordinate point set is determined as the right leg coordinate point set;
[0130] Alternatively, if the scanning order of the leg coordinate points in the first leg coordinate point set is after the scanning order of the leg coordinate points in the second leg coordinate point set, the first leg coordinate point set is determined as the right leg coordinate point set, and the second leg coordinate point set is determined as the left leg coordinate point set.
[0131] When the first leg coordinate point set and the second leg coordinate point set are respectively determined as the left leg coordinate point set and the right leg coordinate point set, they can be determined according to the scanning order of the left leg and the right leg by the two-dimensional laser radar in the current scanning cycle. For example, if the two-dimensional laser radar scans the left leg first and then the right leg in the current scanning cycle, then if the angle of the polar coordinate point corresponding to each leg coordinate point in the first leg coordinate point set is smaller than the angle of the polar coordinate point corresponding to each leg coordinate point in the second leg coordinate point set, then the scanning order of the leg coordinate points in the first leg coordinate point set is before the scanning order of the leg coordinate points in the second leg coordinate point set, then the first leg coordinate point set is the first leg coordinate point set. The leg coordinate point set is the left leg coordinate point set, and the second leg coordinate point set is the right leg coordinate point set; or the two-dimensional laser radar scans the right leg first and then the left leg in the current scanning cycle, then if the angle of the polar coordinate point corresponding to each leg coordinate point in the first leg coordinate point set is not less than the angle of the polar coordinate point corresponding to each leg coordinate point in the second leg coordinate point set, then the scanning order of the leg coordinate points in the first leg coordinate point set is after the scanning order of the leg coordinate points in the second leg coordinate point set, then the first leg coordinate point set is the right leg coordinate point set, and the second leg coordinate point set is the left leg coordinate point set. Of course, the present application does not limit this. The left leg coordinate point area and the right leg coordinate point area in the Cartesian coordinate system can also be manually set. If each leg coordinate point in the first leg coordinate point set is in the left leg coordinate point area, and each leg coordinate point in the second leg coordinate point set is in the right leg coordinate point area, then the first leg coordinate point set is the left leg coordinate point set, and the second leg coordinate point set is the right leg coordinate point set.
[0132] As a preferred embodiment, determining the coordinates of the center of the left leg circle based on the left leg coordinate point set, and determining the coordinates of the center of the right leg circle based on the right leg coordinate point set, includes:
[0133] Perform leg circle restoration processing on the left leg coordinate point set based on the fifth expression to determine the coordinates of the center of the left leg circle;
[0134] Perform leg circle restoration processing on the right leg coordinate point set based on the sixth expression to determine the coordinates of the center of the right leg circle;
[0135] The fifth expression is:
[0136] ;
[0137] The sixth expression is:
[0138] ;
[0139] in, is the sum of squared errors for the left leg, is the horizontal coordinate of the i-th leg coordinate point in the left leg coordinate point set, is the ordinate of the i-th leg coordinate point in the left leg coordinate point set, n is the total number of leg coordinate points in the left leg coordinate point set, is the sum of squared errors for the right leg, is the horizontal coordinate of the i-th leg coordinate point in the right leg coordinate point set, is the ordinate of the i-th leg coordinate point in the right leg coordinate point set, and m is the total number of leg coordinate points in the right leg coordinate point set;
[0140] When the sum of squared errors of the left leg is not greater than the preset error threshold, the corresponding is the horizontal coordinate of the center of the left leg circle, is the ordinate of the center of the left leg circle, is the radius of the left leg circle;
[0141] When the sum of squared errors of the right leg is not greater than the preset error threshold, the corresponding is the horizontal coordinate of the center of the right leg circle, is the ordinate of the center of the right leg circle, is the radius of the right leg circle.
[0142] After dividing the left leg coordinate point set and the right leg coordinate point set, this embodiment further performs the restoration of the left leg circle and the right leg circle respectively, that is, the left leg cross section composed of each leg coordinate point in the left leg coordinate point set is restored to the coordinate points of the left leg circle, and the contour of the leg cross section is reconstructed. The right leg cross section composed of each leg coordinate point in the right leg coordinate point set is restored to the coordinate points of the right leg circle, and then the center of the left leg circle and the center of the right leg circle are determined, and the movement of the left leg and the right leg during walking is converted into the movement of the center of the circle, so as to more intuitively determine the distance and speed of the left leg and the right leg, thereby improving the accuracy of data processing and the accuracy of gait analysis.
[0143] Specifically, for the left leg, the preliminary center coordinates and preliminary radius are first selected based on the left leg coordinate point set, and the sum of squares of the left leg errors between the circle formed by each leg coordinate point in the left leg coordinate point set and the preliminary center coordinates is calculated. If the sum of squares of the left leg errors is not greater than the preset error threshold, the preliminary center coordinates can be set as the final center coordinates of the left leg circle. Otherwise, the center coordinates and radius need to be reselected, and the sum of squares of the left leg errors is calculated until the sum of squares of the left leg errors is not greater than the preset error threshold to determine the final center coordinates of the left leg circle.
[0144] It should be noted that the process of determining the coordinates of the center of the right leg circle is the same as that of the left leg circle, and will not be repeated here.
[0145] As a preferred embodiment, after determining the coordinates of the center of the left leg circle based on the left leg coordinate point set and determining the coordinates of the center of the right leg circle based on the right leg coordinate point set, the method further includes:
[0146] Perform sliding window averaging processing on the center coordinates of the left leg circle and the right leg circle determined in each scanning cycle of the two-dimensional laser radar;
[0147] The coordinates of the center of the left leg circle and the center of the right leg circle after sliding window averaging are used for gait analysis.
[0148] Since the two-dimensional laser radar is scanning the human legs, if there is a mirror reflection device in the environment or there is interference from the legs of other people, the left leg circle center coordinates and / or the right leg circle center coordinates determined within multiple scanning cycles may fluctuate. Therefore, the present application also performs sliding window averaging processing on the left leg circle center coordinates and the right leg circle center coordinates respectively to filter out high-frequency noise in each scanning cycle, retain key information, enhance data stability, and thereby improve the fitting accuracy of the left leg circle center coordinates and the right leg circle center coordinates, and reduce the error of gait analysis.
[0149] Please refer to Figure 4 , Figure 4 This is a schematic diagram of the structure of a gait data processing system provided in this application, which includes:
[0150] An acquisition unit 41 is configured to acquire an original two-dimensional scanning point cloud obtained by a two-dimensional laser radar scanning the surface of a human leg in a current scanning cycle;
[0151] A conversion unit 42, configured to convert the original two-dimensional scanning point cloud into coordinate points of each leg in a Cartesian coordinate system;
[0152] A division unit 43 is used to divide each leg coordinate point into a left leg coordinate point set and a right leg coordinate point set;
[0153] The determination unit 44 is used to determine the center coordinates of the left leg circle based on the left leg coordinate point set, and to determine the center coordinates of the right leg circle based on the right leg coordinate point set. The center coordinates of the left leg circle and the right leg circle are used for gait analysis.
[0154] For an introduction to the gait data processing system provided by the present invention, please refer to the above method embodiment, and the present invention will not be described in detail here.
[0155] Please refer to Figure 5 , Figure 5 This is a schematic diagram of the structure of a gait data processing device provided in this application, which includes:
[0156] Memory 51, for storing computer programs;
[0157] The processor 52 is configured to implement the steps of the above-mentioned gait data processing method when executing the computer program.
[0158] For an introduction to the gait data processing device provided by the present invention, please refer to the above method embodiment, and the present invention will not be described in detail here.
[0159] Please refer to Figure 6 , Figure 6 This is a structural diagram of a computer-readable storage medium provided in the present application. A computer program 62 is stored on the computer-readable storage medium 61. When the computer program 62 is executed by the processor 52, the steps of the gait data processing method as described above are implemented.
[0160] For an introduction to the computer-readable storage medium provided by the present invention, please refer to the above method embodiment, and the present invention will not go into details here.
[0161] It should also be noted that, in this specification, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus comprising the element.
[0162] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not limited to the embodiments shown herein but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A gait data processing method, characterized in that: include: Obtaining the original two-dimensional scanning point cloud obtained by the two-dimensional laser radar scanning the surface of the human leg in the current scanning cycle; Converting the original two-dimensional scanning point cloud into each leg coordinate point in a Cartesian coordinate system; Dividing each of the leg coordinate points into a left leg coordinate point set and a right leg coordinate point set; The center coordinates of the left leg circle are determined based on the left leg coordinate point set, and the center coordinates of the right leg circle are determined based on the right leg coordinate point set. The center coordinates of the left leg circle and the center coordinates of the right leg circle are used for gait analysis.
2. The gait data processing method according to claim 1, wherein: The original two-dimensional scanning point cloud is converted into the coordinate points of each leg in the Cartesian coordinate system, including: Determine each polar coordinate point of the original two-dimensional scan point cloud in a polar coordinate system; A Cartesian coordinate system is established with the position of the two-dimensional laser radar as the origin, the direction perpendicular to the coronal plane of the human body as the x-axis, and the direction perpendicular to the x-axis as the y-axis; converting each of the polar coordinate points into each leg coordinate point in the Cartesian coordinate system based on the first expression and the second expression; The first expression is: ; The second expression is: ; Among them, x is the horizontal coordinate of the leg coordinate point, y is the vertical coordinate of the leg coordinate point, distance is the distance between the point on the surface of the human leg corresponding to the polar coordinate point and the position of the two-dimensional laser radar, and angle is the azimuth angle of the point on the surface of the human leg corresponding to the polar coordinate point relative to the initial angle of the two-dimensional laser radar.
3. The gait data processing method according to claim 2, wherein: Also includes: Scaling processing is performed on each leg coordinate point, and each leg coordinate point after the scaling processing is displayed on a display screen.
4. The gait data processing method according to claim 3, wherein: Scaling each leg coordinate point includes: performing scaling processing on the abscissa of the leg coordinate point based on the third expression, and performing scaling processing on the ordinate of the leg coordinate point based on the fourth expression; The third expression is: ; The fourth expression is: ; in, is the horizontal coordinate of the leg coordinate point after scaling, is the vertical coordinate of the leg coordinate point after scaling, and d is a number greater than 1 set based on the resolution of the display screen.
5. The gait data processing method according to claim 1, wherein: Dividing each of the leg coordinate points into a left leg coordinate point set and a right leg coordinate point set includes: S51: Randomly select a first center of mass and a second center of mass in the Cartesian coordinate system; S52: Calculating a first absolute distance between the abscissa of each of the leg coordinate points and the abscissa of the first center of mass; S53: Calculating a second absolute distance between the abscissa of each of the leg coordinate points and the abscissa of the second center of mass; S54: dividing the leg coordinate points whose first absolute distance is greater than the second absolute distance into a first leg coordinate point set; S56: Divide the leg coordinate points whose first absolute distance is not greater than the second absolute distance into a second leg coordinate point set; S57: updating the first center of mass and the second center of mass based on each leg coordinate point in the first leg coordinate point set and each leg coordinate point in the second leg coordinate point set; S58: Calculate a first mass center absolute distance between the updated first mass center and the first mass center before the update, and a second mass center absolute distance between the updated second mass center and the second mass center before the update; S59: If both the first mass center absolute distance and the second mass center absolute distance are not greater than a preset threshold, determining the first leg coordinate point set and the second leg coordinate point set as the left leg coordinate point set and the right leg coordinate point set, respectively; S60: If the first mass center absolute distance and / or the second mass center absolute distance is greater than the preset threshold, return to step S52.
6. The gait data processing method according to claim 5, wherein: Determining the first leg coordinate point set and the second leg coordinate point set as the left leg coordinate point set and the right leg coordinate point set, respectively, includes: determining a relative scanning order of the leg coordinate points in the first leg coordinate point set and the leg coordinate points in the second leg coordinate point set within the current scanning cycle; If the scanning order of the leg coordinate points in the first leg coordinate point set is before the scanning order of the leg coordinate points in the second leg coordinate point set, the first leg coordinate point set is determined as the left leg coordinate point set, and the second leg coordinate point set is determined as the right leg coordinate point set; Alternatively, if the scanning order of the leg coordinate points in the first leg coordinate point set is after the scanning order of the leg coordinate points in the second leg coordinate point set, the first leg coordinate point set is determined as the right leg coordinate point set, and the second leg coordinate point set is determined as the left leg coordinate point set.
7. The gait data processing method according to claim 1, wherein: Determining the coordinates of the center of the left leg circle based on the left leg coordinate point set, and determining the coordinates of the center of the right leg circle based on the right leg coordinate point set, including: Performing leg circle restoration processing on the left leg coordinate point set based on the fifth expression to determine the coordinates of the center of the left leg circle; Performing leg circle restoration processing on the right leg coordinate point set based on the sixth expression to determine the coordinates of the center of the right leg circle; The fifth expression is: ; The sixth expression is: ; in, is the sum of squared errors for the left leg, is the horizontal coordinate of the i-th leg coordinate point in the left leg coordinate point set, is the ordinate of the i-th leg coordinate point in the left leg coordinate point set, n is the total number of leg coordinate points in the left leg coordinate point set, is the sum of squared errors for the right leg, is the horizontal coordinate of the i-th leg coordinate point in the right leg coordinate point set, is the ordinate of the i-th leg coordinate point in the right leg coordinate point set, and m is the total number of leg coordinate points in the right leg coordinate point set; When the sum of squares of the left leg errors is not greater than the preset error threshold, the corresponding is the horizontal coordinate of the center of the left leg circle, is the ordinate of the center coordinate of the left leg circle, is the radius of the left leg circle; When the sum of squares of the right leg errors is not greater than the preset error threshold, the corresponding is the horizontal coordinate of the center of the right leg circle, is the ordinate of the center coordinate of the right leg circle, is the radius of the right leg circle.
8. The gait data processing method according to any one of claims 1 to 7, characterized in that: After determining the coordinates of the center of the left leg circle based on the left leg coordinate point set and determining the coordinates of the center of the right leg circle based on the right leg coordinate point set, the method further includes: Performing sliding window averaging processing on the center coordinates of the left leg circle and the center coordinates of the right leg circle determined in each scanning cycle of the two-dimensional laser radar; The center coordinates of the left leg circle and the right leg circle after sliding window averaging are used for gait analysis.
9. A gait data processing system, characterized in that: include: An acquisition unit, configured to acquire an original two-dimensional scanning point cloud obtained by a two-dimensional laser radar scanning the surface of a human leg in a current scanning cycle; A conversion unit, configured to convert the original two-dimensional scanning point cloud into coordinate points of each leg in a Cartesian coordinate system; a division unit, configured to divide each of the leg coordinate points into a left leg coordinate point set and a right leg coordinate point set; A determination unit is used to determine the center coordinates of the left leg circle based on the left leg coordinate point set, and to determine the center coordinates of the right leg circle based on the right leg coordinate point set. The center coordinates of the left leg circle and the center coordinates of the right leg circle are used for gait analysis.
10. A gait data processing device, characterized in that: include: memory for storing computer programs; A processor, configured to implement the steps of the gait data processing method according to any one of claims 1 to 8 when executing a computer program.
11. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the gait data processing method according to any one of claims 1 to 8 are implemented.