Center of Mass Analysis of the Human Body

Introduction

Motion tracking allows for the biomechanical and neuromechanical study of subjects. One of the first steps in that process is the center of mass analysis, which can then be used for inverse kinematics, reaction forces, and muscle behavior estimation. This project builds off an external motion-tracking study on a ballerina cycling through different positions while balanced on a bosu-ball. The analysis takes the tracked data and estimates the center of mass for the ballerina, along with the center of pressure and base of support. The purpose of this project was to practice my skills in python and jupyter.

Coding

The project file and supporting documents can be found here.

The code requires position data from an external source. In this case, the data comes from a .mat file which is read by the scipy module into a dictionary object. The video file is ingested and processed into individual jpegs using the cv2 package (note, cv2 is updated less frequently than many dependent packages leading to errors. It is commented out due to incompatibility with numpy 1.26)

The position data is used to calculate the center of mass of body segments such as the upper leg, torso etc. The markers for these center of mass estimates are illustrated with red crosses on white circles. The estimates are made using anthropometric data contained on the git repo. With the center of mass of each body segment the COM of the whole body is calculated and illustrated with a yellow cross on a black circle. A vertical yellow line is drawn from this COM.

The center of pressure is estimated by drawing an ellipse over the bounds of the bosu-ball and assuming the center of pressure is directly below the minimum point. A vertical line is drawn from this point. The base of support of the ballerina is drawn with vertical lines originating from the ends of her toe.

All these measured and calculated values are drawn on the frame corresponding to that time step. As the position data is recorded at 25Hz and the video at 30Hz a simple conversion is needed to match the data with the frame.

Analysis and Weaknesses

The code can calculate and visualize the center of mass, the center of pressure, and the base of support of the ballerina through all frames of the video. this allows for a visualization of the body's ability to balance and the conditions necessary for balance. The subject is at a stable position when both the center of pressure and the center of mass are within her base of support. When one of these points exits the bounds of her base then she must quickly change position to return to a stable position. The skill of the dancer is shown in her ability to keep her COM roughly vertical above the COP, or quickly recover from imbalances.

The code is limited to a two-dimensional analysis and uses averaged anthropometric data instead of subject-specific data. The analysis can be easily modified to include a third dimension by creating a new function to retrieve z position coordinates. A better estimate of the COM can be created if subject-specific ratios are found through scanning or weight distribution measurements.

Future Work

If third-dimensional data is available, further development of the code is possible. Inverse kinematic analysis would allow for the calculation of reaction forces, joint moments, and muscle forces. This is not feasible in 2 dimensions because movements in the z direction can appear as movements in the x and y directions in a video, hindering the accuracy of forces and moment measurements. 

The code can be viewed as a starting place for more versatile biomechanics analysis.