diff --git a/GPU_version/vio/include/vio/abstract_camera.h b/GPU_version/vio/include/vio/abstract_camera.h index c3e5924..626bad2 100644 --- a/GPU_version/vio/include/vio/abstract_camera.h +++ b/GPU_version/vio/include/vio/abstract_camera.h @@ -67,7 +67,7 @@ public: inline bool isInFrame(const Vector2i &obs, int boundary, int level) const { - if(obs[0] >= boundary && obs.x() < width()/(1<= boundary && obs.y() = boundary && (int)obs.x() < width()/(1<= boundary && (int)obs.y() - + diff --git a/GPU_version/vio/src/matcher.cpp b/GPU_version/vio/src/matcher.cpp index 117d6af..ba9d300 100644 --- a/GPU_version/vio/src/matcher.cpp +++ b/GPU_version/vio/src/matcher.cpp @@ -142,7 +142,7 @@ bool Matcher::findMatchDirect( { ref_ftr_= nullptr; if(!pt.getCloseViewObs(cur_frame.pos(), ref_ftr_))return false; - if(!ref_ftr_->frame->cam_->isInFrame(ref_ftr_->px.cast()/(1<level), halfpatch_size_+2, ref_ftr_->level)) + if(!ref_ftr_->frame->cam_->isInFrame(Vector2d(ref_ftr_->px/(1<level)).cast(), halfpatch_size_+2, ref_ftr_->level)) return false; if(ref_ftr_->frame->img_pyr_.empty())return false; if(ref_ftr_->frame->img_pyr_[ref_ftr_->level].empty())return false; diff --git a/GPU_version/vio/src/reprojector.cpp b/GPU_version/vio/src/reprojector.cpp index 979ab94..c8f0231 100644 --- a/GPU_version/vio/src/reprojector.cpp +++ b/GPU_version/vio/src/reprojector.cpp @@ -151,8 +151,7 @@ namespace vio { extractor->compute(it_frame.item.first->img(), keypoints_kfs, descriptors_ref); matcher->match(descriptors_ref, descriptors_cur, matches); for (auto &&f: _for(it_frame.item.first->fts_)) { - if (f.item->point == NULL) - f.item->point = new Point(it_frame.item.first->cam_->cam2world(f.item->px.x(), f.item->px.y()),f.item); + if (f.item->point == NULL)f.item->point = new Point(it_frame.item.first->cam_->cam2world(f.item->px.x(), f.item->px.y()),f.item); if (f.item->point->last_frame_overlap_id_ == frame->id_)continue; f.item->point->last_frame_overlap_id_ = frame->id_; for (auto &&match:matches) {