gcpt.2d(x, partition, taper = "poly2", n.taper=8, boundary="periodic") igcpt.2d(x)
igcpt.2d
only, an object of class
gcpt.2d
.
"boxcar", "poly1", "poly2", "poly3", "poly4", "poly5"
, or
"trig"
.
See the function
cp.table
for details.
2*n.taper
.
"cp.reflect", "periodic"
and
"zero"
.
See the function
cp.table
for details.
gcpt.2d
.
This algorithm is a generalized version of the Cosine Packet Transform (See
cpt
). Whereas in
cpt.2d
the only kinds of partitions that can be defined are
dyadic partitions (partitions corresponding to powers of 2), in this function
any kind of partition (not neccesarily dyadic) can be defined.
Only the Type IV DCT is supported for generalized Cosine Packet Transforms.
In case the partitions are dyadic, the resulting
transform will be identical to the Cosine Packet Transform.
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
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.
# compute the generalized cosine packet transform for a dyadic partition brain.gcpt <- gcpt.2d(brain.img, partition=c(256, 512, 768), n.taper=8) # the above transform is the same as obtained by the following cpt.2d function brain.cpt <- cpt.2d(brain.img, n.levels=2, n.taper=8, dct.type=4) # to reconstruct the image apply the igcpt.2d function recon <- igcpt.2d(brain.gcpt) # we can also compute the gcpt for a non-dyadic partition brain.gcpt <- gcpt(brain, partition=list(c(25, 47, 100, 717, 930),c(50,78,100)), n.taper=8)