Camera PnPoint is an add-on for Blender that brings a powerful Perspective-n-Point (PnP) solver to the camera tracking workbench. PnP is the problem of estimating the pose of a calibrated camera given a set of known 3D points and their 2D projections in the image.
The add-on also includes a camera Calibration solver that allows adjusting the most relevant camera intrinsics, like focal length and radial distortion coefficients, using projection data from the 3D and 2D markers.
The main difference between this algorithm and other perspective matching tools is that it does not require pictures with multiple vanishing points, or objects with parallel lines for that matter. In addition, unlike the built-in camera motion solver, the add-on relies on ground-truth 3D locations and require only one still picture to find a camera pose.
See a more challenging example here:
This add-on uses OpenCV library, which needs to be installed in the Blender path. The add-on’s preference panel includes a functionality to automatically install the package if it is not found. You may need to start Blender with elevated privileges for this to work.