diff --git a/svo/include/svo/reprojector.h b/svo/include/svo/reprojector.h index b2f4a20..cc6df72 100644 --- a/svo/include/svo/reprojector.h +++ b/svo/include/svo/reprojector.h @@ -42,8 +42,10 @@ public: /// Reprojector config parameters struct Options { size_t max_n_kfs; //!< max number of keyframes to reproject from + bool find_match_direct; Options() - : max_n_kfs(10) + : max_n_kfs(10), + find_match_direct(true) {} } options_; diff --git a/svo/src/reprojector.cpp b/svo/src/reprojector.cpp index 94645a6..3604d1a 100644 --- a/svo/src/reprojector.cpp +++ b/svo/src/reprojector.cpp @@ -163,7 +163,9 @@ bool Reprojector::reprojectCell(Cell& cell, FramePtr frame) } int feature_level; - bool found_match = matcher::findMatchDirect(*it->pt, *frame, it->px, feature_level); + bool found_match = true; + if(options_.find_match_direct) + found_match = matcher::findMatchDirect(*it->pt, *frame, it->px, feature_level); if(!found_match) { it->pt->n_failed_reproj_++;