This is an example code to extract EMG Data, calculate a linear envelope and present it in the Model Outputs.
This code will import the raw EMG data, run a high pass filter, apply a DC offset, rectify and perform a low pass filter on the data. There will be three prompts, one for the high pass filter, the low pass filter and the filter order (2 or 4) for the customer to enter.
In order to be written to a model output, the EMG data will be downsampled to match the video frame rate using a cubic spline interpolation.
The rectified EMG and linear envelope will be recorded in the model outputs under the EMG heading.
The customer must have the following modules installed prior to the running of this code:
The customer must have the EMG device named ‘EMG’ in the system file. The customer must also have a VSK
Python modules: numpy, sys, easygui and scipy
Run in Vicon Nexus: Yes. This can be run in Nexus 2, or from a python IDE
Example Provided: Yes, (Processed in Nexus 2.10)
Author: Nev Pires – Vicon Motion Systems, Inc.
GET IN TOUCH
Vicon are here to support you on your Motion Capture journey. We’re happy to provide more information, answer questions and help you find the solution you need. Get in touch with our experts today.