Learn R Programming

animl (version 3.2.0)

extract_frames: Extract frames from video for classification

Description

Extract frames from video for classification

Usage

extract_frames(
  files,
  frames = 5,
  fps = NULL,
  out_file = NULL,
  out_dir = NULL,
  file_col = "filepath",
  parallel = TRUE,
  num_workers = 4
)

Value

dataframe of still frames for each video

Arguments

files

dataframe of videos

frames

number of frames to sample

fps

frames per second, otherwise determine mathematically

out_file

csv file to which results will be saved

out_dir

directory to save frames to if not null

file_col

string value indexing which column contains file paths

parallel

Toggle for parallel processing, defaults to FALSE

num_workers

number of processors to use if parallel, defaults to 4

Examples

Run this code
if (FALSE) {
frames <- extract_frames(manifest, out_dir = "C:\\Users\\usr\\Videos\\", frames = 5)
}

Run the code above in your browser using DataLab