R / ImageJ:测量点和曲线之间的最短距离 [英] R/ImageJ: Measuring shortest distance between points and curves

查看:518
本文介绍了R / ImageJ:测量点和曲线之间的最短距离的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些R作为统计平台的经验,但对基于图像的数学缺乏经验。我有一系列照片(tiff格式,px /μm是已知的),带有孔和不规则曲线。我想测量一个孔与最接近的特定孔的曲线之间的最短距离。我想为照片中的每个洞做这个。这些洞也不规则,所以也许我需要告诉程序什么是洞和什么是曲线(ImageJ有一个点和分段线功能)。

任何想法如何做到这一点?我应该在R中使用哪个包?你会推荐另一个程序来完成这种任务吗?



解决方案

编辑:现在可以使用sclero软件包。该软件包目前在 GitHub 上提供,该过程在本教程。为了说明,我使用了一个来自教程的例子:

  library(devtools)
install_github(MikkoVihtakari / sclero ,dependencies = TRUE)
library(sclero)
path< - file.path(system.file(extdata,package =sclero),shellspots.zip)
dat< - read.ijdata(path,scale = 0.7812,unit =um)
shell < - convert.ijdata(dat)
aligned< - spot.dist(shell)
plot(aligned)



也可以使用sclero软件包提供的功能添加样本点大小。请参阅教程中的第2.5节。


I have some experience with R as a statistics platform, but am inexperienced in image based maths. I have a series of photographs (tiff format, px/µm is known) with holes and irregular curves. I'd like to measure the shortest distance between a hole and the closest curve for that particular hole. I'd like to do this for each hole in a photograph. The holes are not regular either, so maybe I'd need to tell the program what are holes and what are curves (ImageJ has a point and segmented line functions).

Any ideas how to do this? Which package should I use in R? Would you recommend another program for this kind of task?

解决方案

EDIT: Doing this is now possible using sclero package. The package is currently available on GitHub and the procedure is described in detail in the tutorial. Just to illustrate, I use an example from the tutorial:

library(devtools)
install_github("MikkoVihtakari/sclero", dependencies = TRUE)
library(sclero)
path <- file.path(system.file("extdata", package = "sclero"), "shellspots.zip")
dat <- read.ijdata(path, scale = 0.7812, unit = "um") 
shell <- convert.ijdata(dat)
aligned <- spot.dist(shell)
plot(aligned)

It is also possible to add sample spot sizes using the functions provided by the sclero package. Please see Section 2.5 in the tutorial.

这篇关于R / ImageJ:测量点和曲线之间的最短距离的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆