Skip to content
Snippets Groups Projects
Commit 65d1b9c1 authored by Mederic Fourmy's avatar Mederic Fourmy
Browse files

Fixed the main issue, especially KeyFrame creation, the logic seems to work

parent 4832a6c3
No related branches found
No related tags found
2 merge requests!36After cmake and const refactor,!28Resolve "Building a new visual odometry system"
...@@ -75,7 +75,7 @@ int main(int argc, char** argv) ...@@ -75,7 +75,7 @@ int main(int argc, char** argv)
// for (size_t k=0; k < fn.size(); ++k) // for (size_t k=0; k < fn.size(); ++k)
for (size_t k=0; k < 100; ++k) for (size_t k=0; k < 20; ++k)
{ {
cv::Mat img = cv::imread(fn[k], cv::IMREAD_GRAYSCALE); cv::Mat img = cv::imread(fn[k], cv::IMREAD_GRAYSCALE);
......
...@@ -21,8 +21,8 @@ fast_params: ...@@ -21,8 +21,8 @@ fast_params:
threshold_fast: 50 threshold_fast: 50
non_max_suppresion: true non_max_suppresion: true
min_nb_tracks: 100 min_nb_tracks: 10
max_nb_tracks: 200 max_nb_tracks: 20
std_pix: 1 std_pix: 1
......
...@@ -158,6 +158,7 @@ void ProcessorVisualOdometry::preProcess() ...@@ -158,6 +158,7 @@ void ProcessorVisualOdometry::preProcess()
//////////////////////////////// ////////////////////////////////
size_t n_tracks_origin = tracks_origin_incoming.size(); size_t n_tracks_origin = tracks_origin_incoming.size();
if (n_tracks_origin < params_visual_odometry_->min_nb_tracks_){ if (n_tracks_origin < params_visual_odometry_->min_nb_tracks_){
std::cout << " Too Few Tracks" << std::endl;
// Detect new KeyPoints // Detect new KeyPoints
std::vector<cv::KeyPoint> kps_last_new; std::vector<cv::KeyPoint> kps_last_new;
...@@ -388,7 +389,8 @@ bool ProcessorVisualOdometry::voteForKeyFrame() const ...@@ -388,7 +389,8 @@ bool ProcessorVisualOdometry::voteForKeyFrame() const
bool vote = capture_image_incoming->getLastWasRepopulated(); bool vote = capture_image_incoming->getLastWasRepopulated();
// simple vote based on frame count, should be changed to something that takes into account number of tracks alive, parallax, etc. // simple vote based on frame count, should be changed to something that takes into account number of tracks alive, parallax, etc.
vote = vote || ((frame_count_ % 5) == 0); // vote = vote || ((frame_count_ % 5) == 0);
std::cout << "vote " << vote << std::endl;
return vote; return vote;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment