Fixed issue 3130 (http://code.opencv.org/issues/3130), where one argument of the...
authorAlexander Pacha <alexander.pacha@gmail.com>
Thu, 4 Jul 2013 04:36:29 +0000 (16:36 +1200)
committerAlexander Pacha <alexander.pacha@gmail.com>
Thu, 4 Jul 2013 04:36:29 +0000 (16:36 +1200)
Now it behaves like ORB (and how it is documented), and you can call BRISK to just generate feature points and no descriptors.

modules/features2d/src/brisk.cpp

index d1fa0c9..622f772 100644 (file)
@@ -525,7 +525,11 @@ BRISK::operator()( InputArray _image, InputArray _mask, vector<KeyPoint>& keypoi
   bool doOrientation=true;
   if (useProvidedKeypoints)
     doOrientation = false;
-  computeDescriptorsAndOrOrientation(_image, _mask, keypoints, _descriptors, true, doOrientation,
+
+  // If the user specified cv::noArray(), this will yield false. Otherwise it will return true.
+  bool doDescriptors = _descriptors.needed();
+
+  computeDescriptorsAndOrOrientation(_image, _mask, keypoints, _descriptors, doDescriptors, doOrientation,
                                        useProvidedKeypoints);
 }