bp.costs.2d(x, cost.fun="threshold", n.levels=NULL, taper="poly2", boundary="zero", n.taper=8, scale=NULL, thresh=NULL, p=2, prob=.5)
2^(n.levels[1])
and
column length must be divisible by
2^(n.levels[2])
, see below.
Should demean first.
"entropy"
,
"lp"
,
"threshold"
, and
"cpentropy"
.
See details below.
x
is divided into
2^(2*n.levels)
nrow(x)/2^n.levels
by
ncol(x)/2^n.levels
blocks. For
"best.basis"
,
n.levels
gives the blocking factor for the finest level.
If
n.levels
is bigger than
ml
, where
ml
is the maximum possible level,
computed from the
max.level
function, then
n.levels
is set to
ml
and
a warning message is given.
"boxcar", "poly1", "poly2", "poly3", "poly4", "poly5"
, or
"trig"
.
See the function
bp.table
for details.
"reflect", "periodic"
and
"zero"
.
See the function
bp.table
for details.
2*n.taper
.
By default,
n.taper
is set to the minimum of 8 or
length(x)/2^(n.level+1)
,
which is the maximum possible length at the finest blocking level.
"entropy"
and
"cpentropy"
.
The default is
vecnorm(bpt.2d(x))
. See below for details.
(0,2]
giving the degree of the
lp-norm when
cost.fun
is
"lp"
.
See below for details.
cost.fun
is
"threshold"
or
"sure"
.
By default,
thresh
is the
prob
th percentile of the
absolute value of the brushlet coefficients.
See below for details.
0
and
1
which is used to
compute the threshold
thresh
for when
cost.fun
is
"threshold"
.
See the
thresh
argument.
pcosts.2d
.
A packet cost object can be used with
the
best.basis
function to select optimal brushlet packet
transforms for images.
Available cost functionals:
lp
n.levels, taper, boundary
can be reset using function
wavelet.options
, see
wavelet.options
for details.
Wickerhauser, M. V. (1994). Adapted Wavelet Analysis from Theory to Software. A. K. Peters Ltd, Wellesley, MA.
Meyer, F.G. and Coifman, R.R. (1997), Brushlets: A tool for directional image analysis and image compression Applied and Computational Harmonic Analysis, Academic Press Publishers.
phone <- phone-mean(phone) ccost <- bp.costs.2d(phone, taper="poly2", n.levels=3) bb2 <- best.basis.2d(ccost, phone) bb2 plot(bb2)