Ask Your Question

Revision history [back]

Brisk does not calculate orientation when keypoints are provided

Hi,

I encountered something that looks a bit strange to me regarding Brisk's implementation.

A common way to use Brisk is:

    Ptr<FeatureDetector> detector = FeatureDetector::create(detector_name);
    Ptr<DescriptorExtractor> descriptor = DescriptorExtractor::create(descriptor_name);
    string s = format("%s\\%s\\img%d.ppm", dataset_dir.c_str(), dsname, k);
    Mat imgK=imread(s, 0);
    detector->detect(imgK, kp);
    descriptor->compute(imgK, kp, desc);

However, when using it this way, we supply the keypoints to the Brisk descriptor and the flag "useProvidedKeypoints" is true, thus Brisk does not compute orientation:

void
BRISK::operator()( InputArray _image, InputArray _mask, vector<KeyPoint>& keypoints,
                   OutputArray _descriptors, bool useProvidedKeypoints) const
{
  bool doOrientation=true;
  if (useProvidedKeypoints)
    doOrientation = false;
  computeDescriptorsAndOrOrientation(_image, _mask, keypoints, _descriptors, true, doOrientation,
                                       useProvidedKeypoints);
}

Is that a bug or am I missing something here about Brisk's implementation?

Thanks in advance,

Gil.