readAMC: Read and Parse a AMC file

Description Usage Arguments Value Note References Examples

View source: R/readAMC.R

Description

This function reads in and parses a AMC Motion Capture file and returns several useful objects

Usage

1
readAMC(amcFilePath, asf, in2cm = TRUE)

Arguments

amcFilePath

path to a .asf file

asf

ASF object read with readASF()

in2cm

a boolean indicating whether to convert inches to centimeters, defaults to TRUE

Value

a list containing:

D

a matrix of dimensions bones x frames containing raw (or converted to cm) AMC values

degrees

a named list containing for each bone the nFrames x 3 matrix with AMC Euler Angles

nFrames

no. of frames found in the AMC file

skeleton

a data frame containing the details for each bone, e.g. DOF, length, direction, angle

Note

Only ASF/AMC files from the CMU Graphics Lab Motion Capture Database have been tested.

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
asfFilePath <- system.file("extdata", "lambada.asf", package = "mocap")
asf <- readASF(asfFilePath)
amcFilePath <- system.file("extdata", "lambada.amc", package = "mocap")
amc <- readAMC(amcFilePath, asf)

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