blur(spatstat)
blur()所属R语言包:spatstat
Apply Gaussian Blur to a Pixel Image
应用高斯模糊像素图像
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Applies a Gaussian blur to a pixel image.
应用高斯模糊像素的图像。
用法----------Usage----------
blur(x, sigma = NULL, ..., normalise=FALSE, bleed = TRUE, varcov=NULL)
参数----------Arguments----------
参数:x
The pixel image. An object of class "im".
像素的图像。对象的类"im"。
参数:sigma
Standard deviation of isotropic Gaussian smoothing kernel.
各向同性的高斯平滑内核的标准偏差。
参数:...
Ignored.
忽略。
参数:normalise
Logical flag indicating whether the output values should be divided by the corresponding blurred image of the window itself. See Details.
逻辑标志指示是否应除以相应的模糊图像的窗口本身的输出值。查看详细信息。
参数:bleed
Logical flag indicating whether to allow blur to extend outside the original domain of the image. See Details.
逻辑标志,指示是否允许超出的原始域的图像模糊。查看详细信息。
参数:varcov
Variance-covariance matrix of anisotropic Gaussian kernel. Incompatible with sigma.
方差 - 协方差矩阵的各向异性高斯内核。不相容的sigma。
Details
详细信息----------Details----------
This command applies a Gaussian blur to the pixel image x.
此命令适用于高斯模糊的像素的图像x。
The blurring kernel is the isotropic Gaussian kernel with standard deviation sigma, or the anisotropic Gaussian kernel with variance-covariance matrix varcov. The arguments sigma and varcov are incompatible. Also sigma may be a vector of length 2 giving the standard deviations of two independent Gaussian coordinates, thus equivalent to varcov = diag(sigma^2).
模糊的内核是各向同性的的高斯内核与标准差sigma,或各向异性高斯核与方差 - 协方差矩阵varcov。的参数sigma和varcov是不兼容的。另外sigma可以是长度为2的矢量给出的标准偏差的两个独立的高斯坐标,从而相当于varcov = diag(sigma^2)。
If the pixel values of x include some NA values (meaning that the image domain does not completely fill the rectangular frame) then these NA values are first reset to zero.
如果像素值x包括一些NA的值(这意味着图像域不完全填充的矩形框),然后这些NA值首先被复位到零。
The algorithm then computes the convolution x * G of the (zero-padded) pixel image x with the specified Gaussian kernel G.
然后,该算法计算卷积x * G(零填充)像素的图像x指定的高斯核G。
If normalise=FALSE, then this convolution x * G is returned. If normalise=TRUE, then the convolution x * G is normalised by dividing it by the convolution w * G of the image domain w with the same Gaussian kernel. Normalisation ensures that the result can be interpreted as a weighted average of input pixel values, without edge effects due to the shape of the domain.
如果normalise=FALSE,然后是卷积x * G返回。如果normalise=TRUE,然后卷积x * G被归除以由卷积w * G的图像域w相同的高斯核。标准化确保输入的像素值的加权平均的结果可以解释为,由于该域的形状无边缘效应。
If bleed=FALSE, then pixel values outside the original image domain are set to NA. Thus the output is a pixel image with the same domain as the input. If bleed=TRUE, then no such alteration is performed, and the result is a pixel image defined everywhere in the rectangular frame containing the input image.
如果bleed=FALSE,那么像素值超出了原来的图像域被设置为NA。因此,具有相同的域作为输入,输出的是一个像素的图像。如果bleed=TRUE,则没有这样的改变被执行,并且结果是无处不含有所述输入图像中的矩形框定义的像素图像。
Computation is performed using the Fast Fourier Transform.
使用快速傅立叶变换进行计算。
值----------Value----------
A pixel image with the same pixel array as the input image x.
一个像素的图像作为输入图像x具有相同的像素阵列。
(作者)----------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----------
interp.im for interpolating a pixel image to a finer resolution, density.ppp for blurring a point pattern, smooth.ppp for interpolating marks attached to points.
interp.im插值像素的图像更精细的分辨率,density.ppp模糊的点模式,smooth.ppp插连接点的标记。
实例----------Examples----------
data(letterR)
Z <- as.im(function(x,y) { 4 * x^2 + 3 * y }, letterR)
par(mfrow=c(1,3))
plot(Z)
plot(letterR, add=TRUE)
plot(blur(Z, 0.3, bleed=TRUE))
plot(letterR, add=TRUE)
plot(blur(Z, 0.3, bleed=FALSE))
plot(letterR, add=TRUE)
par(mfrow=c(1,1))
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|