Perspective-$n$-Point (P$n$P) stands as a fundamental algorithm for pose estimation in various applications. In this paper, we present a new approach to the P$n$P problem with relaxed constraints, eliminating the need for precise 3D coordinates or complete calibration data. We refer to it as AP$n$P due to its ability to handle unknown anisotropic scaling factors of 3D coordinates or alternatively two distinct focal lengths in addition to the conventional rigid pose. Through algebraic manipulations and a novel parametrization, both cases are brought into similar forms that distinguish themselves primarily by the order of a rotation and an anisotropic scaling operation. AP$n$P furthermore brings down both cases to an identical polynomial problem, which is solved using the Gr\"obner basis approach. Experimental results on both simulated and real datasets demonstrate the effectiveness of AP$n$P, providing a more flexible and practical solution to several pose estimation tasks. Code: https://github.com/goldoak/APnP.
翻译:透视-$n$-点(P$n$P)算法是多种应用中位姿估计的基础算法。本文提出了一种新的松弛约束P$n$P问题求解方法,消除了对精确三维坐标或完整标定数据的需求。该方法能够处理三维坐标的未知各向异性缩放因子,或替代性地处理两个不同焦距参数及传统刚体位姿,故称为AP$n$P。通过代数变换与新颖的参数化方法,这两种情形被转化为相似形式,其核心差异仅在于旋转操作与各向异性缩放操作的执行顺序。AP$n$P进一步将两种情形归约为同一多项式问题,并采用Gröbner基方法求解。在仿真数据集与真实数据集上的实验结果表明,AP$n$P能够有效提供多种位姿估计任务中更灵活、更实用的解决方案。代码地址:https://github.com/goldoak/APnP。