OpenCap data to Matlab

New project for OpenCap, which is a new software package to estimate 3D human movement dynamics from smartphone videos. OpenCap strongly relies on OpenSim.
POST REPLY
User avatar
James McKendrick
Posts: 2
Joined: Thu Nov 17, 2022 12:46 pm

OpenCap data to Matlab

Post by James McKendrick » Tue Jun 27, 2023 4:21 pm

Hi, I am trying to isolate some data for data analysis from openCap. I have the TRC files but wanted to know which column are used for measurements such as knee angle and ankle angle. I see there are columns for Lknee, l_knee_study, and l_mknee_study and was wondering what I can use to find knee angles and knee angles.

Thank you!

User avatar
Antoine Falisse
Posts: 429
Joined: Wed Jan 07, 2015 2:21 am

Re: OpenCap data to Matlab

Post by Antoine Falisse » Wed Jun 28, 2023 9:37 am

Hi James,

When you download OpenCap data, you should get a README file (this one: https://github.com/stanfordnmbl/opencap ... erver/data) that describes the structure of the files in the folder.

You have the marker data in the TRC files but you also already have the kinematic data (eg, knee angles) under OpenSimData/Kinematics. The kinematic data are saved as .mot files, which is the standard format of OpenSim for motion files. You can open these files in Excel and import them in Matlab. FYI, here is the OpenSim setup file we use to run Inverse Kinematics in OpenSim to get joint angles from marker data: https://github.com/stanfordnmbl/opencap ... tup_IK.xml.

We have a series of utilities for post-processing OpenCap data: https://github.com/stanfordnmbl/opencap-processing. This is using Python and not Matlab. You might be interested in taking a look at example.py and example.ipynb (colab notebook) though.

Hope that helps,
Let us know for questions,

Antoine

POST REPLY