pyCGM_Single.pycgmStatic.headJC¶
-
pyCGM_Single.pycgmStatic.
headJC
(frame)¶ Calculate the head joint axis function.
Takes in a dictionary of x,y,z positions and marker names. Calculates the head joint center and returns the head joint center and axis.
Markers used: LFHD, RFHD, LBHD, RBHD
- Parameters
- framedict
Dictionary of marker lists.
- Returns
- head_axis, originlist
Returns a list containing a 1x3x3 list containing the x, y, z axis components of the head joint center and a 1x3 list containing the head origin x, y, z position.
Examples
>>> import numpy as np >>> from .pycgmStatic import headJC >>> frame = {'RFHD': np.array([325.83, 402.55, 1722.5]), ... 'LFHD': np.array([184.55, 409.69, 1721.34]), ... 'RBHD': np.array([304.4, 242.91, 1694.97]), ... 'LBHD': np.array([197.86, 251.29, 1696.90])} >>> [np.around(arr, 2) for arr in headJC(frame)] [array([[ 255.22, 407.11, 1722.08], [ 254.19, 406.15, 1721.92], [ 255.18, 405.96, 1722.91]]), array([ 255.19, 406.12, 1721.92])]