From c97efd311e93314acf47e5106bc01e2f17aa8bbc Mon Sep 17 00:00:00 2001 From: Jiri Horner Date: Fri, 9 Jun 2017 17:18:57 +0200 Subject: [PATCH] feature2d: do not compute keypoints orientation twice * always compute keypoints orientation, when computing keypoints * do not recompute keypoint orientation when computing descriptors this allows to test detection and extraction separately --- modules/features2d/src/akaze.cpp | 3 +-- modules/features2d/src/kaze/AKAZEFeatures.cpp | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/modules/features2d/src/akaze.cpp b/modules/features2d/src/akaze.cpp index 566283859e..166d239e00 100644 --- a/modules/features2d/src/akaze.cpp +++ b/modules/features2d/src/akaze.cpp @@ -200,8 +200,7 @@ namespace cv if (!useProvidedKeypoints) { impl.Feature_Detection(keypoints); - if( !descriptors.needed() ) - impl.Compute_Keypoints_Orientation(keypoints); + impl.Compute_Keypoints_Orientation(keypoints); } if (!mask.empty()) diff --git a/modules/features2d/src/kaze/AKAZEFeatures.cpp b/modules/features2d/src/kaze/AKAZEFeatures.cpp index 7d505164db..9d6070ded8 100644 --- a/modules/features2d/src/kaze/AKAZEFeatures.cpp +++ b/modules/features2d/src/kaze/AKAZEFeatures.cpp @@ -549,7 +549,6 @@ public: { for (int i = range.start; i < range.end; i++) { - AKAZEFeatures::Compute_Main_Orientation((*keypoints_)[i], *evolution_); Get_MSURF_Descriptor_64((*keypoints_)[i], descriptors_->ptr(i)); } } @@ -643,7 +642,6 @@ public: { for (int i = range.start; i < range.end; i++) { - AKAZEFeatures::Compute_Main_Orientation((*keypoints_)[i], *evolution_); Get_MLDB_Full_Descriptor((*keypoints_)[i], descriptors_->ptr(i)); } }