loki.align.EMRegistration
- class loki.align.EMRegistration(X, Y, sigma2=None, max_iterations=None, tolerance=None, w=None, *args, **kwargs)
Expectation maximization point cloud registration. Adapted from Pure Numpy Implementation of the Coherent Point Drift Algorithm: https://github.com/siavashk/pycpd
- X
NxD array of target points.
- Type:
numpy array
- Y
MxD array of source points.
- Type:
numpy array
- TY
MxD array of transformed source points.
- Type:
numpy array
- sigma2
Initial variance of the Gaussian mixture model.
- Type:
float (positive)
- N
Number of target points.
- Type:
int
- M
Number of source points.
- Type:
int
- D
Dimensionality of source and target points
- Type:
int
- iteration
The current iteration throughout registration.
- Type:
int
- max_iterations
Registration will terminate once the algorithm has taken this many iterations.
- Type:
int
- tolerance
Registration will terminate once the difference between consecutive objective function values falls within this tolerance.
- Type:
float (positive)
- w
Contribution of the uniform distribution to account for outliers. Valid values span 0 (inclusive) and 1 (exclusive).
- Type:
float (between 0 and 1)
- q
The objective function value that represents the misalignment between source and target point clouds.
- Type:
float
- diff
The absolute difference between the current and previous objective function values.
- Type:
float (positive)
- P
MxN array of probabilities. P[m, n] represents the probability that the m-th source point corresponds to the n-th target point.
- Type:
numpy array
- Pt1
Nx1 column array. Multiplication result between the transpose of P and a column vector of all 1s.
- Type:
numpy array
- P1
Mx1 column array. Multiplication result between P and a column vector of all 1s.
- Type:
numpy array
- Np
The sum of all elements in P.
- Type:
float (positive)
- __init__(X, Y, sigma2=None, max_iterations=None, tolerance=None, w=None, *args, **kwargs)
Methods
__init__
(X, Y[, sigma2, max_iterations, ...])expectation
()Compute the expectation step of the EM algorithm.
get_registration_parameters
()Placeholder for child classes.
iterate
()Perform one iteration of the EM algorithm.
maximization
()Compute the maximization step of the EM algorithm.
register
([callback])Perform the EM registration.
transform_point_cloud
()Placeholder for child classes.
update_transform
()Placeholder for child classes.
update_variance
()Placeholder for child classes.