Announcement

Collapse
No announcement yet.

Matlab code to read C3D file containing data - ViconPlugInGait FullBody & forceplates

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Matlab code to read C3D file containing data - ViconPlugInGait FullBody & forceplates

    Hello everyone,
    We are trying to write code to analyse Vicon motion analysis and force data. However, we are having trouble bringing in the C3D files with all the data and headers included. We have tried the readc3d, loadc3d getc3d files. Does anyone have Matlab code they are willing to share to bring in c3d files that can be used with the vicon model 'PlugInGait FullBody Ai' that has 39 markers and 5 forceplates?
    Kind Regards,
    Jodie

  • #2
    Re: Matlab code to read C3D file containing data - ViconPlugInGait FullBody & forcepl

    Hi,

    Have you tried to use BTK functions for Matlab?


    Kind regards,

    Cedric

    Comment


    • #3
      Re: Matlab code to read C3D file containing data - ViconPlugInGait FullBody & forcepl

      You can use the C3Dserver which is available for free in 32-bit and 64-bit versions - the free version is full functional.

      The C3Dserver is implemented as a pair of a DLLs (32-bit and 64-bit) that other applications - like MATLAB - can use to simplify writing code to support reading and writing any C3D file data. You basically just tell MATLAB to use the DLL and can then call the C3Dserver functions from within your MATLAB code to read (and write) anything (headers, parameters, data etc.) in your C3D file. Information on using the C3Dserver within MATLAB is available on the C3Dserver website - sample code is included in the installation. This can be installed on an 32-bit or 64-bit version of Windows - XP, Vista, 7, 8, 8.1 etc.

      Information about the C3D file format is available here - www.c3d.org - a manual documenting the format is available on-line and a PDF version can be downloaded and printed for reference.

      Comment


      • #4
        Re: Matlab code to read C3D file containing data - ViconPlugInGait FullBody & forcepl

        Jodie, you didn't say whether you were using Nexus or some other program. In my experience, the easiest option has been to use Vicon's PECS plug-in to run Matlab code from within Nexus. I wrote an exporting script that converts everything in the C3D into a .MAT file. In our hands, this has worked much better than C3DServer (which I had some students try as well). The price ended up being totally worth the time saved for us. As of Nexus 2.0 apparently they've done away with PECS, so one can run Matlab scripts directly from within Nexus.

        Good luck!
        Ajit Chaudhari, PhD
        The Ohio State University

        Originally posted by jcecua View Post
        Hello everyone,
        We are trying to write code to analyse Vicon motion analysis and force data. However, we are having trouble bringing in the C3D files with all the data and headers included. We have tried the readc3d, loadc3d getc3d files. Does anyone have Matlab code they are willing to share to bring in c3d files that can be used with the vicon model 'PlugInGait FullBody Ai' that has 39 markers and 5 forceplates?
        Kind Regards,
        Jodie

        Comment


        • #5
          Re: Matlab code to read C3D file containing data - ViconPlugInGait FullBody & forcepl

          Hi everyone,
          Thank you for your responses. We ended up using the C3Dserver within Matlab but needed to comment out some of the code in getanalogchannels to got it to work (lines 40-51). Let me know if you want me to post the code we commented out to get it to work. We are now interested in also reading in the 'Events' and within that the 'Contexts', 'Labels' and 'Times' from the C3D files. Does any one know how to do this this? We have subjects running over 5 force plates so are trying to write code to determine which force plates were stepped on, the timing of the heel strikes and toe-offs, if it was a left or right foot, and if the foot was clearly on one force plate or if the footstrike crossed over two force plates. Does anyone have any code to help with this or know how to import the event information from the C3D files?
          Kind Regards,
          Jodie

          Comment

          Working...
          X