Software and Toolboxes

Here you will find links to a host of MATLAB scripts and time-series analysis GUIs, example C/C++ and C# code and applications for interfacing with various motion-capture systems (Polhemus, MS Kinect) and fun OpenGL and Unity3D example applications and code. The code, examples and applications can be downloaded and used for any research purpose. Change, later, manipulate whatever you like. However, please note the following:

  • If you use any of the code or applications for research purposes, please acknowledge the code/application and the authors of the code (not always just me) in any publications or presentations that result.
  • Please understand that although I will try to answer questions concerning the code and applications included here, I am not a ‘support line’ and for the most part you will need to figure things out on your own. I have attempted to provide helpful documentation and comments where appropriate.
  • Finally, it is your responsibility to test and validate the code and applications before using them, as different hardware and software configurations may influence performance.

MATLAB Toolboxes

Behavioral Synchony and Coordination Toolbox

synchro_toolbox: Easy to use analysis code for calculating the synchrony that occurs between two rhythmic movement time-series. Includes sub and master functions for calculating the mean, SD and distribution of instantaneous and discrete relatve phase (using the Hilbert Transform), average cross-spectral coherence and period and amplutide measures. Example data included.

 

Cluster Phase Toolbox

clusterphase: Analysis code for calculating the ‘cluster phase’ synchrony that occurs between the rhythmic movements of a group of individuals (i.e., multivariate relative phase analysis). Example data included.

 

Recurrence Analysis Toolbox

rqatoolbox: Easy to use analysis code for performing continuous and categorical auto- and cross-recurrence quantification analysis. The functions can be used to generate recurrence plots and output the following aRQA and xRQA measures: %REC, %DET, Maxline, Mealine, Entropy. Example data included.

 

Fractal Analysis Toolbox

fractoolbox: Easy to use analysis code for determining the fractal structure of time-series data. Includes functions for calculating PSD, DFA, MDFA, and DCCA. Example data included.

 

Nonlinear Dynamics – Examples and Simulations

ndtoolbox: Simulations and example code for various non-linear dynamical systems. I have put this collection of MATLAB functions together over the years for various classes and workshops. The collection includes code for the following systems: Balazova-Zhabotinsky reaction, Logistic Map, Coupled Logistic map (equation), Henon map, Circle map, damped harmonic oscillator (forced and non-forced), Van der Poll oscillator, Rayleigh oscillator, Hybrid oscillator, nonlinear coupled oscillators, Lorenz system, Rossler system, Lotka Volterra equation, Selkov model, Elementary Cellular Automata, Game of Life, Sand-Pile (critical self-organization) and many more. Play, learn and explore…

Motion Capture

Polhemus Applications and Example Code

Included in the below zip package is several example Polhemus Liberty interface and data capture programs. The example applications and code includes:

  1. An example console application that demonstrates how to connect to the Polhemus Liberty system and initiate a single data collection call or start a continuous data stream.
  2. A simple OpenGL example that demonstrates how to use a data stream from the Polhemus to control on-screen graphics.
  3. Simple TCP server and client applications that can be used to send data between multiple machines on a closed network or to another application via a virtual port. For instance, we have employed this as a way of streaming data to Unity 3D applications.
  4. A basic GUI capture program. This is a very simple, no frills application that can be used for generic Polhemus data capture.

Note 1: most of the examples can also be used with a Polhemus Latus system after the Latus wireless markers have been launched using the PiMgr application that comes with the Polhemus SDK.

Note 2: All code was written in Visual Studio Express 8 and uses the PDI_90 Polhemus SDK.

Note 3: For the OpenGL application you will also need to move the gl includes and lib files to your windows SDK directory.

polhemus-liberty-latus-example-code

 

MS Kinect Applications and Example Code

Below you will find some very basic applications that record MS Kinect Data, including the Kinects video stream (save as BMP images), skeletal data, and depth array (saved as BMP images). There are several applications each capturing different combinations of MS Kinect data. Please keep in mind that the sample rate of the MS Kinect is not perfect and is dependent on your PC’s processing speed, RAM and video card. The better your PC and video card the better the applications will work. I recommend using a minimum of an i7 quad core (or comparable) PC with 8 GB RAM and a video card that has at least 1GB of on board RAM. Also note that these applications have only been test and designed for the MS Kinect Version 1 (i.e., the XBox 360 version). Finally, if you intend to save the video stream, each image is a high resolution 1.2 MB BMP image and so make sure you have plenty of hard drive space.

mskinect_recordingapplications

opengl_kinect_recorder

VR and Unity 3D

coming soon…