From 8c21f47296deaab3635c8e4f72a9235cbfa87f22 Mon Sep 17 00:00:00 2001
From: PierreGtch <pierre.guetschel@gmail.com>
Date: Thu, 6 Jun 2019 14:48:28 +0200
Subject: [PATCH] Rename addCapture() to computeFeatures() in
 ProcessLoopClosureBase2

---
 include/core/processor/processor_loopclosure_base2.h | 9 ++++++---
 src/processor/processor_loopclosure_base2.cpp        | 2 +-
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/include/core/processor/processor_loopclosure_base2.h b/include/core/processor/processor_loopclosure_base2.h
index d3bb452d5..e8557edeb 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 f6f0848ad..100a55ccb 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)
-- 
GitLab