R/shapes_operations.R
correct_efourier.Rd
Choose and correct 180-degrees spurious rotation in a sample of closed outline shapes.
correct_efourier(ef, index = NULL)
An "OutCoe"
object.
An optional integer vector providing the indices identifying the shapes to be rotated. If declared, overrides interactive selection of shapes.
An "OutCoe"
object containing the corrected outlines.
The usage of this function is inspired in the SHAPE program for
elliptic Fourier analysis (Iwata & Ukai 2002). The index
argument is
intended to facilitate its inclusion in scripts without having to manually
select the outlines every time.
Iwata, H., & Ukai, Y. (2002). SHAPE: a computer program package for quantitative evaluation of biological shapes based on elliptic Fourier descriptors. Journal of Heredity, 93(5), 384-385.
#load shells data
data("shells")
ef <- shells$shapes
#correct first 3 shapes automatically with index
ef_corr1 <- correct_efourier(ef, index = 1:3)
pile_shapes(ef_corr1, mshape = FALSE)
#correct interactively (the process will remain open until
#you click 'finish' or press the Esc key)
if (FALSE) {
ef_corr2 <- correct_efourier(ef_corr1)
}