Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
objectslam
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
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
plugins
objectslam
Commits
d230ff89
Commit
d230ff89
authored
2 years ago
by
ydepledt
Browse files
Options
Downloads
Patches
Plain Diff
Comments and make more readable nbOfDifferentMatches function
parent
e1e52e3c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/processor/processor_tracker_landmark_object.cpp
+8
-2
8 additions, 2 deletions
src/processor/processor_tracker_landmark_object.cpp
with
8 additions
and
2 deletions
src/processor/processor_tracker_landmark_object.cpp
+
8
−
2
View file @
d230ff89
...
...
@@ -657,10 +657,16 @@ int ProcessorTrackerLandmarkObject::nbOfDifferentMatches(const std::vector<std::
for
(
auto
match
:
matches
)
{
//Nb of occurences of indexes
int
index_last_feat_occurrence
=
std
::
count
(
index_last_feat
.
begin
(),
index_last_feat
.
end
(),
match
.
first
);
int
index_incoming_feat_occurrence
=
std
::
count
(
index_incoming_feat
.
begin
(),
index_incoming_feat
.
end
(),
match
.
second
);
//Check if the pair has unique indexes
if
(
!
(
std
::
count
(
index_last_feat
.
begin
(),
index_last_feat
.
end
(),
match
.
first
))
&&
!
(
std
::
count
(
index_incoming_feat
.
begin
(),
index_incoming_feat
.
end
(),
match
.
second
))
)
if
(
index_last_feat
_occurrence
==
0
&&
index_incoming_feat_occurrence
==
0
)
{
nb_of_diff_matches
++
;
//Add unique indexes in vector
index_last_feat
.
push_back
(
match
.
first
);
index_incoming_feat
.
push_back
(
match
.
second
);
}
...
...
@@ -689,7 +695,7 @@ bool ProcessorTrackerLandmarkObject::isInliers(Eigen::Isometry3d cl_M_ol, Eigen:
Eigen
::
Matrix3d
wRf_i
=
identity
.
linear
();
quat_feat_identity
.
coeffs
()
=
R2q
(
wRf_i
).
coeffs
().
transpose
();
Vector3d
pos_feat_identity
=
identity
.
translation
();
// Error between identity and ol_M_oi
double
e_pos
=
(
pos_feat_identity
-
pos_feat
).
norm
();
double
e_rot
=
log_q
(
quat_feat_identity
.
conjugate
()
*
quat_feat
).
norm
();
...
...
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