compute_forward_displacement#

movement.kinematics.compute_forward_displacement(data)[source]#

Compute forward displacement array in Cartesian coordinates.

The forward displacement array is defined as the difference between the position array at time point t+1 and the position array at time point t.

As a result, for a given individual and keypoint, the forward displacement vector at time point t, is the vector pointing from the current t position to the next t+1, in Cartesian coordinates.

Parameters:

data (xarray.DataArray) – The input data containing position information, with time and space (in Cartesian coordinates) as required dimensions.

Returns:

An xarray DataArray containing forward displacement vectors in Cartesian coordinates.

Return type:

xarray.DataArray

Notes

For the position array of a poses dataset, the forward_displacement array will hold the forward displacement vectors for every keypoint and every individual.

For the position array of a bboxes dataset, the forward_displacement array will hold the forward displacement vectors for the centroid of every individual bounding box.

For the shape array of a bboxes dataset, the forward_displacement array will hold vectors with the change in width and height per bounding box, between consecutive time points.

Examples using compute_forward_displacement#

Compute and visualise kinematics

Compute and visualise kinematics