New geomorph function to digitize multiple 2d images

[This article was first published on geomorph, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Hi Morphometricians!

We’ve enhanced geomorph’s ability to continuously digitize multiple specimens’ images in 2d, if these are within the same directory. This new function allows one to digitize 2d images without interruption. Thanks to Samuel Brown and Karl Fetter for suggesting the improvement.

We will incorporate this function in our next package update. I’m including demonstration code and a link to archaeological lithic specimens below. To replicate the excercise, first download zipped folder containing the images of 3 specimens from this link .

These images are of Middle and Upper Paleolithic tools from excavations at Tor Sadaf, Jordan, conducted by Dr. Nancy Coinman

Cheers,

Erik

DIgitizing instructions can be found in the geomorph package manual (pp. 11-12)


# create a folder named “2d_midpaleolithic_specs” and unzip images there
# dir.create(“C:/2d_midpaleolithic_specs/”)

# then set the directory to where the images are located
> setwd(“C:/2d_midpaleolithic_specs/”)

> # create the file name character vector named “specs”
> # ensure that only “.jpg” files are called (for future reference)
> specs<-list.files()[grep(".JPG",list.files())]
> specs
[1] “spec100.JPG” “spec143.JPG” “spec164.JPG”

> # source the function “digitize2d.multi()”
> source(url(“http://www.people.fas.harvard.edu/~eotarolacastillo/software/digitze2dmulti.R”))

> # To begin digitizing images call the function with with:
> diged.imgs <- lapply(specs, digitize2d.multi, nlandmarks=3, scale=1)
Loading required package: jpeg
set scale = 1

# to set the scale, use the mouse to digitize the length of the scale in the image


select landmarks 1:3

# to select landmarks, “point-and-click” at the locations of the landmarks of interest. in this case, the ends of a preparation platform and the tip were selected.


set scale = 1
select landmarks 1:3

(figure not shown)
set scale = 1
select landmarks 1:3

# here is another example using an upper-paleolithic blade.


To leave a comment for the author, please follow the link and comment on their blog: geomorph.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)