# GeneralizedProcrustesAnalysis¶

class menpo.transform.GeneralizedProcrustesAnalysis(sources, target=None, allow_mirror=False)[source]

Class for aligning multiple source shapes between them.

After construction, the AlignmentSimilarity transforms used to map each source optimally to the target can be found at transforms.

Parameters
• sources (list of PointCloud) – List of pointclouds to be aligned.

• target (PointCloud, optional) – The target PointCloud to align each source to. If None, then the mean of the sources is used.

• allow_mirror (bool, optional) – If True, the Kabsch algorithm check is not performed, and mirroring of the Rotation matrix is permitted.

Raises

ValueError – Need at least two sources to align

mean_aligned_shape()[source]

Returns the mean of the aligned shapes.

Type

PointCloud

mean_alignment_error()[source]

Returns the average error of the recursive procrustes alignment.

Type

float