Last chance! 50% off unlimited learning
Sale ends in
Compute the average pixel value over all rotations of the image about the origin, as a function of distance from the origin.
rotmean(X, ..., origin, padzero=TRUE, Xname, result=c("fv", "im"), adjust=1)
An object of class "fv"
or "im"
,
with the same coordinate units as X
.
A pixel image.
Ignored.
Optional. Origin about which the rotations should be performed.
Either a numeric vector or a character string as described
in the help for shift.owin
.
Logical. If TRUE
(the default), the value of X
is assumed to be zero outside the window of X
.
If FALSE
, the value of X
is taken to be undefined
outside the window of X
.
Optional name for X
to be used in the
function labels.
Character string specifying the kind of result required: either a function object or a pixel image.
Adjustment factor for bandwidth used in kernel smoothing.
Adrian Baddeley Adrian.Baddeley@curtin.edu.au, Rolf Turner r.turner@auckland.ac.nz and Ege Rubak rubak@math.aau.dk.
This command computes, for each possible distance
If result="fv"
(the default) the result is a function
object of class "fv"
giving the mean pixel value of X
as a function of distance from the origin.
If result="im"
the result is a pixel image, with the same
dimensions as X
, giving the mean value of X
over all pixels lying at the same distance from the origin
as the current pixel.
If padzero=TRUE
(the default), the value of X
is assumed to be zero outside the window of X
. The rotational
mean at a given distance X
over the entire circle of radius
If padzero=FALSE
, the value of X
is taken to be
undefined outside the window of X
. The rotational mean
is the average of the X
values over the subset of the circle
of radius
radcumint
online <- interactive()
resolution <- if(online) 128 else 32
Z <- setcov(square(1), dimyx=resolution)
f <- rotmean(Z)
if(online) {
plot(rotmean(Z))
plot(rotmean(Z, result="im"))
}
Run the code above in your browser using DataLab