Solution Methods for Overdetermined Systems of Polynomial Equations with Application to Signal Registration Shanshan Huang,
Ji Zhang,
Mireille Boutin
Department of Mathematics, Purdue University, 150 N. University Street, West Lafayette, IN 47906, USA School of Electrical and Computer Engineering, Purdue University, 465 Northwestern Avenue, West Lafayette, IN 47907, USA
[email protected],
[email protected]
Abstract We will introduce a new method for solving over-constrained polynomial systems of equations and our motivations to develop such a method. This new method can be applied to register a query object in 1D or 2D onto a corresponding template. Registering object in this way does not require the knowledge of an initial guess for the position of the query object and proceeds without having to order, smooth out or otherwise process the points of the query object in any way. The process consists in representing the template by an algebraic curve, and in fitting the algebraic curve to the points on the query object by solving a corresponding over-constrained system of polynomial equations. This solution method, which can be seen as an extension of the pseudo-inverse approach to solving linear systems of equations, naturally handles over-constrained systems of equations in a robust fashion.
Figure 3: The template along with the data to be registered. Using discrete Fourier transform on N sample points on the template, we approximate the piece of music by a complex function
1. Motivations
1.1 Curve Registration via Algebraic Curves1
y = f (t) =
Consider a planar object represented by the curve defined by its contour, which consists of a butterfly in our case. And assume that the query object given is a point cloud representing a noisy observation of a piece of the contour of the template object. We are interested in finding the rotation and the translation that best maps the query point cloud onto the template object. Figure 1 displays the model.
N −1 X
2π j ane N tn.
n=0 m−1, m ≤ N be the points of the query. We are looking for the translation t˜ ∈ Z Let {(ti, yi)}i=0 such that pi(t) = f (ti + t˜) − yi = 0, for all i = 0, . . . , m − 1. (2)
Set
2π e j x = e N t,
the equations (2) become polynomials in the unknown x with xN = 1. We need to solve this overdetermined system of equations. 2. Proposed Polynomial System Solution Method
Figure 1: The template curve along with the data to be registered. We began by approximating the contour of the butterfly using a degree five polynomial p(x, y) as shown in Figure 2. This was done using a MATLAB implementation of Tarel et al(see [1]). The butterfly data was provided as a part of the test data of the implementation.
Our proposed solution method([3]) for polynomial systems of equations is divided into four steps, summarized in Figure 4. In the first step, we extend the system of equations by multiplying each equation by some monomials. In the second step, we consider this extended system as a linear system in the monomials and “solve” it. (In the well-constrained case, this is equivalent to finding a basis for the null-space; in the over-constrained case, one can use a matrix pseudo-inverse like approach.) We then seek the solution of the polynomial system within the solution space of this linear equation. This is done by rephrasing a certain number of constraints between the monomials as a single generalized eigenvalue problem. The third step of our method thus consists in writing this eigenvalue problem, and the last step is to solve it numerically. pi (x, y) = 0 i = 1, . . . , m
Extend → System
→ linear equations → Solve in monomials
Impose basis for → solution → constraints between space monomials
generalized → eigenvalue problem
→ Solve
→ x, y
Figure 4: Schematic Representation of Proposed Solution Method for Polynomial Equations.
2.1 The Case of Univariate Polynomials Given a set of univariate polynomials with coefficients in C, fi(x) = ai,nxn + ai,n−1xn−1 + ... + ai,1x + ai,0 ∈ C[x], i = 1, 2, . . . , m, Figure 2: Implicit Polynomial Representation of Object Template Boundary. The polynomial curve is represented by a continuous line, while the contour of the butterfly represented by dots. Let {(xi, yi)}N i=1 be the points of the point cloud. We are looking for the rotation R ∈ SO(2) and the translation T ∈ R2 such that pi(R, T ) = p ((xi, yi)R + T ) = 0, for all i = 1, . . . , N,
(1)
where R=
cos θ − sin θ sin θ cos θ
=
a −b b a
, with the contraint a2 + b2 = 1, and T = (c, d).
Then equations (1) become polynomials in the unknowns a, b, c, d. We need to solve this overdetermined system of equations.
1.2 Discrete Signal Registration via DFT Suppose we have a piece of music. And the query object given is a segment of the piece. We are interested in locating the position of the query in the template of music, that is, finding the translation that best maps the query onto the template(see Figure 3). 1
All the content of curve registration in 2D is based on [2].
Computational Science and Engineering Student Conference 2010, 04/01/2010
(which could correspond to different noisy observations of a single polynomial obtained in a physical experiment), we write the equations fi(x) = 0 in matrix form Cv = 0 as n x a1,n a1,n−1 . . . a1,1 a1,0 0 a2,n a2,n−1 . . . a2,1 a2,0 xn−1 0 = . . . . . . . .. . . . . . . am,n am,n−1 . . . am,1 am,0 0 1 Let us forget for a moment the relationships between the coordinates of the unknown vector. Just look at them as (n + 1) independent variables. We can then solve this linear system in a least-square sense using a variety of method. Suppose we have already got a (n + 1) × r matrix Ve , whose columns span an approximation of the solution space of the equation Cv = 0: v1,1 v1,2 . . . v1,r v2,1 v . . . v 2,2 2,r . Ve = ~v1 ~v2 . . . ~vr = . . . . . . . . vn+1,1 vn+1,2 . . . vn+1,r Then
n x
v1,1 xn−1 v2,1 .. = .. x vn+1,1 1
v1,2 . . . v2,2 . . . .. .. vn+1,2 . . .
v1,r k1 k2 v2,r e~ .. .. = V k. vn+1,r kr
Now adding the constraints xn xn−1 x = n−2 = ... = = x, n−1 1 x x i.e. n−1 n x x xn−2 xn−1 .. = x .. , 2 x x 1 x we set v1,1 v1,2 . . . v1,r v2,1 v2,2 . . . v2,r v2,1 v2,2 . . . v2,r v3,1 v . . . v 3,2 3,r , and B = , A= . . . . . . . . . . . . . . . . vn,1 vn,2 . . . vn,r vn+1,1 vn+1,2 . . . vn+1,r then the “solution” x must satisfy the generalized eigenvalue problem equation (A − xB)~k = 0.
3.2 Discrete Signal Registration Because of the complexity of computation, we can only deal with a very small piece of music to test our method, which is 0.2 sec in our case. The quality of the uncompressed format of music is 11025 Hz, 8 bit. Hence there are 2205 sample points on the template, which are used to approximate the curve of the piece of music. We also recorded a 0.04 sec-long segment of the piece of music under the same condition as the query object. And registered the 441 points on the query back onto the template using our proposed method. To demonstrate how the method allows us to deal with noisy observations of the template boundary, we also added an increasing amount of Gaussian noise to the y coordinate of the 441 points. The results are shown in Figure 7.
We then only need to solve this generalized eigenvalue problem for x.
2.2 The Case of Bivariate Polynomials The case of polynomials in two variables cannot be treated in the exact same was as the univariate polynomial case. Cause there may not be enough constraints to specify the points that are the roots of the initial systems. To address this problem, we need more monomials. One way to achieve this is to expand the system by multiplying the original equations by x and also by y, thus obtaining a new system with more equations. Since the number of monomials grows faster than the dimension of the null-space of the matrix representing the linear system of equations, the constraints will be big enough eventually to yield a square generalized eigenvalue problem. Then we can solve the eigenvalue problem for x and y. Figure 5 summarizes the heuristic implementation that we used to solve the over-constrained systems of polynomial equations of the curve registration problem.
a)
b)
c)
d)
e)
f)
Figure 7: Sample Match Results.- In a), c) and e), we show the registered results for the case of no Gaussian noise, σ = 0.02 , and σ = 0.05, respectively. The curve on the template is shown in blue line, while the one on the query in red dot. The enlarged details for each case are shown in b), d) e) respectively. Figure 5: Heuristic Implementation of Polynomial Solution Algorithm. 4. Conclusions and Discussions
3. Numerical Results
3.1 Curve Registration We began by picking 20 points along the contour of the butterfly and rotated and translated these 20 points (using cos θ = 0.6, sin θ = 0.8, and T = (−1, −1)), as illustrated in Figure 6 a). We then registered the resulting 20 points back onto the original butterfly using our proposed method. To demonstrate how the method allows us to deal with noisy observations of the template boundary, we added an increasing amount of Gaussian noise (with σ between 0.01 and 0.2) to the x and y coordinates of the 20 points. The results are also shown in Figure 6.
We presented a new solution method for over-constrained systems of polynomial equations with applications on curve and signal registration. By using this direct solution method, instead of an iterative one, we are able to register the points on query object without the knowledge of an initial position guess. In future work, we will implement the method in C to speed up the computations. We will also improve the numerical accuracy and computational efficiency of our proposed polynomial solution method by leveraging existing linear algebra tools and exploiting the sparsity of the data. And we will also work on solving signal registration in 2D with non-integer translations and other transformation. 5. Acknowledgements We would like to thank Jean-Philippe Tarel for kindly providing the source code for the algebraic curve fitting algorithm[1] used to produce our numerical result. References
a)
b)
[1] Tarel, J.-P. and Cooper, D. B., ”The complex representation of algebraic curves and its simple exploitation for pose estimation and invariant recognition,” IEEE Transactions on Pattern Analysis and Machine Intelligence 22, 663-674 (July 2000). [2] Ji Zhang, Shanshan Huang, Mireille Boutin, ”Effective Curve Registration Using a Novel Solution Method for Overdetermined Systems of Polynomial Equations,” IS&T/SPIE joint symposium, Computational Imaging VI conference, San Jose, CA, (January 2009). [3] Ji Zhang, ”A solution method for zero dimensional equation systems and a pose-free framework for the robust solution of the structure from motion problem,” PhD Thesis, Purdue University, IN, (April 2009).
c)
d)
e)
f)
Figure 6: Sample Match Results.- In a), c) and e), we show the template curve along with the data to be registered, for the case of no noise, σ = 0.1 , and σ = 0.2, respectively. The results obtained for each case are shown in b), d) e) respectively.
Computational Science and Engineering Student Conference 2010, 04/01/2010