Description Usage Arguments References Examples
View source: R/makeMotionMovie.R
Use the animation
and scatterplot3d
packages to output a gif
or a mp4 movie out of the motion data extracted from the AFS/AMC files. For
gifs need to install ImageMagick, for mp4s need ffmpeg, see the animation
package for details. Note this function will create a new gif/mp4 file in your
working directory.
1 2 3 4 5 |
asf |
ASF object read with |
amc |
AMC object read with |
xyz |
the |
movieType |
type of video, "gif" or "mp4", defaults to "gif" |
framesPerSecond |
no. of frames per second, defaults to 120 |
skipNFrames |
size of frames step to skip, defaults to 1, i.e. no skipping. This parameter is useful when there are many frames and the gif can fail simply because the command is too long, e.g. in the "lambada" example, we input 4 here |
fileName |
name for the output file, defaults to "motion" |
imgName |
the |
rotateMotion |
a boolean indicating whether to rotate the skeleton in motion, defaults to FALSE |
viewAngle |
the |
nSkeletons |
number of skeletons to animate from this motion, defaults to 1,
ignored if |
sdExtraSkeleton |
standard deviation of the position of other skeletons, in case nSkeletons > 1, defaults to 80 (centimeters) |
twoSkeletons |
a boolean indicating whether a pair of skeletons are
entered into the function, defaults to TRUE. If FALSE one must specify |
amc2 |
AMC object of the 2nd skeleton, if |
xyz2 |
|
... |
additional arguments to the |
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/
1 2 3 4 5 6 | 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)
makeMotionMovie(asf, amc, xyz, skipNFrames = 4)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.