distmap.psp(spatstat)
distmap.psp()所属R语言包:spatstat
Distance Map of Line Segment Pattern
距离图线段模式
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Computes the distance from each pixel to the nearest line segment in the given line segment pattern.
计算从每个像素的距离最近的线段,在给定的线段图案。
用法----------Usage----------
## S3 method for class 'psp'
distmap(X, ...)
----------Arguments----------
参数:X
A line segment pattern (object of class "psp").
一个线段模式(类的对象"psp")。
参数:...
Arguments passed to as.mask to control pixel resolution.
参数传递给as.mask控制像素的分辨率。
Details
详细信息----------Details----------
The “distance map” of a line segment pattern X is the function f whose value f(u) is defined for any two-dimensional location u as the shortest distance from u to X.
的“距离图”的线段图案X的功能是f其值f(u)被定义为任何二维位置u的最短距离从 u到X。
This function computes the distance map of the line segment pattern X and returns the distance map as a pixel image. The greyscale value at a pixel u equals the distance from u to the nearest line segment of the pattern X. Distances are computed using analytic geometry.
该函数计算线段图案X的距离的图,并返回作为一个像素的图像的距离图。灰度值像素u的格局u到最近的线段的距离等于从X。距离指的是用解析几何计算。
Additionally, the return value has two attributes, "index" and "bdry", which are also pixel images. The grey values in "bdry" give the distance from each pixel to the bounding rectangle of the image. The grey values in "index" are integers identifying which line segment of X is closest.
此外,返回值有两个属性,"index"和"bdry",这也是像素的图像。的灰度值"bdry"给的边界矩形的图像每个像素的距离。 "index"的灰度值是确定线段的X最接近的整数。
This is a method for the generic function distmap.
这是一个方法的通用函数distmap。
Note that this function gives the exact distance from the centre of each pixel to the nearest line segment. To compute the exact distance from the points in a point pattern to the nearest line segment, use distfun or one of the low-level functions nncross or project2segment.
注意,该函数给出的精确距离,从每个像素的中心到最近的线段。为了计算的准确的点图案中的点到最近的线段的距离,可使用distfun或低级别的功能之一nncross或project2segment。
值----------Value----------
A pixel image (object of class "im") whose greyscale values are the values of the distance map. The return value has attributes "index" and "bdry" which are also pixel images.
像素的图像(类的对象"im"),其灰度值是距离映射的值。返回值的属性"index"和"bdry"像素的图像。
(作者)----------Author(s)----------
Adrian Baddeley
<a href="mailto:Adrian.Baddeley@csiro.au">Adrian.Baddeley@csiro.au</a>
<a href="http://www.maths.uwa.edu.au/~adrian/">http://www.maths.uwa.edu.au/~adrian/</a>
and Rolf Turner
<a href="mailto:r.turner@auckland.ac.nz">r.turner@auckland.ac.nz</a>
参见----------See Also----------
distmap, distmap.owin, distmap.ppp, distfun, nncross, nearestsegment, project2segment.
distmap,distmap.owin,distmap.ppp,distfun,nncross,nearestsegment,project2segment。
实例----------Examples----------
a <- psp(runif(20),runif(20),runif(20),runif(20), window=owin())
Z <- distmap(a)
plot(Z)
plot(a, add=TRUE)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|