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)
}
Run the code above in your browser using DataLab