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
pull/8869/head
Jiri Horner 8 years ago
parent ca826f24d4
commit c97efd311e
  1. 3
      modules/features2d/src/akaze.cpp
  2. 2
      modules/features2d/src/kaze/AKAZEFeatures.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())

@ -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<float>(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<unsigned char>(i));
}
}

Loading…
Cancel
Save