diff --git a/modules/features2d/src/orb.cpp b/modules/features2d/src/orb.cpp index d28b20c1b..90b1655f6 100644 --- a/modules/features2d/src/orb.cpp +++ b/modules/features2d/src/orb.cpp @@ -532,7 +532,7 @@ void ORB::operator()(const cv::Mat &image, const cv::Mat &mask, std::vector & keypoints_in_out, cv::Mat & descriptors, bool do_keypoints, bool do_descriptors) { - if ((!do_keypoints) && (!do_descriptors)) + if (((!do_keypoints) && (!do_descriptors)) || (image_in.empty())) return; cv::Mat image;