Skip to content
Snippets Groups Projects
Commit b9b18869 authored by PierreGtch's avatar PierreGtch
Browse files

ProcessorLoopClosureBase : manipulate captures instead of frames

parent 957f3427
No related branches found
No related tags found
1 merge request!290Resolve "ProcessorLoopClosureBase class"
This commit is part of merge request !290. Comments created here will be created in the context of that merge request.
...@@ -96,19 +96,19 @@ protected: ...@@ -96,19 +96,19 @@ protected:
* if validateLoop is not overwritten, a loop will be closed with the returned candidate * if validateLoop is not overwritten, a loop will be closed with the returned candidate
* if no good candidate is found, return nullptr * if no good candidate is found, return nullptr
*/ */
virtual FrameBasePtr findLoopCandidate(FrameBasePtr _key_frame) = 0; virtual CaptureBasePtr findLoopCandidate(CaptureBasePtr _capture) = 0;
/** \brief validate/discard a loop closure /** \brief validate/discard a loop closure
* *
* overwrite it if you want an additional test after findLoopCandidate() * overwrite it if you want an additional test after findLoopCandidate()
*/ */
bool validateLoop(FrameBasePtr _key_frame_1, FrameBasePtr _key_frame_2) {return true;}; bool validateLoop(CaptureBasePtr _capture_1, CaptureBasePtr _capture_2) {return true;};
/** \brief create the factor(s) /** \brief create the factor(s)
* *
* overwrite it if needed * overwrite it if needed
*/ */
virtual void createFactors(FrameBasePtr _key_frame_1, FrameBasePtr _key_frame_2) = 0; virtual void createFactors(CaptureBasePtr _capture_1, CaptureBasePtr _capture_2) = 0;
/** Pre-process incoming Capture /** Pre-process incoming Capture
......
...@@ -32,11 +32,11 @@ void ProcessorLoopClosureBase::process(CaptureBasePtr _incoming_ptr) ...@@ -32,11 +32,11 @@ void ProcessorLoopClosureBase::process(CaptureBasePtr _incoming_ptr)
if (voteSearchLoopClosure(_incoming_ptr)) if (voteSearchLoopClosure(_incoming_ptr))
{ {
FrameBasePtr key_frame_1 = pairKC.first; CaptureBasePtr capture_1 = pairKC.second;
FrameBasePtr key_frame_2 = findLoopCandidate(key_frame_1); CaptureBasePtr capture_2 = findLoopCandidate(capture_1);
if (key_frame_2==nullptr) return; if (capture_2==nullptr) return;
if (validateLoop(key_frame_1, key_frame_2)==false) return; if (validateLoop(capture_1, capture_2)==false) return;
createFactors(key_frame_1, key_frame_2); createFactors(capture_1, capture_2);
}; };
}; };
......
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