I have a single image and several known points and its projections to image plane. (each 3d point has projection to 2d). My goal is to find matrix 4x4, for easy calculation of projection of any 3d point to image plane. I tried to use Monte-Carlo method from this topic: How do I reverse-project 2D points into 3D? But result matrix is good for oXY plane, not for Z coordinate (points with non-zero Z are projected incorrectly). Also I used OpenCV.CalibrateCamera method. I got rotation matrix, camera matrix and translation vector, but it isn't good for non-zero Z points too. In addition, I am not interested in 3 matrices, I just want to get one matrix 4x4 for projecting and unprojecting points.
I'm pretty sure that my problem has solution, but doesn't know how.