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.
cv::solvePnP()
? You will get the camera pose from a set of known 3D world/object points and the corresponding set of 2D image points. From any 3D point in the world/object frame, you will be able to project it to the image plane. The inverse is not true (you cannot from a 2D image point get the 3D point in the camera frame as there is an infinite number of 3D points along the image ray). – Catree