visual3d:tutorials:events:kinematic_event_detection
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
visual3d:tutorials:events:kinematic_event_detection [2025/06/02 14:16] – [Generating and Comparing Gait Cycles Across Methods] wikisysop | visual3d:tutorials:events:kinematic_event_detection [2025/06/02 20:33] (current) – [Workflow Outline] wikisysop | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Assessing Kinematic Methods of Structuring Gait====== | ====== Assessing Kinematic Methods of Structuring Gait====== | ||
- | ===== Overview | + | ===== Overview ===== |
This tutorial is a comprehensive walkthrough of a research investigation presented at the Ontario Biomechanics Conference (OBC) 2025. | This tutorial is a comprehensive walkthrough of a research investigation presented at the Ontario Biomechanics Conference (OBC) 2025. | ||
- | The study, titled " | + | The study, titled " |
**Research Question: Are kinematic event detection methods able to reliably structure biomechanical waveforms in the gait cycle?** | **Research Question: Are kinematic event detection methods able to reliably structure biomechanical waveforms in the gait cycle?** | ||
- | The tutorial has been designed for biomechanics researchers, | + | The tutorial has been designed for biomechanics researchers, |
===== Introduction ====== | ===== Introduction ====== | ||
- | In gait analysis, the ability to structure biomechanical waveforms into gait cycles is crucial | + | In gait analysis, the ability to structure biomechanical waveforms into gait cycles is needed |
- | Traditionally, | + | Traditionally, |
- | Given these limitations, | + | Given these limitations, |
The aim of this tutorial is to present a step-by-step guide for using HAS-Motion software tools, specifically Visual3D, to process gait data and compare several kinematic-based methods against the kinetic-based gold standard. | The aim of this tutorial is to present a step-by-step guide for using HAS-Motion software tools, specifically Visual3D, to process gait data and compare several kinematic-based methods against the kinetic-based gold standard. | ||
- | ===== Dataset Description | + | ===== Data ===== |
{{: | {{: | ||
Line 33: | Line 33: | ||
This tutorial focuses exclusively on **treadmill trials** and analyzes only **left-side events** (LHS and LTO). This simplifies gait cycle definitions to the interval between two identical events on the same foot, which is essential for consistent waveform normalization. | This tutorial focuses exclusively on **treadmill trials** and analyzes only **left-side events** (LHS and LTO). This simplifies gait cycle definitions to the interval between two identical events on the same foot, which is essential for consistent waveform normalization. | ||
- | ===== Sample | + | ===== Sample |
To facilitate learning and application, | To facilitate learning and application, | ||
Line 51: | Line 51: | ||
===== Workflow Outline ====== | ===== Workflow Outline ====== | ||
- | 1. **Preprocessing in Visual3D** | + | ====1. Preprocessing in Visual3D |
The first stage involves preprocessing all participant data using the **Preprocessing_Pipeline.v3s** script. This step takes treadmill-only trials for each participant and puts them into a single CMZ file and computes joint kinematic data. | The first stage involves preprocessing all participant data using the **Preprocessing_Pipeline.v3s** script. This step takes treadmill-only trials for each participant and puts them into a single CMZ file and computes joint kinematic data. | ||
Line 57: | Line 57: | ||
During this stage, ground reaction force (GRF) data is used to automatically detect kinetic gait events, establishing a **baseline** for later comparison. Subject-specific anthropometric data (height and weight) are manually input from the provided spreadsheet. | During this stage, ground reaction force (GRF) data is used to automatically detect kinetic gait events, establishing a **baseline** for later comparison. Subject-specific anthropometric data (height and weight) are manually input from the provided spreadsheet. | ||
- | 2. **Understanding and Applying Kinematic Method Pipelines** | + | ==== 2. Understanding and Applying Kinematic Method Pipelines |
The next phase involves applying several published and custom kinematic methods to detect gait events without relying on kinetic data. | The next phase involves applying several published and custom kinematic methods to detect gait events without relying on kinetic data. | ||
Line 68: | Line 68: | ||
- | 3. **Apply and Generate Measures to Compare all Methods** | + | ==== 3. Apply and Generate Measures to Compare all Methods |
Once individual method pipelines were validated, they were consolidated into a master script (**FinalPipeline_ALL_METHODS_SEQUENCES.v3s**). This pipeline computes all gait event across all methods simultaneously and then defines gait cycles based on those events. | Once individual method pipelines were validated, they were consolidated into a master script (**FinalPipeline_ALL_METHODS_SEQUENCES.v3s**). This pipeline computes all gait event across all methods simultaneously and then defines gait cycles based on those events. | ||
Line 74: | Line 74: | ||
These durations are stored under the METRIC:: | These durations are stored under the METRIC:: | ||
- | 4. **Exporting to Python for Statistical Evaluation** | + | ==== 4. Exporting to Python for Statistical Evaluation |
Finally, the computed cycle durations are exported to an Excel file where each row represents one gait cycle instance. | Finally, the computed cycle durations are exported to an Excel file where each row represents one gait cycle instance. | ||
Line 141: | Line 141: | ||
**Knee Angle Max Method**: A simpler method that structures cycles based on successive local maxima of the knee flexion signal, using **Event_Maximum** | **Knee Angle Max Method**: A simpler method that structures cycles based on successive local maxima of the knee flexion signal, using **Event_Maximum** | ||
- | Each of these pipeline scripts define events AND compute the cycle duration using this events by placing them in sequences. | + | Each of these pipeline scripts define events AND compute the cycle duration using this events by placing them in sequences. |
+ | |||
+ | |**Method Name**|**Events Produced**|**Description**| | ||
+ | |Foot Position - Zeni Method 1|LHS, LTO|Uses anterior-posterior position of the foot.| | ||
+ | |Foot Velocity - Zeni Method 2|LHS, LTO|Identifies local minimum in foot's anterior-posterior velocity/ | ||
+ | |Hip Extension - DeAsha Method|LHS| Points of peak hip extension.| | ||
+ | |Toe Acceleration - Hreljac Method|LHS, LTO|Peak in vertical acceleration of toe marker.| | ||
+ | |Heel Velocity - OConnor Method|LHS, LTO|Identifies local minimum in local heel velocity.| | ||
+ | |Hip Surpassing Heel|LHip_Passes_Heel|Identifies moment the leading hip joint center overtakes the opposite foot.| | ||
+ | |Max Knee Angle|LKnee_Angle_Max|Peak knee flexion-extension angle.| | ||
Line 163: | Line 172: | ||
===== Exporting Data for Statistical Analysis ===== | ===== Exporting Data for Statistical Analysis ===== | ||
- | After processing, gait cycle duration data is exported using **Export_Data_To_ASCIII**. The command extracts | + | After processing, gait cycle duration data is exported using **Export_Data_To_ASCII**. |
+ | |||
+ | < | ||
+ | Export_Data_To_Ascii_File | ||
+ | ! / | ||
+ | / | ||
+ | / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | ; | ||
+ | </ | ||
+ | |||
+ | The command extracts | ||
|**SUBJECT NO.**|**TRIAL**|**METHOD**|**CYCLE_INSTANCE**|**CYCLE_DURATION**| | |**SUBJECT NO.**|**TRIAL**|**METHOD**|**CYCLE_INSTANCE**|**CYCLE_DURATION**| | ||
Line 170: | Line 211: | ||
===== Statistical Evaluation Using Linear Mixed Models ====== | ===== Statistical Evaluation Using Linear Mixed Models ====== | ||
- | To evaluate the agreement between kinematic methods and the kinetic baseline, a Linear Mixed Model (LMM) was applied in Python using **statsmodels**. The dependent variable was cycle duration. The fixed effect was the detection method, while nested random effects were defined for participant and trial. | ||
- | LMM was chosen because it can model variability within | + | Once all gait events and cycle durations were processed in Visual3D, the data was ready for statistical analysis. To assess how well the different kinematic methods agreed with the kinetic gold standard, we used a statistical approach called a **Linear Mixed Model (LMM)** in Python (via the statsmodels library). |
+ | |||
+ | In this analysis, we looked at the **cycle duration** as the outcome we were measuring. We then compared this outcome across different **event detection methods** (which served as the fixed effect), while accounting for variation across participants and their trials (included as random effects). | ||
+ | |||
+ | This model was chosen because | ||
+ | |||
+ | To visualize the results, we start with a boxplot that shows the cycle durations for one of the more reliable kinematic methods- **LHS Foot Position** (also known as Zeni Method 1)- compared to the **LON Kinetic Baseline**. You'll notice that the distributions of the two are quite similar, suggesting that this method might be reliably mimicking the gold standard. | ||
+ | |||
+ | However, this figure does not show us the whole story, since it doesn' | ||
+ | |||
+ | {{: | ||
+ | |||
+ | That's where the results | ||
+ | |||
+ | If a method' | ||
+ | - LHS Foot Position | ||
+ | - LTO Foot Position | ||
+ | - Peak Knee Angle | ||
+ | |||
+ | These results suggest that those methods can structure gait cycles just as consistently as the gold standard kinetic approach. | ||
+ | |||
+ | On the other hand, several methods have an asterisk beside their points, meaning they were significantly different from the baseline using a Bonferroni correction. This indicates that while they may still detect events, they do not structure the gait cycle in a way that aligns closely with the kinetic reference. | ||
+ | {{: | ||
===== Conclusions ===== | ===== Conclusions ===== | ||
visual3d/tutorials/events/kinematic_event_detection.1748873804.txt.gz · Last modified: 2025/06/02 14:16 by wikisysop