From 17b0b953341983c46008b0a44e577f452bce299a Mon Sep 17 00:00:00 2001 From: Nicolaniello Buono Date: Sat, 23 Nov 2024 21:46:05 -0500 Subject: [PATCH] Added breaks and ran clang --- experimental/learn_descriptors/visual_odometry.cc | 3 +++ experimental/learn_descriptors/visual_odometry_test.cc | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/experimental/learn_descriptors/visual_odometry.cc b/experimental/learn_descriptors/visual_odometry.cc index 6b9af25f..36047320 100644 --- a/experimental/learn_descriptors/visual_odometry.cc +++ b/experimental/learn_descriptors/visual_odometry.cc @@ -24,6 +24,7 @@ Frontend::Frontend(ExtractorType frontend_algorithm, MatcherType frontend_matche switch (matcher_type_) { case MatcherType::BRUTE_FORCE: descriptor_matcher_ = cv::BFMatcher::create(cv::NORM_L2); + break; case MatcherType::KNN: descriptor_matcher_ = cv::BFMatcher::create(cv::NORM_L2); break; @@ -32,6 +33,7 @@ Frontend::Frontend(ExtractorType frontend_algorithm, MatcherType frontend_matche throw std::invalid_argument("FLANN can not be used with ORB."); } descriptor_matcher_ = cv::FlannBasedMatcher::create(); + break; default: // Error handling needed? break; @@ -62,6 +64,7 @@ std::vector Frontend::get_matches(const cv::Mat &descriptors1, break; case MatcherType::FLANN: get_FLANN_matches(descriptors1, descriptors2, matches); + break; default: break; } diff --git a/experimental/learn_descriptors/visual_odometry_test.cc b/experimental/learn_descriptors/visual_odometry_test.cc index d06f9b14..a3827a7f 100644 --- a/experimental/learn_descriptors/visual_odometry_test.cc +++ b/experimental/learn_descriptors/visual_odometry_test.cc @@ -82,7 +82,7 @@ TEST(VIO_TEST, frontend_pipeline_sweep) { frontend.draw_keypoints(image_2, keypoints_descriptors_pair_2.first, img_keypoints_out_2); frontend.draw_matches(image_1, keypoints_descriptors_pair_1.first, image_2, - keypoints_descriptors_pair_2.first, matches, img_matches_out); + keypoints_descriptors_pair_2.first, matches, img_matches_out); cv::hconcat(img_keypoints_out_1, img_keypoints_out_2, img_display_test); cv::vconcat(img_display_test, img_matches_out, img_display_test); std::stringstream text;