Learn R Programming

Momocs (version 1.1.6)

fgProcrustes: Full Generalized Procrustes alignment between shapes

Description

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

Usage

fgProcrustes(x, tol, verbose, coo)

Arguments

x
an array, a list of configurations, or an Out, Opn or Ldk object
tol
numeric when to stop iterations
verbose
logical whether to print outputs (iteration number, and gain)
coo
logical, when working on Out or Opn, whether to use $coo rather than $ldk

Value

a list with components:
  • rotated array of superimposed configurations
  • iterationnumber number of iterations
  • Q convergence criterion
  • Qi full list of Q
  • Qd difference between succesive Q
  • interproc.dist minimal sum of squared norms of pairwise differences between all shapes in the superimposed sample
  • mshape mean shape configuration
  • cent.size vector of centroid sizes.
or an Out, Opn or an Ldk object.

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).

References

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

See Also

Other procrustes functions: fProcrustes, fgsProcrustes, pProcrustes

Examples

Run this code
## Not run: ------------------------------------
# # on Ldk
# stack(wings)
# fgProcrustes(wings, tol=0.1) %>% stack()
# 
# # on Out
# stack(hearts)
# fgProcrustes(hearts) %>%  stack()
## ---------------------------------------------

Run the code above in your browser using DataLab