When reading through the Dustr paper, I came across an interesting algorithm.
How do you estimate the camera intrinsic parameters? Can it be posed as an optimization problem?
Recall that the intrinsic camera parameters is the matrix given by
where are the focal lengths along the and axes of the image respectively, is the axis skew, and are the principal point offsets from the image plane's origin. The principal point is the point where the ray from the camera perpendicular to the image, intersects the image.
Usually, it is standard practice to assume that the camera is well positioned (without skew) and calibrated that the principal point is at the center of the image plane i.e . Furthermore, we assume that the pixel are almost squares . Thus, we only need to estimate the focal length to get the complete intrinsic matrix.
The point map of the given image and corresponding depth map can be computed in a straightforward manner as
Given a point map (which is naturally expressed in the coordinate frame of its corresponding image ), the focal length can be expressed as the following minimization problem
Where are the pixel coordinates with respect to the image center (principal point), is the projection of the -coordinates of the 3D point map onto the image plane at the index , and is the confidence map associated with the estimated depth map . When the original (metric) depth map is known,
The above equation (3) finds the focal length that minimizes the projection error.

Projecting 3D point maps back to the image plane for estimating focal length.