Smoothness of Motion

Bitbox computes common metrics of smoothness, including averge jerk and log dimensionless jerk.

Similar to kinematics measures, you can compute these variables for face bounding boxes, head pose, facial landmarks, or body joints (coming soon). When using landmarks, variables are calculated for each landmark separately.

from bitbox.biomechanics import motion_smoothness

# run the processor
rects, lands, exp_global, pose, lands_can, exp_local = processor.run_all()

# quantify abruptness of motion for face rectangles
jerk, ldj = motion_smoothness(rects)

# quantify abruptness of motion for head pose
jerk, ldj = motion_smoothness(pose)

# quantify abruptness of motion for facial landmarks
jerk, ldj = motion_smoothness(lands)

With head pose, you can either use translation coordinates or rotation angles (yaw, pitch, roll).

# using translation coordinates
jerk, ldj = motion_smoothness(pose)

# using rotation angles
jerk, ldj = motion_smoothness(pose, angular=True)