meptransf2d {EPT} | R Documentation |
Multiscale Two-dimensional Ensemble Patch Transforms of an Image
Description
This function performs multiscale two-dimensional ensemble patch transforms of an image for a sequence of size parameters.
Usage
meptransf2d(x = NULL, y = NULL, z, type = "rectangle", taus, theta = 0,
process = c("average", "average"), pquantile = c(0, 1), equantile = c(0, 1),
gamma = 1, boundary = "reflexive")
Arguments
x , y |
locations of regular grid at which the values in image |
z |
matrix of an image observed at location |
type |
patch type of |
taus |
a matrix or vector of size parameters for two-dimensional ensemble patch transform. When it is a matrix, the first and second columns specify the horizontal and vertical sizes of a two-dimensional patch, respectively. When it is a vector, the horizontal and vertical size of a two-dimensional patch are the same. |
theta |
a degree of clockwise rotation of a patch. |
process |
specifies transform types for patch and ensemble processes:
|
pquantile |
quantiles for lower and upper envelopes of patch transform. When it is |
equantile |
quantiles for lower and upper envelopes of ensemble patch transform. |
gamma |
controls the amount of envelope magnitude. |
boundary |
specifies boundary condition from |
Details
This function performs multiscale two-dimensional ensemble patch transforms of an image for a sequence of size parameters taus
, and
produces statistics and envelopes for two-dimensional ensemble patch transform.
When process[1]
is "average"
or "median"
, outputs related to envelopes are defined as NULL
.
When process[2]
is "envelope"
, outputs, pstat
and Epstat
, are defined as NULL
.
Value
x , y |
locations of regular grid at which the values in |
z |
matrix of an image observed at |
pstat |
list of centrality of patch transform for a sequence of size parameters |
Epstat |
list of centrality of ensemble patch transform for a sequence of size parameters |
psd |
list of standard deviation of patch transform for a sequence of size parameters |
Epsd |
list of standard deviation of ensemble patch transform for a sequence of size parameters |
pL |
list of lower envelope of patch transform for a sequence of size parameters |
pU |
list of upper envelope of patch transform for a sequence of size parameters |
pM |
list of mean envelope, |
pR |
list of distance between lower and upper envelopes, |
EpL |
list of lower envelope of ensemble patch transform for a sequence of size parameters |
EpU |
list of upper envelope of ensemble patch transform for a sequence of size parameters |
EpM |
list of mean envelope, |
EpR |
list of distance between lower and upper envelopes, |
rho |
vector of correlations between |
parameters |
a list of input parameters of |
nlevel |
the number of size parameters |
See Also
Examples
#### example : composite of two components having different frequencies
nr <- nc <- 128; x <- seq(0, 1, length=nr); y <- seq(0, 1, length=nc)
coscomp1 <- outer(cos(20 * pi * x), cos(20 * pi * y))
coscomp2 <- outer(cos(5* pi * x), cos(5 * pi * y))
cosmeanf <- coscomp1 + coscomp2
op <- par(mfcol=c(3,1), mar=c(0,0.5,2,0.5))
image(cosmeanf, xlab="", ylab="", col=gray(0:100/100), axes=FALSE, main="a composite image")
image(coscomp1, xlab="", ylab="", col=gray(0:100/100), axes=FALSE, main="high-frequency component")
image(coscomp2, xlab="", ylab="", col=gray(0:100/100), axes=FALSE, main="low-frequency component")
#### Multiscale Ensemble Patch Transform according to tau's
taus1 <- seq(6, 12, by=2)
outcosmulti <- meptransf2d(z=cosmeanf, taus=taus1)
par(mfrow=c(length(taus1), 2), mar=c(2,2,2,1))
for (i in 1:length(taus1)) {
estlowfreq <- outcosmulti$Epstat[[i]]
image(estlowfreq, xlab="", ylab="", col=gray(0:100/100), axes=FALSE,
main=paste0("ensemble average of patch mean, tau=", taus1[i]))
persp(estlowfreq, theta = -30, phi = 45, col = "white", xlab="X", ylab="Y",
main=paste0("ensemble average of patch mean, tau=", taus1[i]))
}
par(op)