Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/get_heartrate.R
A convenience wrapper for extracting heart rate features for each color band from average pixel value per frame of video (processed hr) captured using smartphone cameras.
1 2 3 4 5 6 | get_heartrate(
heartrate_data,
window_length = 10,
window_overlap = 0.5,
method = "acf"
)
|
heartrate_data |
A data frame with columns t, red, green and blue |
window_length |
Length of the time window in seconds, to be considered while calculating the heart rate for each channel. |
window_overlap |
Fraction in the interval [0, 1) specifying the amount of window overlap. |
method |
The algorithm used to calculate the heartrate, current methods include ('acf','psd') which stand for autocorrelation function, and power spectral density respectively. We will be adding support for peak picking algorithms, and wavelet methods later. |
The heartrate activity entails participants placing their finger over the camera for a period of time with the flash on.
list containing heart rate and confidence of the estimate for each color (red, green, blue)
Meghasyam Tummalacherla, Phil Snyder
1 2 | heartrate_data = heartrate_data[,c('t', 'red', 'green', 'blue')]
heartrate_ftrs = get_heartrate(heartrate_data)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.