RELATIVE CAMERA POSE ESTIMATION METHOD USING OPTIMIZATION ON THE MANIFOLD

To solve the problem of relative camera pose estimation, a method using optimization with respect to the manifold is proposed. Firstly from maximum-a-posteriori (MAP) model to nonlinear least squares (NLS) model, the general state estimation model using optimization is derived. Then the camera pose estimation model is applied to the general state estimation model, while the parameterization of rigid body transformation is represented by Lie group/algebra. The jacobian of point-pose model with respect to Lie group/algebra is derived in detail and thus the optimization model of rigid body transformation is established. Experimental results show that compared with the original algorithms, the approaches with optimization can obtain higher accuracy both in rotation and translation, while avoiding the singularity of Euler angle parameterization of rotation. Thus the proposed method can estimate relative camera pose with high accuracy and robustness. * Corresponding author


INTRODUCTION
In general, there are three kinds of relative camera pose estimation models: 2D-2D, 3D-2D, and 3D-3D, whereas the kind of 3D-2D model is the most widely used in photogrammetry, incremental structure-from-motion (SFM), visual simultaneous localization and mapping (V-SLAM), augmented reality, autonomous navigation and so on.It can be described as that how to determine the orientation and position of a fully calibrated perspective camera, given n (n≥3) 3D points in the world framework and their corresponding 2D image points, which is also known as the perspective-n-point (PnP) problem (Hartley, Richard, 2003).Considering the importance of PnP problem, a large amount of work has been done in the past few decades.The P3P problem attracts a lot of researchers' interests, such as (Li, 2011) and (Rieck, M. Q., 2014).Usually P3P solutions are implemented with RANSAC outlier rejection scheme.In practice, there are often more than 3 points and considering the redundancy can generally improve accuracy, most of recent works on PnP problem concentrate on the situations with more than 3 points.Roughly, the state-of-the-art solutions on PnP problem can be divided into two typesthe multi-stage method and the direct minimization method.Typically, the multi-stage methods first estimate the points coordinates in the camera framework, and transform the PnP (3D-2D) problem into 3D-3D pose estimation problem.Also, the linear methods usually have closed-form solutions.Latest progress in linear methods includes EPnP (Lepetit, V., 2009), RPnP (Li, S., 2012), OPnP (Zheng, Y., M, 2013).Lepetit, et al. (Lepetit, V., 2009) expresses the n 3D points as a weighted sum of four virtual control points, making the PnP problem reduce to estimate the coordinates of these control points in the camera referential, which reduces the complexity to O(n).Li, et al. (Li, S., 2012) points out that due to underlying linearization scheme, EPnP performs poor for slightly redundant cases with n = 4 or n = 5.Then, Li, et al propose another non-iterative O(n) solution which retrieves the optimum by solving a seventh order polynomial.Zheng, et al (Zheng, Y., M, 2013) put forward a non-iterative O(n) solution which transforms the PnP problem to an unconstrained optimization problem solved by a Grobner basis solver.Moreover, the well-known direct linear transformation (DLT) is also a multi-stage method, because it first estimates the projection matrix and extracts the camera pose.However due to ignoring the orthogonal constraint of rotation matrix, its accuracy is poor.The second type of PnP solutions is direct minimization methods.Its main idea is to minimize a defined energy function (or cost function), either in the image space or in the object space, which contains all nonlinear constraints.There exists some representative direct minimization methods.Lu et al. (Lu, C. P., 2000) propose an orthogonal iteration method to minimize the object space collinearity error, while Garro et al. (Garro, V., 2012) propose an alternative minimization method to minimize the 3D space geometric error.Hesch, et al. (Hesch, J. A., 2011) present a direct least squares (DLS) method for computing all solutions of the PnP problem by solving a system of three third-order polynomials.However, due to the Gayley representation of rotation, there are degeneration cases.Then they provide a remedy to conquer the degeneracy of the Gayley representation by solving DLS three times under different rotated 3D points, whereas the computational time is tripled.To sum up, all the mentioned multi-stage methods are generally poor in accuracy, while the direct minimization methods suffer from the risk of getting trapped into local minimum.So in practise, we often firstly acquire an initial guess about the PnP solution using multi-stage methods such as EPnP, DLT or RPnP, and then we use optimization method such as Gauss-Newton or Levenberg-Marquardt scheme to generate an optimal result.However, in optimization, especially in computer vision and robotics, the correct treatment of angles consistently causes confusion.On one hand, a minimal parameterization is desired, but also singularities should be avoided.Interpolation of angles is not straightforward, since the group of rotation is only locally Euclidean.Probably the most elegant way to represent rigid body transformation is using a Lie group/algebra representation.
Thus we present an approach for relative camera pose estimation using optimization method with respect to the Lie group, which can avoid the singularity of Euler angle parameterization of rotation, and make the optimization method such as Gauss-Newton or Levenberg-Marquardt (Moré , J. J., 1978) more robust and convenient.

METHODS FOR STATE ESTIMATION USING OPTIMIZATION
In this section, we give a brief review of state estimation using optimization.This section defines the common notation and technology for the rest of the paper and introduces different types of optimization our method uses.

Maximum-a-posteriori (MAP) estimation and Least Square Problems
In general, we want to estimate a set of unknown variables p given a set of measurements f , where we know the In case no prior knowledge is available, () p p becomes a constant (uniform distribution) which is inconsequential and can be dropped.Then MAP estimation reduces to maximum likelihood estimation (MLE).Assuming that the measurements are independent, problem (1) factorizes into: In order to write (2) in a more explicit but still widely applicable form, assume that the measurement noise is a zeromean Gaussian noise with information matrix 1   f .Then, the measurement likelihood in (2) becomes: Since maximizing the posterior is the same as minimizing the negative log-posterior, or energy, the MAP estimate in (2) becomes: which is a nonlinear least squares problem.

()
 p is simply a sum of squares, and to minimize it is called nonlinear least squares optimization.A common technique for nonlinear least squares optimization is the Gauss-Newton (GN) method.The Gauss-Newton method performs iteratively, starting from a given initial guess 0 p and updates by the rule: where at each step the update vector  is found by solving the normal equation: A widely used optimization method is a variant of GN called Levenberg-Marquardt (LM), which alters the normal equation as follows: The parameter  rotates the update vector  towards the direction of the steepest descent.Thus, if 0   , pure GN is performed, whereas if  , gradient descent is used.In LM, the update step is performed only if it can significantly reduce the residual error.The parameter  is self-adapted in the LM method.

The Camera Projection Function and Camera Poses
Points in the world 3 j x  R are mapped to the camera image using the observation function: ˆ( , ) ( ) Here, the j x is homogeneous point, i T is the rigid body transformation which consists of the rotation matrix R and translation vector t , and K is the camera calibration matrix (which we assume is known from prior calibration) and ()  proj is the 3D-2D projection function: The camera pose at a time-step i is represented as the rigid body transformation i T .

Pose Estimation Model
Given a set of 3D points j x  x which are associated with 2D measurements ij z , to estimate the camera pose a time-step i i T , we minimize the following energy function using LM algorithm: with respect to the rigid body transformation i T .We use the Huber cost function as a robust kernel to guard against spurious matches.

Pose Optimization with respect to Lie Groups
The optimization methods presented in the previous section are applicable for scalar fields which are defined on Euclidean vector spaces n .However, we want to minimize the reprojection error with respect to the rigid body transformation i T , which includes the rotation 1 2 3 ( , , )  ω in three dimensional space.ω can be any parameterization of rotation in 3D (such as Euler angles or the rotation vector).Performing a rotation by  and then by ω is in general not equivalent to performing a rotation of  ω+ .Vector addition is simply not the right operation to concatenate rotations.Thus, rotations cannot be modelled as Euclidean vector space, but as a Lie group.

Lie group and Lie algebra
A rigid body transformation in 3 can be expressed as an 44  matrix which can be applied to homogeneous position vectors (H.Strasdat., 2010): 01 Here, SO(3) is the Lie group of rotation matrices.The rigid body transformations in 3 form a smooth manifold and therefore a Lie group, which is called the Special Euclidean Group ( SE(3) ).The group operator is the matrix multiplication.
A minimal representation of this transformation is defined by the corresponding Lie algebra (3) se which is the tangent space of SE(3) at the identity.In 3 , the algebra elements are 6-vectors T ( , ) ω v : se algebra can be mapped to the SE(3)   group via the exponential mapping (13) Equation ( 13) is the Rodrigues' formula.
We can get the update vector  from (7) in the tangent space around identity (3) se and mapped back onto the manifold SE(3) , leading to a modified update step: Thus, we can use LM algorithm to solve the pose estimation problem.

EXPERIMENTAL RESLULTS
In this section, we experimentally investigate the LM algorithm for camera pose optimization on the manifolds, and compare the original state-of-the-art solutions to PnP problem with their corresponding optimization versions, including the well-known iterative approach by Lu et al. (Lu, C. P., 2000), denoted as LHM in short, the multi-stage method, put forward by Li et al. (Li, S., 2012), denoted as RPnP, and OPnP method proposed by Zheng (Zheng, Y., 2013).Their optimization versions are denoted as LHM+LM, RPnP+LM and OPnP+LM respectively.Also the direct minimization based method, DLS+++ (Hesch, J. A., 2011), is included.The source codes of LHM, RPnP, OPnP and DLS++ are publicly available on the internet provided in (Zheng, Y., 2013)

Varying Number of Points with Fixed Noise Level
Firstly, we vary the number of points n from 4 to 49, and add zero-mean Gaussian noise with fixed deviation (2 pixels) onto the projection images.At each n, 100 independent tests are performed.The average rotation and translation error are presented in Fig. 1 to Fig. 4. Results show that all the solutions with LM algorithm optimized outperform their original versions, especially the accuracy of RPnP is improved effectively, which demonstrates the effectivity and efficiency of the proposed optimization strategy.We can find that the RPnP is not accurate enough, even in the presence of redundant correspondences, and the major reason lies in its underlying approximation schemes.Also, we can find that compared with other methods, the LHM is not so accurate due to its possible local optimum.Moreover, with the number of points increasing, the accuracy of all solutions are all improved effectively.

Varying Noise Levels with Fixed Number of Points
Then, we fix the number of points n to be 10, and add zeromean Gaussian noise with varying deviation levels (from 0.5 to 5 pixels) onto the projection images.At each noise level, 100 independent tests are performed and the average results are reported.The average rotation and translation error are presented in Fig. 5 to Fig. 8.As shown in Fig. 5 to Fig. 8, the proposed optimization strategy is efficient and effective, as the accuracy of all solutions is improved, especially the RPnP method.Also, we can find that with the noise increasing, the accuracy of all the method decreases.

CONCLUSION
We propose an approach for relative camera pose estimation using optimization method with respect to the Lie group, which can avoid the singularity of Euler angle parameterization of rotation, and make the optimization method such as Gauss-Newton or Levenberg-Marquardt more robust and convenient.Experimental results show that the proposed approach outperform the original method without optimization which is capable of estimate relative camera pose with high accuracy, and it can be widely used in Photogrammetry .
p is the residual error.
, and v is a rotated version of the translation t .Elements of the (3)

Figure 1 .
Figure 1.Mean rotation error w.r.t.varying number of points

Figure 4 .
Figure 4. Median translation error w.r.t.varying number of points

Figure 5 .
Figure 5. Mean rotation error w.r.t.varying noise levels .All the experiments are performed in MATLAB on a laptop with 2.4GHz CPU and 8GB RAM.To acquire a quantitative analysis, all the experiments are implemented with simulated data.We generate a virtual perspective camera, and n 3D reference points in the camera framework, which are randomly distributed in a specific range.All the simulated data parameter settings are below in Table1.