Commit 3e1b0186 authored by Vincent Rabaud's avatar Vincent Rabaud

- make sure we don't crash for an empty image

parent 74cc1803
......@@ -532,7 +532,7 @@ void ORB::operator()(const cv::Mat &image, const cv::Mat &mask, std::vector<cv::
void ORB::operator()(const cv::Mat &image_in, const cv::Mat &mask, std::vector<cv::KeyPoint> & 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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment