diff --git a/modules/features2d/src/orb.cpp b/modules/features2d/src/orb.cpp index 97f2d7a0e90b72066011292d0aa27dc4fdc587f4..e878cff0cb3b0ba960de9da02635d329017352f8 100644 --- a/modules/features2d/src/orb.cpp +++ b/modules/features2d/src/orb.cpp @@ -891,6 +891,8 @@ void ORB::operator()(const Mat &image_in, const Mat &mask, vector & ke // Get the features and compute their orientation vector& keypoints = all_keypoints[level]; int nkeypoints = (int)keypoints.size(); + if (nkeypoints==0) + continue; // Compute the descriptors if (do_descriptors)