title: Why Direct Linear Transformation (DLT) cannot give the optimal camera extrinsics?
body: <p>I'm reading the source code of function <a href="https://github.com/opencv/opencv/blob/b46719b0931b256ab68d5f833b8fadd83737ddd1/modules/calib3d/src/solvepnp.cpp#L55" rel="noreferrer"><code>solvePnP()</code></a> in OpenCV, when the <code>flags</code> param uses default value <code>SOLVEPNP_ITERATIVE</code>, it's calling <a href="https://github.com/opencv/opencv/blob/f824db4803855ca30bf782f8bb37ca39051f319f/modules/calib3d/src/calibration.cpp#L923" rel="noreferrer"><code>cvFindExtrinsicCameraParams2</code></a>, in which it FIRST uses the <strong><a href="https://en.wikipedia.org/wiki/Direct_linear_transformation" rel="noreferrer">DLT</a></strong> algorithm (if we have a non-planar set of 3D points) to initialize the 6DOF camera pose, and SECOND uses <code>CvLevMarq solver</code> to minimize the reprojection error.</p>
  
  <p>My question is: the DLT fomulates the problem as a linear least square problem and solves it with SVD decomposition, it seems to be an optimal solution, why do we still use Lev-Marq iterative method afterwards? </p>
  
  <p>Or, what's the issue/limitation of the DLT algorithm to be inferior? Why is the closed-form solution result in a <strong>LOCAL</strong> minimum to the cost function?</p>