2D Brushlet Packet Transform

DESCRIPTION:

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

USAGE:

bpt.2d(x, crystal.names=NULL, basis="block.bpt.2d", partition = NULL, 
       cost.fun="threshold",                                   
       n.levels=6, taper="poly2", boundary="zero", 
       n.taper=8, scale=NULL, thresh=NULL, p=1, prob=.75)        
ibpt.2d(x) 

REQUIRED ARGUMENTS:

x
for bpt.2d, an image or matrix. Row length must be divisible by 2^(n.levels) and column length must be divisible by 2^(n.levels). If mean(x) != 0, should de-mean first (see below). For ibpt.2d, an object of bpt.2d.

OPTIONAL ARGUMENTS:

crystal.names
a character vector of crystal names of the form "bj.h-bj.v". where j is an integer giving the level and h is an integer from 0 to 2^j-1 giving the horizontal block number and v is an integer from 0 to 2^j-1 giving the vertical block number. If crystal.names is supplied, then basis is ignored.
basis
a character string specifying how the cosine packet basis is selected: "best.basis", "block.bpt.2d" or "gbpt.2d". See the respective help files for details.
partition
a list or a vector specifying the desired partitioning of the data if the "gbpt.2d" basis is used. See the help for function "gbpt.2d" for details on how to specify the partition.
cost.fun
character string indicating which cost functional to use: "entropy", "threshold", "sure", and " lp" are available. Only used for "best.basis". See bp.costs.2d for details.
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. When both crystal.names and basis are missing, 2D subband basis of n.levels is computed. 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 smaller of 8 or length(x)/2^(n.level+1), which is the maximum possible length at the finest blocking level.
scale
scaling factor for computing the costs. The default depends on cost.fun. See the function bp.costs.2d for details.
p
a number in the interval (0,2] giving the degree of the lpnorm when cost.fun is "lp". See the function bp.costs.2d for details.
thresh
a non-negative number giving the threshold for when cost.fun is "threshold" or "sure". See the function bp.costs.2d for details.
prob
a number in the interval (0,1) used to compute the threshold for when cost.fun is "threshold". See the function bp.costs.2d for details.

VALUE:

bpt.2d returns an object of class bpt.2d, inheriting from the class crystal.matrix. The object is a matrix of the same size as x with crystal names as an attribute.

ibpt.2d returns an image if x is an object of class bpt.2d.

DETAILS:

The default optional arguments n.levels, taper, boundary can be reset using function wavelet.options, see wavelet.options for details. 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).

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:

, , , , , and .

EXAMPLES:

xx <- brain-mean(brain) 
par(mfrow=c(1,2)) 
image(xx) 
bpt.xx <- bpt.2d(xx, basis="best.basis") 
plot(bpt.xx)