centdist(SpatialVx)
centdist()所属R语言包:SpatialVx
Find the centroid distance between two owin objects
查找两个owin对象的重心之间的距离
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Find the centroid distance between two owin objects.
查找两个owin对象的质心之间的距离。
用法----------Usage----------
centdist(x, y)
参数----------Arguments----------
参数:x,y
objects of class "owin" (package spatstat) containing binary images of features of interest.
对象的类的“owin”(包spatstat)中的二进制图像功能的兴趣。
Details
详细信息----------Details----------
This is a simple wrapper function that calls centroid.owin from package spatstat for each of x and y (to get their centroids), and then finds the (Euclidean) distance between them. If (xc1, xc2) is the centroid position for x, and (yc1, yc2) is the centroid position for y, then sqrt((xc1 - yc1)^2 + (xc2 - yc2)^2) is returned.
这是一个简单的包装函数调用centroid.owin的从包spatstat的每个x和y(以获得它们的质心),然后发现它们之间的距离(欧几里德)。如果(XC1,XC2)的重心位置为x,(YC1,YC2)的重心位置为y,则返回的sqrt((XC1 - YC1)^ 2 +(XC2 - YC2)^ 2)。
值----------Value----------
numeric giving the centroid (Euclidean) distance.
数字心(欧几里德)距离。
(作者)----------Author(s)----------
Eric Gilleland
参见----------See Also----------
centroid.owin, as.im, solutionset, FeatureMatchAnalyzer, FeatureComps
centroid.owin,as.im,solutionset,FeatureMatchAnalyzer,FeatureComps
实例----------Examples----------
x <- y <- matrix(0, 10, 12)
x[2:3,c(3:6, 8:10)] <- 1
y[c(4:7, 9:10),c(7:9, 11:12)] <- 1
x <- as.im(x)
x <- solutionset(x>0)
y <- as.im(y)
y <- solutionset(y>0)
centdist(x,y)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|