segment_elan_image: Segment image(s) from video based on ELAN annotations

View source: R/segment_elan_image.R

segment_elan_imageR Documentation

Segment image(s) from video based on ELAN annotations

Description

This function inputs an ELAN file and a video and outputs images from the ELAN annotations as segments

Usage

segment_elan_image(
  eaf,
  segmentation_tier = NULL,
  gloss_tier = NULL,
  target_glosses = NULL,
  frame_offset = 0,
  gloss_text = F,
  video = NULL,
  image_format = ".jpg",
  path = NULL,
  tag = T,
  trim = 1,
  scale = 1,
  crop_region = NULL,
  text = NULL,
  textcolor = "white",
  boxcolor = NULL,
  font = "Helvetica",
  fontsize = "70",
  rel_fontsize = NULL,
  gravity = "southwest",
  location = "+20+20",
  border = FALSE
)

Arguments

eaf

The ELAN files that supplies annotations as segments

segmentation_tier

Specify tier (TIER_ID) for segments

gloss_tier

Specify tier(s) (TIER_ID) for glosses

target_glosses

Specify which glosses to be kept (default is all glosses)

frame_offset

Select image +/-n from the gloss annotation's start frame (default = 0)

gloss_text

Whether to include text from 'gloss_tier' (default = 'FALSE')

video

The filename of the video to be modified

image_format

The format of the output images (default = '.jpg')

path

The path to the output images

tag

Whether to use annotations as tags in filenames (default = 'TRUE')

trim

Optional argument for horizontal image trim (0 to 1; default = 1)

scale

The resizing proportion of the original image (0 to 1; default is 1 = original size)

crop_region

The region to be cropped (e.g. '100x150+100+100', (width x height +upper_x +upper_y)).

text

The text string to be added to the image

textcolor

The color of the text annotation (default is "white")

boxcolor

The color of the textbox (default is 'NULL')

font

The font of the text annotation (default is "Helvetica")

fontsize

The fontsize of the text annotation (default is 70)

rel_fontsize

Whether to adjust the fontsize relative to width (x) or height (y)

gravity

The anchor point of the added text (default is "southwest")

location

The location of the text relative to the anchor point

border

Set to 'TRUE' if you want a black border frame for the output image

Value

The names of the output image files


borstell/signglossR documentation built on June 11, 2025, 5:58 a.m.