diff --git a/include/core/processor/processor_loopclosure_base2.h b/include/core/processor/processor_loopclosure_base2.h index d3bb452d56edb57c5dd0751971e305642dfaa967..e8557edebe66cc8fffc47ef17751b8c4ea1bd43a 100644 --- a/include/core/processor/processor_loopclosure_base2.h +++ b/include/core/processor/processor_loopclosure_base2.h @@ -22,7 +22,7 @@ struct ProcessorParamsLoopClosure2 : public ProcessorParamsBase * This is an abstract class. * + You must define the following classes : * - voteProcessLoopClosure() - * - addCapture() + * - computeFeatures() * - findLoopCandidate() * - createFactors() * + You can override the following classes : @@ -72,7 +72,7 @@ protected: * this method is called in process() if voteProcessLoopClosure retruns true * this method uses : * - selectPairKC() - * - addCapture() + * - computeFeatures() * - findLoopCandidate() * - validateLoop() * - createFactors() @@ -91,8 +91,11 @@ protected: * * If the loop closure process requires features associated to each capture, * 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 * if validateLoop is not overwritten, a loop will be closed with the returned candidate diff --git a/src/processor/processor_loopclosure_base2.cpp b/src/processor/processor_loopclosure_base2.cpp index f6f0848ad8b7c162e3a7124b4d497dcc0e235297..100a55ccba7e053a34407038cb9661088e8035b8 100644 --- a/src/processor/processor_loopclosure_base2.cpp +++ b/src/processor/processor_loopclosure_base2.cpp @@ -38,7 +38,7 @@ void ProcessorLoopClosureBase2::processLoopClosure() std::pair<FrameBasePtr,CaptureBasePtr> pairKC = selectPairKC(); if (pairKC.first==nullptr || pairKC.second==nullptr) return; - addCapture(pairKC); + computeFeatures(pairKC); FrameBasePtr key_frame_1 = pairKC.first; FrameBasePtr key_frame_2 = findLoopCandidate(key_frame_1); if (key_frame_2==nullptr)