Calculate the maximum and minimum x and y coordinates across the stimuli (or for each stimulus) and crop all image to this plus padding.
Usage
crop_tem(
stimuli,
top = 10,
right = top,
bottom = top,
left = right,
each = FALSE,
...
)
Arguments
- stimuli
list of stimuli
- top, right, bottom, left
numeric; number of pixels or proportion (<1) to pad each side
- each
logical; Whether to calculate bounds for the full set (default) or each image separately
- ...
additional arguments to pass to crop()
See also
Stimulus manipulation functions
align()
,
crop()
,
greyscale()
,
horiz_eyes()
,
image_func()
,
mask_oval()
,
mask()
,
mirror()
,
pad()
,
resize()
,
rotate()
,
to_size()
Examples
stimuli <- demo_stim()
ctem <- crop_tem(stimuli, each = TRUE)
draw_tem(ctem)
# \donttest{
# demo with different templates
stimuli <- demo_tems()
# default 10 pixels around maximum template
crop_tem(stimuli)
# crop specific to each image
crop_tem(stimuli, each = TRUE)
# }