Globally Optimal Estimates for Geometric Reconstruction Problems Tom Gilat, Adi Lakritz Advanced Topics in Computer Vision Seminar Faculty of Mathematics and Computer Science Weizmann Institute 3 June 2007
outline Motivation and Introduction Background Positive SemiDefinite matrices (PSD) Linear Matrix Inequalities (LMI) SemiDefinite Programming (SDP) Relaxations Sum Of Squares (SOS) relaxation Linear Matrix Inequalities (LMI) relaxation Application in vision Finding optimal structure Partial relaxation and Schur ’ s complement
Motivation Geometric Reconstruction Problems Polynomial optimization problems (POPs)
Triangulation problem in L 2 norm Multi view - optimization2-views – exact solution
Triangulation problem in L 2 norm perspective camera i x y z err
Triangulation problem in L 2 norm minimize reprojection error in all cameras Polynomial minimization problem Non convex
More computer vision problems Reconstruction problem: known cameras, known corresponding points find 3D points that minimize the projection error of given image points –Similar to triangulation for many points and cameras Calculating homography given 3D points on a plane and corresponding image points, calculate homography Many more problems
Optimization problems
Introduction to optimization problems
optimization problems NP - complete
optimization problems optimization convexnon convex Linear Programming (LP) SemiDefinite Programming (SDP) solutions exist: interior point methods problems: local optimum or high computational cost
non convex optimization init level curves of f Many algorithms Get stuck in local minima MinMax Non convex feasible set
optimization problems optimization convexnon convex LPSDP solutions exist: interior point methods problems: local optimum or high computational cost global optimization – algorithms that converge to optimal solution relaxation of problem
outline Motivation and Introduction Background Positive SemiDefinite matrices (PSD) Linear Matrix Inequalities (LMI) SemiDefinite Programming (SDP) Relaxations Sum Of Squares (SOS) relaxation Linear Matrix Inequalities (LMI) relaxation Application in vision Finding optimal structure Partial relaxation and Schur ’ s complement
positive semidefinite (PSD) matrices Definition: a matrix M in R n×n is PSD if 1. M is symmetric: M=M T 2. for all M can be decomposed as AA T (Cholesky) Proof:
positive semidefinite (PSD) matrices Definition: a matrix M in R n×n is PSD if 1. M is symmetric: M=M T 2. for all M can be decomposed as AA T (Cholesky)
principal minors The kth order principal minors of an n×n symmetric matrix M are the determinants of the k×k matrices obtained by deleting n - k rows and the corresponding n - k columns of M first order: elements on diagonal second order:
diagonal minors The kth order principal minors of an n×n symmetric matrix M are the determinants of the k×k matrices obtained by deleting n - k rows and the corresponding n - k columns of M first order: elements on diagonal second order:
diagonal minors The kth order principal minors of an n×n symmetric matrix M are the determinants of the k×k matrices obtained by deleting n - k rows and the corresponding n - k columns of M first order: elements on diagonal second order:
diagonal minors The kth order principal minors of an n×n symmetric matrix M are the determinants of the k×k matrices obtained by deleting n - k rows and the corresponding n - k columns of M first order: elements on diagonal third order: det(M) second order:
Set of PSD matrices in 2D
Set of PSD matrices This set is convex Proof:
LMI – linear matrix inequality
LMI example: find the feasible set of the 2D LMI
reminder
LMI example: find the feasible set of the 2D LMI 1st order principal minors
LMI example: find the feasible set of the 2D LMI 2nd order principal minors
LMI example: find the feasible set of the 2D LMI 3rd order principal minors Intersection of all inequalities
Semidefinite Programming (SDP) = LMI an extension of LP
outline Motivation and Introduction Background Positive SemiDefinite matrices (PSD) Linear Matrix Inequalities (LMI) SemiDefinite Programming (SDP) Relaxations Sum Of Squares (SOS) relaxation Linear Matrix Inequalities (LMI) relaxation Application in vision Finding optimal structure Partial relaxation and Schur ’ s complement
Sum Of Squares relaxation (SOS) Unconstrained polynomial optimization problem (POP) means the feasible set is R n H. Waki, S. Kim, M. Kojima, and M. Muramatsu. SOS and SDP relaxations for POPs with structured sparsity. SIAM J. Optimization, 2006.
Sum Of Squares relaxation (SOS)
SOS relaxation for unconstrained polynomials
monomial basis example
SOS relaxation to SDP SDP
SOS relaxation to SDP example: SDP
SOS for constrained POPs possible to extend this method for constrained POPs by use of generalized Lagrange dual
SOS relaxation summary So we know how to solve a POP that is a SOS And we have a bound on a POP that is not an SOS H. Waki, S. Kim, M. Kojima, and M. Muramatsu. SOS and SDP relaxations for POPs with structured sparsity. SIAM J. Optimization, POP SOS problem SOS relaxation Global estimate SDP
relaxations SOS: POP SOS problem SOS relaxation Global estimate SDP POP linear & LMI problem LMI relaxation Global estimate SDP + converge LMI:
outline Motivation and Introduction Background Positive SemiDefinite matrices (PSD) Linear Matrix Inequalities (LMI) SemiDefinite Programming (SDP) Relaxations Sum Of Squares (SOS) relaxation Linear Matrix Inequalities (LMI) relaxation Application in vision Finding optimal structure Partial relaxation and Schur ’ s complement
LMI relaxations Constraints are handled Convergence to optimum is guaranteed Applies to all polynomials, not SOS as well
A maximization problem Note that: a.Feasible set is non-convex. b.Constraints are quadratic Feasible set
LMI – linear matrix inequality, a reminder
Goal An SDP: Motivation Polynomial Optimization Problem SDP with solution close to global optimum of the original problem What is it good for? SDP problems can be solved much more efficiently then general optimization problems.
POP Linear + LMI + rank constraints SDP LMI: LMI Relaxations is iterative process Step 1: introduce new variables Step 2: relax constraints Apply higher order relaxations
LMI relaxation – step 1 Replace monomials by “lifting variables” Rule: Example: (the R 2 case)
Introducing lifting variables Lifting
Not equivalent to the original problem. Lifting variables are not independent in the original problem: New problem is linear, in particular convex
Goal, more specifically Linear problem (obtained by lifing) “relations constraints” on lifting variables + SDP Relaxation
Question: how do we guarantee that the relations between lifting variables hold?
LMI relaxation – step 2 Apply lifting and get: Take the basis of the degree 1 polynomials. Note that: Because:
If the relations constraints hold then This is because we can decompose M as follows: Assuming relations hold Rank M = 1
We’ve seen: Relations constraints hold What about the opposite: Relations constraints hold This is true as well
By the following: LMI relaxation – step 2, continued Relations constraints hold All relations equalities are in the set of equalities
Conclusion of the analysis The “y feasible set” Subset of feasible set with Relations constraints hold
Original problem is equivalent to the following: together with the additional constraint Relaxation, at last We denote moment matrix of order 1 Relax by dropping the non-convex constraint
LMI relaxation of order 1 Feasible set
Rank constrained LMI vs. unconstrained
LMI relaxations of higher order It turns out that we can do better: Apply LMI relaxations of higher order A tighter SDP Relaxations of higher order incorporate the inequality constraints in LMI We show relaxation of order 2 It is possible to continue and apply relaxations Theory guarantees convergence to global optimum
Let be a basis of polynomials of degree 2. Again, Lifting gives: Again, we will relax by dropping the rank constraint. LMI relaxations of second order
Inequality constraints to LMI Replace our constraints by LMIs and have a tighter relaxation. Linear Constraint : Lifting LMI Constraint : For example,
This procedure brings a new SDP LMI relaxations of order 2 Second SDP feasible set is included in the first SDP feasible set Silimarly, we can continue and apply higher order relaxations.
If the feasible set defined by constraints is compact, then under mild additional assumptions, Lassere proved in 2001 that there is an asymptotic convergence guarantee: is the solution to k’th relaxation is the solution for the original problem (finding a maximum) Theoretical basis for the LMI relaxations Moreover, convergence is fast: is very close to for small k Lasserre J.B. (2001) "Global optimization with polynomials and the problem of moments" SIAM J. Optimization 11, pp
The method provides a certificate of global optimality: An important experimental observation: SDP solution is global optimum Minimizing Low rank moment matrix Checking global optimality
We add to the objective function the trace of the moment matrix weighted by a sufficiently small positive scalar
LMI relaxations in vision Application
outline Motivation and Introduction Background Positive SemiDefinite matrices (PSD) Linear Matrix Inequalities (LMI) SemiDefinite Programming (SDP) Relaxations Sum Of Squares (SOS) relaxation Linear Matrix Inequalities (LMI) relaxation Application in vision Finding optimal structure Partial relaxation and Schur ’ s complement
Camera center Image plane Finding optimal structure A perspective camera P is the camera matrix and is the depth. Measured image points are corrupted by independent Gaussian noise. We want to minimize the least squares errors between measured and projected points. The relation between a U in the 3D space and u in the image plane is given by:
We therefore have the following optimization problem: is the Euclidean distance. is the set of unknowns Where are polynomials. Each term in the cost function can be written as: Our objective is therefore to minimize a sum of rational functions.
How can we turn the optimization problem into a polynomial optimization problem? Suppose that each term in has an upper bound, then Then our optimization problem is equivalent to the following: This is a polynomial optimization problem, for which we apply LMI relaxations. Note that we introduced many new variables – one for each term.
Problem: an SDP with a large number of variables can be computationally demanding. A large number of variables can arise from: LMI relaxations of high order Introduction of new variables as we’ve seen This is where partial relaxations come in. For that we introduce Schur’s complement. Partial Relaxations
Schur’s comlement Set:
Schur’s comlement - applying Derivation of right side: C - B T * A -1 * B > 0
Schur’s complement allows us to state our optimization problem as follows: Partial relaxations The only non-linearity is due to We can apply LMI relaxations only on and leave If we were to apply full relaxations for all variables, the problem would become Intractable for small N.
Partial relaxations Disadvantage of partial relaxations: we are not able to ensure asymptotic convergence to the global optimum. However, we have a numerical certificate of global optimality just as in the case of full relaxations: The moment matrix of the relaxed variables is of rank one Solution of partially relaxed problem is the global optimum
Full relaxation vs. partial relaxtion Application: Triangulation, 3 cameras Goal: find the optimal 3D point. Camera matrices are known, measured point is assumed to be in the origin of each view. Camera matrices:
Summary Geometric Vision Problems to POPs –Triangulation and reconstruction problem Relaxations of POPs –Sum Of Squares (SOS) relaxation Guarantees bound on optimal solution Usually solution is optimal –Linear Matrix Inequalities (LMI) relaxation First order LMI relaxation: lifting, dropping rank constraint Higher order LMI relaxation: linear constraints to LMIs Guarantee of convergence, reference to Lassere Certificate of global optimality Application in vision Finding optimal structure Partial relaxation and Schur’s complement Triangulation problem, benefit of partial relaxations
References F. Kahl and D. Henrion. Globally Optimal Estimates for Geometric Reconstruction Problems. Accepted IJCV H. Waki, S. Kim, M. Kojima, and M. Muramatsu. Sums of squares and semidefinite programming relaxations for polynomial optimization problems with structured sparsity. SIAM J. Optimization, 17(1):218 – 242, J. B. Lasserre. Global optimization with polynomials and the problem of moments. SIAM J. Optimization, 11:796 – 817, S. Boyd and L. Vandenberghe. Convex Optimization. Cambridge University Press, R. I. Hartley and A. Zisserman. Multiple View Geometry in Computer Vision. Cambridge University Press, Second Edition.