Giter Club home page Giter Club logo

pyc3d2osim's Introduction

pyC3D2OSIM

Using this library you can extract and transform markers from C3D files into the OpenSim format and co-ordinate system

Installation

Just check out this repository and run

pip install .

Usage

To just extract the markers from a C3D/TRC file, you can run the script as follows:

python extractMarkers.py input.c3d --output-file=output.trc

You can also extract and/or rename specific markers using the --markers parameters:

--markers m1 m2 m3=renamedM3 m4=renamedM4

To translate all markers relative to another marker:

--origin_marker m1

To rotate the co-ordinate system around axes defined by markers you can use the --axes_markers parameter. The first argument is the letter of the axes you want to rotate around followed by a pair of marker names:

--axes_markers xy x1 x2 y1 y2

You can also provide the .osim model file to automatically match the markers for rotation:

--osim_model model.osim

To translate between motion capture and OpenSim co-ordinate systems, you can use the --mocap_transform parameter. For known systems (currently only Qualisys), you can put the following:

--mocap_transform qualisys

To define your own translation, put the axes in the order you want them to be swapped as the first parameter followed by the rotation around each axes in degrees:

--mocap_transform yxz 90 180 0

You can also use this library as an imported module in your scripts.

Issues

In case of any issues, please feel free to open an issue / submit a pull request.

pyc3d2osim's People

Contributors

dvarnai avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.