integral.im(spatstat)
integral.im()所属R语言包:spatstat
Integral of a Pixel Image
像素图像的积分
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Computes the integral of a pixel image.
计算的积分的像素图像。
用法----------Usage----------
integral.im(x, ...)
参数----------Arguments----------
参数:x
A pixel image (object of class "im") with pixel values that can be treated as numeric or complex values.
像素的图像(类的对象"im")的像素值,可以被视为数字或复杂的值。
参数:...
Ignored.
忽略。
Details
详细信息----------Details----------
This function treats the pixel image x as a function of the spatial coordinates, and computes its integral. The integral is calculated by summing the pixel values and multiplying by the area of one pixel.
此函数将像素的图像x作为的函数的空间坐标,并计算它的积分。该积分的计算,通过求和的像素值,并乘以的一个像素的区域。
The pixel values of x may be numeric, integer, logical or complex. They cannot be factor or character values.
x的像素值可以是数字,整数,逻辑或复杂。他们不能因素或字符值。
The logical values TRUE and FALSE are converted to 1 and 0 respectively, so that the integral of a logical image is the total area of the TRUE pixels, in the same units as unitname(x).
的逻辑值TRUE和FALSE被转换为1和0分别使用逻辑性图像的积分是总面积的TRUE像素,相同单位unitname(x)。
For more complicated integration tasks such as computing the integral of an image over a specified subset, use eval.im to construct an integrand or [.im to extract a subset of the image.
对于更复杂的集成任务,如计算积分图像的指定子集,可使用eval.im构造的被积函数或[.im中提取的图像的一个子集。
值----------Value----------
A single numeric or complex value.
单独的数字或复杂的价值。
(作者)----------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----------
eval.im, [.im
eval.im,[.im
实例----------Examples----------
# approximate integral of f(x,y) dx dy[近似积分F(X,Y)DX DY]
f <- function(x,y){3*x^2 + 2*y}
Z <- as.im(f, square(1))
integral.im(Z)
# correct answer is 2[正确答案是2]
data(cells)
D <- density(cells)
integral.im(D)
# should be approximately equal to number of points = 42[应大致相等的点的数量= 42]
# integrate over the subset [0.1,0.9] x [0.2,0.8][集成在子集[0.1,0.9]×[0.2,0.8]]
W <- owin(c(0.1,0.9), c(0.2,0.8))
DW <- D[W, drop=FALSE]
integral.im(DW)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|