Compute 2D Brushlet Packet Costs

DESCRIPTION:

Computes 2D brushlet packet costs. This function is defunct.

USAGE:

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) 

REQUIRED ARGUMENTS:

x
an image. Row length must be divisible by 2^(n.levels[1]) and column length must be divisible by 2^(n.levels[2]), see below. Should demean first.

OPTIONAL ARGUMENTS:

cost.fun
character string indicating which cost functional to use: "entropy", "lp", "threshold", and "cpentropy". See details below.
n.levels
a non-negative integer specifying the blocking factor: 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.
taper
a character string, indicating the taper function: "boxcar", "poly1", "poly2", "poly3", "poly4", "poly5", or "trig". See the function bp.table for details.
boundary
a character string, available boundary rules: "reflect", "periodic" and "zero". See the function bp.table for details.
n.taper
a non-negative integer. The length of the taper will be 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.
scale
scaling factor for "entropy" and "cpentropy". The default is vecnorm(bpt.2d(x)). See below for details.
p
a number in the interval (0,2] giving the degree of the lp-norm when cost.fun is "lp". See below for details.
thresh
a non-negative number giving the threshold when cost.fun is "threshold" or "sure". By default, thresh is the probth percentile of the absolute value of the brushlet coefficients. See below for details.
prob
a number between 0 and 1 which is used to compute the threshold thresh for when cost.fun is "threshold". See the thresh argument.

VALUE:

a 2-D packet cost object with class pcosts.2d. A packet cost object can be used with the best.basis function to select optimal brushlet packet transforms for images.

DETAILS:

Available cost functionals:



entropy


lp

threshold



cpentropy

The algorithms for the taper functions are given in the S+WAVELETS User's Manual, in the section "Cosine Packet Algorithms". They are discussed in greater depth in Wickerhauser (1994). The default optional arguments n.levels, taper, boundary can be reset using function wavelet.options, see wavelet.options for details.

REFERENCES:

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.

SEE ALSO:

, , , , , .

EXAMPLES:

phone <- phone-mean(phone) 
ccost <- bp.costs.2d(phone, taper="poly2", n.levels=3) 
bb2 <- best.basis.2d(ccost, phone) 
bb2 
plot(bb2)