eval.im(spatstat)
eval.im()所属R语言包:spatstat
Evaluate Expression Involving Pixel Images
计算表达式涉及像素的图像,
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Evaluates any expression involving one or more pixel images, and returns a pixel image.
计算任何表达式涉及一个或多个像素的图像,并返回一个像素的图像。
用法----------Usage----------
eval.im(expr, envir, harmonize=TRUE)
参数----------Arguments----------
参数:expr
An expression.
一个表达式。
参数:envir
Optional. The environment in which to evaluate the expression.
可选。的环境中,计算表达式的。
参数:harmonize
Logical. Whether to resolve inconsistencies between the pixel grids.
逻辑。无论是要解决的像素网格之间的不一致。
Details
详细信息----------Details----------
This function is a wrapper to make it easier to perform pixel-by-pixel calculations in an image.
这个函数是一个包装器,使其更容易执行图像中的像素由像素计算。
Pixel images in spatstat are represented by objects of class "im" (see im.object). These are essentially matrices of pixel values, with extra attributes recording the pixel dimensions, etc.
像素的图像,在spatstat为代表的类的对象"im"(见im.object)。这些本质上的象素值的矩阵,用额外的属性记录的像素尺寸,等
Suppose X is a pixel image. Then eval.im(X+3) will add 3 to the value of every pixel in X, and return the resulting pixel image.
假设X是一个像素的图像。 eval.im(X+3)加3中的每个像素值X,并返回得到的像素的图像。
Suppose X and Y are two pixel images with compatible dimensions: they have the same number of pixels, the same physical size of pixels, and the same bounding box. Then eval.im(X + Y) will add the corresponding pixel values in X and Y, and return the resulting pixel image.
假设X和Y与兼容的尺寸的两个像素的图像:它们具有相同数量的像素,像素的相同的物理尺寸,和相同的边界框。 eval.im(X + Y)会增加相应的像素值在X和Y,并返回得到的像素的图像。
In general, expr can be any expression in the R language involving (a) the names of pixel images, (b) scalar constants, and (c) functions which are vectorised. See the Examples.
在一般情况下,expr可以是任何表达式中的R语言涉及(a)该名称的像素的图像,(二)的标量常数,和(c)的功能是向量化。请参阅范例。
First eval.im determines which of the variable names in the expression expr refer to pixel images. Each such name is replaced by a matrix containing the pixel values. The expression is then evaluated. The result should be a matrix; it is taken as the matrix of pixel values.
第一个eval.im的变量名中的表达expr像素的图像。每一个这样的名称是由一个矩阵包含的象素值替换。然后评价该表达式。的结果应该是一个矩阵,它被当作的象素值的矩阵。
The expression expr must be vectorised. There must be at least one pixel image in the expression.
必须向量化的表达expr。必须有在表达式中的至少一个像素的图像。
All images must have compatible dimensions. If harmonize=TRUE, images that have incompatible dimensions will be resampled so that they are compatible. If harmonize=FALSE, images that are incompatible will cause an error.
所有的图像都必须有兼容的尺寸。如果harmonize=TRUE,有不兼容的尺寸的图像将被重采样,所以它们是兼容的。如果harmonize=FALSE的,不兼容的图像将导致一个错误。
值----------Value----------
An image object of class "im".
图像对象的类"im"。
(作者)----------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----------
as.im, compatible.im, harmonise.im, im.object
as.im,compatible.im,harmonise.im,im.object
实例----------Examples----------
# test images[测试图像]
X <- as.im(function(x,y) { x^2 - y^2 }, unit.square())
Y <- as.im(function(x,y) { 3 * x + y }, unit.square())
eval.im(X + 3)
eval.im(X - Y)
eval.im(abs(X - Y))
Z <- eval.im(sin(X * pi) + Y)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|