Geometry Morphometry with the Momocs package
Use ImageMagick processes, in a Python script, to extract flints from standardized photographs:
⬇️
- Read a XLSX file (download) to recover folder names and photographs filenames
- Compute several ImageMagick operations (thresholds, connected-components, etc.)
- Write a black and white image of the lithic with the same filename of the original photo + suffix '
_shape
'
The black and white JPG image is ready to be used for GMM processes
R Script for the shape analysis and classification of sickles blades
R Script for a demo showing the shape analysis and classification of arrowheads. The original dataset and part of the code comes from:
- Matzig, D. N., Hussain, S. T., & Riede, F. (2021). "Design Space Constraints and the Cultural Taxonomy of European Final Palaeolithic Large Tanged Points: A Comparison of Typological, Landmark-Based and Whole-Outline Geometric Morphometric Approaches". Journal of Paleolithic Archaeology, 4(4), 1-39, doi: https://doi.org/10.5281/zenodo.4560743
R tutorial for butterfly beads.
Alarashi Hala, 2016, "Butterfly beads in the Neolithic Near East: evolution, technology and socio-cultural implications", Cambridge Archaeological Journal
Download the content of the https://github.com/zoometh/Rdev/tree/master/gmm/out folder with https://download-directory.github.io/ and run:
library(Momocs)
library(dplyr)
outpath <- paste0(getwd(), "/gmm/out")
Here, you have to change the outpath
to the path of your folder. Start the shape analysis:
lf <- list.files(outpath, full.names = TRUE)
coo <- import_jpg(lf)
beads <- Out(coo)
beads.f <- efourier(beads)
beads
is a "Out" "Coo"
Momocs' object and beads.f
is a "OutCoe" "Coe"
Momocs' object (Fourier). Now, show the beads in a panel:
beads %>%
panel()
Show them in a standardized stack:
beads %>%
coo_center %>%
coo_scale %>%
coo_slidedirection("up") %T>%
print() %>%
stack()
See their clustering
beads.p <- CLUST(beads.f)
plot(beads.p)
And show their Kmeans
beads.p <- PCA(beads.f)
KMEANS(beads.p, centers = 4)