An elderly abnormal gait recognition method and device based on monocular vision

By using video processing technology with a monocular camera and ground ruler lines, abnormal gait in the elderly can be automatically identified and quantified, solving the problems of high cost and complexity in existing technologies, and realizing low-cost and easy-to-implement detection and assessment of abnormal gait in the elderly.

CN123058716APending Publication Date: 2026-11-10PEKING UNION MEDICAL COLLEGE HOSPITAL
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611273557.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-21
Publication Date
2026-11-10

AI Technical Summary

Technical Problem

Existing technologies lack low-cost, easy-to-implement monocular vision methods, which cannot automatically identify various abnormal gait types in the elderly and conduct objective quantitative assessments. Furthermore, existing methods rely on manual annotation and involve expensive or complex equipment, making them difficult to popularize in grassroots settings.

Method used

Using a monocular camera and ground scale lines, the system acquires the temporal trajectory of key points through video processing, reconstructs gait spatiotemporal parameters and joint angles, and combines gait phases to perform automated detection and quantitative evaluation of various abnormal gaits, generating muscle function scores.

Benefits of technology

It enables low-cost, no-additional-equipment-recognition of abnormal gait in the elderly under normal conditions, reducing hardware costs, improving detection accuracy and objectivity of assessment, and is suitable for large-scale population screening and routine monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123058716A_ABST
    Figure CN123058716A_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on monocular vision's old person abnormal gait identification method and device.The method comprises: obtaining basic test environment parameter;Obtain the continuous video data of the old person to be detected;Continuous video data is handled to obtain the time sequence trajectory data of key point;Generation gait space-time parameter, joint angle time sequence curve and lower limb key point ground physical coordinate time sequence trajectory;According to joint angle time sequence curve, gait space-time parameter, lower limb key point ground physical coordinate time sequence trajectory and the time sequence trajectory data of key point, obtain abnormal gait identification information.The application only needs a common monocular camera and the ground scale line in test environment to complete gait data acquisition and quantitative evaluation, without the multi-camera array of three-dimensional motion capture system, infrared optical marker and special calibration site, also without wearable equipment such as inertial measurement unit, foot bottom pressure shoe pad.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image recognition technology, specifically to a method and device for recognizing abnormal gait in the elderly based on monocular vision. Background Technology

[0002] With the accelerating aging of the global population, the decline in motor function and the resulting health risks among the elderly have increasingly become a significant public health issue. Gait abnormalities are one of the early and typical manifestations of motor function decline in the elderly, and are closely related to fall risk, musculoskeletal degenerative diseases, neurological dysfunction, and cardiovascular health. Studies have shown that abnormal changes in gait parameters often precede the appearance of clinical symptoms. Therefore, objective and quantitative assessment of gait in the elderly is of significant clinical and social value for early detection of functional decline, prediction of fall risk, and development of rehabilitation intervention programs.

[0003] Currently, existing technical solutions for gait assessment in the elderly mainly include the following categories: The first category is clinical subjective scale assessment methods, such as the Tinetti Gait and Balance Scale, the Timed Stand-Up Walk Test (TUG), and the 6-Minute Walk Test (6MWT). These methods assess gait function through visual observation and subjective scoring by clinicians or testers. However, these methods have the following inherent limitations: First, the assessment results are highly dependent on the assessor's clinical experience and subjective judgment, resulting in poor consistency and repeatability among different assessors. Second, scale scores are usually discrete gradations, making it difficult to capture subtle gait abnormalities during low-intensity walking in older adults, and limiting the sensitivity for detecting early functional decline. Third, the traditional 6MWT only records macroscopic endpoint indicators such as total walking distance, failing to reflect the dynamic, cyclical gait kinematic characteristics during walking, and completely losing crucial information such as the timing, duration, and frequency of abnormal gait occurrences.

[0004] The second category is three-dimensional motion capture systems, such as the Vicon system based on infrared optical markers and motion analysis systems based on electromagnetic tracking. These systems use multiple high-speed cameras or sensors to perform three-dimensional spatial positioning of markers attached to the subject's body surface, acquiring high-precision joint angles, torques, and spatiotemporal parameters. However, this type of solution has the following drawbacks: First, the equipment is expensive; a complete three-dimensional motion capture system typically requires an investment of hundreds of thousands to millions of yuan, making it difficult to popularize in grassroots settings such as community health service centers and elderly care institutions. Second, it has strict requirements for the testing environment, requiring dedicated laboratory space and calibration procedures, and subjects need to attach a large number of surface markers, making the preparation process cumbersome and unsuitable for large-scale population screening and routine monitoring. Third, the system operation is complex, requiring professional technicians for data collection and post-processing, resulting in a high barrier to clinical promotion.

[0005] The third category is wearable sensor methods, such as gait analysis systems based on inertial measurement units (IMUs), plantar pressure insoles, and electromyography (EMG) signal acquisition devices. These methods collect data such as acceleration, angular velocity, pressure distribution, or EMG signals by wearing sensors on the subject's waist, lower limbs, or inside their shoes to invert gait parameters. While this approach reduces equipment costs and improves portability to some extent, it still has the following problems: First, subjects need to wear additional hardware; deviations in the wearing position and sensor drift directly affect measurement accuracy, and some elderly people have a negative attitude towards wearing the device, affecting the expression of natural gait. Second, wearable sensors typically only acquire indirect kinematic signals, requiring algorithms to invert joint angles and gait events; the individual adaptability and accuracy of the inversion model remain limited. Third, the synchronous calibration and data fusion of multi-sensor systems increase system complexity and maintenance costs.

[0006] The fourth category is gait analysis methods based on computer vision. In recent years, with the development of deep learning and human pose estimation technologies, non-contact gait analysis based on monocular or multi-view video has gradually become a research hotspot. This type of method acquires walking videos of subjects using cameras, extracts the coordinates of key human points using target detection and pose estimation algorithms, and then calculates the spatiotemporal parameters of the gait. However, existing vision-based gait analysis methods still have the following technical shortcomings: First, there is the problem of scale recovery in monocular vision. Most existing gait analysis methods based on monocular cameras can only acquire two-dimensional pixel coordinates within the image plane, lacking depth information. This makes it impossible to directly convert pixel distances into true physical scales, resulting in difficulties in accurately obtaining the absolute values ​​of key physical parameters such as stride length, stride width, and stride speed. Some solutions estimate scale by assuming the subject's height or known proportions of body parts, but this estimation method introduces significant individual errors and cannot adapt to scenarios with different heights and shooting distances.

[0007] Secondly, the ability to identify abnormal gait is insufficient. Existing visual gait analysis methods mostly focus on extracting macroscopic spatiotemporal parameters such as gait speed, stride length, gait frequency, and gait cycle, lacking fine-grained identification of abnormal gait patterns. Specifically, existing methods can usually only determine whether gait is abnormal, but cannot further identify the specific type of abnormal gait, such as pelvic tilt or sinking, trunk compensatory swing, knee hyperextension or hypoflexion, foot drop or dragging, insufficient push-off force, and other abnormal patterns with clear clinical significance. Although some studies have attempted to detect abnormalities based on key point coordinates, the detection criteria are mostly simple fixed thresholds or full-cycle statistics, without combining gait phases (stance phase / swing phase, unilateral / bilateral stance) for conditional analysis, resulting in insufficient differentiation between normal physiological movement and pathological abnormalities, and a high false positive rate.

[0008] Third, it relies on manual annotation and lacks an automated detection mechanism. Some existing solutions, after acquiring video and key points, still require trained professionals to observe the video frame by frame or segment by segment, manually annotating and scoring abnormal gaits. This approach is not only inefficient and labor-intensive, but the annotation results are also affected by subjective factors, making it difficult to guarantee consistency among different annotators, and resulting in insufficient reproducibility and objectivity of the evaluation results.

[0009] Fourth, the quantitative assessment system is crude. Existing methods for assessing the severity of gait abnormalities often employ simple discrete scoring rules, such as 1 point for a single occurrence, 2 points for multiple occurrences, and 3 points for a duration exceeding 1 minute. This scoring method only considers the frequency and approximate duration of the abnormality, failing to incorporate the severity of the abnormality (i.e., the degree to which kinematic parameters deviate from the normal range) into the quantitative model. Consequently, the scoring results cannot accurately reflect the true level of muscle dysfunction, and the setting of scoring thresholds lacks objective basis.

[0010] Fifth, the mapping between abnormal gait and muscle function lacks technical support. Although the biomechanics field knows that there is a correspondence between abnormal gait and dysfunction of specific muscle groups (such as weakness of the gluteus medius leading to pelvic tilt, weakness of the quadriceps femoris leading to insufficient knee flexion, and weakness of the tibialis anterior leading to foot drop), most existing visual gait analysis methods are limited to the extraction of gait parameters. They have not established a complete technical link from the automatic detection results of abnormal gait to the quantitative assessment of muscle function, and cannot directly output the functional scores of each target muscle, thus limiting their clinical guidance value.

[0011] In summary, existing technologies lack a low-cost, easy-to-implement, hardware-free technical solution capable of automatically identifying and objectively quantifying various abnormal gait types based on ordinary monocular video. How to reconstruct gait parameters at a real physical scale under monocular vision conditions, how to combine gait temporal phases to achieve automated, high-precision detection of various abnormal gaits, and how to construct a multi-dimensional quantitative scoring model fusing frequency, duration, and severity are pressing technical problems to be solved in this field. Summary of the Invention

[0012] The purpose of this invention is to provide a method for recognizing abnormal gait in the elderly based on monocular vision, which at least solves one of the above-mentioned technical problems.

[0013] One aspect of the present invention provides a method for recognizing abnormal gait in the elderly based on monocular vision, the method comprising: Step 1: Basic test environment parameters; Step 2: Acquire continuous video data of the elderly person to be tested; Step 3: Process the continuous video data to obtain the temporal trajectory data of key points; Step 4: Generate gait spatiotemporal parameters, joint angle temporal curves, and ground physical coordinate temporal trajectories of lower limb key points based on the temporal trajectory data of the key points and the basic test environment parameters; Step 5: Based on the joint angle time-series curve, gait spatiotemporal parameters, ground physical coordinate time-series trajectory of lower limb key points, and time-series trajectory data of key points, abnormal gait is identified to obtain abnormal gait identification information.

[0014] Optionally, the method for recognizing abnormal gait in the elderly based on monocular vision further includes: Step 6: Generate the abnormal load index and muscle function score for each target muscle based on abnormal gait identification information, joint angle temporal curves, and gait spatiotemporal parameters; Step 7: Generate comprehensive assessment information based on the abnormal load index and muscle function score of each target muscle.

[0015] Optionally, step 3 includes: Step 31: Perform video decoding and original frame sequence extraction on the temporal trajectory data of key points to obtain the original frame sequence; Step 32: Perform frame-level denoising on the original frame sequence to obtain a denoised frame sequence; Step 33: Extract the keyframe sequence based on the denoised frame sequence and the original frame rate; Step 34: Perform human target detection and tracking based on the keyframe sequence to obtain the human bounding box, the expanded cropping box, the scaled human region image, and the coordinate mapping parameters for each frame of the elderly person to be detected. Step 35: Perform 2D human pose estimation and key point extraction based on the scaled human region image and coordinate mapping parameters, thereby obtaining the original pixel coordinates of key points in each frame, the detection confidence of each key point, and the key point state label; Step 36: Construct and spatiotemporally smooth the temporal trajectory of key points based on the original pixel coordinates of key points in each frame, the detection confidence of each key point, and the state marker of key points, thereby generating the 2D pixel coordinate temporal trajectory of key points. The 2D pixel coordinate temporal trajectory of key points is used as the temporal trajectory data of key points.

[0016] Optionally, the basic test environment parameters include the camera intrinsic parameter matrix, the ground homography matrix, the scale factor, and the pixel coordinates of the two endpoints of the scale line; Step 4 includes: Step 41: Refine the ground homography matrix based on the basic test environment parameters to obtain the refined ground homography matrix; Step 42: Based on the refined ground homography matrix and the temporal trajectory data of key points, perform ground physical coordinate mapping of lower limb key points to obtain the temporal trajectory of bipedal ground physical coordinates; Step 43: Gait event monitoring is performed based on the temporal trajectory of the physical coordinates of both feet on the ground and the key frame timestamps, thereby obtaining the foot tracking event sequence, the cycle duration of each gait cycle, the duration of the support phase, and the duration of the swing phase; Step 44: Calculate gait spatiotemporal parameters based on the temporal trajectory of the physical coordinates of the two feet on the ground and the sequence of foot tracking events, thereby obtaining stride length information, stride width information, stride speed information, stride frequency information, average support phase ratio and the ratio sequence per cycle; Step 45: Perform joint angle timing calculations based on the timing trajectory data of the key points to obtain the joint angle timing curve; Step 46: Perform gait cycle alignment and normalization based on the foot tracking event sequence and joint angle time-series curve to obtain the aligned gait spatiotemporal parameters and joint angle time-series curve.

[0017] Optionally, step 5 includes: Step 51: Perform anomaly detection preprocessing and gait phase localization based on the foot tracking event sequence, gait spatiotemporal parameters, and joint angle time-series curves to obtain fine temporal information for each gait cycle; Step 52: Generate information on abnormal pelvic tilt or subsidence events based on the fine phase markers of each gait cycle and the joint angle time-series curves; Step 53: Detect trunk compensatory swaying based on the temporal trajectory data of the key points, thereby obtaining information on abnormal trunk compensatory swaying events; Step 54: Detect knee hyperextension or hypoflexion based on the temporal trajectory data of the key points, thereby obtaining information on abnormal events of knee hyperextension or hypoflexion. Step 55: Detect foot drop or dragging based on the temporal trajectory data of the key points, thereby obtaining abnormal event information of foot drop or dragging. Step 56: Detect insufficient pushing force based on the time-series trajectory data of the key points, thereby obtaining information on abnormal events of insufficient pushing force; it can also simultaneously detect abnormalities of anterior pelvic tilt and posterior trunk tilt, generating information on abnormal events of anterior pelvic tilt or posterior trunk tilt. Step 57: Perform abnormal event fusion and deduplication on the abnormal event information of pelvic tilt or sinking, abnormal event information of trunk compensatory swing, abnormal event information of knee hyperextension or flexion, abnormal event information of foot drop or dragging, and abnormal event information of insufficient pushing force to obtain abnormal gait recognition information.

[0018] Abnormal gait identification information can also be obtained by fusing and deduplicating abnormal events such as pelvic tilt or sinking, trunk compensatory swing, knee hyperextension or flexion, foot drop or dragging, insufficient pushing force, and anterior pelvic tilt or posterior trunk tilt.

[0019] Optionally, the fine temporal information of each gait cycle includes: the early support phase time interval, the middle support phase time interval, the late support phase time interval, the early swing phase time interval, the late swing phase time interval, frame-by-frame support type markers, and the intersection time interval between the unilateral support phase and the middle support phase; wherein, the frame-by-frame support type markers include three types: left-side unilateral support, right-side unilateral support, and bilateral support, and the intersection time interval between the unilateral support phase and the middle support phase is the overlapping part of the unilateral support phase time interval and the middle support phase time interval; The joint angle time series curves include: left and right knee joint angle time series curves, left and right hip joint angle time series curves, left and right ankle joint angle time series curves, and pelvic tilt angle time series curves; wherein, the pelvic tilt angle is the angle between the line connecting the left and right hip joints and the horizontal line, and a pelvic tilt angle of zero degrees indicates that the pelvis is in a horizontal neutral position. Step 52 includes: Step 521: Extract the pelvic tilt angle time series curve from the joint angle time series curve. Based on the intersection time interval between the unilateral support phase and the mid-term support phase, extract the peak absolute value of the pelvic tilt angle in the mid-term intersection interval of the right unilateral support phase and the mid-term intersection interval of the left unilateral support phase, respectively, as the right pelvic subsidence amount and the left pelvic subsidence amount. Step 522: Compare the right pelvic sinking amount and the left pelvic sinking amount with the first preset angle threshold respectively. When the sinking amount of the pelvis on either side is greater than the first preset angle threshold, it is determined that there is an abnormal pelvic tilt or sinking in the gait cycle. Step 523: Calculate the pelvic sinking asymmetry index based on the average value of the right pelvic sinking and the average value of the left pelvic sinking; compare the pelvic sinking asymmetry index with a preset asymmetry threshold; when the pelvic sinking asymmetry index is greater than the preset asymmetry threshold, it is determined that there is abnormal pelvic tilt or sinking, and the side with the larger average value of pelvic sinking is identified as the abnormal side. Step 524: Based on the judgment results of Step 522 and Step 523, generate abnormal pelvic tilt or sinking event information. The abnormal pelvic tilt or sinking event information includes the time of occurrence of the abnormality, duration, abnormal side, peak sinking angle, trigger criterion number, and corresponding gait cycle number.

[0020] Optionally, the temporal trajectory data of the key points further includes the two-dimensional pixel coordinate temporal trajectory of the coordinates of the key points of the left and right shoulder joints and the coordinates of the key points of the left and right hip joints. Step 53 includes: Step 531: Calculate the coordinates of the trunk reference point based on the coordinates of the left and right shoulder joint key points, wherein the trunk reference point is the midpoint coordinate of the left and right shoulder joint key points; calculate the coordinates of the pelvic reference point based on the coordinates of the left and right hip joint key points, wherein the pelvic reference point is the midpoint coordinate of the left and right hip joint key points. Step 532: Calculate the torso tilt angle frame by frame based on the coordinates of the torso reference point and the pelvic reference point to form a torso tilt angle time-series curve; wherein, the torso tilt angle is the arctangent of the offset of the torso reference point relative to the pelvic reference point in the horizontal direction of the image and the distance from the torso reference point to the pelvic reference point in the vertical direction of the image; the torso tilt angle is a dimensionless angle quantity that eliminates the influence of height and shooting distance; a positive torso tilt angle indicates that the torso tilts to the right of the image, and a negative torso tilts to the left of the image; Step 533: Based on the intersection time interval between the single-sided support phase and the mid-term of the support phase, extract the first peak value of the trunk lateral tilt angle in the mid-term intersection interval of the right single-sided support phase, and extract the second peak value of the trunk lateral tilt angle in the mid-term intersection interval of the left single-sided support phase; when the absolute value of the first peak value is greater than the second preset angle threshold and the trunk lateral tilt angle is positive, or when the absolute value of the second peak value is greater than the second preset angle threshold and the trunk lateral tilt angle is negative, it is determined that there is an abnormal trunk compensatory swing in the gait cycle; Step 534: Generate trunk compensatory swing abnormal event information based on the judgment result. The trunk compensatory swing abnormal event information includes the time of abnormal occurrence, duration, peak trunk tilt angle, tilt direction, supporting leg side, and corresponding gait cycle number.

[0021] Optionally, the joint angle time series curve further includes the left and right knee joint angle time series curves, wherein the knee joint angle is the angle between the thigh vector and the lower leg vector, and a knee joint angle of 180 degrees indicates that the knee joint is fully extended, and less than 180 degrees indicates that the knee joint is flexed. Step 54 includes: Step 541: Based on the mid-stance time interval of the support phase, extract the mean and maximum knee joint angles in the mid-stance of the support phase of each gait cycle from the time-series curves of the left and right knee joint angles, and extract the minimum knee joint angle and its corresponding occurrence time in the entire cycle of each gait cycle. Step 542: When the maximum knee angle during the middle of the support phase is greater than the third preset angle threshold, and the duration of the knee angle being greater than the third preset angle threshold is greater than the proportion of the middle of the support phase duration, it is determined that there is an abnormal knee hyperextension in the leg of that gait cycle. Step 543: When the average knee angle during the middle of the support phase is greater than the fourth preset angle threshold, it is determined that the leg on this side has an abnormality of insufficient knee flexion in this gait cycle; or, when the time corresponding to the minimum knee angle occurs later than the end of the middle of the support phase, it is determined that the leg on this side has an abnormality of insufficient knee flexion in this gait cycle. Step 544: Based on the determination results of Step 542 and Step 543, generate abnormal event information of knee hyperextension or flexion insufficiency. The abnormal event information of knee hyperextension or flexion insufficiency includes abnormal subtype, occurrence time, duration, extreme value of knee joint angle, side, and corresponding gait cycle number.

[0022] Optionally, the joint angle time-series curves further include left and right ankle joint angle time-series curves. The ankle joint angle is the angle between the lower leg vector and the foot vector. An ankle joint angle of 90 degrees indicates that the ankle joint is in a neutral position, greater than 90 degrees indicates dorsiflexion, and less than 90 degrees indicates plantarflexion. The time-series trajectory data of the key points includes the two-dimensional pixel coordinate time-series trajectory of the key point coordinates of the left and right toes. The basic test environment parameters include a scale factor. Step 55 includes: Step 551: Calculate the time-series curves of the height of the left and right toes off the ground based on the coordinates of the key points of the left and right toes and the scale factor; wherein, the height of the toes off the ground is the physical height after the difference between the vertical coordinates of the key points of the toes and the vertical coordinates of the ground reference line is converted by the scale factor. Step 552: Determine the swing phase interval based on the early swing phase time interval and the late swing phase time interval. Calculate the proportion of frames with ankle joint angles less than 90 degrees to the total number of swing phase frames within the swing phase interval. When the proportion is greater than the second preset proportion threshold and the minimum ankle joint angle within the swing phase interval is less than the fifth preset angle threshold, it is determined that there is foot drop abnormality in the leg on that side of the gait cycle. Step 553: Calculate the proportion of frames in the swing phase interval where the toe height is less than a preset height threshold to the total number of frames in the swing phase. If the proportion is greater than a third preset proportion threshold, determine that the leg on that side has a dragging abnormality in the gait cycle; or, calculate the integral value of the toe height over time in the swing phase interval. If the integral value is less than a preset integral threshold, determine that the leg on that side has a dragging abnormality in the gait cycle. Step 554: Based on the determination results of Step 552 and Step 553, generate foot drop or dragging abnormal event information. The foot drop or dragging abnormal event information includes abnormal subtype, occurrence time, duration, plantar flexion time percentage, low height time percentage, ground clearance height integral value, side, and corresponding gait cycle number.

[0023] This application also provides a monocular vision-based device for recognizing abnormal gait in the elderly, the monocular vision-based device for recognizing abnormal gait in the elderly comprising: A basic test environment parameter acquisition module, which is used to acquire basic test environment parameters; A continuous video data acquisition module, wherein the continuous video data acquisition module is used to acquire continuous video data of the elderly person to be detected; A time-series trajectory acquisition module is used to process the continuous video data to obtain time-series trajectory data of key points; A monocular scale recovery and gait parameter reconstruction module is used to generate gait spatiotemporal parameters, joint angle temporal curves, and ground physical coordinate temporal trajectories of lower limb key points based on the temporal trajectory data of the key points and basic test environment parameters. An abnormal gait recognition module is used to identify abnormal gait based on joint angle time-series curves, gait spatiotemporal parameters, ground physical coordinate time-series trajectories of lower limb key points, and time-series trajectory data of key points, thereby obtaining abnormal gait recognition information.

[0024] This application's method for identifying abnormal gait in the elderly based on monocular vision requires only a single ordinary monocular camera and existing ground markings in the experimental environment to complete gait data acquisition and quantitative assessment. It eliminates the need for multi-camera arrays, infrared optical markers, and dedicated calibration sites required by 3D motion capture systems, as well as wearable devices such as inertial measurement units and foot pressure insoles. Compared to 3D motion capture systems, hardware costs are reduced by more than an order of magnitude. Compared to wearable sensor methods, subjects do not need to wear any devices; assessment can be completed simply by walking naturally, fundamentally avoiding interference from wearable devices on gait expression and the resistance some elderly individuals may have to wear devices. Due to the simplicity of the acquisition equipment and low environmental requirements, this method can be rapidly deployed in ordinary spaces such as community health service center activity rooms and corridors of elderly care facilities, providing a feasible technical path for large-scale gait screening and routine functional monitoring of the elderly population. Attached Figure Description

[0025] Figure 1 This is a flowchart illustrating a method for recognizing abnormal gait in the elderly based on monocular vision, provided in an embodiment of this application.

[0026] Figure 2 This is a schematic diagram of the arrangement of the basic test environment parameter acquisition equipment in one embodiment of this application. Detailed Implementation

[0027] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions in the embodiments of this application will be described in more detail below with reference to the accompanying drawings. In the drawings, the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The described embodiments are some, but not all, embodiments of this application. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application. The embodiments of this application will be described in detail below with reference to the accompanying drawings.

[0028] like Figure 1 The monocular vision-based method for recognizing abnormal gait in the elderly includes: Step 1: Obtain basic test environment parameters; Step 2: Acquire continuous video data of the elderly person to be tested; Step 3: Process the continuous video data to obtain the temporal trajectory data of key points; Step 4: Generate gait spatiotemporal parameters, joint angle temporal curves, and ground physical coordinate temporal trajectories of lower limb key points based on the temporal trajectory data of the key points and the basic test environment parameters; Step 5: Based on the joint angle time-series curve, gait spatiotemporal parameters, ground physical coordinate time-series trajectory of lower limb key points, and time-series trajectory data of key points, abnormal gait is identified to obtain abnormal gait identification information.

[0029] See Figure 2 A 30m long ruler line is longitudinally affixed to the floor of the activity room, which is longer than 40m. The starting point of the ruler line is marked as the starting point of the walk, and the ending point is marked as the ending point. The ruler line is drawn using tape or paint with high visual contrast, and the line width is no less than 2cm to ensure clear identification in the video image. A scale mark is placed every 5m on the ruler line, for a total of 7 intermediate scale points, used for multi-point constraints in subsequent homography matrix calculations. The lower edge of the ruler line in the image is used as the ground reference line, and its v-coordinate is determined by averaging the v-values ​​of the pixel coordinates of the starting and ending points of the ruler line, denoted as v. ground Because the camera's optical axis is parallel to the ground and the scale lines are arranged along the direction of travel, the ground reference line appears approximately horizontal in the image. ground It remains constant throughout the entire process.

[0030] A monocular camera is positioned 1 meter directly in front of the starting point of the scale line. The camera lens optical axis is parallel to the scale line (i.e., the optical axis is along the subject's walking direction), and the camera height is fixed between 1.0m and 1.3m, preferably 1.2m. The technical reason for this height and angle setting is that when the camera is directly in front of the subject and at a height close to the subject's center of gravity, the subject always faces the camera during walking. Joint movements in both the coronal and sagittal planes can be better projected onto the image plane, avoiding the problem of key points on the left and right legs obscuring each other when shooting from the side. The camera is connected to a computer via a data cable to transmit video streams in real time.

[0031] Set up a barrier (such as a screen or isolation strip) 3m vertically away from the scale line to isolate the test area from the outside world and prevent non-subjects from accidentally entering the shooting scene and causing interference with target detection.

[0032] The lighting conditions in the test environment should be kept uniform and stable, avoiding direct strong light or strong shadows, and ensuring that the subject's body outline and joints are clearly identifiable in the video.

[0033] Before the test, participants were instructed to change into comfortable walking shoes and remove any accessories that might affect gait (such as canes, walking aids, etc., unless the participant absolutely needed them in their daily life). The tester assessed the participants' basic vital signs, such as blood pressure and heart rate, to confirm that their physical condition was suitable for the 6-minute walking test. Participants were then instructed to perform 3 to 5 minutes of warm-up activities (such as marching in place and ankle rotations) to reduce the risk of injury and stabilize their gait.

[0034] After warming up, the subject stands at the starting point of the scale line, facing the camera, and listens to the tester's command to prepare for the 6-minute walking test. At this time, the subject is in a static standing position, and this frame image can be used for reference calibration of the subsequent pelvic tilt angle neutral position.

[0035] Before formally collecting gait videos of the subjects, the monocular camera was calibrated to obtain the camera's intrinsic parameter matrix K. The intrinsic parameter calibration adopted the checkerboard calibration method. The specific process was as follows: a calibration board with a checkerboard pattern of known size was placed on the ground of the test site and at different spatial locations, and at least 20 calibration images were taken from multiple angles and distances to ensure that the checkerboard pattern covered different areas and orientations in the images.

[0036] The calibration image is processed using Zhang Zhengyou's calibration method or its improved algorithm to solve for the camera's intrinsic parameter matrix K: ; in, and These are the equivalent focal lengths (in pixels) in the x and y directions of the image, respectively. and The coordinates of the principal point of the image are given (unit: pixels). Simultaneously, the camera's distortion coefficients (including radial and tangential distortion) are calculated for subsequent image distortion correction. After the intrinsic parameters are calibrated, the camera parameters (focal length, aperture, resolution) remain constant throughout the experiment to ensure the effectiveness of the intrinsic parameter matrix.

[0037] The ground homography matrix is ​​used to establish the mapping relationship between image pixel coordinates and ground physical coordinates. Since the scale line is pasted on the ground plane, all points on the scale line satisfy the constraint of Z=0 in the world coordinate system. Therefore, the projection from the ground plane to the image plane can be described by the homography matrix.

[0038] Define the ground physical coordinate system O-XY: the origin O is located at the projection position of the starting point of the scale line on the ground, the Y-axis is along the direction of the scale line (i.e. the direction of the subject's movement), the X-axis is perpendicular to the direction of the scale line (i.e. the direction of the coronal plane), and the ground plane satisfies Z=0.

[0039] Define the image pixel coordinate system o-uv: the origin o is located at the upper left corner of the image, the u axis is horizontal to the right, and the v axis is vertical to the bottom.

[0040] For any point on the ground plane, with world coordinates (X, Y, 0) and image projection coordinates (u, v), there exists a homography matrix H such that: ; Here, H is a 3×3 matrix with 8 degrees of freedom (after homogeneous coordinate scaling). H is solved using known scale points on the scale line. Specifically, the physical coordinates of the starting point of the scale line are (0,0), the ending point is (0,30), and the intermediate scale points are (0,5), (0,10), (0,15), (0,20), and (0,25), totaling 9 reference points with known physical coordinates. In the calibration images captured by the camera, the pixel coordinates corresponding to these 9 reference points are manually or automatically identified. (m=1,2,...,9).

[0041] Substitute the nine corresponding points into the homography equation to construct an overdetermined linear equation system, and use the direct linear transformation (DLT) algorithm to solve for the initial value of H.

[0042] Specifically, the homography matrix H is a 3×3 matrix: ; in to These are the nine elements of the homography matrix H. For each pair of corresponding points... The homography equation expands to: ; ; Substituting the nine corresponding points into the above equations, an overdetermined linear system of equations containing 18 equations can be constructed. The initial value of H is solved using the direct linear transformation (DLT), and then the Levenberg-Marquardt algorithm is used for nonlinear optimization with the goal of minimizing the reprojection error, to obtain the refined ground homography matrix H*. Reprojection error is defined as the root mean square error between the pixel coordinates obtained by projecting the physical coordinates of all reference points onto the H-projection and the actual recognized pixel coordinates: ; Where M=9 is the number of reference points. , These are the pixel coordinates obtained from H* projection. Requirements: ≤2 pixels; if the value exceeds this threshold, the reference point coordinates are re-identified and the solution is recalculated.

[0043] The scale factor *s* is used to convert the pixel distance along the v-axis of the image into the actual physical height, and is a core parameter supporting fast calculation of ground clearance. To verify the accuracy of scale restoration, a reverse mapping verification is performed using the endpoint of the scale line: the pixel coordinates of the endpoint of the scale line are... , pass The inverse matrix is ​​mapped back to ground physical coordinates: ; Calculate the scale line length obtained by reverse mapping and with a known length By comparison, the relative error of the scale is obtained: ; Require ≤1%. If If the accuracy is greater than 1%, check the reference point recognition accuracy and camera calibration results, adjust accordingly, and solve again. Continue until the accuracy requirements are met.

[0044] After successful verification, the scale factor s is calculated based on the difference between the known physical length of the scale line and the pixel length: ; in , These are the pixel v coordinates of the start and end points of the ruler line, respectively. s represents the actual physical length of the scale line. The physical meaning of s is the actual physical distance (unit: m / pixel) corresponding to a single pixel in the v-axis direction of the image.

[0045] This scale factor is specifically used for the rapid estimation of subsequent toe-off height; the two-dimensional coordinate mapping in the ground plane is still directly used. The inverse matrix is ​​used, independent of the scale factor. Furthermore, the pixel coordinates of the start and end points of the scale lines in the image are recorded. and As part of the basic test environment parameters, it is used for reference and verification during subsequent mapping of the ground physical coordinates of key points of the lower limbs.

[0046] Through the above processing, the following basic test environment parameters can be obtained: Camera intrinsic parameter matrix K (including distortion coefficients); The refined ground homography matrix H*; Scale factor s; ruler line start pixel coordinates and endpoint pixel coordinates .

[0047] The above parameters remain unchanged throughout the entire 6MWT video acquisition and subsequent processing.

[0048] This application requires only a single ordinary monocular camera and existing ground markings in the experimental environment to complete the environmental preparation for gait data acquisition. It eliminates the need for multi-camera arrays, infrared optical markers, and dedicated calibration sites required by 3D motion capture systems, as well as wearable devices such as inertial measurement units and foot pressure insoles. Compared to 3D motion capture systems, hardware costs are reduced by more than an order of magnitude. Compared to wearable sensor methods, subjects do not need to wear any devices; assessment can be completed simply by walking naturally, fundamentally avoiding interference from wearable devices on gait expression and the psychological resistance some elderly people have to wear devices. Due to the simplicity of the acquisition equipment and low environmental requirements, this method can be rapidly deployed in ordinary spaces such as community health service center activity rooms and corridors of elderly care facilities, providing a feasible technical path for large-scale gait screening and routine functional monitoring of the elderly population.

[0049] In this embodiment, acquiring continuous video data of the elderly person to be detected includes: The subject stands at the starting point of the scale line, facing the camera, maintaining a natural standing posture. The tester is positioned to the side of the starting point and, upon issuing the start command, simultaneously initiates video recording with the monocular camera and starts the 6MWT timer via computer recording software, ensuring strict synchronization between video recording and the walking test timing.

[0050] In the subsequent step 4, gait event detection and gait speed calculation both rely on the precise timestamps of video frames. If there is a discrepancy between the video recording and the 6MWT timing, it will lead to systematic errors in time-related parameters such as cadence and gait speed. Therefore, synchronous triggering should be performed as much as possible.

[0051] Upon hearing the command, participants walked along the marked line at a comfortable pace, covering as much distance as possible within 6 minutes. The tester timed the participants every 30 seconds, and indicated the final 30 seconds at 5 minutes and 30 seconds. When the timer reached 6 minutes, the tester gave a stop command, and the participants immediately stopped walking and maintained their current posture; the recording software simultaneously stopped capturing video.

[0052] If a subject experiences discomfort, needs rest, or is unable to continue walking within 6 minutes, the tester should immediately terminate the test, record the actual walking time, and mark the interruption event in the video metadata.

[0053] Video acquisition uses a monocular camera whose internal parameters have been calibrated in step 1, and the acquisition parameters are fixed as follows: Resolution: No less than 1080P (i.e., 1920×1080 pixels), preferably 1920×1080. This resolution ensures that key parts of the subject's body (especially the ankle and toe points) still have sufficient pixel resolution to meet the accuracy requirements of posture estimation during a 30m walk.

[0054] Frame rate: No less than 25fps, preferably 25fps or 30fps. The technical basis for this frame rate selection is that the gait cycle of the elderly is about 1.0s to 1.3s, and 25fps corresponds to about 25 to 33 frames per gait cycle, which is sufficient to capture rapid movement events such as rapid plantar flexion of the ankle joint at the end of the stance phase; at the same time, it avoids data redundancy and increased computational load caused by excessively high frame rates.

[0055] Video format: MP4, encoded with H.264 or H.265.

[0056] Shooting angle and position: The camera is positioned 1m directly in front of the starting point of the scale line, with the lens optical axis parallel to the direction of the scale line, and the camera height is 1.0m to 1.3m. This frontal shooting layout ensures that the subject always faces the camera during walking, and key points on both sides can be distinguished in the image, avoiding key point detection failures caused by the left and right legs obstructing each other when shooting from the side.

[0057] Throughout the acquisition process, the camera's focal length, aperture, resolution, and other parameters remain fixed, and no automatic focus or automatic exposure adjustment is performed to ensure that the intrinsic parameter matrix calibrated in step 1 is effective throughout the entire process.

[0058] During video capture, the computer-based recording software displays a real-time preview, and the tester monitors the following quality indicators: Subject image integrity: Ensure the subject remains within the camera's field of view throughout the entire walking process, especially near the 30m finish line; the subject should not step out of the frame. If space constraints cause the subject to extend beyond the field of view, the valid data cutoff point should be marked on the last frame before they extend beyond the frame.

[0059] Unobstructed: Ensure that the subject's body is not obstructed by any objects, other people or equipment, and that key points (shoulders, hips, knees, ankles, toes) are clearly visible.

[0060] Illumination stability: Avoid drastic changes in illumination conditions during the acquisition process (such as people walking and blocking the light source, switching lights on and off, etc.) to prevent sudden changes in image brightness from affecting the stability of subsequent target detection and pose estimation.

[0061] If the above-mentioned quality problems occur during the data collection process and cannot be corrected in real time, the time period in which the problem occurred should be recorded, and the data in that segment should be downgraded or removed in subsequent processing.

[0062] Finally, continuous video data of the elderly person being tested is obtained. This video data is stored in MP4 file format and associated with the following metadata information: Collect start and end timestamps; Total video duration (normally 360 seconds, or 6 minutes); Resolution, frame rate, encoding format; The reference identifier for the camera intrinsic parameter matrix (associated with the calibration results of step 1); Quality events during the acquisition process are marked (such as interruptions or obstructions).

[0063] In this embodiment, step 3 includes: Step 31: Perform video decoding and original frame sequence extraction on the continuous video data obtained in Step 2 to obtain the original frame sequence; In this embodiment, step 31 includes: The MP4 video output from step 2 is decoded using a video decoding library (such as FFmpeg) to restore the compressed video stream to a frame-by-frame original image sequence. During decoding, the original video resolution and color space (YUV420P or RGB24) are maintained, without downsampling or cropping, to preserve complete spatial information. After decoding, radial and tangential distortion correction is performed on each frame of the original image based on the camera intrinsic distortion coefficients calibrated in step 1 to eliminate coordinate deviations caused by lens distortion. The corrected images are then input into subsequent denoising and keypoint detection processes.

[0064] Let the total video duration be seconds, original frame rate If the frame rate is 1 / second, then the total number of original frames obtained after decoding is 1 / 2. Each original image frame is denoted as The pixel size of each frame image is .

[0065] Step 32: Perform frame-level denoising on the original frame sequence to obtain a denoised frame sequence; specifically, for each frame of the original image... Denoising is performed to suppress Gaussian noise, salt-and-pepper noise, and compression artifacts introduced during video acquisition, thereby improving the accuracy of subsequent target detection and pose estimation. The denoising algorithm can employ any of the following: Non-Local Means denoising, bilateral filtering, or deep learning denoising networks. The denoised frame sequence is obtained after denoising. Its size is consistent with the original frame.

[0066] Step 33: Extract the keyframe sequence based on the denoised frame sequence and the original frame rate; Specifically, the 6MWT video is 6 minutes (360 seconds) long. If the original frame rate is higher than the target processing frame rate, the changes in human posture between adjacent frames are minimal, resulting in significant temporal redundancy. Therefore, a uniform interval sampling method is used to extract keyframes, reducing the subsequent computational load while maintaining gait temporal resolution. The target processing frame rate is set to... If the original frame rate Then, a timestamp-aligned uniform sampling method is adopted: the time interval corresponding to the target frame rate is used. Based on this, sampling times are generated starting from second 0 with a fixed time step, and the original frame that is closest in time at each sampling time is selected as the keyframe; if the original frame rate... If so, all original frames are retained as keyframes.

[0067] Extract the keyframe sequence The timestamp corresponding to each keyframe is (Unit: seconds) The average frame rate of keyframes is equal to the target processing frame rate. At 25fps, the average time interval is approximately 0.04s, which is sufficient to capture rapid changes in the gait cycle.

[0068] Step 34: Perform human target detection and tracking based on the keyframe sequence to obtain the human bounding box, the expanded cropping box, the scaled human region image, and the coordinate mapping parameters for each frame of the elderly person to be detected. In this embodiment, step 34 includes the following steps: For each keyframe Human target detection and tracking are performed to locate the subject's position in the image and eliminate background interference.

[0069] Step 341: Use a deep learning-based object detection model (such as YOLO series or Faster R-CNN) to perform forward inference on the keyframes and output the bounding boxes of all human targets in the image. First, filter the bounding boxes with a detection confidence greater than 0.5. If multiple detection boxes meet the criteria, filter the subject targets according to the following priority: Primary priority: Select the candidate box with the largest bounding box area; Auxiliary verification: Define the image center region as a rectangular area with the geometric center of the image as the midpoint, a horizontal width accounting for 50% of the total image width, and a vertical height accounting for 60% of the total image height; if the area difference between the top two candidate boxes is less than 10% of the maximum area, then the candidate box whose center point is closer to the geometric center of the image is selected as the subject detection result.

[0070] The final determined subject bounding box is denoted as ,in( () represents the pixel coordinates of the top-left corner of the bounding box. These represent the width and height of the bounding box, respectively.

[0071] Step 342: To avoid key human body parts (such as wrists and toes) being truncated by bounding boxes during pose estimation, expand the detected bounding boxes outward by 10% (increase both width and height by 10%), and crop the human body region image from the original keyframes according to the expanded bounding boxes. The image is then scaled to a fixed size (preferably 256×192 pixels or 384×288 pixels) and used as input to the pose estimation model. The scaling factor is recorded during the cropping and scaling process. and offset This is used to map the key point coordinates back to the original image later.

[0072] Step 343: To prevent the detection box from jumping or switching identities between adjacent frames, calculate the intersection-over-union (IoU) of the bounding boxes of two adjacent frames. If the IoU is greater than 0.3, it is determined to be the same target, and tracking continues; if the IoU is less than or equal to 0.3, tracking loss processing is triggered, the position of the current frame is predicted by linear extrapolation using the bounding box position of the previous frame, and the frame is marked as the tracking recovery frame, and the confidence of subsequent pose estimation results is reduced accordingly.

[0073] Step 35: Perform 2D human pose estimation and key point extraction based on the scaled human region image and coordinate mapping parameters, thereby obtaining the original pixel coordinates of key points in each frame, the detection confidence of each key point, and the key point state label; In this embodiment, step 35 uses a deep learning-based 2D human pose estimation model (such as HRNet, ViTPose, or OpenPose) to perform image processing on the cropped human region. Keypoint detection is performed. The model outputs the coordinates of 14 keypoints in the cropped image and their corresponding confidence scores.

[0074] Step 35 includes: Step 351: Define key points. In this embodiment, the 14 key points output by the model are symmetrically distributed on both sides. Each point corresponds to a unified anatomical location, consistent with the general surface marker specifications for clinical gait analysis. Specifically, they include: Key points of the upper limb: right wrist joint (level of the radial styloid process), right elbow joint (lateral epicondyle of the humerus), right shoulder joint (apex of the acromion), left shoulder joint (apex of the acromion), left elbow joint (lateral epicondyle of the humerus), left wrist joint (level of the radial styloid process); Key points of the hip: right hip joint (apex of the greater trochanter of the femur), left hip joint (apex of the greater trochanter of the femur). Key points of the lower limbs: right knee joint (apex of the lateral femoral condyle), right ankle joint (tip of the lateral malleolus), right toe point (highest point on the dorsal side of the first metatarsophalangeal joint), left knee joint (apex of the lateral femoral condyle), left ankle joint (tip of the lateral malleolus), left toe point (highest point on the dorsal side of the first metatarsophalangeal joint).

[0075] The toe point corresponds to the position of the first metatarsophalangeal joint of the foot, which is used for subsequent calculations of ankle joint angle and height off the ground.

[0076] Step 352: The pose estimation model predicts the position of each keypoint using heatmap regression. For the i-th keypoint, the model outputs a heatmap. The location of the maximum response in the heatmap is taken as the coarse coordinate of the keypoint in the cropped image. To improve coordinate accuracy, sub-pixel level correction is performed near the maximum value location. This scheme adopts a thermal-based approach. Figure 2 The sub-pixel offset correction method using Taylor expansion is as follows: The maximum value of the heatmap and its horizontal left and right neighbors, and vertical up and down neighbors are taken, and the sub-pixel offset is obtained by fitting a quadratic function. The corrected cropped image coordinates are This correction method can improve the accuracy of key point positioning from the integer pixel level to the sub-pixel level, which has a significant effect on improving the accuracy of subsequent joint angle calculation and ground clearance calculation.

[0077] Specifically, let the coordinates of the maximum point of the heatmap be... The heatmap values ​​of its horizontal left and right neighborhoods and Then the horizontal sub-pixel offset is: ; Similarly, the sub-pixel offset in the vertical direction is: ; Step 353: Using the scaling factor and offset recorded in step 342, map the keypoint coordinates in the cropped image back to the pixel coordinate system of the original keyframe: ; ; in( , Let be the pixel coordinates of the i-th keypoint in the original image of frame t.

[0078] Step 354: Take the maximum value of the heatmap as the detection confidence of the key point. .like If the confidence level is less than 0.3, the keypoint is marked as low confidence in this frame; if the keypoint is located outside the image boundary or is occluded, resulting in no obvious peak in the heatmap, it is marked as missing. The low confidence and missing labels are passed to step 36 for temporal smoothing.

[0079] Step 36: Construct and spatiotemporally smooth the temporal trajectory of key points based on the original pixel coordinates of key points in each frame, the detection confidence of each key point, and the state marker of key points, thereby generating the 2D pixel coordinate temporal trajectory of key points. The 2D pixel coordinate temporal trajectory of key points is used as the temporal trajectory data of key points.

[0080] In this embodiment, step 36 is used to concatenate the coordinates of the same key point in all keyframes in chronological order to form a 2D pixel coordinate temporal trajectory of the key point. Since single-frame detection may involve jitter, false detections, or brief gaps, spatiotemporal joint smoothing processing is required for the temporal trajectory.

[0081] Step 36 includes: Step 361: For frames marked as missing keypoints, linear interpolation is used for completion. Let a keypoint i be in frame... and consecutive missing ( ,and , If the key point of the missing frame is normal, then linear interpolation is performed on the coordinates of the missing frame. If the number of missing frames exceeds 10 (corresponding to 0.4 seconds), then no interpolation is performed, the missing marker is retained, and the weight of this data segment is reduced in subsequent steps.

[0082] Step 362: This scheme uses confidence-weighted one-dimensional Gaussian filtering to smooth the time-series trajectory, which differs from the standard equal-weight Gaussian filtering. Standard Gaussian filtering assigns the same Gaussian weight to all frames within the window, while this scheme further multiplies the Gaussian weight by the detection confidence of each frame's key points. This reduces the contribution of low-confidence frames to the smoothing result and increases the contribution of high-confidence frames, thereby avoiding false detections that could skew the trajectory.

[0083] Specifically, the Gaussian kernel function is ,in Gaussian kernel standard deviation (preferred) ), where k is the frame offset. The smoothed coordinates are: ; ; Where K is the filter half-window length (preferably K=5 frames), C For the first The detection confidence of the i-th keypoint in the frame. This confidence-weighted mechanism can suppress jitter while preserving the accurate positional information of high-confidence frames.

[0084] Step 363: Perform physical rationality verification on each smoothed trajectory: the pixel displacement of key points between adjacent frames should not exceed 50 pixels (based on 1920×1080 resolution and 25fps processing frame rate, corresponding to the maximum reasonable range of movement of human lower limb key points within 0.04 seconds); if it exceeds this range, it is judged as a jump, and the coordinates of the previous frame are replaced; if the acquisition resolution or processing frame rate is adjusted, this threshold can be corrected synchronously according to the pixel ratio; the distance between left and right symmetrical key points (such as left and right hip joints) should be within a reasonable range (based on the prior knowledge of human body proportions, the hip width is about 0.7 times the shoulder width); if it exceeds the range, an alarm is triggered and a suspicious frame is marked.

[0085] After the above processing, the 2D pixel coordinate temporal trajectory of 14 key points is obtained. As the output of step 3, it is fed into step 4 for monocular scale recovery and gait parameter reconstruction.

[0086] In this embodiment, the input for step 4 is the temporal trajectory of the 2D pixel coordinates of the 14 key points output in step 3. The basic test environment parameters output in step 1 (camera intrinsic matrix, ground homography matrix, scale factor, and pixel coordinates of the two ends of the scale line) are processed, including ground homography matrix refinement, ground physical coordinate mapping of lower limb key points, gait event detection, gait spatiotemporal parameter calculation, joint angle temporal calculation, gait cycle alignment and normalization. The output is gait spatiotemporal parameters, joint angle temporal curves, and ground physical coordinate temporal trajectories of lower limb key points.

[0087] In this embodiment, step 4 includes: Step 41: Refine the ground homography matrix based on the basic test environment parameters to obtain the refined ground homography matrix; In this embodiment, step 41 includes: This step directly reuses the ground homography matrix that has already been calibrated and refined in step 1. And perform consistency verification based on the scale line recognition result of the first frame of the current test video: Identify the pixel coordinates of the start and end points of the scale line in the first frame of the current video, and then... The corresponding physical coordinates are obtained through inverse mapping. The relative error between the mapped scale line length and the actual length 30m is calculated, and the error must not exceed 1%. If the error exceeds the threshold, it indicates that the camera position has shifted, and the complete calibration process in step 1 must be repeated. After verification, the camera is directly... Used for subsequent ground physical coordinate mapping of key points in the lower limbs.

[0088] This solution moves the complete solution and refinement process of the homography matrix to the environmental calibration stage before the experiment. A single calibration can support testing for multiple groups of subjects. During the test, only fast consistency verification is performed to avoid repeated calculations, thereby improving batch processing efficiency while ensuring mapping accuracy.

[0089] Existing monocular vision scale recovery methods typically require additional calibration plates and rods, or rely on subject height for proportional estimation. The former increases experimental preparation steps and hardware costs, while the latter introduces individual errors. This solution directly uses the 30m scale line, which must be affixed in the 6MWT experimental procedure, as a known scale reference for solving the homography matrix. It establishes a mapping between pixel coordinates and physical coordinates using nine scale points on the scale line, achieving sub-pixel-level scale recovery without adding any additional equipment or operational steps, with a scale verification error of no more than 1%. This design integrates experimental environment setup and camera calibration, forming the technical foundation for the low-cost and easy-to-deploy characteristics of this solution.

[0090] This application utilizes the 30m scale line, which is mandatory in the 6MWT test procedure, as a known physical scale reference. Through direct linear transformation and nonlinear optimization at nine scale points, a homography mapping between image pixel coordinates and ground physical coordinates is established, with a scale verification relative error not exceeding 1%. Therefore, the 2D pixel coordinates of the ankle joint and toe points in step 42 can be accurately converted into ground physical coordinates with true dimensions, thereby calculating absolute physical parameters such as stride length, stride width, and stride speed. This solves the technical problem of traditional monocular vision methods, which rely solely on height assumptions to estimate scale due to a lack of depth information, resulting in large absolute parameter errors. Simultaneously, the scale line also serves as a calibration reference, eliminating the need for an additional calibration plate in the test environment and enabling reuse of the test environment and calibration tools.

[0091] Step 42: Based on the refined ground homography matrix and the temporal trajectory data of key points, perform ground physical coordinate mapping of lower limb key points to obtain the temporal trajectory of bipedal ground physical coordinates; In this embodiment, four lower limb distal key points are selected from the 14 key points output in step 3: right ankle joint, right toe point, left ankle joint, and left toe point. Using the inverse of the refined ground homography matrix H*, the 2D pixel coordinates of these four key points are mapped to ground physical coordinates.

[0092] For the ankle and toe points, during the stance phase, the foot is in contact with the ground, and its Z-coordinate is approximately 0. Accurate ground physical coordinates can be obtained directly using inverse ground homography mapping. However, during the swing phase, the foot leaves the ground (Z>0), and direct use of ground homography mapping introduces projection errors. This solution employs a ground clearance correction method to correct the coordinates during the swing phase: Based on the difference between the v-coordinate of the toe pixel and the v-coordinate of the ground reference line, the foot's height h above the ground is estimated using a scale factor. The specific calculation formula is as follows: ; in, The ground reference pixel coordinates are the average of the bilateral toe point v coordinates in the static standing frame of the subject before formal data acquisition. When standing still, the feet are completely in contact with the ground, and this value can be directly used as the pixel reference for ground height without relying on gait event segmentation results. Let v be the v coordinate of the toe point in the current frame, and s be the scale factor obtained in step 1. >0 indicates that the toes are above the ground reference point. ≈0 indicates that the foot is in contact with the ground.

[0093] Then, based on the principle of similar triangles in pinhole imaging, the coordinates of the travel direction (Y direction) are corrected: ; in The Y-coordinate is obtained from the homography inverse mapping, H is the camera mounting height (preferably 1.2m) explicitly set in step 1, and h is the height of the toe point above the ground in the current frame. This correction is only applied during the swing phase; during the support phase, h≈0, and no correction is needed. After mapping, the right ankle joint is obtained. Right toe point left ankle joint left toe point The ground physical coordinate temporal trajectory serves as the basis for subsequent gait event detection and spatiotemporal parameter calculation.

[0094] In this embodiment, the ground physical coordinate mapping of key points of the lower limbs is performed in the following way: Lower limb keypoint selection and initial coordinate mapping: From the 14 keypoints output in step 3, 8 core lower limb keypoints were selected: right hip joint, right knee joint, right ankle joint, right toe point, left hip joint, left knee joint, left ankle joint, and left toe point. The refined ground homography matrix was then used. The inverse matrix maps the 2D pixel coordinates of all key points to the ground plane. The initial two-dimensional physical coordinates within the region, including the initial coronal plane coordinates. Coordinates of the initial direction of travel , where the subscript j corresponds to different key points.

[0095] The premise of the ground homography matrix is ​​that the target point lies on the ground plane. This assumption is approximately true during the support phase of the ankle and toe points; however, the hip and knee joints are off the ground throughout the entire process, and the ankle and toe points also have a height off the ground during the swing phase. Directly using ground homography inverse mapping will cause a deviation in the direction of travel coordinates due to perspective projection, and the deviation increases with the height off the ground. Therefore, it is necessary to correct for the height off the ground to obtain the true physical coordinates.

[0096] The ground clearance height of each key point is calculated uniformly based on the pixel v coordinate and scale factor s. The ground clearance height of all 8 lower limb key points is calculated uniformly using the following formula: ; in, Let j be the height of the j-th keypoint above the ground in frame t; The ground reference pixel coordinates are the average of the v coordinates of the bilateral toes in the static standing frames of the subject before formal data acquisition. Let v be the pixel coordinate of the j-th keypoint in frame t; s is the scale factor obtained in step 1.

[0097] when The time indicates that the key point is in contact with the ground. The time indicates that the key point is above the ground.

[0098] The ground clearance correction for the direction of travel coordinates is based on the principle of similar triangles in pinhole imaging, and is applied to the initial mapping. To correct and eliminate perspective projection errors caused by height above the ground, the correction formula is as follows: ; in, The corrected travel direction of the j-th key point is represented by its actual physical coordinates. H represents the initial travel direction coordinates obtained from ground homography inverse mapping; H is the camera mounting height set in step 1 (preferably 1.2m). This represents the current frame's ground clearance for the corresponding key point.

[0099] The X-axis coordinate of the coronal plane is simultaneously corrected for ground elevation using the same proportion to eliminate coronal scale deviation caused by perspective projection. The correction formula is as follows: ; in, The first obtained by ground homography inverse mapping Initial coronal plane coordinates of key points; correction execution rules are completely consistent with the Y direction: ankle and toe points are corrected only during the swing phase, while hip and knee joints are corrected throughout the entire range.

[0100] Revise the execution rules: Ankle and toe point: The above corrections are only performed during the swing phase; during the stance phase, the foot remains in contact with the ground. The correction amount is negligible, and the initial mapped coordinates can be used directly. The division between the swing phase and the support phase can be achieved by reverse matching of the gait event detection results in step 43, or by pre-dividing based on the ground height threshold (e.g., <2cm is considered the support phase).

[0101] Hip and knee joints: Ground clearance correction is performed throughout the entire process and is not omitted due to gait phase switching. Since the ground clearance of the hip and knee joints is always relatively large (the ground clearance of the hip joint in normal elderly people is about 0.8~1.0m), the coordinate deviation of direct mapping cannot be ignored. The correction throughout the entire process can ensure the accuracy of the sagittal plane joint angle calculation.

[0102] After the above mapping and correction, the temporal three-dimensional physical coordinates of all 8 lower limb key points are obtained: Coronal (X-direction) and direction of travel (Y-direction) coordinates: Initial coordinates were obtained by inverse mapping of the refined homography matrix, and then the true physical coordinates were obtained by uniformly correcting for ground-elevation perspective; Vertical (Z-direction) coordinates: Based on ground-elevation... Provided directly.

[0103] The final output is the three-dimensional physical coordinate temporal trajectory of the right hip joint, right knee joint, right ankle joint, right toe point, left hip joint, left knee joint, left ankle joint, and left toe point. The ground coordinates of both feet (ankle and toe) are used for gait event detection in step 43 and spatiotemporal parameter calculation in step 44, and the coordinates of all lower limb key points are used for joint angle temporal calculation in step 45.

[0104] The ground homography matrix assumes that the target point is located on the ground plane (Z=0). This assumption holds during the stance phase, but during the swing phase, the foot leaves the ground, and directly using inverse homography mapping will lead to projection errors in the gait direction coordinates. Existing gait analysis methods based on homography matrices typically ignore this error or only extract parameters during the stance phase. This scheme estimates the foot's height off the ground and uses the principle of similar triangles to correct the Y-coordinate during the swing phase, ensuring that the physical coordinates of the ankle joint and toe point remain highly accurate throughout the entire gait cycle (including the swing phase). This provides an accurate coordinate basis for detecting anomalies such as foot drop and dragging that depend on swing phase parameters.

[0105] Step 43: Gait event monitoring is performed based on the temporal trajectory of the physical coordinates of both feet on the ground and the key frame timestamps, thereby obtaining the foot tracking event sequence, the cycle duration of each gait cycle, the duration of the support phase, and the duration of the swing phase; In this embodiment, two core gait events are detected based on the temporal trajectories of the ankle joint and toe points using ground physical coordinates: heel strike (HS) and toe lift (TO). The temporal data of the Y-coordinate (direction of travel) of the left and right ankle joints are subjected to first-order difference to obtain the velocity in the direction of travel. .

[0106] When the heel touches the ground, the foot on that side enters the support phase from the swing phase, and the velocity of the ankle joint changes from negative to positive. Therefore, the HS event detection criterion is the zero-crossing point where the velocity changes from negative to positive. At the same time, the verification condition is added: the ankle joint Y coordinate is a local minimum value within 5 adjacent frames at this moment, indicating that the foot has extended to the farthest position.

[0107] When the toes leave the ground, the toe point changes from a static support phase to a forward swing phase, and the velocity in the direction of travel changes from positive to negative. Therefore, the TO event detection criterion is the zero-crossing point where the velocity of the toe point changes from positive to negative. At the same time, the verification condition is added: at this moment, the v coordinate of the toe point pixel begins to be less than the reference value of the static standing ground, indicating that the foot has left the ground.

[0108] The detected HS and TO events are sorted by time to obtain the HS event sequence and TO event sequence for the left and right sides. The interval between two adjacent HS events on the same side is one gait cycle, and the cycle duration is the time difference between the two HS events. The period from HS to TO is the support phase, and the period from TO to the next HS is the oscillation phase. The duration of the support phase and the duration of the oscillation phase are calculated respectively.

[0109] The detected events are validated for reasonableness. The normal gait cycle of elderly people is about 1.0s to 1.3s. If the detected cycle exceeds the range of [0.6s, 2.0s], it is marked as a suspicious event and corrected or removed in combination with adjacent events.

[0110] Step 44: Calculate gait spatiotemporal parameters based on the temporal trajectory of the physical coordinates of the two feet on the ground and the sequence of foot tracking events, thereby obtaining stride length information, stride width information, stride speed information, stride frequency information, average support phase ratio and the ratio sequence per cycle; In this embodiment, based on the HS / TO event sequence and the ground physical coordinate trajectory of lower limb key points, five core gait spatiotemporal parameters are calculated: Stride length: The displacement in the direction of travel between two adjacent heel strikes on the same side, averaged over the entire distance. The heel strike point coordinates are calculated based on the ground physical coordinates of the ankle joint on the same side: starting from the ankle joint, extend horizontally 0.15m in the opposite direction (heel side) from the ankle joint to the toe, obtaining the ground physical coordinates of the heel point, which serve as the calculation reference for the heel strike point. Stride width: The distance between the left and right heel strike points in the coronal plane (X direction), averaged over the entire distance. The heel strike point coordinate conversion method is the same as above.

[0111] Step speed: Divide the total distance covered in the 6MWT by the total time (360 seconds), or calculate the instantaneous step speed for each gait cycle; Cadence: Total number of steps in the 6MWT divided by total duration (steps / minute); Support phase percentage: The percentage of support phase duration in each gait cycle. The average support phase percentage is obtained by averaging over the entire cycle, while retaining the percentage sequence for each cycle.

[0112] This step outputs step length information, step width information, step speed information, step frequency information, average support ratio, and the ratio sequence for each cycle.

[0113] Step 45: Perform joint angle timing calculations based on the timing trajectory data of the key points to obtain the joint angle timing curve; In this embodiment, based on the 2D pixel coordinate temporal trajectories of the 14 key points output in step 3, the angular temporal curves of the four joints / parts are calculated after classification and processing according to the coronal and sagittal planes: Direct calculation of coronal angle The pelvic tilt angle is determined by the angle between the line connecting the left and right hip joints and the horizontal line of the image. 0° indicates a neutral pelvic position, a positive value indicates that the left pelvis is higher than the right, and a negative value indicates that the right pelvis is higher than the left. This angle is located in the coronal plane and parallel to the image plane, and can be calculated directly from pixel coordinates without perspective correction.

[0114] Sagittal angle calculated after fluoroscopic correction The knee, hip, and ankle angles are all motion angles in the sagittal plane. When photographed directly ahead, there is a perspective shortening effect. Therefore, it is necessary to first reconstruct the physical coordinates based on the pinhole imaging model and the calibrated parameters before calculating the true angles. (1) Based on the refined ground homography matrix The pixel coordinates of the hip, knee, ankle, and toe points are inversely mapped to obtain the Y-coordinate (physical coordinate of the direction of travel) in the ground plane, denoted as . This represents the physical position of each key point along the direction of travel; the physical coordinates of the shoulder joint key points in the direction of travel are reconstructed using the same method as the hip joint key points: first, through the refined ground homography matrix... The initial coordinates of the ground projection are obtained by inverse mapping, and then similar triangle correction is performed by combining the shoulder joint height above the ground to obtain the physical coordinates of the actual direction of travel. .

[0115] (2) Combining the scale factor s with the ground reference pixel coordinates The pixel v-coordinates of each key point are converted into vertical physical height relative to the ground. The calculation formula is as follows: , in sequence , ; (3) Construct the thigh vector, calf vector, foot vector, and torso vector in the sagittal plane (YZ plane) to represent the real physical space, and then calculate the directed angles between them: All joint angles are calculated based on vector dot products. The general formula for calculating included angles is: ; in, These are the vectors of the two limb segments corresponding to the joint. The angle between the two vectors is expressed in degrees. By combining the vector direction conventions and the definition of neutral position for each joint, the corresponding joint angle can be obtained.

[0116] Knee joint angle: determined by the thigh vector (hip joint) (knee joint) and lower leg vector (knee joint) The directional angle of the ankle joint is determined: 180° represents a fully extended neutral position, less than 180° represents flexion, and greater than 180° represents hyperextension. Hip joint angle: determined by the angle between the trunk vector (shoulder joint → hip joint) and the thigh vector (hip joint → knee joint). The measured angle in a static standing position is used as a neutral reference value. A positive value indicates hip flexion and a negative value indicates hip extension. Ankle angle: determined by the angle between the lower leg vector (knee joint → ankle joint) and the foot vector (ankle joint → toe point). 90° is the neutral position, greater than 90° is dorsiflexion, and less than 90° is plantarflexion.

[0117] Pelvic tilt angle: determined by the angle between the line connecting the left and right hip joints and the horizontal line of the image, calculated using the following formula: ; in , These are the pixel coordinates of key points on the left hip joint. , These are the pixel coordinates of key points on the right hip joint. A pelvic tilt angle of 0° indicates a neutral pelvic position; a positive value indicates the left pelvis is higher than the right, and a negative value indicates the right pelvis is higher than the left.

[0118] A moving average filter (preferably 5 frames per second, corresponding to 0.2 seconds) is applied to the above-mentioned angular timing curves to suppress angular noise caused by keypoint detection jitter. This step outputs the timing curves of the left and right knee joint angles, the left and right hip joint angles, the left and right ankle joint angles, and the pelvic tilt angle.

[0119] Step 46: Perform gait cycle alignment and normalization based on the foot tracking event sequence and joint angle time-series curve to obtain the aligned gait spatiotemporal parameters and joint angle time-series curve.

[0120] The durations of different gait cycles vary. To facilitate cycle comparison and anomaly detection, the joint angle curves and kinematic parameters of each gait cycle are normalized by period percentage. For the k-th gait cycle (from HS to the next HS), its time axis is resampled into 101 equally spaced points (0% to 100%, 1% of stride length), where 0% corresponds to heel strike, approximately 60% corresponds to toe lift, and 100% corresponds to the next heel strike. Resampling is achieved using linear interpolation.

[0121] The normalized angle curves of all gait cycles throughout the 6MWT were averaged point-by-point to obtain the average gait cycle curve, and the standard deviation of each percentage point was calculated for subsequent anomaly detection to assess the degree of deviation in a single cycle. Simultaneously, the mean, standard deviation, and coefficient of variation of spatiotemporal parameters such as stride length, stride width, stride speed, and support phase ratio were calculated for the entire process, forming a statistical summary.

[0122] In this embodiment, step 5 includes: Step 51: Perform anomaly detection preprocessing and gait phase localization based on the foot tracking event sequence, gait spatiotemporal parameters, and joint angle time-series curves to obtain fine temporal information for each gait cycle; Specifically, the gait phase segmentation is based on the left and right HS / TO event sequences output in step 43. Instead of being segmented according to a fixed time window, it uses two adjacent HS events on the same side as the boundary of a gait cycle and segments each gait cycle independently.

[0123] Step 511: Three-stage division of the single-leg support phase For each support phase of each leg (from HS to TO on that side), it is divided into three phases according to a fixed proportion of the duration of that support phase: Early support phase: 0%–30% of the support phase duration from HS time to after HS time, corresponding to the time from heel strike to foot flattening; Mid-support phase: 30%–70% of the support phase duration, corresponding to the body's center of gravity crossing the supporting foot; Late phase of the support phase: 70%–100% of the duration of the support phase, corresponding to the time from when the heel is lifted to when the toes leave the ground.

[0124] Step 512: Two-phase division of the single-leg swing phase For each swing phase of each leg (from TO on that side to the next HS on that side), it is divided into early swing phase and late swing phase according to 50% / 50% of the swing phase's own duration.

[0125] Step 513: Identification of single-sided / double-sided support phase Bilateral support phase: The time period during which both legs are in the support phase; Right-side unilateral support phase: The time period during which only the right leg is in the support phase and the left leg is in the swing phase, starting with the left leg TO event and ending with the left leg HS event; Left-side unilateral support phase: The time period during which only the left leg is in the support phase and the right leg is in the swing phase, starting with the right leg TO event and ending with the right leg HS event.

[0126] The precise boundary of a unilateral support phase is determined by the TO (start) and HS (end) events of the contralateral leg. Step 514: The intersection of the unilateral support phase and the mid-term of the support phase.

[0127] In subsequent anomaly detection, whenever the mid-term condition of a single-sided support phase needs to be used, the time intersection of the mid-term of the single-leg support phase (proportional division) and the single-sided support phase (event division) is taken, that is: ; This intersection interval satisfies both the proportional phase positioning during the middle of the support phase and the event condition of only one leg bearing weight, making it a precise temporal window for pelvic sinking detection and trunk compensation direction verification.

[0128] Current gait phase segmentation typically employs a single approach: either dividing the phase into early, middle, and late stages based on the proportion of the stance phase duration, or dividing it into unilateral and bilateral stance based on bipedal events, with each approach used independently. This scheme utilizes the temporal intersection of these two classifications because the beginning and end phases of the middle stance phase (30%–70% of the phase) may still include bilateral stance (the contralateral foot may not yet be off the ground or may already be on the ground). At this time, the pelvis is supported by both legs, and the unilateral stability function of the gluteus medius is not yet fully realized. Only within the overlapping area between the unilateral stance phase (event-driven) and the middle stance phase (proportional division) is the typical stage where single-leg weight-bearing occurs and the body's center of gravity passes over the supporting foot. This intersection window design forms the temporal basis for subsequent pelvic sinking and trunk compensation detection, enabling the differentiation between pathological abnormalities and physiological movements.

[0129] This sub-step outputs detailed temporal information for each gait cycle, including: early / middle / late support phase time intervals, early / late swing phase time intervals, frame-by-frame support type markings (left single-sided / right single-sided / double-sided), and the intersection time interval between single-sided support phases and the middle of support phases.

[0130] Step 52: Generate information on abnormal pelvic tilt or subsidence events based on the fine phase markers of each gait cycle and the joint angle time-series curves; In this embodiment, step 52 includes: Step 521: Calculation of pelvic subsidence during mid-phase of unilateral support phase. Extract the pelvic tilt angle time series curve from the joint angle time series curve. The pelvic tilt angle is the angle between the line connecting the left and right hip joints and the horizontal line; 0° indicates a neutral pelvic position. This scheme uses a time-phase-conditional method to calculate pelvic subsidence: within the mid-intersection interval of the right-side unilateral support phase. Internally, the absolute value of the peak value of the pelvic tilt angle is extracted as the amount of right pelvic subsidence: ; Similarly, the left pelvic subsidence is calculated within the intersection interval of the left unilateral support phase. This calculation is limited to the mid-phase of the unilateral support phase, directly corresponding to the functional stage of maintaining pelvic stability when the gluteus medius on the same side of the supporting leg is bearing weight on one leg, and is more biomechanically specific than the full-cycle angle range.

[0131] Current pelvic tilt analysis typically calculates the range or standard deviation of the pelvic tilt angle throughout the gait cycle. This indicator includes normal physiological pelvic rotation and pelvic movement during bilateral stance phases, and has a weak correlation with gluteus medius function. This proposed method strictly limits the extraction of pelvic sinking within the intersection range of the mid-stance phase of a unilateral stance phase, directly measuring the contralateral pelvic sinking amplitude during single-leg weight-bearing. This indicator directly corresponds to the eccentric control ability of the gluteus medius during single-leg stance. Furthermore, the left-right asymmetry index eliminates the influence of individual overall flexibility differences through bilateral self-comparison, enabling the detection of early abnormalities where one side of the gluteus medius function is weaker than the other, while absolute angles may be missed due to individual differences.

[0132] Anomaly detection based on two criteria: An abnormal pelvic tilt or subsidence is determined by meeting any of the following conditions: Criterion A (Excessive Absolute Subsidence): The subsidence of the pelvis on either side exceeds a first preset angle threshold (preferably 3° to 5°). This threshold is set based on a reference range where the pelvic tilt in the mid-stance of unilateral support phase in clinically normal elderly individuals does not exceed 3°.

[0133] Criterion B (Excessive Left-Right Asymmetry): This protocol proposes a pelvic sinking asymmetry index to eliminate the influence of individual differences in overall flexibility through left-right self-comparison. The average right-side pelvic sinking amount is calculated throughout the 6MWT process. and the average amount of left pelvic subsidence The asymmetry index is calculated according to the following rules: like This indicates that there was no subsidence on either side, and the result is considered to be completely symmetrical. ; like Then calculate using the following formula: ; when When the difference is greater than 0.3 (i.e., the difference between the left and right sides exceeds 30% of the mean), it is judged as abnormal pelvic tilt or sinking. The abnormal side is the side with the larger average sinking amount.

[0134] For each gait cycle determined to be abnormal, record the time of occurrence, duration, side of abnormality, peak sinking angle, trigger criterion number (A or B), and corresponding gait cycle number to form a list of abnormal pelvic tilt or sinking events.

[0135] Step 53: Detect trunk compensatory swaying based on the temporal trajectory data of the key points, thereby obtaining information on abnormal trunk compensatory swaying events; In this embodiment, step 53 includes: Calculate the midpoints of both shoulder joints as trunk reference points, and the midpoints of both hip joints as pelvic reference points: ; in , The u-coordinates of the right and left shoulder joints are given. , Let u be the coordinates of the right and left hip joints. Similarly, calculate the v coordinates.

[0136] This application employs a dimensionless method for detecting the trunk-pelvis relative lateral tilt angle. Using the midpoint of the hip as a reference, the lateral tilt angle of the trunk in the coronal plane relative to the vertical direction is calculated: ; The numerator represents the lateral offset (in pixels) of the shoulder midpoint relative to the hip midpoint, and the denominator represents the vertical distance (in pixels) from the shoulder midpoint to the hip midpoint. Since both the numerator and denominator are in pixels, the ratio eliminates the influence of scale factors such as height, shooting distance, and resolution. The true trunk tilt angle (degrees) can be compared across individuals without the need for an adaptive threshold. >0 indicates that the torso is leaning to the right. <0 indicates a tilt to the left.

[0137] This scheme employs a dual constraint of phase locking and directional consistency to separate pathological compensatory swaying from normal physiological trunk rotation. For each gait cycle: The peak trunk tilt angle was extracted within the mid-intersection interval of the right-side unilateral support phase. If | |>The second preset angle threshold (preferably 8° to 10°) and If the value is >0 (the torso leans to the right, on the same side as the right leg supporting the weight), it is considered abnormal; The peak torso tilt angle was extracted within the mid-intersection of the left-side unilateral support phase. If | |>Second preset angle threshold and If the value is less than 0 (the torso leans to the left, on the same side as the left leg supporting the weight), it is considered abnormal.

[0138] If the amplitude exceeds the standard but the direction is opposite (tilting towards the swing leg) or the peak occurs during the bilateral support phase, it is considered a normal physiological trunk movement and is not judged as abnormal.

[0139] Existing trunk sway analysis typically measures the absolute offset of key trunk points relative to the image midline. This value is affected by scale factors such as height, shooting distance, and camera resolution, requiring adaptive thresholds for different individuals and failing to distinguish between normal physiological rotation and pathological compensation. This proposed solution calculates the trunk tilt angle by dividing the lateral offset between the mid-shoulder and mid-hip points by the arctangent of the trunk's vertical length. Since both the numerator and denominator are in pixels, the ratio naturally eliminates the influence of all scale factors, making the fixed angle threshold universally applicable across individuals. Simultaneously, the temporal-direction joint criterion requires that abnormal peaks must occur in the mid-stance phase of one side and that the tilt direction be on the same side as the supporting leg. This combination directly corresponds to the biomechanical characteristics of the Trendelenburg compensatory gait, effectively separating pathological compensation from trunk rotation during normal walking.

[0140] Record the time of occurrence, duration, peak trunk tilt angle, tilt direction, supporting leg side, and corresponding gait cycle number to form a list of abnormal trunk compensatory swing events.

[0141] The trunk tilt angle in this application is calculated by dividing the lateral offset between the midpoint of the shoulder and the midpoint of the hip by the arctangent of the vertical length of the trunk. Since both the numerator and denominator are in pixels, this ratio naturally eliminates the influence of scale factors such as height, shooting distance, and camera resolution, making the angle a dimensionless physical quantity that can be compared across individuals. Therefore, the detection threshold for trunk compensatory sway can be fixed at 8° to 10°, eliminating the need for adaptive adjustments for subjects of different heights and shooting distances, thus avoiding the individual adaptation error introduced by adaptive threshold methods. Simultaneously, the dual constraints of phase locking and directional consistency (abnormalities are only detected in the mid-phase of a unilateral support phase, and when the tilt direction is on the same side as the supporting leg) effectively separate pathological Trendelenburg compensatory sway from normal physiological trunk rotation, reducing the false positive rate.

[0142] Step 54: Detect knee hyperextension or hypoflexion based on the temporal trajectory data of the key points, thereby obtaining information on abnormal events of knee hyperextension or hypoflexion. In this embodiment, step 54 includes: Step 541: Extraction of knee joint angle features during the support phase For each gait cycle and each leg, the mean and maximum knee angles during the mid-stance phase are extracted, and the minimum knee angle and its occurrence time are extracted throughout the entire cycle.

[0143] Step 542: Knee hyperextension test This scheme strictly limits the hyperextension criterion to the mid-stance phase to eliminate misjudgment when the knee joint is nearly extended during the normal heel strike phase. The judgment condition is: the maximum knee joint angle during the mid-stance phase is greater than a third preset angle threshold (preferably 185°, i.e., 5° hyperextension), and the duration of the knee joint angle being greater than this threshold accounts for a proportion greater than a preset proportion threshold (preferably 20%) of the mid-stance phase duration. The duration condition is used to exclude interference from angle spikes in a single frame.

[0144] Step 543: Knee flexion insufficiency detection This scheme uses two criteria: absolute angle value and time phase delay. Satisfaction of either criterion determines insufficient buckling. Criterion 1 (Insufficient mid-phase flexion angle): The average knee angle during the mid-phase of the stance phase is greater than the fourth preset angle threshold (preferably 170°, i.e., flexion less than 10°). Criterion 2 (Delayed Peak Flexion Phase): The occurrence time of the minimum knee angle (i.e., the maximum flexion angle) in the entire cycle is later than the end of the middle of the stance phase, indicating that the knee joint failed to flex normally during the stance phase, and the flexion action was delayed to the end or swing phase.

[0145] Record the abnormal subtype (hyperextension / insufficiency), occurrence time, duration, extreme knee angle, side, and corresponding gait cycle number to form a list of abnormal events of knee hyperextension or insufficiency.

[0146] When the peak buckling phase delay criterion is met, the buckling delay time of that gait cycle is calculated simultaneously using the following formula: ; in, The flexion delay time of the ipsilateral leg during this gait cycle; This represents the moment when the minimum knee joint angle occurs throughout the entire cycle. This is the end point of the mid-phase of the ipsilateral leg support. This indicates that the buckling peak is delayed until the middle of the support phase. The larger the value, the more significant the buckling delay. This parameter is also used in the quantitative calculation of the severity of the anomaly in step 6.

[0147] Current methods for detecting knee joint abnormalities typically involve statistically analyzing extreme angle values ​​throughout the entire stance phase or gait cycle. This can easily misjudge the normal state of near-extension of the knee joint during heel strike as hyperextension. This proposed solution strictly limits the knee hyperextension criterion to the mid-stance phase and adds a duration percentage condition to eliminate interference from instantaneous extension during strike and single-frame angle spikes. For underflexion, this solution not only detects insufficient absolute value of flexion angle in the mid-stance phase but also introduces a criterion for delayed peak flexion phase. That is, the maximum flexion angle in the entire cycle occurs after the mid-stance phase. This characteristic corresponds to quadriceps-dominated rigid gait (the knee joint fails to flex normally in the stance phase, and the flexion action is delayed until the swing phase), an abnormal pattern that cannot be detected by simple angle thresholding.

[0148] Step 55: Detect foot drop or dragging based on the temporal trajectory data of the key points, thereby obtaining abnormal event information of foot drop or dragging. In this embodiment, step 55 includes: Step 551: Calculation of toe height off the ground The height of the toe point off the ground is converted into physical height by the difference between the v-coordinate of the toe point and the v-coordinate of the ground reference line, using a scale factor. ; in, The ground reference pixel coordinates are the average of the bilateral toe point v coordinates in the static standing frame of the subject before formal data acquisition. When standing still, the feet are completely in contact with the ground, and this value can be directly used as the pixel reference for ground height without relying on gait event segmentation results. Let v be the v coordinate of the toe point in the current frame, and s be the scale factor obtained in step 1.

[0149] Step 552: Foot Drop Detection. This scheme uses the proportion of plantar flexion time during the swing phase as the criterion, rather than the instantaneous minimum angle, to reflect insufficient sustained activation of the tibialis anterior muscle. Within the swing phase interval, the proportion of frames with an ankle joint angle less than 90° (plantar flexion) out of the total number of swing phase frames is calculated. .when When the second preset percentage threshold (preferably 30%) and the minimum ankle joint angle during the swing phase is less than the fifth preset angle threshold (preferably 85°, i.e., 5° plantar flexion) are met, the condition is determined to be foot drop. Both conditions must be met simultaneously to avoid misjudging the normal brief plantar flexion at the beginning of the swing phase as foot drop.

[0150] Step 553: This scheme uses two indicators: low altitude time percentage and ground clearance integral. Meeting either indicator determines the process to be delayed. Indicator 1 (Low Height Time Percentage): The proportion of frames in the swing phase where the height of the toes above the ground is less than a preset height threshold (preferably 1cm) is greater than the third preset proportion threshold (preferably 40%). Index 2 (Ground Height Integration): The integral value of the toe height above the ground with respect to time during the swing phase. The calculation formula is as follows: ; in The height of the toe point above the ground in the current frame (unit: cm). The integral result represents the time interval between adjacent keyframes (in seconds). The unit is cm·s, and its physical meaning is the cumulative time-height of foot lift during the swing phase, reflecting the degree of sufficiency of the overall foot lift. When the integral value is less than the preset integral threshold (preferably 3.0 cm·s), it indicates that the average foot height off the ground during the entire swing phase is insufficient, and is judged as an abnormal dragging step.

[0151] Record the abnormal subtype (foot drop / drag), occurrence time, duration, plantar flexion time percentage, low height time percentage, ground clearance integral value, side, and corresponding gait cycle number to form a list of abnormal events of foot drop or dragging.

[0152] Current foot drop detection methods typically use the minimum ankle angle during the swing phase as an instantaneous indicator. However, the initial swing phase involves normal, brief plantar flexion, making the instantaneous minimum value prone to false positives. This proposed method uses the percentage of time the ankle is in plantar flexion during the swing phase as the primary criterion, reflecting insufficient sustained activation of the tibialis anterior muscle rather than brief angle fluctuations. The minimum angle condition is also added to exclude misjudgments caused by mild plantar flexion. For dragging, this method uses two indicators simultaneously: the percentage of time spent at low ground clearance and the integral of ground clearance over time. The former reflects the duration of dragging, while the latter reflects the sufficiency of foot lift throughout the swing phase. Both indicators quantify the severity of dragging from different dimensions, providing a more comprehensive assessment than a single maximum ground clearance, and the integral indicator naturally normalizes differences in swing phase duration.

[0153] Step 56: Detect insufficient pushing force based on the temporal trajectory data of the key points, thereby obtaining information on abnormal events caused by insufficient pushing force; Step 56 includes: Step 561: For each gait cycle, take the period from 0.1 seconds before toe lift-off (TO) to the time of TO as the push-off force analysis window, which corresponds to the propulsion phase at the end of the support phase, when the heel lifts and the forefoot pushes off the ground.

[0154] Step 562: Calculate two parameters within the push-pull window: Before calculation, the ankle joint angle time-series curve and the toe point travel direction Y-coordinate time-series curve are smoothed by applying a 5-frame moving average filter to suppress high-frequency noise caused by key point detection jitter. Then, the difference operation is performed to calculate the peak value of the ankle plantar flexion angular velocity. The first-order difference of the smoothed ankle joint angle is used to obtain the angular velocity time series, and the peak value (maximum absolute value) of the plantar flexion direction angular velocity within the window is taken. Peak acceleration in the direction of travel : Perform a second-order difference on the Y-coordinate of the toe point's direction of travel output in step 42 after ground clearance correction to obtain the forward acceleration timing, and take the peak acceleration within the window.

[0155] Step 563: This application uses a dual-parameter criterion of angular velocity and acceleration to exclude false negatives caused by trunk forward tilt compensation. When (Preferred 200° / s) and When the speed is (preferably 0.5 m / s²), it means that the ankle joint is weak in active plantar flexion propulsion and the body is not accelerating forward. If both parameters are not up to standard, it is judged as insufficient pushing force, which corresponds to triceps surae muscle dysfunction.

[0156] Current methods for assessing push-off force typically measure only ankle plantar flexion angle or angular velocity. However, some elderly individuals can compensate by leaning forward, generating forward acceleration even with insufficient ankle plantar flexion, leading to false negatives in single-parameter testing. This proposed method simultaneously calculates the peak ankle plantar flexion angular velocity and peak forward acceleration at the end of the stance phase. Insufficient push-off force is only determined when both are below a certain threshold. Ankle angular velocity reflects the active contraction capacity of the gastrocnemius muscle, while forward acceleration reflects the actual propulsive effect achieved by the body. The combined use of these two parameters eliminates interference from compensatory mechanisms such as leaning forward, making the detection of gastrocnemius muscle dysfunction more accurate.

[0157] Record the occurrence time, duration, peak plantar flexion angular velocity, peak forward acceleration, side, and corresponding gait cycle number to form a list of abnormal events with insufficient push-off force.

[0158] In addition to insufficient push-off force, this step simultaneously detects abnormalities in anterior pelvic tilt and posterior trunk tilt: The left and right hip joint angle time-series curves are extracted from the joint angle time-series curves. Using the hip joint angle in the static standing frame as a neutral reference value, the flexion offset of the hip joint angle relative to the neutral reference value is calculated within the mid-stance interval of each gait cycle. When the offset exceeds a sixth preset angle threshold (preferably 10° to 15°) and the duration accounts for a proportion greater than a fourth preset proportion threshold (preferably 30%) of the mid-stance duration, an anterior pelvic tilt abnormality is determined. Simultaneously, the trunk sagittal tilt angle is calculated based on the line connecting the trunk reference point and the pelvic reference point. When the trunk sagittal tilt angle tilts backward more than a seventh preset angle threshold (preferably 5°), a posterior trunk tilt abnormality is determined. Information on abnormal events of anterior pelvic tilt or posterior trunk tilt is generated, including the abnormal subtype, occurrence time, duration, hip joint flexion offset, trunk tilt angle, side, and corresponding gait cycle number.

[0159] In this embodiment, the detection of anterior pelvic tilt abnormality includes: The neutral reference value for hip joint angles was obtained using the time-series curves of the left and right hip joint angles output in step 45. The measured angles in the static standing position were used as neutral reference values, with positive values ​​indicating hip flexion and negative values ​​indicating hip extension. The average value of the bilateral hip joint angles in the static standing frames of the subject before formal data acquisition was taken as the individual neutral reference value. It is used to eliminate individual baseline differences in a natural standing posture.

[0160] For each gait cycle of each leg, the mid-stance phase hip flexion offset is calculated by extracting the temporal data of the ipsilateral hip angle within the mid-stance phase time interval output in step 51, and calculating the average flexion offset relative to the neutral reference value. ; in, The average hip flexion displacement during the mid-stability phase of the k-th gait cycle is expressed in degrees. For the mid-stance time interval of the ipsilateral leg in the k-th gait cycle; This represents the total number of keyframes within that interval. Let be the ipsilateral hip angle in frame t; This is the individual neutral baseline value for the hip joint angle.

[0161] A positive offset indicates that the hip joint is in a continuous flexed state relative to the neutral position, corresponding to anterior pelvic tilt; the larger the offset, the more significant the anterior pelvic tilt.

[0162] Anterior pelvic tilt abnormality is determined using a combination of amplitude threshold and duration proportion. Anterior pelvic tilt abnormality is determined to exist in that leg during the gait cycle if all of the following conditions are met simultaneously: The average flexion displacement of the hip joint during the mid-stance phase is greater than the sixth preset angle threshold (preferably 10°~15°). The number of consecutive frames in the middle of the support phase where the hip joint flexion offset is greater than the sixth preset angle threshold, and the proportion of the total frames in the middle of the support phase is greater than the fourth preset proportion threshold (preferably 30%).

[0163] The determination is strictly limited to the mid-stance phase, excluding interference from normal hip flexion movements during the heel strike and swing phases. This ensures that the test results correspond more accurately to the static anterior tilt posture of the pelvis during the single-leg weight-bearing phase and to the biomechanical relationship of the eccentric control function of the gluteus maximus.

[0164] Anterior pelvic tilt abnormal event generation: Based on the judgment results, anterior pelvic tilt abnormal event information is generated, with fields including: abnormal subtype (anterior pelvic tilt), occurrence time, duration, mean hip flexion displacement, abnormal side, and corresponding gait cycle number. This event, along with trunk posterior tilt abnormal events, is grouped into the anterior pelvic tilt or trunk posterior tilt abnormal event set and input into step 57 for fusion and deduplication.

[0165] In this embodiment, the calculation of the sagittal tilt angle of the trunk and the determination of abnormal trunk posterior tilt adopt the following scheme: Obtain the sagittal plane physical coordinates of the trunk reference point and the pelvic reference point. Reuse the trunk reference point (midpoint of the left and right shoulder joint key points) and the pelvic reference point (midpoint of the left and right hip joint key points) defined in step 531, and calculate the travel direction physical coordinates and vertical physical height of the two points based on the coordinate reconstruction method in step 4: For key points of the left and right shoulder joints, the refined ground homography matrix was used respectively. The ground projection coordinates of the travel direction are obtained by inverse mapping. Then, combined with the shoulder joint height off the ground, the physical coordinates of the actual travel direction are obtained using the similar triangle correction method consistent with step 42. , Shoulder joint vertical height , It is calculated using the pixel v coordinate and the scale factor s, and the calculation method is completely consistent with step 45.

[0166] The direction coordinates of the pelvic reference point with vertical height The coordinates are obtained directly from the arithmetic mean of the corresponding coordinates of the key points of the left and right hip joints. The formula for calculating the sagittal plane coordinates of the trunk reference point is: ; in, The physical coordinates of the direction of travel for the torso reference point; This refers to the vertical physical height of the torso reference point relative to the ground.

[0167] Calculate the time-series curve of the trunk sagittal tilt angle. In the sagittal plane (YZ plane), the trunk sagittal tilt angle is defined as the anteroposterior deflection angle of the line connecting the trunk reference point and the pelvic reference point relative to the vertically upward direction. The calculation formula is: ; in, The sagittal tilt angle of the torso in frame t is given in degrees. This represents the forward and backward offset of the trunk reference point relative to the pelvic reference point in the direction of travel. A positive value indicates that the upper part of the trunk is in front of the pelvis (forward tilt direction), and a negative value indicates that the upper part of the trunk is behind the pelvis (backward tilt direction). The vertical height difference between the trunk reference point and the pelvic reference point is always positive, corresponding to the vertical projection length of the trunk segment.

[0168] Angle symbol conventions: Indicates that the torso is leaning forward. Indicates that the torso is leaning backward. This indicates that the torso is in a vertical, neutral position.

[0169] Individual neutral baseline calibration. The average sagittal tilt angle of the trunk in the static standing frames of the subject before formal data acquisition was used as the individual neutral baseline value. Baseline calibration is performed on the entire time-series curve to eliminate baseline differences in individual natural standing postures: ;

[0170] Calibrated It only reflects the dynamic tilt changes of the trunk during walking and can be directly used for cross-cycle comparison and anomaly detection.

[0171] Determination of abnormal trunk backward tilt. Within the mid-stance phase of each gait cycle, the minimum calibrated trunk sagittal tilt angle is extracted. If this minimum value is less than a negative value of a seventh preset angle threshold (i.e., the absolute value of the backward tilt exceeds the threshold, preferably 5°), and the duration of this state accounts for a proportion greater than a fourth preset proportion threshold (preferably 30%), then an abnormal trunk backward tilt is determined to exist in that gait cycle.

[0172] Once an abnormality is identified, information on trunk posterior tilt abnormal events is generated. The fields include: abnormal subtype (trunk posterior tilt), occurrence time, duration, peak trunk posterior tilt angle (absolute value), and corresponding gait cycle number. This information is then grouped together with pelvic anterior tilt abnormal events into the pelvic anterior tilt or trunk posterior tilt abnormal event set and input into step 57 for fusion and deduplication.

[0173] Step 57: Perform abnormal event fusion and deduplication on the abnormal event information of pelvic tilt or sinking, trunk compensatory swaying, knee hyperextension or hypoflexion, foot drop or shuffling, insufficient push-off force, and anterior pelvic tilt or posterior trunk tilt to obtain abnormal gait recognition information. The six types of abnormal event lists output from steps 52 to 56 are then fused. Time overlap deduplication: If the time interval between two events of the same type of abnormality is less than 0.2s, they are merged into one event, and the duration is taken as the union; when different types of abnormal events overlap, they are not merged, but are retained independently for functional assessment of the corresponding muscles.

[0174] Frequency statistics: For each type of anomaly, the number of occurrences and the anomaly occurrence rate per gait cycle are calculated throughout the entire 6MWT process; Original severity indicators are retained: For each abnormal event, the corresponding quantitative indicators (such as peak pelvic tilt angle, peak trunk tilt angle, extreme knee angle, plantar flexion time percentage, push-off angular velocity, etc.) are retained as input for the quantitative scoring in step 6.

[0175] This sub-step outputs fused and deduplicated abnormal gait identification information, including the set of occurrence time points, duration sets, occurrence frequency, corresponding gait cycle numbers, and raw quantitative indicators of the severity of each event for six types of abnormalities.

[0176] This application transforms the biomechanical characteristics of six types of abnormal gait—pelvic tilt or subsidence, trunk compensatory swing, knee hyperextension or hypoflexion, foot drop or shuffling, insufficient push-off force, and anterior pelvic tilt or posterior trunk tilt—into an executable temporal signal detection algorithm. This achieves fully automated identification of abnormal gait, completely replacing the manual process of two professionals observing and annotating frame by frame in existing technologies. The evaluation efficiency is improved by tens of times, and the results are not affected by the subjective factors of the evaluators. All detections are limited to specific gait phase intervals: pelvic subsidence and trunk compensation are limited to the mid-stance phase of a single side; knee hyperextension is limited to the mid-stance phase; foot drop and shuffling are limited to the swing phase; and insufficient push-off force is limited to the end of the stance phase. This temporal conditional design significantly improves the detection specificity of various abnormalities, effectively distinguishing between normal physiological movement and pathological abnormalities.

[0177] In this embodiment, the method for recognizing abnormal gait in the elderly based on monocular vision further includes: Step 6: Generate the abnormal load index and muscle function score for each target muscle based on abnormal gait identification information, joint angle temporal curves, and gait spatiotemporal parameters; In this embodiment, step 6 includes: Anomaly Severity Quantification calculates the severity of each anomaly detected in step 5. The severity is determined by the degree to which the kinematic parameters corresponding to the abnormality deviate from the normal reference range: ; in, These are the measured parameter values ​​(such as pelvic tilt angle, trunk tilt angle, knee angle, ankle plantar flexion angle, and push-off angular velocity) during this abnormal event. This parameter represents the normal reference value for the elderly. This is half the width of the normal reference range. This is a dimensionless standardized deviation; the larger the value, the more severe the anomaly.

[0178] according to Severity is mapped to three levels: Mild (0 < 0) ≤1), Moderate (1< ≤2), severe ( > 2). This standardization method allows the severity of different types of anomalies (angle, velocity, and time percentage) to be compared under a unified dimension.

[0179] Measured parameters corresponding to various anomalies Normal reference value and normal reference range half width The following data (based on clinical norms for gait analysis in healthy elderly individuals aged 60-75) are provided: Pelvic tilt or subsidence: The measured parameter is the peak subsidence angle. (Normal range:) to ); Trunk compensatory sway: The measured parameter is the peak value of the trunk tilt angle. , (Normal range:) to ); Knee hyperextension: The measured parameter is the maximum knee angle at mid-stance. , (Normal range:) ); Insufficient knee flexion: The main measured parameter is the average knee angle at mid-stance phase. , (Normal range:) The auxiliary measured parameter is the buckling delay time. , The maximum severity calculated from both methods is taken as the final value of the event. Foot drop: The main measured parameter is the minimum ankle joint angle during the swing phase. , (Normal range:) The auxiliary measured parameter is the percentage of time spent in plantar flexion. , (Normal range:) The maximum severity calculated from both methods is taken as the final value of the event. Drag step: The main measured parameter is the integrated value of the ground clearance (unit: ), , (Normal range:) The auxiliary measured parameter is the percentage of time spent at low altitudes. , (Normal range:) The maximum severity calculated from both methods is taken as the final value of the event. Insufficient pushing force: The main measured parameter is the peak plantar flexion angular velocity. , (Normal range:) The auxiliary measured parameter is the peak forward acceleration. , (Normal range:) When both values ​​are below the lower limit of the normal range, the condition is considered abnormal, and the severity is determined by the average of the two calculated values.

[0180] Abnormal gait-muscle function mapping: Based on the principles of biomechanics and muscle kinesiology, a mapping relationship is established between five types of abnormal gait and five target muscles: Anterior pelvic tilt or posterior trunk tilt indicates gluteus maximus dysfunction. If the pelvis tilts or sinks (gluteus medius gait), it is considered gluteus medius dysfunction. Insufficient knee flexion or hyperextension (knee retraction) during the stance phase is diagnosed as quadriceps dysfunction. Insufficient pushing force (corresponding to decreased active plantar flexion propulsion ability of the ankle joint) is diagnosed as triceps surae muscle dysfunction; Foot drop or dragging of the gait indicates tibialis anterior muscle dysfunction.

[0181] Based on the abnormality detection results in step 5, each type of abnormal event is assigned to the corresponding target muscle. Among them, knee hyperextension and knee hypoflexion are both assigned to the quadriceps femoris; foot drop and shuffling are both assigned to the tibialis anterior.

[0182] This proposal suggests an Abnormal Load Index (ALI), which integrates the frequency, duration, and severity of abnormalities into a single continuous quantitative index. For the m-th target muscle (m=1,...,5, corresponding to the gluteus maximus, gluteus medius, quadriceps femoris, triceps surae, and tibialis anterior, respectively), it is assumed that the corresponding abnormality type occurs throughout the 6MWT process. The duration of the j-th anomaly is... (Unit: seconds), severity level: (Calculated using the aforementioned method for quantifying the severity of anomalies), the total duration of 6MWT is =360s, then: ; in, The duration is weighted by the severity of the muscle-related abnormality per unit time, comprehensively reflecting the frequency of the abnormality. The larger, The larger the ALI is when it is fixed, the longer the duration of a single attack (ALI is also a factor in ALI). The larger the number, the greater the ALI) and the severity ( The larger the value, the larger the ALI (Above-10). The higher the value, the more severe the muscle dysfunction.

[0183] Existing gait abnormality scoring methods typically employ discrete rules (e.g., 1 point for a single occurrence, 2 points for multiple occurrences, and 3 points for duration exceeding 1 minute). These rules only consider the frequency and approximate duration of occurrences, neglecting the severity of the abnormality. Furthermore, the boundaries between single and multiple occurrences are vague, and reproducibility is poor. The Abnormal Load Index (ALI) proposed in this scheme integrates the three dimensions of abnormality frequency, single-occurrence duration, and severity (standardized measure of kinematic parameters deviating from the normal range) into a single continuous index. Its physical meaning is the severity-weighted duration of the abnormality per unit time. This formula ensures that the scoring results are calculated entirely from objective measurement data, unaffected by the assessor's subjective judgment, and the continuous output reflects the progressive changes in muscle dysfunction, making it suitable for longitudinal tracking of rehabilitation effects.

[0184] Muscle Function Rating Mapping Abnormal load index Mapped to muscle function score (0 to 3 points, with higher scores indicating more severe functional impairment): ; in , For preset grading thresholds (e.g.) =0.05, =0.15, which can be calibrated based on clinical gait data of the target population.

[0185] Step 6 outputs the abnormal load index for each of the five target muscles. and muscle function score .

[0186] The Abnormal Load Index (ALI) proposed in this application integrates three dimensions of abnormal gait occurrence—frequency, duration of each occurrence, and severity (standardized degree of deviation of kinematic parameters from the normal reference range)—into a single continuous quantitative index, mapped to a muscle function score of 0 to 3. Compared with existing discrete scoring rules based on manual observation (e.g., 1 point for a single abnormality, 2 points for multiple occurrences, and 3 points for abnormality lasting more than 1 minute), this scoring model has the following advantages: First, severity is objectively calculated based on the deviation of measured parameters from normal reference values, rather than subjective human grading, and the scoring results are reproducible; second, frequency and duration are naturally integrated through time proportions, eliminating the need to manually set vague boundaries between single and multiple occurrences; third, the continuous quantitative index can precisely reflect the progressive changes in muscle dysfunction, making it suitable for longitudinal tracking and evaluation of rehabilitation effects.

[0187] Step 7: Generate comprehensive assessment information based on the abnormal load index and muscle function score of each target muscle.

[0188] In this embodiment, step 7 includes: Calculate the Global Gait Abnormality Index (GAI), which is the average of the functional scores of the five target muscles: ; in =5 represents the target total muscle mass. GAI values ​​range from 0 to 3, with higher values ​​indicating more severe overall gait abnormalities.

[0189] The degree of overall gait abnormality is classified according to the GAI value: normal: =0 (no abnormal gait detected); Mild abnormality: 0< ≤1; Moderate abnormality: 1 <GAI≤2; Severe abnormality: GAI>2.

[0190] The comprehensive assessment information includes: Functional status scores for each target muscle (gluteus maximus, gluteus medius, quadriceps femoris, triceps surae, and tibialis anterior). and ; Global Gait Abnormality Index (GAI); Gait abnormality severity classification (normal / mild / moderate / severe); The frequency and typical manifestations of six types of abnormal gait.

[0191] Existing visual gait analysis methods mostly focus on extracting macroscopic parameters such as gait speed and stride length, or only output binary results of abnormal / normal gait, failing to pinpoint the specific muscle dysfunction. This solution establishes a complete technical chain from monocular video input to functional scoring of five target muscles (gluteus maximus, gluteus medius, quadriceps femoris, triceps surae, and tibialis anterior): through temporal conditional automatic detection of five types of abnormal gait, abnormalities are assigned to corresponding muscles based on biomechanical mapping relationships, and the degree of dysfunction of each muscle is quantified using an abnormality load index, ultimately outputting an overall gait abnormality index and grade. This chain deepens the assessment from simply whether gait is abnormal to identifying which muscle is dysfunctional and the degree of abnormality, providing direct muscle function localization for the development of clinical rehabilitation programs.

[0192] Although the present invention has been described in detail above with general descriptions and specific embodiments, modifications or improvements can be made to it, which will be obvious to those skilled in the art. Therefore, all such modifications or improvements made without departing from the spirit of the present invention fall within the scope of protection claimed by the present invention.

Claims

1. A method for recognizing abnormal gait in the elderly based on monocular vision, characterized in that, The method for recognizing abnormal gait in the elderly based on monocular vision includes: Step 1: Obtain basic test environment parameters; Step 2: Acquire continuous video data of the elderly person to be tested; Step 3: Process the continuous video data to obtain the temporal trajectory data of key points; Step 4: Generate gait spatiotemporal parameters, joint angle temporal curves, and ground physical coordinate temporal trajectories of lower limb key points based on the temporal trajectory data of the key points and the basic test environment parameters; Step 5: Based on the joint angle time-series curve, gait spatiotemporal parameters, ground physical coordinate time-series trajectory of lower limb key points, and time-series trajectory data of key points, abnormal gait is identified to obtain abnormal gait identification information.

2. The method for identifying and quantitatively assessing abnormal gait in the elderly based on monocular vision as described in claim 1, characterized in that, The method for recognizing abnormal gait in the elderly based on monocular vision further includes: Step 6: Generate the abnormal load index and muscle function score for each target muscle based on abnormal gait identification information, joint angle temporal curves, and gait spatiotemporal parameters; Step 7: Generate comprehensive assessment information based on the abnormal load index and muscle function score of each target muscle.

3. The method for recognizing abnormal gait in the elderly based on monocular vision as described in claim 2, characterized in that, Step 3 includes: Step 31: Perform video decoding and original frame sequence extraction on the temporal trajectory data of key points to obtain the original frame sequence; Step 32: Perform frame-level denoising on the original frame sequence to obtain a denoised frame sequence; Step 33: Extract the keyframe sequence based on the denoised frame sequence and the original frame rate; Step 34: Perform human target detection and tracking based on the keyframe sequence to obtain the human bounding box, the expanded cropping box, the scaled human region image, and the coordinate mapping parameters for each frame of the elderly person to be detected. Step 35: Perform 2D human pose estimation and key point extraction based on the scaled human region image and coordinate mapping parameters, thereby obtaining the original pixel coordinates of key points in each frame, the detection confidence of each key point, and the key point state label; Step 36: Construct and spatiotemporally smooth the temporal trajectory of key points based on the original pixel coordinates of key points in each frame, the detection confidence of each key point, and the state marker of key points, thereby generating the 2D pixel coordinate temporal trajectory of key points. The 2D pixel coordinate temporal trajectory of key points is used as the temporal trajectory data of key points.

4. The method for recognizing abnormal gait in the elderly based on monocular vision as described in claim 3, characterized in that, The basic test environment parameters include the camera intrinsic parameter matrix, the ground homography matrix, the scale factor, and the pixel coordinates of the two ends of the scale line; Step 4 includes: Step 41: Refine the ground homography matrix based on the basic test environment parameters to obtain the refined ground homography matrix; Step 42: Based on the refined ground homography matrix and the temporal trajectory data of key points, perform ground physical coordinate mapping of lower limb key points to obtain the temporal trajectory of bipedal ground physical coordinates; Step 43: Gait event monitoring is performed based on the temporal trajectory of the physical coordinates of both feet on the ground and the key frame timestamps, thereby obtaining the foot tracking event sequence, the cycle duration of each gait cycle, the duration of the support phase, and the duration of the swing phase; Step 44: Calculate gait spatiotemporal parameters based on the temporal trajectory of the physical coordinates of the two feet on the ground and the sequence of foot tracking events, thereby obtaining stride length information, stride width information, stride speed information, stride frequency information, average support phase ratio and the ratio sequence per cycle; Step 45: Perform joint angle timing calculations based on the timing trajectory data of the key points to obtain the joint angle timing curve; Step 46: Perform gait cycle alignment and normalization based on the foot tracking event sequence and joint angle time-series curve to obtain the aligned gait spatiotemporal parameters and joint angle time-series curve.

5. The method for recognizing abnormal gait in the elderly based on monocular vision as described in claim 4, characterized in that, Step 5 includes: Step 51: Perform anomaly detection preprocessing and gait phase localization based on the foot tracking event sequence, gait spatiotemporal parameters, and joint angle time-series curves to obtain fine temporal information for each gait cycle; Step 52: Generate information on abnormal pelvic tilt or subsidence events based on the fine phase markers of each gait cycle and the joint angle time-series curves; Step 53: Detect trunk compensatory swaying based on the temporal trajectory data of the key points, thereby obtaining information on abnormal trunk compensatory swaying events; Step 54: Detect knee hyperextension or hypoflexion based on the temporal trajectory data of the key points, thereby obtaining information on abnormal events of knee hyperextension or hypoflexion. Step 55: Detect foot drop or dragging based on the temporal trajectory data of the key points, thereby obtaining abnormal event information of foot drop or dragging. Step 56: Detect insufficient pushing force based on the temporal trajectory data of the key points, thereby obtaining information on abnormal events caused by insufficient pushing force; Step 57: Perform abnormal event fusion and deduplication on the abnormal event information of pelvic tilt or sinking, abnormal event information of trunk compensatory swing, abnormal event information of knee hyperextension or flexion, abnormal event information of foot drop or dragging, and abnormal event information of insufficient pushing force to obtain abnormal gait recognition information.

6. The method for recognizing abnormal gait in the elderly based on monocular vision as described in claim 5, characterized in that, The detailed temporal information for each gait cycle includes: the early support phase time interval, the middle support phase time interval, the late support phase time interval, the early swing phase time interval, the late swing phase time interval, frame-by-frame support type markers, and the intersection time interval between the unilateral support phase and the middle support phase; wherein, the frame-by-frame support type markers include three types: left-side unilateral support, right-side unilateral support, and bilateral support, and the intersection time interval between the unilateral support phase and the middle support phase is the overlapping part of the unilateral support phase time interval and the middle support phase time interval; The joint angle time series curves include: left and right knee joint angle time series curves, left and right hip joint angle time series curves, left and right ankle joint angle time series curves, and pelvic tilt angle time series curves; wherein, the pelvic tilt angle is the angle between the line connecting the left and right hip joints and the horizontal line, and a pelvic tilt angle of zero degrees indicates that the pelvis is in a horizontal neutral position. Step 52 includes: Step 521: Extract the pelvic tilt angle time series curve from the joint angle time series curve. Based on the intersection time interval between the unilateral support phase and the mid-term support phase, extract the peak absolute value of the pelvic tilt angle in the mid-term intersection interval of the right unilateral support phase and the mid-term intersection interval of the left unilateral support phase, respectively, as the right pelvic subsidence amount and the left pelvic subsidence amount. Step 522: Compare the right pelvic sinking amount and the left pelvic sinking amount with the first preset angle threshold respectively. When the sinking amount of the pelvis on either side is greater than the first preset angle threshold, it is determined that there is an abnormal pelvic tilt or sinking in the gait cycle. Step 523: Calculate the pelvic sinking asymmetry index based on the average value of the right pelvic sinking and the average value of the left pelvic sinking; compare the pelvic sinking asymmetry index with a preset asymmetry threshold; when the pelvic sinking asymmetry index is greater than the preset asymmetry threshold, it is determined that there is abnormal pelvic tilt or sinking, and the side with the larger average value of pelvic sinking is identified as the abnormal side. Step 524: Based on the judgment results of Step 522 and Step 523, generate abnormal pelvic tilt or sinking event information. The abnormal pelvic tilt or sinking event information includes the time of occurrence of the abnormality, duration, abnormal side, peak sinking angle, trigger criterion number, and corresponding gait cycle number.

7. The method for recognizing abnormal gait in the elderly based on monocular vision as described in claim 6, characterized in that, The temporal trajectory data of the key points further includes the two-dimensional pixel coordinate temporal trajectory of the key point coordinates of the left and right shoulder joints and the key point coordinates of the left and right hip joints. Step 53 includes: Step 531: Calculate the coordinates of the trunk reference point based on the coordinates of the left and right shoulder joint key points, wherein the trunk reference point is the midpoint coordinate of the left and right shoulder joint key points; calculate the coordinates of the pelvic reference point based on the coordinates of the left and right hip joint key points, wherein the pelvic reference point is the midpoint coordinate of the left and right hip joint key points. Step 532: Calculate the torso tilt angle frame by frame based on the coordinates of the torso reference point and the pelvic reference point to form a torso tilt angle time-series curve; wherein, the torso tilt angle is the arctangent of the offset of the torso reference point relative to the pelvic reference point in the horizontal direction of the image and the distance from the torso reference point to the pelvic reference point in the vertical direction of the image; the torso tilt angle is a dimensionless angle quantity that eliminates the influence of height and shooting distance; a positive torso tilt angle indicates that the torso tilts to the right of the image, and a negative torso tilts to the left of the image; Step 533: Based on the intersection time interval between the single-sided support phase and the mid-term of the support phase, extract the first peak value of the trunk lateral tilt angle in the mid-term intersection interval of the right single-sided support phase, and extract the second peak value of the trunk lateral tilt angle in the mid-term intersection interval of the left single-sided support phase; when the absolute value of the first peak value is greater than the second preset angle threshold and the trunk lateral tilt angle is positive, or when the absolute value of the second peak value is greater than the second preset angle threshold and the trunk lateral tilt angle is negative, it is determined that there is an abnormal trunk compensatory swing in the gait cycle; Step 534: Generate trunk compensatory swing abnormal event information based on the judgment result. The trunk compensatory swing abnormal event information includes the time of abnormal occurrence, duration, peak trunk tilt angle, tilt direction, supporting leg side, and corresponding gait cycle number.

8. The method for recognizing abnormal gait in the elderly based on monocular vision as described in claim 7, characterized in that, The joint angle time series curve further includes the left and right knee joint angle time series curves. The knee joint angle is the angle between the thigh vector and the lower leg vector. A knee joint angle of 180 degrees indicates that the knee joint is fully extended, and less than 180 degrees indicates that the knee joint is flexed. Step 54 includes: Step 541: Based on the mid-stance time interval of the support phase, extract the mean and maximum knee joint angles in the mid-stance of the support phase of each gait cycle from the time-series curves of the left and right knee joint angles, and extract the minimum knee joint angle and its corresponding occurrence time in the entire cycle of each gait cycle. Step 542: When the maximum knee angle during the middle of the support phase is greater than the third preset angle threshold, and the duration of the knee angle being greater than the third preset angle threshold is greater than the proportion of the middle of the support phase duration, it is determined that there is an abnormal knee hyperextension in the leg of that gait cycle. Step 543: When the average knee angle during the middle of the support phase is greater than the fourth preset angle threshold, it is determined that the leg on this side has an abnormality of insufficient knee flexion in this gait cycle; or, when the time corresponding to the minimum knee angle occurs later than the end of the middle of the support phase, it is determined that the leg on this side has an abnormality of insufficient knee flexion in this gait cycle. Step 544: Based on the determination results of Step 542 and Step 543, generate abnormal event information of knee hyperextension or flexion insufficiency. The abnormal event information of knee hyperextension or flexion insufficiency includes abnormal subtype, occurrence time, duration, extreme value of knee joint angle, side, and corresponding gait cycle number.

9. The method for recognizing abnormal gait in the elderly based on monocular vision as described in claim 8, characterized in that, The joint angle time-series curves further include left and right ankle joint angle time-series curves. The ankle joint angle is the angle between the lower leg vector and the foot vector. An ankle joint angle of 90 degrees indicates that the ankle joint is in a neutral position, greater than 90 degrees indicates dorsiflexion, and less than 90 degrees indicates plantarflexion. The time-series trajectory data of the key points includes the two-dimensional pixel coordinate time-series trajectory of the key point coordinates of the left and right toes. The basic test environment parameters include a scaling factor; Step 55 includes: Step 551: Calculate the time-series curves of the height of the left and right toes off the ground based on the coordinates of the key points of the left and right toes and the scale factor; wherein, the height of the toes off the ground is the physical height after the difference between the vertical coordinates of the key points of the toes and the vertical coordinates of the ground reference line is converted by the scale factor. Step 552: Determine the swing phase interval based on the early swing phase time interval and the late swing phase time interval. Calculate the proportion of frames with ankle joint angles less than 90 degrees to the total number of swing phase frames within the swing phase interval. When the proportion is greater than the second preset proportion threshold and the minimum ankle joint angle within the swing phase interval is less than the fifth preset angle threshold, it is determined that there is foot drop abnormality in the leg on that side of the gait cycle. Step 553: Calculate the proportion of frames in the swing phase interval where the toe height is less than a preset height threshold to the total number of frames in the swing phase. If the proportion is greater than a third preset proportion threshold, determine that the leg on that side has a dragging abnormality in the gait cycle; or, calculate the integral value of the toe height over time in the swing phase interval. If the integral value is less than a preset integral threshold, determine that the leg on that side has a dragging abnormality in the gait cycle. Step 554: Based on the determination results of Step 552 and Step 553, generate foot drop or dragging abnormal event information. The foot drop or dragging abnormal event information includes abnormal subtype, occurrence time, duration, plantar flexion time percentage, low height time percentage, ground clearance height integral value, side, and corresponding gait cycle number.

10. A device for recognizing abnormal gait in the elderly based on monocular vision, characterized in that, The monocular vision-based abnormal gait recognition device for the elderly includes: A basic test environment parameter acquisition module, which is used to acquire basic test environment parameters; A continuous video data acquisition module, wherein the continuous video data acquisition module is used to acquire continuous video data of the elderly person to be detected; A time-series trajectory acquisition module is used to process the continuous video data to obtain time-series trajectory data of key points; A monocular scale recovery and gait parameter reconstruction module is used to generate gait spatiotemporal parameters, joint angle temporal curves, and ground physical coordinate temporal trajectories of lower limb key points based on the temporal trajectory data of the key points and basic test environment parameters. An abnormal gait recognition module is used to identify abnormal gait based on joint angle time-series curves, gait spatiotemporal parameters, ground physical coordinate time-series trajectories of lower limb key points, and time-series trajectory data of key points, thereby obtaining abnormal gait recognition information.