flip.lms | R Documentation |
Flips landmarks to the same orientation if you have a mixture of left and right facing data
flip.lms(landmarks, imagedir, side_data, side_code = "right")
landmarks |
A landmark array with dimensions N_landmarks x 2 x N_observations |
imagedir |
The path to the working folder of images |
side_data |
An index of which side the landmarks are facing |
side_code |
What you call the side you want to flip (for example, "right" or "R") |
An array of landmark info with dimensions N_landmarks x 2 x N_observations with all data facing the same direction
guppy.lms <- tps2array(system.file("extdata", "original_lms.TPS", package = "Colormesh"))
flip.test <- flip.lms(landmarks = guppy.lms, imagedir = paste0(path.package("Colormesh"),"/inst/extdata/cropped_images/"), side_data = c("right", rep("left", 9)))
#plot the flipped example
plot(flip.test[,,1])
points(guppy.lms[,,1])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.