getMotionData: Get XYZ motion data from a pair of ASF/AMC objects

Description Usage Arguments Details Value References Examples

View source: R/getMotionData.R

Description

This function will turn your asf and amc objects into a list of 3D motion matrices, one for each bone.

Usage

1
getMotionData(asf, amc, verbose = FALSE)

Arguments

asf

ASF object read with readASF()

amc

AMC object read with readAMC()

verbose

a boolean indicating whether or not to print no. of frames read, defaults to TRUE

Details

This function accepts a pair of asf and amc objects, for each frame traverses the skeleton in a Depth First Search form to return the xyz list. Each element of this list represents the 3D (global) coordinates of motion for each bone. Thus each element of the list is of dimensions nFrames x 3

Value

xyz

a named list of 3D motion data matrices, one for each bone, see Details.

References

A blog post describing the package with more examples: http://giorasimchoni.com/2017/08/08/2017-08-08-lambada-the-mocap-package/

The CMU Graphics Lab Motion Capture Database: http://mocap.cs.cmu.edu/

Examples

1
2
3
4
5
asfFilePath <- system.file("extdata", "lambada.asf", package = "mocap")
asf <- readASF(asfFilePath)
amcFilePath <- system.file("extdata", "lambada.amc", package = "mocap")
amc <- readAMC(amcFilePath, asf)
xyz <- getMotionData(asf, amc)

gsimchoni/mocap documentation built on May 14, 2019, 11:16 a.m.