Alignment¶
-
class
menpo.transform.base.alignment.Alignment(source, target)[source]¶ Bases:
Targetable,ViewableMix-in for
Transformthat have been constructed from an optimisation aligning a sourcePointCloudto a targetPointCloud.This is naturally an extension of the
Targetableinterface - we just augmentTargetablewith the concept of a source, and related methods to construct alignments between a source and a target.Note that to inherit from
Alignment, you have to be aTransformsubclass first.- Parameters
source (
PointCloud) – A PointCloud that the alignment will be based fromtarget (
PointCloud) – A PointCloud that the alignment is targeted towards
-
alignment_error()[source]¶ The Frobenius Norm of the difference between the target and the aligned source.
- Type
float
-
copy()¶ Generate an efficient copy of this object.
Note that Numpy arrays and other
Copyableobjects onselfwill be deeply copied. Dictionaries and sets will be shallow copied, and everything else will be assigned (no copy will be made).Classes that store state other than numpy arrays and immutable types should overwrite this method to ensure all state is copied.
- Returns
type(self)– A copy of this object
-
set_target(new_target)¶ Update this object so that it attempts to recreate the
new_target.- Parameters
new_target (
PointCloud) – The new target that this object should try and regenerate.
-
property
source¶ The source
PointCloudthat is used in the alignment.The source is not mutable.
- Type
-
property
target¶ The current
PointCloudthat this object produces.To change the target, use
set_target().- Type