Performs an inverse elliptical Fourier transformation to construct a shape,
given a list with Fourier coefficients computed with efourier()
.
Arguments
- x
An object of class
efourier
orefourier_lst
computed withefourier()
.- nharm
An integer indicating the number of harmonics to use. If not specified the number of harmonics used in
x
is used.- a0, c0
the estimates of the coordinates of the centroid of the configuration. If
NULL
(default), the generated coordinates will be centered on the position of the original shape given byefourier()
.- npoints
The number of interpolated points on the constructed outline. Defaults to 500.
Examples
if (interactive() && requireNamespace("EBImage")) {
library(pliman)
plot_polygon(contours, aspect_ratio = 1)
# without alignment
ef <- efourier(contours, nharm = 10, align = FALSE)
ief <- efourier_inv(ef)
plot_contour(ief, col = "red", lwd = 2)
}