dfourier_i {Momocs} | R Documentation |
Investe discrete cosinus transform
Description
Calculates inverse discrete cosine transforms (see dfourier), given a list of A and B harmonic coefficients, typically such as those produced by dfourier.
Usage
dfourier_i(df, nb.h, nb.pts = 60)
Arguments
df |
a list with |
nb.h |
a custom number of harmonics to use |
nb.pts |
numeric the number of pts for the shape reconstruction |
Value
a matrix of (x; y) coordinates
Note
Only the core functions so far. Will be implemented as an Opn method soon.
References
Dommergues, C. H., Dommergues, J.-L., & Verrecchia, E. P. (2007). The Discrete Cosine Transform, a Fourier-related Method for Morphometric Analysis of Open Contours. Mathematical Geology, 39(8), 749-763. doi:10.1007/s11004-007-9124-6
Many thanks to Remi Laffont for the translation in R).
See Also
Other dfourier:
dfourier_shape()
,
dfourier()
Examples
# dfourier and inverse dfourier
o <- olea[1]
o <- coo_bookstein(o)
coo_plot(o)
o.dfourier <- dfourier(o, nb.h=12)
o.dfourier
o.i <- dfourier_i(o.dfourier)
o.i <- coo_bookstein(o.i)
coo_draw(o.i, border='red')
o <- olea[1]
h.range <- 2:13
coo <- list()
for (i in seq(along=h.range)){
coo[[i]] <- dfourier_i(dfourier(o, nb.h=h.range[i]))}
names(coo) <- paste0('h', h.range)
panel(Opn(coo), borders=col_india(12), names=TRUE)
title('Discrete Cosine Transforms')