【论文阅读】EPnP: An Accurate O(n) Solution to the PnP Problem

news/2024/11/28 19:44:23/

目录

  • EPnP: An Accurate O(n) Solution to the PnP Problem
    • Opencv.solvePnP documentation
    • similar functions
    • cv::SOLVEPNP_EPNP: Paper 008

EPnP: An Accurate O(n) Solution to the PnP Problem

Opencv.solvePnP documentation

solvePnP

bool cv::solvePnP(
InputArray 	objectPoints,
InputArray 	imagePoints,
InputArray 	cameraMatrix,
InputArray 	distCoeffs,
OutputArray 	rvec,
OutputArray 	tvec,
bool 	useExtrinsicGuess = false,
int 	flags = SOLVEPNP_ITERATIVE 
)

Finds an object pose from 3D-2D point correspondences.
This function returns the rotation and the translation vectors that transform a 3D point expressed in the object coordinate frame to the camera coordinate frame, using different methods:

  • P3P methods (SOLVEPNP_P3P, SOLVEPNP_AP3P): need 4 input points to return a unique solution.
  • SOLVEPNP_IPPE Input points must be >= 4 and object points must be coplanar(共面).
  • SOLVEPNP_IPPE_SQUARE Special case suitable for marker pose estimation. Number of input points must be 4. Object points must be defined in the following order:
    point 0: [-squareLength / 2, squareLength / 2, 0]
    point 1: [ squareLength / 2, squareLength / 2, 0]
    point 2: [ squareLength / 2, -squareLength / 2, 0]
    point 3: [-squareLength / 2, -squareLength / 2, 0]
  • for all the other flags, number of input points must be >= 4 and object points can be in any configuration.

Flags of solvePnP

  • cv::SOLVEPNP_ITERATIVE Default solution. Iterative method is based on a Levenberg-Marquardt optimization. In this case the function finds such a pose that minimizes reprojection error, that is the sum of squared distances between the observed projections “imagePoints” and the projected (using cv::projectPoints ) “objectPoints”. Initial solution for non-planar(非平面) “objectPoints” needs at least 6 points and uses the DLT algorithm. Initial solution for planar “objectPoints” needs at least 4 points and uses pose from homography decomposition(单应性分解).

  • cv::SOLVEPNP_P3P Method is based on the paper of X.S. Gao, X.-R. Hou, J. Tang, H.-F. Chang “Complete Solution Classification for the Perspective-Three-Point Problem”. In this case the function requires exactly 4 object and image points.=>same as use solveP3P with same flag

  • cv::SOLVEPNP_AP3P Method is based on the paper of T. Ke, S. Roumeliotis “An Efficient Algebraic Solution to the Perspective-Three-Point Problem” . In this case the function requires exactly 4 object and image points.=>same as use solveP3P with same flag

  • cv::SOLVEPNP_EPNP Method has been introduced by F. Moreno-Noguer, V. Lepetit and P. Fua in the paper “EPnP: Efficient Perspective-n-Point Camera Pose Estimation” .

  • cv::SOLVEPNP_DLS Broken implementation. Using this flag will fallback to EPnP.

  • cv::SOLVEPNP_UPNP Broken implementation. Using this flag will fallback to EPnP.

  • cv::SOLVEPNP_IPPE Method is based on the paper of T. Collins and A. Bartoli. “Infinitesimal Plane-Based Pose Estimation”. This method requires coplanar object points.

  • cv::SOLVEPNP_IPPE_SQUARE Method is based on the paper of Toby Collins and Adrien Bartoli. “Infinitesimal Plane-Based Pose Estimation”. This method is suitable for marker pose estimation. It requires 4 coplanar object points defined in the following order:
    point 0: [-squareLength / 2, squareLength / 2, 0]
    point 1: [ squareLength / 2, squareLength / 2, 0]
    point 2: [ squareLength / 2, -squareLength / 2, 0]
    point 3: [-squareLength / 2, -squareLength / 2, 0]

  • cv::SOLVEPNP_SQPNP Method is based on the paper “A Consistently Fast and Globally Optimal Solution to the Perspective-n-Point Problem” by G. Terzakis and M.Lourakis. It requires 3 or more points.

similar functions

  1. cv::solveP3P()
    Finds an object pose from 3 3D-2D point correspondences.

  2. cv::solvePnPGeneric()

Finds an object pose from 3D-2D point correspondences.

flags:

  • P3P methods (SOLVEPNP_P3P, SOLVEPNP_AP3P)
  • SOLVEPNP_IPPE
  • SOLVEPNP_IPPE_SQUARE
  1. solvePnPRansac()
    using the RANSAC scheme

  2. solvePnPRefineLM()
    Refine a pose (the translation and the rotation that transform a 3D point expressed in the object coordinate frame to the camera coordinate frame) from a 3D-2D point correspondences and starting from an initial solution.

  3. solvePnPRefineVVS()
    Refine a pose (the translation and the rotation that transform a 3D point expressed in the object coordinate frame to the camera coordinate frame) from a 3D-2D point correspondences and starting from an initial solution.

cv::SOLVEPNP_EPNP: Paper 008

论文内容:

propose a non-iterative solution to the PnP problem—the estimation of the pose of a cali- brated camera from n 3D-to-2D point correspondences— whose computational complexity grows linearly with n.

EPNP是求解PnP问题的非迭代方法。
优势是:

  1. 时间复杂度低,O(n),其他的是指数级,所以耗时短;
  2. 不依赖初始化;
  3. 鲁棒性高;
  4. 误差小。
  5. 用高斯牛顿方法可以进一步提高准确率,但计算耗时不会太大。

看论文里的实验数据,EPNP方法求得的rotation和translation存在随着匹配点数的增多,逐渐收敛趋于稳定的过程

图上看的话,噪声恒定的情况下,差不多10个点左右趋于收敛。


http://www.ppmy.cn/news/62999.html

相关文章

Py之imbalanced-ensemble:imbalanced-ensemble库的简介、安装、使用方法之详细攻略

Py之imbalanced-ensemble:imbalanced-ensemble库的简介、安装、使用方法之详细攻略 目录 imbalanced-ensemble库的简介 imbalanced-ensemble库的安装 imbalanced-ensemble库的使用方法 1、基础用法 imbalanced-ensemble库的简介 imbalanced-ensemble是一个用于处…

晶振概述及工作原理

晶振在电路板中随处可见,只要用到处理器的地方就必定有晶振的存在,即使没有外部晶振,芯片内部也有晶振。 晶振概述 晶振一般指晶体振荡器。晶体振荡器是指从一块石英晶体上按一定方位角切下薄片(简称为晶片)&#xf…

中国社科院与美国杜兰大学金融管理硕士项目,引领你走在金融行业前沿

作为金融领域从业人员时刻都在关注行业最新资讯,只有掌握一手的前沿讯息,才能在职场上无往不胜。针对在职的你,如何利用业余时间让自己更增值呢,中国社科院与美国杜兰大学金融管理硕士项目引领你走在金融行业前沿。 金融管理硕士…

Spring的第十三阶段:Spring之JdbcTemplate使用(02)

Spring之JdbcTemplate使用 在Spring中提供了对jdbc的封装类叫JdbcTemplate。它可以很方便的帮我们执行sql语句,操作数据库。 1、先准备单表的数据库数据 drop database if exists jdbctemplate;create database jdbctemplate;use jdbctemplate;create table empl…

bigdata-file-viewer--大数据文件查看工具

bigdata-file-viewer--大数据文件查看工具 bigdata-file-viewer是什么常用功能安装 bigdata-file-viewer是什么 一个跨平台(Windows,MAC,Linux)桌面应用程序,用于查看常见的大数据二进制格式,例如Parquet&…

[论文分享] VOS: Learning What You Don‘t Know by Virtual Outlier Synthesis

这篇文章是ICLR‘ 2022的一篇文章。 No.contentPAPER{ICLR’ 2022} VOS: Learning What You Don’t Know by Virtual Outlier SynthesisURL论文地址CODE代码地址 Motivation 现有OOD Detection方法大多依赖于真实的离群点数据集进行模型正则化,实际应用中过于昂…

qiankun微应用之间、主微应用之间相互跳转方式总结与实践

一、子应用互相访问 1、背景 (1)未来可能需要做不同子应用菜单的合并,如在bi应用下的侧边栏或者别的地方,需要跳转到数据治理的数仓主题里,或者涉及到子应用值改变,其他应用也需要使用; &…

electron打包运行白屏、Can not find modules ‘xxx‘,Dynamic Linking Error

Can not find modules 原因:应该写在dependencies里的写在了devDependencies,或者相反。有些依赖写反了是可以运行的,但是打包不行 在Electron项目中的package.json文件中,dependencies和devDependencies都是用来声明应用程序所…