I need to caculate the pose of a camera using an image of an artificial landmkark. For this porpouse I am trying to use the Perspective n Point approach so I can calculate it using the intrinsic camera matrix, the world coordinates of the landmark (I am using 4 points) and its projection in the image.
There are some algorithms to solve this (PnP, EPnP, RPnP, etc) and I am trying to use the RPnP. I have found an implementation of this here: http://xuchi.weebly.com/rpnp.html
I used this code but I am having some problems because I can't obtain the correct pose.
I am using the P.Corke's Robotics Toolbox for MATLAB to create a CentraCamera with a known pose and calculating the projection of the landmark in this camera, but the rotation and translation that the RPnP returns me is not the same as I defined before.
Anyone has used this RPnP algorithm to solve that kind of problems?