View source: R/utils_efourier.R
efourier_norm | R Documentation |
The first harmonic defines an ellipse that best fits the outlines. One can
use the parameters of the first harmonic to “normalize” the data so that they
can be invariant to size, rotation, and starting position of the outline
trace. This approach is referred to in the literature as the normalized
elliptic Fourier. efourier_norm()
calculates a new set of Fourier
coefficients An
, Bn
, Cn
, Dn
that one can use for further multivariate
analyses (Claude, 2008).
efourier_norm(x, start = FALSE)
x |
An object computed with |
start |
Logical value telling whether the position of the starting point has to be preserved or not. |
Adapted from Claude (2008). pp. 226.
A list with the following components:
A
, B
, C
, D
for harmonic coefficients.
size
the magnitude of the semi-major axis of the first fitting ellipse.
theta
angle, in radians, between the starting and the semi-major axis of
the first fitting ellipse.
psi
orientation of the first fitting ellipse
a0
and c0
, harmonic coefficients.
lnef
the concatenation of coefficients.
nharm
the number of harmonics used.
Claude, J. (2008) Morphometrics with R, Use R! series, Springer 316 pp.
library(pliman)
leaf1 <- contours[[4]]
plot_polygon(leaf1)
# compute the Fourier coefficients
ef <- efourier(leaf1)
efourier_coefs(ef)
# Normalized Fourier coefficients
efn <- efourier_norm(ef)
efourier_coefs(efn)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.