1

I am attempting to estimate absolute camera position for uncalibrated image, i.e. on a single image. I have 2 sets of key points: on 3d model (object coordinates) and 2d image (uv cooordinates). Let's assume the key points are accurate. Then I perform the following steps:

  • I apply standard Direct Linear Transformation (DLT) to estimate the projection matrix P - from 3d "world" to 2d image transformation x = P*X;
  • OpenCV DecomposeProjectionMatrix() function helps to decompose the projection matrix into extrinsic and intrinsic matrices: P = K {R|t};
  • To improve my first guess on rotation and translation matrices, I apply SolvePnP (with Iterative method, as I understood it provides me "the best" solution) function to the key points sets and camera parameters;

While running my combined algorithm on several cases, I noticed that in majority cases SolvePnP returns very close results to the ground truth. The rests results are inaccurate and rotation and translation are far away from the reality.

Q: Is it possible to make improvement for these cases where my current algorithm fails: May be optimize intrinsic parameters based on OpenCV CameraCalibrate(), or apply other SolvePnP algorithms?

1 Answers1

1

Short answer - no.

Long answer: DLT result is statistically not optimal. Moreover, the result of DLT algorithm is unstable if control points lay approximately on a plane. See this slides for details. In that case intrinsics and extrinsics might be inaccurate or even completely wrong.

PnP assumes calibrated camera and if your camera intrinsics are calculated inaccurate, the result will also be inaccurate.

CameraCalibrate(), might help if you have a set of images with different camera positions with known 2D-3D coordinates.

Piotr Siekański
  • 1,665
  • 8
  • 14