Choose and correct 180-degrees spurious rotation in a sample of closed outline shapes.

correct_efourier(ef, index = NULL)

Arguments

ef

An "OutCoe" object.

index

An optional integer vector providing the indices identifying the shapes to be rotated. If declared, overrides interactive selection of shapes.

Value

An "OutCoe" object containing the corrected outlines.

Details

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.

References

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.

Examples

#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)
}