Skip to content

Commit

Permalink
Added breaks and ran clang
Browse files Browse the repository at this point in the history
  • Loading branch information
PizzaRoll04 committed Nov 24, 2024
1 parent f4d5a4e commit 17b0b95
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions experimental/learn_descriptors/visual_odometry.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -62,6 +64,7 @@ std::vector<cv::DMatch> Frontend::get_matches(const cv::Mat &descriptors1,
break;
case MatcherType::FLANN:
get_FLANN_matches(descriptors1, descriptors2, matches);
break;
default:
break;
}
Expand Down
2 changes: 1 addition & 1 deletion experimental/learn_descriptors/visual_odometry_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 17b0b95

Please sign in to comment.