overlays_from_folders: Create overlays

View source: R/overlays_from_folders.R

overlays_from_foldersR Documentation

Create overlays

Description

This is a wrapper around the function bemovi.LEEF::create_overlays_subtitle_directory() providing default values for LEEF. Overlays will be created from a folder containing the video files and the bemovi config file and the trajectory data file name.

Usage

overlays_from_folders(
  traj_data_file,
  avi_folder,
  bemovi_extract_yml_file,
  temp_overlay_folder,
  overlay_folder,
  overlay_type = "both",
  label = "species",
  ffmpeg = "ffmpeg",
  font_size = 24,
  circle_size = 120,
  crf = 23,
  gamma = 2,
  mc_cores = 1,
  overwrite = FALSE
)

Arguments

traj_data_file

file name of the file containing the trajectory data (usually from the Master file)

avi_folder

folder containing the input .avi files

bemovi_extract_yml_file

name of the bemovi_extract.yml config file

temp_overlay_folder

directory where the subtitle files will be saved

overlay_folder

directory where the overlay video will be saved

overlay_type

option for the overlays. Overlays can either be shown as "label", "circle" or "both"

label

column to be used to label the particle. Default is "trajectory", other useful might be "species"

ffmpeg

command to run ffmpeg. The default is par_ffmpeg(). It can include a path.

font_size

size of the font for the labels. Default: 24

circle_size

size of the circle. Default: 120

crf

integer value between 1 to 51, where 1 means lossless, 17 is nearly visually lossless, 51 is worst quality. Default value is 23

gamma

gamma correction. Value between 0.1 and 10. Default 2. see https://ffmpeg.org/ffmpeg-filters.html#eq for further info

mc_cores

number of cores toi be used for parallel execution. Defaults to par_mc.cores()

overwrite

if TRUE, existing overlays will be overwritten. Default is FALSE


LEEF-UZH/LEEF.analysis documentation built on Feb. 8, 2025, 11:18 a.m.