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
319dbd2e
Commit
319dbd2e
authored
Jul 30, 2014
by
edgarriba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code tutorial
parent
924e0624
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
0 deletions
+54
-0
Model.h
...al_code/calib3d/real_time_pose_estimation/include/Model.h
+54
-0
No files found.
samples/cpp/tutorial_code/calib3d/real_time_pose_estimation/include/Model.h
0 → 100644
View file @
319dbd2e
/*
* Model.h
*
* Created on: Apr 9, 2014
* Author: edgar
*/
#ifndef MODEL_H_
#define MODEL_H_
#include <iostream>
#include <opencv2/core/core.hpp>
#include <opencv2/features2d/features2d.hpp>
class
Model
{
public
:
Model
();
virtual
~
Model
();
std
::
vector
<
cv
::
Point2f
>
get_points2d_in
()
const
{
return
list_points2d_in_
;
}
std
::
vector
<
cv
::
Point2f
>
get_points2d_out
()
const
{
return
list_points2d_out_
;
}
std
::
vector
<
cv
::
Point3f
>
get_points3d
()
const
{
return
list_points3d_in_
;
}
std
::
vector
<
cv
::
KeyPoint
>
get_keypoints
()
const
{
return
list_keypoints_
;
}
cv
::
Mat
get_descriptors
()
const
{
return
descriptors_
;
}
int
get_numDescriptors
()
const
{
return
descriptors_
.
rows
;
}
void
add_correspondence
(
const
cv
::
Point2f
&
point2d
,
const
cv
::
Point3f
&
point3d
);
void
add_outlier
(
const
cv
::
Point2f
&
point2d
);
void
add_descriptor
(
const
cv
::
Mat
&
descriptor
);
void
add_keypoint
(
const
cv
::
KeyPoint
&
kp
);
void
save
(
const
std
::
string
path
);
void
load
(
const
std
::
string
path
);
private
:
/** The current number of correspondecnes */
int
n_correspondences_
;
/** The list of 2D points on the model surface */
std
::
vector
<
cv
::
KeyPoint
>
list_keypoints_
;
/** The list of 2D points on the model surface */
std
::
vector
<
cv
::
Point2f
>
list_points2d_in_
;
/** The list of 2D points outside the model surface */
std
::
vector
<
cv
::
Point2f
>
list_points2d_out_
;
/** The list of 3D points on the model surface */
std
::
vector
<
cv
::
Point3f
>
list_points3d_in_
;
/** The list of 2D points descriptors */
cv
::
Mat
descriptors_
;
};
#endif
/* OBJECTMODEL_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