I want to add to a captured frame from a camera a mesh model (Let's say a cube)
I also know all the information about where to put the cube:
- Translation matrix - relative to the camera
- Rotation matrix - relative to the camera
- camera calibration matrix - focal length, principal point, etc. (intrinsic parameters)
How can I convert this information to model/view/projection matrices?
What should be the values to set to these matrices?
For example, let's say that I want to display the point [x, y, z, 1] on the screen, then that should be something like: [u, v, 1] = K * [R | T] * [x, y, z, 1], while:
u, v are the coordinates in the screen (or camera capture) and:
K, R and T are intrinsic camera parameters, rotation and translation, respectively.
How to convert K, R, T to model/view/projection matrices?