I'm trying to determine camera orientation and focal length given camera position and two 3D-2D points correspondences (4 degrees of freedom → 2x2D points).
My reference camera orientation is towards positive world z axis, with x and y camera coordinates equal to x and y world coordinates. The image plane of the reference camera (in both the world and the camera reference frames) is $$ \left( \begin{array}{c} [-0.5,0.5]\\ [-0.5,0.5] \\ f \end{array} \right) $$
Known data:
3D world coordinates of two points, $$ \left( \begin{array}{c} x_i\\ y_i \\ z_i \end{array} \right) $$
2D coordinates of those two points on the image plane (i.e. X and Y coordinates of those points in the camera reference frame, the Z coordinate being the unknown focal length f)
Camera position in world coordinates, $$ \left( \begin{array}{c} x_C\\ y_C \\ z_C \end{array} \right) $$
How can I retrieve the focal length and the rotation matrix? Thank you!