interp.im(spatstat)
interp.im()所属R语言包:spatstat
Interpolate a Pixel Image
插值像素图像
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Interpolates the values of a pixel image at any desired location in the frame.
内插的值的像素的图像,在该帧在任何所需的位置。
用法----------Usage----------
interp.im(Z, x, y)
参数----------Arguments----------
参数:Z
Pixel image (object of class "im") with numeric or integer values.
像素的图像(对象类"im")与数字或整数值。
参数:x,y
Vectors of Cartesian coordinates.
向量的直角坐标系。
Details
详细信息----------Details----------
A value at each location (x[i],y[i]) will be interpolated using the pixel values of Z at the four surrounding pixel centres, by simple bilinear interpolation.
A值在每个位置(x[i],y[i])将被内插使用Z在周围的四个像素的中心,通过简单的双线性内插的像素值的。
At the boundary (where (x[i],y[i]) is not surrounded by four pixel centres) the value at the nearest pixel is taken.
在边界(如(x[i],y[i])周围没有4个像素中心)在最近的像素值。
值----------Value----------
Vector of interpolated values, with NA for points that lie outside the domain of the image.
矢量插值,NA点位于外域的图像。
(作者)----------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>
实例----------Examples----------
opa <- par(mfrow=c(1,2))
# coarse image[粗图像]
V <- as.im(function(x,y) { x^2 + y }, owin(), dimyx=10)
plot(V, main="coarse image", col=terrain.colors(256))
# lookup value at location (0.5,0.5)[查找位置值(0.5,0.5)]
V[list(x=0.5,y=0.5)]
# interpolated value at location (0.5,0.5)[插补值的位置(0.5,0.5)]
interp.im(V, 0.5, 0.5)
# true value is 0.75[真正的价值是0.75]
# how to obtain an interpolated image at a desired resolution[如何获得在所希望的分辨率的内插图像]
U <- as.im(interp.im, W=owin(), Z=V, dimyx=256)
plot(U, main="interpolated image", col=terrain.colors(256))
par(opa)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|