Alignment¶
- class menpo.transform.base.alignment.Alignment(source, target)[source]¶
Bases: Targetable, Viewable
Mix-in for Transform that have been constructed from an optimisation aligning a source PointCloud to a target PointCloud.
This is naturally an extension of the Targetable interface - we just augment Targetable with 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 a Transform subclass first.
Parameters: source : PointCloud
A PointCloud that the alignment will be based from
target : PointCloud
A PointCloud that the alignment is targeted towards
- 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.
- view(**kwargs)¶
View the object using the default rendering engine figure handling. For example, the default behaviour for Matplotlib is that all draw commands are applied to the same figure object.
Parameters: kwargs : dict
Passed through to specific rendering engine.
Returns: viewer : Renderer
The renderer instantiated.
- view_new(**kwargs)¶
View the object on a new figure.
Parameters: kwargs : dict
Passed through to specific rendering engine.
Returns: viewer : Renderer
The renderer instantiated.
- view_on(figure_id, **kwargs)¶
View the object on a a specific figure specified by the given id.
Parameters: figure_id : object
A unique identifier for a figure.
kwargs : dict
Passed through to specific rendering engine.
Returns: viewer : Renderer
The renderer instantiated.
- aligned_source[source]¶
The result of applying self to source
Type: PointCloud
- alignment_error[source]¶
The Frobenius Norm of the difference between the target and the aligned source.
Type: float
- source[source]¶
The source PointCloud that is used in the alignment.
The source is not mutable.
Type: PointCloud
- target[source]¶
The current PointCloud that this object produces.
To change the target, use set_target().
Type: PointCloud