Learn R Programming

webmorphR (version 0.1.1)

squash_tem: Squash Template Points

Description

Move template points that are outside the image boundaries (e.g., negative values or larger than image width or height) to the borders of the image.

Usage

squash_tem(stimuli)

Arguments

stimuli

list of stimuli

Value

list of stimuli

See Also

Template functions auto_delin(), average_tem(), centroid(), change_lines(), delin(), draw_tem(), features(), get_point(), remove_tem(), require_tems(), same_tems(), subset_tem(), tem_def(), viz_tem_def()

Examples

Run this code
# NOT RUN {
nosquash <- demo_stim(1) |> 
  crop(0.4, 0.5)

squash <- demo_stim(1) |> 
  crop(0.4, 0.5) |> 
  squash_tem()

# add padding and visualise templates
c(nosquash, squash) |> 
  pad(50) |>
  draw_tem(pt.size = 5) 
# }

Run the code above in your browser using DataLab