Learn R Programming

Momocs (version 1.4.1)

fgProcrustes: Full Generalized Procrustes alignment between shapes

Description

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

Usage

fgProcrustes(x, tol, coo)

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

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

References

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

See Also

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

Examples

Run this code
# 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()

Run the code above in your browser using DataLab