Description Usage Arguments Details Value Author(s) References See Also Examples
Multi-dimensional smoothing function.
1 |
grids |
A list of monotonically increasing coordinate grids. For
example,
|
img |
An m-dim array defined on |
sm.method |
Smoothing method. Valid choices: 1. |
... |
Other options passed to different smoothers such as
|
This function is a wrapper of different smoothing methods. The
default method, "ksmooth", is a multi-dimensional generalization of
ksmooth()
. The second method, "anisodiff", implements an
anisotropic smoother based on Perona-Malik equation. Care must be
taken on the boundary points because currently there is no mechanism
to take care of them automatically. I may add some code to deal
with the boundary points more gracefully in a future release. Another
method, "tps", is the thin plate spline smoother, depends on package
fields. This function is too slow for very large scale data, it
is included primarily as an example.
An array of the same dimension as img
.
Xing Qiu
[kernel smoothing, multi-dim]
1 2 3 4 5 6 7 8 | grid.x <- seq(1, 255, 2); grid.y <- seq(1, 255, 2); grid.z <- seq(1,5,2)
grids <- list(grid.x, grid.y, grid.z)
Y <- array(rnorm(128*128*3), c(128,128,3))
myfit1 <- Smooth(grids, Y, bandwidth=5.0, kernel="normal")
myfit2 <- Smooth(grids, Y, bandwidth=5.0, kernel="box")
myfit3 <- Smooth(grids, Y, kappa.param=0.2, sm.method="anisodiff")
## The following command depends on package fields.
## Not run: myfit3 <- Smooth(grids, Y, bandwidth=5.0, sm.method="tps")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.