file_smooth_timeseries: Smooth CSV file generated by en_velocity() or...

View source: R/file_smooth_timeseries.R

file_smooth_timeseriesR Documentation

Smooth CSV file generated by en_velocity() or en_acceleration() using smooth_timeseries()

Description

A wrapper for the OpenPoseR function smooth_timeseries() that makes it possible to directly pass a file name and or path including a file name to the function.

Can be used to use smooth_timeseries() for a CSV file (*.csv) created using the en_velocity() or en_acceleration() functions without manually loading the data from the file into R first.

Usage

file_smooth_timeseries(file, span, order, overwrite = FALSE)

Arguments

file

Name of CSV file (*.csv) or path to file including filename.

span

The window for the filter.

order

The number of iterations.

overwrite

Optional. Defaults to FALSE. Will write output to "filename_smoothed.csv" in the input directory.

Examples

# Smooth file "~/myvideo/myvideo_body25_cleaned_en_velocity.csv"
file_smooth_timeseries("~/myvideo/myvideo_body25_cleaned_en_velocity.csv")

# Smooth file "~/myvideo/myvideo_body25_cleaned_en_velocity.csv" and do not overwrite file
file_smooth_timeseries("~/myvideo/myvideo_body25_cleaned_en_velocity.csv", span = 4, order = 4, overwrite = TRUE)

trettenbrein/OpenPoseR documentation built on April 22, 2022, 4:03 a.m.