as.mask(spatstat)
as.mask()所属R语言包:spatstat
Pixel Image Approximation of a Window
像素图像逼近的一个窗口
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Obtain a discrete (pixel image) approximation of a given window
给定的窗口获得一个近似的离散(像素的图片)
用法----------Usage----------
as.mask(w, eps=NULL, dimyx=NULL, xy=NULL)
参数----------Arguments----------
参数:w
A window (object of class "owin") or data acceptable to as.owin.
一个窗口(可以接受的"owin"类as.owin)或数据的对象。
参数:eps
(optional) width and height of pixels.
(可选)的像素的宽度和高度。
参数:dimyx
(optional) pixel array dimensions
(可选)像素阵列尺寸
参数:xy
(optional) pixel coordinates
(可选)像素坐标
Details
详细信息----------Details----------
This function generates a rectangular grid of locations in the plane, tests whether each of these locations lies inside the window w, and stores the results as a binary pixel image or "mask" (an object of class "owin", see owin.object).
这个函数生成一个矩形网格的平面中的位置,测试是否每个位置位于窗口内的w,并把结果存储为二进制像素的图像或“面具”(一个类的对象<X >,看到"owin")。
The most common use of this function is to approximate the shape of another window w by a binary pixel image. In this case, we will usually want to have a very fine grid of pixels.
使用此功能的最常见的是到另一个窗口的形状w的二进制像素的图像。在这种情况下,我们通常会希望有一个很细的像素网格。
This function can also be used to generate a coarsely-spaced grid of locations inside a window, for purposes such as subsampling and prediction.
此功能也可用于生成粗间隔的网格内的窗口的位置,如二次抽样和预测的目的。
The grid spacing and location are controlled by the arguments eps, dimyx and xy, which are mutually incompatible.
网格间距和位置控制的参数eps,dimyx和xy,这是互不兼容的。
If eps is given, then it determines the grid spacing. If eps is a single number, then the grid spacing will be approximately eps in both the x and y directions. If eps is a vector of length 2, then the grid spacing will be approximately eps[1] in the x direction and eps[2] in the y direction.
eps如果,然后它决定了网格间距。如果eps是单号,然后将网格间距约epsx和y方向。如果eps是一个向量,长度为2,然后将网格间距约eps[1]x的方向和eps[2]在y方向。
If dimyx is given, then the pixel grid will be an m x n rectangular grid where m, n are given by dimyx[2], dimyx[1] respectively. Warning: dimyx[1] is the number of pixels in the y direction, and dimyx[2] is the number in the x direction.
如果dimyx,然后在像素网格将是一个m x n矩形网格,其中m, ndimyx[2],dimyx[1]分别。警告:dimyx[1]是y方向中的像素数,和dimyx[2]是在x方向的数目。
If xy is given, then this should be a structure containing two elements x and y which are the vectors of x and y coordinates of the margins of the grid. The pixel coordinates will be generated from these two vectors. In this case w may be omitted.
xy如果,然后这应该是一个结构,它包含两个元素x和y是x和y坐标的边缘向量网格。将会产生这两个向量的像素坐标。在这种情况下w也可以省略。
If neither eps nor dimyx nor xy is given, the pixel raster dimensions are obtained from spatstat.options("npixel").
如果没有eps,也不dimyx,也不xy,像素栅格尺寸得到从spatstat.options("npixel")。
There is no inverse of this function. However, the function as.polygonal will compute a polygonal approximation of a binary mask.
有没有这个函数的逆。但是,该函数as.polygonal将计算的多边形近似的二进制掩码。
值----------Value----------
A window (object of class "owin") of type "mask" representing a binary pixel image.
一个窗口(对象类"owin")类型"mask"代表一个二进制像素的图像。
(作者)----------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----------
owin.object, as.rectangle, as.polygonal, spatstat.options
owin.object,as.rectangle,as.polygonal,spatstat.options
实例----------Examples----------
w <- owin(c(0,10),c(0,10), poly=list(x=c(1,2,3,2,1), y=c(2,3,4,6,7)))
## Not run: plot(w)[#未运行图(W)]
m <- as.mask(w)
## Not run: plot(m)[图(M)#不运行:]
x <- 1:9
y <- seq(0.25, 9.75, by=0.5)
m <- as.mask(w, xy=list(x=x, y=y))
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|