View source: R/landmark.images.R
landmark.images | R Documentation |
Read in and convert images to jpeg for digitization in geomorph
landmark.images(
imagedir,
image.names,
nlandmarks,
scale = NULL,
Multscale = F,
writedir = NULL,
tps.filename = NULL
)
imagedir |
directory of images to measure. Only images with landmarks will be processed. The landmark file names are assumed to exactly match the image names. |
image.names |
A vector of image names to look for in imagedir. These images should be unwarped or deformed to a common reference shape. |
nlandmarks |
number of landmarks to acquire per image. |
scale |
how long is the scale in your images? |
Multscale |
Logical value–should the coords be pre-multiplied by scale value? |
writedir |
directory to save the TPS file. |
tps.filename |
a name for the TPS file. If no name is provided, it will default to "/Colormesh_landmarks.TPS" |
This function is a wrapper around geomorph::digitize2d() that a) allows for more general image format reading and b) automatically reads in the landmarks into R after saving the TPS files. Geomorph only supports reading in jpeg files, so this function converts all images to jpeg in a temporary directory, calls digitize2d for landmarking and then removes the temporary jpegs upon completion.
This function reads in several image formats and converts them to jpeg. The function returns the paths to the images that were converted, as well as the landmarks.
digitize2d
(used for landmarking)
#example place 3 landmarks on one image
ex.landmark <- landmark.images(imagedir = paste0(path.package("Colormesh"),"/extdata/cropped_images/"), image.names = "GPLP_001.png", nlandmarks = 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.