transform: Make a Transform

Description Usage Arguments Value Examples

Description

The first 7 arguments are vectorised, so you can put in a vector of image names or shape/color/texture values.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
transform(
  trans_img = NULL,
  from_img = NULL,
  to_img = NULL,
  shape = 0,
  color = 0,
  texture = 0,
  outname = NULL,
  norm = c("none", "twopoint", "rigid"),
  normpoint = 0:1,
  sample_contours = TRUE,
  warp = c("multiscale", "linear", "multiscalerb"),
  format = c("jpg", "png", "gif")
)

Arguments

trans_img

image(s) to transform

from_img

negative end of the transform dimension

to_img

positive end of the transform dimension

shape, color, texture

amount to transform (1.0 = 100% of the difference between the from_img and to_img)

outname

local path to save transform to

norm

how to normalise

normpoint

points for twopoint normalisation

sample_contours

whether to sample contours

warp

warping algorithm to use

format

image format

Value

stimlist

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
  stimuli <- demo_stim()
  transf <- transform(
    trans_img = stimuli, # transform all stimuli
    from_img = stimuli$f_multi,
    to_img = stimuli$m_multi,
    shape = c(fem = -0.5, masc = 0.5)
  )
  plot(transf, nrow = 2, labels = TRUE)

## End(Not run)

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