| change_lines | R Documentation |
Alter, add or remove lines in a template
change_lines(stimuli, line_id = 1, pts = NULL)
stimuli |
list of stimuli |
line_id |
index of the line to change |
pts |
vector of points to change the line_idx to (deletes line if NULL) |
stimlist with altered templates
Template functions
auto_delin(),
average_tem(),
centroid(),
delin(),
draw_tem(),
features(),
get_point(),
remove_tem(),
require_tems(),
same_tems(),
squash_tem(),
subset_tem(),
tem_def(),
viz_tem_def()
# get image with dlib70 template and view lines
s <- demo_tems("dlib70")
s[[1]]$lines
# remove all lines
s2 <- change_lines(s, line_id = 1:13, pts = NULL)
s2[[1]]$lines
# visualise point indices
draw_tem(s2, pt.shape = "index", pt.size = 15)
# add a new line
s3 <- change_lines(s2, line_id = "face_outline",
pts = c(2:18, 28:19, 2))
s3[[1]]$lines
draw_tem(s3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.