Learn R Programming

animl (version 1.1.0)

imagesFromVideos: Extract frames from video for classification

Description

This function can take

Usage

imagesFromVideos(
  files,
  outdir = tempfile(),
  outfile = NULL,
  format = "jpg",
  fps = NULL,
  frames = NULL,
  parallel = FALSE,
  workers = 1,
  checkpoint = 1000
)

Value

dataframe of still frames for each video

Arguments

files

dataframe of videos

outdir

directory to save frames to

outfile

file to which results will be saved

format

output format for frames, defaults to jpg

fps

frames per second, otherwise determine mathematically

frames

number of frames to sample

parallel

Toggle for parallel processing, defaults to FALSE

workers

number of processors to use if parallel, defaults to 1

checkpoint

if not parallel, checkpoint ever n files, defaults to 1000

Examples

Run this code
if (FALSE) {
frames <- imagesFromVideos(videos, outdir = "C:\\Users\\usr\\Videos\\", frames = 5)
}

Run the code above in your browser using DataLab