To simplify, assume faces and corners of the square are labeled and the camera lens if whatever makes this simplest (a 90 degree field of view projection?)

The application: using a known and labeled unit square to assist an AR app.

For the case of a perfectly centered rotated on one axis, we can use the estimated distance from the axis the square was rotated around plus the ratio of sizes of the distorted sides.

But for an arbitrary view, the problem becomes much much harder.

Links to the general case of this problem in projective geometry also appreciated


1 Answer 1


This problem is known as camera calibration. The goal is estimating the various parameters of a "camera":

  • The intrinsic parameters: Things like focal length, distortion of the lens, sensor parameters etc.
  • Extrinsic parameters: Orientation of position of the camera.

To robustly determine those from an image that contains labelled points you usually need more than one image. A typical way to do this is recording many images of a chessboard pattern. But as soon as you have determined all the intrinsic parameters, you could save those for future applications as they do not have to be estimated over and over again.

I recommend reading the introduction to camera calibration of openCV:




Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.