Supriya Ghosh (Editor)

Point set registration

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit
Point set registration

In computer vision and pattern recognition, point set registration, also known as point matching, is the process of finding a spatial transformation that aligns two point sets. The purpose of finding such a transformation includes merging multiple data sets into a globally consistent model, and mapping a new measurement to a known data set to identify features or to estimate its pose. A point set may be raw data from 3D scanning or an array of rangefinders. For use in image processing and feature-based image registration, a point set may be a set of features obtained by feature extraction from an image, for example corner detection. Point set registration is used in optical character recognition, augmented reality and aligning data from magnetic resonance imaging with computer aided tomography scans.

Contents

Overview of problem

The problem may be summarized as follows: Let { M , S } be two finite size point sets in a finite-dimensional real vector space R d , which contain M and N points respectively. The problem is to find a transformation to be applied to the moving "model" point set M such that the difference between M and the static "scene" set S is minimized. In other words, a mapping from R d to R d is desired which yields the best alignment between the transformed "model" set and the "scene" set. The mapping may consist of a rigid or non-rigid transformation. The transformation model may be written as T where the transformed, registered model point set is:

It is useful to define an optimization parameter θ :

such that it is clear that the optimizing algorithm adjusts θ . Depending on the problem and number of dimensions, there may be more such parameters. The output of a point set registration algorithm is therefore the transformation parameter θ of model T so that M is optimally aligned to S .

In convergence, it is desired for the distance between the two point sets to reach a global minimum. This is difficult without exhausting all possible transformations, so a local minimum suffices. The distance function between a transformed model point set T ( M ) and the scene point set S is given by some function dist . A simple approach is to take the square of the Euclidean distance for every pair of points:

Minimizing such a function in rigid registration is equivalent to solving a least squares problem. However, this function is sensitive to outlier data and consequently algorithms based on this function tend to be less robust against noisy data. A more robust formulation of the cost function uses some robust function g :

Such a formulation is known as an M-estimator. The robust function g is chosen such that the local configuration of the point set is insensitive to distant points, hence making it robust against outliers and noise.

Rigid registration

Given two point sets, rigid registration yields a rigid transformation which maps one point set to the other. A rigid transformation is defined as a transformation that does not change the distance between any two points. Typically such a transformation consists of translation and rotation. In rare cases, the point set may also be mirrored.

Non-rigid registration

Given two point sets, non-rigid registration yields a non-rigid transformation which maps one point set to the other. Non-rigid transformations include affine transformations such as scaling and shear mapping. However, in the context of point set registration, non-rigid registration typically involves nonlinear transformation. If the eigenmodes of variation of the point set are known, the nonlinear transformation may be parametrized by the eigenvalues. A nonlinear transformation may also be parametrized as a thin plate spline.

Point set registration algorithms

Some approaches to point set registration use algorithms that solve the more general graph matching problem. However, the computational complexity of such methods tend to be high and they are limited to rigid registrations. Algorithms specific to the point set registration problem are described in the following sections.

Iterative closest point

The iterative closest point (ICP) algorithm was introduced by Besl and McKay. The algorithm performs rigid registration in an iterative fashion by assuming that every point in M corresponds with the closest point to it in S , and then finding the least squares rigid transformation. As such, it works best if the initial pose of M is sufficiently close to S . In pseudocode, the basic algorithm is implemented as follows:

Algorithm ICP( M , S ) θ := θ 0 while not registered: X := ∅ for m i T ( M , θ ) : s ^ j := closest point in  S  to  m i X := X + m i , s ^ j θ := least squares(X) return θ

Here, the function least_squares performs least squares regression to minimize the distance in each of the m i , s ^ j pairs, i.e. minimizing the distance function in Equation (3).

Because the cost function of registration depends on finding the closest point in S to every point in M , it can change as the algorithm is running. As such, it is difficult to prove that ICP will in fact converge exactly to the local optimum. In fact, empirically, ICP and EM-ICP do not converge to the local minimum of the cost function. Nonetheless, because ICP is intuitive to understand and straightforward to implement, it remains the most commonly used point set registration algorithm. Many variants of ICP have been proposed, affecting all phases of the algorithm from the selection and matching of points to the minimization strategy. For example, the expectation maximization algorithm is applied to the ICP algorithm to form the EM-ICP method, and the Levenberg-Marquardt algorithm is applied to the ICP algorithm to form the LM-ICP method.

Robust point matching

Robust point matching (RPM) was introduced by Gold et al. The method performs registration using deterministic annealing and soft assignment of correspondences between point sets. Whereas in ICP the correspondence generated by the nearest-neighbour heuristic is binary, RPM uses a soft correspondence where the correspondence between any two points can be anywhere from 0 to 1, although it ultimately converges to either 0 or 1. The correspondences found in RPM is always one-to-one, which is not always the case in ICP. Let m i be the i th point in M and s j be the j th point in S . The match matrix μ is defined as such:

The problem is then defined as: Given two point sets M and S find the Affine transformation T and the match matrix μ that best relates them. Knowing the optimal transformation makes it easy to determine the match matrix, and vice versa. However, the RPM algorithm determines both simultaneously. The transformation may be decomposed into a translation vector and a transformation matrix:

T ( m ) = A m + t

The matrix A in 2D is composed of four separate parameters { a , θ , b , c } , which are scale, rotation, and the vertical and horizontal shear components respectively. The cost function is then:

subject to j   i = 1 M μ i j 1 , i   j = 1 N μ i j 1 , i j   μ i j { 0 , 1 } . The α term biases the objective towards stronger correlation by decreasing the cost if the match matrix has more ones in it. The function g ( A ) serves to regularize the Affine transformation by penalizing large values of the scale and shear components:

g ( A ( a , θ , b , c ) ) = γ ( a 2 + b 2 + c 2 )

for some regularization parameter γ .

The RPM method optimizes the cost function using the Softassign algorithm. The 1D case will be derived here. Given a set of variables { Q j } where Q j R 1 . A variable μ j is associated with each Q j such that j = 1 J μ j = 1 . The goal is to find μ that maximizes j = 1 J μ j Q j . This can be formulated as a continuous problem by introducing a control parameter β > 0 . In the deterministic annealing method, the control parameter β is slowly increased as the algorithm runs. Let μ be:

this is known as the softmax function. As β increases, it approaches a binary value as desired in Equation (rpm.1). The problem may now be generalized to the 2D case, where instead of maximizing j = 1 J μ j Q j , the following is maximized:

where

Q i j = ( s j t A m i 2 α ) = cost μ i j

This is straightforward, except that now the constraints on μ are doubly stochastic matrix constraints: j   i = 1 M μ i j = 1 and i   j = 1 N μ i j = 1 . As such the denominator from Equation (rpm.3) cannot be expressed for the 2D case simply. To satisfy the constraints, it is possible to use a result due to Sinkhorn, which states that a doubly stochastic matrix is obtained from any square matrix with all positive entries by the iterative process of alternating row and column normalizations. Thus the algorithm is written as such:

Algorithm RPM2D ( M , S ) t := 0 a , θ , b , c := 0 β := β 0 μ ^ i j := 1 + ϵ while β < β f : while μ has not converged: // update correspondence parameters by softassign Q i j := cost μ i j μ i j 0 := exp ( β Q i j ) // apply Sinkhorn's method while μ ^ has not converged: // update μ ^ by normalizing across all rows: μ ^ i j 1 := μ ^ i j 0 i = 1 M + 1 μ ^ i j 0 // update μ ^ by normalizing across all columns: μ ^ i j 0 := μ ^ i j 1 j = 1 N + 1 μ ^ i j 1 // update pose parameters by coordinate descent update θ using analytical solution update t using analytical solution update a, b, c using Newton's method β := β r β γ := γ β r return a, b, c, θ and t

where the deterministic annealing control parameter β is initially set to β 0 and increases by factor β r until it reaches the maximum value β f . The summations in the normalization steps sum to M + 1 and N + 1 instead of just M and N because the constraints on μ are inequalities. As such the M + 1 th and N + 1 th elements are slack variables.

The algorithm can also be extended for point sets in 3D or higher dimensions. The constraints on the correspondence matrix μ are the same in the 3D case as in the 2D case. Hence the structure of the algorithm remains unchanged, with the main difference being how the rotation and translation matrices are solved.

Thin plate spline robust point matching

The thin plate spline robust point matching (TPS-RPM) algorithm by Chui and Rangarajan augments the RPM method to perform non-rigid registration by parametrizing the transformation as a thin plate spline. However, because the thin plate spline parametrization only exists in three dimensions, the method cannot be extended to problems involving four or more dimensions.

Kernel correlation

The kernel correlation (KC) approach of point set registration was introduced by Tsin and Kanade. Compared with ICP, the KC algorithm is more robust against noisy data. Unlike ICP, where, for every model point, only the closest scene point is considered, here every scene point affects every model point. As such this is a multiply-linked registration algorithm. For some kernel function K , the kernel correlation K C of two points x i , x j is defined thus:

The kernel function K chosen for point set registration is typically symmetric and non-negative kernel, similar to the ones used in the Parzen window density estimation. The Gaussian kernel typically used for its simplicity, although other ones like the Epanechnikov kernel and the tricube kernel may be substituted. The kernel correlation of an entire point set χ is defined as the sum of the kernel correlations of every point in the set to every other point in the set:

The KC of a point set is proportional, within a constant factor, to the logarithm of the information entropy. Observe that the KC is a measure of a "compactness" of the point set—trivially, if all points in the point set were at the same location, the KC would evaluate to zero. The cost function of the point set registration algorithm for some transformation parameter θ is defined thus:

Some algebraic manipulation yields:

The expression is simplified by observing that K C ( S ) is independent of θ . Furthermore, assuming rigid registration, K C ( T ( M , θ ) ) is invariant when θ is changed because the Euclidean distance between every pair of points stays the same under rigid transformation. So the above equation may be rewritten as:

The kernel density estimates are defined as:

P M ( x , θ ) = 1 N m M K ( x , T ( m , θ ) ) P S ( x ) = 1 N s S K ( x , s )

The cost function can then be shown to be the correlation of the two kernel density estimates:

Having established the cost function, the algorithm simply uses gradient descent to find the optimal transformation. It is computationally expensive to compute the cost function from scratch on every iteration, so a discrete version of the cost function Equation (kc.6) is used. The kernel density estimates P M , P S can be evaluated at grid points and stored in a lookup table. Unlike the ICP and related methods, it is not necessary to find the nearest neighbour, which allows the KC algorithm to be comparatively simple in implementation.

Compared to ICP and EM-ICP for noisy 2D and 3D point sets, the KC algorithm is less sensitive to noise and results in correct registration more often.

Gaussian mixture model

The kernel density estimates are sums of Gaussians and may therefore be represented as Gaussian mixture models (GMM). Jian and Vemuri use the GMM version of the KC registration algorithm to perform non-rigid registration parametrized by thin plate splines.

Coherent point drift

Coherent point drift (CPD) was introduced by Myronenko and Song. The algorithm takes a probabilistic approach to aligning point sets, similar to the GMM KC method. Unlike earlier approaches to non-rigid registration which assume a thin plate spline transformation model, CPD is agnostic with regard to the transformation model used. The point set M represents the Gaussian mixture model (GMM) centroids. When the two point sets are optimally aligned, the correspondence is the maximum of the GMM posterior probability for a given data point. To preserve the topological structure of the point sets, the GMM centroids are forced to move coherently as a group. The expectation maximization algorithm is used to optimize the cost function.

Let there be M points in M and N points in S . The GMM probability density function for a point s is:

where, in D dimensions, p ( s | i ) is the Gaussian distribution centered on point m i M .

p ( s | i ) = 1 ( 2 π σ 2 ) D / 2 ) exp ( s m i 2 2 σ 2 )

The membership probabilities P ( i ) = 1 M is equal for all GMM components. The weight of the uniform distribution is denoted as w [ 0 , 1 ] . The mixture model is then:

The GMM centroids are re-parametrized by a set of parameters θ estimated by maximizing the likelihood. This is equivalent to minimizing the negative log-likelihood function:

where it is assumed that the data is independent and identically distributed. The correspondence probability between two points m i and s j is defined as the posterior probability of the GMM centroid given the data point:

P ( i | s j ) = P ( i ) p ( s j | i ) p ( s j )

The expectation maximization (EM) algorithm is used to find θ and σ 2 . The EM algorithm consists of two steps. First, in the E-step or estimation step, it guesses the values of parameters ("old" parameter values) and then uses Bayes' theorem to compute the posterior probability distributions P old ( i , s j ) of mixture components. Second, in the M-step or maximization step, the "new" parameter values are then found by minimizing the expectation of the complete negative log-likelihood function, i.e. the cost function:

Ignoring constants independent of θ and σ , Equation (cpd.4) can be expressed thus:

where

N P = j = 0 N i = 0 M P old ( i | s j ) N

with N = N P only if w = 0 . The posterior probabilities of GMM components computed using previous parameter values P old is:

Minimizing the cost function in Equation (cpd.5) necessarily decreases the negative log-likelihood function E in Equation (cpd.3) unless it is already at a local minimum. Thus, the algorithm can be expressed using the following pseudocode, where the point sets M and S are represented as M × D and N × D matrices M and S respectively:

Algorithm CPD ( M , S ) θ := θ 0 initialize 0 w 1 σ 2 := 1 D N M j = 1 N i = 1 M s j m i 2 while not registered: // E-step, compute P for i [ 1 , M ] and j [ 1 , N ] : p i j := exp ( 1 2 σ 2 s j T ( m i , θ ) 2 ) k = 1 M exp ( 1 2 σ 2 s j T ( m k , θ ) 2 ) + ( 2 π σ 2 ) D 2 w 1 w M N // M-step, solve for optimal transformation { θ , σ 2 } := s o l v e ( S , M , P ) return θ

where the vector 1 is a column vector of ones. The solve function differs by the type of registration performed. For example, in rigid registration, the output is a scale a, a rotation matrix R , and a translation vector t . The parameter θ can be written as a tuple of these:

θ = { a , R , t }

which is initialized to one, the identity matrix, and a column vector of zeroes:

θ 0 = { 1 , I , 0 }

The aligned point set is:

T ( M ) = a M R T + 1 t T

The solve_rigid function for rigid registration can then be written as follows, with derivation of the algebra explained in Myronenko's 2010 paper.

solve_rigid ( S , M , P ) N P := 1 T P 1 μ s := 1 N P S T P T 1 μ m := 1 N P M T P 1 S ^ := S 1 μ s T M ^ := M 1 μ m T A := S T ^ P T M ^ U , V := s v d ( A ) // the singular value decomposition of A = U Σ V T C := diag ( 1 , . . . , 1 , det ( U V T ) ) // diag(ξ) is the diagonal matrix formed from vector ξ R := U C V T a := tr ( A T R ) tr ( M ^ T diag ( P 1 ) M ^ ) // tr is the trace of a matrix t := μ s a R μ m σ 2 := 1 N P D ( tr ( S ^ T diag ( P T 1 ) S ^ ) ) a tr ( A T R ) return { a , R , t } , σ 2

For affine registration, where the goal is to find an affine transformation instead of a rigid one, the output is an affine transformation matrix B and a translation t such that the aligned point set is:

T ( M ) = M B T + 1 t T

The solve_affine function for rigid registration can then be written as follows, with derivation of the algebra explained in Myronenko's 2010 paper.

solve_affine ( S , M , P ) N P := 1 T P 1 μ s := 1 N P S T P T 1 μ m := 1 N P M T P 1 S ^ := S 1 μ s T M ^ := M 1 μ s T B := ( S T ^ P T M ^ ) ( M T ^ diag ( P 1 ) M ^ ) 1 t := μ s B μ m σ 2 := 1 N P D ( tr ( S ^ diag ( P T 1 ) S ^ ) tr ( S T ^ P T M ^ B T ) ) return { B , t } , σ 2

It is also possible to use CPD with non-rigid registration using a parametrization derived using calculus of variation.

Sums of Gaussian distributions can be computed in linear time using the fast Gauss transform (FGT). Consequently, the time complexity of CPD is O ( M + N ) , which is asymptotically much faster than O ( M N ) methods.

Sorting the Correspondence Space (SCS)

Introduced in 2013 by H. Assalih in his PhD thesis to accommodate sonar image registration, this kind of images tend to have lots of noise so it is expected to have lots of outliers in the point sets to match, SCS delivers great robustness against outliers and can easily surpass ICP and CPD performance in the presence of outliers, SCS doesn’t use iterative optimization in high dimensional space, it is neither probabilistic nor spectral; the algorithm also uses a novel error formula to enhance its performance. SCS can match rigid and non-rigid transformations, however, it is too slow if the target transformation is a simple translation, yet, it is really robust if the the target transformation is in 3 to 6 DoF.

References

Point set registration Wikipedia