KineMat is a set of MATLAB function files written for the analysis of three-dimensional kinematics. KineMat is intended for intermediate to experienced MATLAB users.
KineMat provides the tools to build a motion analysis system tailored and customized to your needs. A simple example on how to use this toolbox is provided (demo1.m and demo2.m).
The KineMat toolbox can be used for two purposes:
1. 3D Reconstruction: KineMat allows the reconstruction of the three-dimensional positions of markers seen in two or more cameras. Currently, KineMat uses a DLT (direct linear transformation) procedure with 11 coefficients.
2. Motion Analysis: KineMat can be used to calculate transformation matrices, Cardan angles (Joint Coordinate System), and finite helical axes descriptors.
Note that some of the functions are not written in a computationally efficient way, and may well be rewritten/optimized for faster computing. There is also the possibility to translate these MATLAB files into C by using the "MATLAB to C" compiler.
Transformation matrices (T) are expressed by 4x4 matrices containing both the 3x3 rotation matrix (R) and the translation vector (d): T=[R, d; 0, 0, 0, 1]
All m-files can be used on all platforms for which MATLAB is available. All m-file names are not longer than 8 characters and can therefore be used in windows (3.x) environments.
Even though KineMat has been tested and used in the past, the authors do not guarantee the correctness of these m-files. The use of this software is at your own risk.
KineMat can be used free of charge. The authors however request proper credit (citation or acknowledgments), if KineMat is used in publications or in any other forms of communication.
KineMat is not supported! However, if you find errors, have suggestions, concerns or additions to the existing library of m-files, contact either Christoph Reinschmidt (Christoph.Reinschmidt@sulzer.com) or Ton van den Bogert (firstname.lastname@example.org).
KineMat was originally written for the analysis used in the thesis of C. Reinschmidt. During that process, financial support was received from the following institutions and agencies: the Swiss Federal Sports Commission (ESK Switzerland), the Olympic Oval Endowment Fund of Calgary, and adidas Research and Innovation.
The authors would also like to acknowledge the contribution of Ron Jacobs who wrote the first version of "soder.m".
How to Start
1. Download kinemat.zip (or kinemat.tar.Z) and demo.zip (or demo.tar.Z). Extract the kinemat.zip-files into your MATLAB directory and create a directory where demo.zip is extracted to.
2. Run demo1 and demo2 in MATLAB.
3. Print out (or look at) demo1.m and demo2.m which give you more insight into the use of the various m-files used.
4. Look at the various m-files.
3D Reconstruction Tools:
Calculates the (11) DLT coefficients for each camera based
on digitized calibration points and the 3D coordinates of these calibration
Calculates spatial position X,Y,Z, residuals of the reconstruction,
the cameras used from the DLT coefficients and the digitized marker coordinates
of the different cameras.
These set of programs are used to calculate transformation matrices, Cardan angles and corresponding translations (Joint Coordinate System), and finite helical axes descriptors:
Calculates the angle between 2 vectors in a plane. This
program may also be used in conjunction with soder.m to calculate projected
Calculates the rigid body transformation matrix (4x4) and
residuals from three or more marker positions in coordinate system A and
This program calculates the intersegmental motion (cardan
angles, and helical angles) between 2 segments. The required input is the
position of the markers in the anatomical coordinate system of segment
1 and segment 2, the position of these markers during the movement in segment
1 and segment 2, and the chosen sequence. The program outputs the Cardan
angles and helical angles (Woltring 1994, J. Biomechanics 27, 1399-1414).
Calculates the Cardan angles ( and translations) using sequence
xyz (first rotation about x fixed in first segment, y floating axis, and
last rotation about z fixed in the second segment).
Same as above for sequence xzy
Same as above for sequence yxz
Same as above for sequence yzx
Same as above for sequence zxy
Same as above for sequence zyx
Calculates finite helical angles descriptors (angle of rotation,
translation along axis, and location of the axis in space)
Checking of digitized camera coordinates. Lets you interactively
remove (correct) outliers.
Converts degrees into radians.
Calculates the distance between two points.
This program calculates the local camera x,y coordinates
of a known point in 3D using the (known) DLT coefficients of that camera.
This program can for instance be used to plot finite helical axes into
stereo x-rays. (similar procedure as used in Blankevoort et al. (1990),
J.Biomechanics 21, 705-720).
Selects the appropriate column numbers for the specified
Normalization program, e.g. normalizing data with respect
to stance phase.
Converts radians into degrees.