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

Rename addCapture() to computeFeatures() in ProcessLoopClosureBase2

parent 402729e0
No related branches found
No related tags found
1 merge request!290Resolve "ProcessorLoopClosureBase class"
...@@ -22,7 +22,7 @@ struct ProcessorParamsLoopClosure2 : public ProcessorParamsBase ...@@ -22,7 +22,7 @@ struct ProcessorParamsLoopClosure2 : public ProcessorParamsBase
* This is an abstract class. * This is an abstract class.
* + You must define the following classes : * + You must define the following classes :
* - voteProcessLoopClosure() * - voteProcessLoopClosure()
* - addCapture() * - computeFeatures()
* - findLoopCandidate() * - findLoopCandidate()
* - createFactors() * - createFactors()
* + You can override the following classes : * + You can override the following classes :
...@@ -72,7 +72,7 @@ protected: ...@@ -72,7 +72,7 @@ protected:
* this method is called in process() if voteProcessLoopClosure retruns true * this method is called in process() if voteProcessLoopClosure retruns true
* this method uses : * this method uses :
* - selectPairKC() * - selectPairKC()
* - addCapture() * - computeFeatures()
* - findLoopCandidate() * - findLoopCandidate()
* - validateLoop() * - validateLoop()
* - createFactors() * - createFactors()
...@@ -91,8 +91,11 @@ protected: ...@@ -91,8 +91,11 @@ protected:
* *
* If the loop closure process requires features associated to each capture, * If the loop closure process requires features associated to each capture,
* the computations to create thies featrues must be done here * the computations to create thies featrues must be done here
*
* In this method you should add the capture to the keyframe if necessary
* and add the features to the capture
*/ */
virtual void addCapture(std::pair<FrameBasePtr,CaptureBasePtr>) = 0; virtual void computeFeatures(std::pair<FrameBasePtr,CaptureBasePtr>) = 0;
/** \brief Find a KF that would be a good candidate to close a loop /** \brief Find a KF that would be a good candidate to close a loop
* 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
......
...@@ -38,7 +38,7 @@ void ProcessorLoopClosureBase2::processLoopClosure() ...@@ -38,7 +38,7 @@ void ProcessorLoopClosureBase2::processLoopClosure()
std::pair<FrameBasePtr,CaptureBasePtr> pairKC = selectPairKC(); std::pair<FrameBasePtr,CaptureBasePtr> pairKC = selectPairKC();
if (pairKC.first==nullptr || pairKC.second==nullptr) if (pairKC.first==nullptr || pairKC.second==nullptr)
return; return;
addCapture(pairKC); computeFeatures(pairKC);
FrameBasePtr key_frame_1 = pairKC.first; FrameBasePtr key_frame_1 = pairKC.first;
FrameBasePtr key_frame_2 = findLoopCandidate(key_frame_1); FrameBasePtr key_frame_2 = findLoopCandidate(key_frame_1);
if (key_frame_2==nullptr) if (key_frame_2==nullptr)
......
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