From 49fc8383d27d22c7d1a1126f81cc537d6d14447a Mon Sep 17 00:00:00 2001
From: debeunne <debeunnecesar@gmail.com>
Date: Wed, 13 Apr 2022 12:03:33 +0200
Subject: [PATCH] Comment PreProcess() data structure

---
 include/vision/capture/capture_image.h      | 6 +++++-
 src/processor/processor_visual_odometry.cpp | 9 +++++++--
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/include/vision/capture/capture_image.h b/include/vision/capture/capture_image.h
index 97b569577..66415c5d7 100644
--- a/include/vision/capture/capture_image.h
+++ b/include/vision/capture/capture_image.h
@@ -68,8 +68,12 @@ class WKeyPoint
 };
 
 
-
+// This map is frame specific and enables to recover a Wolf KeyPoint with a certain
+// ID in a frame
 typedef std::unordered_map<size_t, WKeyPoint> KeyPointsMap;
+
+// This maps the IDs of the Wolf KeyPoints that are tracked from a frame to the other.
+// It takes the ID of a WKeyPoint and returns the ID of its track in another Frame.
 typedef std::unordered_map<size_t, size_t> TracksMap;
 
 // Set ClassPtr, ClassConstPtr and ClassWPtr typedefs;
diff --git a/src/processor/processor_visual_odometry.cpp b/src/processor/processor_visual_odometry.cpp
index f42814743..5db79afa9 100644
--- a/src/processor/processor_visual_odometry.cpp
+++ b/src/processor/processor_visual_odometry.cpp
@@ -125,11 +125,16 @@ void ProcessorVisualOdometry::preProcess()
     //   - ...
     ////////////////////////////////
 
-    // Tracks between last and incoming
+    // TracksMap between last and incoming
+    // Input: ID of Wkp in last. Output: ID of the tracked Wkp in incoming.
     TracksMap tracks_last_incoming = kltTrack(img_last, img_incoming, mwkps_last, mwkps_incoming);
 
-    // Merge tracks to get tracks_origin_incoming
+    // TracksMap between origin and last
+    // Input: ID of Wkp in origin. Output: ID of the tracked Wkp in last.
     TracksMap tracks_origin_last = capture_image_last_->getTracksOrigin();
+
+    // Merge tracks to get TracksMap between origin and incoming
+    // Input: ID of Wkp in origin. Output: ID of the tracked Wkp in incoming.
     TracksMap tracks_origin_incoming = mergeTracks(tracks_origin_last, tracks_last_incoming);
 
     // Outliers rejection with essential matrix
-- 
GitLab