From eaa29110e1620aea589b7953e9d29d66a902a2ea Mon Sep 17 00:00:00 2001 From: Alexander Pacha Date: Thu, 4 Jul 2013 16:36:29 +1200 Subject: [PATCH] Fixed issue 3130 (http://code.opencv.org/issues/3130), where one argument of the BRISK-call was ignored. Previously it was not possible to use BRISK without creating descriptors. 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 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/features2d/src/brisk.cpp b/modules/features2d/src/brisk.cpp index d1fa0c9c8b..622f772290 100644 --- a/modules/features2d/src/brisk.cpp +++ b/modules/features2d/src/brisk.cpp @@ -525,7 +525,11 @@ BRISK::operator()( InputArray _image, InputArray _mask, vector& 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); }