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).
Arguments
- x
An object computed with
efourier()
.- start
Logical value telling whether the position of the starting point has to be preserved or not.
Value
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 ellipsea0
andc0
, harmonic coefficients.lnef
the concatenation of coefficients.nharm
the number of harmonics used.
Examples
if (interactive() && requireNamespace("EBImage")) {
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)
}