An Unsupervised, Iterative N-Dimensional Point-Set Registration Algorithm

An unsupervised, iterative point-set registration algorithm for an unlabeled (i.e. correspondence between points is unknown) N-dimensional Euclidean point-cloud is proposed. It is based on linear least squares, and considers all possible point pairings and iteratively aligns the two sets until the number of point pairs does not exceed the maximum number of allowable one-to-one pairings.


Introduction
Point-set registration has been extensively studied in computer vision. For labeled data, an important class of solutions is linear least squared techniques [1,2,3,4]. Unlike the aforementioned work of [1,2,3], the paper in [4] treated the more general case of two point-sets of unequal size and do not assume correspondence. They first established correspondence by numerically determining the matching pairs support between the two points sets (i.e. finding an optimal subset of pairings between the two sets), and then derived (analytical) least squared solutions to the transformation parameters that optimally align the (labeled) optimal subset of pairings. However, their approach is computationally expensive, having quartic polynomial (averagecase) complexity.
For unlabeled data, the alignment of two point patterns is a two-part problem; both the correspondence and the optimal affine transform that minimizes some dissimilarity metric between the two point-sets need to be determined. Various point pattern matching algorithms for unlabeled data have been proposed in [5,6,7,8,9], but the necessary optimization for each is numerically based. The works of [5,6,7] determined the optimal affine transform and correspondence simultaneously by numerically solving a constrained least squares problem. The method in [9] models each point-set as a Gaussian mixture, and determines the appropriate alignment by (nonlinear) optimization of the L2 distance between the two Gaussian mixtures.
Unlike the numerical optimization schemes discussed above, a much more computationally efficient approach would be an analytical optimization scheme for unlabeled data, which is proposed in this paper. Our alignment approach is similar to the labeled techniques of [1,2,3,4] in that we derive analytical solutions for the optimal affine transform via linear least squares. But unlike them, we do not assume or establish correspondence prior to registration, but use registration to establish correspondence. To the best of our knowledge, our derivation of the (closed-form) linear least square solutions for the registration of two unlabeled point-sets, though remarkably simple, is absent from the available literature. The presented derivation is generalized to any N-dimensional point-set (i.e. each point in a point-set resides in R N ), and the obtained solutions are then used to create an unsupervised, iterative Ndimensional point-set registration algorithm. The N = 2 case was shown in [10], and utilized in the context of fingerprint matching.
The paper is organized as follows. In Section II, we lay the theoretical foundations of the proposed algorithm; in Section III, we describe its numerical implementation; and in Section IV, we conclude with a discussion of the algorithm and its potential applications.

Theory
Consider two N-dimensional point sets U and V comprising N U and N V singular points, respectively. The Cartesian coordinates of the singular points will be expressed as an N-dimensional vector: The elements of u i and v k are denoted as u j i and v j k , respectively, where j = 1, ..., N. U and V can be interpreted as matrices whose columns are formed by the vectors u i and v k , respectively, i.e. U ∈ R N U ×N and V ∈ R N V ×N ; and u j and v j can be interpreted as the features of U and V, respectively.
We want to register point-set U to V. There are N U N V possible matching (cross) pairs and at most min{N U , N V } one-to-one matching pairs. Let m ik denote the weight of a matching pair; the weight can be interpreted as a probability that the points u i and v k match locally. We assume that the (initial) m ik for each (cross) pair has been determined prior to alignment. One way of computing m ik is discussed in [10] within the context of fingerprint matching.

Case I: No Scale
We apply a global rotation and translation to point set U such that where L is the N × N rotation matrix and t is the N-d vector of translation parameters. Since L is a rotation matrix, it is orthogonal, i.e. LL T = L T L = I N ×N , and has a determinant of 1.
The measure of closeness of the transformed point set U and the template set V may be defined as the weighted sum of the squared distances between their points (i.e. Euclidean distance metric): Interpreting m ik as the probability of a match between u i and v k leads to where 'Tr' denotes the trace operator. We seek the optimal values of parameters L and t that minimize e(U, V; L, t), so the constrained optimization problem to be solved is minimize L,t e(U, V; L, t) The Lagrangian for the above (constrained) optimization problem is where α is an N × N symmetric matrix of Lagrangian multipliers (it is symmetric because LL T is symmetric, and consequently contains N(N +1)/2 Lagrangian multipliers), and λ is a scalar Lagrangian multiplier. Before proceeding further, let us define the weighted average coordinate vectors as Substituting Eq.(5) back into our Lagrangian and then partial differentiating it with respect to L yields where cov(u j , v j ′ ) denotes the covariance between features u j and v j ′ : Solving Eq. (6) for L yieldŝ Since L is an orthogonal matrix, we have which upon isolating the cross-covariance, Z, The minimum of the error function corresponds to The matrix ZZ T exhibits several interesting properties: 1. It is real symmetric. It is real because the elements of Z are covariances, which are always real by definition of covariance. And it is symmetric because ZZ T = ZZ T T .
2. It is diagonalizable as a consequence of being real symmetric. We will exploit this fact later.
4. It's eigenvalues are all positive as a consequence of positive-definiteness.
Eq. (8) requires taking the square root of the matrix ZZ T . According to the spectral theorem, any real symmetric matrix can be diagonalized by an orthogonal matrix: where P is an N ×N orthogonal matrix and D is the N ×N diagonal matrix; P and D are formed by the eigenvectors and eigenvalues, respectively, of ZZ T .The square root of ZZ T is then PD Now, any N × N matrix with N distinct eigenvalues has 2 N square roots because the square root of each eigenvalue can be either positive or negative. If such a matrix is further positive-definite, then it has precisely one positivedefinite square root; the positive-definite square root corresponds to the case where only the positive square root of each eigenvalue is taken. We exploit these properties of ZZ T to extract only its positive-definite square-root, so D In summary, the optimal alignment parameters arê Or equivalently, The minimum squared error is found by substituting the optimal alignment parameters back into Eq. (3), which yields where In other words, σ 2 u j is the variance of feature u j , and likewise σ 2 v j is the variance of feature v j . So we can rewrite the minimum squared error as Note that had we usedL = − √ ZZ T −1 PD Z, the generated error would be The eigenvalues of a positive-definite matrix all always positive, which means Tr √ ZZ T PD > 0, so e ′ > e min .

Case II: Uniform Scale
If we include a uniform scale, s, into our affine transform, we then have So our cost function becomes Exploiting the fact that L is an orthogonal matrix, we obtain which is the same rotation matrix we obtained in the non-scalar case. Thus, the inclusion of a fixed scale into our affine transform does not affect the rotation matrix. Substituting both Eqs. (16) and (17) in Eq. (15) results in L(L, t, s, α, λ) = L(s, α, λ). Optimizing the Lagrangian with respect to s yields where In other words, σ 2 u j is the variance of feature u j . Solving Eq. (18) for s yieldŝ Since both the numerator and denominator of Eq. (20) are always positive, it is always guaranteed thatŝ > 0; this is reasonable because a negative scale defies physical interpretation.
So the optimal alignment parameters are The minimum squared error is found by substituting the optimal alignment parameters back into Eq. (14), which yields

Uncoupled Weights: An Ill-Posed Problem
We now examine a specific case that makes the minimization problem illposed, i.e. no solution exists. Assume that m ik is separable, i.e. m ik = σ i γ k , which means that Consequently, the cross-covariance matrix becomes As a result, an infinite number of rotation matrices are admissible. Thus, a unique solution for the minimization problem is guaranteed if and only if the weight term is coupled between the two point-sets. A special sub-case is when the weight term is fixed for all possible pairings, i.e. m ik = c for all i and k, where c is a real constant.

Relation to Labeled Scenario
In the case where the correspondence is known a priori, we have m ik = w i γ ik , where γ ik = 0, points i and k do not correspond 1, points i and k do correspond So our cost function reduces to where N ≤ min{N U , N V } is the number of matching pairs between the two sets and w n is the "strength" of the match between the two points forming pair n. The solution to Eq. (22) is the same as that derived in unlabeled scenario, except that now the (weighted) averages, variances, and covariances are no longer coupled. Eq. (22) is the cost function minimized in [1,2,3,4].

Numerical Implementation
We have derived the closed-form solutions for the optimal alignment parameters for two different cases: the absence of scale and the presence of a uniform scale. Without loss of generality, the present discussion will focus on the case of uniform scale.
Denote M as the data structure (say an array) storing all N U N V potential pairings. After alignment, the Euclidean distance between any two (cross) points forming a pair is If a pair constitutes a genuine match, then ideally ∆ ik will be small, and we will want to keep it. And if the pair is spurious, then ∆ ik will be large, and we will want to discard it. To do that, we need to compare each pair's ∆ ik to some threshold, T . If for a given pair, then the pair is an outlier and we remove it from the array M. Otherwise, we recompute its weight as Upon iterating across every pair in M, we count the number of pairs left in the array. If no pairs have been removed, this is indicative of the threshold being too large, so we repeat Step 2 using the threshold T := T − ǫ, where 0 < ǫ < T .
If pairs have been removed, then we need to check if the convergence criterion has been met. We define convergence as when the number of pairs does not exceed the maximum number of allowable one-to-one matches, i.e. length(M) < min (N U , N V ). If this happens to be the case, then we are done; the remaining pairs in M form the optimal matching pairs. Otherwise, we repeat Stage II using the updated M and new weights.
Note that the algorithm consists of two hyper-parameters: the max threshold, T , and the threshold spacing, ǫ. They have to be tuned appropriately with respect to the data.
We now summarize the proposed algorithm as a pseudocode: 1: while number of pairs > min(N U , N V ) and T > 0 do 2: Align query object to template 3: for each pair M j in array M do 4: compute weighted sum, ∆ j , of radial displacements 5: if ∆ j > T then 6: remove pair M j from array M

Computational Complexity
Denote I(T, ǫ) as the number of iterations until convergence is reached; it is a function of the two hyper-paramters. The computational complexity of the proposed algorithm is then O(IN U N V ). In the best case scenario, the algorithm will achieve convergence after a single iteration, i.e. I = 1.
Let us look at the scenario where no pairs will be removed during each iteration of alignment. Such a scenario is the worst-case from a practical standpoint, but not necessarily from an algorithmic (i.e. computational complexity) perspective. In such a scenario, the total number of attempted alignments is I(T, ǫ) = T ǫ , so the complexity is O( T ǫ N U N V ). Note, a worst computational complexity than this could be achieved; for example, having more than T ǫ iterations until convergence is reached is completely plausible because any given threshold may be used more than once.

Similarity Score
Based on the set of (optimal) matching point pairs outputted by the proposed algorithm, a similarity score measuring the strength of the match between the two point-sets can be computed from the minimum squared error generated by the optimal alignment parameters, which recall for the case of uniform scale is It would ideally be small for genuine matches and large for dissimilar pointsets.

Discussion
An unsupervised, iterative N-dimensional point-set registration algorithm for unlabeled data (i.e. correspondence between points is unknown) and based on linear least squares has been proposed. The algorithm considers all possible point pairings and iteratively aligns the two sets until the number of point pairs does not exceed the maximum number of allowable one-to-one pairings.
Note that the output the of algorithm, i.e. the optimal matching pointpairs, may not necessarily be injective. In fact, a point in U may match to more than one point in V, or more than one point in U may match to the same point in V. Such a situation frequently arises in fingerprint matching where due to image noise and/or faulty image processing, a minutia in the query image may genuinely correspond to more than one minutia in the reference image.
The proposed algorithm may be utilized in a wide variety of matching problems, beyond just fingerprint matching. For example, assuming U and V describe two different sets of individuals, we may be interested in identifying those pairs of individuals that are most likely to become friends. Another example is where U describing a set of individuals and V a set of companies, and we seek to find which company a given individual best matches to. In these two examples, injectivity may not be a realistic assumption; there may be more than one company that a given individual would fit well in, or there may be one company where more than one individual would be a great fit.