efourier computes Elliptical Fourier Analysis (or Transforms or EFT)
from a matrix (or a list) of (x; y) coordinates.efourier(x, ...)# S3 method for default
efourier(x, nb.h, smooth.it = 0, verbose = TRUE, ...)
# S3 method for Out
efourier(x, nb.h, smooth.it = 0, norm = TRUE, start = FALSE,
verbose = TRUE, ...)
list or a matrix of coordinates or a Out objectinteger. The number of harmonics to use. If missing, 12 is used on shapes;
99 percent of harmonic power on Out objects, both with messages.integer. The number of smoothing iterations to
perform.logical. Whether to print or not diagnosis messages.vector of
\(a_{1->n}\) harmonic coefficients.vector of
\(b_{1->n}\) harmonic coefficients.vector of
\(c_{1->n}\) harmonic coefficients.vector of
\(d_{1->n}\) harmonic coefficients.ao Harmonic
coefficient.co Harmonic coefficient.efourier. But here is the pitfall: if your shapes are prone to bad aligments among all
the first ellipses, this will result in poorly (or even not at all) "homologous" coefficients.
The shapes prone to this are either (at least roughly) circular and/or with a strong
bilateral symmetry. You can try to use stack on the Coe object
returned by efourier. Also, when plotting PCA using Momocs,
this will be strikingly clear though. This phenomenon will result in two clusters,
and more strikingly into upside-down (or 180 degrees rotated)
shapes on the morphospace. If this happen, you should seriously consider
aligning your shapes before the efourier step,
and performing the latter with no normalization (norm = FALSE), since
it has been done before. You have several options to align your shapes, using control points (or landmarks),
of Procrustes alignment (see fgProcrustes) through their calliper
length (see coo_aligncalliper), etc. You should also make the first
point homologous either with coo_slide or coo_slidedirection
to minimize any subsequent problems. I will dedicate (some day) a vignette or a paper to this problem.efourier_i,
efourier_norm, efourier_shapedata(bot)
coo <- bot[1]
coo_plot(coo)
ef <- efourier(coo, 12)
ef
efi <- efourier_i(ef)
coo_draw(efi, border='red', col=NA)
Run the code above in your browser using DataLab