makeVideo: Make a video of an animal's tracked path

View source: R/makeVideo.R

makeVideoR Documentation

Make a video of an animal's tracked path

Description

makeVideo uses trackPath and FFmpeg to produce an mp4 video of an animal's movement along with tracking behaviour and summary plots.

Usage

makeVideo(dirpath, xarena, yarena, fps = 30, box = 1,
  jitter.damp = 0.9)

Arguments

dirpath

a character string specifying a directory containing only jpeg files extracted from a video

xarena

an integer specifying the arena width in mm; this value is used for distance and velocity calculations, an incorrect value will not cause an error but will result in inaccurate calculations

yarena

an integer specifying the arena height in mm; this value is used for distance and velocity calculations, an incorrect value will not cause an error but will result in inaccurate calculations

fps

an integer specifying the frame rate at which jpegs were extracted from a video; this value is used for distance and velocity calculations, an incorrect value will not cause an error but will result in inaccurate calculations

box

an integer specifying the size of the tracking box relative to the initial animal selection box; a larger box size will help prevent the animal being lost (useful for fast moving animals) but will also increase sensitivity to background and lighting changes (default 1)

jitter.damp

a value between 0.5 and 1. Reduces noise in the animal's track, useful if the animal's track is very jittery, which may overestiamte path length. A value of 1 indicates no jitter damping, 0.5 indicates extreme damping and is unlikely to be useful

Details

See documentation for trackPath.

Value

An mp4 video of an animal's movement containing the original video, tracking behaviour plots and summary plots.

Note

makeVideo requires FFmpeg to be installed on your machine. FFmpeg is a cross-platform, open-source video editing tool. It can be downloaded from https://ffmpeg.org.


aharmer/pathtrackr documentation built on June 3, 2023, 1:29 p.m.