Skip to content

Commit c97efd3

Browse files
committed
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
1 parent ca826f2 commit c97efd3

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

modules/features2d/src/akaze.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,7 @@ namespace cv
200200
if (!useProvidedKeypoints)
201201
{
202202
impl.Feature_Detection(keypoints);
203-
if( !descriptors.needed() )
204-
impl.Compute_Keypoints_Orientation(keypoints);
203+
impl.Compute_Keypoints_Orientation(keypoints);
205204
}
206205

207206
if (!mask.empty())

modules/features2d/src/kaze/AKAZEFeatures.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,6 @@ class MSURF_Descriptor_64_Invoker : public ParallelLoopBody
549549
{
550550
for (int i = range.start; i < range.end; i++)
551551
{
552-
AKAZEFeatures::Compute_Main_Orientation((*keypoints_)[i], *evolution_);
553552
Get_MSURF_Descriptor_64((*keypoints_)[i], descriptors_->ptr<float>(i));
554553
}
555554
}
@@ -643,7 +642,6 @@ class MLDB_Full_Descriptor_Invoker : public ParallelLoopBody
643642
{
644643
for (int i = range.start; i < range.end; i++)
645644
{
646-
AKAZEFeatures::Compute_Main_Orientation((*keypoints_)[i], *evolution_);
647645
Get_MLDB_Full_Descriptor((*keypoints_)[i], descriptors_->ptr<unsigned char>(i));
648646
}
649647
}

0 commit comments

Comments
 (0)