From 2878d7eb89676ea688cbabe14603a6d36a4e4c3a Mon Sep 17 00:00:00 2001 From: Odd Kiva <2375733-oddkiva@users.noreply.gitlab.com> Date: Fri, 24 May 2024 00:19:16 +0100 Subject: [PATCH] MAINT: remove obsolete code. --- .../DO/Sara/SfM/Odometry/FeatureTracker.hpp | 48 ------------------- 1 file changed, 48 deletions(-) delete mode 100644 cpp/src/DO/Sara/SfM/Odometry/FeatureTracker.hpp diff --git a/cpp/src/DO/Sara/SfM/Odometry/FeatureTracker.hpp b/cpp/src/DO/Sara/SfM/Odometry/FeatureTracker.hpp deleted file mode 100644 index 2fd475342..000000000 --- a/cpp/src/DO/Sara/SfM/Odometry/FeatureTracker.hpp +++ /dev/null @@ -1,48 +0,0 @@ -#pragma once - -#include - -#include -#include - - -namespace DO::Sara { - - struct FeatureTracker - { - float sift_nn_ratio = 0.6f; - ImagePyramidParams image_pyr_params = ImagePyramidParams(0); - - const ImageView& _frame; - std::array, 2> keys; - std::vector matches; - - FeatureTracker(const ImageView& frame) - : _frame{frame} - { - } - - auto detect_features() -> void - { - print_stage("Computing keypoints..."); - std::swap(keys[0], keys[1]); - keys[1] = compute_sift_keypoints(_frame, image_pyr_params); - } - - auto match_features() -> void - { - print_stage("Matching keypoints..."); - if (features(keys[0]).empty() || features(keys[1]).empty()) - { - SARA_DEBUG << "Skipping...\n"; - return; - } - - matches = match(keys[0], keys[1], sift_nn_ratio); - // Put a hard limit of 1000 matches to scale. - if (matches.size() > 1000) - matches.resize(1000); - } - }; - -} // namespace DO::Sara