Converting a 2D image captured using camera of an iPhone or Android can be converted to 3D point cloud if we know the camera matrix. I have partial knowledge of how to compute some parameters given some other parameters but I would need your help for filling the spaces in my knowledge.
Given world coordinates(W), corresponding image coordinates(X) and camera intrinsics matrix (K). Task is to project a 3D point cloud into the world.
- Estimate Homography(H) using X and W.
- Estimate extrinsics matrix(E) using K and H.
- Compute the camera matrix using K and E.
- Project 3D points onto the image using camera matrix.
So, if I know at least 4 3D points and its corresponding pixel locations, provided I already know camera intrinsics then I can compute all the above things as mentioned.
But if I don't know camera intrinsics, how do I compute it? And how can I get at least 4 correspondences of world and image coordinates? Is there an easier way to get the camera matrix than the way I suggested?
I am not looking for camera calibration examples online but I want to write code from scratch. Any help regarding this is very much appreciated!