Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
vision
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor 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
vision
Commits
f28b8784
Commit
f28b8784
authored
3 years ago
by
Joan Solà Ortega
Browse files
Options
Downloads
Patches
Plain Diff
Improve debug info
parent
a1d69962
No related branches found
No related tags found
2 merge requests
!36
After cmake and const refactor
,
!28
Resolve "Building a new visual odometry system"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/processor/processor_visual_odometry.cpp
+11
-6
11 additions, 6 deletions
src/processor/processor_visual_odometry.cpp
with
11 additions
and
6 deletions
src/processor/processor_visual_odometry.cpp
+
11
−
6
View file @
f28b8784
...
@@ -114,6 +114,7 @@ void ProcessorVisualOdometry::preProcess()
...
@@ -114,6 +114,7 @@ void ProcessorVisualOdometry::preProcess()
}
}
}
}
}
}
WOLF_INFO
(
"Initially detected "
,
capture_image_incoming_
->
getKeyPoints
().
size
(),
" keypoints in incoming"
);
// Initialize the tracks data structure with a "dummy track" where the keypoint is pointing to itself
// Initialize the tracks data structure with a "dummy track" where the keypoint is pointing to itself
TracksMap
tracks_init
;
TracksMap
tracks_init
;
...
@@ -123,6 +124,14 @@ void ProcessorVisualOdometry::preProcess()
...
@@ -123,6 +124,14 @@ void ProcessorVisualOdometry::preProcess()
capture_image_incoming_
->
setTracksOrigin
(
tracks_init
);
capture_image_incoming_
->
setTracksOrigin
(
tracks_init
);
capture_image_incoming_
->
setTracksPrev
(
tracks_init
);
capture_image_incoming_
->
setTracksPrev
(
tracks_init
);
// print a bar with the number of active tracks in incoming
std
::
string
s
;
for
(
int
i
=
0
;
i
<
capture_image_incoming_
->
getKeyPoints
().
size
();
i
++
)
{
s
+=
"#"
;
}
WOLF_INFO
(
"TRACKS: "
,
s
);
auto
dt_preprocess
=
std
::
chrono
::
duration_cast
<
std
::
chrono
::
milliseconds
>
(
std
::
chrono
::
system_clock
::
now
()
-
t1
).
count
();
auto
dt_preprocess
=
std
::
chrono
::
duration_cast
<
std
::
chrono
::
milliseconds
>
(
std
::
chrono
::
system_clock
::
now
()
-
t1
).
count
();
WOLF_INFO
(
"dt_preprocess (ms): "
,
dt_preprocess
);
WOLF_INFO
(
"dt_preprocess (ms): "
,
dt_preprocess
);
...
@@ -220,12 +229,8 @@ void ProcessorVisualOdometry::preProcess()
...
@@ -220,12 +229,8 @@ void ProcessorVisualOdometry::preProcess()
// Detect new KeyPoints
// Detect new KeyPoints
std
::
vector
<
cv
::
KeyPoint
>
kps_last_new
;
std
::
vector
<
cv
::
KeyPoint
>
kps_last_new
;
// Detect in the whole image and retain N best: BAD because cannot control the repartition of KeyPoints
// Use the grid to detect new keypoints in empty cells
// detector_->detect(img_last, kps_last_new);
// We try a bunch of times to add keypoints to randomly selected empty regions of interest
// retainBest(kps_last_new, params_visual_odometry_->max_new_features);
// Instead, use the grid to detect new keypoints in empty cells
// We try a bunch of time to add keypoints to randomly selected empty regions of interest
for
(
int
i
=
0
;
i
<
params_visual_odometry_
->
max_new_features
;
i
++
){
for
(
int
i
=
0
;
i
<
params_visual_odometry_
->
max_new_features
;
i
++
){
cv
::
Rect
rect_roi
;
cv
::
Rect
rect_roi
;
...
...
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