UZ-SLAMLab / ORB_SLAM3

ORB-SLAM3: An Accurate Open-Source Library for Visual, Visual-Inertial and Multi-Map SLAM
GNU General Public License v3.0
6.26k stars 2.47k forks source link

Help Removing/Filtering Keypoints #815

Open IndShiv opened 10 months ago

IndShiv commented 10 months ago

Hi everyone,

I am a beginner when it comes to SLAM in general but Ive wanted to ask where could I remove keypoints in the RGBD method of ORBSLAM3.

Ive tried attempting to do it in the Frame class - ie mCurrentFrame within the GrabImageRGBD method but I seem to run into alot of issues. I am basically using a filtering alogrithm I developed based on a object detection model and I want to remove keypoints within a certain area.

Before I run my algorithm I simply tried reassinging mCurrent.mvkeys to a new std::vector cv::Keypoint called New_KP which is fundamentally just the first 800 keypoints of mCurrent.mvkeys but I end up with alot of errors. I would appreciate anyones help tremedously!

I feel like I am misunderstanding something simple. Thanks!

basedball commented 3 months ago

The Frame member variable N gets set set to mvKeys.size() when the Frame is first constructed, and it's never changed again. Maybe try updating this value when you reassign mvKeys?

IndShiv commented 3 months ago

The Frame member variable N gets set set to mvKeys.size() when the Frame is first constructed, and it's never changed again. Maybe try updating this value when you reassign mvKeys?

I actually did end up doing that and it seems it worked out! Thanks!