Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
wolf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mobile_robotics
wolf_projects
wolf_lib
wolf
Commits
756c1d72
Commit
756c1d72
authored
8 years ago
by
Jaime Tarrasó Martínez
Browse files
Options
Downloads
Patches
Plain Diff
Remove constructors from feature_point_image
parent
ef161c35
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/feature_point_image.cpp
+0
-8
0 additions, 8 deletions
src/feature_point_image.cpp
src/feature_point_image.h
+43
-36
43 additions, 36 deletions
src/feature_point_image.h
with
43 additions
and
44 deletions
src/feature_point_image.cpp
+
0
−
8
View file @
756c1d72
...
@@ -3,14 +3,6 @@
...
@@ -3,14 +3,6 @@
namespace
wolf
{
namespace
wolf
{
FeaturePointImage
::
FeaturePointImage
(
const
Eigen
::
Vector2s
&
_measurement
)
:
FeatureBase
(
"POINT IMAGE"
,
_measurement
,
Eigen
::
MatrixXs
::
Zero
(
0
,
0
)),
is_known_
(
false
)
{
keypoint_
.
pt
.
x
=
float
(
measurement_
(
0
));
keypoint_
.
pt
.
y
=
float
(
measurement_
(
1
));
//
}
FeaturePointImage
::~
FeaturePointImage
()
FeaturePointImage
::~
FeaturePointImage
()
{
{
//
//
...
...
This diff is collapsed.
Click to expand it.
src/feature_point_image.h
+
43
−
36
View file @
756c1d72
...
@@ -29,32 +29,35 @@ class FeaturePointImage : public FeatureBase
...
@@ -29,32 +29,35 @@ class FeaturePointImage : public FeatureBase
bool
is_known_
;
bool
is_known_
;
public:
public:
FeaturePointImage
(
const
Eigen
::
Vector2s
&
_measurement
);
// FeaturePointImage(const Eigen::Vector2s& _measurement) :
// FeatureBase("POINT IMAGE", _measurement, Eigen::MatrixXs::Zero(0, 0)), is_known_(false)
FeaturePointImage
(
const
Eigen
::
Vector2s
&
_measurement
,
const
Eigen
::
Matrix2s
&
_meas_covariance
)
:
// {
FeatureBase
(
"POINT IMAGE"
,
_measurement
,
_meas_covariance
),
is_known_
(
false
)
// keypoint_.pt.x = float(measurement_(0));
{
// keypoint_.pt.y = float(measurement_(1));
keypoint_
.
pt
.
x
=
float
(
measurement_
(
0
));
// //
keypoint_
.
pt
.
y
=
float
(
measurement_
(
1
));
// }
}
// FeaturePointImage(const Eigen::Vector2s& _measurement, const Eigen::Matrix2s& _meas_covariance) :
FeaturePointImage
(
const
cv
::
KeyPoint
&
_keypoint
,
// FeatureBase("POINT IMAGE", _measurement, _meas_covariance), is_known_(false)
const
cv
::
Mat
&
_descriptor
,
bool
_is_known
)
:
// {
FeatureBase
(
"POINT IMAGE"
,
Eigen
::
Vector2s
::
Zero
(),
Eigen
::
Matrix2s
::
Identity
()),
// keypoint_.pt.x = float(measurement_(0));
keypoint_
(
_keypoint
),
// keypoint_.pt.y = float(measurement_(1));
descriptor_
(
_descriptor
)
// }
{
measurement_
(
0
)
=
Scalar
(
_keypoint
.
pt
.
x
);
// FeaturePointImage(const cv::KeyPoint& _keypoint, const cv::Mat& _descriptor, bool _is_known) :
measurement_
(
1
)
=
Scalar
(
_keypoint
.
pt
.
y
);
// FeatureBase("POINT IMAGE", Eigen::Vector2s::Zero(), Eigen::Matrix2s::Identity()), keypoint_(_keypoint), descriptor_(
is_known_
=
_is_known
;
// _descriptor)
}
// {
// measurement_(0) = Scalar(_keypoint.pt.x);
FeaturePointImage
(
const
cv
::
KeyPoint
&
_keypoint
,
// measurement_(1) = Scalar(_keypoint.pt.y);
const
cv
::
Mat
&
_descriptor
,
const
Eigen
::
Matrix2s
&
_meas_covariance
)
:
// is_known_ = _is_known;
FeatureBase
(
"POINT IMAGE"
,
Eigen
::
Vector2s
::
Zero
(),
_meas_covariance
),
//
keypoint_
(
_keypoint
),
// }
descriptor_
(
_descriptor
),
is_known_
(
false
)
FeaturePointImage
(
const
cv
::
KeyPoint
&
_keypoint
,
const
cv
::
Mat
&
_descriptor
,
const
Eigen
::
Matrix2s
&
_meas_covariance
)
:
FeatureBase
(
"POINT IMAGE"
,
Eigen
::
Vector2s
::
Zero
(),
_meas_covariance
),
keypoint_
(
_keypoint
),
descriptor_
(
_descriptor
),
is_known_
(
false
)
{
{
measurement_
(
0
)
=
Scalar
(
_keypoint
.
pt
.
x
);
measurement_
(
0
)
=
Scalar
(
_keypoint
.
pt
.
x
);
measurement_
(
1
)
=
Scalar
(
_keypoint
.
pt
.
y
);
measurement_
(
1
)
=
Scalar
(
_keypoint
.
pt
.
y
);
...
@@ -63,18 +66,10 @@ class FeaturePointImage : public FeatureBase
...
@@ -63,18 +66,10 @@ class FeaturePointImage : public FeatureBase
virtual
~
FeaturePointImage
();
virtual
~
FeaturePointImage
();
const
cv
::
KeyPoint
&
getKeypoint
()
const
;
const
cv
::
KeyPoint
&
getKeypoint
()
const
;
void
setKeypoint
(
const
cv
::
KeyPoint
&
_kp
)
void
setKeypoint
(
const
cv
::
KeyPoint
&
_kp
);
{
keypoint_
=
_kp
;
measurement_
(
0
)
=
_kp
.
pt
.
x
;
measurement_
(
1
)
=
_kp
.
pt
.
y
;
}
const
cv
::
Mat
&
getDescriptor
()
const
;
const
cv
::
Mat
&
getDescriptor
()
const
;
void
setDescriptor
(
const
cv
::
Mat
&
_descriptor
)
void
setDescriptor
(
const
cv
::
Mat
&
_descriptor
);
{
descriptor_
=
_descriptor
;
}
bool
isKnown
();
bool
isKnown
();
void
setIsKnown
(
bool
_is_known
);
void
setIsKnown
(
bool
_is_known
);
...
@@ -92,11 +87,23 @@ inline const cv::KeyPoint& FeaturePointImage::getKeypoint() const
...
@@ -92,11 +87,23 @@ inline const cv::KeyPoint& FeaturePointImage::getKeypoint() const
return
keypoint_
;
return
keypoint_
;
}
}
inline
void
FeaturePointImage
::
setKeypoint
(
const
cv
::
KeyPoint
&
_kp
)
{
keypoint_
=
_kp
;
measurement_
(
0
)
=
_kp
.
pt
.
x
;
measurement_
(
1
)
=
_kp
.
pt
.
y
;
}
inline
const
cv
::
Mat
&
FeaturePointImage
::
getDescriptor
()
const
inline
const
cv
::
Mat
&
FeaturePointImage
::
getDescriptor
()
const
{
{
return
descriptor_
;
return
descriptor_
;
}
}
inline
void
FeaturePointImage
::
setDescriptor
(
const
cv
::
Mat
&
_descriptor
)
{
descriptor_
=
_descriptor
;
}
inline
bool
FeaturePointImage
::
isKnown
()
inline
bool
FeaturePointImage
::
isKnown
()
{
{
return
is_known_
;
return
is_known_
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment