return FALSE; $r = well_tag_thread__update(array('id' => $id), $update); return $r; } function well_tag_thread_find($tagid, $page, $pagesize) { $arr = well_tag_thread__find(array('tagid' => $tagid), array('id' => -1), $page, $pagesize); return $arr; } function well_tag_thread_find_by_tid($tid, $page, $pagesize) { $arr = well_tag_thread__find(array('tid' => $tid), array(), $page, $pagesize); return $arr; } ?>r - PCA of tool outlines - Stack Overflow
最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

r - PCA of tool outlines - Stack Overflow

programmeradmin5浏览0评论

I want to do a PCA of around 200 stone axes (In my trial I only used 2 axes to see if and how everything works). Another archaeologist suggested that I should use Momocs in RStudio. So I took pictures of my stone tools, and using Inkscape I digitalized the outlines. I then exported those as (black stone axes and white background, but I also have a version where I only have the outlines in black & the filling and the background are withe) JPG files.

I then wanted to do the PCA on RStudio with Momocs loaded, but I am not able to get it to work. Once I import the JPG. Files and try align, center, and scale my axes I get this message:

Error in coo_check.default(coo) : do not know how to turn into a coo

I also tried to do a Fourier analysis and a PCA without scaling, centering, and aligning, that also did not work either, I got this message after I executed the PCA command:

Error in colMeans(x, na.rm = TRUE) : 'x' must be numeric

Here are my two jpgs.

  • One of the axes, black on white background
  • Another axe

I know the pixel resolution on the two axes is completely different, one is much higher than the other, but it was just for a test, so I didn't bother adjusting them.

I imported my jpgs, and wanted to center, scale, and align my data before performing a PCA.

library(Momocs)
folder_path <- "~/Desktop/Test Umrisse"
image_files <- list.files(folder_path, pattern = "\\.jpg$", full.names = TRUE)
stone_axes <- import_jpg(image_files)
coo_center(stone_axes)

I expected that the two outlines would get centered, then I would scale and align them, do the fourier analysis and the PCA.

发布评论

评论列表(0)

  1. 暂无评论