A new method is proposed to compare and evaluate the accuracy and robustness of Perspective-n-Points (PnP) algorithms, which bases on the principle that position and pose of a camera in the world coordinate system is unique when the camera captures an image of a target. First, a world coordinate system, a camera coordinate system and several target coordinate systems are established, and transformational relations from the world coordinate system to each target coordinate system are known. Second, the transformational relations from each target coordinate system to the camera coordinate system are calculated from theoretical simulation and experimental test, and furthermore, the transformational relations from the world coordinate system to the camera coordinate system are obtained. Third, the average and variance of the different transformational relations are calculated, and the value of the variance can be used to evaluate the accuracy and robustness of the algorithms. Finally, the EPnP and LHM algorithms are compared by the proposed method. The comparison results show that the LHM is more accurate and more robust than EPnP, and it consistent with previous comparison method using rotation error and translation error.