Skip to contents

Use tem_id to get the symmetry map for your template. If tem_id is omitted, images and templates will be fully reversed (e.g., if point 1 is the left eye in the original image, it will be the right eye in the mirrored image).

Usage

mirror(stimuli, tem_id = NULL, axis = "vertical")

Arguments

stimuli

list of stimuli

tem_id

template ID to be passed to tem_def (usually "frl" or "fpp106") or NULL

axis

vertical or horizontal axis of mirroring

Value

list of stimuli with mirrored images and templates

See also

Stimulus manipulation functions align(), crop_tem(), crop(), greyscale(), horiz_eyes(), image_func(), mask_oval(), mask(), pad(), resize(), rotate(), to_size()

Examples

# load an image and mirror it
o <- demo_tems("frl") |> resize(0.5)
m <- mirror(o, "frl")

# visualise the face outline points
c(o, m) |>
  subset_tem(features("face")) |>
  draw_tem(pt.shape = "index", pt.size = 15) |>
  label(c("original", "mirrored"))