crop_pad: Crop to template boundaries and pad

Description Usage Arguments Value Examples

View source: R/crop.R

Description

Calculate the max and min x and y coordinates across the stimuli and crop all image to this plus padding

Usage

1
2
3
4
5
6
7
8
9
crop_pad(
  stimuli,
  top = 10,
  right = top,
  bottom = top,
  left = right,
  each = FALSE,
  ...
)

Arguments

stimuli

list of class stimlist

top

number of pixels to pad the top

right

number of pixels to pad the right side

bottom

number of pixels to pad the bottom

left

number of pixels to pad the left side

each

Whether to calculate bounds for the full set (default) or each image separately

...

additional arguments to pass to crop

Value

list of class stimlist

Examples

1
demo_stim() %>% crop_pad(20) %>% draw_tem() %>% plot()

facelab/webmorph documentation built on April 11, 2021, 6:34 a.m.