Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
3b24aa24
Commit
3b24aa24
authored
Jul 30, 2014
by
edgarriba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code tutorial
parent
be4c1afb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
0 deletions
+53
-0
PnPProblem.h
...de/calib3d/real_time_pose_estimation/include/PnPProblem.h
+53
-0
No files found.
samples/cpp/tutorial_code/calib3d/real_time_pose_estimation/include/PnPProblem.h
0 → 100644
View file @
3b24aa24
/*
* PnPProblem.h
*
* Created on: Mar 28, 2014
* Author: Edgar Riba
*/
#ifndef PNPPROBLEM_H_
#define PNPPROBLEM_H_
#include <iostream>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include "Mesh.h"
#include "ModelRegistration.h"
class
PnPProblem
{
public
:
explicit
PnPProblem
(
const
double
param
[]);
// custom constructor
virtual
~
PnPProblem
();
bool
backproject2DPoint
(
const
Mesh
*
mesh
,
const
cv
::
Point2f
&
point2d
,
cv
::
Point3f
&
point3d
);
bool
intersect_MollerTrumbore
(
Ray
&
R
,
Triangle
&
T
,
double
*
out
);
std
::
vector
<
cv
::
Point2f
>
verify_points
(
Mesh
*
mesh
);
cv
::
Point2f
backproject3DPoint
(
const
cv
::
Point3f
&
point3d
);
bool
estimatePose
(
const
std
::
vector
<
cv
::
Point3f
>
&
list_points3d
,
const
std
::
vector
<
cv
::
Point2f
>
&
list_points2d
,
int
flags
);
void
estimatePoseRANSAC
(
const
std
::
vector
<
cv
::
Point3f
>
&
list_points3d
,
const
std
::
vector
<
cv
::
Point2f
>
&
list_points2d
,
int
flags
,
cv
::
Mat
&
inliers
,
int
iterationsCount
,
float
reprojectionError
,
float
confidence
);
cv
::
Mat
get_A_matrix
()
const
{
return
_A_matrix
;
}
cv
::
Mat
get_R_matrix
()
const
{
return
_R_matrix
;
}
cv
::
Mat
get_t_matrix
()
const
{
return
_t_matrix
;
}
cv
::
Mat
get_P_matrix
()
const
{
return
_P_matrix
;
}
void
set_P_matrix
(
const
cv
::
Mat
&
R_matrix
,
const
cv
::
Mat
&
t_matrix
);
private
:
/** The calibration matrix */
cv
::
Mat
_A_matrix
;
/** The computed rotation matrix */
cv
::
Mat
_R_matrix
;
/** The computed translation matrix */
cv
::
Mat
_t_matrix
;
/** The computed projection matrix */
cv
::
Mat
_P_matrix
;
};
#endif
/* PNPPROBLEM_H_ */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment