fgProcrustes {Momocs}R Documentation

Full Generalized Procrustes alignment between shapes

Description

Directly borrowed from Claude (2008), called there the fgpa2 function.

Usage

fgProcrustes(x, tol, coo)

Arguments

x

an array, a list of configurations, or an Out, Opn or Ldk object

tol

numeric when to stop iterations

coo

logical, when working on Out or Opn, whether to use $coo rather than $ldk

Details

If performed on an Out or an Opn object, will try to use the $ldk slot, if landmarks have been previousy defined, then (with a message) on the $coo slot, but in that case, all shapes must have the same number of coordinates (coo_sample may help).

Value

a list with components:

or an Out, Opn or an Ldk object.

Note

Slightly less optimized than procGPA in the shapes package (~20% on my machine). Will be optimized when performance will be the last thing to improve! Silent message and progress bars (if any) with options("verbose"=FALSE).

References

Claude, J. (2008). Morphometrics with R. Analysis (p. 316). Springer.

See Also

Other procrustes functions: fProcrustes(), fgsProcrustes(), pProcrustes()

Examples

# on Ldk
w <- wings %>% slice(1:5) # for the sake of speed
stack(w)
fgProcrustes(w, tol=0.1) %>% stack()

# on Out
h <- hearts %>% slice(1:5) # for the sake of speed
stack(h)
fgProcrustes(h) %>%  stack()

[Package Momocs version 1.4.1 Index]