Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You want to look at the solvePnP function. It is designed to give you the translation and rotation between world points and the camera. You have four points, the end of each axis and the origin. I assume you know how long the vectors are in real space? Or at least that they are all the same length?

Set the four points as (0,0,0), (1,0,0), (0,1,0), (0,0,1) and then the image points are, of course, what you see in the image. I would use the SOLVEPNP_P3P method, since it requires exactly four, and you have exactly four points.

Once you have your rvec and tvec, you have everything you need to transform the image to view it from above.