Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
dda1bf18
O
Opencv
项目概览
Greenplum
/
Opencv
10 个月 前同步成功
通知
7
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
Opencv
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
dda1bf18
编写于
8月 22, 2020
作者:
C
catree
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add broken implementation note for DLS and UPnP.
Add CV_LOG_DEBUG.
上级
f53ff0d0
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
23 addition
and
7 deletion
+23
-7
modules/calib3d/include/opencv2/calib3d.hpp
modules/calib3d/include/opencv2/calib3d.hpp
+13
-7
modules/calib3d/src/solvepnp.cpp
modules/calib3d/src/solvepnp.cpp
+10
-0
未找到文件。
modules/calib3d/include/opencv2/calib3d.hpp
浏览文件 @
dda1bf18
...
...
@@ -450,8 +450,10 @@ enum SolvePnPMethod {
SOLVEPNP_ITERATIVE
=
0
,
SOLVEPNP_EPNP
=
1
,
//!< EPnP: Efficient Perspective-n-Point Camera Pose Estimation @cite lepetit2009epnp
SOLVEPNP_P3P
=
2
,
//!< Complete Solution Classification for the Perspective-Three-Point Problem @cite gao2003complete
SOLVEPNP_DLS
=
3
,
//!< A Direct Least-Squares (DLS) Method for PnP @cite hesch2011direct
SOLVEPNP_UPNP
=
4
,
//!< Exhaustive Linearization for Robust Camera Pose and Focal Length Estimation @cite penate2013exhaustive
SOLVEPNP_DLS
=
3
,
//!< **Broken implementation. Using this flag will fallback to EPnP.** \n
//!< A Direct Least-Squares (DLS) Method for PnP @cite hesch2011direct
SOLVEPNP_UPNP
=
4
,
//!< **Broken implementation. Using this flag will fallback to EPnP.** \n
//!< Exhaustive Linearization for Robust Camera Pose and Focal Length Estimation @cite penate2013exhaustive
SOLVEPNP_AP3P
=
5
,
//!< An Efficient Algebraic Solution to the Perspective-Three-Point Problem @cite Ke17
SOLVEPNP_IPPE
=
6
,
//!< Infinitesimal Plane-Based Pose Estimation @cite Collins14 \n
//!< Object points must be coplanar.
...
...
@@ -808,7 +810,7 @@ vectors, respectively, and further optimizes them.
- **SOLVEPNP_ITERATIVE** 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
projectPoints ) objectPoints .
@ref
projectPoints ) objectPoints .
- **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" (@cite gao2003complete).
In this case the function requires exactly four object and image points.
...
...
@@ -817,9 +819,11 @@ In this case the function requires exactly four object and image points.
In this case the function requires exactly four object and image points.
- **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" (@cite lepetit2009epnp).
- **SOLVEPNP_DLS** Method is based on the paper of J. Hesch and S. Roumeliotis.
- **SOLVEPNP_DLS** **Broken implementation. Using this flag will fallback to EPnP.** \n
Method is based on the paper of J. Hesch and S. Roumeliotis.
"A Direct Least-Squares (DLS) Method for PnP" (@cite hesch2011direct).
- **SOLVEPNP_UPNP** Method is based on the paper of A. Penate-Sanchez, J. Andrade-Cetto,
- **SOLVEPNP_UPNP** **Broken implementation. Using this flag will fallback to EPnP.** \n
Method is based on the paper of A. Penate-Sanchez, J. Andrade-Cetto,
F. Moreno-Noguer. "Exhaustive Linearization for Robust Camera Pose and Focal Length
Estimation" (@cite penate2013exhaustive). In this case the function also estimates the parameters \f$f_x\f$ and \f$f_y\f$
assuming that both have the same value. Then the cameraMatrix is updated with the estimated
...
...
@@ -1143,9 +1147,11 @@ In this case the function requires exactly four object and image points.
In this case the function requires exactly four object and image points.
- **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" (@cite lepetit2009epnp).
- **SOLVEPNP_DLS** Method is based on the paper of Joel A. Hesch and Stergios I. Roumeliotis.
- **SOLVEPNP_DLS** **Broken implementation. Using this flag will fallback to EPnP.** \n
Method is based on the paper of Joel A. Hesch and Stergios I. Roumeliotis.
"A Direct Least-Squares (DLS) Method for PnP" (@cite hesch2011direct).
- **SOLVEPNP_UPNP** Method is based on the paper of A.Penate-Sanchez, J.Andrade-Cetto,
- **SOLVEPNP_UPNP** **Broken implementation. Using this flag will fallback to EPnP.** \n
Method is based on the paper of A.Penate-Sanchez, J.Andrade-Cetto,
F.Moreno-Noguer. "Exhaustive Linearization for Robust Camera Pose and Focal Length
Estimation" (@cite penate2013exhaustive). In this case the function also estimates the parameters \f$f_x\f$ and \f$f_y\f$
assuming that both have the same value. Then the cameraMatrix is updated with the estimated
...
...
modules/calib3d/src/solvepnp.cpp
浏览文件 @
dda1bf18
...
...
@@ -48,6 +48,7 @@
#include "ap3p.h"
#include "ippe.hpp"
#include "opencv2/calib3d/calib3d_c.h"
#include <opencv2/core/utils/logger.hpp>
namespace
cv
{
...
...
@@ -780,6 +781,15 @@ int solvePnPGeneric( InputArray _opoints, InputArray _ipoints,
vector
<
Mat
>
vec_rvecs
,
vec_tvecs
;
if
(
flags
==
SOLVEPNP_EPNP
||
flags
==
SOLVEPNP_DLS
||
flags
==
SOLVEPNP_UPNP
)
{
if
(
flags
==
SOLVEPNP_DLS
)
{
CV_LOG_DEBUG
(
NULL
,
"Broken implementation for SOLVEPNP_DLS. Fallback to EPnP."
);
}
else
if
(
flags
==
SOLVEPNP_UPNP
)
{
CV_LOG_DEBUG
(
NULL
,
"Broken implementation for SOLVEPNP_UPNP. Fallback to EPnP."
);
}
Mat
undistortedPoints
;
undistortPoints
(
ipoints
,
undistortedPoints
,
cameraMatrix
,
distCoeffs
);
epnp
PnP
(
cameraMatrix
,
opoints
,
undistortedPoints
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录