diff --git a/modules/features2d/src/orb.cpp b/modules/features2d/src/orb.cpp index 97f2d7a0e9..e878cff0cb 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)